@memberjunction/ng-conversations 6.3.0-edge.0 → 6.3.0-edge.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 (272) hide show
  1. package/README.md +60 -22
  2. package/dist/assets/edge-ai.worker.js +35168 -0
  3. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts +186 -0
  4. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts.map +1 -0
  5. package/dist/lib/components/agent/agent-instance-editor-modal.component.js +2202 -0
  6. package/dist/lib/components/agent/agent-instance-editor-modal.component.js.map +1 -0
  7. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +39 -6
  8. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
  9. package/dist/lib/components/artifact/artifact-share-modal.component.js +773 -204
  10. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  11. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
  12. package/dist/lib/components/collection/collection-tree.component.js +19 -18
  13. package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
  14. package/dist/lib/components/collection/collection-view.component.d.ts +6 -4
  15. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
  16. package/dist/lib/components/collection/collection-view.component.js +35 -17
  17. package/dist/lib/components/collection/collection-view.component.js.map +1 -1
  18. package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
  19. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  20. package/dist/lib/components/collection/collections-full-view.component.js +108 -106
  21. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  22. package/dist/lib/components/composer/ai-composer.component.d.ts +15 -1
  23. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  24. package/dist/lib/components/composer/ai-composer.component.js +43 -4
  25. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  26. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +20 -2
  27. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
  28. package/dist/lib/components/conversation/conversation-agent-picker.component.js +378 -62
  29. package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
  30. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +94 -18
  31. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  32. package/dist/lib/components/conversation/conversation-chat-area.component.js +732 -439
  33. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  34. package/dist/lib/components/conversation/conversation-list.component.d.ts +19 -1
  35. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  36. package/dist/lib/components/conversation/conversation-list.component.js +184 -89
  37. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  38. package/dist/lib/components/export/export-modal.component.d.ts +7 -2
  39. package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
  40. package/dist/lib/components/export/export-modal.component.js +13 -2
  41. package/dist/lib/components/export/export-modal.component.js.map +1 -1
  42. package/dist/lib/components/library/library-create-dialog.component.d.ts +136 -0
  43. package/dist/lib/components/library/library-create-dialog.component.d.ts.map +1 -0
  44. package/dist/lib/components/library/library-create-dialog.component.js +1620 -0
  45. package/dist/lib/components/library/library-create-dialog.component.js.map +1 -0
  46. package/dist/lib/components/library/library-full-view.component.d.ts +10 -4
  47. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
  48. package/dist/lib/components/library/library-full-view.component.js +216 -40
  49. package/dist/lib/components/library/library-full-view.component.js.map +1 -1
  50. package/dist/lib/components/library/library-remote-drive-pane.component.d.ts +97 -0
  51. package/dist/lib/components/library/library-remote-drive-pane.component.d.ts.map +1 -0
  52. package/dist/lib/components/library/library-remote-drive-pane.component.js +1229 -0
  53. package/dist/lib/components/library/library-remote-drive-pane.component.js.map +1 -0
  54. package/dist/lib/components/library/library-workspace.component.d.ts +293 -0
  55. package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
  56. package/dist/lib/components/library/library-workspace.component.js +5121 -0
  57. package/dist/lib/components/library/library-workspace.component.js.map +1 -0
  58. package/dist/lib/components/library/library.models.d.ts +192 -0
  59. package/dist/lib/components/library/library.models.d.ts.map +1 -0
  60. package/dist/lib/components/library/library.models.js +2 -0
  61. package/dist/lib/components/library/library.models.js.map +1 -0
  62. package/dist/lib/components/message/agent-handoff-card.component.js +1 -1
  63. package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -1
  64. package/dist/lib/components/message/conversation-message-rating.component.d.ts +5 -0
  65. package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
  66. package/dist/lib/components/message/conversation-message-rating.component.js +72 -16
  67. package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
  68. package/dist/lib/components/message/message-input.component.d.ts +33 -14
  69. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  70. package/dist/lib/components/message/message-input.component.js +142 -75
  71. package/dist/lib/components/message/message-input.component.js.map +1 -1
  72. package/dist/lib/components/message/message-item.component.d.ts +51 -4
  73. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  74. package/dist/lib/components/message/message-item.component.js +640 -399
  75. package/dist/lib/components/message/message-item.component.js.map +1 -1
  76. package/dist/lib/components/message/message-list.component.d.ts +15 -1
  77. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  78. package/dist/lib/components/message/message-list.component.js +75 -3
  79. package/dist/lib/components/message/message-list.component.js.map +1 -1
  80. package/dist/lib/components/navigation/conversation-navigation.component.js +9 -9
  81. package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
  82. package/dist/lib/components/overlay/chat-overlay.component.d.ts +94 -6
  83. package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
  84. package/dist/lib/components/overlay/chat-overlay.component.js +249 -59
  85. package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
  86. package/dist/lib/components/project/project-form-modal.component.d.ts +6 -0
  87. package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
  88. package/dist/lib/components/project/project-form-modal.component.js +81 -61
  89. package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
  90. package/dist/lib/components/project/project-selector.component.d.ts +5 -0
  91. package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
  92. package/dist/lib/components/project/project-selector.component.js +11 -4
  93. package/dist/lib/components/project/project-selector.component.js.map +1 -1
  94. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts +55 -0
  95. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -0
  96. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +974 -0
  97. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -0
  98. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts +66 -0
  99. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts.map +1 -0
  100. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js +253 -0
  101. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js.map +1 -0
  102. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts +80 -0
  103. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts.map +1 -0
  104. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js +49 -0
  105. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js.map +1 -0
  106. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts +54 -0
  107. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts.map +1 -0
  108. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js +386 -0
  109. package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js.map +1 -0
  110. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +28 -1
  111. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -1
  112. package/dist/lib/components/realtime/capture/realtime-capture-channel.js +53 -1
  113. package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -1
  114. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
  115. package/dist/lib/components/realtime/channels/client-context-channel.js +23 -7
  116. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
  117. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +1 -0
  118. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -1
  119. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +15 -2
  120. package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -1
  121. package/dist/lib/components/realtime/media/media-channel.d.ts +32 -11
  122. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
  123. package/dist/lib/components/realtime/media/media-channel.js +186 -23
  124. package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
  125. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +9 -1
  126. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
  127. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +33 -10
  128. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
  129. package/dist/lib/components/realtime/realtime-agent-banner.component.js +3 -3
  130. package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
  131. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  132. package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
  133. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  134. package/dist/lib/components/realtime/realtime-composer.component.js +6 -4
  135. package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
  136. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +82 -33
  137. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  138. package/dist/lib/components/realtime/realtime-session-overlay.component.js +521 -191
  139. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  140. package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
  141. package/dist/lib/components/realtime/realtime-session-state.js +1 -1
  142. package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
  143. package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
  144. package/dist/lib/components/realtime/realtime-session-thread.component.js +90 -5
  145. package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
  146. package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -1
  147. package/dist/lib/components/realtime/realtime-surface-stage.model.js +2 -1
  148. package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -1
  149. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +11 -4
  150. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
  151. package/dist/lib/components/realtime/realtime-surface-tab-style.js +24 -5
  152. package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
  153. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +7 -9
  154. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  155. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +25 -15
  156. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  157. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +30 -1
  158. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
  159. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +150 -2
  160. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
  161. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +101 -3
  162. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
  163. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +503 -55
  164. package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
  165. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts +48 -5
  166. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts.map +1 -1
  167. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js +249 -53
  168. package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js.map +1 -1
  169. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
  170. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +1 -1
  171. package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
  172. package/dist/lib/components/search/search-panel.component.d.ts +10 -0
  173. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
  174. package/dist/lib/components/search/search-panel.component.js +25 -3
  175. package/dist/lib/components/search/search-panel.component.js.map +1 -1
  176. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  177. package/dist/lib/components/share/share-modal.component.js +181 -127
  178. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  179. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +14 -1
  180. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
  181. package/dist/lib/components/sidebar/conversation-sidebar.component.js +50 -11
  182. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
  183. package/dist/lib/components/sidebar/my-agents-section.component.d.ts +78 -0
  184. package/dist/lib/components/sidebar/my-agents-section.component.d.ts.map +1 -0
  185. package/dist/lib/components/sidebar/my-agents-section.component.js +450 -0
  186. package/dist/lib/components/sidebar/my-agents-section.component.js.map +1 -0
  187. package/dist/lib/components/task/tasks-full-view.component.d.ts +31 -8
  188. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  189. package/dist/lib/components/task/tasks-full-view.component.js +701 -497
  190. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  191. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  192. package/dist/lib/components/workspace/conversation-workspace.component.js +15 -2
  193. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  194. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +1 -0
  195. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
  196. package/dist/lib/composer-plugins/base-conversation-mention.provider.js +13 -1
  197. package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
  198. package/dist/lib/conversations.module.d.ts +78 -71
  199. package/dist/lib/conversations.module.d.ts.map +1 -1
  200. package/dist/lib/conversations.module.js +68 -1
  201. package/dist/lib/conversations.module.js.map +1 -1
  202. package/dist/lib/models/agent-turn.model.d.ts +7 -1
  203. package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
  204. package/dist/lib/models/agent-turn.model.js.map +1 -1
  205. package/dist/lib/services/agent-state.service.d.ts.map +1 -1
  206. package/dist/lib/services/agent-state.service.js +14 -3
  207. package/dist/lib/services/agent-state.service.js.map +1 -1
  208. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
  209. package/dist/lib/services/artifact-permission.service.js +14 -3
  210. package/dist/lib/services/artifact-permission.service.js.map +1 -1
  211. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  212. package/dist/lib/services/artifact-state.service.js +43 -11
  213. package/dist/lib/services/artifact-state.service.js.map +1 -1
  214. package/dist/lib/services/conversation-agent.service.d.ts +31 -21
  215. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  216. package/dist/lib/services/conversation-agent.service.js +84 -35
  217. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  218. package/dist/lib/services/conversation-tasks-filter.d.ts +59 -2
  219. package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -1
  220. package/dist/lib/services/conversation-tasks-filter.js +222 -18
  221. package/dist/lib/services/conversation-tasks-filter.js.map +1 -1
  222. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts +85 -0
  223. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts.map +1 -0
  224. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js +257 -0
  225. package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js.map +1 -0
  226. package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts +85 -0
  227. package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts.map +1 -0
  228. package/dist/lib/services/edge-ai/edge-ai-protocol.js +10 -0
  229. package/dist/lib/services/edge-ai/edge-ai-protocol.js.map +1 -0
  230. package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts +90 -0
  231. package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts.map +1 -0
  232. package/dist/lib/services/edge-ai/edge-ai-worker-host.js +386 -0
  233. package/dist/lib/services/edge-ai/edge-ai-worker-host.js.map +1 -0
  234. package/dist/lib/services/edge-ai/edge-ai.worker.d.ts +13 -0
  235. package/dist/lib/services/edge-ai/edge-ai.worker.d.ts.map +1 -0
  236. package/dist/lib/services/edge-ai/edge-ai.worker.js +201 -0
  237. package/dist/lib/services/edge-ai/edge-ai.worker.js.map +1 -0
  238. package/dist/lib/services/export.service.d.ts +64 -0
  239. package/dist/lib/services/export.service.d.ts.map +1 -1
  240. package/dist/lib/services/export.service.js +185 -6
  241. package/dist/lib/services/export.service.js.map +1 -1
  242. package/dist/lib/services/library-creation.service.d.ts +304 -0
  243. package/dist/lib/services/library-creation.service.d.ts.map +1 -0
  244. package/dist/lib/services/library-creation.service.js +1244 -0
  245. package/dist/lib/services/library-creation.service.js.map +1 -0
  246. package/dist/lib/services/realtime-pairing.d.ts +3 -3
  247. package/dist/lib/services/realtime-pairing.js +4 -4
  248. package/dist/lib/services/realtime-pairing.js.map +1 -1
  249. package/dist/lib/services/realtime-session-review.service.d.ts +14 -0
  250. package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
  251. package/dist/lib/services/realtime-session-review.service.js +46 -4
  252. package/dist/lib/services/realtime-session-review.service.js.map +1 -1
  253. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  254. package/dist/lib/services/realtime-session.service.js +2 -1
  255. package/dist/lib/services/realtime-session.service.js.map +1 -1
  256. package/dist/lib/services/search.service.d.ts +19 -2
  257. package/dist/lib/services/search.service.d.ts.map +1 -1
  258. package/dist/lib/services/search.service.js +99 -36
  259. package/dist/lib/services/search.service.js.map +1 -1
  260. package/dist/lib/utils/agent-handoff-map.js +1 -1
  261. package/dist/lib/utils/agent-handoff-map.js.map +1 -1
  262. package/dist/lib/utils/agent-turn-routing.js +1 -1
  263. package/dist/lib/utils/agent-turn-routing.js.map +1 -1
  264. package/dist/lib/utils/decision-routing.d.ts +5 -2
  265. package/dist/lib/utils/decision-routing.d.ts.map +1 -1
  266. package/dist/lib/utils/decision-routing.js +9 -4
  267. package/dist/lib/utils/decision-routing.js.map +1 -1
  268. package/dist/public-api.d.ts +15 -0
  269. package/dist/public-api.d.ts.map +1 -1
  270. package/dist/public-api.js +17 -1
  271. package/dist/public-api.js.map +1 -1
  272. package/package.json +42 -37
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { MJConversationEntity, type ConversationScope } from '@memberjunction/core-entities';
3
3
  import { UserInfo } from '@memberjunction/core';
