@acorex/components 20.9.0 → 20.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/badge/index.d.ts +2 -4
  2. package/conversation/index.d.ts +1213 -33
  3. package/fesm2022/acorex-components-badge.mjs +17 -12
  4. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  5. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs → acorex-components-conversation-open-composer-picker-for-files-BLInQalk.mjs} +2 -3
  6. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-CbNyy2Ws.mjs.map → acorex-components-conversation-open-composer-picker-for-files-BLInQalk.mjs.map} +1 -1
  7. package/fesm2022/acorex-components-conversation.mjs +22436 -1
  8. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  9. package/fesm2022/acorex-components-file-viewer.mjs +736 -0
  10. package/fesm2022/acorex-components-file-viewer.mjs.map +1 -0
  11. package/fesm2022/acorex-components-list.mjs +16 -3
  12. package/fesm2022/acorex-components-list.mjs.map +1 -1
  13. package/fesm2022/acorex-components-select-box.mjs +56 -9
  14. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  15. package/file-viewer/index.d.ts +178 -0
  16. package/list/index.d.ts +19 -9
  17. package/package.json +20 -15
  18. package/select-box/index.d.ts +6 -0
  19. package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs +0 -13711
  20. package/fesm2022/acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs.map +0 -1
  21. package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs +0 -119
  22. package/fesm2022/acorex-components-conversation-audio-attachment.component-Ri-Jx210.mjs.map +0 -1
  23. package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs +0 -59
  24. package/fesm2022/acorex-components-conversation-audio-composer.payload-DiMDlVl9.mjs.map +0 -1
  25. package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs +0 -432
  26. package/fesm2022/acorex-components-conversation-audio-picker.component-CqrKBDIF.mjs.map +0 -1
  27. package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs +0 -177
  28. package/fesm2022/acorex-components-conversation-audio-renderer.component-CO8owVrA.mjs.map +0 -1
  29. package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs +0 -54
  30. package/fesm2022/acorex-components-conversation-audio.payload-CLnYjmYY.mjs.map +0 -1
  31. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs +0 -100
  32. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-D-hIBwQ2.mjs.map +0 -1
  33. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs +0 -121
  34. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DQUy3C64.mjs.map +0 -1
  35. package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs +0 -84
  36. package/fesm2022/acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs.map +0 -1
  37. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs +0 -238
  38. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-BalIIAFB.mjs.map +0 -1
  39. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs +0 -1080
  40. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-BJMo9bDd.mjs.map +0 -1
  41. package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs +0 -102
  42. package/fesm2022/acorex-components-conversation-conversation-video.file-type-DyK0bLE5.mjs.map +0 -1
  43. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs +0 -90
  44. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-v3rFWDv6.mjs.map +0 -1
  45. package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs +0 -44
  46. package/fesm2022/acorex-components-conversation-fallback-renderer.component-DOQkZWwP.mjs.map +0 -1
  47. package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs +0 -64
  48. package/fesm2022/acorex-components-conversation-file-composer.payload-azPSH99m.mjs.map +0 -1
  49. package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs +0 -468
  50. package/fesm2022/acorex-components-conversation-file-picker.component-cmUkgSF3.mjs.map +0 -1
  51. package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs +0 -125
  52. package/fesm2022/acorex-components-conversation-file-renderer.component-CpUgRTR4.mjs.map +0 -1
  53. package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs +0 -50
  54. package/fesm2022/acorex-components-conversation-file.payload-DXwzNWxT.mjs.map +0 -1
  55. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +0 -21
  56. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +0 -1
  57. package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs +0 -77
  58. package/fesm2022/acorex-components-conversation-image-attachment.component-BZto5LFo.mjs.map +0 -1
  59. package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs +0 -407
  60. package/fesm2022/acorex-components-conversation-image-picker.component-G9EEOyDg.mjs.map +0 -1
  61. package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs +0 -83
  62. package/fesm2022/acorex-components-conversation-image-renderer.component-Bwa6rG6C.mjs.map +0 -1
  63. package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs +0 -180
  64. package/fesm2022/acorex-components-conversation-index-BbrYsQ84.mjs.map +0 -1
  65. package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs +0 -266
  66. package/fesm2022/acorex-components-conversation-index-DtGEWeKN.mjs.map +0 -1
  67. package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs +0 -149
  68. package/fesm2022/acorex-components-conversation-location-picker.component-Cx993j_c.mjs.map +0 -1
  69. package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs +0 -118
  70. package/fesm2022/acorex-components-conversation-location-renderer.component-BiynmAJw.mjs.map +0 -1
  71. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +0 -17
  72. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +0 -1
  73. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs +0 -140
  74. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-a7OSpfB1.mjs.map +0 -1
  75. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs +0 -33
  76. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-D_eAnM6v.mjs.map +0 -1
  77. package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs +0 -172
  78. package/fesm2022/acorex-components-conversation-message-renderer-state.component-DSnNoz1N.mjs.map +0 -1
  79. package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs +0 -81
  80. package/fesm2022/acorex-components-conversation-pagination-demo-data-DRr9PXjJ.mjs.map +0 -1
  81. package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs +0 -91
  82. package/fesm2022/acorex-components-conversation-picker-header.component-BhTzlufI.mjs.map +0 -1
  83. package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs +0 -537
  84. package/fesm2022/acorex-components-conversation-picker-toolbar.component-CpyS0j6P.mjs.map +0 -1
  85. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +0 -163
  86. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +0 -1
  87. package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs +0 -68
  88. package/fesm2022/acorex-components-conversation-playback-banner-sync-BMsx6Fuy.mjs.map +0 -1
  89. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +0 -95
  90. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +0 -1
  91. package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs +0 -187
  92. package/fesm2022/acorex-components-conversation-search.component-96NI2ERG.mjs.map +0 -1
  93. package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs +0 -170
  94. package/fesm2022/acorex-components-conversation-send-message-media--Rbrne7k.mjs.map +0 -1
  95. package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs +0 -750
  96. package/fesm2022/acorex-components-conversation-shared-storage.seed-zFjNXfKF.mjs.map +0 -1
  97. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs +0 -103
  98. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BZgx_Ylk.mjs.map +0 -1
  99. package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs +0 -55
  100. package/fesm2022/acorex-components-conversation-system-renderer.component-D1Aj-LuF.mjs.map +0 -1
  101. package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs +0 -109
  102. package/fesm2022/acorex-components-conversation-text-renderer.component-Cxvwjr2p.mjs.map +0 -1
  103. package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs +0 -105
  104. package/fesm2022/acorex-components-conversation-video-attachment.component-DBY_4Ri2.mjs.map +0 -1
  105. package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs +0 -62
  106. package/fesm2022/acorex-components-conversation-video-composer.payload-CWGxsPg5.mjs.map +0 -1
  107. package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs +0 -446
  108. package/fesm2022/acorex-components-conversation-video-picker.component-D1JYwEm_.mjs.map +0 -1
  109. package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs +0 -181
  110. package/fesm2022/acorex-components-conversation-video-renderer.component-iwf2bU29.mjs.map +0 -1
  111. package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs +0 -54
  112. package/fesm2022/acorex-components-conversation-video.payload-DfBEjqQ4.mjs.map +0 -1
  113. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +0 -17
  114. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +0 -1
  115. package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs +0 -328
  116. package/fesm2022/acorex-components-conversation-voice-recorder.component-P8J_5OH0.mjs.map +0 -1
  117. package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs +0 -270
  118. package/fesm2022/acorex-components-conversation-voice-renderer.component-CZpEqbXL.mjs.map +0 -1
