@acorex/components 21.0.3-next.38 → 21.0.3-next.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/{conversation2 → conversation}/README.md +23 -23
  2. package/fesm2022/acorex-components-button.mjs +4 -4
  3. package/fesm2022/acorex-components-button.mjs.map +1 -1
  4. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +13711 -0
  5. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +1 -0
  6. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +119 -0
  7. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +1 -0
  8. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +59 -0
  9. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +1 -0
  10. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +432 -0
  11. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +1 -0
  12. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +177 -0
  13. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +1 -0
  14. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +54 -0
  15. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +1 -0
  16. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs +101 -0
  17. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map +1 -0
  18. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +100 -0
  19. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +1 -0
  20. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +121 -0
  21. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +1 -0
  22. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +84 -0
  23. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +1 -0
  24. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +238 -0
  25. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +1 -0
  26. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +1080 -0
  27. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +1 -0
  28. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +102 -0
  29. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +1 -0
  30. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +90 -0
  31. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs.map +1 -0
  32. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
  33. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
  34. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs +44 -0
  35. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +1 -0
  36. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +64 -0
  37. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +1 -0
  38. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +468 -0
  39. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +1 -0
  40. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +125 -0
  41. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +1 -0
  42. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +50 -0
  43. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs.map +1 -0
  44. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
  45. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
  46. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs +77 -0
  47. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +1 -0
  48. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +407 -0
  49. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +1 -0
  50. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +83 -0
  51. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +1 -0
  52. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +184 -0
  53. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +1 -0
  54. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +266 -0
  55. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +1 -0
  56. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +149 -0
  57. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +1 -0
  58. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +118 -0
  59. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs.map +1 -0
  60. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
  61. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
  62. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs +140 -0
  63. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +1 -0
  64. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +33 -0
  65. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +1 -0
  66. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +172 -0
  67. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +1 -0
  68. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs +224 -0
  69. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map +1 -0
  70. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +81 -0
  71. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +1 -0
  72. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +91 -0
  73. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +1 -0
  74. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +537 -0
  75. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs.map +1 -0
  76. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
  77. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
  78. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs +68 -0
  79. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs.map +1 -0
  80. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
  81. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
  82. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs +187 -0
  83. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +1 -0
  84. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +170 -0
  85. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +1 -0
  86. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +750 -0
  87. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +1 -0
  88. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +103 -0
  89. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +1 -0
  90. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +55 -0
  91. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +1 -0
  92. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +109 -0
  93. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +1 -0
  94. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +105 -0
  95. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +1 -0
  96. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +62 -0
  97. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +1 -0
  98. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +446 -0
  99. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +1 -0
  100. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +181 -0
  101. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +1 -0
  102. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +54 -0
  103. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs.map +1 -0
  104. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
  105. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
  106. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs +344 -0
  107. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +1 -0
  108. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +270 -0
  109. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map +1 -0
  110. package/fesm2022/acorex-components-conversation.mjs +2 -0
  111. package/fesm2022/acorex-components-conversation.mjs.map +1 -0
  112. package/fesm2022/acorex-components-kbd.mjs +2 -2
  113. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  114. package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
  115. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  116. package/fesm2022/acorex-components-tree-view.mjs +2 -2
  117. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  118. package/package.json +6 -6
  119. package/types/{acorex-components-conversation2.d.ts → acorex-components-conversation.d.ts} +1127 -1928
  120. package/types/acorex-components-scheduler-picker.d.ts +2 -0
  121. package/fesm2022/acorex-components-conversation2.mjs +0 -22347
  122. package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
