@acorex/components 21.0.3-next.38 → 21.0.3-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{conversation2 → conversation}/README.md +23 -23
- package/fesm2022/acorex-components-button.mjs +4 -4
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +13711 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +119 -0
- package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +59 -0
- package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +432 -0
- package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +177 -0
- package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +54 -0
- package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs +101 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +100 -0
- package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +121 -0
- package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +84 -0
- package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +238 -0
- package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +1080 -0
- package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +102 -0
- package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +90 -0
- package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.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-CYh_6O6j.mjs +44 -0
- package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +64 -0
- package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +468 -0
- package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +125 -0
- package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +50 -0
- package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.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-CLMGxXPl.mjs +77 -0
- package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +407 -0
- package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +83 -0
- package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +184 -0
- package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +266 -0
- package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +149 -0
- package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +118 -0
- package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.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-DbWUl6M2.mjs +140 -0
- package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +33 -0
- package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +172 -0
- package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs +224 -0
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +81 -0
- package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +91 -0
- package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +537 -0
- package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.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-D8FFKde6.mjs +68 -0
- package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.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-B-nc6xiA.mjs +187 -0
- package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +170 -0
- package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +750 -0
- package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +103 -0
- package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +55 -0
- package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +109 -0
- package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +105 -0
- package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +62 -0
- package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +446 -0
- package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +181 -0
- package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +54 -0
- package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.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-D_rdANZN.mjs +344 -0
- package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +270 -0
- package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.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-kbd.mjs +2 -2
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +2 -2
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/package.json +6 -6
- package/types/{acorex-components-conversation2.d.ts → acorex-components-conversation.d.ts} +1127 -1928
- package/types/acorex-components-scheduler-picker.d.ts +2 -0
- package/fesm2022/acorex-components-conversation2.mjs +0 -22347
- package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { normalizeVideoPayload } from './acorex-components-conversation-video.payload-C8QaqxuX.mjs';
|
|
2
|
+
import { s as resolvePersistableMediaUrl, c as resolvePersistedThumbnailUrl } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
3
|
+
|
|
4
|
+
function videoItemFromUpload(file, result, duration) {
|
|
5
|
+
const url = resolvePersistableMediaUrl(result.url);
|
|
6
|
+
const item = {
|
|
7
|
+
mediaId: result.mediaId,
|
|
8
|
+
mimeType: result.mimeType,
|
|
9
|
+
size: result.size,
|
|
10
|
+
thumbnailUrl: resolvePersistedThumbnailUrl(result.thumbnailUrl, url),
|
|
11
|
+
duration,
|
|
12
|
+
width: 0,
|
|
13
|
+
height: 0,
|
|
14
|
+
metadata: result.metadata,
|
|
15
|
+
};
|
|
16
|
+
if (url) {
|
|
17
|
+
item.url = url;
|
|
18
|
+
}
|
|
19
|
+
return item;
|
|
20
|
+
}
|
|
21
|
+
function mergeVideoUploadResult(payload, result) {
|
|
22
|
+
const base = normalizeVideoPayload(payload);
|
|
23
|
+
const videos = [...base.videos];
|
|
24
|
+
const i = videos.findIndex((x) => !x.mediaId && !resolvePersistableMediaUrl(x.url));
|
|
25
|
+
const slot = i >= 0 ? videos[i] : undefined;
|
|
26
|
+
const url = resolvePersistableMediaUrl(result.url);
|
|
27
|
+
const next = {
|
|
28
|
+
...(slot ?? { duration: 0, width: 0, height: 0 }),
|
|
29
|
+
mediaId: result.mediaId,
|
|
30
|
+
mimeType: result.mimeType,
|
|
31
|
+
size: result.size,
|
|
32
|
+
thumbnailUrl: resolvePersistedThumbnailUrl(result.thumbnailUrl ?? slot?.thumbnailUrl, url),
|
|
33
|
+
metadata: result.metadata,
|
|
34
|
+
};
|
|
35
|
+
if (url) {
|
|
36
|
+
next.url = url;
|
|
37
|
+
}
|
|
38
|
+
if (i >= 0)
|
|
39
|
+
videos[i] = next;
|
|
40
|
+
else
|
|
41
|
+
videos.push(next);
|
|
42
|
+
return { ...base, type: 'video', videos };
|
|
43
|
+
}
|
|
44
|
+
function applyVideoLocalPreview(payload, localUrl, mimeType = 'application/octet-stream') {
|
|
45
|
+
const base = normalizeVideoPayload(payload);
|
|
46
|
+
const videos = [...base.videos];
|
|
47
|
+
const slot = videos.findIndex((x) => !x.mediaId && !resolvePersistableMediaUrl(x.url));
|
|
48
|
+
const preview = { url: localUrl, duration: 0, width: 0, height: 0, mimeType };
|
|
49
|
+
if (slot >= 0) {
|
|
50
|
+
videos[slot] = { ...videos[slot], ...preview };
|
|
51
|
+
}
|
|
52
|
+
else if (videos.length === 0) {
|
|
53
|
+
videos.push(preview);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
videos[0] = { ...videos[0], ...preview };
|
|
57
|
+
}
|
|
58
|
+
return { ...base, type: 'video', videos };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { applyVideoLocalPreview, mergeVideoUploadResult, videoItemFromUpload };
|
|
62
|
+
//# sourceMappingURL=acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-components-conversation-video-composer.payload-DMqRkafr.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/video-picker/video-composer.payload.ts"],"sourcesContent":["import type { AXUploadResult } from '@acorex/cdk/uploader';\nimport type { AXConversationMessagePayload, AXConversationVideoMediaItem, AXConversationVideoPayload } from '../../../../models';\nimport type { AXConversationUploaderResult } from '../../../../models/conversation-upload.types';\nimport { normalizeVideoPayload } from '../../../message-list/components/video-renderer/video.payload';\nimport { resolvePersistableMediaUrl, resolvePersistedThumbnailUrl } from '../shared/persisted-media-url';\n\nexport function videoItemFromUpload(\n file: File,\n result: AXConversationUploaderResult,\n duration: number,\n): AXConversationVideoMediaItem {\n const url = resolvePersistableMediaUrl(result.url);\n const item: AXConversationVideoMediaItem = {\n mediaId: result.mediaId,\n mimeType: result.mimeType,\n size: result.size,\n thumbnailUrl: resolvePersistedThumbnailUrl(result.thumbnailUrl, url),\n duration,\n width: 0,\n height: 0,\n metadata: result.metadata,\n };\n if (url) {\n item.url = url;\n }\n return item;\n}\n\nexport function mergeVideoUploadResult(\n payload: AXConversationMessagePayload,\n result: AXUploadResult,\n): AXConversationMessagePayload {\n const base = normalizeVideoPayload(payload as AXConversationVideoPayload);\n const videos = [...base.videos];\n const i = videos.findIndex((x) => !x.mediaId && !resolvePersistableMediaUrl(x.url));\n const slot = i >= 0 ? videos[i] : undefined;\n const url = resolvePersistableMediaUrl(result.url);\n const next: AXConversationVideoMediaItem = {\n ...(slot ?? { duration: 0, width: 0, height: 0 }),\n mediaId: result.mediaId,\n mimeType: result.mimeType,\n size: result.size,\n thumbnailUrl: resolvePersistedThumbnailUrl(result.thumbnailUrl ?? slot?.thumbnailUrl, url),\n metadata: result.metadata,\n };\n if (url) {\n next.url = url;\n }\n if (i >= 0) videos[i] = next;\n else videos.push(next);\n return { ...base, type: 'video', videos };\n}\n\nexport function applyVideoLocalPreview(\n payload: AXConversationMessagePayload,\n localUrl: string,\n mimeType = 'application/octet-stream',\n): AXConversationMessagePayload {\n const base = normalizeVideoPayload(payload as AXConversationVideoPayload);\n const videos = [...base.videos];\n const slot = videos.findIndex((x) => !x.mediaId && !resolvePersistableMediaUrl(x.url));\n const preview = { url: localUrl, duration: 0, width: 0, height: 0, mimeType };\n if (slot >= 0) {\n videos[slot] = { ...videos[slot], ...preview };\n } else if (videos.length === 0) {\n videos.push(preview);\n } else {\n videos[0] = { ...videos[0], ...preview };\n }\n return { ...base, type: 'video', videos };\n}\n"],"names":[],"mappings":";;;SAMgB,mBAAmB,CACjC,IAAU,EACV,MAAoC,EACpC,QAAgB,EAAA;IAEhB,MAAM,GAAG,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAAG,CAAC;AAClD,IAAA,MAAM,IAAI,GAAiC;QACzC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,YAAY,EAAE,4BAA4B,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QACpE,QAAQ;AACR,QAAA,KAAK,EAAE,CAAC;AACR,QAAA,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B;IACD,IAAI,GAAG,EAAE;AACP,QAAA,IAAI,CAAC,GAAG,GAAG,GAAG;IAChB;AACA,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,sBAAsB,CACpC,OAAqC,EACrC,MAAsB,EAAA;AAEtB,IAAA,MAAM,IAAI,GAAG,qBAAqB,CAAC,OAAqC,CAAC;IACzE,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IAC/B,MAAM,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACnF,IAAA,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS;IAC3C,MAAM,GAAG,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAAG,CAAC;AAClD,I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CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,EAAE;IAChD;AAAO,SAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AAC9B,QAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IACtB;SAAO;AACL,QAAA,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE;IAC1C;IACA,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAC3C;;;;"}
|
|
@@ -0,0 +1,446 @@
|
|
|
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, u as AX_CONVERSATION_VIDEO_CATALOG } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
|
|
11
|
+
import { A as AXConversationPickerHeaderComponent, a as AXConversationPickerFooterComponent } from './acorex-components-conversation-picker-header.component-BneIFjXq.mjs';
|
|
12
|
+
import { A as AXConversationPickerEmptyComponent, a as AXConversationPickerToolbarComponent, b as AXConversationPickerCaptionComponent, c as AXConversationPickerShellComponent } from './acorex-components-conversation-picker-toolbar.component-BthRvEeE.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 { AX_CONVERSATION_VIDEO_PRESENTATION, createConversationVideoFileType } from './acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs';
|
|
15
|
+
import { videoItemFromUpload } from './acorex-components-conversation-video-composer.payload-DMqRkafr.mjs';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Video Picker Component
|
|
19
|
+
* Full-width video selection and preview interface for the composer
|
|
20
|
+
*/
|
|
21
|
+
class AXConversationVideoPickerComponent {
|
|
22
|
+
get composerService() {
|
|
23
|
+
const svc = this.service() ?? this.composerServiceFromInjector;
|
|
24
|
+
if (!svc) {
|
|
25
|
+
throw new Error('AXConversationComposerService is required for the video picker');
|
|
26
|
+
}
|
|
27
|
+
return svc;
|
|
28
|
+
}
|
|
29
|
+
constructor() {
|
|
30
|
+
this.uploadsDismissed = false;
|
|
31
|
+
this.retainUploadedOnDismiss = false;
|
|
32
|
+
this.service = input(...(ngDevMode ? [undefined, { debugName: "service" }] : /* istanbul ignore next */ []));
|
|
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" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.maxFiles = input(10, ...(ngDevMode ? [{ debugName: "maxFiles" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.initialFiles = input([], ...(ngDevMode ? [{ debugName: "initialFiles" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this.__popup__ = input(...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
|
|
44
|
+
this.catalogFileType = AX_CONVERSATION_VIDEO_CATALOG;
|
|
45
|
+
this.videos = signal([], ...(ngDevMode ? [{ debugName: "videos" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
|
|
47
|
+
this.caption = '';
|
|
48
|
+
this.allowMultiple = computed(() => this.maxFiles() > 1, ...(ngDevMode ? [{ debugName: "allowMultiple" }] : /* istanbul ignore next */ []));
|
|
49
|
+
this.typeIconClass = AX_CONVERSATION_VIDEO_PRESENTATION.icon;
|
|
50
|
+
this.emptyIconClass = computed(() => this.isDragging() ? 'fa-light fa-cloud-arrow-up' : AX_CONVERSATION_VIDEO_PRESENTATION.icon, ...(ngDevMode ? [{ debugName: "emptyIconClass" }] : /* istanbul ignore next */ []));
|
|
51
|
+
this.fileTypeRegistry.registerTypes([createConversationVideoFileType()]);
|
|
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.videos().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 previewResult = await this.runUtility('preview', file);
|
|
84
|
+
const durationResult = await this.runUtility('duration', file);
|
|
85
|
+
const preview = typeof previewResult === 'string' ? previewResult : undefined;
|
|
86
|
+
const duration = typeof durationResult === 'number' ? durationResult : 0;
|
|
87
|
+
let index = -1;
|
|
88
|
+
this.videos.update((videos) => {
|
|
89
|
+
index = videos.length;
|
|
90
|
+
return [...videos, { file, preview, duration, uploadProgress: 0, uploading: true }];
|
|
91
|
+
});
|
|
92
|
+
if (index >= 0) {
|
|
93
|
+
void this.uploadVideoAt(index, file);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Failed to process video:', error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async uploadVideoAt(index, file) {
|
|
102
|
+
const abortController = new AbortController();
|
|
103
|
+
this.patchVideo(index, { abortController });
|
|
104
|
+
try {
|
|
105
|
+
const result = await uploadPickerFile(this.uploader, this.conversation().id, file, (progress) => this.patchVideo(index, { uploadProgress: progress, uploading: true }), abortController.signal);
|
|
106
|
+
this.patchVideo(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.patchVideo(index, {
|
|
119
|
+
uploading: false,
|
|
120
|
+
error: this.translation.translateSync('@acorex:chat.errors.upload-failed'),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
patchVideo(index, patch) {
|
|
125
|
+
if (this.uploadsDismissed) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.videos.update((items) => {
|
|
129
|
+
const next = [...items];
|
|
130
|
+
if (next[index]) {
|
|
131
|
+
next[index] = { ...next[index], ...patch };
|
|
132
|
+
}
|
|
133
|
+
return next;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
removeVideo(index) {
|
|
137
|
+
const item = this.videos()[index];
|
|
138
|
+
if (item) {
|
|
139
|
+
cleanupPickerUploads(this.uploader, [item]);
|
|
140
|
+
}
|
|
141
|
+
this.videos.update((videos) => videos.filter((_, i) => i !== index));
|
|
142
|
+
}
|
|
143
|
+
async sendVideos() {
|
|
144
|
+
const videoList = this.videos();
|
|
145
|
+
if (!this.canSend())
|
|
146
|
+
return;
|
|
147
|
+
const videos = videoList.flatMap((video) => {
|
|
148
|
+
const result = pickerItemToUploadResult(video);
|
|
149
|
+
return result ? [videoItemFromUpload(video.file, result, video.duration ?? 0)] : [];
|
|
150
|
+
});
|
|
151
|
+
if (videos.length === 0) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const command = {
|
|
155
|
+
conversationId: this.conversation().id,
|
|
156
|
+
type: 'video',
|
|
157
|
+
payload: {
|
|
158
|
+
type: 'video',
|
|
159
|
+
videos,
|
|
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.videos();
|
|
173
|
+
return list.length > 0 && list.every((v) => v.uploaded && !v.error && !v.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.videos()];
|
|
196
|
+
cleanupPickerUploads(this.uploader, snapshot, {
|
|
197
|
+
retainUploaded: this.retainUploadedOnDismiss,
|
|
198
|
+
});
|
|
199
|
+
this.retainUploadedOnDismiss = false;
|
|
200
|
+
this.videos.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.videos.drop-to-attach')
|
|
220
|
+
: this.translation.translateSync('@acorex:chat.pickers.videos.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.videos.selected-count', {
|
|
229
|
+
params: { count: this.videos().length },
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
getSendText() {
|
|
233
|
+
return this.translation.translateSync('@acorex:chat.pickers.videos.send-count', {
|
|
234
|
+
params: { count: this.videos().length },
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVideoPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationVideoPickerComponent, isStandalone: true, selector: "ax-conversation-video-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.videos.title')" (onClose)="cancel()" />
|
|
247
|
+
|
|
248
|
+
<div class="ax-conversation-picker__scroll">
|
|
249
|
+
@if (videos().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 (video of videos(); track $index) {
|
|
265
|
+
<div class="ax-conversation-picker__row">
|
|
266
|
+
<div class="ax-conversation-picker__thumb">
|
|
267
|
+
@if (video.preview) {
|
|
268
|
+
<video [src]="video.preview" muted playsinline preload="metadata"></video>
|
|
269
|
+
<span class="ax-conversation-picker__thumb-badge" aria-hidden="true"
|
|
270
|
+
><i class="fa-solid fa-play"></i
|
|
271
|
+
></span>
|
|
272
|
+
} @else {
|
|
273
|
+
<i [class]="typeIconClass"></i>
|
|
274
|
+
}
|
|
275
|
+
</div>
|
|
276
|
+
<div class="ax-conversation-picker__details">
|
|
277
|
+
<div class="ax-conversation-picker__name">{{ video.file.name }}</div>
|
|
278
|
+
<div class="ax-conversation-picker__status">
|
|
279
|
+
@if (video.uploading) {
|
|
280
|
+
<span>{{ getUploadingLabel(video.uploadProgress ?? 0) }}</span>
|
|
281
|
+
} @else if (video.uploaded) {
|
|
282
|
+
<span class="ax-conversation-picker__status--ok"
|
|
283
|
+
><i class="fa-light fa-check"></i>
|
|
284
|
+
{{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
|
|
285
|
+
>
|
|
286
|
+
} @else if (video.error) {
|
|
287
|
+
<span class="ax-conversation-picker__status--err"
|
|
288
|
+
><i class="fa-light fa-xmark"></i> {{ video.error }}</span
|
|
289
|
+
>
|
|
290
|
+
} @else {
|
|
291
|
+
<span>{{ formatFileSize(video.file.size) }}</span>
|
|
292
|
+
@if (video.duration) {
|
|
293
|
+
<span>{{ formatDuration(video.duration) }}</span>
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
</div>
|
|
297
|
+
@if (video.uploading || video.uploaded) {
|
|
298
|
+
<div class="ax-conversation-picker__progress">
|
|
299
|
+
<ax-progress-bar [progress]="video.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
|
|
300
|
+
</div>
|
|
301
|
+
}
|
|
302
|
+
</div>
|
|
303
|
+
<button
|
|
304
|
+
type="button"
|
|
305
|
+
class="ax-conversation-picker__remove"
|
|
306
|
+
(click)="removeVideo($index)"
|
|
307
|
+
[attr.aria-label]="
|
|
308
|
+
video.uploading
|
|
309
|
+
? getCancelUploadLabel()
|
|
310
|
+
: translation.translateSync('@acorex:chat.pickers.common.remove')
|
|
311
|
+
"
|
|
312
|
+
>
|
|
313
|
+
<i class="fa-light fa-xmark"></i>
|
|
314
|
+
</button>
|
|
315
|
+
</div>
|
|
316
|
+
}
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
}
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<ax-conversation-picker-caption [(caption)]="caption" />
|
|
323
|
+
|
|
324
|
+
@if (videos().length > 0) {
|
|
325
|
+
<ax-conversation-picker-footer
|
|
326
|
+
[sendText]="getSendText()"
|
|
327
|
+
[sendDisabled]="!canSend()"
|
|
328
|
+
(onCancel)="cancel()"
|
|
329
|
+
(onSend)="sendVideos()"
|
|
330
|
+
/>
|
|
331
|
+
}
|
|
332
|
+
</ax-conversation-picker-shell>
|
|
333
|
+
`, 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;inset: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"] }] }); }
|
|
334
|
+
}
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVideoPickerComponent, decorators: [{
|
|
336
|
+
type: Component,
|
|
337
|
+
args: [{ selector: 'ax-conversation-video-picker', imports: [
|
|
338
|
+
CommonModule,
|
|
339
|
+
AXProgressBarModule,
|
|
340
|
+
AXTranslationModule,
|
|
341
|
+
AXConversationPickerHeaderComponent,
|
|
342
|
+
AXConversationPickerFooterComponent,
|
|
343
|
+
AXConversationPickerEmptyComponent,
|
|
344
|
+
AXConversationPickerToolbarComponent,
|
|
345
|
+
AXConversationPickerCaptionComponent,
|
|
346
|
+
AXConversationPickerShellComponent,
|
|
347
|
+
], template: `
|
|
348
|
+
<ax-conversation-picker-shell
|
|
349
|
+
[fileType]="catalogFileType"
|
|
350
|
+
[multiple]="allowMultiple()"
|
|
351
|
+
(filesSelected)="handleFiles($event)"
|
|
352
|
+
(dragEnter)="isDragging.set(true)"
|
|
353
|
+
(dragLeave)="isDragging.set(false)"
|
|
354
|
+
>
|
|
355
|
+
<ax-conversation-picker-header [title]="translation.translateSync('@acorex:chat.pickers.videos.title')" (onClose)="cancel()" />
|
|
356
|
+
|
|
357
|
+
<div class="ax-conversation-picker__scroll">
|
|
358
|
+
@if (videos().length === 0) {
|
|
359
|
+
<ax-conversation-picker-empty
|
|
360
|
+
[title]="getEmptyTitle()"
|
|
361
|
+
[hint]="getEmptySubtitle()"
|
|
362
|
+
[iconClass]="emptyIconClass()"
|
|
363
|
+
[dragOver]="isDragging()"
|
|
364
|
+
/>
|
|
365
|
+
} @else {
|
|
366
|
+
<div class="ax-conversation-picker__body">
|
|
367
|
+
<ax-conversation-picker-toolbar
|
|
368
|
+
[countLabel]="getSelectedCountText()"
|
|
369
|
+
[addMoreLabel]="translation.translateSync('@acorex:chat.pickers.common.add-more')"
|
|
370
|
+
/>
|
|
371
|
+
|
|
372
|
+
<div class="ax-conversation-picker__list">
|
|
373
|
+
@for (video of videos(); track $index) {
|
|
374
|
+
<div class="ax-conversation-picker__row">
|
|
375
|
+
<div class="ax-conversation-picker__thumb">
|
|
376
|
+
@if (video.preview) {
|
|
377
|
+
<video [src]="video.preview" muted playsinline preload="metadata"></video>
|
|
378
|
+
<span class="ax-conversation-picker__thumb-badge" aria-hidden="true"
|
|
379
|
+
><i class="fa-solid fa-play"></i
|
|
380
|
+
></span>
|
|
381
|
+
} @else {
|
|
382
|
+
<i [class]="typeIconClass"></i>
|
|
383
|
+
}
|
|
384
|
+
</div>
|
|
385
|
+
<div class="ax-conversation-picker__details">
|
|
386
|
+
<div class="ax-conversation-picker__name">{{ video.file.name }}</div>
|
|
387
|
+
<div class="ax-conversation-picker__status">
|
|
388
|
+
@if (video.uploading) {
|
|
389
|
+
<span>{{ getUploadingLabel(video.uploadProgress ?? 0) }}</span>
|
|
390
|
+
} @else if (video.uploaded) {
|
|
391
|
+
<span class="ax-conversation-picker__status--ok"
|
|
392
|
+
><i class="fa-light fa-check"></i>
|
|
393
|
+
{{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
|
|
394
|
+
>
|
|
395
|
+
} @else if (video.error) {
|
|
396
|
+
<span class="ax-conversation-picker__status--err"
|
|
397
|
+
><i class="fa-light fa-xmark"></i> {{ video.error }}</span
|
|
398
|
+
>
|
|
399
|
+
} @else {
|
|
400
|
+
<span>{{ formatFileSize(video.file.size) }}</span>
|
|
401
|
+
@if (video.duration) {
|
|
402
|
+
<span>{{ formatDuration(video.duration) }}</span>
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
</div>
|
|
406
|
+
@if (video.uploading || video.uploaded) {
|
|
407
|
+
<div class="ax-conversation-picker__progress">
|
|
408
|
+
<ax-progress-bar [progress]="video.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
|
|
409
|
+
</div>
|
|
410
|
+
}
|
|
411
|
+
</div>
|
|
412
|
+
<button
|
|
413
|
+
type="button"
|
|
414
|
+
class="ax-conversation-picker__remove"
|
|
415
|
+
(click)="removeVideo($index)"
|
|
416
|
+
[attr.aria-label]="
|
|
417
|
+
video.uploading
|
|
418
|
+
? getCancelUploadLabel()
|
|
419
|
+
: translation.translateSync('@acorex:chat.pickers.common.remove')
|
|
420
|
+
"
|
|
421
|
+
>
|
|
422
|
+
<i class="fa-light fa-xmark"></i>
|
|
423
|
+
</button>
|
|
424
|
+
</div>
|
|
425
|
+
}
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
}
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<ax-conversation-picker-caption [(caption)]="caption" />
|
|
432
|
+
|
|
433
|
+
@if (videos().length > 0) {
|
|
434
|
+
<ax-conversation-picker-footer
|
|
435
|
+
[sendText]="getSendText()"
|
|
436
|
+
[sendDisabled]="!canSend()"
|
|
437
|
+
(onCancel)="cancel()"
|
|
438
|
+
(onSend)="sendVideos()"
|
|
439
|
+
/>
|
|
440
|
+
}
|
|
441
|
+
</ax-conversation-picker-shell>
|
|
442
|
+
`, 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;inset: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"] }]
|
|
443
|
+
}], ctorParameters: () => [], propDecorators: { service: [{ type: i0.Input, args: [{ isSignal: true, alias: "service", required: false }] }], conversation: [{ type: i0.Input, args: [{ isSignal: true, alias: "conversation", required: true }] }], maxFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFiles", required: false }] }], initialFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFiles", required: false }] }], __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
|
|
444
|
+
|
|
445
|
+
export { AXConversationVideoPickerComponent };
|
|
446
|
+
//# sourceMappingURL=acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-components-conversation-video-picker.component-DPwSBnoH.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/video-picker/video-picker.component.ts"],"sourcesContent":["/**\n * Video Picker Component\n * Full-width video selection and preview interface for the composer\n */\n\nimport { AXUploaderService } from '@acorex/cdk/uploader';\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXFileService, AXFileTypeRegistryService, runFileTypeUtility, runFileTypeUtilityForFile, type AXFileType } from '@acorex/core/file';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { Component, OnDestroy, PLATFORM_ID, computed, inject, input, signal } from '@angular/core';\nimport { AXConversationComposerService } from '../../../../components/composer/composer.service';\nimport { AXConversation, AXConversationSendMessageCommand } from '../../../../models';\nimport { AXConversationPickerFooterComponent } from '../picker-footer/picker-footer.component';\nimport { AXConversationPickerHeaderComponent } from '../picker-header/picker-header.component';\nimport { AXConversationPickerCaptionComponent } from '../shared/picker-caption.component';\nimport { AXConversationPickerEmptyComponent } from '../shared/picker-empty.component';\nimport { AX_CONVERSATION_PICKER_SHARED_STYLES } from '../shared/picker-shared.styles';\nimport { AXConversationPickerShellComponent } from '../shared/picker-shell.component';\nimport { AXConversationPickerToolbarComponent } from '../shared/picker-toolbar.component';\nimport {\n type AXConversationComposerPickerUploadItem,\n cleanupPickerUploads,\n dismissComposerPickerHost,\n getPickerCancelUploadLabel,\n isUploadAborted,\n seedPickerInitialFiles,\n limitFilesToCapacity,\n notifyMaxFilesCapacityExceeded,\n notifyPickerValidationErrors,\n pickerItemToUploadResult,\n uploadPickerFile,\n} from '../shared/picker-upload';\nimport { AX_CONVERSATION_VIDEO_CATALOG, AX_CONVERSATION_VIDEO_PRESENTATION, createConversationVideoFileType } from './index';\nimport { videoItemFromUpload } from './video-composer.payload';\n\ninterface AXConversationVideoFile extends AXConversationComposerPickerUploadItem {\n preview?: string;\n duration?: number;\n}\n\n@Component({\n selector: 'ax-conversation-video-picker',\n imports: [\n CommonModule,\n AXProgressBarModule,\n AXTranslationModule,\n AXConversationPickerHeaderComponent,\n AXConversationPickerFooterComponent,\n AXConversationPickerEmptyComponent,\n AXConversationPickerToolbarComponent,\n AXConversationPickerCaptionComponent,\n AXConversationPickerShellComponent,\n ],\n template: `\n <ax-conversation-picker-shell\n [fileType]=\"catalogFileType\"\n [multiple]=\"allowMultiple()\"\n (filesSelected)=\"handleFiles($event)\"\n (dragEnter)=\"isDragging.set(true)\"\n (dragLeave)=\"isDragging.set(false)\"\n >\n <ax-conversation-picker-header [title]=\"translation.translateSync('@acorex:chat.pickers.videos.title')\" (onClose)=\"cancel()\" />\n\n <div class=\"ax-conversation-picker__scroll\">\n @if (videos().length === 0) {\n <ax-conversation-picker-empty\n [title]=\"getEmptyTitle()\"\n [hint]=\"getEmptySubtitle()\"\n [iconClass]=\"emptyIconClass()\"\n [dragOver]=\"isDragging()\"\n />\n } @else {\n <div class=\"ax-conversation-picker__body\">\n <ax-conversation-picker-toolbar\n [countLabel]=\"getSelectedCountText()\"\n [addMoreLabel]=\"translation.translateSync('@acorex:chat.pickers.common.add-more')\"\n />\n\n <div class=\"ax-conversation-picker__list\">\n @for (video of videos(); track $index) {\n <div class=\"ax-conversation-picker__row\">\n <div class=\"ax-conversation-picker__thumb\">\n @if (video.preview) {\n <video [src]=\"video.preview\" muted playsinline preload=\"metadata\"></video>\n <span class=\"ax-conversation-picker__thumb-badge\" aria-hidden=\"true\"\n ><i class=\"fa-solid fa-play\"></i\n ></span>\n } @else {\n <i [class]=\"typeIconClass\"></i>\n }\n </div>\n <div class=\"ax-conversation-picker__details\">\n <div class=\"ax-conversation-picker__name\">{{ video.file.name }}</div>\n <div class=\"ax-conversation-picker__status\">\n @if (video.uploading) {\n <span>{{ getUploadingLabel(video.uploadProgress ?? 0) }}</span>\n } @else if (video.uploaded) {\n <span class=\"ax-conversation-picker__status--ok\"\n ><i class=\"fa-light fa-check\"></i>\n {{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span\n >\n } @else if (video.error) {\n <span class=\"ax-conversation-picker__status--err\"\n ><i class=\"fa-light fa-xmark\"></i> {{ video.error }}</span\n >\n } @else {\n <span>{{ formatFileSize(video.file.size) }}</span>\n @if (video.duration) {\n <span>{{ formatDuration(video.duration) }}</span>\n }\n }\n </div>\n @if (video.uploading || video.uploaded) {\n <div class=\"ax-conversation-picker__progress\">\n <ax-progress-bar [progress]=\"video.uploadProgress || 0\" [mode]=\"'determinate'\" [height]=\"3\" />\n </div>\n }\n </div>\n <button\n type=\"button\"\n class=\"ax-conversation-picker__remove\"\n (click)=\"removeVideo($index)\"\n [attr.aria-label]=\"\n video.uploading\n ? getCancelUploadLabel()\n : translation.translateSync('@acorex:chat.pickers.common.remove')\n \"\n >\n <i class=\"fa-light fa-xmark\"></i>\n </button>\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <ax-conversation-picker-caption [(caption)]=\"caption\" />\n\n @if (videos().length > 0) {\n <ax-conversation-picker-footer\n [sendText]=\"getSendText()\"\n [sendDisabled]=\"!canSend()\"\n (onCancel)=\"cancel()\"\n (onSend)=\"sendVideos()\"\n />\n }\n </ax-conversation-picker-shell>\n `,\n styles: [AX_CONVERSATION_PICKER_SHARED_STYLES],\n})\nexport class AXConversationVideoPickerComponent implements OnDestroy {\n private uploadsDismissed = false;\n private retainUploadedOnDismiss = false;\n readonly service = input<AXConversationComposerService | undefined>();\n private readonly composerServiceFromInjector = inject(AXConversationComposerService, { optional: true });\n\n private get composerService(): AXConversationComposerService {\n const svc = this.service() ?? this.composerServiceFromInjector;\n if (!svc) {\n throw new Error('AXConversationComposerService is required for the video picker');\n }\n return svc;\n }\n private readonly uploader = inject(AXUploaderService);\n private readonly fileService = inject(AXFileService);\n private readonly fileTypeRegistry = inject(AXFileTypeRegistryService);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly toast = inject(AXToastService);\n readonly translation = inject(AXTranslationService);\n\n readonly conversation = input.required<AXConversation>();\n readonly maxFiles = input<number>(10);\n readonly initialFiles = input<File[]>([]);\n readonly __popup__ = input<AXPopupRef | undefined>();\n\n readonly catalogFileType = AX_CONVERSATION_VIDEO_CATALOG;\n\n readonly videos = signal<AXConversationVideoFile[]>([]);\n readonly isDragging = signal(false);\n caption = '';\n\n readonly allowMultiple = computed(() => this.maxFiles() > 1);\n readonly typeIconClass = AX_CONVERSATION_VIDEO_PRESENTATION.icon;\n readonly emptyIconClass = computed(() =>\n this.isDragging() ? 'fa-light fa-cloud-arrow-up' : AX_CONVERSATION_VIDEO_PRESENTATION.icon,\n );\n\n private catalogFileTypeDef?: AXFileType;\n\n constructor() {\n this.fileTypeRegistry.registerTypes([createConversationVideoFileType()]);\n seedPickerInitialFiles(this.initialFiles, (files) => this.handleFiles(files));\n }\n\n private createUtilityContext() {\n return {\n readAsDataUrl: (file: File | Blob) => this.fileService.blobToBase64(file),\n platformId: this.platformId,\n };\n }\n\n private async getCatalogFileTypeDef(): Promise<AXFileType | undefined> {\n this.catalogFileTypeDef ??= await this.fileService.getFileType(this.catalogFileType);\n return this.catalogFileTypeDef;\n }\n\n private async runUtility(name: string, file: File, ...args: unknown[]): Promise<unknown> {\n const fileType = await this.getCatalogFileTypeDef();\n if (!fileType) return undefined;\n return runFileTypeUtilityForFile(fileType, this.createUtilityContext(), file, name, ...args);\n }\n\n async handleFiles(files: File[]): Promise<void> {\n const max = this.maxFiles();\n const capacity = limitFilesToCapacity(files, this.videos().length, max);\n if (capacity.length < files.length) {\n notifyMaxFilesCapacityExceeded(this.toast, this.translation, max);\n }\n if (capacity.length === 0) {\n return;\n }\n\n const { accepted, rejected } = await this.uploader.validateFiles(capacity, this.catalogFileType);\n\n notifyPickerValidationErrors(this.toast, this.translation, rejected);\n\n for (const file of accepted) {\n try {\n const previewResult = await this.runUtility('preview', file);\n const durationResult = await this.runUtility('duration', file);\n const preview = typeof previewResult === 'string' ? previewResult : undefined;\n const duration = typeof durationResult === 'number' ? durationResult : 0;\n let index = -1;\n this.videos.update((videos) => {\n index = videos.length;\n return [...videos, { file, preview, duration, uploadProgress: 0, uploading: true }];\n });\n if (index >= 0) {\n void this.uploadVideoAt(index, file);\n }\n } catch (error) {\n console.error('Failed to process video:', error);\n }\n }\n }\n\n private async uploadVideoAt(index: number, file: File): Promise<void> {\n const abortController = new AbortController();\n this.patchVideo(index, { abortController });\n\n try {\n const result = await uploadPickerFile(\n this.uploader,\n this.conversation().id,\n file,\n (progress) => this.patchVideo(index, { uploadProgress: progress, uploading: true }),\n abortController.signal,\n );\n this.patchVideo(index, {\n uploadProgress: 100,\n uploading: false,\n uploaded: true,\n uploadedUrl: result.url,\n mediaId: result.mediaId,\n });\n } catch (err) {\n if (this.uploadsDismissed || isUploadAborted(err, abortController.signal)) {\n return;\n }\n this.patchVideo(index, {\n uploading: false,\n error: this.translation.translateSync('@acorex:chat.errors.upload-failed'),\n });\n }\n }\n\n private patchVideo(index: number, patch: Partial<AXConversationVideoFile>): void {\n if (this.uploadsDismissed) {\n return;\n }\n this.videos.update((items) => {\n const next = [...items];\n if (next[index]) {\n next[index] = { ...next[index], ...patch };\n }\n return next;\n });\n }\n\n removeVideo(index: number): void {\n const item = this.videos()[index];\n if (item) {\n cleanupPickerUploads(this.uploader, [item]);\n }\n this.videos.update((videos) => videos.filter((_, i) => i !== index));\n }\n\n async sendVideos(): Promise<void> {\n const videoList = this.videos();\n if (!this.canSend()) return;\n\n const videos = videoList.flatMap((video) => {\n const result = pickerItemToUploadResult(video);\n return result ? [videoItemFromUpload(video.file, result, video.duration ?? 0)] : [];\n });\n\n if (videos.length === 0) {\n return;\n }\n\n const command: AXConversationSendMessageCommand = {\n conversationId: this.conversation().id,\n type: 'video',\n payload: {\n type: 'video',\n videos,\n caption: this.caption.trim() || undefined,\n },\n };\n\n this.retainUploadedOnDismiss = true;\n const popup = this.__popup__();\n this.dismissPicker();\n dismissComposerPickerHost(this.composerService, popup);\n\n void this.composerService.sendMessage(command).catch(() => {\n this.retainUploadedOnDismiss = false;\n });\n }\n\n canSend(): boolean {\n const list = this.videos();\n return list.length > 0 && list.every((v) => v.uploaded && !v.error && !v.uploading);\n }\n\n getUploadingLabel(progress: number): string {\n return this.translation.translateSync('@acorex:chat.pickers.files.uploading-progress', {\n params: { progress },\n });\n }\n\n getCancelUploadLabel(): string {\n return getPickerCancelUploadLabel(this.translation);\n }\n\n cancel(): void {\n this.dismissPicker();\n dismissComposerPickerHost(this.composerService, this.__popup__());\n }\n\n ngOnDestroy(): void {\n this.dismissPicker();\n }\n\n private dismissPicker(): void {\n if (this.uploadsDismissed) {\n return;\n }\n this.uploadsDismissed = true;\n const snapshot = [...this.videos()];\n cleanupPickerUploads(this.uploader, snapshot, {\n retainUploaded: this.retainUploadedOnDismiss,\n });\n this.retainUploadedOnDismiss = false;\n this.videos.set([]);\n this.caption = '';\n }\n\n formatFileSize(bytes: number): string {\n const fileType = this.catalogFileTypeDef;\n const result = fileType\n ? runFileTypeUtility(fileType, this.createUtilityContext(), undefined, 'formatSize', bytes)\n : undefined;\n return typeof result === 'string' ? result : `${bytes} B`;\n }\n\n formatDuration(seconds: number): string {\n const fileType = this.catalogFileTypeDef;\n const result = fileType\n ? runFileTypeUtility(fileType, this.createUtilityContext(), undefined, 'formatDuration', seconds)\n : undefined;\n return typeof result === 'string' ? result : '0:00';\n }\n\n getEmptyTitle(): string {\n return this.isDragging()\n ? this.translation.translateSync('@acorex:chat.pickers.videos.drop-to-attach')\n : this.translation.translateSync('@acorex:chat.pickers.videos.select');\n }\n\n getEmptySubtitle(): string {\n return this.isDragging()\n ? this.translation.translateSync('@acorex:chat.pickers.common.release-to-upload')\n : this.translation.translateSync('@acorex:chat.pickers.common.click-to-browse');\n }\n\n getSelectedCountText(): string {\n return this.translation.translateSync('@acorex:chat.pickers.videos.selected-count', {\n params: { count: this.videos().length },\n });\n }\n\n getSendText(): string {\n return this.translation.translateSync('@acorex:chat.pickers.videos.send-count', {\n params: { count: this.videos().length },\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;AAGG;MAuJU,kCAAkC,CAAA;AAM7C,IAAA,IAAY,eAAe,GAAA;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,2BAA2B;QAC9D,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC;QACnF;AACA,QAAA,OAAO,GAAG;IACZ;AA2BA,IAAA,WAAA,GAAA;QAtCQ,IAAA,CAAA,gBAAgB,GAAG,KAAK;QACxB,IAAA,CAAA,uBAAuB,GAAG,KAAK;QAC9B,IAAA,CAAA,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA6C;QACpD,IAAA,CAAA,2BAA2B,GAAG,MAAM,CAAC,6BA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