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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/{conversation2 → conversation}/README.md +23 -23
  2. package/fesm2022/acorex-components-button.mjs +4 -4
  3. package/fesm2022/acorex-components-button.mjs.map +1 -1
  4. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +13711 -0
  5. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +1 -0
  6. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +119 -0
  7. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +1 -0
  8. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +59 -0
  9. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +1 -0
  10. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +432 -0
  11. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +1 -0
  12. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +177 -0
  13. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +1 -0
  14. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +54 -0
  15. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +1 -0
  16. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs +101 -0
  17. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map +1 -0
  18. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +100 -0
  19. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +1 -0
  20. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +121 -0
  21. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +1 -0
  22. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +84 -0
  23. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +1 -0
  24. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +238 -0
  25. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +1 -0
  26. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +1080 -0
  27. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +1 -0
  28. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +102 -0
  29. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +1 -0
  30. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +90 -0
  31. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs.map +1 -0
  32. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
  33. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
  34. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs +44 -0
  35. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +1 -0
  36. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +64 -0
  37. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +1 -0
  38. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +468 -0
  39. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +1 -0
  40. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +125 -0
  41. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +1 -0
  42. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +50 -0
  43. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs.map +1 -0
  44. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
  45. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
  46. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs +77 -0
  47. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +1 -0
  48. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +407 -0
  49. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +1 -0
  50. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +83 -0
  51. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +1 -0
  52. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +184 -0
  53. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +1 -0
  54. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +266 -0
  55. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +1 -0
  56. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +149 -0
  57. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +1 -0
  58. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +118 -0
  59. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs.map +1 -0
  60. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
  61. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
  62. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs +140 -0
  63. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +1 -0
  64. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +33 -0
  65. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +1 -0
  66. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +172 -0
  67. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +1 -0
  68. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs +224 -0
  69. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map +1 -0
  70. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +81 -0
  71. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +1 -0
  72. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +91 -0
  73. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +1 -0
  74. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +537 -0
  75. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs.map +1 -0
  76. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
  77. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
  78. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs +68 -0
  79. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs.map +1 -0
  80. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
  81. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
  82. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs +187 -0
  83. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +1 -0
  84. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +170 -0
  85. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +1 -0
  86. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +750 -0
  87. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +1 -0
  88. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +103 -0
  89. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +1 -0
  90. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +55 -0
  91. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +1 -0
  92. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +109 -0
  93. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +1 -0
  94. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +105 -0
  95. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +1 -0
  96. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +62 -0
  97. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +1 -0
  98. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +446 -0
  99. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +1 -0
  100. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +181 -0
  101. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +1 -0
  102. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +54 -0
  103. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs.map +1 -0
  104. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
  105. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
  106. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs +344 -0
  107. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +1 -0
  108. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +270 -0
  109. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map +1 -0
  110. package/fesm2022/acorex-components-conversation.mjs +2 -0
  111. package/fesm2022/acorex-components-conversation.mjs.map +1 -0
  112. package/fesm2022/acorex-components-kbd.mjs +2 -2
  113. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  114. package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
  115. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  116. package/fesm2022/acorex-components-tree-view.mjs +2 -2
  117. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  118. package/package.json +6 -6
  119. package/types/{acorex-components-conversation2.d.ts → acorex-components-conversation.d.ts} +1127 -1928
  120. package/types/acorex-components-scheduler-picker.d.ts +2 -0
  121. package/fesm2022/acorex-components-conversation2.mjs +0 -22347
  122. package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/apis/shared-storage.seed.ts"],"sourcesContent":["/**\n * Demo seed data for IndexedDB conversation APIs.\n * Dynamically imported to keep custom API consumers lean.\n */\nimport type { AXConversation, AXConversationType, AXConversationMessage, AXConversationParticipant } from '../../models';\nimport { registerChatMessage } from './chat-storage.helpers';\nimport { axConversationIndexedDbStorage } from './indexeddb-storage';\nimport { ensurePaginationDemoData } from './pagination-demo-data';\nimport type { AXConversationSharedStorage } from './shared-storage';\n\nexport async function seedSharedStorageInitialData(storage: AXConversationSharedStorage): Promise<void> {\n console.log('🌱 Seeding initial data...');\n\n // Create participants (15 users for realistic data) with profile information\n const participants: AXConversationParticipant[] = [\n {\n id: 'current-user',\n name: 'You',\n description: 'Senior Developer',\n avatar: 'https://i.pravatar.cc/150?img=1',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Software developer passionate about creating amazing user experiences',\n email: 'you@example.com',\n phone: '+1 (555) 123-4567',\n location: 'San Francisco, CA',\n company: 'Tech Corp',\n title: 'Senior Developer',\n },\n },\n {\n id: 'user-2',\n name: 'Alice Johnson',\n description: 'Lead Designer',\n avatar: 'https://i.pravatar.cc/150?img=5',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Product designer with a love for minimalist aesthetics',\n email: 'alice.johnson@example.com',\n phone: '+1 (555) 234-5678',\n location: 'New York, NY',\n company: 'Design Studio',\n title: 'Lead Designer',\n },\n },\n {\n id: 'user-3',\n name: 'Bob Smith',\n description: 'Tech Lead',\n avatar: 'https://i.pravatar.cc/150?img=12',\n status: 'away',\n lastSeen: new Date(Date.now() - 300000),\n profile: {\n bio: 'Full-stack developer and open source enthusiast',\n email: 'bob.smith@example.com',\n phone: '+1 (555) 345-6789',\n location: 'Austin, TX',\n company: 'Startup Inc',\n title: 'Tech Lead',\n },\n },\n {\n id: 'user-4',\n name: 'Carol Williams',\n description: 'Marketing Manager',\n avatar: 'https://i.pravatar.cc/150?img=20',\n status: 'offline',\n lastSeen: new Date(Date.now() - 3600000),\n profile: {\n bio: 'Marketing specialist focused on digital strategies',\n email: 'carol.williams@example.com',\n phone: '+1 (555) 456-7890',\n location: 'Los Angeles, CA',\n company: 'Marketing Pro',\n title: 'Marketing Manager',\n },\n },\n {\n id: 'user-5',\n name: 'David Brown',\n description: 'DevOps Lead',\n avatar: 'https://i.pravatar.cc/150?img=13',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'DevOps engineer passionate about automation',\n email: 'david.brown@example.com',\n phone: '+1 (555) 567-8901',\n location: 'Seattle, WA',\n company: 'Cloud Systems',\n title: 'DevOps Lead',\n },\n },\n {\n id: 'user-6',\n name: 'Emma Davis',\n description: 'UX Researcher',\n avatar: 'https://i.pravatar.cc/150?img=24',\n status: 'offline',\n lastSeen: new Date(Date.now() - 7200000),\n profile: {\n bio: 'UX researcher exploring human behavior',\n email: 'emma.davis@example.com',\n phone: '+1 (555) 678-9012',\n location: 'Boston, MA',\n company: 'Research Lab',\n title: 'UX Researcher',\n },\n },\n {\n id: 'user-7',\n name: 'Frank Miller',\n description: 'Data Scientist',\n avatar: 'https://i.pravatar.cc/150?img=33',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Data scientist turning data into insights',\n email: 'frank.miller@example.com',\n phone: '+1 (555) 789-0123',\n location: 'Chicago, IL',\n company: 'Data Corp',\n title: 'Data Scientist',\n },\n },\n {\n id: 'user-8',\n name: 'Grace Wilson',\n description: 'Mobile Developer',\n avatar: 'https://i.pravatar.cc/150?img=44',\n status: 'away',\n lastSeen: new Date(Date.now() - 600000),\n profile: {\n bio: 'Mobile app developer for iOS and Android',\n email: 'grace.wilson@example.com',\n phone: '+1 (555) 890-1234',\n location: 'Miami, FL',\n company: 'Mobile Solutions',\n title: 'Mobile Developer',\n },\n },\n {\n id: 'user-9',\n name: 'Henry Moore',\n description: 'Security Engineer',\n avatar: 'https://i.pravatar.cc/150?img=52',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Security engineer protecting digital assets',\n email: 'henry.moore@example.com',\n phone: '+1 (555) 901-2345',\n location: 'Denver, CO',\n company: 'SecureNet',\n title: 'Security Engineer',\n },\n },\n {\n id: 'user-10',\n name: 'Ivy Taylor',\n description: 'Content Strategist',\n avatar: 'https://i.pravatar.cc/150?img=47',\n status: 'offline',\n lastSeen: new Date(Date.now() - 10800000),\n profile: {\n bio: 'Content strategist crafting compelling narratives',\n email: 'ivy.taylor@example.com',\n phone: '+1 (555) 012-3456',\n location: 'Portland, OR',\n company: 'Content Agency',\n title: 'Content Strategist',\n },\n },\n {\n id: 'user-11',\n name: 'Jack Anderson',\n description: 'Backend Engineer',\n avatar: 'https://i.pravatar.cc/150?img=68',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Backend engineer building scalable systems',\n email: 'jack.anderson@example.com',\n phone: '+1 (555) 123-4560',\n location: 'Phoenix, AZ',\n company: 'Backend Systems',\n title: 'Backend Engineer',\n },\n },\n {\n id: 'user-12',\n name: 'Kate Thomas',\n description: 'Project Manager',\n avatar: 'https://i.pravatar.cc/150?img=32',\n status: 'away',\n lastSeen: new Date(Date.now() - 900000),\n profile: {\n bio: 'Project manager keeping teams on track',\n email: 'kate.thomas@example.com',\n phone: '+1 (555) 234-5601',\n location: 'Atlanta, GA',\n company: 'Project Solutions',\n title: 'Project Manager',\n },\n },\n {\n id: 'user-13',\n name: 'Leo Jackson',\n description: 'ML Engineer',\n avatar: 'https://i.pravatar.cc/150?img=59',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'AI/ML engineer exploring artificial intelligence',\n email: 'leo.jackson@example.com',\n phone: '+1 (555) 345-6012',\n location: 'San Jose, CA',\n company: 'AI Labs',\n title: 'ML Engineer',\n },\n },\n {\n id: 'user-14',\n name: 'Mia White',\n description: 'Business Analyst',\n avatar: 'https://i.pravatar.cc/150?img=45',\n status: 'offline',\n lastSeen: new Date(Date.now() - 14400000),\n profile: {\n bio: 'Business analyst bridging tech and business',\n email: 'mia.white@example.com',\n phone: '+1 (555) 456-0123',\n location: 'Dallas, TX',\n company: 'Business Analytics',\n title: 'Business Analyst',\n },\n },\n {\n id: 'user-15',\n name: 'Noah Harris',\n description: 'QA Engineer',\n avatar: 'https://i.pravatar.cc/150?img=70',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'QA engineer ensuring quality in every release',\n email: 'noah.harris@example.com',\n phone: '+1 (555) 567-0124',\n location: 'Nashville, TN',\n company: 'Quality Assurance',\n title: 'QA Engineer',\n },\n },\n /** Demo: no avatar image — only participant `icon` (Font Awesome) in the message list */\n {\n id: 'demo-icon-only-user',\n name: 'Icon Demo User',\n description: 'No profile photo — FA icon only',\n icon: 'fa-light fa-user',\n status: 'online',\n lastSeen: new Date(),\n profile: {\n bio: 'Seed user to demo participant icon without profile image',\n email: 'icon.demo@example.com',\n phone: '+1 (555) 999-0000',\n location: 'Demo',\n company: 'Acorex',\n title: 'Demo',\n },\n },\n ];\n\n // Store participants in memory and IndexedDB\n for (const p of participants) {\n storage.participants.set(p.id, p);\n await axConversationIndexedDbStorage.putParticipant(p);\n }\n\n // Create conversations: 2 private + 3 groups (includes icon-only avatar demo)\n const now = new Date();\n const conversations: AXConversation[] = [\n // Private Chat 1: Alice Johnson\n {\n id: 'conv-1',\n type: 'private',\n title: 'Alice Johnson',\n participants: [participants[0], { ...participants[1], role: 'member' }],\n lastMessageAt: new Date(now.getTime() - 60000),\n unreadCount: 2,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: {\n profile: {\n description: 'Private conversation with Alice Johnson',\n tags: ['work', 'design'],\n favorite: true,\n },\n },\n createdAt: new Date(now.getTime() - 86400000),\n updatedAt: new Date(now.getTime() - 60000),\n },\n // Private Chat 2: Bob Smith\n {\n id: 'conv-2',\n type: 'private',\n title: 'Bob Smith',\n participants: [participants[0], { ...participants[2], role: 'member' }],\n lastMessageAt: new Date(now.getTime() - 7200000),\n unreadCount: 0,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: {\n profile: {\n description: 'Private conversation with Bob Smith',\n tags: ['development', 'tech'],\n favorite: false,\n },\n },\n createdAt: new Date(now.getTime() - 259200000),\n updatedAt: new Date(now.getTime() - 7200000),\n },\n // Group Chat 1: Project Team (3-5 members)\n {\n id: 'conv-3',\n type: 'group',\n title: 'Project Team',\n avatar: 'https://i.pravatar.cc/150?img=50',\n participants: [\n { ...participants[0], role: 'admin' },\n { ...participants[1], role: 'member' },\n { ...participants[2], role: 'member' },\n { ...participants[4], role: 'member' },\n ],\n lastMessageAt: new Date(now.getTime() - 3600000),\n unreadCount: 1,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: {\n profile: {\n description: 'Team collaboration for current project',\n tags: ['work', 'project', 'team'],\n favorite: true,\n groupInfo: {\n createdBy: 'current-user',\n purpose: 'Project coordination and updates',\n },\n },\n },\n createdAt: new Date(now.getTime() - 604800000),\n updatedAt: new Date(now.getTime() - 3600000),\n },\n // Group Chat 2: Design Team (5-10 members)\n {\n id: 'conv-4',\n type: 'group',\n title: 'Design Team',\n avatar: 'https://i.pravatar.cc/150?img=65',\n participants: [\n { ...participants[0], role: 'admin' },\n { ...participants[1], role: 'member' },\n { ...participants[3], role: 'member' },\n { ...participants[5], role: 'member' },\n { ...participants[6], role: 'member' },\n { ...participants[7], role: 'member' },\n { ...participants[8], role: 'member' },\n { ...participants[10], role: 'member' },\n ],\n lastMessageAt: new Date(now.getTime() - 10800000),\n unreadCount: 0,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: {\n profile: {\n description: 'Design team collaboration and brainstorming',\n tags: ['design', 'creative', 'team'],\n favorite: false,\n groupInfo: {\n createdBy: 'user-2',\n purpose: 'Design reviews and creative discussions',\n },\n },\n },\n createdAt: new Date(now.getTime() - 1209600000),\n updatedAt: new Date(now.getTime() - 10800000),\n },\n // Group: icon-only demo (no conversation avatar image; optional `icon` for chrome that reads it)\n {\n id: 'conv-icon-demo',\n type: 'group',\n title: 'Icon-only avatars (demo)',\n icon: 'fa-light fa-users',\n participants: [\n { ...participants[0], role: 'admin' },\n { ...participants[15], role: 'member' },\n ],\n lastMessageAt: new Date(now.getTime() - 120000),\n unreadCount: 1,\n status: { isTyping: false, typingUsers: [] },\n settings: { notifications: true, showPreview: true },\n archived: false,\n metadata: {\n profile: {\n description: 'Demo: sender has no avatar URL — Font Awesome icon from participant/conversation',\n tags: ['demo', 'icon'],\n },\n },\n createdAt: new Date(now.getTime() - 86400000),\n updatedAt: new Date(now.getTime() - 120000),\n },\n ];\n\n // Store conversations in memory and IndexedDB\n for (const c of conversations) {\n storage.conversations.set(c.id, c);\n await axConversationIndexedDbStorage.putConversation(c);\n }\n\n // Create messages with ALL types for each conversation\n const messages: AXConversationMessage[] = [];\n\n // Conv-1 (Private: Alice) - All message types\n messages.push(\n {\n id: 'msg-1-1',\n conversationId: 'conv-1',\n senderId: 'user-2',\n type: 'text',\n timestamp: new Date(now.getTime() - 300000),\n payload: { type: 'text', text: 'Hey! How are you doing?' },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-1-2',\n conversationId: 'conv-1',\n senderId: 'current-user',\n type: 'text',\n timestamp: new Date(now.getTime() - 270000),\n payload: { type: 'text', text: \"I'm good! Working on the new project.\" },\n status: 'read',\n reactions: [{ emoji: '👍', userId: 'user-2', timestamp: new Date(now.getTime() - 265000) }],\n metadata: {},\n },\n {\n id: 'msg-1-3',\n conversationId: 'conv-1',\n senderId: 'user-2',\n type: 'image',\n timestamp: new Date(now.getTime() - 240000),\n payload: {\n type: 'image',\n images: [\n {\n url: 'https://picsum.photos/400/300',\n thumbnailUrl: 'https://picsum.photos/200/150',\n width: 400,\n height: 300,\n mimeType: 'image/jpeg',\n },\n ],\n caption: 'Check out this design!',\n },\n status: 'read',\n reactions: [{ emoji: '🔥', userId: 'current-user', timestamp: new Date(now.getTime() - 235000) }],\n metadata: {},\n },\n {\n id: 'msg-1-4',\n conversationId: 'conv-1',\n senderId: 'current-user',\n type: 'voice',\n timestamp: new Date(now.getTime() - 180000),\n payload: {\n type: 'voice',\n url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3',\n duration: 15,\n size: 245760,\n waveform: [0.2, 0.4, 0.6, 0.8, 0.5, 0.3, 0.7, 0.9, 0.4, 0.2],\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-1-5',\n conversationId: 'conv-1',\n senderId: 'user-2',\n type: 'audio',\n timestamp: new Date(now.getTime() - 120000),\n payload: {\n type: 'audio',\n audios: [\n {\n url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3',\n title: 'Background Music',\n duration: 180,\n size: 3145728,\n mimeType: 'audio/mpeg',\n },\n ],\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-1-6',\n conversationId: 'conv-1',\n senderId: 'current-user',\n type: 'location',\n timestamp: new Date(now.getTime() - 90000),\n payload: {\n type: 'location',\n latitude: 37.7749,\n longitude: -122.4194,\n address: 'San Francisco, CA',\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-1-7',\n conversationId: 'conv-1',\n senderId: 'user-2',\n type: 'sticker',\n timestamp: new Date(now.getTime() - 60000),\n payload: {\n type: 'sticker',\n url: 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f44d.png',\n packId: 'pack-1',\n id: 'sticker-thumbs-up',\n animated: false,\n },\n status: 'delivered',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-1-8',\n conversationId: 'conv-1',\n senderId: 'user-2',\n type: 'file',\n timestamp: new Date(now.getTime() - 30000),\n payload: {\n type: 'file',\n files: [\n {\n url: 'https://example.com/document.pdf',\n name: 'Project_Proposal.pdf',\n size: 2048576,\n mimeType: 'application/pdf',\n },\n ],\n },\n status: 'delivered',\n reactions: [],\n metadata: {},\n },\n );\n\n // Conv-2 (Private: Bob) - Mixed messages\n messages.push(\n {\n id: 'msg-2-1',\n conversationId: 'conv-2',\n senderId: 'user-3',\n type: 'text',\n timestamp: new Date(now.getTime() - 7200000),\n payload: { type: 'text', text: 'Did you see the latest updates?' },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-2-2',\n conversationId: 'conv-2',\n senderId: 'current-user',\n type: 'video',\n timestamp: new Date(now.getTime() - 7180000),\n payload: {\n type: 'video',\n videos: [\n {\n url: 'https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4',\n thumbnailUrl: 'https://picsum.photos/640/360',\n duration: 60,\n size: 1048576,\n width: 1280,\n height: 720,\n mimeType: 'video/mp4',\n },\n ],\n },\n status: 'read',\n reactions: [{ emoji: '😂', userId: 'user-3', timestamp: new Date(now.getTime() - 7175000) }],\n metadata: {},\n },\n );\n\n // Conv-3 (Group: Project Team) - Group messages\n messages.push(\n {\n id: 'msg-3-1',\n conversationId: 'conv-3',\n senderId: 'user-2',\n type: 'text',\n timestamp: new Date(now.getTime() - 3700000),\n payload: { type: 'text', text: 'Team meeting at 3 PM today!' },\n status: 'read',\n reactions: [\n { emoji: '👍', userId: 'current-user', timestamp: new Date(now.getTime() - 3695000) },\n { emoji: '👍', userId: 'user-3', timestamp: new Date(now.getTime() - 3690000) },\n ],\n metadata: {},\n },\n {\n id: 'msg-3-2',\n conversationId: 'conv-3',\n senderId: 'user-5',\n type: 'image',\n timestamp: new Date(now.getTime() - 3650000),\n payload: {\n type: 'image',\n images: [\n {\n url: 'https://picsum.photos/800/600',\n thumbnailUrl: 'https://picsum.photos/200/150',\n width: 800,\n height: 600,\n mimeType: 'image/jpeg',\n },\n ],\n caption: 'Sprint planning board',\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-3-3',\n conversationId: 'conv-3',\n senderId: 'current-user',\n type: 'text',\n timestamp: new Date(now.getTime() - 3600000),\n payload: { type: 'text', text: 'Great work everyone! 🎉' },\n status: 'read',\n reactions: [{ emoji: '🎉', userId: 'user-2', timestamp: new Date(now.getTime() - 3595000) }],\n metadata: {},\n },\n {\n id: 'msg-3-4',\n conversationId: 'conv-3',\n senderId: 'user-2',\n type: 'text',\n timestamp: new Date(now.getTime() - 3550000),\n payload: { type: 'text', text: 'Thanks! Looking forward to it.' },\n status: 'delivered',\n reactions: [],\n metadata: {},\n },\n );\n\n // Conv-4 (Group: Design Team) - Design-related messages\n messages.push(\n {\n id: 'msg-4-1',\n conversationId: 'conv-4',\n senderId: 'user-7',\n type: 'text',\n timestamp: new Date(now.getTime() - 10900000),\n payload: { type: 'text', text: 'New design mockups are ready for review' },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-4-2',\n conversationId: 'conv-4',\n senderId: 'user-8',\n type: 'file',\n timestamp: new Date(now.getTime() - 10850000),\n payload: {\n type: 'file',\n files: [\n {\n url: 'https://example.com/designs.zip',\n name: 'UI_Designs_v2.zip',\n size: 15728640,\n mimeType: 'application/zip',\n },\n ],\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-4-3',\n conversationId: 'conv-4',\n senderId: 'current-user',\n type: 'sticker',\n timestamp: new Date(now.getTime() - 10800000),\n payload: {\n type: 'sticker',\n url: 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f389.png',\n packId: 'pack-1',\n id: 'sticker-party',\n animated: false,\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n );\n\n // Conv-icon-demo: messages from icon-only participant (no avatar image, FA icon in list)\n messages.push(\n {\n id: 'msg-icon-1',\n conversationId: 'conv-icon-demo',\n senderId: 'demo-icon-only-user',\n type: 'text',\n timestamp: new Date(now.getTime() - 300000),\n payload: {\n type: 'text',\n text: 'Hi — I have no profile photo, only a Font Awesome icon.',\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-icon-2',\n conversationId: 'conv-icon-demo',\n senderId: 'current-user',\n type: 'text',\n timestamp: new Date(now.getTime() - 240000),\n payload: {\n type: 'text',\n text: 'Looks good — the message list shows the icon where an avatar would be.',\n },\n status: 'read',\n reactions: [],\n metadata: {},\n },\n {\n id: 'msg-icon-3',\n conversationId: 'conv-icon-demo',\n senderId: 'demo-icon-only-user',\n type: 'text',\n timestamp: new Date(now.getTime() - 120000),\n payload: {\n type: 'text',\n text: 'Useful for bots or users without uploaded photos.',\n },\n status: 'delivered',\n reactions: [],\n metadata: {},\n },\n );\n\n // Store all messages in memory and IndexedDB (sorted per conversation)\n for (const m of messages) {\n registerChatMessage(m);\n await axConversationIndexedDbStorage.putMessage(m);\n }\n\n // Update conversations with last messages\n conversations[0].lastMessage = messages.find((m) => m.id === 'msg-1-8');\n conversations[1].lastMessage = messages.find((m) => m.id === 'msg-2-2');\n conversations[2].lastMessage = messages.find((m) => m.id === 'msg-3-3');\n conversations[3].lastMessage = messages.find((m) => m.id === 'msg-4-3');\n conversations[4].lastMessage = messages.find((m) => m.id === 'msg-icon-3');\n\n // Update in memory and IndexedDB\n for (const c of conversations) {\n storage.conversations.set(c.id, c);\n await axConversationIndexedDbStorage.putConversation(c);\n }\n\n await axConversationIndexedDbStorage.putSetting('isSeeded', true);\n storage.markSeeded();\n await ensurePaginationDemoData();\n storage.startDemoSimulations();\n}\n"],"names":[],"mappings":";;;AAUO,eAAe,4BAA4B,CAAC,OAAoC,EAAA;AACnF,IAAA,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;;AAGzC,IAAA,MAAM,YAAY,GAAgC;AAChD,QAAA;AACE,YAAA,EAAE,EAAE,cAAc;AAClB,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,WAAW,EAAE,kBAAkB;AAC/B,YAAA,MAAM,EAAE,iCAAiC;AACzC,YAAA,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,IAAI,IAAI,EAAE;AACpB,YAAA,OAAO,EAAE;AACL,gBAAA,GAAG,EAAE,uEAAuE;AAC5E,gBAAA,KAAK,EAAE,iBAAiB;AACxB,gBAAA,KAAK,EAAE,mBAAmB;AAC1B,gBAAA,QAAQ,EAAE,mBAAmB;AAC7B,gBAAA,OAAO,EAAE,WAAW;AACpB,gBAAA,KAAK,EAAE,kBAAkB;AAC5B,aAAA;AACF,SAAA;AACD,QAAA;AACE,YAAA,EAAE,EAAE,QAAQ;AACZ,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,WAAW,EAAE,eAAe;AAC5B,YAAA,MAAM,EAAE,iCAAiC;AACzC,YAAA,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,IAAI,IAAI,EAAE;AACpB,YAAA,OAAO,EAAE;AACL,gBAAA,GAAG,EAAE,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,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC;IACvE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC;IACvE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC;IACvE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC;IACvE,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,YAAY,CAAC;;AAG1E,IAAA,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE;QAC7B,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClC,QAAA,MAAM,8BAA8B,CAAC,eAAe,CAAC,CAAC,CAAC;IACzD;IAEA,MAAM,8BAA8B,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC;IACnE,OAAO,CAAC,UAAU,EAAE;IACpB,MAAM,wBAAwB,EAAE;IAChC,OAAO,CAAC,oBAAoB,EAAE;AAChC;;;;"}
@@ -0,0 +1,103 @@
1
+ import { AXLabelComponent } from '@acorex/components/label';
2
+ import { AXLoadingComponent } from '@acorex/components/loading';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { signal, input, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
6
+ import { A as AXConversationMessageRendererStateComponent } from './acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs';
7
+ import { x as createResolvedMediaUrlSignal } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
8
+
9
+ class AXConversationStickerRendererComponent {
10
+ constructor() {
11
+ this._contentState = signal('loading', ...(ngDevMode ? [{ debugName: "_contentState" }] : /* istanbul ignore next */ []));
12
+ this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
13
+ this.rendererState = computed(() => ({
14
+ deliveryStatus: this.message().status,
15
+ contentState: this._contentState(),
16
+ }), ...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
17
+ this.payload = computed(() => this.message().payload, ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
18
+ this.mediaReference = computed(() => ({
19
+ url: this.payload().url,
20
+ mediaId: this.payload().mediaId,
21
+ mimeType: this.payload().mimeType,
22
+ }), ...(ngDevMode ? [{ debugName: "mediaReference" }] : /* istanbul ignore next */ []));
23
+ this.resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);
24
+ this.stickerUrl = computed(() => this.resolvedUrl() ?? this.payload().url ?? '', ...(ngDevMode ? [{ debugName: "stickerUrl" }] : /* istanbul ignore next */ []));
25
+ this.alt = computed(() => this.payload().emoji || 'Sticker', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
26
+ effect(() => {
27
+ this.message().id;
28
+ this.stickerUrl();
29
+ this._contentState.set('loading');
30
+ });
31
+ }
32
+ onLoad() {
33
+ this._contentState.set('ready');
34
+ }
35
+ onError() {
36
+ this._contentState.set('error');
37
+ }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationStickerRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationStickerRendererComponent, isStandalone: true, selector: "ax-conversation-sticker-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
40
+ <div class="ax-conversation-sticker">
41
+ @if (rendererState().contentState === 'loading') {
42
+ <div class="ax-conversation-sticker__state" aria-busy="true">
43
+ <ax-loading></ax-loading>
44
+ <ax-label class="ax-conversation-sticker__loading-label">Loading sticker...</ax-label>
45
+ </div>
46
+ }
47
+ <img
48
+ class="ax-conversation-sticker__img"
49
+ [src]="stickerUrl()"
50
+ [alt]="alt()"
51
+ [class.ax-conversation-sticker__img--loading]="rendererState().contentState === 'loading'"
52
+ [class.ax-conversation-sticker__img--ready]="rendererState().contentState === 'ready'"
53
+ [class.ax-conversation-sticker__img--hidden]="rendererState().contentState === 'error'"
54
+ loading="lazy"
55
+ (load)="onLoad()"
56
+ (error)="onError()"
57
+ />
58
+ <ax-conversation-message-renderer-state
59
+ [rendererState]="rendererState()"
60
+ [message]="message()"
61
+ contentErrorLabel="Sticker unavailable"
62
+ contentErrorStyle="inline"
63
+ contentErrorIconClass="fa-light fa-face-smile"
64
+ placement="below"
65
+ />
66
+ </div>
67
+ `, isInline: true, styles: [":host{display:block}:host{max-width:100%}.ax-conversation-sticker{position:relative;display:inline-block;max-width:min(100%,8.75rem);margin-block:.125rem}.ax-conversation-sticker__img{display:block;width:100%;height:auto;max-height:min(40dvh,8.75rem);object-fit:contain;opacity:0;transition:opacity .2s ease;cursor:default}.ax-conversation-sticker__img--loading{position:absolute;width:0;height:0;margin:0;border:0;padding:0;overflow:hidden;visibility:hidden;pointer-events:none}.ax-conversation-sticker__img--ready{opacity:1}.ax-conversation-sticker__img--hidden{visibility:hidden;position:absolute;width:0;height:0;opacity:0;pointer-events:none}.ax-conversation-sticker__state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-width:112px;min-height:112px;max-width:160px;padding:.5rem .375rem;text-align:center;border-radius:var(--ax-sys-border-radius);background:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-surface));opacity:.85}.ax-conversation-sticker__loading-label{font-size:.6875rem;line-height:1.2}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
68
+ }
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationStickerRendererComponent, decorators: [{
70
+ type: Component,
71
+ args: [{ selector: 'ax-conversation-sticker-renderer', imports: [CommonModule, AXLabelComponent, AXLoadingComponent, AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
72
+ <div class="ax-conversation-sticker">
73
+ @if (rendererState().contentState === 'loading') {
74
+ <div class="ax-conversation-sticker__state" aria-busy="true">
75
+ <ax-loading></ax-loading>
76
+ <ax-label class="ax-conversation-sticker__loading-label">Loading sticker...</ax-label>
77
+ </div>
78
+ }
79
+ <img
80
+ class="ax-conversation-sticker__img"
81
+ [src]="stickerUrl()"
82
+ [alt]="alt()"
83
+ [class.ax-conversation-sticker__img--loading]="rendererState().contentState === 'loading'"
84
+ [class.ax-conversation-sticker__img--ready]="rendererState().contentState === 'ready'"
85
+ [class.ax-conversation-sticker__img--hidden]="rendererState().contentState === 'error'"
86
+ loading="lazy"
87
+ (load)="onLoad()"
88
+ (error)="onError()"
89
+ />
90
+ <ax-conversation-message-renderer-state
91
+ [rendererState]="rendererState()"
92
+ [message]="message()"
93
+ contentErrorLabel="Sticker unavailable"
94
+ contentErrorStyle="inline"
95
+ contentErrorIconClass="fa-light fa-face-smile"
96
+ placement="below"
97
+ />
98
+ </div>
99
+ `, styles: [":host{display:block}:host{max-width:100%}.ax-conversation-sticker{position:relative;display:inline-block;max-width:min(100%,8.75rem);margin-block:.125rem}.ax-conversation-sticker__img{display:block;width:100%;height:auto;max-height:min(40dvh,8.75rem);object-fit:contain;opacity:0;transition:opacity .2s ease;cursor:default}.ax-conversation-sticker__img--loading{position:absolute;width:0;height:0;margin:0;border:0;padding:0;overflow:hidden;visibility:hidden;pointer-events:none}.ax-conversation-sticker__img--ready{opacity:1}.ax-conversation-sticker__img--hidden{visibility:hidden;position:absolute;width:0;height:0;opacity:0;pointer-events:none}.ax-conversation-sticker__state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-width:112px;min-height:112px;max-width:160px;padding:.5rem .375rem;text-align:center;border-radius:var(--ax-sys-border-radius);background:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-surface));opacity:.85}.ax-conversation-sticker__loading-label{font-size:.6875rem;line-height:1.2}\n"] }]
100
+ }], ctorParameters: () => [], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
101
+
102
+ export { AXConversationStickerRendererComponent };
103
+ //# sourceMappingURL=acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/sticker-renderer/sticker-renderer.component.ts"],"sourcesContent":["import { AXLabelComponent } from '@acorex/components/label';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, input, signal } from '@angular/core';\nimport type { AXConversationMessage, AXConversationStickerPayload } from '../../../../models';\nimport type {\n AXConversationMessageRendererComponent,\n AXConversationMessageRendererContentState,\n} from '../../../../registries/message-renderer.registry';\nimport { AXConversationMessageRendererStateComponent } from '../shared/message-renderer-state.component';\nimport { createResolvedMediaUrlSignal } from '../shared/media-url-resolve';\n\n@Component({\n selector: 'ax-conversation-sticker-renderer',\n imports: [CommonModule, AXLabelComponent, AXLoadingComponent, AXConversationMessageRendererStateComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-sticker\">\n @if (rendererState().contentState === 'loading') {\n <div class=\"ax-conversation-sticker__state\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n <ax-label class=\"ax-conversation-sticker__loading-label\">Loading sticker...</ax-label>\n </div>\n }\n <img\n class=\"ax-conversation-sticker__img\"\n [src]=\"stickerUrl()\"\n [alt]=\"alt()\"\n [class.ax-conversation-sticker__img--loading]=\"rendererState().contentState === 'loading'\"\n [class.ax-conversation-sticker__img--ready]=\"rendererState().contentState === 'ready'\"\n [class.ax-conversation-sticker__img--hidden]=\"rendererState().contentState === 'error'\"\n loading=\"lazy\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n />\n <ax-conversation-message-renderer-state\n [rendererState]=\"rendererState()\"\n [message]=\"message()\"\n contentErrorLabel=\"Sticker unavailable\"\n contentErrorStyle=\"inline\"\n contentErrorIconClass=\"fa-light fa-face-smile\"\n placement=\"below\"\n />\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n :host {\n max-width: 100%;\n }\n\n .ax-conversation-sticker {\n position: relative;\n display: inline-block;\n max-width: min(100%, 8.75rem);\n margin-block: 0.125rem;\n }\n\n .ax-conversation-sticker__img {\n display: block;\n width: 100%;\n height: auto;\n max-height: min(40dvh, 8.75rem);\n object-fit: contain;\n opacity: 0;\n transition: opacity 0.2s ease;\n cursor: default;\n }\n\n /* While loading, keep <img> in the DOM (so it still loads) but out of layout — opacity alone still reserves intrinsic size */\n .ax-conversation-sticker__img--loading {\n position: absolute;\n width: 0;\n height: 0;\n margin: 0;\n border: 0;\n padding: 0;\n overflow: hidden;\n visibility: hidden;\n pointer-events: none;\n }\n\n .ax-conversation-sticker__img--ready {\n opacity: 1;\n }\n\n .ax-conversation-sticker__img--hidden {\n visibility: hidden;\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n pointer-events: none;\n }\n\n .ax-conversation-sticker__state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n min-width: 112px;\n min-height: 112px;\n max-width: 160px;\n padding: 0.5rem 0.375rem;\n text-align: center;\n border-radius: var(--ax-sys-border-radius);\n background: rgb(var(--ax-sys-color-lighter-surface));\n color: rgb(var(--ax-sys-color-on-surface));\n opacity: 0.85;\n }\n\n .ax-conversation-sticker__loading-label {\n font-size: 0.6875rem;\n line-height: 1.2;\n }\n\n `,\n ],\n})\nexport class AXConversationStickerRendererComponent implements AXConversationMessageRendererComponent {\n private readonly _contentState = signal<AXConversationMessageRendererContentState>('loading');\n\n readonly message = input.required<AXConversationMessage>();\n readonly rendererState = computed(() => ({\n deliveryStatus: this.message().status,\n contentState: this._contentState(),\n }));\n\n readonly payload = computed(() => this.message().payload as AXConversationStickerPayload);\n private readonly mediaReference = computed(() => ({\n url: this.payload().url,\n mediaId: this.payload().mediaId,\n mimeType: this.payload().mimeType,\n }));\n private readonly resolvedUrl = createResolvedMediaUrlSignal(this.mediaReference);\n readonly stickerUrl = computed(() => this.resolvedUrl() ?? this.payload().url ?? '');\n readonly alt = computed(() => this.payload().emoji || 'Sticker');\n\n constructor() {\n effect(() => {\n this.message().id;\n this.stickerUrl();\n this._contentState.set('loading');\n });\n }\n\n onLoad(): void {\n this._contentState.set('ready');\n }\n\n onError(): void {\n this._contentState.set('error');\n }\n}\n"],"names":[],"mappings":";;;;;;;;MA4Ha,sCAAsC,CAAA;AAmBjD,IAAA,WAAA,GAAA;AAlBiB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAA4C,SAAS,oFAAC;AAEpF,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAyB;AACjD,QAAA,IAAA,CAAA,aAAa,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AA,EAAA,CAAA;kBAhHlD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,EAAA,OAAA,EACnC,CAAC,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,2CAA2C,CAAC,EAAA,eAAA,EACzF,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,0jCAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,55 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { signal, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { A as AXConversationMessageRendererStateComponent } from './acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs';
5
+
6
+ const AX_CONVERSATION_EVENT_ICONS = {
7
+ user_joined: 'fa-light fa-user-plus',
8
+ user_left: 'fa-light fa-user-minus',
9
+ title_changed: 'fa-light fa-pen',
10
+ avatar_changed: 'fa-light fa-image',
11
+ };
12
+ class AXConversationSystemRendererComponent {
13
+ constructor() {
14
+ this._contentState = signal('none', ...(ngDevMode ? [{ debugName: "_contentState" }] : /* istanbul ignore next */ []));
15
+ this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
16
+ this.rendererState = computed(() => ({
17
+ deliveryStatus: this.message().status,
18
+ contentState: this._contentState(),
19
+ }), ...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
20
+ this.payload = computed(() => this.message().payload, ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
21
+ this.iconClass = computed(() => {
22
+ const type = this.payload().eventType;
23
+ return AX_CONVERSATION_EVENT_ICONS[type] ?? 'fa-light fa-info-circle';
24
+ }, ...(ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []));
25
+ }
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationSystemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
27
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXConversationSystemRendererComponent, isStandalone: true, selector: "ax-conversation-system-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
28
+ <div class="ax-conversation-system-stack">
29
+ <ax-conversation-message-renderer-state [rendererState]="rendererState()" [message]="message()" />
30
+ <div class="ax-conversation-system" role="status">
31
+ <span class="ax-conversation-system__icon" aria-hidden="true">
32
+ <i [class]="iconClass()"></i>
33
+ </span>
34
+ <span class="ax-conversation-system__label">{{ payload().text }}</span>
35
+ </div>
36
+ </div>
37
+ `, isInline: true, styles: [":host{display:block;width:100%}.ax-conversation-system-stack{display:flex;flex-direction:column;width:100%;align-items:stretch}.ax-conversation-system{display:flex;align-items:center;justify-content:center;gap:.375rem;margin-block:.375rem;padding-inline:.5rem;font-size:.75rem;font-style:italic;color:rgb(var(--ax-sys-color-on-surface));opacity:.62}.ax-conversation-system__icon{display:inline-flex;font-size:.8125rem;opacity:.9}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationSystemRendererComponent, decorators: [{
40
+ type: Component,
41
+ args: [{ selector: 'ax-conversation-system-renderer', imports: [CommonModule, AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
42
+ <div class="ax-conversation-system-stack">
43
+ <ax-conversation-message-renderer-state [rendererState]="rendererState()" [message]="message()" />
44
+ <div class="ax-conversation-system" role="status">
45
+ <span class="ax-conversation-system__icon" aria-hidden="true">
46
+ <i [class]="iconClass()"></i>
47
+ </span>
48
+ <span class="ax-conversation-system__label">{{ payload().text }}</span>
49
+ </div>
50
+ </div>
51
+ `, styles: [":host{display:block;width:100%}.ax-conversation-system-stack{display:flex;flex-direction:column;width:100%;align-items:stretch}.ax-conversation-system{display:flex;align-items:center;justify-content:center;gap:.375rem;margin-block:.375rem;padding-inline:.5rem;font-size:.75rem;font-style:italic;color:rgb(var(--ax-sys-color-on-surface));opacity:.62}.ax-conversation-system__icon{display:inline-flex;font-size:.8125rem;opacity:.9}\n"] }]
52
+ }], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
53
+
54
+ export { AXConversationSystemRendererComponent };
55
+ //# sourceMappingURL=acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-system-renderer.component-uie3tm5N.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/system-renderer/system-renderer.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core';\nimport type { AXConversationMessage, AXConversationSystemPayload } from '../../../../models';\nimport type {\n AXConversationMessageRendererComponent,\n AXConversationMessageRendererContentState,\n} from '../../../../registries/message-renderer.registry';\nimport { AXConversationMessageRendererStateComponent } from '../shared/message-renderer-state.component';\n\nconst AX_CONVERSATION_EVENT_ICONS: Record<string, string> = {\n user_joined: 'fa-light fa-user-plus',\n user_left: 'fa-light fa-user-minus',\n title_changed: 'fa-light fa-pen',\n avatar_changed: 'fa-light fa-image',\n};\n\n@Component({\n selector: 'ax-conversation-system-renderer',\n imports: [CommonModule, AXConversationMessageRendererStateComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-system-stack\">\n <ax-conversation-message-renderer-state [rendererState]=\"rendererState()\" [message]=\"message()\" />\n <div class=\"ax-conversation-system\" role=\"status\">\n <span class=\"ax-conversation-system__icon\" aria-hidden=\"true\">\n <i [class]=\"iconClass()\"></i>\n </span>\n <span class=\"ax-conversation-system__label\">{{ payload().text }}</span>\n </div>\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n width: 100%;\n }\n\n .ax-conversation-system-stack {\n display: flex;\n flex-direction: column;\n width: 100%;\n align-items: stretch;\n }\n\n .ax-conversation-system {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.375rem;\n margin-block: 0.375rem;\n padding-inline: 0.5rem;\n font-size: 0.75rem;\n font-style: italic;\n color: rgb(var(--ax-sys-color-on-surface));\n opacity: 0.62;\n }\n\n .ax-conversation-system__icon {\n display: inline-flex;\n font-size: 0.8125rem;\n opacity: 0.9;\n }\n `,\n ],\n})\nexport class AXConversationSystemRendererComponent implements AXConversationMessageRendererComponent {\n private readonly _contentState = signal<AXConversationMessageRendererContentState>('none');\n\n readonly message = input.required<AXConversationMessage>();\n readonly rendererState = computed(() => ({\n deliveryStatus: this.message().status,\n contentState: this._contentState(),\n }));\n readonly payload = computed(() => this.message().payload as AXConversationSystemPayload);\n\n readonly iconClass = computed(() => {\n const type = this.payload().eventType;\n return AX_CONVERSATION_EVENT_ICONS[type] ?? 'fa-light fa-info-circle';\n });\n}\n"],"names":[],"mappings":";;;;;AASA,MAAM,2BAA2B,GAA2B;AAC1D,IAAA,WAAW,EAAE,uBAAuB;AACpC,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,aAAa,EAAE,iBAAiB;AAChC,IAAA,cAAc,EAAE,mBAAmB;CACpC;MAoDY,qCAAqC,CAAA;AAlDlD,IAAA,WAAA,GAAA;AAmDmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAA4C,MAAM,oFAAC;AAEjF,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK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MAAA,EAAA,CAAA,eAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,wBAAA,EAAA,mBAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAgDxD,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAlDjD,SAAS;+BACE,iCAAiC,EAAA,OAAA,EAClC,CAAC,YAAY,EAAE,2CAA2C,CAAC,EAAA,eAAA,EACnD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ibAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,109 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, SecurityContext, Injectable, signal, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { m as AXConversationInfoBarService } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
4
+ import { A as AXConversationMessageRendererCopyHostComponent } from './acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs';
5
+ import { DomSanitizer } from '@angular/platform-browser';
6
+ import { A as AXConversationMessageRendererStateComponent } from './acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs';
7
+
8
+ /**
9
+ * Sanitizer Utility Service
10
+ * Centralized DOM sanitization helpers for user-generated content
11
+ */
12
+ class AXConversationSanitizerService {
13
+ constructor() {
14
+ this.dom = inject(DomSanitizer);
15
+ }
16
+ /** Sanitize HTML string, returns empty string when unsafe */
17
+ sanitizeHtml(html) {
18
+ return this.dom.sanitize(SecurityContext.HTML, html) || '';
19
+ }
20
+ /** Sanitize and return SafeHtml for bindings expecting SafeHtml */
21
+ safeHtml(html) {
22
+ // We first sanitize to strip dangerous content, then bypass to mark as safe
23
+ const sanitized = this.sanitizeHtml(html);
24
+ return this.dom.bypassSecurityTrustHtml(sanitized);
25
+ }
26
+ /** Escape plain text into safe HTML text */
27
+ escapeHtml(text) {
28
+ return this.dom.sanitize(SecurityContext.HTML, text) || '';
29
+ }
30
+ /** Sanitize URL for href/src usage; returns null if unsafe */
31
+ sanitizeUrl(url) {
32
+ return this.dom.sanitize(SecurityContext.URL, url);
33
+ }
34
+ /** Sanitize and return SafeUrl for bindings expecting SafeUrl */
35
+ safeUrl(url) {
36
+ const clean = this.sanitizeUrl(url) || '';
37
+ return this.dom.bypassSecurityTrustUrl(clean);
38
+ }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationSanitizerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
40
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationSanitizerService, providedIn: 'root' }); }
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationSanitizerService, decorators: [{
43
+ type: Injectable,
44
+ args: [{ providedIn: 'root' }]
45
+ }] });
46
+
47
+ class AXConversationTextRendererComponent extends AXConversationMessageRendererCopyHostComponent {
48
+ constructor() {
49
+ super(...arguments);
50
+ this.infoBarService = inject(AXConversationInfoBarService);
51
+ this.sanitizer = inject(AXConversationSanitizerService);
52
+ this._contentState = signal('none', ...(ngDevMode ? [{ debugName: "_contentState" }] : /* istanbul ignore next */ []));
53
+ this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
54
+ this.rendererState = computed(() => ({
55
+ deliveryStatus: this.message().status,
56
+ contentState: this._contentState(),
57
+ }), ...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
58
+ this.searchQuery = this.infoBarService.searchQuery;
59
+ this.formattedText = computed(() => {
60
+ const msg = this.message();
61
+ const payload = msg.payload;
62
+ const text = payload.text ?? '';
63
+ const query = this.searchQuery();
64
+ let escaped = this.sanitizer.escapeHtml(text);
65
+ if (query?.trim()) {
66
+ escaped = this.highlightSearch(escaped, query);
67
+ }
68
+ return this.sanitizer.safeHtml(this.linkify(escaped));
69
+ }, ...(ngDevMode ? [{ debugName: "formattedText" }] : /* istanbul ignore next */ []));
70
+ }
71
+ copy() {
72
+ return this.message().payload.text?.trim() ?? '';
73
+ }
74
+ linkify(text) {
75
+ const urlRegex = /(https?:\/\/[^\s]+)/g;
76
+ return text.replace(urlRegex, (url) => {
77
+ const safeUrl = this.sanitizer.sanitizeUrl(url) || '#';
78
+ return `<a href="${safeUrl}" target="_blank" rel="noopener noreferrer">${url}</a>`;
79
+ });
80
+ }
81
+ highlightSearch(text, query) {
82
+ const trimmed = query.trim();
83
+ if (!trimmed) {
84
+ return text;
85
+ }
86
+ const escapedQuery = trimmed.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
87
+ const regex = new RegExp(`(${escapedQuery})`, 'gi');
88
+ return text.replace(regex, '<mark>$1</mark>');
89
+ }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationTextRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: AXConversationTextRendererComponent, isStandalone: true, selector: "ax-conversation-text-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
92
+ <div class="ax-conversation-text">
93
+ <ax-conversation-message-renderer-state [rendererState]="rendererState()" [message]="message()" />
94
+ <div class="ax-conversation-text__body" [innerHTML]="formattedText()"></div>
95
+ </div>
96
+ `, isInline: true, styles: [":host{display:block}.ax-conversation-text__body{word-break:break-word;overflow-wrap:break-word;text-wrap:pretty;white-space:pre-wrap;line-height:1.5;font-size:.875rem;letter-spacing:.01em}.ax-conversation-text__body ::ng-deep a{color:rgb(var(--ax-sys-color-primary-600));text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}@media(hover:hover){.ax-conversation-text__body ::ng-deep a:hover{color:rgb(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}}.ax-conversation-text__body ::ng-deep mark{background:rgb(var(--ax-sys-color-warning-lightest-surface));padding:.0625rem .3125rem;border-radius:var(--ax-sys-border-radius);font-weight:500;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-warning-500),.2)}\n"], dependencies: [{ kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationTextRendererComponent, decorators: [{
99
+ type: Component,
100
+ args: [{ selector: 'ax-conversation-text-renderer', imports: [AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
101
+ <div class="ax-conversation-text">
102
+ <ax-conversation-message-renderer-state [rendererState]="rendererState()" [message]="message()" />
103
+ <div class="ax-conversation-text__body" [innerHTML]="formattedText()"></div>
104
+ </div>
105
+ `, styles: [":host{display:block}.ax-conversation-text__body{word-break:break-word;overflow-wrap:break-word;text-wrap:pretty;white-space:pre-wrap;line-height:1.5;font-size:.875rem;letter-spacing:.01em}.ax-conversation-text__body ::ng-deep a{color:rgb(var(--ax-sys-color-primary-600));text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}@media(hover:hover){.ax-conversation-text__body ::ng-deep a:hover{color:rgb(var(--ax-sys-color-primary-700));text-decoration-thickness:2px}}.ax-conversation-text__body ::ng-deep mark{background:rgb(var(--ax-sys-color-warning-lightest-surface));padding:.0625rem .3125rem;border-radius:var(--ax-sys-border-radius);font-weight:500;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-warning-500),.2)}\n"] }]
106
+ }], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
107
+
108
+ export { AXConversationTextRendererComponent };
109
+ //# sourceMappingURL=acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-text-renderer.component-DNAquHYK.mjs","sources":["../../../../packages/components/conversation/src/lib/utils/sanitizer.service.ts","../../../../packages/components/conversation/src/lib/plugins/message-list/components/text-renderer/text-renderer.component.ts"],"sourcesContent":["/**\n * Sanitizer Utility Service\n * Centralized DOM sanitization helpers for user-generated content\n */\n\nimport { Injectable, SecurityContext, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml, SafeUrl } from '@angular/platform-browser';\n\n@Injectable({ providedIn: 'root' })\nexport class AXConversationSanitizerService {\n private readonly dom = inject(DomSanitizer);\n\n /** Sanitize HTML string, returns empty string when unsafe */\n sanitizeHtml(html: string): string {\n return this.dom.sanitize(SecurityContext.HTML, html) || '';\n }\n\n /** Sanitize and return SafeHtml for bindings expecting SafeHtml */\n safeHtml(html: string): SafeHtml {\n // We first sanitize to strip dangerous content, then bypass to mark as safe\n const sanitized = this.sanitizeHtml(html);\n return this.dom.bypassSecurityTrustHtml(sanitized);\n }\n\n /** Escape plain text into safe HTML text */\n escapeHtml(text: string): string {\n return this.dom.sanitize(SecurityContext.HTML, text) || '';\n }\n\n /** Sanitize URL for href/src usage; returns null if unsafe */\n sanitizeUrl(url: string): string | null {\n return this.dom.sanitize(SecurityContext.URL, url);\n }\n\n /** Sanitize and return SafeUrl for bindings expecting SafeUrl */\n safeUrl(url: string): SafeUrl {\n const clean = this.sanitizeUrl(url) || '';\n return this.dom.bypassSecurityTrustUrl(clean);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, signal } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { AXConversationInfoBarService } from '../../../../components';\nimport type { AXConversationMessage, AXConversationTextPayload } from '../../../../models';\nimport type { AXConversationMessageRendererContentState } from '../../../../registries/message-renderer.registry';\nimport { AXConversationMessageRendererCopyHostComponent } from '../shared/message-renderer-copy-host.component';\nimport { AXConversationSanitizerService } from '../../../../utils/sanitizer.service';\nimport { AXConversationMessageRendererStateComponent } from '../shared/message-renderer-state.component';\n\n@Component({\n selector: 'ax-conversation-text-renderer',\n imports: [AXConversationMessageRendererStateComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-text\">\n <ax-conversation-message-renderer-state [rendererState]=\"rendererState()\" [message]=\"message()\" />\n <div class=\"ax-conversation-text__body\" [innerHTML]=\"formattedText()\"></div>\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .ax-conversation-text__body {\n word-break: break-word;\n overflow-wrap: break-word;\n text-wrap: pretty;\n white-space: pre-wrap;\n line-height: 1.5;\n font-size: 0.875rem;\n letter-spacing: 0.01em;\n }\n\n .ax-conversation-text__body ::ng-deep a {\n color: rgb(var(--ax-sys-color-primary-600));\n text-decoration: underline;\n text-decoration-thickness: 1px;\n text-underline-offset: 2px;\n }\n\n @media (hover: hover) {\n .ax-conversation-text__body ::ng-deep a:hover {\n color: rgb(var(--ax-sys-color-primary-700));\n text-decoration-thickness: 2px;\n }\n }\n\n .ax-conversation-text__body ::ng-deep mark {\n background: rgb(var(--ax-sys-color-warning-lightest-surface));\n padding: 0.0625rem 0.3125rem;\n border-radius: var(--ax-sys-border-radius);\n font-weight: 500;\n box-shadow: 0 0 0 1px rgba(var(--ax-sys-color-warning-500), 0.2);\n }\n `,\n ],\n})\nexport class AXConversationTextRendererComponent extends AXConversationMessageRendererCopyHostComponent {\n private readonly infoBarService = inject(AXConversationInfoBarService);\n private readonly sanitizer = inject(AXConversationSanitizerService);\n\n private readonly _contentState = signal<AXConversationMessageRendererContentState>('none');\n\n readonly message = input.required<AXConversationMessage>();\n readonly rendererState = computed(() => ({\n deliveryStatus: this.message().status,\n contentState: this._contentState(),\n }));\n readonly searchQuery = this.infoBarService.searchQuery;\n\n copy(): string {\n return (this.message().payload as AXConversationTextPayload).text?.trim() ?? '';\n }\n\n readonly formattedText = computed((): SafeHtml => {\n const msg = this.message();\n const payload = msg.payload as AXConversationTextPayload;\n const text = payload.text ?? '';\n const query = this.searchQuery();\n let escaped = this.sanitizer.escapeHtml(text);\n if (query?.trim()) {\n escaped = this.highlightSearch(escaped, query);\n }\n return this.sanitizer.safeHtml(this.linkify(escaped));\n });\n\n private linkify(text: string): string {\n const urlRegex = /(https?:\\/\\/[^\\s]+)/g;\n return text.replace(urlRegex, (url) => {\n const safeUrl = this.sanitizer.sanitizeUrl(url) || '#';\n return `<a href=\"${safeUrl}\" target=\"_blank\" rel=\"noopener noreferrer\">${url}</a>`;\n });\n }\n\n private highlightSearch(text: string, query: string): string {\n const trimmed = query.trim();\n if (!trimmed) {\n return text;\n }\n const escapedQuery = trimmed.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const regex = new RegExp(`(${escapedQuery})`, 'gi');\n return text.replace(regex, '<mark>$1</mark>');\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MAMU,8BAA8B,CAAA;AAD3C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AA6B5C,IAAA;;AA1BC,IAAA,YAAY,CAAC,IAAY,EAAA;AACvB,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;IAC5D;;AAGA,IAAA,QAAQ,CAAC,IAAY,EAAA;;QAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,SA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A,mBAAA,EAAA,qBAAA,EAAA,wBAAA,EAAA,mBAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAgD1C,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAlD/C,SAAS;+BACE,+BAA+B,EAAA,OAAA,EAChC,CAAC,2CAA2C,CAAC,mBACrC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;AAKT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2uBAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,105 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, output, viewChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { w as toUploaderReference, x as createResolvedMediaUrlSignal, y as pickDisplayMediaUrl } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
5
+ import { f as formatMediaDuration } from './acorex-components-conversation-format-media-DUD4vA6F.mjs';
6
+
7
+ class AXConversationVideoAttachmentComponent {
8
+ constructor() {
9
+ this.item = input.required(...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
10
+ this.playingChange = output();
11
+ this.timeUpdate = output();
12
+ this.durationChange = output();
13
+ this.playbackEnded = output();
14
+ this.playbackError = output();
15
+ this.videoElementRef = viewChild('videoEl', ...(ngDevMode ? [{ debugName: "videoElementRef" }] : /* istanbul ignore next */ []));
16
+ this.playbackReference = computed(() => toUploaderReference(this.item()), ...(ngDevMode ? [{ debugName: "playbackReference" }] : /* istanbul ignore next */ []));
17
+ this.resolvedPlaybackUrl = createResolvedMediaUrlSignal(this.playbackReference);
18
+ this.playbackUrl = computed(() => pickDisplayMediaUrl(this.resolvedPlaybackUrl(), this.item().url, this.item().thumbnailUrl), ...(ngDevMode ? [{ debugName: "playbackUrl" }] : /* istanbul ignore next */ []));
19
+ this.duration = computed(() => this.item().duration ?? 0, ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
20
+ this.durationLabel = computed(() => formatMediaDuration(this.duration()), ...(ngDevMode ? [{ debugName: "durationLabel" }] : /* istanbul ignore next */ []));
21
+ }
22
+ togglePlay() {
23
+ const el = this.videoElementRef()?.nativeElement;
24
+ if (!el) {
25
+ return;
26
+ }
27
+ if (el.paused) {
28
+ void el.play();
29
+ }
30
+ else {
31
+ el.pause();
32
+ }
33
+ }
34
+ pause() {
35
+ this.videoElementRef()?.nativeElement?.pause();
36
+ }
37
+ onLoadedMetadata() {
38
+ const el = this.videoElementRef()?.nativeElement;
39
+ if (el && Number.isFinite(el.duration)) {
40
+ this.durationChange.emit(el.duration);
41
+ }
42
+ }
43
+ onTimeUpdate() {
44
+ const el = this.videoElementRef()?.nativeElement;
45
+ if (el) {
46
+ this.timeUpdate.emit(el.currentTime);
47
+ }
48
+ }
49
+ onPlay() {
50
+ this.playingChange.emit(true);
51
+ }
52
+ onPause() {
53
+ this.playingChange.emit(false);
54
+ }
55
+ onEnded() {
56
+ this.playingChange.emit(false);
57
+ this.playbackEnded.emit();
58
+ }
59
+ onError() {
60
+ this.playbackError.emit();
61
+ }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVideoAttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.9", type: AXConversationVideoAttachmentComponent, isStandalone: true, selector: "ax-conversation-video-attachment", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { playingChange: "playingChange", timeUpdate: "timeUpdate", durationChange: "durationChange", playbackEnded: "playbackEnded", playbackError: "playbackError" }, viewQueries: [{ propertyName: "videoElementRef", first: true, predicate: ["videoEl"], descendants: true, isSignal: true }], ngImport: i0, template: `
64
+ <div class="ax-conversation-video">
65
+ <video
66
+ #videoEl
67
+ class="ax-conversation-video__player"
68
+ [src]="playbackUrl() || null"
69
+ controls
70
+ playsinline
71
+ preload="metadata"
72
+ (loadedmetadata)="onLoadedMetadata()"
73
+ (timeupdate)="onTimeUpdate()"
74
+ (play)="onPlay()"
75
+ (pause)="onPause()"
76
+ (ended)="onEnded()"
77
+ (error)="onError()"
78
+ ></video>
79
+ </div>
80
+ `, isInline: true, styles: [":host{display:block}.ax-conversation-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-conversation-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationVideoAttachmentComponent, decorators: [{
83
+ type: Component,
84
+ args: [{ selector: 'ax-conversation-video-attachment', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
85
+ <div class="ax-conversation-video">
86
+ <video
87
+ #videoEl
88
+ class="ax-conversation-video__player"
89
+ [src]="playbackUrl() || null"
90
+ controls
91
+ playsinline
92
+ preload="metadata"
93
+ (loadedmetadata)="onLoadedMetadata()"
94
+ (timeupdate)="onTimeUpdate()"
95
+ (play)="onPlay()"
96
+ (pause)="onPause()"
97
+ (ended)="onEnded()"
98
+ (error)="onError()"
99
+ ></video>
100
+ </div>
101
+ `, styles: [":host{display:block}.ax-conversation-video{width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-darker-surface))}.ax-conversation-video__player{width:100%;max-height:min(40dvh,14rem);display:block;vertical-align:middle}\n"] }]
102
+ }], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], playingChange: [{ type: i0.Output, args: ["playingChange"] }], timeUpdate: [{ type: i0.Output, args: ["timeUpdate"] }], durationChange: [{ type: i0.Output, args: ["durationChange"] }], playbackEnded: [{ type: i0.Output, args: ["playbackEnded"] }], playbackError: [{ type: i0.Output, args: ["playbackError"] }], videoElementRef: [{ type: i0.ViewChild, args: ['videoEl', { isSignal: true }] }] } });
103
+
104
+ export { AXConversationVideoAttachmentComponent as A };
105
+ //# sourceMappingURL=acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/shared/video-attachment.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport type { AXConversationVideoMediaItem } from '../../../../models';\nimport { pickDisplayMediaUrl } from '../../../composer/components/shared/persisted-media-url';\nimport { toUploaderReference } from './attachment-uploader-reference';\nimport { formatMediaDuration } from './format-media';\nimport { createResolvedMediaUrlSignal } from './media-url-resolve';\n\n@Component({\n selector: 'ax-conversation-video-attachment',\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-video\">\n <video\n #videoEl\n class=\"ax-conversation-video__player\"\n [src]=\"playbackUrl() || null\"\n controls\n playsinline\n preload=\"metadata\"\n (loadedmetadata)=\"onLoadedMetadata()\"\n (timeupdate)=\"onTimeUpdate()\"\n (play)=\"onPlay()\"\n (pause)=\"onPause()\"\n (ended)=\"onEnded()\"\n (error)=\"onError()\"\n ></video>\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .ax-conversation-video {\n width: 100%;\n border-radius: var(--ax-sys-border-radius, 0.5rem);\n overflow: hidden;\n background: rgb(var(--ax-sys-color-darker-surface));\n }\n\n .ax-conversation-video__player {\n width: 100%;\n max-height: min(40dvh, 14rem);\n display: block;\n vertical-align: middle;\n }\n `,\n ],\n})\nexport class AXConversationVideoAttachmentComponent {\n readonly item = input.required<AXConversationVideoMediaItem>();\n\n readonly playingChange = output<boolean>();\n readonly timeUpdate = output<number>();\n readonly durationChange = output<number>();\n readonly playbackEnded = output<void>();\n\n readonly playbackError = output<void>();\n\n private readonly videoElementRef = viewChild<ElementRef<HTMLVideoElement>>('videoEl');\n\n private readonly playbackReference = computed(() => toUploaderReference(this.item()));\n private readonly resolvedPlaybackUrl = createResolvedMediaUrlSignal(this.playbackReference);\n\n readonly playbackUrl = computed(() =>\n pickDisplayMediaUrl(this.resolvedPlaybackUrl(), this.item().url, this.item().thumbnailUrl),\n );\n readonly duration = computed(() => this.item().duration ?? 0);\n readonly durationLabel = computed(() => formatMediaDuration(this.duration()));\n\n togglePlay(): void {\n const el = this.videoElementRef()?.nativeElement;\n if (!el) {\n return;\n }\n if (el.paused) {\n void el.play();\n } else {\n el.pause();\n }\n }\n\n pause(): void {\n this.videoElementRef()?.nativeElement?.pause();\n }\n\n onLoadedMetadata(): void {\n const el = this.videoElementRef()?.nativeElement;\n if (el && Number.isFinite(el.duration)) {\n this.durationChange.emit(el.duration);\n }\n }\n\n onTimeUpdate(): void {\n const el = this.videoElementRef()?.nativeElement;\n if (el) {\n this.timeUpdate.emit(el.currentTime);\n }\n }\n\n onPlay(): void {\n this.playingChange.emit(true);\n }\n\n onPause(): void {\n this.playingChange.emit(false);\n }\n\n onEnded(): void {\n this.playingChange.emit(false);\n this.playbackEnded.emit();\n }\n\n onError(): void {\n this.playbackError.emit();\n }\n}\n"],"names":[],"mappings":";;;;;;MA4Da,sCAAsC,CAAA;AA5CnD,IAAA,WAAA,GAAA;AA6CW,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAgC;QAErD,IAAA,CAAA,aAAa,GAAG,MAAM,EAAW;QACjC,IAAA,CAAA,UAAU,GAAG,MAAM,EAA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