@memberjunction/ng-conversations 2.117.0 → 2.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/lib/components/collection/collection-artifact-card.component.d.ts +7 -1
  2. package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
  3. package/dist/lib/components/collection/collection-artifact-card.component.js +14 -18
  4. package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
  5. package/dist/lib/components/collection/collections-full-view.component.d.ts +86 -1
  6. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
  7. package/dist/lib/components/collection/collections-full-view.component.js +1042 -255
  8. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
  9. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +9 -2
  10. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  11. package/dist/lib/components/conversation/conversation-chat-area.component.js +242 -163
  12. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  13. package/dist/lib/components/conversation/conversation-list.component.js +11 -11
  14. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  15. package/dist/lib/components/mention/mention-dropdown.component.js +2 -2
  16. package/dist/lib/components/mention/mention-editor.component.d.ts +21 -0
  17. package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
  18. package/dist/lib/components/mention/mention-editor.component.js +299 -2
  19. package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
  20. package/dist/lib/components/message/actionable-commands.component.d.ts +33 -0
  21. package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -0
  22. package/dist/lib/components/message/actionable-commands.component.js +107 -0
  23. package/dist/lib/components/message/actionable-commands.component.js.map +1 -0
  24. package/dist/lib/components/message/agent-response-form.component.d.ts +72 -0
  25. package/dist/lib/components/message/agent-response-form.component.d.ts.map +1 -0
  26. package/dist/lib/components/message/agent-response-form.component.js +310 -0
  27. package/dist/lib/components/message/agent-response-form.component.js.map +1 -0
  28. package/dist/lib/components/message/form-question.component.d.ts +105 -0
  29. package/dist/lib/components/message/form-question.component.d.ts.map +1 -0
  30. package/dist/lib/components/message/form-question.component.js +621 -0
  31. package/dist/lib/components/message/form-question.component.js.map +1 -0
  32. package/dist/lib/components/message/message-input-box.component.d.ts +12 -0
  33. package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
  34. package/dist/lib/components/message/message-input-box.component.js +14 -1
  35. package/dist/lib/components/message/message-input-box.component.js.map +1 -1
  36. package/dist/lib/components/message/message-input.component.d.ts +3 -3
  37. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  38. package/dist/lib/components/message/message-input.component.js +87 -102
  39. package/dist/lib/components/message/message-input.component.js.map +1 -1
  40. package/dist/lib/components/message/message-item.component.d.ts +39 -6
  41. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  42. package/dist/lib/components/message/message-item.component.js +492 -197
  43. package/dist/lib/components/message/message-item.component.js.map +1 -1
  44. package/dist/lib/components/message/message-list.component.d.ts +2 -1
  45. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  46. package/dist/lib/components/message/message-list.component.js +5 -1
  47. package/dist/lib/components/message/message-list.component.js.map +1 -1
  48. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +10 -0
  49. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
  50. package/dist/lib/components/tasks/tasks-dropdown.component.js +108 -32
  51. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
  52. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +23 -6
  53. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  54. package/dist/lib/components/workspace/conversation-workspace.component.js +128 -52
  55. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  56. package/dist/lib/conversations.module.d.ts +60 -56
  57. package/dist/lib/conversations.module.d.ts.map +1 -1
  58. package/dist/lib/conversations.module.js +17 -1
  59. package/dist/lib/conversations.module.js.map +1 -1
  60. package/dist/lib/models/collection-view.model.d.ts +30 -0
  61. package/dist/lib/models/collection-view.model.d.ts.map +1 -0
  62. package/dist/lib/models/collection-view.model.js +2 -0
  63. package/dist/lib/models/collection-view.model.js.map +1 -0
  64. package/dist/lib/models/conversation-state.model.d.ts +1 -0
  65. package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
  66. package/dist/lib/services/active-tasks.service.d.ts +1 -0
  67. package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
  68. package/dist/lib/services/active-tasks.service.js.map +1 -1
  69. package/dist/lib/services/conversation-agent.service.d.ts +4 -1
  70. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  71. package/dist/lib/services/conversation-agent.service.js +22 -2
  72. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  73. package/dist/lib/services/conversation-streaming.service.d.ts +1 -0
  74. package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
  75. package/dist/lib/services/conversation-streaming.service.js +11 -26
  76. package/dist/lib/services/conversation-streaming.service.js.map +1 -1
  77. package/dist/lib/services/data-cache.service.d.ts +12 -0
  78. package/dist/lib/services/data-cache.service.d.ts.map +1 -1
  79. package/dist/lib/services/data-cache.service.js +41 -0
  80. package/dist/lib/services/data-cache.service.js.map +1 -1
  81. package/dist/lib/services/mention-parser.service.d.ts +6 -1
  82. package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
  83. package/dist/lib/services/mention-parser.service.js +114 -34
  84. package/dist/lib/services/mention-parser.service.js.map +1 -1
  85. package/dist/lib/services/ui-command-handler.service.d.ts +45 -0
  86. package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -0
  87. package/dist/lib/services/ui-command-handler.service.js +95 -0
  88. package/dist/lib/services/ui-command-handler.service.js.map +1 -0
  89. package/package.json +15 -14
