@memberjunction/ng-artifacts 2.105.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 (57) hide show
  1. package/dist/lib/artifacts.module.d.ts +30 -0
  2. package/dist/lib/artifacts.module.d.ts.map +1 -0
  3. package/dist/lib/artifacts.module.js +124 -0
  4. package/dist/lib/artifacts.module.js.map +1 -0
  5. package/dist/lib/components/artifact-message-card.component.d.ts +47 -0
  6. package/dist/lib/components/artifact-message-card.component.d.ts.map +1 -0
  7. package/dist/lib/components/artifact-message-card.component.js +270 -0
  8. package/dist/lib/components/artifact-message-card.component.js.map +1 -0
  9. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts +42 -0
  10. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts.map +1 -0
  11. package/dist/lib/components/artifact-type-plugin-viewer.component.js +213 -0
  12. package/dist/lib/components/artifact-type-plugin-viewer.component.js.map +1 -0
  13. package/dist/lib/components/artifact-version-history.component.d.ts +28 -0
  14. package/dist/lib/components/artifact-version-history.component.d.ts.map +1 -0
  15. package/dist/lib/components/artifact-version-history.component.js +280 -0
  16. package/dist/lib/components/artifact-version-history.component.js.map +1 -0
  17. package/dist/lib/components/artifact-viewer-panel.component.d.ts +73 -0
  18. package/dist/lib/components/artifact-viewer-panel.component.d.ts.map +1 -0
  19. package/dist/lib/components/artifact-viewer-panel.component.js +942 -0
  20. package/dist/lib/components/artifact-viewer-panel.component.js.map +1 -0
  21. package/dist/lib/components/base-artifact-viewer.component.d.ts +70 -0
  22. package/dist/lib/components/base-artifact-viewer.component.d.ts.map +1 -0
  23. package/dist/lib/components/base-artifact-viewer.component.js +110 -0
  24. package/dist/lib/components/base-artifact-viewer.component.js.map +1 -0
  25. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts +17 -0
  26. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts.map +1 -0
  27. package/dist/lib/components/plugins/code-artifact-viewer.component.js +125 -0
  28. package/dist/lib/components/plugins/code-artifact-viewer.component.js.map +1 -0
  29. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts +41 -0
  30. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts.map +1 -0
  31. package/dist/lib/components/plugins/component-artifact-viewer.component.js +293 -0
  32. package/dist/lib/components/plugins/component-artifact-viewer.component.js.map +1 -0
  33. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts +18 -0
  34. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts.map +1 -0
  35. package/dist/lib/components/plugins/html-artifact-viewer.component.js +128 -0
  36. package/dist/lib/components/plugins/html-artifact-viewer.component.js.map +1 -0
  37. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts +37 -0
  38. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts.map +1 -0
  39. package/dist/lib/components/plugins/json-artifact-viewer.component.js +208 -0
  40. package/dist/lib/components/plugins/json-artifact-viewer.component.js.map +1 -0
  41. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts +14 -0
  42. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts.map +1 -0
  43. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js +121 -0
  44. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js.map +1 -0
  45. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts +18 -0
  46. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts.map +1 -0
  47. package/dist/lib/components/plugins/svg-artifact-viewer.component.js +129 -0
  48. package/dist/lib/components/plugins/svg-artifact-viewer.component.js.map +1 -0
  49. package/dist/lib/interfaces/artifact-viewer-plugin.interface.d.ts +44 -0
  50. package/dist/lib/interfaces/artifact-viewer-plugin.interface.d.ts.map +1 -0
  51. package/dist/lib/interfaces/artifact-viewer-plugin.interface.js +2 -0
  52. package/dist/lib/interfaces/artifact-viewer-plugin.interface.js.map +1 -0
  53. package/dist/public-api.d.ts +14 -0
  54. package/dist/public-api.d.ts.map +1 -0
  55. package/dist/public-api.js +23 -0
  56. package/dist/public-api.js.map +1 -0
  57. package/package.json +41 -0