4
- import { ExportService, ExportFormat, ExportOptions, ExportBranding } from '../../services/export.service';
4
+ import { ExportService, ExportFormat, ExportOptions, ExportBranding, ExportArtifactLinkTarget } from '../../services/export.service';
5
5
  import { DialogService } from '../../services/dialog.service';
6
6
  import { ToastService } from '../../services/toast.service';
7
7
  import * as i0 from "@angular/core";
@@ -41,6 +41,11 @@ export declare class ExportModalComponent {
41
41
  * exports Main.
42
42
  */
43
43
  Scope: ConversationScope | null;
44
+ /**
45
+ * Builds a link that opens an exported artifact in the app (this package has no router, so
46
+ * the host supplies it). Null exports artifacts with their IDs only.
47
+ */
48
+ ArtifactLink: ((target: ExportArtifactLinkTarget) => string | null) | null;
44
49
  Cancelled: EventEmitter<void>;
45
50
  /**
46
51
  * @deprecated Use {@link Cancelled}.
@@ -133,6 +138,6 @@ export declare class ExportModalComponent {
133
138
  onCancel(): void;
134
139
  private resetForm;
135
140
  static ɵfac: i0.ɵɵFactoryDeclaration<ExportModalComponent, never>;
136
- static ɵcmp: i0.ɵɵComponentDeclaration<ExportModalComponent, "mj-export-modal", never, { "IsVisible": { "alias": "IsVisible"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "Conversation": { "alias": "Conversation"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Branding": { "alias": "Branding"; "required": false; }; "branding": { "alias": "branding"; "required": false; }; "Scope": { "alias": "Scope"; "required": false; }; }, { "Cancelled": "Cancelled"; "cancelled": "cancelled"; "Exported": "Exported"; "exported": "exported"; }, never, never, false, never>;
141
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExportModalComponent, "mj-export-modal", never, { "IsVisible": { "alias": "IsVisible"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "Conversation": { "alias": "Conversation"; "required": false; }; "conversation": { "alias": "conversation"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Branding": { "alias": "Branding"; "required": false; }; "branding": { "alias": "branding"; "required": false; }; "Scope": { "alias": "Scope"; "required": false; }; "ArtifactLink": { "alias": "ArtifactLink"; "required": false; }; }, { "Cancelled": "Cancelled"; "cancelled": "cancelled"; "Exported": "Exported"; "exported": "exported"; }, never, never, false, never>;
137
142
  }
138
143
  //# sourceMappingURL=export-modal.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAsB,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE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YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIlC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAsC/B,wCAAwC;IAClC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,QAAQ,IAAI,IAAI;IAKhB,wCAAwC;IACxC,QAAQ,IAAI,IAAI;IAIhB,OAAO,CAAC,SAAS;yCAhTN,oBAAoB;2CAApB,oBAAoB;CA6ThC"}
1
+ {"version":3,"file":"export-modal.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAsB,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACrI,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;;AAE5D,qBA6Ua,oBAAoB;IAqP7B,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,YAAY;IAtPtB,OAAO,CAAC,UAAU,CAAS;IAC3B,IACI,SAAS,CAAC,KAAK,EAAE,OAAO,EAY3B;IACD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,yCAAyC;IACzC,IAAI,SAAS,IAAI,OAAO,CAEvB;IACD,yCAAyC;IACzC,IAAa,SAAS,CAAC,KAAK,EAAE,OAAO,EAEpC;IAEQ,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAE7C,4CAA4C;IAC5C,IAAa,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,EAEhE;IACD,4CAA4C;IAC5C,IAAI,Y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Aa,EAErC;IAED,+DAA+D;IAC/D,IAAI,YAAY,IAAI,MAAM,CASzB;IAED,4CAA4C;IAC5C,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,oBAAoB;IAW5B,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,2CAA2C;IAC3C,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,SAAS,IAAI,OAAO,CAOvB;IAED,yCAAyC;IACzC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,OAAO;eAEkB,YAAY;;;;QAuBnC;IAEF,uCAAuC;IACvC,IAAI,OAAO;eA1Bc,YAAY;;;;QA4BpC;IACD,uCAAuC;IACvC,IAAI,OAAO,CAAC,KAAK;eA9BQ,YAAY;;;;OA8BpB,EAEhB;gBAGS,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY;IAGpC,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAMxC,4CAA4C;IAC5C,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIlC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAsC/B,wCAAwC;IAClC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,QAAQ,IAAI,IAAI;IAKhB,wCAAwC;IACxC,QAAQ,IAAI,IAAI;IAIhB,OAAO,CAAC,SAAS;yCA1TN,oBAAoB;2CAApB,oBAAoB;CAuUhC"}
@@ -284,6 +284,11 @@ export class ExportModalComponent {
284
284
  * exports Main.
285
285
  */
286
286
  Scope = null;
287
+ /**
288
+ * Builds a link that opens an exported artifact in the app (this package has no router, so
289
+ * the host supplies it). Null exports artifacts with their IDs only.
290
+ */
291
+ ArtifactLink = null;
287
292
  Cancelled = new EventEmitter();
288
293
  /**
289
294
  * @deprecated Use {@link Cancelled}.
@@ -377,7 +382,8 @@ export class ExportModalComponent {
377
382
  return {
378
383
  ...this.ExportOptions,
379
384
  includeTheme: brandingOn,
380
- branding: brandingOn ? (this.Branding ?? undefined) : undefined
385
+ branding: brandingOn ? (this.Branding ?? undefined) : undefined,
386
+ artifactLink: this.ArtifactLink ?? undefined
381
387
  };
382
388
  }
383
389
  get ExportTitle() {
@@ -388,7 +394,10 @@ export class ExportModalComponent {
388
394
  return this.ExportTitle;
389
395
  }
390
396
  get CanExport() {
397
+ // Without a conversation OnExport has nothing to export, so the button is disabled
398
+ // rather than doing nothing when clicked.
391
399
  return !this.IsExporting &&
400
+ !!this.Conversation &&
392
401
  !!this.SelectedFormat &&
393
402
  (this.ExportOptions.includeMessages === true);
394
403
  }
@@ -499,7 +508,7 @@ export class ExportModalComponent {
499
508
  this.IsVisible = false;
500
509
  }
501
510
  static ɵfac = function ExportModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ExportModalComponent)(i0.ɵɵdirectiveInject(i1.ExportService), i0.ɵɵdirectiveInject(i2.DialogService), i0.ɵɵdirectiveInject(i3.ToastService)); };
502
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportModalComponent, selectors: [["mj-export-modal"]], inputs: { IsVisible: "IsVisible", isVisible: "isVisible", Conversation: "Conversation", conversation: "conversation", CurrentUser: "CurrentUser", currentUser: "currentUser", Branding: "Branding", branding: "branding", Scope: "Scope" }, outputs: { Cancelled: "Cancelled", cancelled: "cancelled", Exported: "Exported", exported: "exported" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Title", "Width", "Height", "Visible"], [3, "Close", "Title", "Width", "Height", "Visible"], [1, "export-modal-content"], [1, "format-section"], [1, "section-title"], [1, "fa-solid", "fa-file-export"], [1, "section-description"], [1, "format-options"], [1, "format-option", 3, "selected"], [1, "options-section"], [1, "fa-solid", "fa-sliders"], [1, "option-checkboxes"], [1, "checkbox-label"], ["type", "checkbox", 3, "ngModelChange", "ngModel", "disabled"], [1, "format-specific-options"], [1, "error-message"], [1, "loading-indicator"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "format-option", 3, "click"], [1, "format-details"], [1, "format-name"], [1, "format-description"], [1, "fa-solid", "fa-check-circle", "check-icon"], [1, "subsection-title"], [1, "mj-input", "theme-mode-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", "light"], ["value", "dark"], [1, "fa-solid", "fa-exclamation-triangle"], ["text", "Exporting conversation...", "size", "small"]], template: function ExportModalComponent_Template(rf, ctx) { if (rf & 1) {
511
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExportModalComponent, selectors: [["mj-export-modal"]], inputs: { IsVisible: "IsVisible", isVisible: "isVisible", Conversation: "Conversation", conversation: "conversation", CurrentUser: "CurrentUser", currentUser: "currentUser", Branding: "Branding", branding: "branding", Scope: "Scope", ArtifactLink: "ArtifactLink" }, outputs: { Cancelled: "Cancelled", cancelled: "cancelled", Exported: "Exported", exported: "exported" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Title", "Width", "Height", "Visible"], [3, "Close", "Title", "Width", "Height", "Visible"], [1, "export-modal-content"], [1, "format-section"], [1, "section-title"], [1, "fa-solid", "fa-file-export"], [1, "section-description"], [1, "format-options"], [1, "format-option", 3, "selected"], [1, "options-section"], [1, "fa-solid", "fa-sliders"], [1, "option-checkboxes"], [1, "checkbox-label"], ["type", "checkbox", 3, "ngModelChange", "ngModel", "disabled"], [1, "format-specific-options"], [1, "error-message"], [1, "loading-indicator"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-download"], [1, "format-option", 3, "click"], [1, "format-details"], [1, "format-name"], [1, "format-description"], [1, "fa-solid", "fa-check-circle", "check-icon"], [1, "subsection-title"], [1, "mj-input", "theme-mode-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", "light"], ["value", "dark"], [1, "fa-solid", "fa-exclamation-triangle"], ["text", "Exporting conversation...", "size", "small"]], template: function ExportModalComponent_Template(rf, ctx) { if (rf & 1) {
503
512
  i0.ɵɵconditionalCreate(0, ExportModalComponent_Conditional_0_Template, 40, 15, "mj-dialog", 0);
504
513
  } if (rf & 2) {
505
514
  i0.ɵɵconditional(ctx.isVisible ? 0 : -1);
@@ -665,6 +674,8 @@ export class ExportModalComponent {
665
674
  type: Input
666
675
  }], Scope: [{
667
676
  type: Input
677
+ }], ArtifactLink: [{
678
+ type: Input
668
679
  }], Cancelled: [{
669
680
  type: Output
670
681
  }], cancelled: [{
@@ -1 +1 @@
1
- {"version":3,"file":"export-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAgD,MAAM,+BAA+B,CAAC;AAEjH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;;;IAqChC,wBAAmD;;;;IAVvD,+BAGuC;IAArC,yNAAS,oCAA0B,KAAC;IACpC,oBAA6B;IAE3B,AADF,+BAA4B,cACD;IAAA,YAAiB;IAAA,iBAAM;IAChD,+BAAgC;IAAA,YAAwB;IAC1D,AAD0D,iBAAM,EAC1D;IACN,0GAAuC;IAGzC,iBAAM;;;;IAVJ,qEAAkD;IAE/C,cAAqB;IAArB,6BAAqB;IAEG,eAAiB;IAAjB,oCAAiB;IACV,eAAwB;IAAxB,2CAAwB;IAE1D,cAEC;IAFD,oEAEC;;;;IAiCD,AADF,iCAA8B,gBAI2D;IADrF,gWAAwC;IAF1C,iBAGuF;IACvF,4BAAM;IAAA,gCAAgB;IAAA,iBAAO;IAC7B,6BAAO;IAAA,YAAkB;IAC3B,AAD2B,iBAAQ,EAC3B;;;IAJJ,cAAwC;IAAxC,iEAAwC;IACxC,qHAAoF;IAE/E,eAAkB;IA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ConversationEngine, MJConversationEntity, type ConversationScope } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { ExportService, ExportFormat, ExportOptions, ExportBranding } from '../../services/export.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\n\n@Component({\n standalone: false,\n selector: 'mj-export-modal',\n template: `\n @if (isVisible) {\n <mj-dialog\n [Title]=\"exportTitle\"\n [Width]=\"600\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onCancel()\">\n <div class=\"export-modal-content\">\n <section class=\"format-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-file-export\"></i>\n Export Format\n </h3>\n <p class=\"section-description\">\n Choose a format to export this conversation:\n </p>\n <div class=\"format-options\">\n @for (format of formats; track format.value) {\n <div\n class=\"format-option\"\n [class.selected]=\"selectedFormat === format.value\"\n (click)=\"selectFormat(format.value)\">\n <i [class]=\"format.icon\"></i>\n <div class=\"format-details\">\n <div class=\"format-name\">{{ format.name }}</div>\n <div class=\"format-description\">{{ format.description }}</div>\n </div>\n @if (selectedFormat === format.value) {\n <i class=\"fa-solid fa-check-circle check-icon\"></i>\n }\n </div>\n }\n </div>\n </section>\n <section class=\"options-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-sliders\"></i>\n Export Options\n </h3>\n <div class=\"option-checkboxes\">\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMessages\"\n [disabled]=\"isExporting\">\n <span>Include messages</span>\n <small>Export all conversation messages</small>\n </label>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMetadata\"\n [disabled]=\"isExporting\">\n <span>Include metadata</span>\n <small>Add creation date, IDs, and other metadata</small>\n </label>\n <!-- Branding applies to EVERY format (HTML gets theme colors + logo +\n footer; markdown/text/JSON get the title and attribution), so it\n belongs here rather than under HTML Options. Shown for HTML even with\n no host branding, because it still snapshots the app's theme. -->\n @if (selectedFormat === 'html' || branding) {\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeTheme\"\n [disabled]=\"isExporting || (selectedFormat === 'html' && !exportOptions.includeCSS)\">\n <span>Include branding</span>\n <small>{{ brandingHint }}</small>\n </label>\n }\n </div>\n @if (selectedFormat === 'json') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">JSON Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.prettyPrint\"\n [disabled]=\"isExporting\">\n <span>Pretty print</span>\n <small>Format JSON with indentation</small>\n </label>\n </div>\n }\n @if (selectedFormat === 'html') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">HTML Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeCSS\"\n [disabled]=\"isExporting\">\n <span>Include CSS styling</span>\n <small>Embed styles for better presentation</small>\n </label>\n <!-- Which palette gets baked in — NOT the mode the app happens to be in.\n Exporting from a dark session would otherwise put dark text on the\n export's white page. -->\n @if (exportOptions.includeTheme && exportOptions.includeCSS) {\n <label class=\"checkbox-label\">\n <span>Theme</span>\n <select\n class=\"mj-input theme-mode-select\"\n [(ngModel)]=\"exportOptions.themeMode\"\n [disabled]=\"isExporting\">\n <option value=\"light\">Light</option>\n <option value=\"dark\">Dark</option>\n </select>\n <small>Palette baked into the exported file</small>\n </label>\n }\n </div>\n }\n </section>\n @if (errorMessage) {\n <div class=\"error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n {{ errorMessage }}\n </div>\n }\n @if (isExporting) {\n <div class=\"loading-indicator\">\n <mj-loading text=\"Exporting conversation...\" size=\"small\"></mj-loading>\n </div>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton [disabled]=\"isExporting\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button mjButton variant=\"primary\" [disabled]=\"!canExport\" (click)=\"onExport()\">\n <i class=\"fa-solid fa-download\"></i>\n Export\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .export-modal-content {\n padding: 20px;\n max-height: calc(600px - 120px);\n overflow-y: auto;\n }\n\n section {\n margin-bottom: 24px;\n }\n\n .section-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 0 8px 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .section-title i {\n color: var(--mj-brand-primary);\n }\n\n .section-description {\n margin: 0 0 16px 0;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n .format-options {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .format-option {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 2px solid var(--mj-border-strong);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n background: var(--mj-bg-surface-card);\n }\n\n .format-option:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-sunken);\n }\n\n .format-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface-card));\n }\n\n .format-option > i.fa-solid,\n .format-option > i.fas {\n font-size: 24px;\n color: var(--mj-text-muted);\n width: 32px;\n text-align: center;\n }\n\n .format-option.selected > i.fa-solid,\n .format-option.selected > i.fas {\n color: var(--mj-brand-primary);\n }\n\n .format-details {\n flex: 1;\n }\n\n .format-name {\n font-weight: 500;\n font-size: 14px;\n margin-bottom: 2px;\n }\n\n .format-description {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .check-icon {\n font-size: 20px;\n color: var(--mj-status-success);\n }\n\n .option-checkboxes {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .checkbox-label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n cursor: pointer;\n padding: 8px;\n border-radius: 4px;\n transition: background 0.2s;\n }\n\n .checkbox-label:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .checkbox-label input[type=\"checkbox\"] {\n margin-right: 8px;\n cursor: pointer;\n }\n\n .checkbox-label > span {\n display: inline-flex;\n align-items: center;\n font-size: 14px;\n font-weight: 500;\n }\n\n .checkbox-label input[type=\"checkbox\"]:disabled {\n cursor: not-allowed;\n }\n\n .theme-mode-select {\n margin-left: 8px;\n padding: 2px 6px;\n font-size: 13px;\n }\n\n .checkbox-label small {\n margin-left: 28px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .format-specific-options {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n .subsection-title {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .error-message {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--mj-status-error);\n font-size: 13px;\n margin-top: 15px;\n padding: 10px 12px;\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-left: 3px solid var(--mj-status-error);\n border-radius: 4px;\n }\n\n .loading-indicator {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 15px;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n color: var(--mj-text-muted);\n }\n\n mj-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 15px 20px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n mj-dialog-actions button i {\n margin-right: 6px;\n }\n `]\n})\nexport class ExportModalComponent {\n private _isVisible = false;\n @Input()\n set IsVisible(value: boolean) {\n const opening = value && !this._isVisible;\n this._isVisible = value;\n if (opening) {\n // Fresh open: \"Include branding\" defaults ON only when the host explicitly\n // configured export branding — plain MJ Explorer keeps today's unthemed file.\n // NOTE this reads `branding`, so a host binding both in one change-detection\n // pass must bind [branding] FIRST (Angular sets inputs in template order).\n // chat-area's template does; a host mounting with isVisible already true and\n // branding bound after would get the checkbox defaulted off.\n this.ExportOptions.includeTheme = !!this.Branding;\n }\n }\n get IsVisible(): boolean {\n return this._isVisible;\n }\n\n /** @deprecated Use {@link IsVisible}. */\n get isVisible(): boolean {\n return this.IsVisible;\n }\n /** @deprecated Use {@link IsVisible}. */\n @Input() set isVisible(value: boolean) {\n this.IsVisible = value;\n }\n\n @Input() Conversation?: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity | undefined) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity | undefined {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n /**\n * Host-supplied export branding (theme tokens / logo / title). When set, the\n * HTML format's \"Include branding\" checkbox defaults on and the branding is\n * passed to {@link ExportService} on export. See `ExportBranding`.\n */\n @Input() Branding: ExportBranding | null = null;\n\n /** @deprecated Use {@link Branding}. */\n @Input() set branding(value: ExportBranding | null) {\n this.Branding = value;\n }\n /** @deprecated Use {@link Branding}. */\n get branding(): ExportBranding | null {\n return this.Branding;\n }\n\n /**\n * The scope to export: the view the person has open. Null, or a scope of another conversation,\n * exports Main.\n */\n @Input() Scope: ConversationScope | null = null;\n @Output() Cancelled = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Cancelled}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (cancelled) keeps working. Must stay AFTER Cancelled: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() cancelled = this.Cancelled;\n @Output() Exported = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Exported}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (exported) keeps working. Must stay AFTER Exported: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() exported = this.Exported;\n\n SelectedFormat: ExportFormat | null = 'markdown';\n\n /** @deprecated Use {@link SelectedFormat}. */\n get selectedFormat(): ExportFormat | null {\n return this.SelectedFormat;\n }\n /** @deprecated Use {@link SelectedFormat}. */\n set selectedFormat(value: ExportFormat | null) {\n this.SelectedFormat = value;\n }\n IsExporting = false;\n\n /** @deprecated Use {@link IsExporting}. */\n get isExporting() {\n return this.IsExporting;\n }\n /** @deprecated Use {@link IsExporting}. */\n set isExporting(value) {\n this.IsExporting = value;\n }\n ErrorMessage = '';\n\n /** @deprecated Use {@link ErrorMessage}. */\n get errorMessage() {\n return this.ErrorMessage;\n }\n /** @deprecated Use {@link ErrorMessage}. */\n set errorMessage(value) {\n this.ErrorMessage = value;\n }\n\n ExportOptions: ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: false,\n themeMode: 'light'\n };\n\n /** @deprecated Use {@link ExportOptions}. */\n get exportOptions(): ExportOptions {\n return this.ExportOptions;\n }\n /** @deprecated Use {@link ExportOptions}. */\n set exportOptions(value: ExportOptions) {\n this.ExportOptions = value;\n }\n\n /** Format-aware hint under the \"Include branding\" checkbox. */\n get BrandingHint(): string {\n if (this.SelectedFormat === 'html') {\n if (!this.ExportOptions.includeCSS) {\n return 'Requires \"Include CSS styling\"';\n }\n return `Embed the app's theme colors${this.Branding?.logoUrl ? ', logo,' : ''} and attribution line`;\n }\n const logo = this.Branding?.logoUrl && this.SelectedFormat === 'markdown' ? ', logo,' : '';\n return `Add the title${logo} and attribution line`;\n }\n\n /** @deprecated Use {@link BrandingHint}. */\n get brandingHint(): string {\n return this.BrandingHint;\n }\n\n /**\n * The options actually handed to the service. `includeTheme` is the user's INTENT;\n * this resolves it against the selected format:\n *\n * - HTML with the stylesheet off cannot carry branding (a full-size unstyled logo and\n * an unstyled footer would leak), so it drops.\n * - `includeCSS` is an HTML-only concern and must NOT decide anything for\n * markdown / text / JSON — resolving here rather than mutating `includeTheme` is\n * what keeps an HTML-format toggle from silently following the user into another\n * format.\n */\n private resolveExportOptions(): ExportOptions {\n const unstyledHtml = this.SelectedFormat === 'html' && !this.ExportOptions.includeCSS;\n const brandingOn = !!this.ExportOptions.includeTheme && !unstyledHtml;\n return {\n ...this.ExportOptions,\n includeTheme: brandingOn,\n branding: brandingOn ? (this.Branding ?? undefined) : undefined\n };\n }\n\n get ExportTitle(): string {\n return `Export: ${this.Conversation?.Name || 'Conversation'}`;\n }\n\n /** @deprecated Use {@link ExportTitle}. */\n get exportTitle(): string {\n return this.ExportTitle;\n }\n\n get CanExport(): boolean {\n return !this.IsExporting &&\n !!this.SelectedFormat &&\n (this.ExportOptions.includeMessages === true);\n }\n\n /** @deprecated Use {@link CanExport}. */\n get canExport(): boolean {\n return this.CanExport;\n }\n\n Formats = [\n {\n value: 'markdown' as ExportFormat,\n name: 'Markdown',\n description: 'Formatted text with markdown syntax',\n icon: 'fa-solid fa-file-alt'\n },\n {\n value: 'json' as ExportFormat,\n name: 'JSON',\n description: 'Structured data format',\n icon: 'fa-solid fa-code'\n },\n {\n value: 'html' as ExportFormat,\n name: 'HTML',\n description: 'Web page format',\n icon: 'fa-solid fa-file-code'\n },\n {\n value: 'text' as ExportFormat,\n name: 'Plain Text',\n description: 'Simple text file',\n icon: 'fa-solid fa-file'\n }\n ];\n\n /** @deprecated Use {@link Formats}. */\n get formats() {\n return this.Formats;\n }\n /** @deprecated Use {@link Formats}. */\n set formats(value) {\n this.Formats = value;\n }\n\n constructor(\n private exportService: ExportService,\n private dialogService: DialogService,\n private toastService: ToastService\n ) {}\n\n SelectFormat(format: ExportFormat): void {\n if (!this.IsExporting) {\n this.SelectedFormat = format;\n }\n }\n\n /** @deprecated Use {@link SelectFormat}. */\n selectFormat(format: ExportFormat): void {\n return this.SelectFormat(format);\n }\n\n async OnExport(): Promise<void> {\n if (!this.CanExport || !this.Conversation) {\n return;\n }\n\n if (!this.ExportOptions.includeMessages) {\n this.ErrorMessage = 'At least \"Include messages\" must be selected';\n return;\n }\n\n this.IsExporting = true;\n this.ErrorMessage = '';\n const conversationId = this.Conversation.ID;\n\n try {\n const scope = this.Scope && UUIDsEqual(this.Scope.ConversationID, conversationId)\n ? this.Scope\n : ConversationEngine.TrunkScope(conversationId);\n await this.exportService.ExportConversation(\n conversationId,\n scope,\n this.SelectedFormat!,\n this.CurrentUser,\n this.resolveExportOptions()\n );\n\n this.toastService.success('Conversation exported successfully');\n this.Exported.emit();\n this.resetForm();\n } catch (error) {\n console.error('Error exporting conversation:', error);\n this.ErrorMessage = error instanceof Error ? error.message : 'Failed to export conversation';\n this.toastService.error(this.ErrorMessage);\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** @deprecated Use {@link OnExport}. */\n async onExport(): Promise<void> {\n return this.OnExport();\n }\n\n OnCancel(): void {\n this.Cancelled.emit();\n this.resetForm();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n private resetForm(): void {\n this.SelectedFormat = 'markdown';\n this.ErrorMessage = '';\n this.ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: !!this.Branding,\n themeMode: 'light'\n };\n this.IsVisible = false;\n }\n}\n"]}
1
+ {"version":3,"file":"export-modal.component.js","sourceRoot":"","sources":["../../../../src/lib/components/export/export-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAgD,MAAM,+BAA+B,CAAC;AAEjH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;;;IAqChC,wBAAmD;;;;IAVvD,+BAGuC;IAArC,yNAAS,oCAA0B,KAAC;IACpC,oBAA6B;IAE3B,AADF,+BAA4B,cACD;IAAA,YAAiB;IAAA,iBAAM;IAChD,+BAAgC;IAAA,YAAwB;IAC1D,AAD0D,iBAAM,EAC1D;IACN,0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;6DAApB,oBAAoB;YAzU7B,8FAAiB;;YAAjB,wCAyIC;;;iFAgMQ,oBAAoB;cA7UhC,SAAS;6BACI,KAAK,YACP,iBAAiB,YACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2IP;;kBAiMF,KAAK;;kBAuBL,KAAK;;kBAIL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAYL,KAAK;;kBAGL,KAAK;;kBAYL,KAAK;;kBAML,KAAK;;kBACL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFA/FI,oBAAoB","sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ConversationEngine, MJConversationEntity, type ConversationScope } from '@memberjunction/core-entities';\nimport { UserInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { ExportService, ExportFormat, ExportOptions, ExportBranding, ExportArtifactLinkTarget } from '../../services/export.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { ToastService } from '../../services/toast.service';\n\n@Component({\n standalone: false,\n selector: 'mj-export-modal',\n template: `\n @if (isVisible) {\n <mj-dialog\n [Title]=\"exportTitle\"\n [Width]=\"600\"\n [Height]=\"600\"\n [Visible]=\"true\"\n (Close)=\"onCancel()\">\n <div class=\"export-modal-content\">\n <section class=\"format-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-file-export\"></i>\n Export Format\n </h3>\n <p class=\"section-description\">\n Choose a format to export this conversation:\n </p>\n <div class=\"format-options\">\n @for (format of formats; track format.value) {\n <div\n class=\"format-option\"\n [class.selected]=\"selectedFormat === format.value\"\n (click)=\"selectFormat(format.value)\">\n <i [class]=\"format.icon\"></i>\n <div class=\"format-details\">\n <div class=\"format-name\">{{ format.name }}</div>\n <div class=\"format-description\">{{ format.description }}</div>\n </div>\n @if (selectedFormat === format.value) {\n <i class=\"fa-solid fa-check-circle check-icon\"></i>\n }\n </div>\n }\n </div>\n </section>\n <section class=\"options-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-sliders\"></i>\n Export Options\n </h3>\n <div class=\"option-checkboxes\">\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMessages\"\n [disabled]=\"isExporting\">\n <span>Include messages</span>\n <small>Export all conversation messages</small>\n </label>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeMetadata\"\n [disabled]=\"isExporting\">\n <span>Include metadata</span>\n <small>Add creation date, IDs, and other metadata</small>\n </label>\n <!-- Branding applies to EVERY format (HTML gets theme colors + logo +\n footer; markdown/text/JSON get the title and attribution), so it\n belongs here rather than under HTML Options. Shown for HTML even with\n no host branding, because it still snapshots the app's theme. -->\n @if (selectedFormat === 'html' || branding) {\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeTheme\"\n [disabled]=\"isExporting || (selectedFormat === 'html' && !exportOptions.includeCSS)\">\n <span>Include branding</span>\n <small>{{ brandingHint }}</small>\n </label>\n }\n </div>\n @if (selectedFormat === 'json') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">JSON Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.prettyPrint\"\n [disabled]=\"isExporting\">\n <span>Pretty print</span>\n <small>Format JSON with indentation</small>\n </label>\n </div>\n }\n @if (selectedFormat === 'html') {\n <div class=\"format-specific-options\">\n <h4 class=\"subsection-title\">HTML Options</h4>\n <label class=\"checkbox-label\">\n <input\n type=\"checkbox\"\n [(ngModel)]=\"exportOptions.includeCSS\"\n [disabled]=\"isExporting\">\n <span>Include CSS styling</span>\n <small>Embed styles for better presentation</small>\n </label>\n <!-- Which palette gets baked in — NOT the mode the app happens to be in.\n Exporting from a dark session would otherwise put dark text on the\n export's white page. -->\n @if (exportOptions.includeTheme && exportOptions.includeCSS) {\n <label class=\"checkbox-label\">\n <span>Theme</span>\n <select\n class=\"mj-input theme-mode-select\"\n [(ngModel)]=\"exportOptions.themeMode\"\n [disabled]=\"isExporting\">\n <option value=\"light\">Light</option>\n <option value=\"dark\">Dark</option>\n </select>\n <small>Palette baked into the exported file</small>\n </label>\n }\n </div>\n }\n </section>\n @if (errorMessage) {\n <div class=\"error-message\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n {{ errorMessage }}\n </div>\n }\n @if (isExporting) {\n <div class=\"loading-indicator\">\n <mj-loading text=\"Exporting conversation...\" size=\"small\"></mj-loading>\n </div>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton [disabled]=\"isExporting\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button mjButton variant=\"primary\" [disabled]=\"!canExport\" (click)=\"onExport()\">\n <i class=\"fa-solid fa-download\"></i>\n Export\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n }\n `,\n styles: [`\n .export-modal-content {\n padding: 20px;\n max-height: calc(600px - 120px);\n overflow-y: auto;\n }\n\n section {\n margin-bottom: 24px;\n }\n\n .section-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 0 8px 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .section-title i {\n color: var(--mj-brand-primary);\n }\n\n .section-description {\n margin: 0 0 16px 0;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n .format-options {\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n\n .format-option {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border: 2px solid var(--mj-border-strong);\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s;\n background: var(--mj-bg-surface-card);\n }\n\n .format-option:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-sunken);\n }\n\n .format-option.selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 20%, var(--mj-bg-surface-card));\n }\n\n .format-option > i.fa-solid,\n .format-option > i.fas {\n font-size: 24px;\n color: var(--mj-text-muted);\n width: 32px;\n text-align: center;\n }\n\n .format-option.selected > i.fa-solid,\n .format-option.selected > i.fas {\n color: var(--mj-brand-primary);\n }\n\n .format-details {\n flex: 1;\n }\n\n .format-name {\n font-weight: 500;\n font-size: 14px;\n margin-bottom: 2px;\n }\n\n .format-description {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .check-icon {\n font-size: 20px;\n color: var(--mj-status-success);\n }\n\n .option-checkboxes {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .checkbox-label {\n display: flex;\n flex-direction: column;\n gap: 4px;\n cursor: pointer;\n padding: 8px;\n border-radius: 4px;\n transition: background 0.2s;\n }\n\n .checkbox-label:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .checkbox-label input[type=\"checkbox\"] {\n margin-right: 8px;\n cursor: pointer;\n }\n\n .checkbox-label > span {\n display: inline-flex;\n align-items: center;\n font-size: 14px;\n font-weight: 500;\n }\n\n .checkbox-label input[type=\"checkbox\"]:disabled {\n cursor: not-allowed;\n }\n\n .theme-mode-select {\n margin-left: 8px;\n padding: 2px 6px;\n font-size: 13px;\n }\n\n .checkbox-label small {\n margin-left: 28px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .format-specific-options {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n .subsection-title {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n\n .error-message {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--mj-status-error);\n font-size: 13px;\n margin-top: 15px;\n padding: 10px 12px;\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-left: 3px solid var(--mj-status-error);\n border-radius: 4px;\n }\n\n .loading-indicator {\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 15px;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 4px;\n color: var(--mj-text-muted);\n }\n\n mj-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n padding: 15px 20px;\n border-top: 1px solid var(--mj-border-default);\n }\n\n mj-dialog-actions button i {\n margin-right: 6px;\n }\n `]\n})\nexport class ExportModalComponent {\n private _isVisible = false;\n @Input()\n set IsVisible(value: boolean) {\n const opening = value && !this._isVisible;\n this._isVisible = value;\n if (opening) {\n // Fresh open: \"Include branding\" defaults ON only when the host explicitly\n // configured export branding — plain MJ Explorer keeps today's unthemed file.\n // NOTE this reads `branding`, so a host binding both in one change-detection\n // pass must bind [branding] FIRST (Angular sets inputs in template order).\n // chat-area's template does; a host mounting with isVisible already true and\n // branding bound after would get the checkbox defaulted off.\n this.ExportOptions.includeTheme = !!this.Branding;\n }\n }\n get IsVisible(): boolean {\n return this._isVisible;\n }\n\n /** @deprecated Use {@link IsVisible}. */\n get isVisible(): boolean {\n return this.IsVisible;\n }\n /** @deprecated Use {@link IsVisible}. */\n @Input() set isVisible(value: boolean) {\n this.IsVisible = value;\n }\n\n @Input() Conversation?: MJConversationEntity;\n\n /** @deprecated Use {@link Conversation}. */\n @Input() set conversation(value: MJConversationEntity | undefined) {\n this.Conversation = value;\n }\n /** @deprecated Use {@link Conversation}. */\n get conversation(): MJConversationEntity | undefined {\n return this.Conversation;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n /**\n * Host-supplied export branding (theme tokens / logo / title). When set, the\n * HTML format's \"Include branding\" checkbox defaults on and the branding is\n * passed to {@link ExportService} on export. See `ExportBranding`.\n */\n @Input() Branding: ExportBranding | null = null;\n\n /** @deprecated Use {@link Branding}. */\n @Input() set branding(value: ExportBranding | null) {\n this.Branding = value;\n }\n /** @deprecated Use {@link Branding}. */\n get branding(): ExportBranding | null {\n return this.Branding;\n }\n\n /**\n * The scope to export: the view the person has open. Null, or a scope of another conversation,\n * exports Main.\n */\n @Input() Scope: ConversationScope | null = null;\n\n /**\n * Builds a link that opens an exported artifact in the app (this package has no router, so\n * the host supplies it). Null exports artifacts with their IDs only.\n */\n @Input() ArtifactLink: ((target: ExportArtifactLinkTarget) => string | null) | null = null;\n @Output() Cancelled = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Cancelled}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (cancelled) keeps working. Must stay AFTER Cancelled: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() cancelled = this.Cancelled;\n @Output() Exported = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link Exported}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (exported) keeps working. Must stay AFTER Exported: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() exported = this.Exported;\n\n SelectedFormat: ExportFormat | null = 'markdown';\n\n /** @deprecated Use {@link SelectedFormat}. */\n get selectedFormat(): ExportFormat | null {\n return this.SelectedFormat;\n }\n /** @deprecated Use {@link SelectedFormat}. */\n set selectedFormat(value: ExportFormat | null) {\n this.SelectedFormat = value;\n }\n IsExporting = false;\n\n /** @deprecated Use {@link IsExporting}. */\n get isExporting() {\n return this.IsExporting;\n }\n /** @deprecated Use {@link IsExporting}. */\n set isExporting(value) {\n this.IsExporting = value;\n }\n ErrorMessage = '';\n\n /** @deprecated Use {@link ErrorMessage}. */\n get errorMessage() {\n return this.ErrorMessage;\n }\n /** @deprecated Use {@link ErrorMessage}. */\n set errorMessage(value) {\n this.ErrorMessage = value;\n }\n\n ExportOptions: ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: false,\n themeMode: 'light'\n };\n\n /** @deprecated Use {@link ExportOptions}. */\n get exportOptions(): ExportOptions {\n return this.ExportOptions;\n }\n /** @deprecated Use {@link ExportOptions}. */\n set exportOptions(value: ExportOptions) {\n this.ExportOptions = value;\n }\n\n /** Format-aware hint under the \"Include branding\" checkbox. */\n get BrandingHint(): string {\n if (this.SelectedFormat === 'html') {\n if (!this.ExportOptions.includeCSS) {\n return 'Requires \"Include CSS styling\"';\n }\n return `Embed the app's theme colors${this.Branding?.logoUrl ? ', logo,' : ''} and attribution line`;\n }\n const logo = this.Branding?.logoUrl && this.SelectedFormat === 'markdown' ? ', logo,' : '';\n return `Add the title${logo} and attribution line`;\n }\n\n /** @deprecated Use {@link BrandingHint}. */\n get brandingHint(): string {\n return this.BrandingHint;\n }\n\n /**\n * The options actually handed to the service. `includeTheme` is the user's INTENT;\n * this resolves it against the selected format:\n *\n * - HTML with the stylesheet off cannot carry branding (a full-size unstyled logo and\n * an unstyled footer would leak), so it drops.\n * - `includeCSS` is an HTML-only concern and must NOT decide anything for\n * markdown / text / JSON — resolving here rather than mutating `includeTheme` is\n * what keeps an HTML-format toggle from silently following the user into another\n * format.\n */\n private resolveExportOptions(): ExportOptions {\n const unstyledHtml = this.SelectedFormat === 'html' && !this.ExportOptions.includeCSS;\n const brandingOn = !!this.ExportOptions.includeTheme && !unstyledHtml;\n return {\n ...this.ExportOptions,\n includeTheme: brandingOn,\n branding: brandingOn ? (this.Branding ?? undefined) : undefined,\n artifactLink: this.ArtifactLink ?? undefined\n };\n }\n\n get ExportTitle(): string {\n return `Export: ${this.Conversation?.Name || 'Conversation'}`;\n }\n\n /** @deprecated Use {@link ExportTitle}. */\n get exportTitle(): string {\n return this.ExportTitle;\n }\n\n get CanExport(): boolean {\n // Without a conversation OnExport has nothing to export, so the button is disabled\n // rather than doing nothing when clicked.\n return !this.IsExporting &&\n !!this.Conversation &&\n !!this.SelectedFormat &&\n (this.ExportOptions.includeMessages === true);\n }\n\n /** @deprecated Use {@link CanExport}. */\n get canExport(): boolean {\n return this.CanExport;\n }\n\n Formats = [\n {\n value: 'markdown' as ExportFormat,\n name: 'Markdown',\n description: 'Formatted text with markdown syntax',\n icon: 'fa-solid fa-file-alt'\n },\n {\n value: 'json' as ExportFormat,\n name: 'JSON',\n description: 'Structured data format',\n icon: 'fa-solid fa-code'\n },\n {\n value: 'html' as ExportFormat,\n name: 'HTML',\n description: 'Web page format',\n icon: 'fa-solid fa-file-code'\n },\n {\n value: 'text' as ExportFormat,\n name: 'Plain Text',\n description: 'Simple text file',\n icon: 'fa-solid fa-file'\n }\n ];\n\n /** @deprecated Use {@link Formats}. */\n get formats() {\n return this.Formats;\n }\n /** @deprecated Use {@link Formats}. */\n set formats(value) {\n this.Formats = value;\n }\n\n constructor(\n private exportService: ExportService,\n private dialogService: DialogService,\n private toastService: ToastService\n ) {}\n\n SelectFormat(format: ExportFormat): void {\n if (!this.IsExporting) {\n this.SelectedFormat = format;\n }\n }\n\n /** @deprecated Use {@link SelectFormat}. */\n selectFormat(format: ExportFormat): void {\n return this.SelectFormat(format);\n }\n\n async OnExport(): Promise<void> {\n if (!this.CanExport || !this.Conversation) {\n return;\n }\n\n if (!this.ExportOptions.includeMessages) {\n this.ErrorMessage = 'At least \"Include messages\" must be selected';\n return;\n }\n\n this.IsExporting = true;\n this.ErrorMessage = '';\n const conversationId = this.Conversation.ID;\n\n try {\n const scope = this.Scope && UUIDsEqual(this.Scope.ConversationID, conversationId)\n ? this.Scope\n : ConversationEngine.TrunkScope(conversationId);\n await this.exportService.ExportConversation(\n conversationId,\n scope,\n this.SelectedFormat!,\n this.CurrentUser,\n this.resolveExportOptions()\n );\n\n this.toastService.success('Conversation exported successfully');\n this.Exported.emit();\n this.resetForm();\n } catch (error) {\n console.error('Error exporting conversation:', error);\n this.ErrorMessage = error instanceof Error ? error.message : 'Failed to export conversation';\n this.toastService.error(this.ErrorMessage);\n } finally {\n this.IsExporting = false;\n }\n }\n\n /** @deprecated Use {@link OnExport}. */\n async onExport(): Promise<void> {\n return this.OnExport();\n }\n\n OnCancel(): void {\n this.Cancelled.emit();\n this.resetForm();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n private resetForm(): void {\n this.SelectedFormat = 'markdown';\n this.ErrorMessage = '';\n this.ExportOptions = {\n includeMessages: true,\n includeMetadata: true,\n prettyPrint: true,\n includeCSS: true,\n includeTheme: !!this.Branding,\n themeMode: 'light'\n };\n this.IsVisible = false;\n }\n}\n"]}
@@ -0,0 +1,136 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
+ import { UserInfo } from '@memberjunction/core';
4
+ import { ArtifactSynthesisTargetKind, MJArtifactTypeEntity } from '@memberjunction/core-entities';
5
+ import { GraphQLFileStorageClient } from '@memberjunction/graphql-dataprovider';
6
+ import { CreatedLibraryArtifactResult, LibraryDriveExportFormat, LibraryStarterKind, SynthesizeArtifactFromSourcesResult } from '../../services/library-creation.service';
7
+ import { LibraryCollectionNode, LibraryDriveSummary, LibraryItemSummary } from './library.models';
8
+ import * as i0 from "@angular/core";
9
+ export type LibraryCreateDialogTab = 'blank' | 'upload' | 'synthesize' | 'custom';
10
+ interface SynthesisTargetOption {
11
+ Kind: ArtifactSynthesisTargetKind;
12
+ Label: string;
13
+ Icon: string;
14
+ }
15
+ interface StarterTileOption {
16
+ Kind: LibraryStarterKind;
17
+ Title: string;
18
+ Subtitle: string;
19
+ Icon: string;
20
+ AccentClass: string;
21
+ DefaultName: string;
22
+ }
23
+ export declare class LibraryCreateDialogComponent extends BaseAngularComponent {
24
+ private _isOpen;
25
+ set IsOpen(value: boolean);
26
+ get IsOpen(): boolean;
27
+ InitialTab: LibraryCreateDialogTab;
28
+ InitialStarterKind: LibraryStarterKind;
29
+ DefaultCollectionId: string | null;
30
+ Collections: LibraryCollectionNode[];
31
+ AvailableItems: LibraryItemSummary[];
32
+ DefaultSelectedArtifactIds: string[];
33
+ EnvironmentId: string;
34
+ CurrentUser: UserInfo;
35
+ Created: EventEmitter<CreatedLibraryArtifactResult>;
36
+ Synthesized: EventEmitter<SynthesizeArtifactFromSourcesResult>;
37
+ Cancelled: EventEmitter<void>;
38
+ readonly StarterTiles: readonly StarterTileOption[];
39
+ readonly SynthesisTargetOptions: readonly SynthesisTargetOption[];
40
+ readonly SynthesisGoalPresets: readonly {
41
+ Label: string;
42
+ Goal: string;
43
+ }[];
44
+ ActiveTab: LibraryCreateDialogTab;
45
+ SelectedKind: LibraryStarterKind;
46
+ Title: string;
47
+ Description: string;
48
+ TargetCollectionId: string;
49
+ SelectedFile: File | null;
50
+ ConvertToEditable: boolean;
51
+ IsDragOver: boolean;
52
+ SynthesisTargetKind: ArtifactSynthesisTargetKind;
53
+ SynthesisGoal: string;
54
+ SelectedSourceIds: Set<string>;
55
+ SourceSearchQuery: string;
56
+ LinkChartsAndRanges: boolean;
57
+ ArtifactTypes: MJArtifactTypeEntity[];
58
+ SelectedCustomTypeId: string;
59
+ CustomContent: string;
60
+ IsSubmitting: boolean;
61
+ SynthesisProgressMessage: string;
62
+ ErrorMessage: string;
63
+ private readonly creationService;
64
+ private readonly notifications;
65
+ private readonly cdr;
66
+ private initializeDialogOnOpen;
67
+ get DialogTitle(): string;
68
+ get SubmitButtonLabel(): string;
69
+ get FilteredSynthesisSources(): LibraryItemSummary[];
70
+ IsSourceSelected(artifactId: string): boolean;
71
+ ToggleSourceSelection(artifactId: string): void;
72
+ SelectAllVisibleSources(): void;
73
+ ClearSelectedSources(): void;
74
+ SelectSynthesisTarget(kind: ArtifactSynthesisTargetKind): void;
75
+ get IsSelectedFileConvertible(): boolean;
76
+ get EditableCollections(): Array<{
77
+ Id: string;
78
+ Label: string;
79
+ }>;
80
+ get CanSubmit(): boolean;
81
+ SwitchTab(tab: LibraryCreateDialogTab): void;
82
+ SelectStarterKind(tile: StarterTileOption): void;
83
+ OnDragOver(event: DragEvent): void;
84
+ OnDrop(event: DragEvent): void;
85
+ OnFileSelected(event: Event): void;
86
+ Submit(): Promise<void>;
87
+ Cancel(): void;
88
+ FormatSize(bytes: number): string;
89
+ private applySelectedFile;
90
+ private ensureArtifactTypesLoaded;
91
+ private restoreSynthesisTargetPreference;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibraryCreateDialogComponent, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibraryCreateDialogComponent, "mj-library-create-dialog", never, { "IsOpen": { "alias": "IsOpen"; "required": false; }; "InitialTab": { "alias": "InitialTab"; "required": false; }; "InitialStarterKind": { "alias": "InitialStarterKind"; "required": false; }; "DefaultCollectionId": { "alias": "DefaultCollectionId"; "required": false; }; "Collections": { "alias": "Collections"; "required": false; }; "AvailableItems": { "alias": "AvailableItems"; "required": false; }; "DefaultSelectedArtifactIds": { "alias": "DefaultSelectedArtifactIds"; "required": false; }; "EnvironmentId": { "alias": "EnvironmentId"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; }, { "Created": "Created"; "Synthesized": "Synthesized"; "Cancelled": "Cancelled"; }, never, never, false, never>;
94
+ }
95
+ /**
96
+ * Dialog for publishing a snapshot of a native MJ Artifact directly into an external Connected Drive
97
+ * (`.docx`, `.xlsx`, `.pptx`, `.md`, `.csv`, `.json`, `.sql`) with zero `MJ: Files` rows created.
98
+ */
99
+ export declare class LibraryExportDriveDialogComponent extends BaseAngularComponent {
100
+ private _isOpen;
101
+ set IsOpen(value: boolean);
102
+ get IsOpen(): boolean;
103
+ Item: LibraryItemSummary | null;
104
+ VersionNumber: number | null;
105
+ Drives: LibraryDriveSummary[];
106
+ CurrentUser: UserInfo;
107
+ StorageClientOverride: GraphQLFileStorageClient | null;
108
+ Published: EventEmitter<{
109
+ AccountId: string;
110
+ ObjectPath: string;
111
+ }>;
112
+ Cancelled: EventEmitter<void>;
113
+ SelectedAccountId: string;
114
+ FolderPrefix: string;
115
+ SelectedFormat: LibraryDriveExportFormat;
116
+ FormatOptions: Array<{
117
+ Format: LibraryDriveExportFormat;
118
+ Label: string;
119
+ }>;
120
+ FileName: string;
121
+ IsExporting: boolean;
122
+ ErrorMessage: string;
123
+ PendingOverwritePath: string | null;
124
+ private readonly creationService;
125
+ private readonly notifications;
126
+ private readonly cdr;
127
+ get EffectiveVersionNumber(): number;
128
+ private initializeExportDialogOnOpen;
129
+ ClearOverwritePrompt(): void;
130
+ ExportNow(confirmOverwrite?: boolean): Promise<void>;
131
+ private resolveTargetVersionEntity;
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibraryExportDriveDialogComponent, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibraryExportDriveDialogComponent, "mj-library-export-drive-dialog", never, { "IsOpen": { "alias": "IsOpen"; "required": false; }; "Item": { "alias": "Item"; "required": false; }; "VersionNumber": { "alias": "VersionNumber"; "required": false; }; "Drives": { "alias": "Drives"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "StorageClientOverride": { "alias": "StorageClientOverride"; "required": false; }; }, { "Published": "Published"; "Cancelled": "Cancelled"; }, never, never, false, never>;
134
+ }
135
+ export {};
136
+ //# sourceMappingURL=library-create-dialog.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library-create-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/library/library-create-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAW,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAEL,2BAA2B,EAC3B,oBAAoB,EAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EACL,4BAA4B,EAE5B,wBAAwB,EACxB,kBAAkB,EAElB,mCAAmC,EACpC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,qBAAqB,EAC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