@@ -0,0 +1,95 @@
1
+ import { Injectable, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./data-cache.service";
4
+ /**
5
+ * Service for handling UI commands from agents
6
+ * Emits events for commands to be handled by the host application
7
+ * This allows the generic conversations package to remain app-agnostic
8
+ */
9
+ export class UICommandHandlerService {
10
+ dataCacheService;
11
+ /**
12
+ * Event emitted when an actionable command should be executed
13
+ * Host application should subscribe to this and handle the command appropriately
14
+ */
15
+ actionableCommandRequested = new EventEmitter();
16
+ /**
17
+ * Event emitted when an automatic command should be executed
18
+ * Host application should subscribe to this and handle the command appropriately
19
+ */
20
+ automaticCommandRequested = new EventEmitter();
21
+ constructor(dataCacheService) {
22
+ this.dataCacheService = dataCacheService;
23
+ }
24
+ /**
25
+ * Execute an actionable command (triggered by user clicking a button)
26
+ * Emits the command for the host application to handle
27
+ */
28
+ async executeActionableCommand(command) {
29
+ console.log('📤 Emitting actionable command for host app:', command);
30
+ this.actionableCommandRequested.emit(command);
31
+ }
32
+ /**
33
+ * Execute an automatic command (runs immediately without user interaction)
34
+ * Special handling: refresh:data commands execute locally, others emit to host
35
+ */
36
+ async executeAutomaticCommand(command) {
37
+ console.log('Executing automatic command:', command);
38
+ if (command.type === 'refresh:data') {
39
+ // Handle data refresh locally as it's a generic operation
40
+ await this.handleRefreshData(command);
41
+ }
42
+ else {
43
+ // Emit other automatic commands (like notifications) for host to handle
44
+ console.log('📤 Emitting automatic command for host app:', command);
45
+ this.automaticCommandRequested.emit(command);
46
+ }
47
+ }
48
+ /**
49
+ * Execute all automatic commands from an agent result
50
+ */
51
+ async executeAutomaticCommands(commands) {
52
+ if (!commands || commands.length === 0) {
53
+ return;
54
+ }
55
+ for (const command of commands) {
56
+ try {
57
+ await this.executeAutomaticCommand(command);
58
+ }
59
+ catch (error) {
60
+ console.error('Error executing automatic command:', command, error);
61
+ }
62
+ }
63
+ }
64
+ /**
65
+ * Handle refreshing data (entity data or caches)
66
+ * This is handled locally as it's a generic operation that doesn't require host app knowledge
67
+ */
68
+ async handleRefreshData(command) {
69
+ const { scope, entityNames, cacheName } = command;
70
+ if (scope === 'entity' && entityNames && entityNames.length > 0) {
71
+ // Refresh specific entity data
72
+ for (const entityName of entityNames) {
73
+ await this.dataCacheService.refreshEntity(entityName);
74
+ }
75
+ console.log('Refreshed entity data:', entityNames);
76
+ }
77
+ else if (scope === 'cache' && cacheName) {
78
+ // Refresh a specific cache
79
+ await this.dataCacheService.refreshCache(cacheName);
80
+ console.log('Refreshed cache:', cacheName);
81
+ }
82
+ else {
83
+ console.warn('Invalid refresh:data command parameters:', command);
84
+ }
85
+ }
86
+ static ɵfac = function UICommandHandlerService_Factory(t) { return new (t || UICommandHandlerService)(i0.ɵɵinject(i1.DataCacheService)); };
87
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: UICommandHandlerService, factory: UICommandHandlerService.ɵfac, providedIn: 'root' });
88
+ }
89
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UICommandHandlerService, [{
90
+ type: Injectable,
91
+ args: [{
92
+ providedIn: 'root'
93
+ }]
94
+ }], () => [{ type: i1.DataCacheService }], null); })();
95
+ //# sourceMappingURL=ui-command-handler.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-command-handler.service.js","sourceRoot":"","sources":["../../../src/lib/services/ui-command-handler.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;AAIzD;;;;GAIG;AAIH,MAAM,OAAO,uBAAuB;IAcxB;IAbV;;;OAGG;IACI,0BAA0B,GAAG,IAAI,YAAY,EAAqB,CAAC;IAE1E;;;OAGG;IACI,yBAAyB,GAAG,IAAI,YAAY,EAAoB,CAAC;IAExE,YACU,gBAAkC;QAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;IACzC,CAAC;IAEJ;;;OAGG;IACI,KAAK,CAAC,wBAAwB,CAAC,OAA0B;QAC9D,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,OAAO,CAAC,CAAC;QACrE,IAAI,CAAC,0BAA0B,CAAC,IAAI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CAAC;YACxD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,IAAI,SAAS,EAAE,CAAC;YAC1C,2BAA2B;YAC3B,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;iFAhFU,uBAAuB;gEAAvB,uBAAuB,WAAvB,uBAAuB,mBAFtB,MAAM;;iFAEP,uBAAuB;cAHnC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-conversations",
3
- "version": "2.117.0",
3
+ "version": "2.119.0",
4
4
  "description": "MemberJunction: Conversation, Collection, and Artifact management components for any Angular application",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -26,19 +26,20 @@