@@ -0,0 +1,30 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/artifact-type-plugin-viewer.component";
3
+ import * as i2 from "./components/artifact-viewer-panel.component";
4
+ import * as i3 from "./components/artifact-version-history.component";
5
+ import * as i4 from "./components/artifact-message-card.component";
6
+ import * as i5 from "./components/plugins/json-artifact-viewer.component";
7
+ import * as i6 from "./components/plugins/code-artifact-viewer.component";
8
+ import * as i7 from "./components/plugins/markdown-artifact-viewer.component";
9
+ import * as i8 from "./components/plugins/html-artifact-viewer.component";
10
+ import * as i9 from "./components/plugins/svg-artifact-viewer.component";
11
+ import * as i10 from "./components/plugins/component-artifact-viewer.component";
12
+ import * as i11 from "@angular/common";
13
+ import * as i12 from "@angular/forms";
14
+ import * as i13 from "ngx-markdown";
15
+ import * as i14 from "@memberjunction/ng-code-editor";
16
+ import * as i15 from "@memberjunction/ng-react";
17
+ /**
18
+ * Module for artifact viewer plugin system.
19
+ * Provides components for viewing different types of artifacts (JSON, Code, Markdown, HTML, SVG, Components).
20
+ *
21
+ * Plugins are automatically registered via @RegisterClass decorator and can be instantiated
22
+ * using MJGlobal.Instance.ClassFactory.CreateInstance('PluginClassName').
23
+ */
24
+ export declare class ArtifactsModule {
25
+ constructor();
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactsModule, never>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ArtifactsModule, [typeof i1.ArtifactTypePluginViewerComponent, typeof i2.ArtifactViewerPanelComponent, typeof i3.ArtifactVersionHistoryComponent, typeof i4.ArtifactMessageCardComponent, typeof i5.JsonArtifactViewerComponent, typeof i6.CodeArtifactViewerComponent, typeof i7.MarkdownArtifactViewerComponent, typeof i8.HtmlArtifactViewerComponent, typeof i9.SvgArtifactViewerComponent, typeof i10.ComponentArtifactViewerComponent], [typeof i11.CommonModule, typeof i12.FormsModule, typeof i13.MarkdownModule, typeof i14.CodeEditorModule, typeof i15.MJReactModule], [typeof i1.ArtifactTypePluginViewerComponent, typeof i2.ArtifactViewerPanelComponent, typeof i3.ArtifactVersionHistoryComponent, typeof i4.ArtifactMessageCardComponent, typeof i5.JsonArtifactViewerComponent, typeof i6.CodeArtifactViewerComponent, typeof i7.MarkdownArtifactViewerComponent, typeof i8.HtmlArtifactViewerComponent, typeof i9.SvgArtifactViewerComponent, typeof i10.ComponentArtifactViewerComponent]>;
28
+ static ɵinj: i0.ɵɵInjectorDeclaration<ArtifactsModule>;
29
+ }
30
+ //# sourceMappingURL=artifacts.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.module.d.ts","sourceRoot":"","sources":["../../src/lib/artifacts.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuBA;;;;;;GAMG;AACH,qBA8Ca,eAAe;;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAa3B"}
@@ -0,0 +1,124 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { MarkdownModule } from 'ngx-markdown';
5
+ // Import MJ modules
6
+ import { CodeEditorModule } from '@memberjunction/ng-code-editor';
7
+ import { MJReactModule } from '@memberjunction/ng-react';
8
+ // Import plugin components (note: base component is abstract and NOT declared)
9
+ import { JsonArtifactViewerComponent } from './components/plugins/json-artifact-viewer.component';
10
+ import { CodeArtifactViewerComponent } from './components/plugins/code-artifact-viewer.component';
11
+ import { MarkdownArtifactViewerComponent } from './components/plugins/markdown-artifact-viewer.component';
12
+ import { HtmlArtifactViewerComponent } from './components/plugins/html-artifact-viewer.component';
13
+ import { SvgArtifactViewerComponent } from './components/plugins/svg-artifact-viewer.component';
14
+ import { ComponentArtifactViewerComponent } from './components/plugins/component-artifact-viewer.component';
15
+ // Import artifact type plugin viewer component
16
+ import { ArtifactTypePluginViewerComponent } from './components/artifact-type-plugin-viewer.component';
17
+ import { ArtifactVersionHistoryComponent } from './components/artifact-version-history.component';
18
+ import { ArtifactViewerPanelComponent } from './components/artifact-viewer-panel.component';
19
+ import { ArtifactMessageCardComponent } from './components/artifact-message-card.component';
20
+ import * as i0 from "@angular/core";
21
+ import * as i1 from "ngx-markdown";
22
+ /**
23
+ * Module for artifact viewer plugin system.
24
+ * Provides components for viewing different types of artifacts (JSON, Code, Markdown, HTML, SVG, Components).
25
+ *
26
+ * Plugins are automatically registered via @RegisterClass decorator and can be instantiated
27
+ * using MJGlobal.Instance.ClassFactory.CreateInstance('PluginClassName').
28
+ */
29
+ export class ArtifactsModule {
30
+ constructor() {
31
+ // Ensure plugin components are registered on module load by referencing their classes
32
+ // The @RegisterClass decorator on each component handles the actual registration with MJGlobal
33
+ [
34
+ JsonArtifactViewerComponent,
35
+ CodeArtifactViewerComponent,
36
+ MarkdownArtifactViewerComponent,
37
+ HtmlArtifactViewerComponent,
38
+ SvgArtifactViewerComponent,
39
+ ComponentArtifactViewerComponent
40
+ ];
41
+ }
42
+ static ɵfac = function ArtifactsModule_Factory(t) { return new (t || ArtifactsModule)(); };
43
+ static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ArtifactsModule });
44
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
45
+ FormsModule,
46
+ MarkdownModule.forChild(),
47
+ CodeEditorModule,
48
+ MJReactModule] });
49
+ }
50
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArtifactsModule, [{
51
+ type: NgModule,
52
+ args: [{
53
+ declarations: [
54
+ // Artifact type plugin viewer (loads appropriate plugin based on DriverClass)
55
+ ArtifactTypePluginViewerComponent,
56
+ // Artifact viewer UI components
57
+ ArtifactViewerPanelComponent,
58
+ ArtifactVersionHistoryComponent,
59
+ ArtifactMessageCardComponent,
60
+ // Plugin components
61
+ JsonArtifactViewerComponent,
62
+ CodeArtifactViewerComponent,
63
+ MarkdownArtifactViewerComponent,
64
+ HtmlArtifactViewerComponent,
65
+ SvgArtifactViewerComponent,
66
+ ComponentArtifactViewerComponent
67
+ ],
68
+ imports: [
69
+ CommonModule,
70
+ FormsModule,
71
+ MarkdownModule.forChild(),
72
+ CodeEditorModule,
73
+ MJReactModule
74
+ ],
75
+ exports: [
76
+ // Export artifact type plugin viewer
77
+ ArtifactTypePluginViewerComponent,
78
+ // Export artifact viewer UI components
79
+ ArtifactViewerPanelComponent,
80
+ ArtifactVersionHistoryComponent,
81
+ ArtifactMessageCardComponent,
82
+ // Export plugin components
83
+ JsonArtifactViewerComponent,
84
+ CodeArtifactViewerComponent,
85
+ MarkdownArtifactViewerComponent,
86
+ HtmlArtifactViewerComponent,
87
+ SvgArtifactViewerComponent,
88
+ ComponentArtifactViewerComponent
89
+ ],
90
+ providers: [
91
+ // Plugins are registered via @RegisterClass decorator on component classes, no providers needed
92
+ ]
93
+ }]
94
+ }], () => [], null); })();
95
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ArtifactsModule, { declarations: [
96
+ // Artifact type plugin viewer (loads appropriate plugin based on DriverClass)
97
+ ArtifactTypePluginViewerComponent,
98
+ // Artifact viewer UI components
99
+ ArtifactViewerPanelComponent,
100
+ ArtifactVersionHistoryComponent,
101
+ ArtifactMessageCardComponent,
102
+ // Plugin components
103
+ JsonArtifactViewerComponent,
104
+ CodeArtifactViewerComponent,
105
+ MarkdownArtifactViewerComponent,
106
+ HtmlArtifactViewerComponent,
107
+ SvgArtifactViewerComponent,
108
+ ComponentArtifactViewerComponent], imports: [CommonModule,
109
+ FormsModule, i1.MarkdownModule, CodeEditorModule,
110
+ MJReactModule], exports: [
111
+ // Export artifact type plugin viewer
112
+ ArtifactTypePluginViewerComponent,
113
+ // Export artifact viewer UI components
114
+ ArtifactViewerPanelComponent,
115
+ ArtifactVersionHistoryComponent,
116
+ ArtifactMessageCardComponent,
117
+ // Export plugin components
118
+ JsonArtifactViewerComponent,
119
+ CodeArtifactViewerComponent,
120
+ MarkdownArtifactViewerComponent,
121
+ HtmlArtifactViewerComponent,
122
+ SvgArtifactViewerComponent,
123
+ ComponentArtifactViewerComponent] }); })();
124
+ //# sourceMappingURL=artifacts.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.module.js","sourceRoot":"","sources":["../../src/lib/artifacts.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,oBAAoB;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,+EAA+E;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAC;AAC1G,OAAO,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAChG,OAAO,EAAE,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAE5G,+CAA+C;AAC/C,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EAAE,+BAA+B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;;;AAE5F;;;;;;GAMG;AA+CH,MAAM,OAAO,eAAe;IAC1B;QACE,sFAAsF;QACtF,+FAA+F;QAC/F;YACE,2BAA2B;YAC3B,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A4B;QAE5B,2BAA2B;QAC3B,2BAA2B;QAC3B,2BAA2B;QAC3B,+BAA+B;QAC/B,2BAA2B;QAC3B,0BAA0B;QAC1B,gCAAgC"}
@@ -0,0 +1,47 @@
1
+ import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
2
+ import { ArtifactEntity, ArtifactVersionEntity } from '@memberjunction/core-entities';
3
+ import { UserInfo } from '@memberjunction/core';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Artifact message card component - displays a simple info bar for artifacts in conversation messages.
7
+ * Shows artifact icon, name, type badge, and version. Click to open full artifact viewer.
8
+ */
9
+ export declare class ArtifactMessageCardComponent implements OnInit, OnDestroy {
10
+ artifactId: string;
11
+ versionNumber?: number;
12
+ currentUser: UserInfo;
13
+ artifact?: ArtifactEntity;
14
+ artifactVersion?: ArtifactVersionEntity;
15
+ actionPerformed: EventEmitter<{
16
+ action: string;
17
+ artifact: ArtifactEntity;
18
+ version?: ArtifactVersionEntity | undefined;
19
+ }>;
20
+ _artifact: ArtifactEntity | null;
21
+ _currentVersion: ArtifactVersionEntity | null;
22
+ loading: boolean;
23
+ error: boolean;
24
+ private destroy$;
25
+ constructor();
26
+ ngOnInit(): Promise<void>;
27
+ get artifactEntity(): ArtifactEntity | null;
28
+ get currentVersion(): ArtifactVersionEntity | null;
29
+ ngOnDestroy(): void;
30
+ private loadArtifact;
31
+ private loadVersionContent;
32
+ /**
33
+ * Get the display name - prefer version-specific name if available, otherwise use artifact name
34
+ */
35
+ get displayName(): string;
36
+ /**
37
+ * Get the display description - prefer version-specific description if available, otherwise use artifact description
38
+ */
39
+ get displayDescription(): string | null;
40
+ get isCodeArtifact(): boolean;
41
+ getArtifactIcon(): string;
42
+ getTypeBadgeColor(): string;
43
+ openFullView(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactMessageCardComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<ArtifactMessageCardComponent, "mj-artifact-message-card", never, { "artifactId": { "alias": "artifactId"; "required": false; }; "versionNumber": { "alias": "versionNumber"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "artifact": { "alias": "artifact"; "required": false; }; "artifactVersion": { "alias": "artifactVersion"; "required": false; }; }, { "actionPerformed": "actionPerformed"; }, never, never, false, never>;
46
+ }
47
+ //# sourceMappingURL=artifact-message-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-message-card.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-message-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAW,MAAM,sBAAsB,CAAC;;AAIzD;;;GAGG;AACH,qBAyKa,4BAA6B,YAAW,MAAM,EAAE,SAAS;IAC3D,UAAU,EAAG,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAG,QAAQ,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACvC,eAAe;gBAA6B,MAAM;kBAAY,cAAc;;OAAsC;IAErH,SAAS,EAAE,cAAc,GAAG,IAAI,CAAQ;IACxC,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAQ;IACrD,OAAO,UAAQ;IACf,KAAK,UAAS;IAErB,OAAO,CAAC,QAAQ,CAAuB;;IAIjC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,IAAW,cAAc,IAAI,cAAc,GAAG,IAAI,CAEjD;IAED,IAAW,cAAc,IAAI,qBAAqB,GAAG,IAAI,CAExD;IAED,WAAW,IAAI,IAAI;YAKL,YAAY;YAoCZ,kBAAkB;IAyBhC;;OAEG;IACH,IAAW,WAAW,IAAI,MAAM,CAK/B;IAED;;OAEG;IACH,IAAW,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAK7C;IAED,IAAW,cAAc,IAAI,OAAO,CAKnC;IAEM,eAAe,IAAI,MAAM;IAgBzB,iBAAiB,IAAI,MAAM;IAa3B,YAAY,IAAI,IAAI;yCAhKhB,4BAA4B;2CAA5B,4BAA4B;CAqKxC"}
@@ -0,0 +1,270 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ import { RunView } from '@memberjunction/core';
3
+ import { Subject } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ function ArtifactMessageCardComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
7
+ i0.ɵɵelementStart(0, "div", 1);
8
+ i0.ɵɵelement(1, "div", 4)(2, "div", 5);
9
+ i0.ɵɵelementEnd();
10
+ } }
11
+ function ArtifactMessageCardComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
12
+ i0.ɵɵelementStart(0, "div", 2);
13
+ i0.ɵɵelement(1, "i", 6);
14
+ i0.ɵɵelementStart(2, "span");
15
+ i0.ɵɵtext(3, "Failed to load artifact");
16
+ i0.ɵɵelementEnd()();
17
+ } }
18
+ function ArtifactMessageCardComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
19
+ const _r1 = i0.ɵɵgetCurrentView();
20
+ i0.ɵɵelementStart(0, "div", 7);
21
+ i0.ɵɵlistener("click", function ArtifactMessageCardComponent_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openFullView()); });
22
+ i0.ɵɵelementStart(1, "div", 8);
23
+ i0.ɵɵelement(2, "i", 9);
24
+ i0.ɵɵelementEnd();
25
+ i0.ɵɵelementStart(3, "div", 10)(4, "span", 11);
26
+ i0.ɵɵtext(5);
27
+ i0.ɵɵelementEnd();
28
+ i0.ɵɵelementStart(6, "div", 12)(7, "span", 13);
29
+ i0.ɵɵtext(8);
30
+ i0.ɵɵelementEnd();
31
+ i0.ɵɵelementStart(9, "span", 14);
32
+ i0.ɵɵtext(10);
33
+ i0.ɵɵelementEnd()()();
34
+ i0.ɵɵelementStart(11, "div", 15);
35
+ i0.ɵɵelement(12, "i", 16);
36
+ i0.ɵɵelementEnd()();
37
+ } if (rf & 2) {
38
+ const ctx_r1 = i0.ɵɵnextContext();
39
+ i0.ɵɵadvance(2);
40
+ i0.ɵɵproperty("ngClass", ctx_r1.getArtifactIcon());
41
+ i0.ɵɵadvance(3);
42
+ i0.ɵɵtextInterpolate(ctx_r1.displayName);
43
+ i0.ɵɵadvance(2);
44
+ i0.ɵɵstyleProp("background", ctx_r1.getTypeBadgeColor());
45
+ i0.ɵɵadvance();
46
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.artifact.Type, " ");
47
+ i0.ɵɵadvance(2);
48
+ i0.ɵɵtextInterpolate1("v", (ctx_r1.currentVersion == null ? null : ctx_r1.currentVersion.VersionNumber) || 1, "");
49
+ } }
50
+ /**
51
+ * Artifact message card component - displays a simple info bar for artifacts in conversation messages.
52
+ * Shows artifact icon, name, type badge, and version. Click to open full artifact viewer.
53
+ */
54
+ export class ArtifactMessageCardComponent {
55
+ artifactId;
56
+ versionNumber;
57
+ currentUser;
58
+ artifact; // Optional - if provided, skips loading
59
+ artifactVersion; // Optional - if provided, skips loading
60
+ actionPerformed = new EventEmitter();
61
+ _artifact = null;
62
+ _currentVersion = null;
63
+ loading = true;
64
+ error = false;
65
+ destroy$ = new Subject();
66
+ constructor() { }
67
+ async ngOnInit() {
68
+ // If entities are provided, use them directly
69
+ if (this.artifact && this.artifactVersion) {
70
+ this._artifact = this.artifact;
71
+ this._currentVersion = this.artifactVersion;
72
+ this.loading = false;
73
+ }
74
+ else {
75
+ // Otherwise load from database
76
+ await this.loadArtifact();
77
+ }
78
+ }
79
+ // Getters to access the internal properties
80
+ get artifactEntity() {
81
+ return this._artifact;
82
+ }
83
+ get currentVersion() {
84
+ return this._currentVersion;
85
+ }
86
+ ngOnDestroy() {
87
+ this.destroy$.next();
88
+ this.destroy$.complete();
89
+ }
90
+ async loadArtifact() {
91
+ if (!this.artifactId) {
92
+ this.error = true;
93
+ this.loading = false;
94
+ return;
95
+ }
96
+ try {
97
+ this.loading = true;
98
+ this.error = false;
99
+ // Load artifact directly
100
+ const rv = new RunView();
101
+ const result = await rv.RunView({
102
+ EntityName: 'MJ: Conversation Artifacts',
103
+ ExtraFilter: `ID='${this.artifactId}'`,
104
+ MaxRows: 1,
105
+ ResultType: 'entity_object'
106
+ }, this.currentUser);
107
+ if (result.Success && result.Results && result.Results.length > 0) {
108
+ this._artifact = result.Results[0];
109
+ // Load version content
110
+ await this.loadVersionContent();
111
+ }
112
+ else {
113
+ this.error = true;
114
+ }
115
+ }
116
+ catch (err) {
117
+ console.error('Error loading artifact:', err);
118
+ this.error = true;
119
+ }
120
+ finally {
121
+ this.loading = false;
122
+ }
123
+ }
124
+ async loadVersionContent() {
125
+ if (!this._artifact)
126
+ return;
127
+ try {
128
+ const rv = new RunView();
129
+ const filter = this.versionNumber
130
+ ? `ArtifactID='${this._artifact.ID}' AND VersionNumber=${this.versionNumber}`
131
+ : `ArtifactID='${this._artifact.ID}'`;
132
+ const result = await rv.RunView({
133
+ EntityName: 'MJ: Artifact Versions',
134
+ ExtraFilter: filter,
135
+ OrderBy: 'VersionNumber DESC',
136
+ MaxRows: 1,
137
+ ResultType: 'entity_object'
138
+ }, this.currentUser);
139
+ if (result.Success && result.Results && result.Results.length > 0) {
140
+ this._currentVersion = result.Results[0];
141
+ }
142
+ }
143
+ catch (err) {
144
+ console.error('Error loading version content:', err);
145
+ }
146
+ }
147
+ /**
148
+ * Get the display name - prefer version-specific name if available, otherwise use artifact name
149
+ */
150
+ get displayName() {
151
+ if (this._currentVersion?.Name) {
152
+ return this._currentVersion.Name;
153
+ }
154
+ return this._artifact?.Name || 'Untitled';
155
+ }
156
+ /**
157
+ * Get the display description - prefer version-specific description if available, otherwise use artifact description
158
+ */
159
+ get displayDescription() {
160
+ if (this._currentVersion?.Description) {
161
+ return this._currentVersion.Description;
162
+ }
163
+ return this._artifact?.Description || null;
164
+ }
165
+ get isCodeArtifact() {
166
+ if (!this._artifact)
167
+ return false;
168
+ const name = this._artifact.Name?.toLowerCase() || '';
169
+ const codeExtensions = ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.cpp', '.c', '.go', '.rs', '.sql', '.html', '.css', '.scss'];
170
+ return codeExtensions.some(ext => name.endsWith(ext));
171
+ }
172
+ getArtifactIcon() {
173
+ if (!this._artifact)
174
+ return 'fa-file';
175
+ const name = this._artifact.Name?.toLowerCase() || '';
176
+ const type = this._artifact.Type?.toLowerCase() || '';
177
+ if (type.includes('code') || this.isCodeArtifact)
178
+ return 'fa-file-code';
179
+ if (type.includes('report'))
180
+ return 'fa-chart-line';
181
+ if (type.includes('dashboard'))
182
+ return 'fa-chart-bar';
183
+ if (type.includes('document') || name.endsWith('.md'))
184
+ return 'fa-file-lines';
185
+ if (name.endsWith('.json'))
186
+ return 'fa-file-code';
187
+ if (name.endsWith('.html'))
188
+ return 'fa-file-code';
189
+ return 'fa-file';
190
+ }
191
+ getTypeBadgeColor() {
192
+ if (!this._artifact)
193
+ return '#6B7280';
194
+ const type = this._artifact.Type?.toLowerCase() || '';
195
+ if (type.includes('code'))
196
+ return '#8B5CF6'; // Purple
197
+ if (type.includes('report'))
198
+ return '#3B82F6'; // Blue
199
+ if (type.includes('dashboard'))
200
+ return '#10B981'; // Green
201
+ if (type.includes('document'))
202
+ return '#F59E0B'; // Orange
203
+ return '#6B7280'; // Gray
204
+ }
205
+ openFullView() {
206
+ if (this._artifact) {
207
+ this.actionPerformed.emit({ action: 'open', artifact: this._artifact, version: this._currentVersion || undefined });
208
+ }
209
+ }
210
+ static ɵfac = function ArtifactMessageCardComponent_Factory(t) { return new (t || ArtifactMessageCardComponent)(); };
211
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactMessageCardComponent, selectors: [["mj-artifact-message-card"]], inputs: { artifactId: "artifactId", versionNumber: "versionNumber", currentUser: "currentUser", artifact: "artifact", artifactVersion: "artifactVersion" }, outputs: { actionPerformed: "actionPerformed" }, decls: 4, vars: 5, consts: [[1, "artifact-message-card"], [1, "artifact-skeleton"], [1, "artifact-error"], [1, "artifact-info-bar"], [1, "skeleton-icon"], [1, "skeleton-text"], [1, "fa-solid", "fa-exclamation-circle"], [1, "artifact-info-bar", 3, "click"], [1, "artifact-icon"], [1, "fa-solid", 3, "ngClass"], [1, "artifact-info"], [1, "artifact-name"], [1, "artifact-meta"], [1, "artifact-type-badge"], [1, "artifact-version"], [1, "open-icon"], [1, "fa-solid", "fa-arrow-up-right-from-square"]], template: function ArtifactMessageCardComponent_Template(rf, ctx) { if (rf & 1) {
212
+ i0.ɵɵelementStart(0, "div", 0);
213
+ i0.ɵɵtemplate(1, ArtifactMessageCardComponent_Conditional_1_Template, 3, 0, "div", 1)(2, ArtifactMessageCardComponent_Conditional_2_Template, 4, 0, "div", 2)(3, ArtifactMessageCardComponent_Conditional_3_Template, 13, 6, "div", 3);
214
+ i0.ɵɵelementEnd();
215
+ } if (rf & 2) {
216
+ i0.ɵɵclassProp("loading", ctx.loading)("error", ctx.error);
217
+ i0.ɵɵadvance();
218
+ i0.ɵɵconditional(ctx.loading ? 1 : ctx.error ? 2 : ctx.artifact ? 3 : -1);
219
+ } }, dependencies: [i1.NgClass], styles: [".artifact-message-card[_ngcontent-%COMP%] {\n margin: 12px 0;\n }\n\n .artifact-skeleton[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n }\n\n .skeleton-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n background: #E5E7EB;\n border-radius: 6px;\n animation: _ngcontent-%COMP%_pulse 1.5s ease-in-out infinite;\n }\n\n .skeleton-text[_ngcontent-%COMP%] {\n flex: 1;\n height: 32px;\n background: #E5E7EB;\n border-radius: 4px;\n animation: _ngcontent-%COMP%_pulse 1.5s ease-in-out infinite;\n }\n\n @keyframes _ngcontent-%COMP%_pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n\n .artifact-error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n background: #FEE2E2;\n border: 1px solid #FECACA;\n border-radius: 6px;\n color: #DC2626;\n font-size: 14px;\n }\n\n .artifact-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n }\n\n .artifact-info-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-info-bar[_ngcontent-%COMP%]:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1);\n }\n\n .artifact-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #F3F4F6;\n border-radius: 6px;\n flex-shrink: 0;\n color: #6B7280;\n font-size: 16px;\n }\n\n .artifact-info[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n }\n\n .artifact-name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .artifact-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .artifact-type-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 8px;\n color: white;\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.5px;\n border-radius: 3px;\n text-transform: uppercase;\n }\n\n .artifact-version[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #6B7280;\n font-weight: 500;\n }\n\n .open-icon[_ngcontent-%COMP%] {\n flex-shrink: 0;\n color: #9CA3AF;\n font-size: 14px;\n transition: color 200ms ease;\n }\n\n .artifact-info-bar[_ngcontent-%COMP%]:hover .open-icon[_ngcontent-%COMP%] {\n color: #1e40af;\n }"] });
220
+ }
221
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArtifactMessageCardComponent, [{
222
+ type: Component,
223
+ args: [{ selector: 'mj-artifact-message-card', template: `
224
+ <div class="artifact-message-card" [class.loading]="loading" [class.error]="error">
225
+ @if (loading) {
226
+ <div class="artifact-skeleton">
227
+ <div class="skeleton-icon"></div>
228
+ <div class="skeleton-text"></div>
229
+ </div>
230
+ } @else if (error) {
231
+ <div class="artifact-error">
232
+ <i class="fa-solid fa-exclamation-circle"></i>
233
+ <span>Failed to load artifact</span>
234
+ </div>
235
+ } @else if (artifact) {
236
+ <div class="artifact-info-bar" (click)="openFullView()">
237
+ <div class="artifact-icon">
238
+ <i class="fa-solid" [ngClass]="getArtifactIcon()"></i>
239
+ </div>
240
+ <div class="artifact-info">
241
+ <span class="artifact-name">{{ displayName }}</span>
242
+ <div class="artifact-meta">
243
+ <span class="artifact-type-badge" [style.background]="getTypeBadgeColor()">
244
+ {{ artifact.Type }}
245
+ </span>
246
+ <span class="artifact-version">v{{ currentVersion?.VersionNumber || 1 }}</span>
247
+ </div>
248
+ </div>
249
+ <div class="open-icon">
250
+ <i class="fa-solid fa-arrow-up-right-from-square"></i>
251
+ </div>
252
+ </div>
253
+ }
254
+ </div>
255
+ `, styles: ["\n .artifact-message-card {\n margin: 12px 0;\n }\n\n .artifact-skeleton {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n }\n\n .skeleton-icon {\n width: 32px;\n height: 32px;\n background: #E5E7EB;\n border-radius: 6px;\n animation: pulse 1.5s ease-in-out infinite;\n }\n\n .skeleton-text {\n flex: 1;\n height: 32px;\n background: #E5E7EB;\n border-radius: 4px;\n animation: pulse 1.5s ease-in-out infinite;\n }\n\n @keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n\n .artifact-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n background: #FEE2E2;\n border: 1px solid #FECACA;\n border-radius: 6px;\n color: #DC2626;\n font-size: 14px;\n }\n\n .artifact-error i {\n font-size: 16px;\n }\n\n .artifact-info-bar {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-info-bar:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1);\n }\n\n .artifact-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #F3F4F6;\n border-radius: 6px;\n flex-shrink: 0;\n color: #6B7280;\n font-size: 16px;\n }\n\n .artifact-info {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n }\n\n .artifact-name {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .artifact-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .artifact-type-badge {\n display: inline-block;\n padding: 2px 8px;\n color: white;\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.5px;\n border-radius: 3px;\n text-transform: uppercase;\n }\n\n .artifact-version {\n font-size: 11px;\n color: #6B7280;\n font-weight: 500;\n }\n\n .open-icon {\n flex-shrink: 0;\n color: #9CA3AF;\n font-size: 14px;\n transition: color 200ms ease;\n }\n\n .artifact-info-bar:hover .open-icon {\n color: #1e40af;\n }\n "] }]
256
+ }], () => [], { artifactId: [{
257
+ type: Input
258
+ }], versionNumber: [{
259
+ type: Input
260
+ }], currentUser: [{
261
+ type: Input
262
+ }], artifact: [{
263
+ type: Input
264
+ }], artifactVersion: [{
265
+ type: Input
266
+ }], actionPerformed: [{
267
+ type: Output
268
+ }] }); })();
269
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactMessageCardComponent, { className: "ArtifactMessageCardComponent", filePath: "src/lib/components/artifact-message-card.component.ts", lineNumber: 180 }); })();
270
+ //# sourceMappingURL=artifact-message-card.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-message-card.component.js","sourceRoot":"","sources":["../../../src/lib/components/artifact-message-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;;;IAYvB,8BAA+B;IAE7B,AADA,yBAAiC,aACA;IACnC,iBAAM;;;IAEN,8BAA4B;IAC1B,uBAA8C;IAC9C,4BAAM;IAAA,uCAAuB;IAC/B,AAD+B,iBAAO,EAChC;;;;IAEN,8BAAwD;IAAzB,6LAAS,qBAAc,KAAC;IACrD,8BAA2B;IACzB,uBAAsD;IACxD,iBAAM;IAEJ,AADF,+BAA2B,eACG;IAAA,YAAiB;IAAA,iBAAO;IAElD,AADF,+BAA2B,eACkD;IACzE,YACF;IAAA,iBAAO;IACP,gCAA+B;IAAA,aAAyC;IAE5E,AADE,AAD0E,iBAAO,EAC3E,EACF;IACN,gCAAuB;IACrB,yBAAsD;IAE1D,AADE,iBAAM,EACF;;;IAdkB,eAA6B;IAA7B,kDAA6B;IAGrB,eAAiB;IAAjB,wCAAiB;IAET,eAAwC;IAAxC,wDAAwC;IACxE,cACF;IADE,qDACF;IAC+B,eAAyC;IAAzC,iHAAyC;;AA7BtF;;;GAGG;AA0KH,MAAM,OAAO,4BAA4B;IAC9B,UAAU,CA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AI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,SAAS;QACtD,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,OAAO;QACtD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,QAAQ;QAC1D,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,SAAS,CAAC,CAAC,SAAS;QAE1D,OAAO,SAAS,CAAC,CAAC,OAAO;IAC3B,CAAC;IAEM,YAAY;QACjB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe,IAAI,SAAS,EAAE,CAAC,CAAC;QACtH,CAAC;IACH,CAAC;sFApKU,4BAA4B;6DAA5B,4BAA4B;YAtKrC,8BAAmF;YAW/E,AALA,AALF,qFAAe,wEAKK,yEAKG;YAmBzB,iBAAM;;YA9BuD,AAA1B,sCAAyB,oBAAsB;YAChF,cA4BC;YA5BD,yEA4BC;;;iFAyIM,4BAA4B;cAzKxC,SAAS;2BACE,0BAA0B,YAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCT;oBAwIQ,UAAU;kBAAlB,KAAK;YACG,aAAa;kBAArB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,QAAQ;kBAAhB,KAAK;YACG,eAAe;kBAAvB,KAAK;YACI,eAAe;kBAAxB,MAAM;;kFANI,4BAA4B"}
@@ -0,0 +1,42 @@
1
+ import { OnInit, OnChanges, SimpleChanges, ViewContainerRef } from '@angular/core';
2
+ import { ArtifactVersionEntity } from '@memberjunction/core-entities';
3
+ import { BaseArtifactViewerPluginComponent } from './base-artifact-viewer.component';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Artifact type plugin viewer that loads the appropriate plugin based on the artifact's DriverClass.
7
+ * Uses MJGlobal.Instance.ClassFactory.CreateInstance() to dynamically load viewer plugins.
8
+ */
9
+ export declare class ArtifactTypePluginViewerComponent implements OnInit, OnChanges {
10
+ artifactVersion: ArtifactVersionEntity;
11
+ artifactTypeName: string;
12
+ contentType?: string;
13
+ height?: string;
14
+ readonly: boolean;
15
+ cssClass?: string;
16
+ viewerContainer: ViewContainerRef;
17
+ isLoading: boolean;
18
+ error: string | null;
19
+ private componentRef;
20
+ /**
21
+ * Get the loaded plugin instance (if available)
22
+ */
23
+ get pluginInstance(): BaseArtifactViewerPluginComponent | null;
24
+ ngOnInit(): Promise<void>;
25
+ ngOnChanges(changes: SimpleChanges): Promise<void>;
26
+ ngOnDestroy(): void;
27
+ /**
28
+ * Load the appropriate viewer plugin for the artifact
29
+ */
30
+ private loadViewer;
31
+ /**
32
+ * Get the artifact type entity for the current artifact
33
+ */
34
+ private getArtifactType;
35
+ /**
36
+ * Destroy the current viewer component
37
+ */
38
+ private destroyCurrentViewer;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactTypePluginViewerComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<ArtifactTypePluginViewerComponent, "mj-artifact-type-plugin-viewer", never, { "artifactVersion": { "alias": "artifactVersion"; "required": false; }; "artifactTypeName": { "alias": "artifactTypeName"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; }, {}, never, never, false, never>;
41
+ }
42
+ //# sourceMappingURL=artifact-type-plugin-viewer.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact-type-plugin-viewer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-type-plugin-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EACN,SAAS,EACT,aAAa,EAEb,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qBAAqB,EAAsB,MAAM,+BAA+B,CAAC;AAI1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;;AAErF;;;GAGG;AACH,qBAmDa,iCAAkC,YAAW,MAAM,EAAE,SAAS;IAChE,eAAe,EAAG,qBAAqB,CAAC;IACxC,gBAAgB,EAAG,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAQ;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAG3B,eAAe,EAAG,gBAAgB,CAAC;IAE5B,SAAS,UAAQ;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEnC,OAAO,CAAC,YAAY,CAAkC;IAEtD;;OAEG;IACH,IAAW,cAAc,IAAI,iCAAiC,GAAG,IAAI,CAEpE;IAEK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,WAAW,IAAI,IAAI;IAInB;;OAEG;YACW,UAAU;IAkFxB;;OAEG;YACW,eAAe;IAoB7B;;OAEG;IACH,OAAO,CAAC,oBAAoB;yCArJjB,iCAAiC;2CAAjC,iCAAiC;CA4J7C"}