@@ -0,0 +1,172 @@
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
@@ -0,0 +1 @@
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,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;AACtE;;ACFA;;;AAGG;MAsHU,2CAA2C,CAAA;AArHxD,IAAA,WAAA,GAAA;QAsHmB,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACxE,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAE1C,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,mFAAsC;AACpE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAyB;AAEjD,QAAA,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAqB,SAAS,wFAAC;AACxD,QAAA,IAAA,CAAA,mBAA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,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAC9C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,+hCAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,224 @@
1
+ import { n as notifyPickerValidationErrors } from './acorex-components-conversation-picker-upload-C-PlKPaU.mjs';
2
+ import { r as resolveComposerMaxFiles } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
3
+
4
+ async function openComposerPickerPopup(popupService, composerService, registry, action, conversation, files, config) {
5
+ const component = action.component ?? (action.componentLoader ? await action.componentLoader() : undefined);
6
+ if (!component || files.length === 0) {
7
+ return;
8
+ }
9
+ await popupService.open(component, {
10
+ title: registry.getActionLabel(action),
11
+ size: 'md',
12
+ closeButton: true,
13
+ header: false,
14
+ panelClass: ['ax-conversation-composer-picker-popup'],
15
+ inputs: {
16
+ conversation,
17
+ maxFiles: resolveComposerMaxFiles(action, config),
18
+ initialFiles: files,
19
+ service: composerService,
20
+ },
21
+ });
22
+ }
23
+
24
+ /** Catalogs registered on picker actions (conversation-image, conversation-file, …). */
25
+ function pickerCatalogNames(registry) {
26
+ const names = new Set();
27
+ for (const action of registry.actions()) {
28
+ if ((action.component || action.componentLoader) && action.fileType) {
29
+ names.add(action.fileType);
30
+ }
31
+ }
32
+ return [...names];
33
+ }
34
+ /** Files that are not accepted by any registered picker catalog. */
35
+ async function collectUnsupportedInboundFiles(deps, files, catalogs) {
36
+ const unsupported = [];
37
+ for (const file of files) {
38
+ let acceptedByAny = false;
39
+ let lastErrors = [];
40
+ for (const catalog of catalogs) {
41
+ const errors = await deps.fileService.validate(file, catalog);
42
+ if (errors.length === 0) {
43
+ acceptedByAny = true;
44
+ break;
45
+ }
46
+ lastErrors = errors;
47
+ }
48
+ if (!acceptedByAny) {
49
+ unsupported.push({ file, errors: lastErrors });
50
+ }
51
+ }
52
+ return unsupported;
53
+ }
54
+ async function analyzeInboundFiles(deps, files) {
55
+ if (!files.length) {
56
+ return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles: [] };
57
+ }
58
+ const catalogs = pickerCatalogNames(deps.composerActionRegistry);
59
+ const unsupportedFiles = await collectUnsupportedInboundFiles(deps, files, catalogs);
60
+ const unsupportedSet = new Set(unsupportedFiles.map((entry) => entry.file));
61
+ const supportedFiles = files.filter((file) => !unsupportedSet.has(file));
62
+ if (supportedFiles.length === 0) {
63
+ return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles };
64
+ }
65
+ const context = deps.composerService.actionContext();
66
+ const matchingCatalogs = [];
67
+ for (const catalog of catalogs) {
68
+ const { rejected } = await deps.fileService.validateMany(supportedFiles, catalog);
69
+ if (rejected.length === 0) {
70
+ matchingCatalogs.push(catalog);
71
+ }
72
+ }
73
+ const seen = new Set();
74
+ const actions = [];
75
+ for (const catalog of matchingCatalogs) {
76
+ for (const action of deps.composerActionRegistry.findPickerActionsForFileType(catalog, context)) {
77
+ if (!seen.has(action.id)) {
78
+ seen.add(action.id);
79
+ actions.push(action);
80
+ }
81
+ }
82
+ }
83
+ return {
84
+ matchingCatalogs,
85
+ actions: actions.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)),
86
+ supportedFiles,
87
+ unsupportedFiles,
88
+ };
89
+ }
90
+ function notifyInboundFilesValidationFailures(deps, analysis) {
91
+ if (analysis.supportedFiles.length === 0) {
92
+ if (analysis.unsupportedFiles.length === 0) {
93
+ deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));
94
+ }
95
+ return;
96
+ }
97
+ if (analysis.actions.length === 0) {
98
+ const key = analysis.matchingCatalogs.length === 0
99
+ ? '@acorex:chat.errors.inbound-files-none-supported'
100
+ : '@acorex:chat.errors.inbound-files-no-send-option';
101
+ deps.toast.warning(deps.translation.translateSync(key));
102
+ }
103
+ }
104
+ /**
105
+ * File catalogs that accept every supported file in the batch, then matching visible picker actions.
106
+ */
107
+ async function resolvePickerActionsForAllFiles(deps, files) {
108
+ const analysis = await analyzeInboundFiles(deps, files);
109
+ return analysis.actions;
110
+ }
111
+ async function promptComposerActionChoice(deps, actions, fileCount) {
112
+ const { AXConversationComposerActionChoiceDialogComponent } = await import('./acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs');
113
+ const result = await deps.popupService.open(AXConversationComposerActionChoiceDialogComponent, {
114
+ title: deps.translation.translateSync('@acorex:chat.dialog.choose-send-option.title'),
115
+ size: 'sm',
116
+ closeButton: true,
117
+ header: true,
118
+ inputs: {
119
+ actions,
120
+ fileCount,
121
+ composerActionRegistry: deps.composerActionRegistry,
122
+ },
123
+ });
124
+ const action = result?.data;
125
+ if (!action?.component && !action?.componentLoader) {
126
+ return undefined;
127
+ }
128
+ return action;
129
+ }
130
+ /**
131
+ * Match dropped/pasted files to composer picker action(s) and open the popup.
132
+ * Unsupported files are skipped after a warning toast; supported files continue.
133
+ * @returns true when a picker popup was opened
134
+ */
135
+ async function openComposerPickerForFiles(deps, files) {
136
+ if (!files.length) {
137
+ return false;
138
+ }
139
+ const conversation = deps.conversation;
140
+ if (!conversation) {
141
+ return false;
142
+ }
143
+ const analysis = await analyzeInboundFiles(deps, files);
144
+ if (analysis.unsupportedFiles.length > 0) {
145
+ notifyPickerValidationErrors(deps.toast, deps.translation, analysis.unsupportedFiles);
146
+ }
147
+ if (!analysis.supportedFiles.length || !analysis.actions.length) {
148
+ notifyInboundFilesValidationFailures(deps, analysis);
149
+ return false;
150
+ }
151
+ let action = analysis.actions[0];
152
+ if (analysis.actions.length > 1) {
153
+ const chosen = await promptComposerActionChoice(deps, analysis.actions, analysis.supportedFiles.length);
154
+ if (!chosen) {
155
+ return false;
156
+ }
157
+ action = chosen;
158
+ }
159
+ const catalog = action.fileType;
160
+ if (!catalog) {
161
+ deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));
162
+ return false;
163
+ }
164
+ const { accepted, rejected } = await deps.fileService.validateMany(analysis.supportedFiles, catalog);
165
+ if (rejected.length > 0) {
166
+ notifyPickerValidationErrors(deps.toast, deps.translation, rejected);
167
+ }
168
+ if (accepted.length === 0) {
169
+ return false;
170
+ }
171
+ await openComposerPickerPopup(deps.popupService, deps.composerService, deps.composerActionRegistry, action, conversation, accepted, deps.config);
172
+ return true;
173
+ }
174
+ /** Extract OS-copied files from a paste event (e.g. Ctrl+V after copying a file in Explorer). */
175
+ function filesFromClipboardEvent(event) {
176
+ const items = event.clipboardData?.items;
177
+ if (!items?.length) {
178
+ return [];
179
+ }
180
+ const files = [];
181
+ for (let i = 0; i < items.length; i++) {
182
+ const item = items[i];
183
+ if (item.kind === 'file') {
184
+ const file = item.getAsFile();
185
+ if (file) {
186
+ files.push(file);
187
+ }
188
+ }
189
+ }
190
+ return files;
191
+ }
192
+ /** Whether a paste event target lies in the chat panel (not sidebar). */
193
+ function isPasteTargetInChatPanel(host, target) {
194
+ if (!(target instanceof Node) || !host.contains(target)) {
195
+ return false;
196
+ }
197
+ const excluded = host.querySelector('.conversation-sidebar-container, .sidebar-container');
198
+ if (excluded?.contains(target)) {
199
+ return false;
200
+ }
201
+ const chatMain = host.querySelector('.conversation-main-container, .main-area, .conversation-view');
202
+ if (chatMain) {
203
+ return chatMain.contains(target);
204
+ }
205
+ return true;
206
+ }
207
+ /** Handle Ctrl+V / paste when the clipboard holds files copied from the OS. */
208
+ async function handleConversationFilePaste(event, host, deps) {
209
+ if (!isPasteTargetInChatPanel(host, event.target)) {
210
+ return;
211
+ }
212
+ const files = filesFromClipboardEvent(event);
213
+ if (!files.length) {
214
+ return;
215
+ }
216
+ const handled = await openComposerPickerForFiles(deps, files);
217
+ if (handled) {
218
+ event.preventDefault();
219
+ event.stopImmediatePropagation();
220
+ }
221
+ }
222
+
223
+ export { filesFromClipboardEvent, handleConversationFilePaste, isPasteTargetInChatPanel, openComposerPickerForFiles, resolvePickerActionsForAllFiles };
224
+ //# sourceMappingURL=acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-popup.ts","../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-for-files.ts"],"sourcesContent":["import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport type { AXConversation } from '../../models';\nimport { resolveComposerMaxFiles } from '../../plugins/composer/composer-upload.config';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\n\nexport async function openComposerPickerPopup(\n popupService: AXPopupService,\n composerService: AXConversationComposerService,\n registry: AXConversationComposerActionRegistry,\n action: AXConversationComposerAction,\n conversation: AXConversation,\n files: File[],\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>,\n): Promise<void> {\n const component = action.component ?? (action.componentLoader ? await action.componentLoader() : undefined);\n if (!component || files.length === 0) {\n return;\n }\n\n await popupService.open(component, {\n title: registry.getActionLabel(action),\n size: 'md',\n closeButton: true,\n header: false,\n panelClass: ['ax-conversation-composer-picker-popup'],\n inputs: {\n conversation,\n maxFiles: resolveComposerMaxFiles(action, config),\n initialFiles: files,\n service: composerService,\n },\n });\n}\n","import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXFileService } from '@acorex/core/file';\nimport type { AXValidationRuleResult } from '@acorex/core/validation';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversation } from '../../models';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport { notifyPickerValidationErrors } from '../../plugins/composer/components/shared/picker-upload';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\nimport { openComposerPickerPopup } from './open-composer-picker-popup';\n\nexport interface AXConversationOpenComposerPickerForFilesDeps {\n fileService: AXFileService;\n composerService: AXConversationComposerService;\n composerActionRegistry: AXConversationComposerActionRegistry;\n popupService: AXPopupService;\n toast: AXToastService;\n translation: AXTranslationService;\n conversation: AXConversation | null | undefined;\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>;\n}\n\n/** Catalogs registered on picker actions (conversation-image, conversation-file, …). */\nfunction pickerCatalogNames(registry: AXConversationComposerActionRegistry): string[] {\n const names = new Set<string>();\n for (const action of registry.actions()) {\n if ((action.component || action.componentLoader) && action.fileType) {\n names.add(action.fileType);\n }\n }\n return [...names];\n}\n\ninterface AXConversationInboundFilesAnalysis {\n matchingCatalogs: string[];\n actions: AXConversationComposerAction[];\n supportedFiles: File[];\n unsupportedFiles: { file: File; errors: AXValidationRuleResult[] }[];\n}\n\n/** Files that are not accepted by any registered picker catalog. */\nasync function collectUnsupportedInboundFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerActionRegistry'>,\n files: File[],\n catalogs: string[],\n): Promise<{ file: File; errors: AXValidationRuleResult[] }[]> {\n const unsupported: { file: File; errors: AXValidationRuleResult[] }[] = [];\n\n for (const file of files) {\n let acceptedByAny = false;\n let lastErrors: AXValidationRuleResult[] = [];\n\n for (const catalog of catalogs) {\n const errors = await deps.fileService.validate(file, catalog);\n if (errors.length === 0) {\n acceptedByAny = true;\n break;\n }\n lastErrors = errors;\n }\n\n if (!acceptedByAny) {\n unsupported.push({ file, errors: lastErrors });\n }\n }\n\n return unsupported;\n}\n\nasync function analyzeInboundFiles(\n deps: Pick<\n AXConversationOpenComposerPickerForFilesDeps,\n 'fileService' | 'composerService' | 'composerActionRegistry'\n >,\n files: File[],\n): Promise<AXConversationInboundFilesAnalysis> {\n if (!files.length) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles: [] };\n }\n\n const catalogs = pickerCatalogNames(deps.composerActionRegistry);\n const unsupportedFiles = await collectUnsupportedInboundFiles(deps, files, catalogs);\n const unsupportedSet = new Set(unsupportedFiles.map((entry) => entry.file));\n const supportedFiles = files.filter((file) => !unsupportedSet.has(file));\n\n if (supportedFiles.length === 0) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles };\n }\n\n const context = deps.composerService.actionContext();\n const matchingCatalogs: string[] = [];\n\n for (const catalog of catalogs) {\n const { rejected } = await deps.fileService.validateMany(supportedFiles, catalog);\n if (rejected.length === 0) {\n matchingCatalogs.push(catalog);\n }\n }\n\n const seen = new Set<string>();\n const actions: AXConversationComposerAction[] = [];\n\n for (const catalog of matchingCatalogs) {\n for (const action of deps.composerActionRegistry.findPickerActionsForFileType(catalog, context)) {\n if (!seen.has(action.id)) {\n seen.add(action.id);\n actions.push(action);\n }\n }\n }\n\n return {\n matchingCatalogs,\n actions: actions.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)),\n supportedFiles,\n unsupportedFiles,\n };\n}\n\nfunction notifyInboundFilesValidationFailures(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'toast' | 'translation'>,\n analysis: AXConversationInboundFilesAnalysis,\n): void {\n if (analysis.supportedFiles.length === 0) {\n if (analysis.unsupportedFiles.length === 0) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n }\n return;\n }\n\n if (analysis.actions.length === 0) {\n const key =\n analysis.matchingCatalogs.length === 0\n ? '@acorex:chat.errors.inbound-files-none-supported'\n : '@acorex:chat.errors.inbound-files-no-send-option';\n deps.toast.warning(deps.translation.translateSync(key));\n }\n}\n\n/**\n * File catalogs that accept every supported file in the batch, then matching visible picker actions.\n */\nexport async function resolvePickerActionsForAllFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerService' | 'composerActionRegistry'>,\n files: File[],\n): Promise<AXConversationComposerAction[]> {\n const analysis = await analyzeInboundFiles(deps, files);\n return analysis.actions;\n}\n\nasync function promptComposerActionChoice(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n actions: AXConversationComposerAction[],\n fileCount: number,\n): Promise<AXConversationComposerAction | undefined> {\n const { AXConversationComposerActionChoiceDialogComponent } = await import('./composer-action-choice-dialog.component');\n const result = await deps.popupService.open(AXConversationComposerActionChoiceDialogComponent, {\n title: deps.translation.translateSync('@acorex:chat.dialog.choose-send-option.title'),\n size: 'sm',\n closeButton: true,\n header: true,\n inputs: {\n actions,\n fileCount,\n composerActionRegistry: deps.composerActionRegistry,\n },\n });\n\n const action = result?.data as AXConversationComposerAction | undefined;\n if (!action?.component && !action?.componentLoader) {\n return undefined;\n }\n return action;\n}\n\n/**\n * Match dropped/pasted files to composer picker action(s) and open the popup.\n * Unsupported files are skipped after a warning toast; supported files continue.\n * @returns true when a picker popup was opened\n */\nexport async function openComposerPickerForFiles(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n files: File[],\n): Promise<boolean> {\n if (!files.length) {\n return false;\n }\n\n const conversation = deps.conversation;\n if (!conversation) {\n return false;\n }\n\n const analysis = await analyzeInboundFiles(deps, files);\n\n if (analysis.unsupportedFiles.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, analysis.unsupportedFiles);\n }\n\n if (!analysis.supportedFiles.length || !analysis.actions.length) {\n notifyInboundFilesValidationFailures(deps, analysis);\n return false;\n }\n\n let action = analysis.actions[0];\n if (analysis.actions.length > 1) {\n const chosen = await promptComposerActionChoice(deps, analysis.actions, analysis.supportedFiles.length);\n if (!chosen) {\n return false;\n }\n action = chosen;\n }\n\n const catalog = action.fileType;\n if (!catalog) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n return false;\n }\n\n const { accepted, rejected } = await deps.fileService.validateMany(analysis.supportedFiles, catalog);\n if (rejected.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, rejected);\n }\n if (accepted.length === 0) {\n return false;\n }\n\n await openComposerPickerPopup(\n deps.popupService,\n deps.composerService,\n deps.composerActionRegistry,\n action,\n conversation,\n accepted,\n deps.config,\n );\n return true;\n}\n\n/** Extract OS-copied files from a paste event (e.g. Ctrl+V after copying a file in Explorer). */\nexport function filesFromClipboardEvent(event: ClipboardEvent): File[] {\n const items = event.clipboardData?.items;\n if (!items?.length) {\n return [];\n }\n\n const files: File[] = [];\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.kind === 'file') {\n const file = item.getAsFile();\n if (file) {\n files.push(file);\n }\n }\n }\n return files;\n}\n\n/** Whether a paste event target lies in the chat panel (not sidebar). */\nexport function isPasteTargetInChatPanel(host: HTMLElement, target: EventTarget | null): boolean {\n if (!(target instanceof Node) || !host.contains(target)) {\n return false;\n }\n\n const excluded = host.querySelector('.conversation-sidebar-container, .sidebar-container');\n if (excluded?.contains(target)) {\n return false;\n }\n\n const chatMain = host.querySelector('.conversation-main-container, .main-area, .conversation-view');\n if (chatMain) {\n return chatMain.contains(target);\n }\n\n return true;\n}\n\n/** Handle Ctrl+V / paste when the clipboard holds files copied from the OS. */\nexport async function handleConversationFilePaste(\n event: ClipboardEvent,\n host: HTMLElement,\n deps: AXConversationOpenComposerPickerForFilesDeps,\n): Promise<void> {\n if (!isPasteTargetInChatPanel(host, event.target)) {\n return;\n }\n\n const files = filesFromClipboardEvent(event);\n if (!files.length) {\n return;\n }\n\n const handled = await openComposerPickerForFiles(deps, files);\n if (handled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n}\n"],"names":[],"mappings":";;;AAOO,eAAe,uBAAuB,CAC3C,YAA4B,EAC5B,eAA8C,EAC9C,QAA8C,EAC9C,MAAoC,EACpC,YAA4B,EAC5B,KAAa,EACb,MAAkE,EAAA;IAElE,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,MAAM,CAAC,eAAe,GAAG,MAAM,MAAM,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC;IAC3G,IAAI,CAAC,SAAS,IAAI,KAAK,CA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,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,8DAA8D,CAAC;IACnG,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAClC;AAEA,IAAA,OAAO,IAAI;AACb;AAEA;AACO,eAAe,2BAA2B,CAC/C,KAAqB,EACrB,IAAiB,EACjB,IAAkD,EAAA;IAElD,IAAI,CAAC,wBAAwB,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;QACjD;IACF;AAEA,IAAA,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC;AAC5C,IAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB;IACF;IAEA,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC;IAC7D,IAAI,OAAO,EAAE;QACX,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,wBAAwB,EAAE;IAClC;AACF;;;;"}
@@ -0,0 +1,81 @@
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
@@ -0,0 +1 @@
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;AAC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