@acorex/components 20.8.32 → 20.9.0

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 (128) hide show
  1. package/conversation/README.md +462 -2
  2. package/conversation/index.d.ts +5400 -485
  3. package/fesm2022/acorex-components-calendar.mjs +3 -2
  4. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  5. package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs +13711 -0
  6. package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs.map +1 -0
  7. package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs +119 -0
  8. package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs.map +1 -0
  9. package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs +59 -0
  10. package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs.map +1 -0
  11. package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs +432 -0
  12. package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs.map +1 -0
  13. package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs +177 -0
  14. package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs.map +1 -0
  15. package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs +54 -0
  16. package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs.map +1 -0
  17. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.mjs +101 -0
  18. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.mjs.map +1 -0
  19. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs +100 -0
  20. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs.map +1 -0
  21. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs +121 -0
  22. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs.map +1 -0
  23. package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs +84 -0
  24. package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs.map +1 -0
  25. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs +238 -0
  26. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs.map +1 -0
  27. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs +1080 -0
  28. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs.map +1 -0
  29. package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs +102 -0
  30. package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs.map +1 -0
  31. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs +90 -0
  32. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs.map +1 -0
  33. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
  34. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
  35. package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs +44 -0
  36. package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs.map +1 -0
  37. package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs +64 -0
  38. package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs.map +1 -0
  39. package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs +468 -0
  40. package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs.map +1 -0
  41. package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs +125 -0
  42. package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs.map +1 -0
  43. package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs +50 -0
  44. package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs.map +1 -0
  45. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
  46. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
  47. package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs +77 -0
  48. package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs.map +1 -0
  49. package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs +407 -0
  50. package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs.map +1 -0
  51. package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs +83 -0
  52. package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs.map +1 -0
  53. package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs +180 -0
  54. package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs.map +1 -0
  55. package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs +266 -0
  56. package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs.map +1 -0
  57. package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs +149 -0
  58. package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs.map +1 -0
  59. package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs +118 -0
  60. package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs.map +1 -0
  61. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
  62. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
  63. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs +140 -0
  64. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs.map +1 -0
  65. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs +33 -0
  66. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs.map +1 -0
  67. package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs +172 -0
  68. package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs.map +1 -0
  69. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs +224 -0
  70. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs.map +1 -0
  71. package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs +81 -0
  72. package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs.map +1 -0
  73. package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs +91 -0
  74. package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs.map +1 -0
  75. package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs +537 -0
  76. package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs.map +1 -0
  77. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
  78. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
  79. package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs +68 -0
  80. package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs.map +1 -0
  81. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
  82. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
  83. package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs +187 -0
  84. package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs.map +1 -0
  85. package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs +170 -0
  86. package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs.map +1 -0
  87. package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs +750 -0
  88. package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs.map +1 -0
  89. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs +103 -0
  90. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs.map +1 -0
  91. package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs +55 -0
  92. package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs.map +1 -0
  93. package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs +109 -0
  94. package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs.map +1 -0
  95. package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs +105 -0
  96. package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs.map +1 -0
  97. package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs +62 -0
  98. package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs.map +1 -0
  99. package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs +446 -0
  100. package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs.map +1 -0
  101. package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs +181 -0
  102. package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs.map +1 -0
  103. package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs +54 -0
  104. package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs.map +1 -0
  105. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
  106. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
  107. package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs +328 -0
  108. package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs.map +1 -0
  109. package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs +270 -0
  110. package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs.map +1 -0
  111. package/fesm2022/acorex-components-conversation.mjs +1 -1402
  112. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  113. package/fesm2022/acorex-components-data-table.mjs +2 -2
  114. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  115. package/fesm2022/acorex-components-rest-api-generator.mjs +2 -2
  116. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  117. package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
  118. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  119. package/fesm2022/acorex-components-step-wizard.mjs +2 -2
  120. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  121. package/fesm2022/acorex-components-tree-view-legacy.mjs +2 -2
  122. package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -1
  123. package/package.json +35 -39
  124. package/scheduler-picker/index.d.ts +2 -0
  125. package/conversation2/README.md +0 -463
  126. package/conversation2/index.d.ts +0 -6410
  127. package/fesm2022/acorex-components-conversation2.mjs +0 -22331
  128. package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
