@acorex/components 20.7.11 → 20.7.12

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.
@@ -6045,6 +6045,17 @@ class AXComposerService {
6045
6045
  this._replyMessage.set(null);
6046
6046
  this._editMessage.set(null);
6047
6047
  }
6048
+ /**
6049
+ * Persist draft for the previous conversation and reset composer UI state when switching conversations.
6050
+ */
6051
+ onConversationChanged(previousConversationId, currentConversationId) {
6052
+ if (previousConversationId && previousConversationId !== currentConversationId && !this.editMessage()) {
6053
+ this.saveDraft(previousConversationId, this.draftText());
6054
+ }
6055
+ this.clear();
6056
+ this.attachments.set([]);
6057
+ this.draftText.set(currentConversationId ? this.loadDraft(currentConversationId) : '');
6058
+ }
6048
6059
  async sendTypingIndicator(conversationId) {
6049
6060
  await this.conversationService.sendTypingIndicator(conversationId);
6050
6061
  }
@@ -9023,8 +9034,8 @@ class AXVideoPickerComponent {
9023
9034
  mediaId: video.mediaId,
9024
9035
  mimeType: video.file.type,
9025
9036
  size: video.file.size,
9026
- thumbnailUrl: video.preview,
9027
- }, video.duration ?? 0, video.preview));
9037
+ // thumbnailUrl: video.preview,
9038
+ }, video.duration ?? 0));
9028
9039
  if (videos.length === 0) {
9029
9040
  return;
9030
9041
  }
@@ -9174,7 +9185,9 @@ class AXVideoPickerComponent {
9174
9185
  class="ax-cnv-picker__remove"
9175
9186
  (click)="removeVideo($index)"
9176
9187
  [attr.aria-label]="
9177
- video.uploading ? getCancelUploadLabel() : translation.translateSync('@acorex:chat.pickers.common.remove')
9188
+ video.uploading
9189
+ ? getCancelUploadLabel()
9190
+ : translation.translateSync('@acorex:chat.pickers.common.remove')
9178
9191
  "
9179
9192
  >
9180
9193
  <i class="fa-light fa-xmark"></i>
@@ -9289,7 +9302,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
9289
9302
  class="ax-cnv-picker__remove"
9290
9303
  (click)="removeVideo($index)"
9291
9304
  [attr.aria-label]="
9292
- video.uploading ? getCancelUploadLabel() : translation.translateSync('@acorex:chat.pickers.common.remove')
9305
+ video.uploading
9306
+ ? getCancelUploadLabel()
9307
+ : translation.translateSync('@acorex:chat.pickers.common.remove')
9293
9308
  "
9294
9309
  >
9295
9310
  <i class="fa-light fa-xmark"></i>
@@ -11174,7 +11189,8 @@ class AXConversationMessageRendererStateComponent {
11174
11189
  this.hasVisibleChrome = computed(() => this.showSending() || this.showFailed() || this.showContentError(), ...(ngDevMode ? [{ debugName: "hasVisibleChrome" }] : []));
11175
11190
  this.showRetryButton = computed(() => this.showFailed(), ...(ngDevMode ? [{ debugName: "showRetryButton" }] : []));
11176
11191
  this.contentErrorText = computed(() => this.contentErrorLabel() ?? this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-content'), ...(ngDevMode ? [{ debugName: "contentErrorText" }] : []));
11177
- this.deliveryFailedText = computed(() => this.deliveryFailedLabel() ?? this.translation.translateSync('@acorex:chat.renderer-state.could-not-send-message'), ...(ngDevMode ? [{ debugName: "deliveryFailedText" }] : []));
11192
+ this.deliveryFailedText = computed(() => this.deliveryFailedLabel() ??
11193
+ this.translation.translateSync('@acorex:chat.renderer-state.could-not-send-message'), ...(ngDevMode ? [{ debugName: "deliveryFailedText" }] : []));
11178
11194
  }
11179
11195
  async onRetry() {
11180
11196
  const msg = this.message();
@@ -11572,7 +11588,7 @@ class AXAudioAttachmentComponent {
11572
11588
  <span class="ax-cnv-audio__time">{{ durationLabel() }}</span>
11573
11589
  } -->
11574
11590
  </div>
11575
- `, isInline: true, styles: [":host{display:block}.ax-cnv-audio{display:flex;align-items:center;gap:.5rem;width:100%;min-width:18rem;min-height:2.75rem;padding:.5rem .625rem;border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface))}.ax-cnv-audio__icon{flex-shrink:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-500));font-size:.875rem}.ax-cnv-audio__main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.ax-cnv-audio__title{font-size:.75rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgb(var(--ax-sys-color-on-surface))}.ax-cnv-audio__el{width:100%;height:1.75rem}.ax-cnv-audio__time{flex-shrink:0;font-size:.6875rem;font-variant-numeric:tabular-nums;color:rgba(var(--ax-sys-color-on-surface),.65)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11591
+ `, isInline: true, styles: [":host{display:block}.ax-cnv-audio{display:flex;align-items:center;gap:.5rem;width:100%;min-width:22rem;min-height:2.75rem;padding:.5rem .625rem;border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface))}.ax-cnv-audio__icon{flex-shrink:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-500));font-size:.875rem}.ax-cnv-audio__main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.ax-cnv-audio__title{font-size:.75rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgb(var(--ax-sys-color-on-surface))}.ax-cnv-audio__el{width:100%;height:1.75rem}.ax-cnv-audio__time{flex-shrink:0;font-size:.6875rem;font-variant-numeric:tabular-nums;color:rgba(var(--ax-sys-color-on-surface),.65)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11576
11592
  }
11577
11593
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXAudioAttachmentComponent, decorators: [{
11578
11594
  type: Component,
@@ -11599,16 +11615,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
11599
11615
  <span class="ax-cnv-audio__time">{{ durationLabel() }}</span>
11600
11616
  } -->
11601
11617
  </div>
11602
- `, styles: [":host{display:block}.ax-cnv-audio{display:flex;align-items:center;gap:.5rem;width:100%;min-width:18rem;min-height:2.75rem;padding:.5rem .625rem;border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface))}.ax-cnv-audio__icon{flex-shrink:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-500));font-size:.875rem}.ax-cnv-audio__main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.ax-cnv-audio__title{font-size:.75rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgb(var(--ax-sys-color-on-surface))}.ax-cnv-audio__el{width:100%;height:1.75rem}.ax-cnv-audio__time{flex-shrink:0;font-size:.6875rem;font-variant-numeric:tabular-nums;color:rgba(var(--ax-sys-color-on-surface),.65)}\n"] }]
11618
+ `, styles: [":host{display:block}.ax-cnv-audio{display:flex;align-items:center;gap:.5rem;width:100%;min-width:22rem;min-height:2.75rem;padding:.5rem .625rem;border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface))}.ax-cnv-audio__icon{flex-shrink:0;width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-500));font-size:.875rem}.ax-cnv-audio__main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.ax-cnv-audio__title{font-size:.75rem;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgb(var(--ax-sys-color-on-surface))}.ax-cnv-audio__el{width:100%;height:1.75rem}.ax-cnv-audio__time{flex-shrink:0;font-size:.6875rem;font-variant-numeric:tabular-nums;color:rgba(var(--ax-sys-color-on-surface),.65)}\n"] }]
11603
11619
  }] });
