@memberjunction/ng-skip-chat 2.47.0 → 2.48.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ An Angular component package for integrating the Skip AI assistant into MemberJu
5
5
  ## Features
6
6
 
7
7
  - **Conversational AI Interface**: Full chat interface for Skip AI assistant
8
- - **Dynamic Report Rendering**: Displays AI-generated reports, charts, and data visualizations
8
+ - **Dynamic Component Rendering**: Displays AI-generated UI components, charts, and data visualizations
9
9
  - **Conversation Management**: Create, save, rename, and delete conversations
10
10
  - **Message Controls**: Edit, delete, and rate messages
11
11
  - **Inline Artifacts**: View and interact with AI-generated artifacts directly within messages
@@ -1,10 +1,14 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList, SimpleChanges } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList, SimpleChanges, ChangeDetectorRef, NgZone } from '@angular/core';
2
2
  import { Metadata, RunQuery, RunView } from '@memberjunction/core';
3
3
  import { SimpleMetadata, SimpleRunQuery, SimpleRunView, SkipAPIAnalysisCompleteResponse, SkipComponentStyles, SkipComponentCallbacks, SkipComponentUtilities, SkipComponentOption } from '@memberjunction/skip-types';
4
4
  import { DrillDownInfo } from '../drill-down-info';
5
+ import { DomSanitizer } from '@angular/platform-browser';
5
6
  import * as i0 from "@angular/core";