26
26
  "@angular/router": "18.0.2"
27
27
  },
28
28
  "dependencies": {
29
- "@memberjunction/core": "2.117.0",
30
- "@memberjunction/global": "2.117.0",
31
- "@memberjunction/core-entities": "2.117.0",
32
- "@memberjunction/graphql-dataprovider": "2.117.0",
33
- "@memberjunction/ai-engine-base": "2.117.0",
34
- "@memberjunction/ai": "2.117.0",
35
- "@memberjunction/ai-core-plus": "2.117.0",
36
- "@memberjunction/ng-base-types": "2.117.0",
37
- "@memberjunction/ng-container-directives": "2.117.0",
38
- "@memberjunction/ng-notifications": "2.117.0",
39
- "@memberjunction/ng-code-editor": "2.117.0",
40
- "@memberjunction/ng-tasks": "2.117.0",
41
- "@memberjunction/ng-artifacts": "2.117.0",
29
+ "@memberjunction/core": "2.119.0",
30
+ "@memberjunction/global": "2.119.0",
31
+ "@memberjunction/core-entities": "2.119.0",
32
+ "@memberjunction/graphql-dataprovider": "2.119.0",
33
+ "@memberjunction/ai-engine-base": "2.119.0",
34
+ "@memberjunction/ai": "2.119.0",
35
+ "@memberjunction/ai-core-plus": "2.119.0",
36
+ "@memberjunction/ng-base-types": "2.119.0",
37
+ "@memberjunction/ng-container-directives": "2.119.0",
38
+ "@memberjunction/ng-notifications": "2.119.0",
39
+ "@memberjunction/ng-code-editor": "2.119.0",
40
+ "@memberjunction/ng-tasks": "2.119.0",
41
+ "@memberjunction/ng-artifacts": "2.119.0",
42
+ "@memberjunction/ng-testing": "2.119.0",
42
43
  "@progress/kendo-angular-dialog": "16.2.0",
43
44
  "@progress/kendo-angular-buttons": "16.2.0",
44
45
  "@progress/kendo-angular-inputs": "16.2.0",