@acorex/components 20.8.33 → 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.
- package/{conversation2 → conversation}/README.md +23 -23
- package/{conversation2 → conversation}/index.d.ts +991 -1792
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs +13711 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs +119 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs +59 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs +432 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs +177 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs +54 -0
- package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.mjs +101 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CYutyq7i.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs +100 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs +121 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs +84 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs +238 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs +1080 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs +102 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs +90 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
- package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs +44 -0
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs +64 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs +468 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs +125 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs +50 -0
- package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
- package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs +77 -0
- package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs +407 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs +83 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs +180 -0
- package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs +266 -0
- package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs +149 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs +118 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
- package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs +140 -0
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs +33 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs +172 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs +224 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs +81 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs +91 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs +537 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
- package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs +68 -0
- package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
- package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs +187 -0
- package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs +170 -0
- package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs +750 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs +103 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs +55 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs +109 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs +105 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs +62 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs +446 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs +181 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs +54 -0
- package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
- package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs +328 -0
- package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs +270 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +2 -0
- package/fesm2022/acorex-components-conversation.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/package.json +37 -37
- package/scheduler-picker/index.d.ts +2 -0
- package/fesm2022/acorex-components-conversation2.mjs +0 -22331
- package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { AXUploaderService } from '@acorex/cdk/uploader';
|
|
2
|
+
import * as i1 from '@acorex/components/progress-bar';
|
|
3
|
+
import { AXProgressBarModule } from '@acorex/components/progress-bar';
|
|
4
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
5
|
+
import { AXFileService, AXFileTypeRegistryService, runFileTypeUtilityForFile, runFileTypeUtility } from '@acorex/core/file';
|
|
6
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i0 from '@angular/core';
|
|
9
|
+
import { input, inject, PLATFORM_ID, signal, computed, Component } from '@angular/core';
|
|
10
|
+
import { o as AXConversationComposerService, p as AX_CONVERSATION_AUDIO_CATALOG } from './acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs';
|
|
11
|
+
import { A as AXConversationPickerHeaderComponent, a as AXConversationPickerFooterComponent } from './acorex-components-conversation-picker-header.component-BhTzlufI.mjs';
|
|
12
|
+
import { A as AXConversationPickerEmptyComponent, a as AXConversationPickerToolbarComponent, b as AXConversationPickerCaptionComponent, c as AXConversationPickerShellComponent } from './acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs';
|
|
13
|
+
import { s as seedPickerInitialFiles, l as limitFilesToCapacity, a as notifyMaxFilesCapacityExceeded, n as notifyPickerValidationErrors, u as uploadPickerFile, i as isUploadAborted, c as cleanupPickerUploads, p as pickerItemToUploadResult, d as dismissComposerPickerHost, g as getPickerCancelUploadLabel } from './acorex-components-conversation-picker-upload-C-PlKPaU.mjs';
|
|
14
|
+
import { audioItemFromUpload } from './acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs';
|
|
15
|
+
import { AX_CONVERSATION_AUDIO_PRESENTATION, createConversationAudioFileType } from './acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Audio Picker Component
|
|
19
|
+
* Full-width audio file selection interface for the composer
|
|
20
|
+
*/
|
|
21
|
+
class AXConversationAudioPickerComponent {
|
|
22
|
+
get composerService() {
|
|
23
|
+
const svc = this.service() ?? this.composerServiceFromInjector;
|
|
24
|
+
if (!svc) {
|
|
25
|
+
throw new Error('AXConversationComposerService is required for the audio picker');
|
|
26
|
+
}
|
|
27
|
+
return svc;
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
this.uploadsDismissed = false;
|
|
31
|
+
this.retainUploadedOnDismiss = false;
|
|
32
|
+
this.service = input(...(ngDevMode ? [undefined, { debugName: "service" }] : []));
|
|
33
|
+
this.composerServiceFromInjector = inject(AXConversationComposerService, { optional: true });
|
|
34
|
+
this.uploader = inject(AXUploaderService);
|
|
35
|
+
this.fileService = inject(AXFileService);
|
|
36
|
+
this.fileTypeRegistry = inject(AXFileTypeRegistryService);
|
|
37
|
+
this.platformId = inject(PLATFORM_ID);
|
|
38
|
+
this.toast = inject(AXToastService);
|
|
39
|
+
this.translation = inject(AXTranslationService);
|
|
40
|
+
this.conversation = input.required(...(ngDevMode ? [{ debugName: "conversation" }] : []));
|
|
41
|
+
this.maxFiles = input(10, ...(ngDevMode ? [{ debugName: "maxFiles" }] : []));
|
|
42
|
+
this.initialFiles = input([], ...(ngDevMode ? [{ debugName: "initialFiles" }] : []));
|
|
43
|
+
this.__popup__ = input(...(ngDevMode ? [undefined, { debugName: "__popup__" }] : []));
|
|
44
|
+
this.catalogFileType = AX_CONVERSATION_AUDIO_CATALOG;
|
|
45
|
+
this.audioFiles = signal([], ...(ngDevMode ? [{ debugName: "audioFiles" }] : []));
|
|
46
|
+
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
47
|
+
this.typeIconClass = AX_CONVERSATION_AUDIO_PRESENTATION.icon;
|
|
48
|
+
this.emptyIconClass = computed(() => this.isDragging() ? 'fa-light fa-cloud-arrow-up' : AX_CONVERSATION_AUDIO_PRESENTATION.icon, ...(ngDevMode ? [{ debugName: "emptyIconClass" }] : []));
|
|
49
|
+
this.caption = '';
|
|
50
|
+
this.allowMultiple = computed(() => this.maxFiles() > 1, ...(ngDevMode ? [{ debugName: "allowMultiple" }] : []));
|
|
51
|
+
this.fileTypeRegistry.registerTypes([createConversationAudioFileType()]);
|
|
52
|
+
seedPickerInitialFiles(this.initialFiles, (files) => this.handleFiles(files));
|
|
53
|
+
}
|
|
54
|
+
createUtilityContext() {
|
|
55
|
+
return {
|
|
56
|
+
readAsDataUrl: (file) => this.fileService.blobToBase64(file),
|
|
57
|
+
platformId: this.platformId,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async getCatalogFileTypeDef() {
|
|
61
|
+
this.catalogFileTypeDef ??= await this.fileService.getFileType(this.catalogFileType);
|
|
62
|
+
return this.catalogFileTypeDef;
|
|
63
|
+
}
|
|
64
|
+
async runUtility(name, file, ...args) {
|
|
65
|
+
const fileType = await this.getCatalogFileTypeDef();
|
|
66
|
+
if (!fileType)
|
|
67
|
+
return undefined;
|
|
68
|
+
return runFileTypeUtilityForFile(fileType, this.createUtilityContext(), file, name, ...args);
|
|
69
|
+
}
|
|
70
|
+
async handleFiles(files) {
|
|
71
|
+
const max = this.maxFiles();
|
|
72
|
+
const capacity = limitFilesToCapacity(files, this.audioFiles().length, max);
|
|
73
|
+
if (capacity.length < files.length) {
|
|
74
|
+
notifyMaxFilesCapacityExceeded(this.toast, this.translation, max);
|
|
75
|
+
}
|
|
76
|
+
if (capacity.length === 0) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const { accepted, rejected } = await this.uploader.validateFiles(capacity, this.catalogFileType);
|
|
80
|
+
notifyPickerValidationErrors(this.toast, this.translation, rejected);
|
|
81
|
+
for (const file of accepted) {
|
|
82
|
+
try {
|
|
83
|
+
const durationResult = await this.runUtility('duration', file);
|
|
84
|
+
const previewResult = await this.runUtility('preview', file);
|
|
85
|
+
const duration = typeof durationResult === 'number' ? durationResult : 0;
|
|
86
|
+
const dataUrl = typeof previewResult === 'string' ? previewResult : undefined;
|
|
87
|
+
let index = -1;
|
|
88
|
+
this.audioFiles.update((audios) => {
|
|
89
|
+
index = audios.length;
|
|
90
|
+
return [...audios, { file, duration, dataUrl, uploadProgress: 0, uploading: true }];
|
|
91
|
+
});
|
|
92
|
+
if (index >= 0) {
|
|
93
|
+
void this.uploadAudioAt(index, file);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Failed to process audio:', error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async uploadAudioAt(index, file) {
|
|
102
|
+
const abortController = new AbortController();
|
|
103
|
+
this.patchAudio(index, { abortController });
|
|
104
|
+
try {
|
|
105
|
+
const result = await uploadPickerFile(this.uploader, this.conversation().id, file, (progress) => this.patchAudio(index, { uploadProgress: progress, uploading: true }), abortController.signal);
|
|
106
|
+
this.patchAudio(index, {
|
|
107
|
+
uploadProgress: 100,
|
|
108
|
+
uploading: false,
|
|
109
|
+
uploaded: true,
|
|
110
|
+
uploadedUrl: result.url,
|
|
111
|
+
mediaId: result.mediaId,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (err) {
|
|
115
|
+
if (this.uploadsDismissed || isUploadAborted(err, abortController.signal)) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.patchAudio(index, {
|
|
119
|
+
uploading: false,
|
|
120
|
+
error: this.translation.translateSync('@acorex:chat.errors.upload-failed'),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
patchAudio(index, patch) {
|
|
125
|
+
if (this.uploadsDismissed) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.audioFiles.update((items) => {
|
|
129
|
+
const next = [...items];
|
|
130
|
+
if (next[index]) {
|
|
131
|
+
next[index] = { ...next[index], ...patch };
|
|
132
|
+
}
|
|
133
|
+
return next;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
removeAudio(index) {
|
|
137
|
+
const item = this.audioFiles()[index];
|
|
138
|
+
if (item) {
|
|
139
|
+
cleanupPickerUploads(this.uploader, [item]);
|
|
140
|
+
}
|
|
141
|
+
this.audioFiles.update((audios) => audios.filter((_, i) => i !== index));
|
|
142
|
+
}
|
|
143
|
+
async sendAudio() {
|
|
144
|
+
const audioList = this.audioFiles();
|
|
145
|
+
if (!this.canSend())
|
|
146
|
+
return;
|
|
147
|
+
const audios = audioList.flatMap((audio) => {
|
|
148
|
+
const result = pickerItemToUploadResult(audio);
|
|
149
|
+
return result ? [audioItemFromUpload(audio.file, result, audio.duration ?? 0)] : [];
|
|
150
|
+
});
|
|
151
|
+
if (audios.length === 0) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const command = {
|
|
155
|
+
conversationId: this.conversation().id,
|
|
156
|
+
type: 'audio',
|
|
157
|
+
payload: {
|
|
158
|
+
type: 'audio',
|
|
159
|
+
audios,
|
|
160
|
+
caption: this.caption.trim() || undefined,
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
this.retainUploadedOnDismiss = true;
|
|
164
|
+
const popup = this.__popup__();
|
|
165
|
+
this.dismissPicker();
|
|
166
|
+
dismissComposerPickerHost(this.composerService, popup);
|
|
167
|
+
void this.composerService.sendMessage(command).catch(() => {
|
|
168
|
+
this.retainUploadedOnDismiss = false;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
canSend() {
|
|
172
|
+
const list = this.audioFiles();
|
|
173
|
+
return list.length > 0 && list.every((a) => a.uploaded && !a.error && !a.uploading);
|
|
174
|
+
}
|
|
175
|
+
getUploadingLabel(progress) {
|
|
176
|
+
return this.translation.translateSync('@acorex:chat.pickers.files.uploading-progress', {
|
|
177
|
+
params: { progress },
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
getCancelUploadLabel() {
|
|
181
|
+
return getPickerCancelUploadLabel(this.translation);
|
|
182
|
+
}
|
|
183
|
+
cancel() {
|
|
184
|
+
this.dismissPicker();
|
|
185
|
+
dismissComposerPickerHost(this.composerService, this.__popup__());
|
|
186
|
+
}
|
|
187
|
+
ngOnDestroy() {
|
|
188
|
+
this.dismissPicker();
|
|
189
|
+
}
|
|
190
|
+
dismissPicker() {
|
|
191
|
+
if (this.uploadsDismissed) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this.uploadsDismissed = true;
|
|
195
|
+
const snapshot = [...this.audioFiles()];
|
|
196
|
+
cleanupPickerUploads(this.uploader, snapshot, {
|
|
197
|
+
retainUploaded: this.retainUploadedOnDismiss,
|
|
198
|
+
});
|
|
199
|
+
this.retainUploadedOnDismiss = false;
|
|
200
|
+
this.audioFiles.set([]);
|
|
201
|
+
this.caption = '';
|
|
202
|
+
}
|
|
203
|
+
formatFileSize(bytes) {
|
|
204
|
+
const fileType = this.catalogFileTypeDef;
|
|
205
|
+
const result = fileType
|
|
206
|
+
? runFileTypeUtility(fileType, this.createUtilityContext(), undefined, 'formatSize', bytes)
|
|
207
|
+
: undefined;
|
|
208
|
+
return typeof result === 'string' ? result : `${bytes} B`;
|
|
209
|
+
}
|
|
210
|
+
formatDuration(seconds) {
|
|
211
|
+
const fileType = this.catalogFileTypeDef;
|
|
212
|
+
const result = fileType
|
|
213
|
+
? runFileTypeUtility(fileType, this.createUtilityContext(), undefined, 'formatDuration', seconds)
|
|
214
|
+
: undefined;
|
|
215
|
+
return typeof result === 'string' ? result : '0:00';
|
|
216
|
+
}
|
|
217
|
+
getEmptyTitle() {
|
|
218
|
+
return this.isDragging()
|
|
219
|
+
? this.translation.translateSync('@acorex:chat.pickers.audio.drop-to-attach')
|
|
220
|
+
: this.translation.translateSync('@acorex:chat.pickers.audio.select');
|
|
221
|
+
}
|
|
222
|
+
getEmptySubtitle() {
|
|
223
|
+
return this.isDragging()
|
|
224
|
+
? this.translation.translateSync('@acorex:chat.pickers.common.release-to-upload')
|
|
225
|
+
: this.translation.translateSync('@acorex:chat.pickers.common.click-to-browse');
|
|
226
|
+
}
|
|
227
|
+
getSelectedCountText() {
|
|
228
|
+
return this.translation.translateSync('@acorex:chat.pickers.audio.selected-count', {
|
|
229
|
+
params: { count: this.audioFiles().length },
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
getSendText() {
|
|
233
|
+
return this.translation.translateSync('@acorex:chat.pickers.audio.send-count', {
|
|
234
|
+
params: { count: this.audioFiles().length },
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationAudioPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationAudioPickerComponent, isStandalone: true, selector: "ax-conversation-audio-picker", inputs: { service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null }, conversation: { classPropertyName: "conversation", publicName: "conversation", isSignal: true, isRequired: true, transformFunction: null }, maxFiles: { classPropertyName: "maxFiles", publicName: "maxFiles", isSignal: true, isRequired: false, transformFunction: null }, initialFiles: { classPropertyName: "initialFiles", publicName: "initialFiles", isSignal: true, isRequired: false, transformFunction: null }, __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
239
|
+
<ax-conversation-picker-shell
|
|
240
|
+
[fileType]="catalogFileType"
|
|
241
|
+
[multiple]="allowMultiple()"
|
|
242
|
+
(filesSelected)="handleFiles($event)"
|
|
243
|
+
(dragEnter)="isDragging.set(true)"
|
|
244
|
+
(dragLeave)="isDragging.set(false)"
|
|
245
|
+
>
|
|
246
|
+
<ax-conversation-picker-header [title]="translation.translateSync('@acorex:chat.pickers.audio.title')" (onClose)="cancel()" />
|
|
247
|
+
|
|
248
|
+
<div class="ax-conversation-picker__scroll">
|
|
249
|
+
@if (audioFiles().length === 0) {
|
|
250
|
+
<ax-conversation-picker-empty
|
|
251
|
+
[title]="getEmptyTitle()"
|
|
252
|
+
[hint]="getEmptySubtitle()"
|
|
253
|
+
[iconClass]="emptyIconClass()"
|
|
254
|
+
[dragOver]="isDragging()"
|
|
255
|
+
/>
|
|
256
|
+
} @else {
|
|
257
|
+
<div class="ax-conversation-picker__body">
|
|
258
|
+
<ax-conversation-picker-toolbar
|
|
259
|
+
[countLabel]="getSelectedCountText()"
|
|
260
|
+
[addMoreLabel]="translation.translateSync('@acorex:chat.pickers.common.add-more')"
|
|
261
|
+
/>
|
|
262
|
+
|
|
263
|
+
<div class="ax-conversation-picker__list">
|
|
264
|
+
@for (audio of audioFiles(); track $index) {
|
|
265
|
+
<div class="ax-conversation-picker__row">
|
|
266
|
+
<div class="ax-conversation-picker__thumb">
|
|
267
|
+
<i [class]="typeIconClass"></i>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="ax-conversation-picker__details">
|
|
270
|
+
<div class="ax-conversation-picker__name">{{ audio.file.name }}</div>
|
|
271
|
+
<div class="ax-conversation-picker__status">
|
|
272
|
+
@if (audio.uploading) {
|
|
273
|
+
<span>{{ getUploadingLabel(audio.uploadProgress ?? 0) }}</span>
|
|
274
|
+
} @else if (audio.uploaded) {
|
|
275
|
+
<span class="ax-conversation-picker__status--ok"
|
|
276
|
+
><i class="fa-light fa-check"></i>
|
|
277
|
+
{{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
|
|
278
|
+
>
|
|
279
|
+
} @else if (audio.error) {
|
|
280
|
+
<span class="ax-conversation-picker__status--err"
|
|
281
|
+
><i class="fa-light fa-xmark"></i> {{ audio.error }}</span
|
|
282
|
+
>
|
|
283
|
+
} @else {
|
|
284
|
+
<span>{{ formatFileSize(audio.file.size) }}</span>
|
|
285
|
+
@if (audio.duration) {
|
|
286
|
+
<span>{{ formatDuration(audio.duration) }}</span>
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
</div>
|
|
290
|
+
@if (audio.uploading || audio.uploaded) {
|
|
291
|
+
<div class="ax-conversation-picker__progress">
|
|
292
|
+
<ax-progress-bar [progress]="audio.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
|
|
293
|
+
</div>
|
|
294
|
+
}
|
|
295
|
+
</div>
|
|
296
|
+
<button
|
|
297
|
+
type="button"
|
|
298
|
+
class="ax-conversation-picker__remove"
|
|
299
|
+
(click)="removeAudio($index)"
|
|
300
|
+
[attr.aria-label]="
|
|
301
|
+
audio.uploading
|
|
302
|
+
? getCancelUploadLabel()
|
|
303
|
+
: translation.translateSync('@acorex:chat.pickers.common.remove')
|
|
304
|
+
"
|
|
305
|
+
>
|
|
306
|
+
<i class="fa-light fa-xmark"></i>
|
|
307
|
+
</button>
|
|
308
|
+
</div>
|
|
309
|
+
}
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
}
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<ax-conversation-picker-caption [(caption)]="caption" />
|
|
316
|
+
|
|
317
|
+
@if (audioFiles().length > 0) {
|
|
318
|
+
<ax-conversation-picker-footer
|
|
319
|
+
[sendText]="getSendText()"
|
|
320
|
+
[sendDisabled]="!canSend()"
|
|
321
|
+
(onCancel)="cancel()"
|
|
322
|
+
(onSend)="sendAudio()"
|
|
323
|
+
/>
|
|
324
|
+
}
|
|
325
|
+
</ax-conversation-picker-shell>
|
|
326
|
+
`, isInline: true, styles: [":host{display:block;width:100%;max-width:100%;min-height:0}.ax-conversation-picker__scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.ax-conversation-picker__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;min-height:8.5rem;margin:.75rem;padding:1rem .75rem;border:1px dashed rgb(var(--ax-sys-color-border-surface));border-radius:var(--ax-sys-border-radius, .5rem);cursor:pointer;transition:border-color .15s ease,background-color .15s ease;text-align:center;touch-action:manipulation}.ax-conversation-picker__empty:hover,.ax-conversation-picker__empty--drag{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06)}.ax-conversation-picker__empty-icon{font-size:1.75rem;line-height:1;color:rgba(var(--ax-sys-color-on-surface),.55)}.ax-conversation-picker__empty-title{margin:0;font-size:.8125rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.ax-conversation-picker__empty-hint{margin:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6)}.ax-conversation-picker__body{padding:0 .75rem .75rem}.ax-conversation-picker__list{display:flex;flex-direction:column;gap:.5rem;padding-top:.5rem}.ax-conversation-picker__row{display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .375rem);background:rgb(var(--ax-sys-color-surface));transition:background-color .15s ease}@media (hover: hover){.ax-conversation-picker__row:hover{background:rgb(var(--ax-sys-color-light-surface))}}.ax-conversation-picker__thumb{position:relative;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.08);color:rgb(var(--ax-sys-color-primary-500));font-size:1.125rem;overflow:hidden}.ax-conversation-picker__thumb img,.ax-conversation-picker__thumb video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.ax-conversation-picker__thumb-badge{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#00000052;color:rgb(var(--ax-sys-color-light));font-size:.625rem;pointer-events:none}.ax-conversation-picker__details{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.ax-conversation-picker__name{font-size:.8125rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-conversation-picker__status{display:flex;flex-wrap:wrap;gap:.375rem;font-size:.6875rem;color:rgba(var(--ax-sys-color-on-surface),.65)}.ax-conversation-picker__status--ok{color:rgb(var(--ax-sys-color-success-600));font-weight:500}.ax-conversation-picker__status--err{color:rgb(var(--ax-sys-color-danger-600));font-weight:500}.ax-conversation-picker__progress{width:100%;margin-top:.125rem}.ax-conversation-picker__remove{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;flex-shrink:0;border:none;border-radius:var(--ax-sys-border-radius, .25rem);background:transparent;color:rgba(var(--ax-sys-color-on-surface),.55);font-size:1rem;cursor:pointer;touch-action:manipulation;transition:background-color .15s ease,color .15s ease}.ax-conversation-picker__remove:hover,.ax-conversation-picker__remove:focus-visible{background:rgba(var(--ax-sys-color-danger-500),.1);color:rgb(var(--ax-sys-color-danger-500));outline:none}.ax-conversation-picker__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.25rem,1fr));gap:.5rem}.ax-conversation-picker__tile{position:relative;aspect-ratio:1;border-radius:var(--ax-sys-border-radius, .375rem);overflow:hidden;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-light-surface))}.ax-conversation-picker__tile img{width:100%;height:100%;object-fit:cover;display:block}.ax-conversation-picker__tile-remove{position:absolute;top:.25rem;inset-inline-end:.25rem;z-index:2;display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:50%;background:rgb(var(--ax-sys-color-danger-500));color:rgb(var(--ax-sys-color-light));font-size:.6875rem;cursor:pointer;touch-action:manipulation;box-shadow:0 1px 3px #0003}.ax-conversation-picker__tile-overlay{position:absolute;inset-inline:0;bottom:0;padding:.25rem;background:linear-gradient(transparent,#0000008c)}.ax-conversation-picker__tile-status{font-size:.625rem;color:rgb(var(--ax-sys-color-light));line-height:1.2}.ax-conversation-picker__caption-slot{flex-shrink:0;padding:.5rem .75rem;border-top:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.ax-conversation-picker__input-hidden{display:none}@container picker (max-width: 480px){.ax-conversation-picker__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.375rem}.ax-conversation-picker__row{padding:.4375rem .5rem;gap:.5rem}.ax-conversation-picker__thumb{width:2.25rem;height:2.25rem}.ax-conversation-picker__empty{min-height:7.5rem;margin:.5rem}.ax-conversation-picker__body{padding-inline:.5rem;padding-bottom:.5rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXProgressBarModule }, { kind: "component", type: i1.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXConversationPickerHeaderComponent, selector: "ax-conversation-picker-header", inputs: ["title"], outputs: ["onClose"] }, { kind: "component", type: AXConversationPickerFooterComponent, selector: "ax-conversation-picker-footer", inputs: ["sendText", "sendDisabled"], outputs: ["onCancel", "onSend"] }, { kind: "component", type: AXConversationPickerEmptyComponent, selector: "ax-conversation-picker-empty", inputs: ["title", "hint", "iconClass", "dragOver"] }, { kind: "component", type: AXConversationPickerToolbarComponent, selector: "ax-conversation-picker-toolbar", inputs: ["countLabel", "addMoreLabel"] }, { kind: "component", type: AXConversationPickerCaptionComponent, selector: "ax-conversation-picker-caption", inputs: ["caption"], outputs: ["captionChange"] }, { kind: "component", type: AXConversationPickerShellComponent, selector: "ax-conversation-picker-shell", inputs: ["fileType", "multiple"], outputs: ["filesSelected", "dragEnter", "dragLeave", "dragOver"] }] }); }
|
|
327
|
+
}
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationAudioPickerComponent, decorators: [{
|
|
329
|
+
type: Component,
|
|
330
|
+
args: [{ selector: 'ax-conversation-audio-picker', imports: [
|
|
331
|
+
CommonModule,
|
|
332
|
+
AXProgressBarModule,
|
|
333
|
+
AXTranslationModule,
|
|
334
|
+
AXConversationPickerHeaderComponent,
|
|
335
|
+
AXConversationPickerFooterComponent,
|
|
336
|
+
AXConversationPickerEmptyComponent,
|
|
337
|
+
AXConversationPickerToolbarComponent,
|
|
338
|
+
AXConversationPickerCaptionComponent,
|
|
339
|
+
AXConversationPickerShellComponent,
|
|
340
|
+
], template: `
|
|
341
|
+
<ax-conversation-picker-shell
|
|
342
|
+
[fileType]="catalogFileType"
|
|
343
|
+
[multiple]="allowMultiple()"
|
|
344
|
+
(filesSelected)="handleFiles($event)"
|
|
345
|
+
(dragEnter)="isDragging.set(true)"
|
|
346
|
+
(dragLeave)="isDragging.set(false)"
|
|
347
|
+
>
|
|
348
|
+
<ax-conversation-picker-header [title]="translation.translateSync('@acorex:chat.pickers.audio.title')" (onClose)="cancel()" />
|
|
349
|
+
|
|
350
|
+
<div class="ax-conversation-picker__scroll">
|
|
351
|
+
@if (audioFiles().length === 0) {
|
|
352
|
+
<ax-conversation-picker-empty
|
|
353
|
+
[title]="getEmptyTitle()"
|
|
354
|
+
[hint]="getEmptySubtitle()"
|
|
355
|
+
[iconClass]="emptyIconClass()"
|
|
356
|
+
[dragOver]="isDragging()"
|
|
357
|
+
/>
|
|
358
|
+
} @else {
|
|
359
|
+
<div class="ax-conversation-picker__body">
|
|
360
|
+
<ax-conversation-picker-toolbar
|
|
361
|
+
[countLabel]="getSelectedCountText()"
|
|
362
|
+
[addMoreLabel]="translation.translateSync('@acorex:chat.pickers.common.add-more')"
|
|
363
|
+
/>
|
|
364
|
+
|
|
365
|
+
<div class="ax-conversation-picker__list">
|
|
366
|
+
@for (audio of audioFiles(); track $index) {
|
|
367
|
+
<div class="ax-conversation-picker__row">
|
|
368
|
+
<div class="ax-conversation-picker__thumb">
|
|
369
|
+
<i [class]="typeIconClass"></i>
|
|
370
|
+
</div>
|
|
371
|
+
<div class="ax-conversation-picker__details">
|
|
372
|
+
<div class="ax-conversation-picker__name">{{ audio.file.name }}</div>
|
|
373
|
+
<div class="ax-conversation-picker__status">
|
|
374
|
+
@if (audio.uploading) {
|
|
375
|
+
<span>{{ getUploadingLabel(audio.uploadProgress ?? 0) }}</span>
|
|
376
|
+
} @else if (audio.uploaded) {
|
|
377
|
+
<span class="ax-conversation-picker__status--ok"
|
|
378
|
+
><i class="fa-light fa-check"></i>
|
|
379
|
+
{{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
|
|
380
|
+
>
|
|
381
|
+
} @else if (audio.error) {
|
|
382
|
+
<span class="ax-conversation-picker__status--err"
|
|
383
|
+
><i class="fa-light fa-xmark"></i> {{ audio.error }}</span
|
|
384
|
+
>
|
|
385
|
+
} @else {
|
|
386
|
+
<span>{{ formatFileSize(audio.file.size) }}</span>
|
|
387
|
+
@if (audio.duration) {
|
|
388
|
+
<span>{{ formatDuration(audio.duration) }}</span>
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
</div>
|
|
392
|
+
@if (audio.uploading || audio.uploaded) {
|
|
393
|
+
<div class="ax-conversation-picker__progress">
|
|
394
|
+
<ax-progress-bar [progress]="audio.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
|
|
395
|
+
</div>
|
|
396
|
+
}
|
|
397
|
+
</div>
|
|
398
|
+
<button
|
|
399
|
+
type="button"
|
|
400
|
+
class="ax-conversation-picker__remove"
|
|
401
|
+
(click)="removeAudio($index)"
|
|
402
|
+
[attr.aria-label]="
|
|
403
|
+
audio.uploading
|
|
404
|
+
? getCancelUploadLabel()
|
|
405
|
+
: translation.translateSync('@acorex:chat.pickers.common.remove')
|
|
406
|
+
"
|
|
407
|
+
>
|
|
408
|
+
<i class="fa-light fa-xmark"></i>
|
|
409
|
+
</button>
|
|
410
|
+
</div>
|
|
411
|
+
}
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
}
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<ax-conversation-picker-caption [(caption)]="caption" />
|
|
418
|
+
|
|
419
|
+
@if (audioFiles().length > 0) {
|
|
420
|
+
<ax-conversation-picker-footer
|
|
421
|
+
[sendText]="getSendText()"
|
|
422
|
+
[sendDisabled]="!canSend()"
|
|
423
|
+
(onCancel)="cancel()"
|
|
424
|
+
(onSend)="sendAudio()"
|
|
425
|
+
/>
|
|
426
|
+
}
|
|
427
|
+
</ax-conversation-picker-shell>
|
|
428
|
+
`, styles: [":host{display:block;width:100%;max-width:100%;min-height:0}.ax-conversation-picker__scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.ax-conversation-picker__empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;min-height:8.5rem;margin:.75rem;padding:1rem .75rem;border:1px dashed rgb(var(--ax-sys-color-border-surface));border-radius:var(--ax-sys-border-radius, .5rem);cursor:pointer;transition:border-color .15s ease,background-color .15s ease;text-align:center;touch-action:manipulation}.ax-conversation-picker__empty:hover,.ax-conversation-picker__empty--drag{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06)}.ax-conversation-picker__empty-icon{font-size:1.75rem;line-height:1;color:rgba(var(--ax-sys-color-on-surface),.55)}.ax-conversation-picker__empty-title{margin:0;font-size:.8125rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.ax-conversation-picker__empty-hint{margin:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6)}.ax-conversation-picker__body{padding:0 .75rem .75rem}.ax-conversation-picker__list{display:flex;flex-direction:column;gap:.5rem;padding-top:.5rem}.ax-conversation-picker__row{display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .375rem);background:rgb(var(--ax-sys-color-surface));transition:background-color .15s ease}@media (hover: hover){.ax-conversation-picker__row:hover{background:rgb(var(--ax-sys-color-light-surface))}}.ax-conversation-picker__thumb{position:relative;display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.08);color:rgb(var(--ax-sys-color-primary-500));font-size:1.125rem;overflow:hidden}.ax-conversation-picker__thumb img,.ax-conversation-picker__thumb video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.ax-conversation-picker__thumb-badge{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#00000052;color:rgb(var(--ax-sys-color-light));font-size:.625rem;pointer-events:none}.ax-conversation-picker__details{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.ax-conversation-picker__name{font-size:.8125rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ax-conversation-picker__status{display:flex;flex-wrap:wrap;gap:.375rem;font-size:.6875rem;color:rgba(var(--ax-sys-color-on-surface),.65)}.ax-conversation-picker__status--ok{color:rgb(var(--ax-sys-color-success-600));font-weight:500}.ax-conversation-picker__status--err{color:rgb(var(--ax-sys-color-danger-600));font-weight:500}.ax-conversation-picker__progress{width:100%;margin-top:.125rem}.ax-conversation-picker__remove{display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;flex-shrink:0;border:none;border-radius:var(--ax-sys-border-radius, .25rem);background:transparent;color:rgba(var(--ax-sys-color-on-surface),.55);font-size:1rem;cursor:pointer;touch-action:manipulation;transition:background-color .15s ease,color .15s ease}.ax-conversation-picker__remove:hover,.ax-conversation-picker__remove:focus-visible{background:rgba(var(--ax-sys-color-danger-500),.1);color:rgb(var(--ax-sys-color-danger-500));outline:none}.ax-conversation-picker__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.25rem,1fr));gap:.5rem}.ax-conversation-picker__tile{position:relative;aspect-ratio:1;border-radius:var(--ax-sys-border-radius, .375rem);overflow:hidden;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-light-surface))}.ax-conversation-picker__tile img{width:100%;height:100%;object-fit:cover;display:block}.ax-conversation-picker__tile-remove{position:absolute;top:.25rem;inset-inline-end:.25rem;z-index:2;display:flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:50%;background:rgb(var(--ax-sys-color-danger-500));color:rgb(var(--ax-sys-color-light));font-size:.6875rem;cursor:pointer;touch-action:manipulation;box-shadow:0 1px 3px #0003}.ax-conversation-picker__tile-overlay{position:absolute;inset-inline:0;bottom:0;padding:.25rem;background:linear-gradient(transparent,#0000008c)}.ax-conversation-picker__tile-status{font-size:.625rem;color:rgb(var(--ax-sys-color-light));line-height:1.2}.ax-conversation-picker__caption-slot{flex-shrink:0;padding:.5rem .75rem;border-top:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.ax-conversation-picker__input-hidden{display:none}@container picker (max-width: 480px){.ax-conversation-picker__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.375rem}.ax-conversation-picker__row{padding:.4375rem .5rem;gap:.5rem}.ax-conversation-picker__thumb{width:2.25rem;height:2.25rem}.ax-conversation-picker__empty{min-height:7.5rem;margin:.5rem}.ax-conversation-picker__body{padding-inline:.5rem;padding-bottom:.5rem}}\n"] }]
|
|
429
|
+
}], ctorParameters: () => [] });
|
|
430
|
+
|
|
431
|
+
export { AXConversationAudioPickerComponent };
|
|
432
|
+
//# sourceMappingURL=acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs.map
|