6
- export declare class SkipDynamicHTMLReportComponent implements AfterViewInit, OnDestroy {
7
- HTMLReport: string | null;
7
+ export declare class SkipDynamicUIComponentComponent implements AfterViewInit, OnDestroy {
8
+ private sanitizer;
9
+ private cdr;
10
+ private ngZone;
11
+ UIComponentCode: string | null;
8
12
  ComponentObjectName: string | null;
9
13
  ShowPrintReport: boolean;
10
14
  ShowReportOptionsToggle: boolean;
@@ -21,10 +25,18 @@ export declare class SkipDynamicHTMLReportComponent implements AfterViewInit, On
21
25
  technicalDetails?: string;
22
26
  } | null;
23
27
  isCreatingReport: boolean;
28
+ showFunctionalRequirements: boolean;
29
+ showDataRequirements: boolean;
30
+ showTechnicalDesign: boolean;
31
+ showCode: boolean;
32
+ detailsPanelHeight: string;
33
+ private isResizing;
34
+ private startY;
35
+ private startHeight;
24
36
  private reactHostCache;
25
37
  private currentHostIndex;
26
38
  private callbacks;
27
- constructor();
39
+ constructor(sanitizer: DomSanitizer, cdr: ChangeDetectorRef, ngZone: NgZone);
28
40
  /**
29
41
  * Gets the currently selected report option
30
42
  */
@@ -66,6 +78,50 @@ export declare class SkipDynamicHTMLReportComponent implements AfterViewInit, On
66
78
  * Handle create report request for a specific option
67
79
  */
68
80
  createReportForOption(optionIndex: number): void;
81
+ /**
82
+ * Get the component type name for display
83
+ */
84
+ getComponentTypeName(option: SkipComponentOption): string;
85
+ /**
86
+ * Toggle methods for showing/hiding component details
87
+ */
88
+ toggleShowFunctionalRequirements(): void;
89
+ toggleShowDataRequirements(): void;
90
+ toggleShowTechnicalDesign(): void;
91
+ toggleShowCode(): void;
92
+ /**
93
+ * Adjust the details panel height when toggling views
94
+ */
95
+ private adjustDetailsPanelHeight;
96
+ /**
97
+ * Format functional requirements as HTML
98
+ */
99
+ getFormattedFunctionalRequirements(option: SkipComponentOption): any;
100
+ /**
101
+ * Format data requirements as HTML
102
+ */
103
+ getFormattedDataRequirements(option: SkipComponentOption): any;
104
+ /**
105
+ * Format technical design as HTML
106
+ */
107
+ getFormattedTechnicalDesign(option: SkipComponentOption): any;
108
+ /**
109
+ * Get the component code
110
+ */
111
+ getComponentCode(option: SkipComponentOption): string;
112
+ /**
113
+ * Start resizing the details panel
114
+ */
115
+ startResize(event: MouseEvent | TouchEvent): void;
116
+ /**
117
+ * Handle resize movement
118
+ */
119
+ private onResize;
120
+ /**
121
+ * Stop resizing
122
+ */
123
+ private stopResize;
124
+ onWindowResize(): void;
69
125
  ngAfterViewInit(): void;
70
126
  ngOnDestroy(): void;
71
127
  ngOnChanges(changes: SimpleChanges): void;
@@ -77,7 +133,7 @@ export declare class SkipDynamicHTMLReportComponent implements AfterViewInit, On
77
133
  get SkipData(): SkipAPIAnalysisCompleteResponse | undefined;
78
134
  set SkipData(d: SkipAPIAnalysisCompleteResponse | undefined);
79
135
  /**
80
- * Sets up the report options from the SkipData, prioritizing the new htmlReportOptions array
136
+ * Sets up the component options from the SkipData, prioritizing the new componentOptions array
81
137
  * but falling back to the deprecated htmlReport/htmlReportObjectName for backward compatibility
82
138
  */
83
139
  private setupReportOptions;
@@ -97,7 +153,7 @@ export declare class SkipDynamicHTMLReportComponent implements AfterViewInit, On
97
153
  protected CreateSimpleRunView(rv: RunView): SimpleRunView;
98
154
  protected SetupCallbacks(): SkipComponentCallbacks;
99
155
  refreshReport(data?: any): Promise<void>;
100
- static ɵfac: i0.ɵɵFactoryDeclaration<SkipDynamicHTMLReportComponent, never>;
101
- static ɵcmp: i0.ɵɵComponentDeclaration<SkipDynamicHTMLReportComponent, "skip-dynamic-html-report", never, { "HTMLReport": { "alias": "HTMLReport"; "required": false; }; "ComponentObjectName": { "alias": "ComponentObjectName"; "required": false; }; "ShowPrintReport": { "alias": "ShowPrintReport"; "required": false; }; "ShowReportOptionsToggle": { "alias": "ShowReportOptionsToggle"; "required": false; }; "ShowCreateReportButton": { "alias": "ShowCreateReportButton"; "required": false; }; "matchingReportID": { "alias": "matchingReportID"; "required": false; }; "SkipData": { "alias": "SkipData"; "required": false; }; }, { "DrillDownEvent": "DrillDownEvent"; "CreateReportRequested": "CreateReportRequested"; }, never, never, false, never>;
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkipDynamicUIComponentComponent, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkipDynamicUIComponentComponent, "skip-dynamic-ui-component", never, { "UIComponentCode": { "alias": "UIComponentCode"; "required": false; }; "ComponentObjectName": { "alias": "ComponentObjectName"; "required": false; }; "ShowPrintReport": { "alias": "ShowPrintReport"; "required": false; }; "ShowReportOptionsToggle": { "alias": "ShowReportOptionsToggle"; "required": false; }; "ShowCreateReportButton": { "alias": "ShowCreateReportButton"; "required": false; }; "matchingReportID": { "alias": "matchingReportID"; "required": false; }; "SkipData": { "alias": "SkipData"; "required": false; }; }, { "DrillDownEvent": "DrillDownEvent"; "CreateReportRequested": "CreateReportRequested"; }, never, never, false, never>;
102
158
  }
103
- //# sourceMappingURL=dynamic-html-report.d.ts.map
159
+ //# sourceMappingURL=dynamic-ui-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-ui-component.d.ts","sourceRoot":"","sources":["../../../src/lib/dynamic-report/dynamic-ui-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,UAAU,EAAE,YAAY,EAAS,SAAS,EAAmC,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAC;AACzM,OAAO,EAAwC,QAAQ,EAAE,QAAQ,EAAkB,OAAO,EAAiB,MAAM,sBAAsB,CAAC;AAExI,OAAO,EAAiC,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,+BAA+B,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,mBAAmB,EAAkC,MAAM,4BAA4B,CAAC;AACrR,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAGzD,qBAmrBa,+BAAgC,YAAW,aAAa,EAAE,SAAS;IA0CxE,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,MAAM;IA3CT,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IACtC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1C,eAAe,EAAE,OAAO,CAAQ;IAChC,uBAAuB,EAAE,OAAO,CAAQ;IACxC,sBAAsB,EAAE,OAAO,CAAS;IACxC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACtC,cAAc,8BAAqC;IACnD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