@@ -1,1403 +1,2 @@
1
- import { AXEvent, AXComponent, AXFocusableComponent, AXValuableComponent, MXInputBaseValueComponent, MXLookComponent, MXBaseComponent, AXRippleDirective } from '@acorex/cdk/common';
2
- import * as i0 from '@angular/core';
3
- import { signal, Injectable, input, inject, effect, forwardRef, ViewEncapsulation, Component, contentChild, output, computed, HostBinding, ViewChild, ChangeDetectionStrategy, viewChild, Renderer2, afterNextRender, PLATFORM_ID, NgModule } from '@angular/core';
4
- import * as i1 from '@angular/forms';
5
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
6
- import { AXButtonComponent, AXButtonItemListComponent, AXButtonItemComponent, AXButtonModule } from '@acorex/components/button';
7
- import * as i2 from '@acorex/components/decorators';
8
- import { AXDecoratorIconComponent, AXDecoratorModule, AXDecoratorGenericComponent } from '@acorex/components/decorators';
9
- import { AXDropdownPanelComponent, AXDropdownModule } from '@acorex/components/dropdown';
10
- import { AXLoadingSpinnerComponent, AXLoadingModule } from '@acorex/components/loading';
11
- import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
12
- import * as i2$1 from '@angular/common';
13
- import { AsyncPipe, CommonModule, isPlatformBrowser } from '@angular/common';
14
- import { classes } from 'polytype';
15
- import { AXAvatarComponent, AXAvatarModule } from '@acorex/components/avatar';
16
- import * as i1$1 from '@acorex/components/menu';
17
- import { AXMenuModule } from '@acorex/components/menu';
18
- import { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';
19
- import { AXFormatPipe, AXFormatModule } from '@acorex/core/format';
20
- import { isBrowser } from '@acorex/core/platform';
21
- import { ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
22
- import { AXRangeSliderComponent, AXRangeSliderModule } from '@acorex/components/range-slider';
23
- import { AXFileService, AXFileModule } from '@acorex/core/file';
24
- import { AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective, AXVirtualScrollModule } from '@acorex/cdk/virtual-scroll';
25
- import { AXPopupService } from '@acorex/components/popup';
26
- import { AXAudioWaveComponent, AXAudioWaveModule } from '@acorex/components/audio-wave';
27
- import { AXCircularProgressModule } from '@acorex/components/circular-progress';
28
- import { AXDateTimeModule } from '@acorex/core/date-time';
29
-
30
- class AXConversationActionEvent extends AXEvent {
31
- }
32
-
33
- class AXConversationService {
34
- constructor() {
35
- this.replyId = signal('', ...(ngDevMode ? [{ debugName: "replyId" }] : []));
36
- this.chats = signal([], ...(ngDevMode ? [{ debugName: "chats" }] : []));
37
- }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationService }); }
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationService, decorators: [{
42
- type: Injectable
43
- }] });
44
-
45
- class AXRecordingService {
46
- constructor() {
47
- this.audioBlobs = [];
48
- this.streamBeingCaptured = null;
49
- this.timer = signal('00:0', ...(ngDevMode ? [{ debugName: "timer" }] : []));
50
- this.time = {
51
- seconds: 0,
52
- minutes: 0,
53
- hours: 0,
54
- };
55
- }
56
- /**
57
- * Starts audio recording using the browser's MediaRecorder API.
58
- *
59
- * @returns Promise<void> - Resolves when recording starts successfully, rejects if not supported.
60
- */
61
- startRecording() {
62
- if (!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)) {
63
- return Promise.reject(new Error('mediaDevices API or getUserMedia method is not supported in this browser.'));
64
- }
65
- else {
66
- return navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) => {
67
- this.streamBeingCaptured = stream;
68
- this.mediaRecorder = new MediaRecorder(stream);
69
- this.audioBlobs = [];
70
- this.mediaRecorder.addEventListener('dataavailable', (event) => {
71
- this.audioBlobs.push(event.data);
72
- });
73
- this.mediaRecorder.start();
74
- this.timerInterval = setInterval(() => {
75
- this.calculateTime();
76
- }, 1000);
77
- });
78
- }
79
- }
80
- /**
81
- * Ends the current recording session and returns the recorded audio blob.
82
- *
83
- * @returns Promise<Blob> - Resolves with the recorded audio blob.
84
- */
85
- endRecording() {
86
- return new Promise((resolve) => {
87
- const mimeType = this.mediaRecorder?.mimeType;
88
- this.mediaRecorder?.addEventListener('stop', () => {
89
- const audioBlob = new Blob(this.audioBlobs, { type: mimeType });
90
- resolve(audioBlob);
91
- });
92
- this.mediaRecorder?.stop();
93
- this.streamBeingCaptured.getTracks().forEach((track) => track.stop());
94
- this.mediaRecorder = null;
95
- this.streamBeingCaptured = null;
96
- this.resetTimer();
97
- });
98
- }
99
- /**
100
- * Calculates and updates the recording time, incrementing seconds, minutes, and hours as needed.
101
- */
102
- calculateTime() {
103
- this.time.seconds++;
104
- if (this.time.seconds >= 60) {
105
- this.time.seconds = 0;
106
- this.time.minutes++;
107
- if (this.time.minutes >= 60) {
108
- this.time.minutes = 0;
109
- this.time.hours++;
110
- }
111
- }
112
- const formattedTime = (this.time.hours > 0 ? this.time.hours + ':' : '') +
113
- (this.time.minutes < 10 ? '0' + this.time.minutes : this.time.minutes) +
114
- ':' +
115
- (this.time.seconds < 10 ? '0' + this.time.seconds : this.time.seconds);
116
- this.timer.set(formattedTime);
117
- }
118
- /**
119
- * Resets the recording timer to zero and clears the timer interval.
120
- */
121
- resetTimer() {
122
- clearInterval(this.timerInterval);
123
- this.time.seconds = 0;
124
- this.time.minutes = 0;
125
- this.time.hours = 0;
126
- this.timer.set('00:0');
127
- }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXRecordingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
129
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXRecordingService }); }
130
- }
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXRecordingService, decorators: [{
132
- type: Injectable
133
- }] });
134
-
135
- /**
136
- * A container for displaying and managing conversations.
137
- * @category Components
138
- */
139
- class AXConversationContainerComponent {
140
- constructor() {
141
- this.chatData = input([], ...(ngDevMode ? [{ debugName: "chatData" }] : []));
142
- this.conversationService = inject(AXConversationService);
143
- this.#init = effect(() => {
144
- this.conversationService.chats.set(this.chatData());
145
- }, ...(ngDevMode ? [{ debugName: "#init" }] : []));
146
- }
147
- #init;
148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", type: AXConversationContainerComponent, isStandalone: true, selector: "ax-conversation-container", inputs: { chatData: { classPropertyName: "chatData", publicName: "chatData", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
150
- { provide: AXComponent, useExisting: AXConversationContainerComponent },
151
- { provide: AXFocusableComponent, useExisting: AXConversationContainerComponent },
152
- { provide: AXValuableComponent, useExisting: AXConversationContainerComponent },
153
- {
154
- provide: NG_VALUE_ACCESSOR,
155
- useExisting: forwardRef(() => AXConversationContainerComponent),
156
- multi: true,
157
- },
158
- AXConversationService,
159
- AXRecordingService,
160
- ], ngImport: i0, template: "<div class=\"ax-conversation-container\">\n <ng-content> </ng-content>\n</div>\n", styles: ["ax-conversation-container{--ax-comp-conversation-other-color: var(--ax-sys-color-surface);--ax-comp-conversation-other-color-fore: var(--ax-sys-color-on-surface);--ax-comp-conversation-status-color: var(--ax-sys-color-on-primary-lightest-surface);--ax-comp-conversation-other-bar-color: var(--ax-sys-color-primary-light-surface);--ax-comp-conversation-other-progress-color: var(--ax-sys-color-on-primary-light-surface);--ax-comp-conversation-own-color: var(--ax-sys-color-primary-lightest-surface);--ax-comp-conversation-own-color-fore: var(--ax-sys-color-primary-darkest-surface);--ax-comp-conversation-own-reply-color: var(--ax-sys-color-primary-dark-surface);--ax-comp-conversation-own-reply-color-fore: var(--ax-sys-color-on-primary-dark-surface);--ax-comp-conversation-other-reply-color: var(--ax-sys-color-primary-lighter-surface);--ax-comp-conversation-other-reply-color-fore: var(--ax-sys-color-on-primary-lighter-surface);--ax-comp-conversation-border-color: var(--ax-sys-color-primary-darkest-surface);--ax-comp-conversation-own-bar-color: var(--ax-sys-color-primary-light-surface);--ax-comp-conversation-own-progress-color: var(--ax-sys-color-on-primary-light-surface)}ax-conversation-container{width:100%;display:block}ax-conversation-container>.ax-editor-container{display:block;height:100%!important}\n"], encapsulation: i0.ViewEncapsulation.None }); }
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationContainerComponent, decorators: [{
163
- type: Component,
164
- args: [{ selector: 'ax-conversation-container', encapsulation: ViewEncapsulation.None, providers: [
165
- { provide: AXComponent, useExisting: AXConversationContainerComponent },
166
- { provide: AXFocusableComponent, useExisting: AXConversationContainerComponent },
167
- { provide: AXValuableComponent, useExisting: AXConversationContainerComponent },
168
- {
169
- provide: NG_VALUE_ACCESSOR,
170
- useExisting: forwardRef(() => AXConversationContainerComponent),
171
- multi: true,
172
- },
173
- AXConversationService,
174
- AXRecordingService,
175
- ], template: "<div class=\"ax-conversation-container\">\n <ng-content> </ng-content>\n</div>\n", styles: ["ax-conversation-container{--ax-comp-conversation-other-color: var(--ax-sys-color-surface);--ax-comp-conversation-other-color-fore: var(--ax-sys-color-on-surface);--ax-comp-conversation-status-color: var(--ax-sys-color-on-primary-lightest-surface);--ax-comp-conversation-other-bar-color: var(--ax-sys-color-primary-light-surface);--ax-comp-conversation-other-progress-color: var(--ax-sys-color-on-primary-light-surface);--ax-comp-conversation-own-color: var(--ax-sys-color-primary-lightest-surface);--ax-comp-conversation-own-color-fore: var(--ax-sys-color-primary-darkest-surface);--ax-comp-conversation-own-reply-color: var(--ax-sys-color-primary-dark-surface);--ax-comp-conversation-own-reply-color-fore: var(--ax-sys-color-on-primary-dark-surface);--ax-comp-conversation-other-reply-color: var(--ax-sys-color-primary-lighter-surface);--ax-comp-conversation-other-reply-color-fore: var(--ax-sys-color-on-primary-lighter-surface);--ax-comp-conversation-border-color: var(--ax-sys-color-primary-darkest-surface);--ax-comp-conversation-own-bar-color: var(--ax-sys-color-primary-light-surface);--ax-comp-conversation-own-progress-color: var(--ax-sys-color-on-primary-light-surface)}ax-conversation-container{width:100%;display:block}ax-conversation-container>.ax-editor-container{display:block;height:100%!important}\n"] }]
176
- }] });
177
-
178
- /**
179
- * An input component for entering conversation messages.
180
- *
181
- * @category Components
182
- */
183
- class AXConversationInputComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
184
- constructor() {
185
- super(...arguments);
186
- this.sendIcon = contentChild('ax-icon', ...(ngDevMode ? [{ debugName: "sendIcon" }] : []));
187
- this.onActionClose = output();
188
- this.conversationService = inject(AXConversationService);
189
- this.chats = computed(() => {
190
- return this.conversationService.chats();
191
- }, ...(ngDevMode ? [{ debugName: "chats" }] : []));
192
- this.actionIcon = signal(null, ...(ngDevMode ? [{ debugName: "actionIcon" }] : []));
193
- this.actionContent = signal(null, ...(ngDevMode ? [{ debugName: "actionContent" }] : []));
194
- this.actionShowState = signal(false, ...(ngDevMode ? [{ debugName: "actionShowState" }] : []));
195
- this.actionUser = signal(null, ...(ngDevMode ? [{ debugName: "actionUser" }] : []));
196
- this.actionCloseCallback = signal(() => {
197
- return;
198
- }, ...(ngDevMode ? [{ debugName: "actionCloseCallback" }] : []));
199
- this.replyChat = computed(() => {
200
- const findMessage = this.chats().find((item) => item.id === this.conversationService.replyId());
201
- return findMessage;
202
- }, ...(ngDevMode ? [{ debugName: "replyChat" }] : []));
203
- /** Maximum length of input text */
204
- this.maxLength = input(...(ngDevMode ? [undefined, { debugName: "maxLength" }] : []));
205
- /** Indicates if an attachment is present */
206
- this.hasAttachment = input(true, ...(ngDevMode ? [{ debugName: "hasAttachment" }] : []));
207
- /** Indicates if voice recording is enabled */
208
- this.hasVoice = input(true, ...(ngDevMode ? [{ debugName: "hasVoice" }] : []));
209
- this.hasEmoji = input(true, ...(ngDevMode ? [{ debugName: "hasEmoji" }] : []));
210
- this.isLoading = input(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
211
- /** Acceptable file types for attachment */
212
- this.acceptFileType = input('*', ...(ngDevMode ? [{ debugName: "acceptFileType" }] : []));
213
- /**
214
- * Emitted when the send button is clicked.
215
- *
216
- * @event
217
- */
218
- this.onSendClick = output();
219
- /**
220
- * Emitted when recording starts.
221
- *
222
- * @event
223
- */
224
- this.onStartRecording = output();
225
- /**
226
- * Emitted when recording is canceled.
227
- *
228
- * @event
229
- */
230
- this.onCancelRecording = output();
231
- this.onEnterPressed = output();
232
- /**
233
- * @ignore
234
- */
235
- this.recording = signal(false, ...(ngDevMode ? [{ debugName: "recording" }] : []));
236
- /**
237
- * @ignore
238
- */
239
- this.recordingService = inject(AXRecordingService);
240
- /**
241
- * @ignore
242
- */
243
- this._updateOn = 'change';
244
- this.shiftState = false;
245
- }
246
- setActionBoxContainer(icon, content, user, closeCallback) {
247
- this.actionIcon.set(icon);
248
- this.actionContent.set(content);
249
- this.actionShowState.set(true);
250
- this.actionUser.set(user);
251
- this.actionCloseCallback.set(closeCallback);
252
- }
253
- /**
254
- * @ignore
255
- */
256
- _handleModelChange(value) {
257
- this.commitValue(value, true);
258
- }
259
- /**
260
- * Initiates recording when the record button is clicked.
261
- * Emits an event when recording starts.
262
- * @ignore
263
- */
264
- handleRecordClick() {
265
- this.recording.set(true);
266
- this.recordingService
267
- ?.startRecording()
268
- .then(() => {
269
- this.onStartRecording.emit({
270
- component: this,
271
- data: { recording: true },
272
- isUserInteraction: true,
273
- });
274
- })
275
- .catch((e) => {
276
- throw e;
277
- });
278
- }
279
- /**
280
- * Cancels the recording and emits an event to indicate cancellation.
281
- * @ignore
282
- */
283
- handleCancelRecordingClick() {
284
- this.recording.set(false);
285
- this.onCancelRecording.emit({
286
- component: this,
287
- data: { value: null },
288
- });
289
- }
290
- keyDownHandler(e) {
291
- if (e.key === 'Shift') {
292
- this.shiftState = true;
293
- }
294
- this.onKeyDown.emit({
295
- component: this,
296
- nativeEvent: e,
297
- });
298
- }
299
- keyUpHandler(e) {
300
- if (e.key === 'Shift') {
301
- this.shiftState = false;
302
- }
303
- this.onKeyUp.emit({
304
- component: this,
305
- nativeEvent: e,
306
- });
307
- }
308
- keyPressHandler(e) {
309
- if (e.key === 'Enter' && !this.shiftState) {
310
- e.preventDefault();
311
- this.onEnterPressed.emit({ component: this });
312
- }
313
- this.onKeyPress.emit({
314
- component: this,
315
- nativeEvent: e,
316
- });
317
- }
318
- /**
319
- * Opens the file picker for attachment.
320
- * @ignore
321
- */
322
- handleAttachClick() {
323
- this.inputFile.nativeElement.click();
324
- }
325
- /**
326
- * Emits the selected files when the file input changes.
327
- * @ignore
328
- */
329
- handleChangeFile(event) {
330
- this.onSendClick.emit({
331
- component: this,
332
- data: { value: event.target.files, type: 'file' },
333
- });
334
- }
335
- /**
336
- * Emits the text value and optional replyChat when the send button is clicked.
337
- * @ignore
338
- */
339
- handleSendClick() {
340
- this.onSendClick.emit({
341
- component: this,
342
- data: { value: this.value, replyChat: this.replyChat() || null, type: 'text' },
343
- isUserInteraction: true,
344
- });
345
- this.actionShowState.set(false);
346
- }
347
- /**
348
- * Ends recording and emits the recorded voice data when the send voice button is clicked.
349
- * @ignore
350
- */
351
- handleSendVoiceClick() {
352
- this.recordingService.endRecording().then((c) => {
353
- this.recording.set(false);
354
- this.onSendClick.emit({
355
- component: this,
356
- data: { value: c, type: 'voice' },
357
- isUserInteraction: true,
358
- });
359
- });
360
- }
361
- /**
362
- * Clears the reply ID when closing a reply.
363
- * @ignore
364
- */
365
- closeReplyHandler() {
366
- this.actionShowState.set(false);
367
- this.actionCloseCallback();
368
- this.onActionClose.emit();
369
- }
370
- get __hostName() {
371
- return this.name;
372
- }
373
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
374
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationInputComponent, isStandalone: true, selector: "ax-conversation-input", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, hasAttachment: { classPropertyName: "hasAttachment", publicName: "hasAttachment", isSignal: true, isRequired: false, transformFunction: null }, hasVoice: { classPropertyName: "hasVoice", publicName: "hasVoice", isSignal: true, isRequired: false, transformFunction: null }, hasEmoji: { classPropertyName: "hasEmoji", publicName: "hasEmoji", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, acceptFileType: { classPropertyName: "acceptFileType", publicName: "acceptFileType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onActionClose: "onActionClose", onSendClick: "onSendClick", onStartRecording: "onStartRecording", onCancelRecording: "onCancelRecording", onEnterPressed: "onEnterPressed" }, host: { properties: { "attr.name": "this.__hostName" } }, providers: [
375
- { provide: AXComponent, useExisting: AXConversationInputComponent },
376
- { provide: AXFocusableComponent, useExisting: AXConversationInputComponent },
377
- { provide: AXValuableComponent, useExisting: AXConversationInputComponent },
378
- {
379
- provide: NG_VALUE_ACCESSOR,
380
- useExisting: forwardRef(() => AXConversationInputComponent),
381
- multi: true,
382
- },
383
- ], queries: [{ propertyName: "sendIcon", first: true, predicate: ["ax-icon"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (actionShowState()) {\n <div class=\"ax-editor-reply-container ax-editor-container ax-{{ look }}\">\n @if (actionUser()) {\n <ax-text> {{ actionUser() }}</ax-text>\n }\n <div class=\"ax-reply-container\">\n <div class=\"ax-reply-start\">\n <i [class]=\"actionIcon()\"></i>\n <p>{{ actionContent() }}</p>\n </div>\n <i (click)=\"closeReplyHandler()\" class=\"fa-solid fa-xmark ax-cursor-pointer\"></i>\n </div>\n </div>\n}\n\n<div class=\"ax-conversation-input ax-editor-container ax-{{ look }}\" [class.ax-state-recording]=\"recording()\">\n @if (recording()) {\n <div class=\"ax-conversation-input-start-side\">\n <span class=\"ax-record-dot\"></span>\n <span>{{ recordingService.timer() }}</span>\n </div>\n <div class=\"ax-conversation-input-main-side\">\n <ax-button\n class=\"ax-sm\"\n look=\"blank\"\n color=\"primary\"\n [text]=\"'@acorex:common.actions.cancel' | translate | async\"\n (onClick)=\"handleCancelRecordingClick()\"\n ></ax-button>\n </div>\n <div class=\"ax-conversation-input-end-side\">\n <ax-button look=\"solid\" color=\"danger\" class=\"ax-blob ax-sm\" (onClick)=\"handleSendVoiceClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n </div>\n } @else {\n @if (hasEmoji()) {\n <div class=\"ax-conversation-input-start-side\">\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-emoji\"></i>\n </ax-icon>\n <ax-dropdown-panel>\n <ng-container>\n <div class=\"ax-emoji-container\">\n <div>\u26A0\uFE0F</div>\n <div>\u27A1\uFE0F</div>\n <div>\uD83D\uDD03</div>\n <div>\uD83D\uDD37</div>\n <div>\uD83E\uDD1A</div>\n <div>\uD83D\uDE02</div>\n <div>\uD83D\uDE0A</div>\n </div>\n </ng-container>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }\n\n <textarea\n class=\"ax-conversation-input-main-side\"\n oninput='this.style.height = \"\";this.style.height = this.scrollHeight + \"px\"'\n type=\"text\"\n rows=\"1\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n (ngModelChange)=\"_handleModelChange($event)\"\n [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"keyDownHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n >\n </textarea>\n\n <div class=\"ax-conversation-input-end-side\">\n @if (!value) {\n @if (hasAttachment()) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleAttachClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-attach\"></i>\n </ax-icon>\n </ax-button>\n <input\n multiple\n #inputFile\n [accept]=\"acceptFileType()\"\n type=\"file\"\n class=\"ax-attach-input\"\n (change)=\"handleChangeFile($event)\"\n />\n }\n @if (hasVoice()) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleRecordClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-mic\"></i>\n </ax-icon>\n </ax-button>\n }\n } @else {\n <ax-button [disabled]=\"isLoading()\" look=\"solid\" color=\"primary\" class=\"ax-sm\" (onClick)=\"handleSendClick()\">\n @if (isLoading()) {\n <ax-loading-spinner color=\"primary\"></ax-loading-spinner>\n } @else {\n @if (sendIcon()) {\n <ng-content select=\"ax-icon\"></ng-content>\n } @else {\n <ax-icon>\n <i class=\"ax-icon ax-icon-arrow-long-up\"></i>\n </ax-icon>\n }\n }\n </ax-button>\n }\n </div>\n }\n</div>\n", styles: ["ax-conversation-input{width:100%;display:block}ax-conversation-input .ax-conversation-input{display:flex;align-items:center;position:relative;resize:vertical;height:auto;padding:.5rem;font-size:.875rem}ax-conversation-input .ax-conversation-input.ax-state-recording{align-items:center;display:grid;grid-template-columns:repeat(3,1fr)}ax-conversation-input .ax-conversation-input.ax-state-recording .ax-conversation-input-start-side{justify-content:flex-start}ax-conversation-input .ax-conversation-input.ax-state-recording .ax-conversation-input-end-side{justify-content:flex-end}ax-conversation-input .ax-conversation-input>textarea{font-size:.875rem;background-color:transparent;max-height:10rem;min-height:1.5rem;line-height:2rem;flex:1 1 auto;height:auto;resize:none}ax-conversation-input .ax-conversation-input>textarea:focus,ax-conversation-input .ax-conversation-input>textarea:focus-visible{outline:unset}ax-conversation-input .ax-conversation-input .ax-conversation-input-start-side,ax-conversation-input .ax-conversation-input .ax-conversation-input-end-side{display:flex;align-items:center;justify-content:center}ax-conversation-input .ax-conversation-input .ax-conversation-input-start-side{padding-inline-end:.75rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-main-side{flex:1 1 auto;display:flex;align-items:center;justify-content:center;line-height:2.5rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-main-side::placeholder{font-size:1rem;line-height:2.5rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-end-side{padding-inline-start:.75rem;gap:.5rem}ax-conversation-input .ax-conversation-input .ax-record-dot{display:inline-flex;width:.5rem;height:.5rem;background-color:rgba(var(--ax-sys-color-danger-surface));border-radius:999rem;margin-inline-end:.5rem}ax-conversation-input .ax-conversation-input .ax-blob{animation:pulse .75s infinite}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 rgba(var(--ax-sys-color-danger-surface),.7)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(var(--ax-sys-color-danger-surface),0)}to{transform:scale(1);box-shadow:0 0 rgba(var(--ax-sys-color-danger-surface),0)}}ax-conversation-input .ax-conversation-input .ax-attach-input{opacity:0;width:0;height:0;position:absolute}ax-conversation-input .ax-emoji-container{padding:.75rem;gap:.5rem;display:grid;grid-template-columns:repeat(7,1fr)}ax-conversation-input .ax-emoji-container>div{padding:.25rem;cursor:pointer;border-radius:var(--ax-sys-border-radius)}ax-conversation-input .ax-emoji-container>div:hover{background-color:rgba(var(--ax-sys-color-surface))}ax-conversation-input .ax-editor-reply-container{--ax-comp-editor-height: 100%;display:flex;flex-direction:column;align-items:flex-start;padding:.5rem}ax-conversation-input .ax-editor-reply-container .ax-reply-container{display:flex;justify-content:space-between;align-items:center;width:100%}ax-conversation-input .ax-reply-start{display:flex;align-items:center}ax-conversation-input .ax-cursor-pointer{cursor:pointer}ax-conversation-input .ax-reply-types{display:flex;align-items:center}ax-conversation-input .ax-reply-start i{margin-inline-end:1rem}ax-conversation-input .ax-reply-start img,ax-conversation-input .ax-reply-start video{margin-inline-end:.5rem;height:1.75rem;width:1.75rem}\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
384
- }
385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationInputComponent, decorators: [{
386
- type: Component,
387
- args: [{ selector: 'ax-conversation-input', inputs: ['look', 'placeholder'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
388
- { provide: AXComponent, useExisting: AXConversationInputComponent },
389
- { provide: AXFocusableComponent, useExisting: AXConversationInputComponent },
390
- { provide: AXValuableComponent, useExisting: AXConversationInputComponent },
391
- {
392
- provide: NG_VALUE_ACCESSOR,
393
- useExisting: forwardRef(() => AXConversationInputComponent),
394
- multi: true,
395
- },
396
- ], imports: [
397
- AXButtonComponent,
398
- AXDecoratorIconComponent,
399
- AXDropdownPanelComponent,
400
- FormsModule,
401
- AXLoadingSpinnerComponent,
402
- AsyncPipe,
403
- AXTranslatorPipe,
404
- AXDecoratorModule,
405
- ], template: "@if (actionShowState()) {\n <div class=\"ax-editor-reply-container ax-editor-container ax-{{ look }}\">\n @if (actionUser()) {\n <ax-text> {{ actionUser() }}</ax-text>\n }\n <div class=\"ax-reply-container\">\n <div class=\"ax-reply-start\">\n <i [class]=\"actionIcon()\"></i>\n <p>{{ actionContent() }}</p>\n </div>\n <i (click)=\"closeReplyHandler()\" class=\"fa-solid fa-xmark ax-cursor-pointer\"></i>\n </div>\n </div>\n}\n\n<div class=\"ax-conversation-input ax-editor-container ax-{{ look }}\" [class.ax-state-recording]=\"recording()\">\n @if (recording()) {\n <div class=\"ax-conversation-input-start-side\">\n <span class=\"ax-record-dot\"></span>\n <span>{{ recordingService.timer() }}</span>\n </div>\n <div class=\"ax-conversation-input-main-side\">\n <ax-button\n class=\"ax-sm\"\n look=\"blank\"\n color=\"primary\"\n [text]=\"'@acorex:common.actions.cancel' | translate | async\"\n (onClick)=\"handleCancelRecordingClick()\"\n ></ax-button>\n </div>\n <div class=\"ax-conversation-input-end-side\">\n <ax-button look=\"solid\" color=\"danger\" class=\"ax-blob ax-sm\" (onClick)=\"handleSendVoiceClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-send\"></i>\n </ax-icon>\n </ax-button>\n </div>\n } @else {\n @if (hasEmoji()) {\n <div class=\"ax-conversation-input-start-side\">\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-emoji\"></i>\n </ax-icon>\n <ax-dropdown-panel>\n <ng-container>\n <div class=\"ax-emoji-container\">\n <div>\u26A0\uFE0F</div>\n <div>\u27A1\uFE0F</div>\n <div>\uD83D\uDD03</div>\n <div>\uD83D\uDD37</div>\n <div>\uD83E\uDD1A</div>\n <div>\uD83D\uDE02</div>\n <div>\uD83D\uDE0A</div>\n </div>\n </ng-container>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }\n\n <textarea\n class=\"ax-conversation-input-main-side\"\n oninput='this.style.height = \"\";this.style.height = this.scrollHeight + \"px\"'\n type=\"text\"\n rows=\"1\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength()\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n (ngModelChange)=\"_handleModelChange($event)\"\n [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"keyDownHandler($event)\"\n (keyup)=\"keyUpHandler($event)\"\n (keypress)=\"keyPressHandler($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n >\n </textarea>\n\n <div class=\"ax-conversation-input-end-side\">\n @if (!value) {\n @if (hasAttachment()) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleAttachClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-attach\"></i>\n </ax-icon>\n </ax-button>\n <input\n multiple\n #inputFile\n [accept]=\"acceptFileType()\"\n type=\"file\"\n class=\"ax-attach-input\"\n (change)=\"handleChangeFile($event)\"\n />\n }\n @if (hasVoice()) {\n <ax-button look=\"blank\" class=\"ax-sm\" (onClick)=\"handleRecordClick()\">\n <ax-icon>\n <i class=\"ax-icon ax-icon-mic\"></i>\n </ax-icon>\n </ax-button>\n }\n } @else {\n <ax-button [disabled]=\"isLoading()\" look=\"solid\" color=\"primary\" class=\"ax-sm\" (onClick)=\"handleSendClick()\">\n @if (isLoading()) {\n <ax-loading-spinner color=\"primary\"></ax-loading-spinner>\n } @else {\n @if (sendIcon()) {\n <ng-content select=\"ax-icon\"></ng-content>\n } @else {\n <ax-icon>\n <i class=\"ax-icon ax-icon-arrow-long-up\"></i>\n </ax-icon>\n }\n }\n </ax-button>\n }\n </div>\n }\n</div>\n", styles: ["ax-conversation-input{width:100%;display:block}ax-conversation-input .ax-conversation-input{display:flex;align-items:center;position:relative;resize:vertical;height:auto;padding:.5rem;font-size:.875rem}ax-conversation-input .ax-conversation-input.ax-state-recording{align-items:center;display:grid;grid-template-columns:repeat(3,1fr)}ax-conversation-input .ax-conversation-input.ax-state-recording .ax-conversation-input-start-side{justify-content:flex-start}ax-conversation-input .ax-conversation-input.ax-state-recording .ax-conversation-input-end-side{justify-content:flex-end}ax-conversation-input .ax-conversation-input>textarea{font-size:.875rem;background-color:transparent;max-height:10rem;min-height:1.5rem;line-height:2rem;flex:1 1 auto;height:auto;resize:none}ax-conversation-input .ax-conversation-input>textarea:focus,ax-conversation-input .ax-conversation-input>textarea:focus-visible{outline:unset}ax-conversation-input .ax-conversation-input .ax-conversation-input-start-side,ax-conversation-input .ax-conversation-input .ax-conversation-input-end-side{display:flex;align-items:center;justify-content:center}ax-conversation-input .ax-conversation-input .ax-conversation-input-start-side{padding-inline-end:.75rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-main-side{flex:1 1 auto;display:flex;align-items:center;justify-content:center;line-height:2.5rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-main-side::placeholder{font-size:1rem;line-height:2.5rem}ax-conversation-input .ax-conversation-input .ax-conversation-input-end-side{padding-inline-start:.75rem;gap:.5rem}ax-conversation-input .ax-conversation-input .ax-record-dot{display:inline-flex;width:.5rem;height:.5rem;background-color:rgba(var(--ax-sys-color-danger-surface));border-radius:999rem;margin-inline-end:.5rem}ax-conversation-input .ax-conversation-input .ax-blob{animation:pulse .75s infinite}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 rgba(var(--ax-sys-color-danger-surface),.7)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(var(--ax-sys-color-danger-surface),0)}to{transform:scale(1);box-shadow:0 0 rgba(var(--ax-sys-color-danger-surface),0)}}ax-conversation-input .ax-conversation-input .ax-attach-input{opacity:0;width:0;height:0;position:absolute}ax-conversation-input .ax-emoji-container{padding:.75rem;gap:.5rem;display:grid;grid-template-columns:repeat(7,1fr)}ax-conversation-input .ax-emoji-container>div{padding:.25rem;cursor:pointer;border-radius:var(--ax-sys-border-radius)}ax-conversation-input .ax-emoji-container>div:hover{background-color:rgba(var(--ax-sys-color-surface))}ax-conversation-input .ax-editor-reply-container{--ax-comp-editor-height: 100%;display:flex;flex-direction:column;align-items:flex-start;padding:.5rem}ax-conversation-input .ax-editor-reply-container .ax-reply-container{display:flex;justify-content:space-between;align-items:center;width:100%}ax-conversation-input .ax-reply-start{display:flex;align-items:center}ax-conversation-input .ax-cursor-pointer{cursor:pointer}ax-conversation-input .ax-reply-types{display:flex;align-items:center}ax-conversation-input .ax-reply-start i{margin-inline-end:1rem}ax-conversation-input .ax-reply-start img,ax-conversation-input .ax-reply-start video{margin-inline-end:.5rem;height:1.75rem;width:1.75rem}\n"] }]
406
- }], propDecorators: { inputFile: [{
407
- type: ViewChild,
408
- args: ['inputFile']
409
- }], __hostName: [{
410
- type: HostBinding,
411
- args: ['attr.name']
412
- }] } });
413
-
414
- class AXConversationMessageTypeRegistryService {
415
- constructor() {
416
- this.plugins = new Map();
417
- }
418
- register(...plugins) {
419
- plugins.forEach((p) => this.plugins.set(p.name, p));
420
- }
421
- resolve(name) {
422
- return this.plugins.get(name);
423
- }
424
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageTypeRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
425
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageTypeRegistryService, providedIn: 'root' }); }
426
- }
427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageTypeRegistryService, decorators: [{
428
- type: Injectable,
429
- args: [{ providedIn: 'root' }]
430
- }] });
431
-
432
- /**
433
- * A component for displaying individual conversation messages.
434
- *
435
- * @category Components
436
- */
437
- class AXConversationMessageComponent extends MXBaseComponent {
438
- constructor() {
439
- super(...arguments);
440
- this.popover = viewChild('popover', ...(ngDevMode ? [{ debugName: "popover" }] : []));
441
- this.isReplyArrowShown = input(true, ...(ngDevMode ? [{ debugName: "isReplyArrowShown" }] : []));
442
- this.chatMessage = input(...(ngDevMode ? [undefined, { debugName: "chatMessage" }] : []));
443
- this.avatar = input(null, ...(ngDevMode ? [{ debugName: "avatar" }] : []));
444
- this.conversationService = inject(AXConversationService);
445
- this.registryService = inject(AXConversationMessageTypeRegistryService);
446
- this.actionButtonItemsPrivate = signal([], ...(ngDevMode ? [{ debugName: "actionButtonItemsPrivate" }] : []));
447
- this.actionButtonItemsPublic = {
448
- items: [],
449
- canceled: false,
450
- data: this.chatMessage(),
451
- };
452
- this.onActionMenuOpening = output();
453
- this.onReplyClick = output();
454
- this.portal = computed(() => {
455
- return new ComponentPortal(this.registryService.resolve(this.chatMessage().type).component);
456
- }, ...(ngDevMode ? [{ debugName: "portal" }] : []));
457
- this.messageType = computed(() => {
458
- return this.chatMessage().type;
459
- }, ...(ngDevMode ? [{ debugName: "messageType" }] : []));
460
- }
461
- get isOwn() {
462
- return !this.chatMessage().fromId;
463
- }
464
- /**
465
- * Handles the action button click and opens the action menu.
466
- */
467
- handleActionClick() {
468
- this.actionButtonItemsPublic = {
469
- items: [],
470
- canceled: false,
471
- data: this.chatMessage(),
472
- };
473
- this.onActionMenuOpening.emit(this.actionButtonItemsPublic);
474
- if (this.actionButtonItemsPublic.canceled)
475
- return;
476
- this.actionButtonItemsPrivate.set(this.actionButtonItemsPublic.items);
477
- }
478
- _handleAttached(ref) {
479
- ref = ref;
480
- if (ref.instance && isBrowser()) {
481
- Object.assign(ref.instance, { message: this.chatMessage() });
482
- const prefixContainer = this.getHostElement().querySelector('.ax-message-prefix');
483
- const suffixContainer = this.getHostElement().querySelector('.ax-message-suffix');
484
- prefixContainer.innerHTML = '';
485
- suffixContainer.innerHTML = '';
486
- const prefix = this.getHostElement().querySelector('ax-prefix');
487
- const suffix = this.getHostElement().querySelector('ax-suffix');
488
- if (prefix && prefixContainer) {
489
- prefix.style.display = 'flex';
490
- prefixContainer.append(prefix);
491
- }
492
- if (suffix && suffixContainer) {
493
- suffix.style.display = 'flex';
494
- suffixContainer.append(suffix);
495
- }
496
- }
497
- }
498
- /**
499
- * Handles the resend button click and closes the popover.
500
- */
501
- handleResendClick() {
502
- this.popover()?.close();
503
- this.chatMessage().onResendClick();
504
- }
505
- /**
506
- * Handles the delete button click and closes the popover.
507
- */
508
- handleDeleteClick() {
509
- this.popover()?.close();
510
- this.chatMessage().onDeleteClick();
511
- }
512
- /**
513
- * Handles reply functionality by setting the reply ID and emitting the reply click event.
514
- *
515
- * @param e - The conversation message to reply to.
516
- */
517
- replyHandler(e) {
518
- this.conversationService.replyId.set(e.id);
519
- this.onReplyClick.emit({ data: e, component: this });
520
- }
521
- get __hostClass() {
522
- return `${this.isOwn ? 'ax-state-own' : ''} ${!this.isOwn ? 'ax-state-other' : ''}`;
523
- }
524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
525
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationMessageComponent, isStandalone: true, selector: "ax-conversation-message", inputs: { isReplyArrowShown: { classPropertyName: "isReplyArrowShown", publicName: "isReplyArrowShown", isSignal: true, isRequired: false, transformFunction: null }, chatMessage: { classPropertyName: "chatMessage", publicName: "chatMessage", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onActionMenuOpening: "onActionMenuOpening", onReplyClick: "onReplyClick" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXConversationMessageComponent }], viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (chatMessage().fromId) {\n @if (avatar()) {\n <ng-container [ngTemplateOutlet]=\"avatar()\"></ng-container>\n } @else {\n <ax-avatar color=\"primary\" [size]=\"36\"> </ax-avatar>\n }\n}\n\n@if (isOwn && isReplyArrowShown()) {\n <i (click)=\"replyHandler(chatMessage())\" class=\"fa-solid fa-reply ax-cursor-pointer\"></i>\n}\n\n<div\n class=\"ax-message-content\"\n [class]=\"'ax-type-' + messageType()\"\n [class.ax-state-own]=\"!chatMessage().fromId\"\n [class.ax-state-other]=\"chatMessage().fromId\"\n>\n <div class=\"ax-action-button\">\n @if (chatMessage()?.userName) {\n <div class=\"ax-message-user-name\">\n <ax-text>{{ chatMessage().userName }}</ax-text>\n </div>\n }\n\n @if (chatMessage()?.showActionButton) {\n <div class=\"ax-message-action-button\">\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item class=\"ax-parent-menu-item\">\n <ax-text (click)=\"handleActionClick()\">...</ax-text>\n\n @for (item of actionButtonItemsPrivate(); track item.text) {\n <ax-menu-item [color]=\"item.color\" (onClick)=\"item.onClick(chatMessage().id)\">\n <ax-text>{{ item.text }}</ax-text>\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n\n @for (innerItem of item.items; track innerItem.text) {\n <ax-menu-item [color]=\"innerItem.color\" (onClick)=\"innerItem.onClick(chatMessage().id)\">\n <ax-text>{{ innerItem.text }}</ax-text>\n <ax-prefix>\n <ax-icon [icon]=\"innerItem.icon\"></ax-icon>\n </ax-prefix>\n </ax-menu-item>\n }\n </ax-menu-item>\n }\n </ax-menu-item>\n </ax-menu>\n </div>\n }\n </div>\n\n <ng-template [cdkPortalOutlet]=\"portal()\" (attached)=\"_handleAttached($event)\"></ng-template>\n\n <div class=\"ax-chat-message-status\">\n <div class=\"ax-message-prefix\"></div>\n <div>\n <div class=\"ax-message-suffix\"></div>\n <span>\n {{ chatMessage().sendTime | format: 'datetime' : 'HH:mm' | async }}\n </span>\n <span>\n @if (isOwn) {\n @if (chatMessage().deliverTime && chatMessage().sendTime) {\n <i class=\"ax-icon ax-icon-check ax-message-status\"></i>\n }\n @if (chatMessage().readTime && chatMessage().sendTime) {\n <i class=\"ax-icon ax-icon-dobble-check ax-message-status\"></i>\n }\n }\n </span>\n </div>\n </div>\n</div>\n\n@if (!chatMessage().sendTime) {\n <ax-button class=\"ax-resend-button ax-xs\" color=\"danger\" #b>\n <ax-icon class=\"ax-icon ax-icon-error\"></ax-icon>\n\n <ax-popover [target]=\"b\" placement=\"bottom-end\" #popover>\n <div>\n <ax-content> </ax-content>\n <ax-button-item-list>\n @if (chatMessage().onResendClick) {\n <ax-button-item text=\"Resend\" (onClick)=\"handleResendClick()\">\n <ax-icon class=\"ax-icon ax-icon-reload ax-bold\"></ax-icon>\n </ax-button-item>\n }\n @if (chatMessage().onDeleteClick) {\n <ax-button-item text=\"Delete\" color=\"danger\" (onClick)=\"handleDeleteClick()\">\n <ax-icon class=\"ax-icon ax-icon-clear ax-bold\"></ax-icon>\n </ax-button-item>\n }\n </ax-button-item-list>\n </div>\n </ax-popover>\n </ax-button>\n}\n\n@if (!isOwn && isReplyArrowShown()) {\n <i (click)=\"replyHandler(chatMessage())\" class=\"fa-solid fa-reply ax-rotate ax-cursor-pointer\"></i>\n}\n", styles: ["ax-conversation-message{display:flex;align-items:flex-end;margin:.5rem}ax-conversation-message .ax-message-reply-container{padding:.75rem}ax-conversation-message .ax-message-reply-container,ax-conversation-message .ax-image-reply-container,ax-conversation-message .ax-video-reply-container{border-left:.3rem solid rgb(var(--ax-comp-conversation-border-color));border-radius:.75rem;margin-bottom:.25rem;overflow:hidden}ax-conversation-message .ax-message-reply-container .file,ax-conversation-message .ax-image-reply-container .file,ax-conversation-message .ax-video-reply-container .file{display:flex;align-items:center}ax-conversation-message .ax-message-reply-container .file i,ax-conversation-message .ax-image-reply-container .file i,ax-conversation-message .ax-video-reply-container .file i{margin-inline-end:.5rem}ax-conversation-message .ax-message-reply-container img,ax-conversation-message .ax-message-reply-container video,ax-conversation-message .ax-image-reply-container img,ax-conversation-message .ax-image-reply-container video,ax-conversation-message .ax-video-reply-container img,ax-conversation-message .ax-video-reply-container video{max-width:6rem}ax-conversation-message.ax-state-own{justify-content:flex-end}ax-conversation-message.ax-state-own .ax-conversation-controller button{background-color:rgb(var(--ax-comp-conversation-own-color-fore));color:rgb(var(--ax-comp-conversation-own-color))}ax-conversation-message.ax-state-own .ax-message-reply-container{background-color:rgb(var(--ax-comp-conversation-own-reply-color));color:rgb(var(--ax-comp-conversation-own-reply-color-fore))}ax-conversation-message.ax-state-other .ax-conversation-controller button{background-color:rgb(var(--ax-comp-conversation-other-color-fore));color:rgb(var(--ax-comp-conversation-other-color))}ax-conversation-message.ax-state-other .ax-message-reply-container{background-color:rgb(var(--ax-comp-conversation-other-reply-color));color:rgb(var(--ax-comp-conversation-other-reply-color-fore))}ax-conversation-message .ax-conversation-controller button{width:2.5rem;height:2.5rem;border-radius:999rem;display:flex;align-items:center;justify-content:center}ax-conversation-message .ax-conversation-controller button ax-loading-spinner{display:flex}ax-conversation-message .ax-conversation-controller button.ax-state-error{background-color:rgb(var(--ax-sys-color-danger-surface));color:rgb(var(--ax-sys-color-danger-fore))}ax-conversation-message .ax-conversation-controller button>i{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:700}ax-conversation-message .ax-message-content{display:flex;flex-direction:column;gap:.25rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;border-radius:var(--ax-sys-border-radius);overflow:hidden;width:fit-content;max-width:50%;margin-inline-start:.5rem}ax-conversation-message .ax-message-content .ax-action-button{display:grid;grid-template-columns:repeat(2,1fr)}ax-conversation-message .ax-message-content .ax-action-button .ax-message-user-name{justify-self:start;grid-column:1}ax-conversation-message .ax-message-content .ax-action-button .ax-message-action-button{justify-self:end;grid-column:2}ax-conversation-message .ax-message-content .ax-action-button ax-menu.ax-action-list-horizontal{min-width:0;gap:0}ax-conversation-message .ax-message-content .ax-action-button .ax-parent-menu-item{height:auto!important;padding:0!important}ax-conversation-message .ax-message-content.ax-type-video{padding:0}ax-conversation-message .ax-message-content.ax-type-image{padding:0}ax-conversation-message .ax-message-content .ax-chat-message-status{padding:.25rem .5rem}ax-conversation-message .ax-message-content.ax-state-own{border-end-end-radius:0!important;background-color:rgb(var(--ax-comp-conversation-own-color));color:rgb(var(--ax-comp-conversation-own-color-fore));justify-content:flex-end}ax-conversation-message .ax-message-content.ax-state-own .ax-chat-message-status{color:rgb(var(--ax-comp-conversation-own-color-fore))}ax-conversation-message .ax-message-content.ax-state-other{border-end-start-radius:0!important;background-color:rgb(var(--ax-comp-conversation-other-color));color:rgb(var(--ax-comp-conversation-other-color-fore))}ax-conversation-message .ax-message-content.ax-state-other .ax-chat-message-status{color:rgb(var(--ax-comp-conversation-other-color-fore))}ax-conversation-message .ax-message-content .ax-chat-message-status{display:flex;justify-content:space-between;align-items:center;font-size:.75rem}ax-conversation-message .ax-message-content .ax-chat-message-status>div{display:flex;gap:.125rem;align-items:center}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-message-status{color:rgb(var(--ax-comp-conversation-status-color))}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-icon{font-weight:700;font-size:.875rem}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-icon-error{color:rgb(var(--ax-sys-color-danger-surface))}ax-conversation-message .ax-message-content ax-prefix,ax-conversation-message .ax-message-content ax-suffix{display:none}ax-conversation-message .ax-resend-button{border-radius:999rem}ax-conversation-message .ax-cursor-pointer{cursor:pointer}ax-conversation-message .ax-rounded{border-radius:.75rem}ax-conversation-message .ax-message-content p{padding:.75rem;color:rgba(var(--ax-sys-color-on-primary))}ax-conversation-message .ax-rotate{transform:scaleX(-1);margin-inline-start:.5rem}@media (min-width: 320px) and (max-width: 640px){ax-conversation-message ax-avatar{display:none!important}ax-conversation-message .ax-message-content{max-width:100%}}\n"], dependencies: [{ kind: "component", type: AXAvatarComponent, selector: "ax-avatar", inputs: ["color", "size", "shape", "look"], outputs: ["sizeChange"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { 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: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "component", type: AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i1$1.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["subItems", "name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: i1$1.AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn", "closeOn", "items", "hasArrow"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
526
- }
527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageComponent, decorators: [{
528
- type: Component,
529
- args: [{ selector: 'ax-conversation-message', encapsulation: ViewEncapsulation.None, imports: [
530
- AXAvatarComponent,
531
- CdkPortalOutlet,
532
- AXButtonComponent,
533
- AXDecoratorIconComponent,
534
- AXPopoverComponent,
535
- AXDecoratorGenericComponent,
536
- AXButtonItemListComponent,
537
- AXButtonItemComponent,
538
- AsyncPipe,
539
- AXFormatPipe,
540
- AXMenuModule,
541
- CommonModule,
542
- ], providers: [{ provide: AXComponent, useExisting: AXConversationMessageComponent }], template: "@if (chatMessage().fromId) {\n @if (avatar()) {\n <ng-container [ngTemplateOutlet]=\"avatar()\"></ng-container>\n } @else {\n <ax-avatar color=\"primary\" [size]=\"36\"> </ax-avatar>\n }\n}\n\n@if (isOwn && isReplyArrowShown()) {\n <i (click)=\"replyHandler(chatMessage())\" class=\"fa-solid fa-reply ax-cursor-pointer\"></i>\n}\n\n<div\n class=\"ax-message-content\"\n [class]=\"'ax-type-' + messageType()\"\n [class.ax-state-own]=\"!chatMessage().fromId\"\n [class.ax-state-other]=\"chatMessage().fromId\"\n>\n <div class=\"ax-action-button\">\n @if (chatMessage()?.userName) {\n <div class=\"ax-message-user-name\">\n <ax-text>{{ chatMessage().userName }}</ax-text>\n </div>\n }\n\n @if (chatMessage()?.showActionButton) {\n <div class=\"ax-message-action-button\">\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item class=\"ax-parent-menu-item\">\n <ax-text (click)=\"handleActionClick()\">...</ax-text>\n\n @for (item of actionButtonItemsPrivate(); track item.text) {\n <ax-menu-item [color]=\"item.color\" (onClick)=\"item.onClick(chatMessage().id)\">\n <ax-text>{{ item.text }}</ax-text>\n <ax-prefix>\n <ax-icon [icon]=\"item.icon\"></ax-icon>\n </ax-prefix>\n\n @for (innerItem of item.items; track innerItem.text) {\n <ax-menu-item [color]=\"innerItem.color\" (onClick)=\"innerItem.onClick(chatMessage().id)\">\n <ax-text>{{ innerItem.text }}</ax-text>\n <ax-prefix>\n <ax-icon [icon]=\"innerItem.icon\"></ax-icon>\n </ax-prefix>\n </ax-menu-item>\n }\n </ax-menu-item>\n }\n </ax-menu-item>\n </ax-menu>\n </div>\n }\n </div>\n\n <ng-template [cdkPortalOutlet]=\"portal()\" (attached)=\"_handleAttached($event)\"></ng-template>\n\n <div class=\"ax-chat-message-status\">\n <div class=\"ax-message-prefix\"></div>\n <div>\n <div class=\"ax-message-suffix\"></div>\n <span>\n {{ chatMessage().sendTime | format: 'datetime' : 'HH:mm' | async }}\n </span>\n <span>\n @if (isOwn) {\n @if (chatMessage().deliverTime && chatMessage().sendTime) {\n <i class=\"ax-icon ax-icon-check ax-message-status\"></i>\n }\n @if (chatMessage().readTime && chatMessage().sendTime) {\n <i class=\"ax-icon ax-icon-dobble-check ax-message-status\"></i>\n }\n }\n </span>\n </div>\n </div>\n</div>\n\n@if (!chatMessage().sendTime) {\n <ax-button class=\"ax-resend-button ax-xs\" color=\"danger\" #b>\n <ax-icon class=\"ax-icon ax-icon-error\"></ax-icon>\n\n <ax-popover [target]=\"b\" placement=\"bottom-end\" #popover>\n <div>\n <ax-content> </ax-content>\n <ax-button-item-list>\n @if (chatMessage().onResendClick) {\n <ax-button-item text=\"Resend\" (onClick)=\"handleResendClick()\">\n <ax-icon class=\"ax-icon ax-icon-reload ax-bold\"></ax-icon>\n </ax-button-item>\n }\n @if (chatMessage().onDeleteClick) {\n <ax-button-item text=\"Delete\" color=\"danger\" (onClick)=\"handleDeleteClick()\">\n <ax-icon class=\"ax-icon ax-icon-clear ax-bold\"></ax-icon>\n </ax-button-item>\n }\n </ax-button-item-list>\n </div>\n </ax-popover>\n </ax-button>\n}\n\n@if (!isOwn && isReplyArrowShown()) {\n <i (click)=\"replyHandler(chatMessage())\" class=\"fa-solid fa-reply ax-rotate ax-cursor-pointer\"></i>\n}\n", styles: ["ax-conversation-message{display:flex;align-items:flex-end;margin:.5rem}ax-conversation-message .ax-message-reply-container{padding:.75rem}ax-conversation-message .ax-message-reply-container,ax-conversation-message .ax-image-reply-container,ax-conversation-message .ax-video-reply-container{border-left:.3rem solid rgb(var(--ax-comp-conversation-border-color));border-radius:.75rem;margin-bottom:.25rem;overflow:hidden}ax-conversation-message .ax-message-reply-container .file,ax-conversation-message .ax-image-reply-container .file,ax-conversation-message .ax-video-reply-container .file{display:flex;align-items:center}ax-conversation-message .ax-message-reply-container .file i,ax-conversation-message .ax-image-reply-container .file i,ax-conversation-message .ax-video-reply-container .file i{margin-inline-end:.5rem}ax-conversation-message .ax-message-reply-container img,ax-conversation-message .ax-message-reply-container video,ax-conversation-message .ax-image-reply-container img,ax-conversation-message .ax-image-reply-container video,ax-conversation-message .ax-video-reply-container img,ax-conversation-message .ax-video-reply-container video{max-width:6rem}ax-conversation-message.ax-state-own{justify-content:flex-end}ax-conversation-message.ax-state-own .ax-conversation-controller button{background-color:rgb(var(--ax-comp-conversation-own-color-fore));color:rgb(var(--ax-comp-conversation-own-color))}ax-conversation-message.ax-state-own .ax-message-reply-container{background-color:rgb(var(--ax-comp-conversation-own-reply-color));color:rgb(var(--ax-comp-conversation-own-reply-color-fore))}ax-conversation-message.ax-state-other .ax-conversation-controller button{background-color:rgb(var(--ax-comp-conversation-other-color-fore));color:rgb(var(--ax-comp-conversation-other-color))}ax-conversation-message.ax-state-other .ax-message-reply-container{background-color:rgb(var(--ax-comp-conversation-other-reply-color));color:rgb(var(--ax-comp-conversation-other-reply-color-fore))}ax-conversation-message .ax-conversation-controller button{width:2.5rem;height:2.5rem;border-radius:999rem;display:flex;align-items:center;justify-content:center}ax-conversation-message .ax-conversation-controller button ax-loading-spinner{display:flex}ax-conversation-message .ax-conversation-controller button.ax-state-error{background-color:rgb(var(--ax-sys-color-danger-surface));color:rgb(var(--ax-sys-color-danger-fore))}ax-conversation-message .ax-conversation-controller button>i{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:700}ax-conversation-message .ax-message-content{display:flex;flex-direction:column;gap:.25rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;border-radius:var(--ax-sys-border-radius);overflow:hidden;width:fit-content;max-width:50%;margin-inline-start:.5rem}ax-conversation-message .ax-message-content .ax-action-button{display:grid;grid-template-columns:repeat(2,1fr)}ax-conversation-message .ax-message-content .ax-action-button .ax-message-user-name{justify-self:start;grid-column:1}ax-conversation-message .ax-message-content .ax-action-button .ax-message-action-button{justify-self:end;grid-column:2}ax-conversation-message .ax-message-content .ax-action-button ax-menu.ax-action-list-horizontal{min-width:0;gap:0}ax-conversation-message .ax-message-content .ax-action-button .ax-parent-menu-item{height:auto!important;padding:0!important}ax-conversation-message .ax-message-content.ax-type-video{padding:0}ax-conversation-message .ax-message-content.ax-type-image{padding:0}ax-conversation-message .ax-message-content .ax-chat-message-status{padding:.25rem .5rem}ax-conversation-message .ax-message-content.ax-state-own{border-end-end-radius:0!important;background-color:rgb(var(--ax-comp-conversation-own-color));color:rgb(var(--ax-comp-conversation-own-color-fore));justify-content:flex-end}ax-conversation-message .ax-message-content.ax-state-own .ax-chat-message-status{color:rgb(var(--ax-comp-conversation-own-color-fore))}ax-conversation-message .ax-message-content.ax-state-other{border-end-start-radius:0!important;background-color:rgb(var(--ax-comp-conversation-other-color));color:rgb(var(--ax-comp-conversation-other-color-fore))}ax-conversation-message .ax-message-content.ax-state-other .ax-chat-message-status{color:rgb(var(--ax-comp-conversation-other-color-fore))}ax-conversation-message .ax-message-content .ax-chat-message-status{display:flex;justify-content:space-between;align-items:center;font-size:.75rem}ax-conversation-message .ax-message-content .ax-chat-message-status>div{display:flex;gap:.125rem;align-items:center}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-message-status{color:rgb(var(--ax-comp-conversation-status-color))}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-icon{font-weight:700;font-size:.875rem}ax-conversation-message .ax-message-content .ax-chat-message-status .ax-icon-error{color:rgb(var(--ax-sys-color-danger-surface))}ax-conversation-message .ax-message-content ax-prefix,ax-conversation-message .ax-message-content ax-suffix{display:none}ax-conversation-message .ax-resend-button{border-radius:999rem}ax-conversation-message .ax-cursor-pointer{cursor:pointer}ax-conversation-message .ax-rounded{border-radius:.75rem}ax-conversation-message .ax-message-content p{padding:.75rem;color:rgba(var(--ax-sys-color-on-primary))}ax-conversation-message .ax-rotate{transform:scaleX(-1);margin-inline-start:.5rem}@media (min-width: 320px) and (max-width: 640px){ax-conversation-message ax-avatar{display:none!important}ax-conversation-message .ax-message-content{max-width:100%}}\n"] }]
543
- }], propDecorators: { __hostClass: [{
544
- type: HostBinding,
545
- args: ['class']
546
- }] } });
547
-
548
- class AXConversationMessageAction {
549
- }
550
- class AXConversationMenuOpeningEvent {
551
- constructor() {
552
- this.canceled = false;
553
- }
554
- }
555
- class AXConversationMessageBaseComponent {
556
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
557
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageBaseComponent }); }
558
- }
559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageBaseComponent, decorators: [{
560
- type: Injectable
561
- }] });
562
-
563
- /**
564
- * Component for displaying audio messages in a conversation.
565
- *
566
- * @category Components
567
- */
568
- class AXConversationMessageAudioComponent extends AXConversationMessageBaseComponent {
569
- /**
570
- * @ignore
571
- */
572
- constructor() {
573
- super();
574
- this.render = inject(Renderer2);
575
- /**
576
- * @ignore
577
- */
578
- this.audioState = signal('paused', ...(ngDevMode ? [{ debugName: "audioState" }] : []));
579
- /**
580
- * @ignore
581
- */
582
- // audioTag = viewChild<ElementRef<HTMLAudioElement>>('a');
583
- this.audioTag = signal(new Audio(), ...(ngDevMode ? [{ debugName: "audioTag" }] : []));
584
- /**
585
- * @ignore
586
- */
587
- this.audioRate = signal(1, ...(ngDevMode ? [{ debugName: "audioRate" }] : []));
588
- /**
589
- * @ignore
590
- */
591
- this.currentTime = signal(0, ...(ngDevMode ? [{ debugName: "currentTime" }] : []));
592
- /**
593
- * @ignore
594
- */
595
- this.duration = signal(0, ...(ngDevMode ? [{ debugName: "duration" }] : []));
596
- /**
597
- * @ignore
598
- */
599
- this.currentTimeFormat = signal(0, ...(ngDevMode ? [{ debugName: "currentTimeFormat" }] : []));
600
- /**
601
- * @ignore
602
- */
603
- this.durationFormat = signal(0, ...(ngDevMode ? [{ debugName: "durationFormat" }] : []));
604
- afterNextRender(() => {
605
- this.audioTag().autoplay = false;
606
- this.audioTag().src = this.message.content;
607
- this.render.listen(this.audioTag(), 'ended', this.endedFunction.bind(this));
608
- this.render.listen(this.audioTag(), 'durationchange', this.durationchangeFunction.bind(this));
609
- this.render.listen(this.audioTag(), 'timeupdate', this.timeupdateFunction.bind(this));
610
- });
611
- }
612
- /**
613
- * @ignore
614
- */
615
- ngOnDestroy() {
616
- if (this.endedEvent) {
617
- this.endedEvent();
618
- }
619
- if (this.durationchangeEvent) {
620
- this.durationchangeEvent();
621
- }
622
- if (this.timeupdateEvent) {
623
- this.timeupdateEvent();
624
- }
625
- }
626
- /**
627
- * @ignore
628
- */
629
- endedFunction() {
630
- this.audioState.set('paused');
631
- this.audioTag().pause();
632
- this.audioTag().currentTime = 0;
633
- this.currentTime.set(0);
634
- }
635
- /**
636
- * @ignore
637
- */
638
- durationchangeFunction() {
639
- if (this.audioTag().duration === Infinity)
640
- return;
641
- this.duration.set(this.audioTag().duration);
642
- this.durationFormat.set(Math.ceil(this.audioTag().duration) * 1000);
643
- }
644
- /**
645
- * @ignore
646
- */
647
- timeupdateFunction() {
648
- this.currentTime.set(this.audioTag().currentTime);
649
- this.currentTimeFormat.set(Math.ceil(this.audioTag().currentTime * 1000));
650
- }
651
- /**
652
- * Seeks to the specified time and resumes audio playback.
653
- *
654
- * @param e - Time in seconds to seek to.
655
- * @ignore
656
- */
657
- clickHandler(e) {
658
- this.audioTag().currentTime = e;
659
- }
660
- /**
661
- * Pauses the audio and updates the state to 'paused'.
662
- * @ignore
663
- */
664
- handlePauseClick() {
665
- this.audioState.set('paused');
666
- this.audioTag().pause();
667
- }
668
- /**
669
- * Plays the audio and updates the state to 'playing'.\
670
- * @ignore
671
- */
672
- handlePlayClick() {
673
- this.audioState.set('playing');
674
- this.audioTag().play();
675
- }
676
- /**
677
- * Toggles the playback rate of the audio between 1x, 1.5x, and 2x.
678
- * @ignore
679
- */
680
- handleRateClick() {
681
- if (this.audioRate() === 1) {
682
- this.audioRate.set(1.5);
683
- this.audioTag().playbackRate = 1.5;
684
- }
685
- else if (this.audioRate() === 1.5) {
686
- this.audioRate.set(2);
687
- this.audioTag().playbackRate = 2;
688
- }
689
- else if (this.audioRate() === 2) {
690
- this.audioRate.set(1);
691
- this.audioTag().playbackRate = 1;
692
- }
693
- }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
695
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationMessageAudioComponent, isStandalone: true, selector: "ax-conversation-message-audio", providers: [{ provide: AXComponent, useExisting: AXConversationMessageAudioComponent }], usesInheritance: true, ngImport: i0, template: "<ax-prefix>\n <div class=\"ax-time-rate\">\n @switch (audioState()) {\n @case ('paused') {\n {{ currentTimeFormat() | format: 'time-duration' | async }}\n }\n @case ('playing') {\n {{ currentTimeFormat() | format: 'time-duration' | async }}\n }\n @default {\n {{ durationFormat() | format: 'time-duration' | async }}\n }\n }\n <ax-button\n color=\"primary\"\n look=\"solid\"\n text=\"{{ audioRate() }}X\"\n class=\"ax-audio-speed\"\n (click)=\"handleRateClick()\"\n ></ax-button>\n </div>\n</ax-prefix>\n<div class=\"ax-conversation-controller\">\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n @case ('paused') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n }\n</div>\n<ax-range-slider\n class=\"ax-modify-bgSlider\"\n (ngModelChange)=\"clickHandler($event)\"\n [max]=\"duration()\"\n [min]=\"0\"\n mode=\"single\"\n [ngModel]=\"currentTime()\"\n color=\"primary\"\n>\n</ax-range-slider>\n", styles: ["ax-conversation-message-audio{display:flex}ax-conversation-message-audio .ax-time-rate .ax-audio-speed{margin-inline-start:.3rem;border-radius:.2rem;min-width:2rem}ax-conversation-message-audio .ax-modify-bgSlider{width:14rem;margin:0 1rem;padding:0}.ax-time-rate{display:flex;align-items:center}.ax-audio-speed{--ax-comp-button-font-size: .6rem;--ax-comp-button-padding-x: .1rem;--ax-comp-button-padding-y: .1rem;--ax-comp-button-height: auto;--ax-comp-button-text-padding-x: .5rem;margin-inline-start:.5rem}\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: 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: "component", type: AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["disabled", "readonly", "orientation", "color", "values", "mode", "min", "max", "step", "snap", "tooltipMode", "snapMode", "hasStep", "hasSnap", "hasLable", "hasTooltip"], outputs: ["valuesChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
696
- }
697
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageAudioComponent, decorators: [{
698
- type: Component,
699
- args: [{ selector: 'ax-conversation-message-audio', encapsulation: ViewEncapsulation.None, imports: [
700
- AXDecoratorGenericComponent,
701
- AXButtonComponent,
702
- AXRangeSliderComponent,
703
- FormsModule,
704
- AsyncPipe,
705
- AXFormatPipe,
706
- ], providers: [{ provide: AXComponent, useExisting: AXConversationMessageAudioComponent }], template: "<ax-prefix>\n <div class=\"ax-time-rate\">\n @switch (audioState()) {\n @case ('paused') {\n {{ currentTimeFormat() | format: 'time-duration' | async }}\n }\n @case ('playing') {\n {{ currentTimeFormat() | format: 'time-duration' | async }}\n }\n @default {\n {{ durationFormat() | format: 'time-duration' | async }}\n }\n }\n <ax-button\n color=\"primary\"\n look=\"solid\"\n text=\"{{ audioRate() }}X\"\n class=\"ax-audio-speed\"\n (click)=\"handleRateClick()\"\n ></ax-button>\n </div>\n</ax-prefix>\n<div class=\"ax-conversation-controller\">\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n @case ('paused') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n }\n</div>\n<ax-range-slider\n class=\"ax-modify-bgSlider\"\n (ngModelChange)=\"clickHandler($event)\"\n [max]=\"duration()\"\n [min]=\"0\"\n mode=\"single\"\n [ngModel]=\"currentTime()\"\n color=\"primary\"\n>\n</ax-range-slider>\n", styles: ["ax-conversation-message-audio{display:flex}ax-conversation-message-audio .ax-time-rate .ax-audio-speed{margin-inline-start:.3rem;border-radius:.2rem;min-width:2rem}ax-conversation-message-audio .ax-modify-bgSlider{width:14rem;margin:0 1rem;padding:0}.ax-time-rate{display:flex;align-items:center}.ax-audio-speed{--ax-comp-button-font-size: .6rem;--ax-comp-button-padding-x: .1rem;--ax-comp-button-padding-y: .1rem;--ax-comp-button-height: auto;--ax-comp-button-text-padding-x: .5rem;margin-inline-start:.5rem}\n"] }]
707
- }], ctorParameters: () => [] });
708
-
709
- /**
710
- * Displays the conversation view with messages and interactions.
711
- *
712
- * @category Components
713
- */
714
- class AXConversationViewComponent extends MXBaseComponent {
715
- constructor() {
716
- super(...arguments);
717
- this.conversationService = inject(AXConversationService);
718
- this.chatBoxHeight = input('30vh', ...(ngDevMode ? [{ debugName: "chatBoxHeight" }] : []));
719
- this.isReplyArrowShown = input(true, ...(ngDevMode ? [{ debugName: "isReplyArrowShown" }] : []));
720
- this.avatar = input(null, ...(ngDevMode ? [{ debugName: "avatar" }] : []));
721
- this.onActionMenuOpening = output();
722
- this.onAction = output();
723
- this.onReplyClick = output();
724
- this.onScrollEnd = output();
725
- }
726
- /**
727
- * Updates the previous items in the conversation by prepending new items to the beginning of the chat list.
728
- *
729
- * @param item - Array of items to prepend to the conversation.
730
- */
731
- updatePrevItems(item) {
732
- this.conversationService.chats.update((prev) => [...item, ...prev]);
733
- }
734
- /**
735
- * Calls for an update by emitting the onScrollEnd event.
736
- */
737
- callForUpdate() {
738
- this.onScrollEnd.emit({ component: this });
739
- }
740
- /**
741
- * Adds a new item to the end of the conversation chat list.
742
- *
743
- * @param item - The item to add to the conversation.
744
- */
745
- addNewItem(item) {
746
- this.conversationService.chats.update((prev) => [...prev, item]);
747
- }
748
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
749
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationViewComponent, isStandalone: true, selector: "ax-conversation-view", inputs: { chatBoxHeight: { classPropertyName: "chatBoxHeight", publicName: "chatBoxHeight", isSignal: true, isRequired: false, transformFunction: null }, isReplyArrowShown: { classPropertyName: "isReplyArrowShown", publicName: "isReplyArrowShown", isSignal: true, isRequired: false, transformFunction: null }, avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onActionMenuOpening: "onActionMenuOpening", onAction: "onAction", onReplyClick: "onReplyClick", onScrollEnd: "onScrollEnd" }, providers: [{ provide: AXComponent, useExisting: AXConversationViewComponent }], usesInheritance: true, ngImport: i0, template: "<div axVirtualScrollingContainer (ScrollEnd)=\"callForUpdate()\" [height]=\"chatBoxHeight()\">\n @for (item of conversationService.chats(); track item.id) {\n <ax-conversation-message\n animate.enter=\"ax-fade-slide-in\"\n (onReplyClick)=\"onReplyClick.emit($event)\"\n [avatar]=\"avatar()\"\n (onActionMenuOpening)=\"onActionMenuOpening.emit($event)\"\n [isReplyArrowShown]=\"isReplyArrowShown()\"\n axVirtualScrollingItem\n [chatMessage]=\"item\"\n ></ax-conversation-message>\n }\n</div>\n", styles: ["ax-conversation-view{display:block}ax-conversation-view .ax-conversation-container{overflow-y:auto;height:100%}@keyframes fadeSlideIn{0%{opacity:0}to{opacity:1}}ax-conversation-view .ax-fade-slide-in{animation:fadeSlideIn var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}\n"], dependencies: [{ kind: "directive", type: AXVirtualScrollingContainerDirective, selector: "[axVirtualScrollingContainer]", inputs: ["height"], outputs: ["ScrollEnd"] }, { kind: "component", type: AXConversationMessageComponent, selector: "ax-conversation-message", inputs: ["isReplyArrowShown", "chatMessage", "avatar"], outputs: ["onActionMenuOpening", "onReplyClick"] }, { kind: "directive", type: AXVirtualScrollingItemDirective, selector: "[axVirtualScrollingItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
750
- }
751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationViewComponent, decorators: [{
752
- type: Component,
753
- args: [{ selector: 'ax-conversation-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXVirtualScrollingContainerDirective, AXConversationMessageComponent, AXVirtualScrollingItemDirective], providers: [{ provide: AXComponent, useExisting: AXConversationViewComponent }], template: "<div axVirtualScrollingContainer (ScrollEnd)=\"callForUpdate()\" [height]=\"chatBoxHeight()\">\n @for (item of conversationService.chats(); track item.id) {\n <ax-conversation-message\n animate.enter=\"ax-fade-slide-in\"\n (onReplyClick)=\"onReplyClick.emit($event)\"\n [avatar]=\"avatar()\"\n (onActionMenuOpening)=\"onActionMenuOpening.emit($event)\"\n [isReplyArrowShown]=\"isReplyArrowShown()\"\n axVirtualScrollingItem\n [chatMessage]=\"item\"\n ></ax-conversation-message>\n }\n</div>\n", styles: ["ax-conversation-view{display:block}ax-conversation-view .ax-conversation-container{overflow-y:auto;height:100%}@keyframes fadeSlideIn{0%{opacity:0}to{opacity:1}}ax-conversation-view .ax-fade-slide-in{animation:fadeSlideIn var(--ax-sys-transition-duration) var(--ax-sys-transition-timing-function)}\n"] }]
754
- }] });
755
-
756
- /* eslint-disable @typescript-eslint/no-unused-vars */
757
- /**
758
- * Component for displaying file messages in a conversation.
759
- *
760
- * @category Components
761
- */
762
- class AXConversationFileMessageComponent extends AXConversationMessageBaseComponent {
763
- constructor() {
764
- super(...arguments);
765
- this.#init = afterNextRender(() => {
766
- if (this.message.name) {
767
- this.fileName.set(this.message.name);
768
- this.fileSize.set(this.fileService.getSize(this.message.content));
769
- }
770
- else {
771
- this.fileName.set(this.message.content[0].name);
772
- this.fileSize.set(this.message.content[0].size);
773
- }
774
- });
775
- /**
776
- * @ignore
777
- */
778
- this.fileState = signal('ready', ...(ngDevMode ? [{ debugName: "fileState" }] : []));
779
- /**
780
- * @ignore
781
- */
782
- this.fileSize = signal(null, ...(ngDevMode ? [{ debugName: "fileSize" }] : []));
783
- /**
784
- * @ignore
785
- */
786
- this.fileName = signal('', ...(ngDevMode ? [{ debugName: "fileName" }] : []));
787
- /**
788
- * @ignore
789
- */
790
- this.fileService = inject(AXFileService);
791
- /**
792
- * @ignore
793
- */
794
- this.parent = inject(AXConversationViewComponent);
795
- }
796
- #init;
797
- /**
798
- * Emits a download action event for the file.
799
- * @ignore
800
- */
801
- handleDownloadFile() {
802
- this.parent.onAction.emit({ component: this, data: this.message, isUserInteraction: true });
803
- }
804
- /**
805
- * Emits a cancel action event for the file loading.
806
- * @ignore
807
- */
808
- handleCancelLoading() {
809
- this.parent.onAction.emit({ component: this, data: this.message, isUserInteraction: true });
810
- }
811
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationFileMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
812
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationFileMessageComponent, isStandalone: true, selector: "ax-conversation-message-file", providers: [{ provide: AXComponent, useExisting: AXConversationFileMessageComponent }], usesInheritance: true, ngImport: i0, template: "<ax-prefix>\n {{ fileSize() | format: 'filesize' | async }}\n</ax-prefix>\n<div class=\"ax-file-container\">\n <div class=\"ax-conversation-controller\">\n @switch (fileState()) {\n @case ('ready') {\n <button (click)=\"handleDownloadFile()\">\n <i class=\"ax-icon ax-icon-download\"></i>\n </button>\n }\n\n @default {\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner\n [size]=\"24\"\n [stroke]=\"2\"\n [color]=\"message.fromId ? 'white' : 'warning'\"\n ></ax-loading-spinner>\n </button>\n }\n }\n </div>\n\n <div class=\"ax-file-name\">{{ fileName() }}</div>\n</div>\n", styles: ["ax-conversation-message-file .ax-file-container{display:flex;align-items:center;justify-content:center;gap:.5rem}ax-conversation-message-file .ax-file-container .ax-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
813
- }
814
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationFileMessageComponent, decorators: [{
815
- type: Component,
816
- args: [{ selector: 'ax-conversation-message-file', encapsulation: ViewEncapsulation.None, imports: [AXDecoratorGenericComponent, AXLoadingSpinnerComponent, AsyncPipe, AXFormatPipe], providers: [{ provide: AXComponent, useExisting: AXConversationFileMessageComponent }], template: "<ax-prefix>\n {{ fileSize() | format: 'filesize' | async }}\n</ax-prefix>\n<div class=\"ax-file-container\">\n <div class=\"ax-conversation-controller\">\n @switch (fileState()) {\n @case ('ready') {\n <button (click)=\"handleDownloadFile()\">\n <i class=\"ax-icon ax-icon-download\"></i>\n </button>\n }\n\n @default {\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner\n [size]=\"24\"\n [stroke]=\"2\"\n [color]=\"message.fromId ? 'white' : 'warning'\"\n ></ax-loading-spinner>\n </button>\n }\n }\n </div>\n\n <div class=\"ax-file-name\">{{ fileName() }}</div>\n</div>\n", styles: ["ax-conversation-message-file .ax-file-container{display:flex;align-items:center;justify-content:center;gap:.5rem}ax-conversation-message-file .ax-file-container .ax-file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
817
- }] });
818
-
819
- /**
820
- * A popup component for displaying an image in full view.
821
- *
822
- * @category Components
823
- */
824
- class ConversationMessageImagePopupComponent {
825
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ConversationMessageImagePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
826
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: ConversationMessageImagePopupComponent, isStandalone: true, selector: "ax-conversation-message-image-popup", providers: [{ provide: AXComponent, useExisting: ConversationMessageImagePopupComponent }], ngImport: i0, template: ` <img class="ax-image-popup" [src]="url" alt="" />`, isInline: true, styles: ["ax-conversation-message-image-popup{display:flex;justify-content:center;align-items:center}ax-conversation-message-image-popup .ax-image-popup{object-fit:fill;width:30vw}\n"], encapsulation: i0.ViewEncapsulation.None }); }
827
- }
828
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: ConversationMessageImagePopupComponent, decorators: [{
829
- type: Component,
830
- args: [{ selector: 'ax-conversation-message-image-popup', template: ` <img class="ax-image-popup" [src]="url" alt="" />`, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: ConversationMessageImagePopupComponent }], styles: ["ax-conversation-message-image-popup{display:flex;justify-content:center;align-items:center}ax-conversation-message-image-popup .ax-image-popup{object-fit:fill;width:30vw}\n"] }]
831
- }] });
832
-
833
- /**
834
- * A component for displaying an image within a conversation message.
835
- *
836
- * @category Components
837
- */
838
- class AXConversationMessageImageComponent extends AXConversationMessageBaseComponent {
839
- constructor() {
840
- super(...arguments);
841
- /**
842
- * @ignore
843
- */
844
- this._imageUrl = signal('', ...(ngDevMode ? [{ debugName: "_imageUrl" }] : []));
845
- /**
846
- * @ignore
847
- */
848
- this.popup = inject(AXPopupService);
849
- /**
850
- * @ignore
851
- */
852
- this._options = {
853
- header: true,
854
- footer: false,
855
- size: 'md',
856
- draggable: true,
857
- hasBackdrop: true,
858
- closeButton: true,
859
- closeOnBackdropClick: false,
860
- };
861
- this.#init = afterNextRender(() => {
862
- this._imageUrl.set(this.message?.content);
863
- });
864
- }
865
- #init;
866
- /**
867
- * Opens a popup displaying the image with options for draggable, size, and backdrop.
868
- * @ignore
869
- */
870
- openPopup() {
871
- this.popup
872
- .open(ConversationMessageImagePopupComponent, {
873
- draggable: this._options.draggable,
874
- header: this._options.header,
875
- size: this._options.size,
876
- hasBackdrop: this._options.hasBackdrop,
877
- closeButton: this._options.closeButton,
878
- closeOnBackdropClick: this._options.closeOnBackdropClick,
879
- data: {
880
- url: this._imageUrl(),
881
- },
882
- })
883
- .then((c) => {
884
- console.log(c);
885
- });
886
- }
887
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageImageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
888
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXConversationMessageImageComponent, isStandalone: true, selector: "ax-conversation-message-image", inputs: { message: "message" }, providers: [{ provide: AXComponent, useExisting: AXConversationMessageImageComponent }], usesInheritance: true, ngImport: i0, template: `<img (click)="openPopup()" [src]="_imageUrl()" alt="" /> `, isInline: true, styles: ["img{cursor:pointer;width:100%;height:100%}\n"] }); }
889
- }
890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageImageComponent, decorators: [{
891
- type: Component,
892
- args: [{ selector: 'ax-conversation-message-image', template: `<img (click)="openPopup()" [src]="_imageUrl()" alt="" /> `, inputs: ['message'], providers: [{ provide: AXComponent, useExisting: AXConversationMessageImageComponent }], styles: ["img{cursor:pointer;width:100%;height:100%}\n"] }]
893
- }] });
894
-
895
- /**
896
- * A component for displaying a text message with optional reply content, including text, images, videos, files, and audio.
897
- *
898
- * @category Components
899
- */
900
- class AXConversationTextMessageComponent extends AXConversationMessageBaseComponent {
901
- constructor() {
902
- super(...arguments);
903
- /**
904
- * @ignore
905
- */
906
- this._text = signal('', ...(ngDevMode ? [{ debugName: "_text" }] : []));
907
- /**
908
- * @ignore
909
- */
910
- this.replyText = signal(null, ...(ngDevMode ? [{ debugName: "replyText" }] : []));
911
- /**
912
- * @ignore
913
- */
914
- this.replyImage = signal(null, ...(ngDevMode ? [{ debugName: "replyImage" }] : []));
915
- /**
916
- * @ignore
917
- */
918
- this.replyVideo = signal(null, ...(ngDevMode ? [{ debugName: "replyVideo" }] : []));
919
- /**
920
- * @ignore
921
- */
922
- this.replyAudio = signal(null, ...(ngDevMode ? [{ debugName: "replyAudio" }] : []));
923
- /**
924
- * @ignore
925
- */
926
- this.replyVoice = signal(null, ...(ngDevMode ? [{ debugName: "replyVoice" }] : []));
927
- /**
928
- * @ignore
929
- */
930
- this.replyFile = signal(null, ...(ngDevMode ? [{ debugName: "replyFile" }] : []));
931
- /**
932
- * @ignore
933
- */
934
- this.conversationService = inject(AXConversationService);
935
- }
936
- ngOnInit() {
937
- this._text.set(this.message?.content);
938
- if (!this.message?.replyTo)
939
- return;
940
- const replyMessage = this.conversationService.chats().find((chat) => chat.id === this.message?.replyTo?.id);
941
- switch (replyMessage.type) {
942
- case 'text':
943
- this.replyText.set(replyMessage);
944
- break;
945
- case 'image':
946
- this.replyImage.set(replyMessage);
947
- break;
948
- case 'video':
949
- this.replyVideo.set(replyMessage);
950
- break;
951
- case 'audio':
952
- this.replyAudio.set(replyMessage);
953
- break;
954
- case 'voice':
955
- this.replyVoice.set(replyMessage);
956
- break;
957
- case 'file':
958
- this.replyFile.set(replyMessage);
959
- break;
960
- }
961
- }
962
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationTextMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
963
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationTextMessageComponent, isStandalone: true, selector: "ng-component", inputs: { message: "message" }, providers: [{ provide: AXComponent, useExisting: AXConversationTextMessageComponent }], usesInheritance: true, ngImport: i0, template: `
964
- @if (replyText()) {
965
- <div class="ax-message-reply-container">{{ replyText().content }}</div>
966
- }
967
-
968
- @if (replyImage()) {
969
- <div class="ax-image-reply-container"><img [src]="replyImage().content" alt="" /></div>
970
- }
971
-
972
- @if (replyVideo()) {
973
- <div class="ax-video-reply-container"><video [src]="replyVideo().content"></video></div>
974
- }
975
-
976
- @if (replyFile()) {
977
- <div class="ax-message-reply-container">
978
- <div class="file">
979
- <i class="fa-regular fa-folder-open"></i>
980
- {{ replyFile().name }}
981
- </div>
982
- </div>
983
- }
984
-
985
- @if (replyAudio() || replyVoice()) {
986
- <div class="ax-message-reply-container">{{ replyAudio().type }}</div>
987
- }
988
-
989
- <div class="ax-text-message" [innerHtml]="_text()"></div>
990
- `, isInline: true, styles: [".ax-text-message{word-break:normal;white-space:break-spaces}\n"], encapsulation: i0.ViewEncapsulation.None }); }
991
- }
992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationTextMessageComponent, decorators: [{
993
- type: Component,
994
- args: [{ template: `
995
- @if (replyText()) {
996
- <div class="ax-message-reply-container">{{ replyText().content }}</div>
997
- }
998
-
999
- @if (replyImage()) {
1000
- <div class="ax-image-reply-container"><img [src]="replyImage().content" alt="" /></div>
1001
- }
1002
-
1003
- @if (replyVideo()) {
1004
- <div class="ax-video-reply-container"><video [src]="replyVideo().content"></video></div>
1005
- }
1006
-
1007
- @if (replyFile()) {
1008
- <div class="ax-message-reply-container">
1009
- <div class="file">
1010
- <i class="fa-regular fa-folder-open"></i>
1011
- {{ replyFile().name }}
1012
- </div>
1013
- </div>
1014
- }
1015
-
1016
- @if (replyAudio() || replyVoice()) {
1017
- <div class="ax-message-reply-container">{{ replyAudio().type }}</div>
1018
- }
1019
-
1020
- <div class="ax-text-message" [innerHtml]="_text()"></div>
1021
- `, encapsulation: ViewEncapsulation.None, inputs: ['message'], providers: [{ provide: AXComponent, useExisting: AXConversationTextMessageComponent }], styles: [".ax-text-message{word-break:normal;white-space:break-spaces}\n"] }]
1022
- }] });
1023
-
1024
- /**
1025
- * A component for displaying a video message with playback controls.
1026
- *
1027
- * @category Components
1028
- */
1029
- class AXConversationMessageVideoComponent extends AXConversationMessageBaseComponent {
1030
- constructor() {
1031
- super(...arguments);
1032
- /**
1033
- * @ignore
1034
- */
1035
- this._videoUrl = signal('', ...(ngDevMode ? [{ debugName: "_videoUrl" }] : []));
1036
- }
1037
- /**
1038
- * @ignore
1039
- */
1040
- ngOnInit() {
1041
- this._videoUrl.set(this.message?.content);
1042
- }
1043
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageVideoComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1044
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXConversationMessageVideoComponent, isStandalone: true, selector: "ax-conversation-message-video", providers: [{ provide: AXComponent, useExisting: AXConversationMessageVideoComponent }], usesInheritance: true, ngImport: i0, template: `<video controls [src]="_videoUrl()"></video>`, isInline: true, styles: ["video{width:100%;height:100%}\n"] }); }
1045
- }
1046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationMessageVideoComponent, decorators: [{
1047
- type: Component,
1048
- args: [{ selector: 'ax-conversation-message-video', template: `<video controls [src]="_videoUrl()"></video>`, providers: [{ provide: AXComponent, useExisting: AXConversationMessageVideoComponent }], styles: ["video{width:100%;height:100%}\n"] }]
1049
- }] });
1050
-
1051
- /**
1052
- * A component for displaying and handling audio messages in a conversation.
1053
- *
1054
- * @category Components
1055
- */
1056
- class AXConversationVoiceMessageComponent extends AXConversationMessageBaseComponent {
1057
- constructor() {
1058
- super(...arguments);
1059
- /**
1060
- * @ignore
1061
- */
1062
- this.config = { url: '' };
1063
- /**
1064
- * @ignore
1065
- */
1066
- this.audioState = signal('paused', ...(ngDevMode ? [{ debugName: "audioState" }] : []));
1067
- /**
1068
- * @ignore
1069
- */
1070
- this.parent = inject(AXConversationViewComponent);
1071
- this.platformID = inject(PLATFORM_ID);
1072
- /**
1073
- * @ignore
1074
- */
1075
- this.selectedRate = signal(1, ...(ngDevMode ? [{ debugName: "selectedRate" }] : []));
1076
- /**
1077
- * @ignore
1078
- */
1079
- this.selectedRateIndex = signal(1, ...(ngDevMode ? [{ debugName: "selectedRateIndex" }] : []));
1080
- /**
1081
- * @ignore
1082
- */
1083
- this.audioProgress = signal(0, ...(ngDevMode ? [{ debugName: "audioProgress" }] : []));
1084
- /**
1085
- * @ignore
1086
- */
1087
- this.timeLeft = signal(0, ...(ngDevMode ? [{ debugName: "timeLeft" }] : []));
1088
- /**
1089
- * @ignore
1090
- */
1091
- this.currentTime = signal(0, ...(ngDevMode ? [{ debugName: "currentTime" }] : []));
1092
- /**
1093
- * @ignore
1094
- */
1095
- this.duration = signal(0, ...(ngDevMode ? [{ debugName: "duration" }] : []));
1096
- this.#init = afterNextRender(() => {
1097
- this.config.url = this.message?.content;
1098
- this.config.audioRate = 0.25;
1099
- this.setWaveColor();
1100
- this.audio.onStatusChanged.subscribe((c) => {
1101
- this.parent.onAction.emit(c);
1102
- });
1103
- this.handleLoadingProgress();
1104
- });
1105
- }
1106
- #init;
1107
- /**
1108
- * @ignore
1109
- */
1110
- setWaveColor() {
1111
- let waveColor = '';
1112
- let progressColor = '';
1113
- if (isPlatformBrowser(this.platformID)) {
1114
- if (this.message.fromId) {
1115
- waveColor = getComputedStyle(document.body).getPropertyValue('--ax-message-other-bar-color');
1116
- progressColor = getComputedStyle(document.body).getPropertyValue('--ax-message-other-progress-color');
1117
- }
1118
- else {
1119
- waveColor = getComputedStyle(document.body).getPropertyValue('--ax-message-own-bar-color');
1120
- progressColor = getComputedStyle(document.body).getPropertyValue('--ax-message-own-progress-color');
1121
- }
1122
- }
1123
- this.config.waveColor = waveColor;
1124
- this.config.progressColor = progressColor;
1125
- }
1126
- /**
1127
- * Pauses the audio playback and updates the audio state to 'paused'.
1128
- * @ignore
1129
- */
1130
- handlePauseClick() {
1131
- this.audio?.pause();
1132
- this.audioState.set('paused');
1133
- }
1134
- /**
1135
- * Plays the audio and updates the audio state to 'playing'.
1136
- * @ignore
1137
- */
1138
- handlePlayClick() {
1139
- this.audio?.play()?.then(() => {
1140
- this.audioState.set('playing');
1141
- });
1142
- }
1143
- /**
1144
- * Updates audio state and progress based on status changes from the audio wave.
1145
- * @param e - The event containing status and data related to the audio.
1146
- * @ignore
1147
- */
1148
- handleOnStatusChanged(e) {
1149
- if (e.status === 'load' || e.status === 'loading') {
1150
- this.audioState.set('loading');
1151
- }
1152
- if (e.status === 'loading') {
1153
- this.audioProgress.set(e.data.percent);
1154
- this.duration.set(Math.ceil(e.data.duration * 1000));
1155
- }
1156
- if (e.status === 'ready') {
1157
- this.audioState.set('ready');
1158
- this.duration.set(Math.ceil(e.data.duration * 1000));
1159
- }
1160
- if (e.status === 'finish') {
1161
- this.audioState.set('paused');
1162
- }
1163
- if (e.status === 'timeupdate') {
1164
- this.timeLeft.set(this.duration() - e.data.currentTime * 1000);
1165
- this.currentTime.set(e.data.currentTime * 1000);
1166
- }
1167
- if (e.status === 'error') {
1168
- this.audioState.set('error');
1169
- }
1170
- }
1171
- /**
1172
- * @ignore
1173
- */
1174
- handleLoadingProgress() {
1175
- // this.audioLoaderProgress?.nativeElement.style.cssText = `--ax-audio-progress: ${this.audioProgress()}`;
1176
- }
1177
- /**
1178
- * Handles the cancellation of a loading operation.
1179
- * @ignore
1180
- */
1181
- handleCancelLoading() {
1182
- //
1183
- }
1184
- /**
1185
- * Reloads the audio and updates the state to 'loading'.
1186
- * @ignore
1187
- */
1188
- handleReloadClick() {
1189
- //
1190
- this.audioState.set('loading');
1191
- this.audio.load();
1192
- }
1193
- /**
1194
- * Cycles through predefined audio playback rates and updates the rate.
1195
- * @ignore
1196
- */
1197
- handleRateClick() {
1198
- const rates = [0.5, 1, 2, 4];
1199
- if (this.selectedRateIndex() == rates.length - 1) {
1200
- this.selectedRateIndex.set(0);
1201
- }
1202
- else {
1203
- this.selectedRateIndex.set(this.selectedRateIndex() + 1);
1204
- }
1205
- this.selectedRate.set(rates[this.selectedRateIndex()]);
1206
- this.audio.setRate(this.selectedRate());
1207
- }
1208
- /**
1209
- * @ignore
1210
- */
1211
- get __hostClass() {
1212
- return `${this.message.fromId ? 'ax-state-other' : 'ax-state-own'}`;
1213
- }
1214
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationVoiceMessageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1215
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationVoiceMessageComponent, isStandalone: true, selector: "ax-conversation-message-audio", inputs: { message: "message" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXConversationVoiceMessageComponent }], viewQueries: [{ propertyName: "audio", first: true, predicate: ["a"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-prefix>\n @switch (audioState()) {\n @case ('paused') {\n {{ currentTime() | format: 'time-duration' | async }}\n }\n @case ('playing') {\n {{ currentTime() | format: 'time-duration' | async }}\n }\n @default {\n {{ duration() | format: 'time-duration' | async }}\n }\n }\n <button class=\"ax-audio-speed\" (click)=\"handleRateClick()\"></button>\n</ax-prefix>\n<div class=\"ax-conversation-controller\">\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n\n @case ('ready') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n\n @case ('paused') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n\n @case ('error') {\n <button class=\"ax-state-error\" (click)=\"handleReloadClick()\">\n <i class=\"ax-icon ax-icon-reload\"></i>\n </button>\n }\n\n @default {\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner\n [size]=\"24\"\n [stroke]=\"2\"\n [color]=\"message.fromId ? 'white' : 'warning'\"\n ></ax-loading-spinner>\n </button>\n }\n }\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n<ax-suffix>\n <div class=\"ax-audio-rate-button\" [class.ax-state-own]=\"!message?.fromId\" (click)=\"handleRateClick()\">\n {{ selectedRate() }}X\n </div>\n</ax-suffix>\n", styles: ["ax-conversation-message-audio{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:18rem;max-width:100%}ax-conversation-message-audio .ax-audio-wave{flex:1}ax-conversation-message-audio .ax-audio-rate-button{background-color:var(--ax-comp-conversation-other-color-fore);color:var(--ax-comp-conversation-other-color);border-radius:.5rem;padding:0 .5rem;font-weight:700;margin-inline-end:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}ax-conversation-message-audio .ax-audio-rate-button.ax-state-own{background-color:var(--ax-comp-conversation-own-color-fore);color:var(--ax-comp-conversation-own-color)}ax-conversation-message-audio html[dir=rtl] ax-conversation-message-audio{flex-direction:row-reverse}\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXLoadingSpinnerComponent, selector: "ax-loading-spinner", inputs: ["text", "color", "size", "stroke"] }, { kind: "component", type: AXAudioWaveComponent, selector: "ax-audio-wave", inputs: ["config"], outputs: ["onStatusChanged"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXFormatPipe, name: "format" }], encapsulation: i0.ViewEncapsulation.None }); }
1216
- }
1217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationVoiceMessageComponent, decorators: [{
1218
- type: Component,
1219
- args: [{ selector: 'ax-conversation-message-audio', encapsulation: ViewEncapsulation.None, inputs: ['message'], imports: [AXDecoratorGenericComponent, AXLoadingSpinnerComponent, AXAudioWaveComponent, AsyncPipe, AXFormatPipe], providers: [{ provide: AXComponent, useExisting: AXConversationVoiceMessageComponent }], template: "<ax-prefix>\n @switch (audioState()) {\n @case ('paused') {\n {{ currentTime() | format: 'time-duration' | async }}\n }\n @case ('playing') {\n {{ currentTime() | format: 'time-duration' | async }}\n }\n @default {\n {{ duration() | format: 'time-duration' | async }}\n }\n }\n <button class=\"ax-audio-speed\" (click)=\"handleRateClick()\"></button>\n</ax-prefix>\n<div class=\"ax-conversation-controller\">\n @switch (audioState()) {\n @case ('playing') {\n <button (click)=\"handlePauseClick()\">\n <i class=\"ax-icon ax-icon-pause\"></i>\n </button>\n }\n\n @case ('ready') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n\n @case ('paused') {\n <button (click)=\"handlePlayClick()\">\n <i class=\"ax-icon ax-icon-play\"></i>\n </button>\n }\n\n @case ('error') {\n <button class=\"ax-state-error\" (click)=\"handleReloadClick()\">\n <i class=\"ax-icon ax-icon-reload\"></i>\n </button>\n }\n\n @default {\n <button (click)=\"handleCancelLoading()\">\n <ax-loading-spinner\n [size]=\"24\"\n [stroke]=\"2\"\n [color]=\"message.fromId ? 'white' : 'warning'\"\n ></ax-loading-spinner>\n </button>\n }\n }\n</div>\n<ax-audio-wave #a [config]=\"config\" (onStatusChanged)=\"handleOnStatusChanged($event)\"></ax-audio-wave>\n<ax-suffix>\n <div class=\"ax-audio-rate-button\" [class.ax-state-own]=\"!message?.fromId\" (click)=\"handleRateClick()\">\n {{ selectedRate() }}X\n </div>\n</ax-suffix>\n", styles: ["ax-conversation-message-audio{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:18rem;max-width:100%}ax-conversation-message-audio .ax-audio-wave{flex:1}ax-conversation-message-audio .ax-audio-rate-button{background-color:var(--ax-comp-conversation-other-color-fore);color:var(--ax-comp-conversation-other-color);border-radius:.5rem;padding:0 .5rem;font-weight:700;margin-inline-end:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}ax-conversation-message-audio .ax-audio-rate-button.ax-state-own{background-color:var(--ax-comp-conversation-own-color-fore);color:var(--ax-comp-conversation-own-color)}ax-conversation-message-audio html[dir=rtl] ax-conversation-message-audio{flex-direction:row-reverse}\n"] }]
1220
- }], propDecorators: { audio: [{
1221
- type: ViewChild,
1222
- args: ['a']
1223
- }], __hostClass: [{
1224
- type: HostBinding,
1225
- args: ['class']
1226
- }] } });
1227
-
1228
- const COMPONENT = [
1229
- AXConversationViewComponent,
1230
- AXConversationInputComponent,
1231
- AXConversationMessageComponent,
1232
- AXConversationTextMessageComponent,
1233
- AXConversationVoiceMessageComponent,
1234
- AXConversationFileMessageComponent,
1235
- AXConversationContainerComponent,
1236
- AXConversationMessageAudioComponent,
1237
- AXConversationMessageImageComponent,
1238
- AXConversationMessageVideoComponent,
1239
- ];
1240
- const MODULES = [
1241
- CommonModule,
1242
- FormsModule,
1243
- AsyncPipe,
1244
- AXRippleDirective,
1245
- AXButtonModule,
1246
- AXDecoratorModule,
1247
- AXTranslationModule,
1248
- AXDropdownModule,
1249
- AXFormatModule,
1250
- AXAudioWaveModule,
1251
- AXCircularProgressModule,
1252
- AXDateTimeModule,
1253
- CdkPortalOutlet,
1254
- AXLoadingModule,
1255
- AXAvatarModule,
1256
- AXPopoverModule,
1257
- AXFileModule,
1258
- AXRangeSliderModule,
1259
- AXVirtualScrollModule,
1260
- ];
1261
- class AXConversationModule {
1262
- static forRoot(config) {
1263
- return {
1264
- ngModule: AXConversationModule,
1265
- providers: [
1266
- {
1267
- provide: 'AXChatModuleFactory',
1268
- useFactory: (registry) => () => {
1269
- if (config?.types?.length) {
1270
- registry.register(...config.types);
1271
- }
1272
- registry.register({
1273
- name: 'text',
1274
- component: AXConversationTextMessageComponent,
1275
- });
1276
- registry.register({
1277
- name: 'voice',
1278
- component: AXConversationVoiceMessageComponent,
1279
- });
1280
- registry.register({
1281
- name: 'file',
1282
- component: AXConversationFileMessageComponent,
1283
- });
1284
- registry.register({
1285
- name: 'audio',
1286
- component: AXConversationMessageAudioComponent,
1287
- });
1288
- registry.register({
1289
- name: 'image',
1290
- component: AXConversationMessageImageComponent,
1291
- });
1292
- registry.register({
1293
- name: 'video',
1294
- component: AXConversationMessageVideoComponent,
1295
- });
1296
- },
1297
- deps: [AXConversationMessageTypeRegistryService],
1298
- multi: true,
1299
- },
1300
- ],
1301
- };
1302
- }
1303
- static forChild(config) {
1304
- return {
1305
- ngModule: AXConversationModule,
1306
- providers: [
1307
- {
1308
- provide: 'AXChatModuleFactory',
1309
- useFactory: (registry) => () => {
1310
- if (config?.types?.length) {
1311
- registry.register(...config.types);
1312
- }
1313
- },
1314
- deps: [AXConversationMessageTypeRegistryService],
1315
- multi: true,
1316
- },
1317
- ],
1318
- };
1319
- }
1320
- /**
1321
- * @ignore
1322
- */
1323
- constructor() {
1324
- const instances = inject('AXChatModuleFactory', { optional: true });
1325
- instances?.forEach((f) => {
1326
- f();
1327
- });
1328
- }
1329
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1330
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: AXConversationModule, imports: [CommonModule,
1331
- FormsModule,
1332
- AsyncPipe,
1333
- AXRippleDirective,
1334
- AXButtonModule,
1335
- AXDecoratorModule,
1336
- AXTranslationModule,
1337
- AXDropdownModule,
1338
- AXFormatModule,
1339
- AXAudioWaveModule,
1340
- AXCircularProgressModule,
1341
- AXDateTimeModule,
1342
- CdkPortalOutlet,
1343
- AXLoadingModule,
1344
- AXAvatarModule,
1345
- AXPopoverModule,
1346
- AXFileModule,
1347
- AXRangeSliderModule,
1348
- AXVirtualScrollModule, AXConversationViewComponent,
1349
- AXConversationInputComponent,
1350
- AXConversationMessageComponent,
1351
- AXConversationTextMessageComponent,
1352
- AXConversationVoiceMessageComponent,
1353
- AXConversationFileMessageComponent,
1354
- AXConversationContainerComponent,
1355
- AXConversationMessageAudioComponent,
1356
- AXConversationMessageImageComponent,
1357
- AXConversationMessageVideoComponent], exports: [AXConversationViewComponent,
1358
- AXConversationInputComponent,
1359
- AXConversationMessageComponent,
1360
- AXConversationTextMessageComponent,
1361
- AXConversationVoiceMessageComponent,
1362
- AXConversationFileMessageComponent,
1363
- AXConversationContainerComponent,
1364
- AXConversationMessageAudioComponent,
1365
- AXConversationMessageImageComponent,
1366
- AXConversationMessageVideoComponent] }); }
1367
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationModule, providers: [AXPopupService], imports: [CommonModule,
1368
- FormsModule,
1369
- AXButtonModule,
1370
- AXDecoratorModule,
1371
- AXTranslationModule,
1372
- AXDropdownModule,
1373
- AXFormatModule,
1374
- AXAudioWaveModule,
1375
- AXCircularProgressModule,
1376
- AXDateTimeModule,
1377
- AXLoadingModule,
1378
- AXAvatarModule,
1379
- AXPopoverModule,
1380
- AXFileModule,
1381
- AXRangeSliderModule,
1382
- AXVirtualScrollModule, AXConversationViewComponent,
1383
- AXConversationInputComponent,
1384
- AXConversationMessageComponent,
1385
- AXConversationVoiceMessageComponent,
1386
- AXConversationFileMessageComponent,
1387
- AXConversationMessageAudioComponent] }); }
1388
- }
1389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationModule, decorators: [{
1390
- type: NgModule,
1391
- args: [{
1392
- imports: [...MODULES, ...COMPONENT],
1393
- exports: [...COMPONENT],
1394
- providers: [AXPopupService],
1395
- }]
1396
- }], ctorParameters: () => [] });
1397
-
1398
- /**
1399
- * Generated bundle index. Do not edit.
1400
- */
1401
-
1402
- export { AXConversationActionEvent, AXConversationContainerComponent, AXConversationFileMessageComponent, AXConversationInputComponent, AXConversationMenuOpeningEvent, AXConversationMessageAction, AXConversationMessageAudioComponent, AXConversationMessageBaseComponent, AXConversationMessageComponent, AXConversationMessageImageComponent, AXConversationMessageVideoComponent, AXConversationModule, AXConversationTextMessageComponent, AXConversationViewComponent, AXConversationVoiceMessageComponent, AXRecordingService, ConversationMessageImagePopupComponent };
1
+ export { D as AXConversationAiResponderService, E as AXConversationApi, F as AXConversationBaseRegistry, G as AXConversationComposerActionRegistry, H as AXConversationComposerComponent, I as AXConversationComposerPopupComponent, o as AXConversationComposerService, J as AXConversationComposerTabRegistry, K as AXConversationContainerComponent, L as AXConversationContainerDirective, M as AXConversationDateUtilsService, N as AXConversationErrorHandlerService, O as AXConversationForwardMessageDialogComponent, P as AXConversationIndexedDbConversationApi, Q as AXConversationIndexedDbMessageAiApi, R as AXConversationIndexedDbMessageApi, S as AXConversationIndexedDbRealtimeApi, T as AXConversationIndexedDbStorage, U as AXConversationIndexedDbStores, V as AXConversationIndexedDbUserApi, W as AXConversationInfiniteScrollDirective, X as AXConversationInfoBarActionRegistry, Y as AXConversationInfoBarComponent, m as AXConversationInfoBarService, Z as AXConversationItemActionRegistry, _ as AXConversationMessageActionRegistry, $ as AXConversationMessageApi, a0 as AXConversationMessageListComponent, a1 as AXConversationMessageListNoActiveDefaultComponent, z as AXConversationMessageListService, a2 as AXConversationMessageRendererRegistry, e as AXConversationMessageUtilsService, a3 as AXConversationModule, a4 as AXConversationNewDialogComponent, a5 as AXConversationRealtimeApi, a6 as AXConversationRegistryService, A as AXConversationService, a7 as AXConversationSharedStorage, a8 as AXConversationSidebarComponent, a9 as AXConversationSidebarService, aa as AXConversationTabRegistry, ab as AXConversationUserApi, ac as AX_ALL_CONVERSATION_COMPOSER_TABS, ad as AX_ALL_CONVERSATION_MEDIA_PICKERS, ae as AX_CONVERSATION_AI_API_KEY, p as AX_CONVERSATION_AUDIO_CATALOG, af as AX_CONVERSATION_AUDIO_RENDERER, ag as AX_CONVERSATION_COMPOSER_AUDIO_ACTION, ah as AX_CONVERSATION_COMPOSER_EMOJI_ACTION, ai as AX_CONVERSATION_COMPOSER_EMOJI_TAB, aj as AX_CONVERSATION_COMPOSER_FILE_ACTION, ak as AX_CONVERSATION_COMPOSER_IMAGE_ACTION, al as AX_CONVERSATION_COMPOSER_LOCATION_ACTION, am as AX_CONVERSATION_COMPOSER_STICKER_TAB, an as AX_CONVERSATION_COMPOSER_VIDEO_ACTION, ao as AX_CONVERSATION_COMPOSER_VOICE_RECORDING_ACTION, ap as AX_CONVERSATION_CONFIG, aq as AX_CONVERSATION_CONNECTION_ERRORS, ar as AX_CONVERSATION_CONVERSATION_AVATAR_COMPONENT, as as AX_CONVERSATION_CURSOR_PREFIX, at as AX_CONVERSATION_DEFAULT_COMPOSER_ACTIONS, au as AX_CONVERSATION_DEFAULT_COMPOSER_TABS, av as AX_CONVERSATION_DEFAULT_CONVERSATION_ITEM_ACTIONS, aw as AX_CONVERSATION_DEFAULT_CONVERSATION_TABS, ax as AX_CONVERSATION_DEFAULT_INFO_BAR_ACTIONS, ay as AX_CONVERSATION_DEFAULT_MESSAGE_ACTIONS, az as AX_CONVERSATION_DEFAULT_MESSAGE_RENDERERS, aA as AX_CONVERSATION_ERRORS, aB as AX_CONVERSATION_ERROR_HANDLER_CONFIG, aC as AX_CONVERSATION_ERROR_MESSAGES, aD as AX_CONVERSATION_FALLBACK_RENDERER, q as AX_CONVERSATION_FILE_CATALOG, aE as AX_CONVERSATION_FILE_ERRORS, aF as AX_CONVERSATION_FILE_RENDERER, aG as AX_CONVERSATION_FILE_TYPES_READY, t as AX_CONVERSATION_IMAGE_CATALOG, aH as AX_CONVERSATION_IMAGE_RENDERER, aI as AX_CONVERSATION_INFO_BAR_ARCHIVE_ACTION, aJ as AX_CONVERSATION_INFO_BAR_BLOCK_ACTION, aK as AX_CONVERSATION_INFO_BAR_DELETE_ACTION, aL as AX_CONVERSATION_INFO_BAR_DIVIDER, aM as AX_CONVERSATION_INFO_BAR_MUTE_ACTION, aN as AX_CONVERSATION_INFO_BAR_SEARCH_ACTION, aO as AX_CONVERSATION_ITEM_BLOCK_ACTION, aP as AX_CONVERSATION_ITEM_DELETE_ACTION, aQ as AX_CONVERSATION_ITEM_DIVIDER, aR as AX_CONVERSATION_ITEM_MARK_READ_ACTION, aS as AX_CONVERSATION_ITEM_MUTE_ACTION, aT as AX_CONVERSATION_ITEM_PIN_ACTION, aU as AX_CONVERSATION_LOCATION_ERRORS, aV as AX_CONVERSATION_LOCATION_RENDERER, aW as AX_CONVERSATION_MESSAGE_CURSOR_PREFIX, aX as AX_CONVERSATION_MESSAGE_DELETE_ACTION, aY as AX_CONVERSATION_MESSAGE_EDIT_ACTION, aZ as AX_CONVERSATION_MESSAGE_ERRORS, a_ as AX_CONVERSATION_MESSAGE_FORWARD_ACTION, a$ as AX_CONVERSATION_MESSAGE_REPLY_ACTION, B as AX_CONVERSATION_MESSAGE_TYPE_FILE_TYPE, b0 as AX_CONVERSATION_REGISTRY_CONFIG, b1 as AX_CONVERSATION_STICKER_RENDERER, b2 as AX_CONVERSATION_SYSTEM_RENDERER, b3 as AX_CONVERSATION_TAB_ALL, b4 as AX_CONVERSATION_TAB_ARCHIVED, b5 as AX_CONVERSATION_TAB_BOT, b6 as AX_CONVERSATION_TAB_CHANNELS, b7 as AX_CONVERSATION_TAB_GROUPS, b8 as AX_CONVERSATION_TAB_PRIVATE, b9 as AX_CONVERSATION_TAB_UNREAD, ba as AX_CONVERSATION_TEXT_RENDERER, bb as AX_CONVERSATION_URL_ERRORS, bc as AX_CONVERSATION_USER_AVATAR_COMPONENT, bd as AX_CONVERSATION_USER_ERRORS, u as AX_CONVERSATION_VIDEO_CATALOG, be as AX_CONVERSATION_VIDEO_RENDERER, v as AX_CONVERSATION_VOICE_CATALOG, bf as AX_CONVERSATION_VOICE_RENDERER, bg as AX_DEFAULT_CONVERSATION_CONFIG, bh as applyConversationFilters, i as axConversationIndexedDbStorage, k as axConversationSharedStorage, l as copyWithFileTypeFallback, x as createResolvedMediaUrlSignal, bi as encodeConversationCursor, bj as encodeMessageCursor, bk as formatErrorMessage, bl as getConversationLastActivity, bm as getConversationMessagesNewestFirst, bn as getErrorMessage, bo as getSortedConversationsForInbox, bp as inferFileExtensionHintFromMessage, bq as isComposerTabEnabled, br as isGenericPrivateConversationTitle, bs as isMediaPickerEnabled, bt as mergeWithDefaults, bu as normalizeAllConversationMessageIndexes, n as normalizeImagePayload, bv as normalizeMessagePayload, bw as normalizeMessagePayloadAsync, bx as openWithFileType, by as paginateChatNewestFirst, bz as paginateChatOldestFirst, bA as parseChatCursor, y as pickDisplayMediaUrl, bB as provideConversation, bC as provideConversationComposerFileTypes, bD as provideConversationFileCatalog, j as registerChatMessage, bE as resolveConversationAvatarDisplay, bF as resolveConversationComposerTabs, bG as resolveConversationForViewer, bH as resolveConversationMediaPickers, C as resolveConversationMessageFileType, bI as resolveConversationTitleForViewer, d as resolveImageDisplayUrl, b as resolveParticipantProfile, bJ as resolvePrivatePeerParticipant, a as resolvePrivatePeerUserId, bK as resolveUserAvatarDisplay, bL as sanitizeInput, bM as shouldUseUserAvatarForConversation, bN as sortConversationMessageIds, w as toMediaItemUploaderReference, bO as unregisterChatMessage, bP as validateConversationId, bQ as validateEmail, bR as validateLatitude, bS as validateLongitude, bT as validateMessagePayload, bU as validateMessageText, bV as validateMessageType, bW as validateUrl, bX as validateUserId, bY as validateUserIds } from './acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs';
1403
2
  //# sourceMappingURL=acorex-components-conversation.mjs.map