@@ -1,77 +0,0 @@
1
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, PLATFORM_ID, input, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { w as toUploaderReference, x as createResolvedMediaUrlSignal, y as pickDisplayMediaUrl } from './acorex-components-conversation-acorex-components-conversation-CjVDCoJw.mjs';
5
-
6
- class AXConversationImageAttachmentComponent {
7
- constructor() {
8
- this.platformId = inject(PLATFORM_ID);
9
- this.document = inject(DOCUMENT);
10
- this.item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
11
- this.alt = input('Image', ...(ngDevMode ? [{ debugName: "alt" }] : []));
12
- this.ready = signal(false, ...(ngDevMode ? [{ debugName: "ready" }] : []));
13
- this.mediaReference = computed(() => toUploaderReference(this.item()), ...(ngDevMode ? [{ debugName: "mediaReference" }] : []));
14
- this.resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);
15
- this.displayUrl = computed(() => pickDisplayMediaUrl(this.resolvedUrl(), this.item().thumbnailUrl, this.item().url), ...(ngDevMode ? [{ debugName: "displayUrl" }] : []));
16
- effect(() => {
17
- this.displayUrl();
18
- this.item().mediaId;
19
- untracked(() => this.ready.set(false));
20
- });
21
- }
22
- onImageLoad() {
23
- this.ready.set(true);
24
- }
25
- onImageError() {
26
- this.ready.set(false);
27
- }
28
- toggleFullscreen(event) {
29
- if (!isPlatformBrowser(this.platformId)) {
30
- return;
31
- }
32
- const img = event.currentTarget.querySelector('img');
33
- if (!(img instanceof HTMLImageElement) || !img.requestFullscreen) {
34
- return;
35
- }
36
- if (this.document.fullscreenElement === img) {
37
- void this.document.exitFullscreen();
38
- return;
39
- }
40
- void img.requestFullscreen();
41
- }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationImageAttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationImageAttachmentComponent, isStandalone: true, selector: "ax-conversation-image-attachment", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
44
- <button
45
- type="button"
46
- class="ax-conversation-image-attachment"
47
- [class.ax-conversation-image-attachment--ready]="ready()"
48
- [class.ax-conversation-image-attachment--loading]="!displayUrl()"
49
- (click)="toggleFullscreen($event)"
50
- [attr.aria-label]="alt()"
51
- >
52
- @if (displayUrl(); as src) {
53
- <img [src]="src" [alt]="alt()" loading="lazy" (load)="onImageLoad()" (error)="onImageError()" />
54
- }
55
- </button>
56
- `, isInline: true, styles: [":host{display:block;min-width:0;min-height:0}.ax-conversation-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));overflow:hidden}.ax-conversation-image-attachment--loading{background:rgba(var(--ax-sys-color-on-surface),.06)}.ax-conversation-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-conversation-image-attachment img:fullscreen{width:100%;height:100%;object-fit:contain;background:#000}.ax-conversation-image-attachment--ready img{opacity:1}.ax-conversation-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationImageAttachmentComponent, decorators: [{
59
- type: Component,
60
- args: [{ selector: 'ax-conversation-image-attachment', changeDetection: ChangeDetectionStrategy.OnPush, template: `
61
- <button
62
- type="button"
63
- class="ax-conversation-image-attachment"
64
- [class.ax-conversation-image-attachment--ready]="ready()"
65
- [class.ax-conversation-image-attachment--loading]="!displayUrl()"
66
- (click)="toggleFullscreen($event)"
67
- [attr.aria-label]="alt()"
68
- >
69
- @if (displayUrl(); as src) {
70
- <img [src]="src" [alt]="alt()" loading="lazy" (load)="onImageLoad()" (error)="onImageError()" />
71
- }
72
- </button>
73
- `, styles: [":host{display:block;min-width:0;min-height:0}.ax-conversation-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));overflow:hidden}.ax-conversation-image-attachment--loading{background:rgba(var(--ax-sys-color-on-surface),.06)}.ax-conversation-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-conversation-image-attachment img:fullscreen{width:100%;height:100%;object-fit:contain;background:#000}.ax-conversation-image-attachment--ready img{opacity:1}.ax-conversation-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\n"] }]
74
- }], ctorParameters: () => [] });
75
-
76
- export { AXConversationImageAttachmentComponent as A };
77
- //# sourceMappingURL=acorex-components-conversation-image-attachment.component-BZto5LFo.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-components-conversation-image-attachment.component-BZto5LFo.mjs","sources":["../tmp-esm2022/conversation/lib/plugins/message-list/components/shared/image-attachment.component.js"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, PLATFORM_ID, computed, effect, inject, input, signal, untracked, } from '@angular/core';\nimport { pickDisplayMediaUrl } from '../../../composer/components/shared/persisted-media-url';\nimport { toUploaderReference } from './attachment-uploader-reference';\nimport { createResolvedMediaUrlSignal } from './media-url-resolve';\nimport * as i0 from \"@angular/core\";\nexport class AXConversationImageAttachmentComponent {\n constructor() {\n this.platformId = inject(PLATFORM_ID);\n this.document = inject(DOCUMENT);\n this.item = input.required(...(ngDevMode ? [{ debugName: \"item\" }] : []));\n this.alt = input('Image', ...(ngDevMode ? [{ debugName: \"alt\" }] : []));\n this.ready = signal(false, ...(ngDevMode ? [{ debugName: \"ready\" }] : []));\n this.mediaReference = computed(() => toUploaderReference(this.item()), ...(ngDevMode ? [{ debugName: \"mediaReference\" }] : []));\n this.resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);\n this.displayUrl = computed(() => pickDisplayMediaUrl(this.resolvedUrl(), this.item().thumbnailUrl, this.item().url), ...(ngDevMode ? [{ debugName: \"displayUrl\" }] : []));\n effect(() => {\n this.displayUrl();\n this.item().mediaId;\n untracked(() => this.ready.set(false));\n });\n }\n onImageLoad() {\n this.ready.set(true);\n }\n onImageError() {\n this.ready.set(false);\n }\n toggleFullscreen(event) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const img = event.currentTarget.querySelector('img');\n if (!(img instanceof HTMLImageElement) || !img.requestFullscreen) {\n return;\n }\n if (this.document.fullscreenElement === img) {\n void this.document.exitFullscreen();\n return;\n }\n void img.requestFullscreen();\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXConversationImageAttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }\n static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.3.3\", type: AXConversationImageAttachmentComponent, isStandalone: true, selector: \"ax-conversation-image-attachment\", inputs: { item: { classPropertyName: \"item\", publicName: \"item\", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: \"alt\", publicName: \"alt\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `\n <button\n type=\"button\"\n class=\"ax-conversation-image-attachment\"\n [class.ax-conversation-image-attachment--ready]=\"ready()\"\n [class.ax-conversation-image-attachment--loading]=\"!displayUrl()\"\n (click)=\"toggleFullscreen($event)\"\n [attr.aria-label]=\"alt()\"\n >\n @if (displayUrl(); as src) {\n <img [src]=\"src\" [alt]=\"alt()\" loading=\"lazy\" (load)=\"onImageLoad()\" (error)=\"onImageError()\" />\n }\n </button>\n `, isInline: true, styles: [\":host{display:block;min-width:0;min-height:0}.ax-conversation-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));overflow:hidden}.ax-conversation-image-attachment--loading{background:rgba(var(--ax-sys-color-on-surface),.06)}.ax-conversation-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-conversation-image-attachment img:fullscreen{width:100%;height:100%;object-fit:contain;background:#000}.ax-conversation-image-attachment--ready img{opacity:1}.ax-conversation-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.3.3\", ngImport: i0, type: AXConversationImageAttachmentComponent, decorators: [{\n type: Component,\n args: [{ selector: 'ax-conversation-image-attachment', changeDetection: ChangeDetectionStrategy.OnPush, template: `\n <button\n type=\"button\"\n class=\"ax-conversation-image-attachment\"\n [class.ax-conversation-image-attachment--ready]=\"ready()\"\n [class.ax-conversation-image-attachment--loading]=\"!displayUrl()\"\n (click)=\"toggleFullscreen($event)\"\n [attr.aria-label]=\"alt()\"\n >\n @if (displayUrl(); as src) {\n <img [src]=\"src\" [alt]=\"alt()\" loading=\"lazy\" (load)=\"onImageLoad()\" (error)=\"onImageError()\" />\n }\n </button>\n `, styles: [\":host{display:block;min-width:0;min-height:0}.ax-conversation-image-attachment{display:block;width:100%;height:100%;min-height:4.5rem;padding:0;border-radius:.5rem;border:none;background:rgb(var(--ax-sys-color-light-surface));overflow:hidden}.ax-conversation-image-attachment--loading{background:rgba(var(--ax-sys-color-on-surface),.06)}.ax-conversation-image-attachment img{width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s ease}.ax-conversation-image-attachment img:fullscreen{width:100%;height:100%;object-fit:contain;background:#000}.ax-conversation-image-attachment--ready img{opacity:1}.ax-conversation-image-attachment:focus-visible{outline:2px solid rgb(var(--ax-sys-color-primary-500));outline-offset:2px}\\n\"] }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtYXR0YWNobWVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21wb25lbnRzL2NvbnZlcnNhdGlvbi9zcmMvbGliL3BsdWdpbnMvbWVzc2FnZS1saXN0L2NvbXBvbmVudHMvc2hhcmVkL2ltYWdlLWF0dGFjaG1lbnQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM5RCxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxXQUFXLEVBQ1gsUUFBUSxFQUNSLE1BQU0sRUFDTixNQUFNLEVBQ04sS0FBSyxFQUNMLE1BQU0sRUFDTixTQUFTLEdBQ1YsTU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AQ,EAAE,EAAE,EAAE,QAAQ,EAAE;AACtd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,suBAAsuB,CAAC,EAAE,eAAe,EAAE,EAAE,CAAC,uBAAuB,CAAC,MAAM,EAAE,CAAC,CAAC;AAC7zB;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,sCAAsC,EAAE,UAAU,EAAE,CAAC;AAChJ,YAAY,IAAI,EAAE,SAAS;AAC3B,YAAY,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,kCAAkC,EAAE,eAAe,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,suBAAsuB,CAAC,EAAE;AACvvB,SAAS,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,CAAC;;;;"}
@@ -1,407 +0,0 @@
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 } 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 { s as resolvePersistableMediaUrl, c as resolvePersistedThumbnailUrl, o as AXConversationComposerService, t as AX_CONVERSATION_IMAGE_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 { AX_CONVERSATION_IMAGE_PRESENTATION, createConversationImageFileType } from './acorex-components-conversation-conversation-image.file-type-Bd_SkwR0.mjs';
15
-
16
- /**
17
- * Image Picker Component
18
- * Full-width image selection and preview interface for the composer
19
- */
20
- function imageItemFromUpload(file, result) {
21
- const url = resolvePersistableMediaUrl(result.url);
22
- const item = {
23
- mediaId: result.mediaId,
24
- mimeType: result.mimeType,
25
- size: result.size,
26
- thumbnailUrl: resolvePersistedThumbnailUrl(result.thumbnailUrl, url),
27
- width: 0,
28
- height: 0,
29
- metadata: result.metadata,
30
- };
31
- if (url) {
32
- item.url = url;
33
- }
34
- return item;
35
- }
36
- class AXConversationImagePickerComponent {
37
- get composerService() {
38
- const svc = this.service() ?? this.composerServiceFromInjector;
39
- if (!svc) {
40
- throw new Error('AXConversationComposerService is required for the image picker');
41
- }
42
- return svc;
43
- }
44
- constructor() {
45
- this.uploadsDismissed = false;
46
- /** Uploaded blobs are referenced by the sent message — do not delete on dismiss. */
47
- this.retainUploadedOnDismiss = false;
48
- this.service = input(...(ngDevMode ? [undefined, { debugName: "service" }] : []));
49
- this.composerServiceFromInjector = inject(AXConversationComposerService, { optional: true });
50
- this.uploader = inject(AXUploaderService);
51
- this.fileService = inject(AXFileService);
52
- this.fileTypeRegistry = inject(AXFileTypeRegistryService);
53
- this.platformId = inject(PLATFORM_ID);
54
- this.toast = inject(AXToastService);
55
- this.translation = inject(AXTranslationService);
56
- this.catalogFileType = AX_CONVERSATION_IMAGE_CATALOG;
57
- this.conversation = input.required(...(ngDevMode ? [{ debugName: "conversation" }] : []));
58
- this.maxFiles = input(10, ...(ngDevMode ? [{ debugName: "maxFiles" }] : []));
59
- this.initialFiles = input([], ...(ngDevMode ? [{ debugName: "initialFiles" }] : []));
60
- this.__popup__ = input(...(ngDevMode ? [undefined, { debugName: "__popup__" }] : []));
61
- this.images = signal([], ...(ngDevMode ? [{ debugName: "images" }] : []));
62
- this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
63
- this.emptyIconClass = computed(() => this.isDragging() ? 'fa-light fa-cloud-arrow-up' : AX_CONVERSATION_IMAGE_PRESENTATION.icon, ...(ngDevMode ? [{ debugName: "emptyIconClass" }] : []));
64
- this.caption = '';
65
- this.allowMultiple = computed(() => this.maxFiles() > 1, ...(ngDevMode ? [{ debugName: "allowMultiple" }] : []));
66
- this.fileTypeRegistry.registerTypes([createConversationImageFileType()]);
67
- seedPickerInitialFiles(this.initialFiles, (files) => this.handleFiles(files));
68
- }
69
- createUtilityContext() {
70
- return {
71
- readAsDataUrl: (file) => this.fileService.blobToBase64(file),
72
- platformId: this.platformId,
73
- };
74
- }
75
- async loadImageFileType() {
76
- this.imageFileType ??= await this.fileService.getFileType(this.catalogFileType);
77
- return this.imageFileType;
78
- }
79
- async handleFiles(files) {
80
- const max = this.maxFiles();
81
- const capacity = limitFilesToCapacity(files, this.images().length, max);
82
- if (capacity.length < files.length) {
83
- notifyMaxFilesCapacityExceeded(this.toast, this.translation, max);
84
- }
85
- if (capacity.length === 0) {
86
- return;
87
- }
88
- const { accepted, rejected } = await this.uploader.validateFiles(capacity, this.catalogFileType);
89
- notifyPickerValidationErrors(this.toast, this.translation, rejected);
90
- const fileType = await this.loadImageFileType();
91
- const ctx = this.createUtilityContext();
92
- for (const file of accepted) {
93
- try {
94
- const previewValue = fileType
95
- ? await runFileTypeUtilityForFile(fileType, ctx, file, 'preview')
96
- : undefined;
97
- const preview = typeof previewValue === 'string' ? previewValue : '';
98
- let index = -1;
99
- this.images.update((images) => {
100
- index = images.length;
101
- return [...images, { file, preview, uploadProgress: 0, uploading: true }];
102
- });
103
- if (index >= 0) {
104
- void this.uploadImageAt(index, file);
105
- }
106
- }
107
- catch (error) {
108
- console.error('Failed to process image:', error);
109
- }
110
- }
111
- }
112
- async uploadImageAt(index, file) {
113
- const abortController = new AbortController();
114
- this.patchImage(index, { abortController });
115
- try {
116
- const result = await uploadPickerFile(this.uploader, this.conversation().id, file, (progress) => this.patchImage(index, { uploadProgress: progress, uploading: true }), abortController.signal);
117
- this.patchImage(index, {
118
- uploadProgress: 100,
119
- uploading: false,
120
- uploaded: true,
121
- uploadedUrl: result.url,
122
- mediaId: result.mediaId,
123
- });
124
- }
125
- catch (err) {
126
- if (this.uploadsDismissed || isUploadAborted(err, abortController.signal)) {
127
- return;
128
- }
129
- this.patchImage(index, {
130
- uploadProgress: 0,
131
- uploading: false,
132
- uploaded: false,
133
- error: this.translation.translateSync('@acorex:chat.errors.upload-failed'),
134
- });
135
- }
136
- }
137
- patchImage(index, patch) {
138
- if (this.uploadsDismissed) {
139
- return;
140
- }
141
- this.images.update((items) => {
142
- const next = [...items];
143
- if (next[index]) {
144
- next[index] = { ...next[index], ...patch };
145
- }
146
- return next;
147
- });
148
- }
149
- removeImage(index) {
150
- const item = this.images()[index];
151
- if (item) {
152
- cleanupPickerUploads(this.uploader, [item]);
153
- }
154
- this.images.update((images) => images.filter((_, i) => i !== index));
155
- }
156
- async sendImages() {
157
- const imageList = this.images();
158
- if (!this.canSend())
159
- return;
160
- const images = imageList.flatMap((image) => {
161
- const result = pickerItemToUploadResult(image);
162
- return result ? [imageItemFromUpload(image.file, result)] : [];
163
- });
164
- if (images.length === 0) {
165
- return;
166
- }
167
- const command = {
168
- conversationId: this.conversation().id,
169
- type: 'image',
170
- payload: {
171
- type: 'image',
172
- images,
173
- caption: this.caption.trim() || undefined,
174
- },
175
- };
176
- this.retainUploadedOnDismiss = true;
177
- const popup = this.__popup__();
178
- this.dismissPicker();
179
- dismissComposerPickerHost(this.composerService, popup);
180
- void this.composerService.sendMessage(command).catch(() => {
181
- this.retainUploadedOnDismiss = false;
182
- });
183
- }
184
- canSend() {
185
- const list = this.images();
186
- return list.length > 0 && list.every((i) => i.uploaded && !i.error && !i.uploading);
187
- }
188
- getUploadingLabel(progress) {
189
- return this.translation.translateSync('@acorex:chat.pickers.files.uploading-progress', {
190
- params: { progress },
191
- });
192
- }
193
- getCancelUploadLabel() {
194
- return getPickerCancelUploadLabel(this.translation);
195
- }
196
- cancel() {
197
- this.dismissPicker();
198
- dismissComposerPickerHost(this.composerService, this.__popup__());
199
- }
200
- ngOnDestroy() {
201
- this.dismissPicker();
202
- }
203
- dismissPicker() {
204
- if (this.uploadsDismissed) {
205
- return;
206
- }
207
- this.uploadsDismissed = true;
208
- const snapshot = [...this.images()];
209
- cleanupPickerUploads(this.uploader, snapshot, {
210
- retainUploaded: this.retainUploadedOnDismiss,
211
- });
212
- this.retainUploadedOnDismiss = false;
213
- this.images.set([]);
214
- this.caption = '';
215
- }
216
- getEmptyTitle() {
217
- return this.isDragging()
218
- ? this.translation.translateSync('@acorex:chat.pickers.images.drop-to-attach')
219
- : this.translation.translateSync('@acorex:chat.pickers.images.select');
220
- }
221
- getEmptySubtitle() {
222
- return this.isDragging()
223
- ? this.translation.translateSync('@acorex:chat.pickers.common.release-to-upload')
224
- : this.translation.translateSync('@acorex:chat.pickers.common.click-to-browse');
225
- }
226
- getSelectedCountText() {
227
- return this.translation.translateSync('@acorex:chat.pickers.images.selected-count', {
228
- params: { count: this.images().length },
229
- });
230
- }
231
- getSendText() {
232
- return this.translation.translateSync('@acorex:chat.pickers.images.send-count', {
233
- params: { count: this.images().length },
234
- });
235
- }
236
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationImagePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
237
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: AXConversationImagePickerComponent, isStandalone: true, selector: "ax-conversation-image-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: `
238
- <ax-conversation-picker-shell
239
- [fileType]="catalogFileType"
240
- [multiple]="allowMultiple()"
241
- (filesSelected)="handleFiles($event)"
242
- (dragEnter)="isDragging.set(true)"
243
- (dragLeave)="isDragging.set(false)"
244
- >
245
- <ax-conversation-picker-header [title]="translation.translateSync('@acorex:chat.pickers.images.title')" (onClose)="cancel()" />
246
-
247
- <div class="ax-conversation-picker__scroll">
248
- @if (images().length === 0) {
249
- <ax-conversation-picker-empty
250
- [title]="getEmptyTitle()"
251
- [hint]="getEmptySubtitle()"
252
- [iconClass]="emptyIconClass()"
253
- [dragOver]="isDragging()"
254
- />
255
- } @else {
256
- <div class="ax-conversation-picker__body">
257
- <ax-conversation-picker-toolbar
258
- [countLabel]="getSelectedCountText()"
259
- [addMoreLabel]="translation.translateSync('@acorex:chat.pickers.common.add-more')"
260
- />
261
-
262
- <div class="ax-conversation-picker__grid">
263
- @for (image of images(); track $index) {
264
- <div class="ax-conversation-picker__tile">
265
- <img [src]="image.preview" [alt]="image.file.name" />
266
- @if (image.uploading || image.uploaded || image.error) {
267
- <div class="ax-conversation-picker__tile-overlay">
268
- @if (image.uploading) {
269
- <span class="ax-conversation-picker__tile-status">{{
270
- getUploadingLabel(image.uploadProgress ?? 0)
271
- }}</span>
272
- <ax-progress-bar [progress]="image.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
273
- } @else if (image.uploaded) {
274
- <span class="ax-conversation-picker__tile-status"
275
- ><i class="fa-light fa-check"></i>
276
- {{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
277
- >
278
- } @else if (image.error) {
279
- <span class="ax-conversation-picker__tile-status">{{ image.error }}</span>
280
- }
281
- </div>
282
- }
283
- <button
284
- type="button"
285
- class="ax-conversation-picker__tile-remove"
286
- (click)="removeImage($index)"
287
- [attr.aria-label]="
288
- image.uploading
289
- ? getCancelUploadLabel()
290
- : translation.translateSync('@acorex:chat.pickers.common.remove')
291
- "
292
- >
293
- <i class="fa-light fa-xmark"></i>
294
- </button>
295
- </div>
296
- }
297
- </div>
298
- </div>
299
- }
300
- </div>
301
-
302
- <ax-conversation-picker-caption [(caption)]="caption" />
303
-
304
- @if (images().length > 0) {
305
- <ax-conversation-picker-footer
306
- [sendText]="getSendText()"
307
- [sendDisabled]="!canSend()"
308
- (onCancel)="cancel()"
309
- (onSend)="sendImages()"
310
- />
311
- }
312
- </ax-conversation-picker-shell>
313
- `, 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"] }] }); }
314
- }
315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXConversationImagePickerComponent, decorators: [{
316
- type: Component,
317
- args: [{ selector: 'ax-conversation-image-picker', imports: [
318
- CommonModule,
319
- AXProgressBarModule,
320
- AXTranslationModule,
321
- AXConversationPickerHeaderComponent,
322
- AXConversationPickerFooterComponent,
323
- AXConversationPickerEmptyComponent,
324
- AXConversationPickerToolbarComponent,
325
- AXConversationPickerCaptionComponent,
326
- AXConversationPickerShellComponent,
327
- ], template: `
328
- <ax-conversation-picker-shell
329
- [fileType]="catalogFileType"
330
- [multiple]="allowMultiple()"
331
- (filesSelected)="handleFiles($event)"
332
- (dragEnter)="isDragging.set(true)"
333
- (dragLeave)="isDragging.set(false)"
334
- >
335
- <ax-conversation-picker-header [title]="translation.translateSync('@acorex:chat.pickers.images.title')" (onClose)="cancel()" />
336
-
337
- <div class="ax-conversation-picker__scroll">
338
- @if (images().length === 0) {
339
- <ax-conversation-picker-empty
340
- [title]="getEmptyTitle()"
341
- [hint]="getEmptySubtitle()"
342
- [iconClass]="emptyIconClass()"
343
- [dragOver]="isDragging()"
344
- />
345
- } @else {
346
- <div class="ax-conversation-picker__body">
347
- <ax-conversation-picker-toolbar
348
- [countLabel]="getSelectedCountText()"
349
- [addMoreLabel]="translation.translateSync('@acorex:chat.pickers.common.add-more')"
350
- />
351
-
352
- <div class="ax-conversation-picker__grid">
353
- @for (image of images(); track $index) {
354
- <div class="ax-conversation-picker__tile">
355
- <img [src]="image.preview" [alt]="image.file.name" />
356
- @if (image.uploading || image.uploaded || image.error) {
357
- <div class="ax-conversation-picker__tile-overlay">
358
- @if (image.uploading) {
359
- <span class="ax-conversation-picker__tile-status">{{
360
- getUploadingLabel(image.uploadProgress ?? 0)
361
- }}</span>
362
- <ax-progress-bar [progress]="image.uploadProgress || 0" [mode]="'determinate'" [height]="3" />
363
- } @else if (image.uploaded) {
364
- <span class="ax-conversation-picker__tile-status"
365
- ><i class="fa-light fa-check"></i>
366
- {{ translation.translateSync('@acorex:chat.pickers.files.uploaded') }}</span
367
- >
368
- } @else if (image.error) {
369
- <span class="ax-conversation-picker__tile-status">{{ image.error }}</span>
370
- }
371
- </div>
372
- }
373
- <button
374
- type="button"
375
- class="ax-conversation-picker__tile-remove"
376
- (click)="removeImage($index)"
377
- [attr.aria-label]="
378
- image.uploading
379
- ? getCancelUploadLabel()
380
- : translation.translateSync('@acorex:chat.pickers.common.remove')
381
- "
382
- >
383
- <i class="fa-light fa-xmark"></i>
384
- </button>
385
- </div>
386
- }
387
- </div>
388
- </div>
389
- }
390
- </div>
391
-
392
- <ax-conversation-picker-caption [(caption)]="caption" />
393
-
394
- @if (images().length > 0) {
395
- <ax-conversation-picker-footer
396
- [sendText]="getSendText()"
397
- [sendDisabled]="!canSend()"
398
- (onCancel)="cancel()"
399
- (onSend)="sendImages()"
400
- />
401
- }
402
- </ax-conversation-picker-shell>
403
- `, 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"] }]
404
- }], ctorParameters: () => [] });
405
-
406
- export { AXConversationImagePickerComponent };
407
- //# sourceMappingURL=acorex-components-conversation-image-picker.component-G9EEOyDg.mjs.map