11604
11620
 
11605
- /** Push playback state to the info-bar banner for a message. */
11606
- function syncPlaybackInfoBarBanner(infoBar, message, inputs, options) {
11607
- const forceOpen = options?.forceOpen ?? false;
11608
- const shouldOpen = forceOpen || inputs.isPlaying || infoBar.isMessageBannerActive(message.id);
11609
- if (!shouldOpen) {
11610
- return;
11611
- }
11621
+ function buildPlaybackBannerPayload(inputs) {
11612
11622
  const payload = {
11613
11623
  title: inputs.title,
11614
11624
  currentTime: inputs.currentTime ?? 0,
@@ -11626,8 +11636,21 @@ function syncPlaybackInfoBarBanner(infoBar, message, inputs, options) {
11626
11636
  if (inputs.showSpeedControl !== undefined) {
11627
11637
  payload['showSpeedControl'] = inputs.showSpeedControl;
11628
11638
  }
11639
+ return payload;
11640
+ }
11641
+ /** Push playback state to the info-bar banner for a message. */
11642
+ function syncPlaybackInfoBarBanner(infoBar, message, inputs, options) {
11643
+ const forceOpen = options?.forceOpen ?? false;
11644
+ const shouldOpen = forceOpen || inputs.isPlaying || infoBar.isMessageBannerActive(message.id);
11645
+ if (!shouldOpen) {
11646
+ return;
11647
+ }
11648
+ const payload = buildPlaybackBannerPayload(inputs);
11649
+ if (infoBar.isMessageBannerActive(message.id)) {
11650
+ infoBar.updateMessageBannerInputs(message.id, payload);
11651
+ return;
11652
+ }
11629
11653
  infoBar.showMessageBanner(message, payload);
11630
- infoBar.updateMessageBannerInputs(message.id, payload);
11631
11654
  }
11632
11655
 
11633
11656
  /**
@@ -11643,21 +11666,6 @@ const RENDERER_SHARED_STYLES = `
11643
11666
  display: flex;
11644
11667
  flex-direction: column;
11645
11668
  gap: 0.375rem;
11646
- max-width: min(100%, 18.5rem);
11647
- }
11648
-
11649
- .ax-cnv-msg--wide {
11650
- max-width: min(100%, 22rem);
11651
- }
11652
-
11653
- @media (min-width: 480px) {
11654
- .ax-cnv-msg {
11655
- max-width: min(100%, 24rem);
11656
- }
11657
-
11658
- .ax-cnv-msg--wide {
11659
- max-width: min(100%, 28rem);
11660
- }
11661
11669
  }
11662
11670
 
11663
11671
  .ax-cnv-msg__stack {
@@ -11689,11 +11697,13 @@ const RENDERER_SHARED_STYLES = `
11689
11697
 
11690
11698
  .ax-cnv-msg__grid--multi {
11691
11699
  grid-template-columns: repeat(3, 1fr);
11700
+ grid-auto-rows: 10rem;
11692
11701
  }
11693
11702
 
11694
11703
  @media (max-width: 380px) {
11695
11704
  .ax-cnv-msg__grid--multi {
11696
11705
  grid-template-columns: repeat(2, 1fr);
11706
+ grid-auto-rows: 10rem;
11697
11707
  }
11698
11708
  }
11699
11709
 
@@ -11706,6 +11716,30 @@ const RENDERER_SHARED_STYLES = `
11706
11716
  opacity: 0.88;
11707
11717
  }
11708
11718
 
11719
+ /* Flush layout: media fills the message bubble edge-to-edge (image / video). */
11720
+ .ax-cnv-msg--flush {
11721
+ width: 100%;
11722
+ max-width: 100%;
11723
+ gap: 0;
11724
+ }
11725
+
11726
+ .ax-cnv-msg--flush .ax-cnv-msg__caption {
11727
+ padding: 0.375rem 0.625rem 0;
11728
+ }
11729
+
11730
+ .ax-cnv-msg--flush .ax-cnv-msg__grid {
11731
+ border-radius: 0;
11732
+ background: transparent;
11733
+ }
11734
+
11735
+ .ax-cnv-msg--flush .ax-cnv-msg__stack {
11736
+ gap: 2px;
11737
+ }
11738
+
11739
+ .ax-cnv-msg--flush ::ng-deep .ax-cnv-video {
11740
+ border-radius: 0;
11741
+ }
11742
+
11709
11743
  .ax-cnv-msg__card {
11710
11744
  border-radius: var(--ax-sys-border-radius, 0.5rem);
11711
11745
  border: 1px solid rgb(var(--ax-sys-color-border-light-surface));
@@ -11826,7 +11860,7 @@ class AXAudioRendererComponent {
11826
11860
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
11827
11861
  }
11828
11862
  </div>
11829
- `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXAudioAttachmentComponent, selector: "ax-cnv-audio-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11863
+ `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXAudioAttachmentComponent, selector: "ax-cnv-audio-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11830
11864
  }
11831
11865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXAudioRendererComponent, decorators: [{
11832
11866
  type: Component,
@@ -11849,7 +11883,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
11849
11883
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
11850
11884
  }
11851
11885
  </div>
11852
- `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
11886
+ `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
11853
11887
  }], ctorParameters: () => [] });
