max-agent-ui 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -44,7 +44,7 @@ interface AssistantConversationMessage {
44
44
  interface AssistantSuggestionOption {
45
45
  label: string;
46
46
  message: string;
47
- presentation?: 'capability_card' | 'person_card' | 'entity_tag';
47
+ presentation?: 'capability_card' | 'option_card' | 'person_card' | 'entity_tag';
48
48
  section?: string;
49
49
  entity?: AssistantSuggestionEntity;
50
50
  structuredAction?: AssistantStructuredAction;
@@ -265,6 +265,7 @@ interface AssistantSupportTicketRequest {
265
265
  name: string;
266
266
  email: string;
267
267
  phone?: string;
268
+ subject: string;
268
269
  query: string;
269
270
  severity: AssistantSupportTicketSeverity;
270
271
  tags: string[];
@@ -427,6 +428,19 @@ declare class MaxAssistantFeedbackService {
427
428
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
428
429
  }
429
430
 
431
+ declare class MaxAssistantExportService {
432
+ exportTableToExcel(table: AssistantResponseTable): Promise<void>;
433
+ exportVisualisationToPdf(visualisation: AssistantVisualisation): Promise<void>;
434
+ private chartTotal;
435
+ private toExportCellValue;
436
+ private exportFileName;
437
+ private fallbackColor;
438
+ private pdfColor;
439
+ private downloadFile;
440
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantExportService, never>;
441
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantExportService>;
442
+ }
443
+
430
444
  declare class MaxAssistantSupportService {
431
445
  readonly tagsEndpoint = "selection/support-tags";
432
446
  readonly ticketsEndpoint = "support/tickets";
@@ -453,6 +467,7 @@ interface SupportTicketFormValue {
453
467
  name: string;
454
468
  email: string;
455
469
  phone: string;
470
+ subject: string;
456
471
  query: string;
457
472
  severity: AssistantSupportTicketSeverity;
458
473
  tags: string[];
@@ -472,6 +487,7 @@ interface AssistantEntitySuggestionOption extends AssistantSuggestionOption {
472
487
  }
473
488
  declare class MaxAssistantComponent implements OnInit {
474
489
  private readonly assistantService;
490
+ private readonly exportService;
475
491
  private readonly feedbackService;
476
492
  private readonly supportService;
477
493
  private readonly destroyRef;
@@ -515,7 +531,7 @@ declare class MaxAssistantComponent implements OnInit {
515
531
  severity: AssistantSupportTagSeverity;
516
532
  }>;
517
533
  protected supportTicketForm: SupportTicketFormValue;
518
- constructor(assistantService: MaxAssistantService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
534
+ constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
519
535
  ngOnInit(): void;
520
536
  focusComposer(): void;
521
537
  protected get uiCopy(): typeof ASSISTANT_UI_COPY;
@@ -536,6 +552,8 @@ declare class MaxAssistantComponent implements OnInit {
536
552
  section: string;
537
553
  options: AssistantSuggestionOption[];
538
554
  }>;
555
+ protected hasOptionCardSuggestions(suggestions?: AssistantSuggestion[], status?: AssistantChatResponse['status']): boolean;
556
+ protected optionCardSuggestions(suggestions?: AssistantSuggestion[], status?: AssistantChatResponse['status']): AssistantSuggestion[];
539
557
  protected hasEntitySuggestions(suggestions?: AssistantSuggestion[]): boolean;
540
558
  protected entitySuggestionOptions(suggestions?: AssistantSuggestion[]): AssistantEntitySuggestionOption[];
541
559
  protected useSuggestion(suggestion: AssistantSuggestion): void;
@@ -562,7 +580,8 @@ declare class MaxAssistantComponent implements OnInit {
562
580
  protected isTraceStepExpanded(messageId: string, stepId: number): boolean;
563
581
  protected toggleTraceStep(messageId: string, stepId: number): void;
564
582
  protected getResponseGrid(responseDetails: AssistantDisplayResponse): AssistantResponseTable[];
565
- protected hasStructuredPresentation(message: AssistantMessage, responseDetails: AssistantDisplayResponse): boolean;
583
+ protected exportTable(table: AssistantResponseTable): void;
584
+ protected exportVisualisation(visualisation: AssistantVisualisation): void;
566
585
  protected chartTotal(visualisation: AssistantVisualisation): number;
567
586
  protected chartColor(visualisation: AssistantVisualisation, index: number): string;
568
587
  protected doughnutDashArray(visualisation: AssistantVisualisation, index: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -14,8 +14,10 @@
14
14
  "rxjs": "^7.8.0"
15
15
  },
16
16
  "dependencies": {
17
+ "jspdf": "^3.0.4",
17
18
  "marked": "18.0.7",
18
- "tslib": "^2.3.0"
19
+ "tslib": "^2.3.0",
20
+ "xlsx": "^0.18.5"
19
21
  },
20
22
  "files": [
21
23
  "fesm2022",