11854
11888
 
11855
11889
  class AXFallbackRendererComponent {
@@ -11968,7 +12002,7 @@ class AXFileRendererComponent {
11968
12002
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
11969
12003
  }
11970
12004
  </div>
11971
- `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXFileAttachmentComponent, selector: "ax-cnv-file-attachment", inputs: ["item"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12005
+ `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXFileAttachmentComponent, selector: "ax-cnv-file-attachment", inputs: ["item"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11972
12006
  }
11973
12007
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFileRendererComponent, decorators: [{
11974
12008
  type: Component,
@@ -11984,7 +12018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
11984
12018
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
11985
12019
  }
11986
12020
  </div>
11987
- `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
12021
+ `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
11988
12022
  }] });
11989
12023
 
11990
12024
  class AXImageAttachmentComponent {
@@ -12008,7 +12042,7 @@ class AXImageAttachmentComponent {
12008
12042
  >
12009
12043
  <img [src]="thumbnailUrl()" [alt]="alt()" loading="lazy" (load)="ready.set(true)" />
12010
12044
  </button>
12011
- `, isInline: true, styles: [":host{display:block;min-width:0;min-height:0}.ax-cnv-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border:none;background:rgb(var(--ax-sys-color-light-surface));cursor:pointer;overflow:hidden}.ax-cnv-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-cnv-image-attachment--ready img{opacity:1}.ax-cnv-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12045
+ `, isInline: true, styles: [":host{display:block;min-width:0;min-height:0}.ax-cnv-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));cursor:pointer;overflow:hidden}.ax-cnv-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-cnv-image-attachment--ready img{opacity:1}.ax-cnv-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12012
12046
  }
12013
12047
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageAttachmentComponent, decorators: [{
12014
12048
  type: Component,
@@ -12022,7 +12056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
12022
12056
  >
12023
12057
  <img [src]="thumbnailUrl()" [alt]="alt()" loading="lazy" (load)="ready.set(true)" />
12024
12058
  </button>
12025
- `, styles: [":host{display:block;min-width:0;min-height:0}.ax-cnv-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border:none;background:rgb(var(--ax-sys-color-light-surface));cursor:pointer;overflow:hidden}.ax-cnv-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-cnv-image-attachment--ready img{opacity:1}.ax-cnv-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"] }]
12059
+ `, styles: [":host{display:block;min-width:0;min-height:0}.ax-cnv-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));cursor:pointer;overflow:hidden}.ax-cnv-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-cnv-image-attachment--ready img{opacity:1}.ax-cnv-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"] }]
12026
12060
  }] });
12027
12061
 
12028
12062
  class AXImageRendererComponent {
@@ -12055,14 +12089,10 @@ class AXImageRendererComponent {
12055
12089
  }
12056
12090
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12057
12091
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXImageRendererComponent, isStandalone: true, selector: "ax-conversation-image-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { imageClick: "imageClick" }, ngImport: i0, template: `
12058
- <div class="ax-cnv-msg">
12092
+ <div class="ax-cnv-msg ax-cnv-msg--flush">
12059
12093
  <div class="ax-cnv-msg__grid" [class]="gridModeClass()">
12060
12094
  @for (image of images(); track image.mediaId ?? image.url) {
12061
- <ax-cnv-image-attachment
12062
- [item]="image"
12063
- [alt]="caption() || 'Image'"
12064
- (imageClick)="onImageClick(image)"
12065
- />
12095
+ <ax-cnv-image-attachment [item]="image" [alt]="caption() || 'Image'" (imageClick)="onImageClick(image)" />
12066
12096
  }
12067
12097
  </div>
12068
12098
  @if (caption()) {
@@ -12076,19 +12106,15 @@ class AXImageRendererComponent {
12076
12106
  placement="below"
12077
12107
  />
12078
12108
  </div>
12079
- `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXImageAttachmentComponent, selector: "ax-cnv-image-attachment", inputs: ["item", "alt"], outputs: ["imageClick"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12109
+ `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXImageAttachmentComponent, selector: "ax-cnv-image-attachment", inputs: ["item", "alt"], outputs: ["imageClick"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12080
12110
  }
12081
12111
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXImageRendererComponent, decorators: [{
12082
12112
  type: Component,
12083
12113
  args: [{ selector: 'ax-conversation-image-renderer', imports: [CommonModule, AXImageAttachmentComponent, AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
12084
- <div class="ax-cnv-msg">
12114
+ <div class="ax-cnv-msg ax-cnv-msg--flush">
12085
12115
  <div class="ax-cnv-msg__grid" [class]="gridModeClass()">
12086
12116
  @for (image of images(); track image.mediaId ?? image.url) {
12087
- <ax-cnv-image-attachment
12088
- [item]="image"
12089
- [alt]="caption() || 'Image'"
12090
- (imageClick)="onImageClick(image)"
12091
- />
12117
+ <ax-cnv-image-attachment [item]="image" [alt]="caption() || 'Image'" (imageClick)="onImageClick(image)" />
12092
12118
  }
12093
12119
  </div>
12094
12120
  @if (caption()) {
@@ -12102,7 +12128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
12102
12128
  placement="below"
12103
12129
  />
12104
12130
  </div>
12105
- `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
12131
+ `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
12106
12132
  }] });
12107
12133
 
12108
12134
  class AXLocationRendererComponent {
@@ -12444,138 +12470,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
12444
12470
  class AXVideoAttachmentComponent {
12445
12471
  constructor() {
12446
12472
  this.item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
12447
- this.playbackActive = output();
12448
- this.playbackIdle = output();
12449
- this.playbackTimeUpdate = output();
12450
- this.playbackPlayingChange = output();
12473
+ this.playingChange = output();
12474
+ this.timeUpdate = output();
12475
+ this.durationChange = output();
12476
+ this.playbackEnded = output();
12451
12477
  this.videoElementRef = viewChild('videoEl', ...(ngDevMode ? [{ debugName: "videoElementRef" }] : []));
12452
- this.showPlayer = signal(false, ...(ngDevMode ? [{ debugName: "showPlayer" }] : []));
12453
12478
  this.playbackReference = computed(() => toUploaderReference(this.item()), ...(ngDevMode ? [{ debugName: "playbackReference" }] : []));
12454
- this.thumbReference = computed(() => ({
12455
- ...toUploaderReference(this.item()),
12456
- url: this.item().thumbnailUrl ?? this.item().url,
12457
- }), ...(ngDevMode ? [{ debugName: "thumbReference" }] : []));
12458
12479
  this.resolvedPlaybackUrl = createResolvedMediaUrlSignal(this.playbackReference);
12459
- this.resolvedThumbnailUrl = createResolvedMediaUrlSignal(this.thumbReference);
12460
12480
  this.playbackUrl = computed(() => this.resolvedPlaybackUrl() ?? this.item().url ?? '', ...(ngDevMode ? [{ debugName: "playbackUrl" }] : []));
12461
- this.thumbnailUrl = computed(() => this.resolvedThumbnailUrl() ?? this.item().thumbnailUrl, ...(ngDevMode ? [{ debugName: "thumbnailUrl" }] : []));
12462
12481
  this.duration = computed(() => this.item().duration ?? 0, ...(ngDevMode ? [{ debugName: "duration" }] : []));
12463
12482
  this.durationLabel = computed(() => formatMediaDuration(this.duration()), ...(ngDevMode ? [{ debugName: "durationLabel" }] : []));
12464
- this.playAriaLabel = computed(() => {
12465
- const d = this.duration();
12466
- return d > 0 ? `Play video, ${this.durationLabel()}` : 'Play video';
12467
- }, ...(ngDevMode ? [{ debugName: "playAriaLabel" }] : []));
12483
+ }
12484
+ togglePlay() {
12485
+ const el = this.videoElementRef()?.nativeElement;
12486
+ if (!el) {
12487
+ return;
12488
+ }
12489
+ if (el.paused) {
12490
+ void el.play();
12491
+ }
12492
+ else {
12493
+ el.pause();
12494
+ }
12495
+ }
12496
+ pause() {
12497
+ this.videoElementRef()?.nativeElement?.pause();
12468
12498
  }
12469
12499
  onLoadedMetadata() {
12470
- this.emitPlaybackState();
12471
12500
  const el = this.videoElementRef()?.nativeElement;
12472
- if (el) {
12473
- this.playbackActive.emit(el);
12501
+ if (el && Number.isFinite(el.duration)) {
12502
+ this.durationChange.emit(el.duration);
12474
12503
  }
12475
12504
  }
12476
12505
  onTimeUpdate() {
12477
- this.emitPlaybackState();
12506
+ const el = this.videoElementRef()?.nativeElement;
12507
+ if (el) {
12508
+ this.timeUpdate.emit(el.currentTime);
12509
+ }
12478
12510
  }
12479
12511
  onPlay() {
12480
- this.playbackPlayingChange.emit(true);
12481
- this.emitPlaybackState();
12512
+ this.playingChange.emit(true);
12482
12513
  }
12483
12514
  onPause() {
12484
- this.playbackPlayingChange.emit(false);
12485
- this.emitPlaybackState();
12515
+ this.playingChange.emit(false);
12486
12516
  }
12487
12517
  onEnded() {
12488
- this.playbackPlayingChange.emit(false);
12489
- this.emitPlaybackState();
12490
- }
12491
- emitPlaybackState() {
12492
- const el = this.videoElementRef()?.nativeElement;
12493
- if (!el) {
12494
- return;
12495
- }
12496
- this.playbackTimeUpdate.emit({
12497
- currentTime: el.currentTime,
12498
- duration: Number.isFinite(el.duration) ? el.duration : this.duration(),
12499
- });
12518
+ this.playingChange.emit(false);
12519
+ this.playbackEnded.emit();
12500
12520
  }
12501
12521
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoAttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12502
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXVideoAttachmentComponent, isStandalone: true, selector: "ax-cnv-video-attachment", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { playbackActive: "playbackActive", playbackIdle: "playbackIdle", playbackTimeUpdate: "playbackTimeUpdate", playbackPlayingChange: "playbackPlayingChange" }, viewQueries: [{ propertyName: "videoElementRef", first: true, predicate: ["videoEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
12522
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.3", type: AXVideoAttachmentComponent, isStandalone: true, selector: "ax-cnv-video-attachment", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { playingChange: "playingChange", timeUpdate: "timeUpdate", durationChange: "durationChange", playbackEnded: "playbackEnded" }, viewQueries: [{ propertyName: "videoElementRef", first: true, predicate: ["videoEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
12503
12523
  <div class="ax-cnv-video">
12504
- @if (!showPlayer()) {
12505
- <button
12506
- type="button"
12507
- class="ax-cnv-video__preview"
12508
- (click)="showPlayer.set(true)"
12509
- [disabled]="!playbackUrl()"
12510
- [attr.aria-label]="playAriaLabel()"
12511
- >
12512
- @if (thumbnailUrl()) {
12513
- <img class="ax-cnv-video__thumb" [src]="thumbnailUrl()!" alt="" loading="lazy" />
12514
- } @else {
12515
- <span class="ax-cnv-video__placeholder"><i class="fa-light fa-video"></i></span>
12516
- }
12517
- <span class="ax-cnv-video__play" aria-hidden="true"><i class="fa-solid fa-play"></i></span>
12518
- @if (duration() > 0) {
12519
- <span class="ax-cnv-video__duration">{{ durationLabel() }}</span>
12520
- }
12521
- </button>
12522
- } @else {
12523
- <video
12524
- #videoEl
12525
- class="ax-cnv-video__player"
12526
- [src]="playbackUrl()"
12527
- controls
12528
- playsinline
12529
- preload="metadata"
12530
- (loadedmetadata)="onLoadedMetadata()"
12531
- (timeupdate)="onTimeUpdate()"
12532
- (play)="onPlay()"
12533
- (pause)="onPause()"
12534
- (ended)="onEnded()"
12535
- ></video>
12536
- }
12524
+ <video
12525
+ #videoEl
12526
+ class="ax-cnv-video__player"
12527
+ [src]="playbackUrl()"
12528
+ controls
12529
+ playsinline
12530
+ preload="metadata"
12531
+ (loadedmetadata)="onLoadedMetadata()"
12532
+ (timeupdate)="onTimeUpdate()"
12533
+ (play)="onPlay()"
12534
+ (pause)="onPause()"
12535
+ (ended)="onEnded()"
12536
+ ></video>
12537
12537
  </div>
12538
- `, isInline: true, styles: [":host{display:block}.ax-cnv-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-cnv-video__preview{position:relative;display:block;width:100%;min-height:7rem;padding:0;border:none;cursor:pointer;background:rgb(var(--ax-sys-color-darker-surface));touch-action:manipulation}.ax-cnv-video__thumb{width:100%;max-height:min(40dvh,14rem);object-fit:cover;display:block}.ax-cnv-video__placeholder{display:flex;align-items:center;justify-content:center;min-height:7rem;color:rgba(var(--ax-sys-color-on-surface),.45);font-size:2rem}.ax-cnv-video__play{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#00000047;color:rgb(var(--ax-sys-color-light));font-size:1.75rem}.ax-cnv-video__duration{position:absolute;inset-inline-end:.375rem;inset-block-end:.375rem;padding:.125rem .375rem;border-radius:var(--ax-sys-border-radius, .25rem);background:#000000a6;color:rgb(var(--ax-sys-color-light));font-size:.6875rem;font-variant-numeric:tabular-nums}.ax-cnv-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}.ax-cnv-video__preview:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12538
+ `, isInline: true, styles: [":host{display:block}.ax-cnv-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-cnv-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12539
12539
  }
12540
12540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoAttachmentComponent, decorators: [{
12541
12541
  type: Component,
12542
12542
  args: [{ selector: 'ax-cnv-video-attachment', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
12543
12543
  <div class="ax-cnv-video">
12544
- @if (!showPlayer()) {
12545
- <button
12546
- type="button"
12547
- class="ax-cnv-video__preview"
12548
- (click)="showPlayer.set(true)"
12549
- [disabled]="!playbackUrl()"
12550
- [attr.aria-label]="playAriaLabel()"
12551
- >
12552
- @if (thumbnailUrl()) {
12553
- <img class="ax-cnv-video__thumb" [src]="thumbnailUrl()!" alt="" loading="lazy" />
12554
- } @else {
12555
- <span class="ax-cnv-video__placeholder"><i class="fa-light fa-video"></i></span>
12556
- }
12557
- <span class="ax-cnv-video__play" aria-hidden="true"><i class="fa-solid fa-play"></i></span>
12558
- @if (duration() > 0) {
12559
- <span class="ax-cnv-video__duration">{{ durationLabel() }}</span>
12560
- }
12561
- </button>
12562
- } @else {
12563
- <video
12564
- #videoEl
12565
- class="ax-cnv-video__player"
12566
- [src]="playbackUrl()"
12567
- controls
12568
- playsinline
12569
- preload="metadata"
12570
- (loadedmetadata)="onLoadedMetadata()"
12571
- (timeupdate)="onTimeUpdate()"
12572
- (play)="onPlay()"
12573
- (pause)="onPause()"
12574
- (ended)="onEnded()"
12575
- ></video>
12576
- }
12544
+ <video
12545
+ #videoEl
12546
+ class="ax-cnv-video__player"
12547
+ [src]="playbackUrl()"
12548
+ controls
12549
+ playsinline
12550
+ preload="metadata"
12551
+ (loadedmetadata)="onLoadedMetadata()"
12552
+ (timeupdate)="onTimeUpdate()"
12553
+ (play)="onPlay()"
12554
+ (pause)="onPause()"
12555
+ (ended)="onEnded()"
12556
+ ></video>
12577
12557
  </div>
12578
- `, styles: [":host{display:block}.ax-cnv-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-cnv-video__preview{position:relative;display:block;width:100%;min-height:7rem;padding:0;border:none;cursor:pointer;background:rgb(var(--ax-sys-color-darker-surface));touch-action:manipulation}.ax-cnv-video__thumb{width:100%;max-height:min(40dvh,14rem);object-fit:cover;display:block}.ax-cnv-video__placeholder{display:flex;align-items:center;justify-content:center;min-height:7rem;color:rgba(var(--ax-sys-color-on-surface),.45);font-size:2rem}.ax-cnv-video__play{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#00000047;color:rgb(var(--ax-sys-color-light));font-size:1.75rem}.ax-cnv-video__duration{position:absolute;inset-inline-end:.375rem;inset-block-end:.375rem;padding:.125rem .375rem;border-radius:var(--ax-sys-border-radius, .25rem);background:#000000a6;color:rgb(var(--ax-sys-color-light));font-size:.6875rem;font-variant-numeric:tabular-nums}.ax-cnv-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}.ax-cnv-video__preview:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"] }]
12558
+ `, styles: [":host{display:block}.ax-cnv-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-cnv-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}\n"] }]
12579
12559
  }] });
12580
12560
 
12581
12561
  class AXVideoRendererComponent {
@@ -12583,8 +12563,8 @@ class AXVideoRendererComponent {
12583
12563
  this.platformId = inject(PLATFORM_ID);
12584
12564
  this.destroyRef = inject(DestroyRef);
12585
12565
  this.infoBarService = inject(AXInfoBarService);
12586
- this.activeVideoEl = null;
12587
- this.activeVideoIndex = signal(null, ...(ngDevMode ? [{ debugName: "activeVideoIndex" }] : []));
12566
+ this.attachments = viewChildren(AXVideoAttachmentComponent, ...(ngDevMode ? [{ debugName: "attachments" }] : []));
12567
+ this.activeVideoIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeVideoIndex" }] : []));
12588
12568
  this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : []));
12589
12569
  this.rendererState = computed(() => ({
12590
12570
  deliveryStatus: this.message().status,
@@ -12603,62 +12583,62 @@ class AXVideoRendererComponent {
12603
12583
  }
12604
12584
  });
12605
12585
  }
12606
- onPlaybackActive(element, index) {
12607
- this.activeVideoEl = element;
12608
- this.activeVideoIndex.set(index);
12609
- this.duration.set(Number.isFinite(element.duration) ? element.duration : this.videos()[index]?.duration ?? 0);
12610
- this.syncInfoBarBanner(true);
12586
+ onPlayingChange(index, playing) {
12587
+ if (playing) {
12588
+ this.activeVideoIndex.set(index);
12589
+ this.pauseOtherVideos(index);
12590
+ this.isPlaying.set(true);
12591
+ this.syncInfoBarBanner(true);
12592
+ return;
12593
+ }
12594
+ if (this.activeVideoIndex() === index) {
12595
+ this.isPlaying.set(false);
12596
+ this.syncInfoBarBanner();
12597
+ }
12611
12598
  }
12612
- onPlaybackIdle(index) {
12599
+ onTimeUpdate(index, time) {
12613
12600
  if (this.activeVideoIndex() !== index) {
12614
12601
  return;
12615
12602
  }
12616
- this.activeVideoEl = null;
12617
- this.activeVideoIndex.set(null);
12618
- this.isPlaying.set(false);
12619
- this.currentTime.set(0);
12620
- this.infoBarService.hideMessageBanner(this.message().id);
12603
+ this.currentTime.set(time);
12604
+ this.syncInfoBarBanner();
12621
12605
  }
12622
- onPlaybackTimeUpdate(event) {
12623
- this.currentTime.set(event.currentTime);
12624
- if (event.duration > 0) {
12625
- this.duration.set(event.duration);
12606
+ onDurationChange(index, duration) {
12607
+ if (this.activeVideoIndex() !== index) {
12608
+ return;
12626
12609
  }
12610
+ this.duration.set(duration);
12627
12611
  this.syncInfoBarBanner();
12628
12612
  }
12629
- onPlaybackPlayingChange(playing) {
12630
- this.isPlaying.set(playing);
12631
- this.syncInfoBarBanner(playing);
12613
+ onPlaybackEnded(index) {
12614
+ if (this.activeVideoIndex() !== index) {
12615
+ return;
12616
+ }
12617
+ this.isPlaying.set(false);
12618
+ this.currentTime.set(0);
12619
+ this.syncInfoBarBanner();
12632
12620
  }
12633
12621
  togglePlay() {
12634
- if (!isPlatformBrowser(this.platformId) || !this.activeVideoEl) {
12622
+ if (!isPlatformBrowser(this.platformId)) {
12635
12623
  return;
12636
12624
  }
12637
- const el = this.activeVideoEl;
12638
- if (el.paused) {
12639
- void el.play();
12640
- this.isPlaying.set(true);
12641
- }
12642
- else {
12643
- el.pause();
12644
- this.isPlaying.set(false);
12645
- }
12646
- this.syncInfoBarBanner();
12625
+ this.attachments()[this.activeVideoIndex()]?.togglePlay();
12626
+ }
12627
+ pauseOtherVideos(activeIndex) {
12628
+ this.attachments().forEach((attachment, index) => {
12629
+ if (index !== activeIndex) {
12630
+ attachment.pause();
12631
+ }
12632
+ });
12647
12633
  }
12648
12634
  pausePlayback() {
12649
- if (this.activeVideoEl) {
12650
- this.activeVideoEl.pause();
12651
- }
12635
+ this.attachments()[this.activeVideoIndex()]?.pause();
12652
12636
  this.isPlaying.set(false);
12653
12637
  }
12654
12638
  syncInfoBarBanner(forceOpen = false) {
12655
12639
  const message = this.message();
12656
12640
  const index = this.activeVideoIndex();
12657
- if (index === null) {
12658
- return;
12659
- }
12660
- const title = this.payload().caption?.trim() ||
12661
- (this.videos().length > 1 ? `Video ${index + 1}` : 'Video');
12641
+ const title = this.payload().caption?.trim() || (this.videos().length > 1 ? `Video ${index + 1}` : 'Video');
12662
12642
  syncPlaybackInfoBarBanner(this.infoBarService, message, {
12663
12643
  title,
12664
12644
  currentTime: this.currentTime(),
@@ -12669,17 +12649,17 @@ class AXVideoRendererComponent {
12669
12649
  }, { forceOpen });
12670
12650
  }
12671
12651
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12672
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXVideoRendererComponent, isStandalone: true, selector: "ax-conversation-video-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
12652
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXVideoRendererComponent, isStandalone: true, selector: "ax-conversation-video-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "attachments", predicate: AXVideoAttachmentComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
12673
12653
  <div class="ax-cnv-msg">
12674
12654
  <ax-conversation-message-renderer-state [rendererState]="rendererState()" [message]="message()" />
12675
12655
  <div class="ax-cnv-msg__stack">
12676
12656
  @for (video of videos(); track video.mediaId ?? video.url; let i = $index) {
12677
12657
  <ax-cnv-video-attachment
12678
12658
  [item]="video"
12679
- (playbackActive)="onPlaybackActive($event, i)"
12680
- (playbackIdle)="onPlaybackIdle(i)"
12681
- (playbackTimeUpdate)="onPlaybackTimeUpdate($event)"
12682
- (playbackPlayingChange)="onPlaybackPlayingChange($event)"
12659
+ (playingChange)="onPlayingChange(i, $event)"
12660
+ (timeUpdate)="onTimeUpdate(i, $event)"
12661
+ (durationChange)="onDurationChange(i, $event)"
12662
+ (playbackEnded)="onPlaybackEnded(i)"
12683
12663
  />
12684
12664
  }
12685
12665
  </div>
@@ -12687,7 +12667,7 @@ class AXVideoRendererComponent {
12687
12667
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
12688
12668
  }
12689
12669
  </div>
12690
- `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXVideoAttachmentComponent, selector: "ax-cnv-video-attachment", inputs: ["item"], outputs: ["playbackActive", "playbackIdle", "playbackTimeUpdate", "playbackPlayingChange"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12670
+ `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXVideoAttachmentComponent, selector: "ax-cnv-video-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12691
12671
  }
12692
12672
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXVideoRendererComponent, decorators: [{
12693
12673
  type: Component,
@@ -12698,10 +12678,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
12698
12678
  @for (video of videos(); track video.mediaId ?? video.url; let i = $index) {
12699
12679
  <ax-cnv-video-attachment
12700
12680
  [item]="video"
12701
- (playbackActive)="onPlaybackActive($event, i)"
12702
- (playbackIdle)="onPlaybackIdle(i)"
12703
- (playbackTimeUpdate)="onPlaybackTimeUpdate($event)"
12704
- (playbackPlayingChange)="onPlaybackPlayingChange($event)"
12681
+ (playingChange)="onPlayingChange(i, $event)"
12682
+ (timeUpdate)="onTimeUpdate(i, $event)"
12683
+ (durationChange)="onDurationChange(i, $event)"
12684
+ (playbackEnded)="onPlaybackEnded(i)"
12705
12685
  />
12706
12686
  }
12707
12687
  </div>
@@ -12709,7 +12689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
12709
12689
  <p class="ax-cnv-msg__caption">{{ caption() }}</p>
12710
12690
  }
12711
12691
  </div>
12712
- `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg{display:flex;flex-direction:column;gap:.375rem;max-width:min(100%,18.5rem)}.ax-cnv-msg--wide{max-width:min(100%,22rem)}@media (min-width: 480px){.ax-cnv-msg{max-width:min(100%,24rem)}.ax-cnv-msg--wide{max-width:min(100%,28rem)}}.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr)}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr)}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
12692
+ `, styles: [":host{display:block;max-width:100%}.ax-cnv-msg,.ax-cnv-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-cnv-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-cnv-msg__grid--single{grid-template-columns:1fr}.ax-cnv-msg__grid--single ::ng-deep .ax-cnv-image-attachment{max-height:min(50dvh,20rem)}.ax-cnv-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-cnv-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@media (max-width: 380px){.ax-cnv-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-cnv-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-cnv-msg--flush{width:100%;max-width:100%;gap:0}.ax-cnv-msg--flush .ax-cnv-msg__caption{padding:.375rem .625rem 0}.ax-cnv-msg--flush .ax-cnv-msg__grid{border-radius:0;background:transparent}.ax-cnv-msg--flush .ax-cnv-msg__stack{gap:2px}.ax-cnv-msg--flush ::ng-deep .ax-cnv-video{border-radius:0}.ax-cnv-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
12713
12693
  }], ctorParameters: () => [] });
12714
12694
 
12715
12695
  /** Decorative bars when payload has no waveform (deterministic, no random). */
@@ -15196,39 +15176,33 @@ class AXComposerComponent {
15196
15176
  this.replyingToMessage.set(null);
15197
15177
  }
15198
15178
  }, ...(ngDevMode ? [{ debugName: "#controllerEffect" }] : []));
15199
- // Reset composer state when conversation changes
15179
+ // Close composer popovers when conversation changes (draft/reply/edit reset is handled by message-list).
15200
15180
  this.#previousConversationId = undefined;
15201
- this.#conversationChangeEffect = effect(() => {
15202
- const conversation = this.activeConversation();
15203
- const currentId = conversation?.id;
15204
- // Save draft for previous conversation
15205
- if (this.#previousConversationId && this.#previousConversationId !== currentId) {
15206
- this.composerService.saveDraft(this.#previousConversationId, this.draftText());
15207
- }
15208
- // Only reset if conversation ID actually changed (not on initial load)
15209
- if (currentId !== this.#previousConversationId && this.#previousConversationId !== undefined) {
15210
- this.resetComposerState();
15211
- }
15212
- // Load draft for new conversation
15213
- if (currentId && currentId !== this.#previousConversationId) {
15214
- const draft = this.composerService.loadDraft(currentId);
15215
- if (draft) {
15216
- this.draftText.set(draft);
15217
- }
15181
+ this.#conversationUiResetEffect = effect(() => {
15182
+ const currentId = this.activeConversation()?.id;
15183
+ if (this.#previousConversationId !== undefined && this.#previousConversationId !== currentId) {
15184
+ this.emojiPopoverTarget.set(null);
15185
+ this.editingMessage.set(null);
15186
+ this.replyingToMessage.set(null);
15218
15187
  }
15219
15188
  this.#previousConversationId = currentId;
15220
- }, ...(ngDevMode ? [{ debugName: "#conversationChangeEffect" }] : []));
15189
+ }, ...(ngDevMode ? [{ debugName: "#conversationUiResetEffect" }] : []));
15221
15190
  // Auto-save draft on text change
15222
15191
  this.#draftAutoSaveEffect = effect(() => {
15223
15192
  const text = this.draftText();
15224
15193
  const conversation = this.activeConversation();
15225
- if (conversation?.id) {
15194
+ const isEditing = !!this.composerService.editMessage();
15195
+ if (conversation?.id && !isEditing) {
15196
+ const conversationId = conversation.id;
15226
15197
  // Debounce auto-save
15227
15198
  if (this.draftSaveTimeout) {
15228
15199
  clearTimeout(this.draftSaveTimeout);
15229
15200
  }
15230
15201
  this.draftSaveTimeout = window.setTimeout(() => {
15231
- this.composerService.saveDraft(conversation.id, text);
15202
+ if (this.activeConversation()?.id !== conversationId || this.composerService.editMessage()) {
15203
+ return;
15204
+ }
15205
+ this.composerService.saveDraft(conversationId, text);
15232
15206
  }, 500);
15233
15207
  }
15234
15208
  }, ...(ngDevMode ? [{ debugName: "#draftAutoSaveEffect" }] : []));
@@ -15258,9 +15232,9 @@ class AXComposerComponent {
15258
15232
  #focusComposerEffect;
15259
15233
  // React to controller signals (reply/edit)
15260
15234
  #controllerEffect;
15261
- // Reset composer state when conversation changes
15235
+ // Close composer popovers when conversation changes (draft/reply/edit reset is handled by message-list).
15262
15236
  #previousConversationId;
15263
- #conversationChangeEffect;
15237
+ #conversationUiResetEffect;
15264
15238
  // Auto-save draft on text change
15265
15239
  #draftAutoSaveEffect;
15266
15240
  /** Handle key down */
@@ -15294,7 +15268,7 @@ class AXComposerComponent {
15294
15268
  this.typingSubject.complete();
15295
15269
  // Save draft before destroying
15296
15270
  const conversation = this.activeConversation();
15297
- if (conversation?.id) {
15271
+ if (conversation?.id && !this.composerService.editMessage()) {
15298
15272
  this.composerService.saveDraft(conversation.id, this.draftText());
15299
15273
  }
15300
15274
  // Clear timeout
@@ -15467,20 +15441,6 @@ class AXComposerComponent {
15467
15441
  this.replyingToMessage.set(null);
15468
15442
  this.composerService.clear();
15469
15443
  }
15470
- /** Reset all composer states (used when switching conversations) */
15471
- resetComposerState() {
15472
- // Clear edit/reply states
15473
- this.editingMessage.set(null);
15474
- this.replyingToMessage.set(null);
15475
- // Clear service states (reply/edit messages, active component)
15476
- this.composerService.clear();
15477
- // Close any open popover/popup
15478
- this.emojiPopoverTarget.set(null);
15479
- // Clear attachments
15480
- this.attachments.set([]);
15481
- // Clear draft text
15482
- this.draftText.set('');
15483
- }
15484
15444
  /** Start editing a message */
15485
15445
  startEdit(message) {
15486
15446
  this.editingMessage.set(message);
@@ -16315,10 +16275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
16315
16275
  * Manages info bar state and actions
16316
16276
  */
16317
16277
  class AXInfoBarService {
16318
- // Access registry through conversation service
16319
- get registry() {
16320
- return this.conversationService.registry;
16321
- }
16322
16278
  constructor() {
16323
16279
  this.conversationService = inject(AXConversationService);
16324
16280
  this.injector = inject(Injector);
@@ -16338,13 +16294,17 @@ class AXInfoBarService {
16338
16294
  /** Current search result index */
16339
16295
  this._currentSearchIndex = signal(0, ...(ngDevMode ? [{ debugName: "_currentSearchIndex" }] : []));
16340
16296
  this.currentSearchIndex = this._currentSearchIndex.asReadonly();
16341
- effect(() => {
16342
- const activeConversationId = this.activeConversation()?.id;
16343
- const activeBanner = this._activeBanner();
16344
- if (activeBanner && activeBanner.message.conversationId !== activeConversationId) {
16345
- this._activeBanner.set(null);
16346
- }
16347
- });
16297
+ }
16298
+ // Access registry through conversation service
16299
+ get registry() {
16300
+ return this.conversationService.registry;
16301
+ }
16302
+ /**
16303
+ * Reset info-bar overlays when the active conversation changes.
16304
+ */
16305
+ onConversationChanged() {
16306
+ this.hideMessageBanner();
16307
+ this.hideComponent();
16348
16308
  }
16349
16309
  /**
16350
16310
  * Get actions for the active conversation
@@ -16429,6 +16389,10 @@ class AXInfoBarService {
16429
16389
  return;
16430
16390
  }
16431
16391
  const current = this._activeBanner();
16392
+ if (current?.message.id === message.id) {
16393
+ this.updateMessageBannerInputs(message.id, inputs ?? {});
16394
+ return;
16395
+ }
16432
16396
  if (current && current.message.id !== message.id) {
16433
16397
  this.hideMessageBanner(current.message.id);
16434
16398
  }
@@ -16549,7 +16513,7 @@ class AXInfoBarService {
16549
16513
  }
16550
16514
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXInfoBarService, decorators: [{
16551
16515
  type: Injectable
16552
- }], ctorParameters: () => [] });
16516
+ }] });
16553
16517
 
16554
16518
  /**
16555
16519
  * Members Popover Component
@@ -17740,6 +17704,8 @@ class AXMessageListComponent {
17740
17704
  constructor() {
17741
17705
  this.conversationService = inject(AXConversationService);
17742
17706
  this.messageListService = inject(AXMessageListService);
17707
+ this.composerService = inject(AXComposerService);
17708
+ this.infoBarService = inject(AXInfoBarService);
17743
17709
  this.translation = inject(AXTranslationService);
17744
17710
  this.config = inject(CONVERSATION_CONFIG);
17745
17711
  /** Fallback when no conversation is active and no `ax-conversation-message-list-no-active` content is projected. */
@@ -17818,6 +17784,8 @@ class AXMessageListComponent {
17818
17784
  untracked(() => {
17819
17785
  if (currentConversationId !== previousConversationId) {
17820
17786
  this.contextMenuMessageId.set(null);
17787
+ this.composerService.onConversationChanged(previousConversationId, currentConversationId);
17788
+ this.infoBarService.onConversationChanged();
17821
17789
  }
17822
17790
  // Only scroll if the conversation ID actually changed (not just updated)
17823
17791
  if (currentConversationId && currentConversationId !== previousConversationId) {