@memberjunction/ng-artifacts 6.2.0-edge.0 → 6.2.0-edge.1

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 (125) hide show
  1. package/dist/lib/components/artifact-message-card.component.d.ts +60 -8
  2. package/dist/lib/components/artifact-message-card.component.d.ts.map +1 -1
  3. package/dist/lib/components/artifact-message-card.component.js +135 -39
  4. package/dist/lib/components/artifact-message-card.component.js.map +1 -1
  5. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts +58 -6
  6. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts.map +1 -1
  7. package/dist/lib/components/artifact-type-plugin-viewer.component.js +107 -29
  8. package/dist/lib/components/artifact-type-plugin-viewer.component.js.map +1 -1
  9. package/dist/lib/components/artifact-version-download.d.ts +5 -3
  10. package/dist/lib/components/artifact-version-download.d.ts.map +1 -1
  11. package/dist/lib/components/artifact-version-download.js +11 -7
  12. package/dist/lib/components/artifact-version-download.js.map +1 -1
  13. package/dist/lib/components/artifact-version-history.component.d.ts +74 -8
  14. package/dist/lib/components/artifact-version-history.component.d.ts.map +1 -1
  15. package/dist/lib/components/artifact-version-history.component.js +152 -34
  16. package/dist/lib/components/artifact-version-history.component.js.map +1 -1
  17. package/dist/lib/components/artifact-viewer-panel.component.d.ts +328 -35
  18. package/dist/lib/components/artifact-viewer-panel.component.d.ts.map +1 -1
  19. package/dist/lib/components/artifact-viewer-panel.component.js +701 -213
  20. package/dist/lib/components/artifact-viewer-panel.component.js.map +1 -1
  21. package/dist/lib/components/file-artifact-toolbar.component.d.ts +112 -10
  22. package/dist/lib/components/file-artifact-toolbar.component.d.ts.map +1 -1
  23. package/dist/lib/components/file-artifact-toolbar.component.js +197 -23
  24. package/dist/lib/components/file-artifact-toolbar.component.js.map +1 -1
  25. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts +9 -1
  26. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts.map +1 -1
  27. package/dist/lib/components/plugins/audio-artifact-viewer.component.js +20 -4
  28. package/dist/lib/components/plugins/audio-artifact-viewer.component.js.map +1 -1
  29. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts +23 -5
  30. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts.map +1 -1
  31. package/dist/lib/components/plugins/code-artifact-viewer.component.js +69 -31
  32. package/dist/lib/components/plugins/code-artifact-viewer.component.js.map +1 -1
  33. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts +136 -18
  34. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts.map +1 -1
  35. package/dist/lib/components/plugins/component-artifact-viewer.component.js +285 -97
  36. package/dist/lib/components/plugins/component-artifact-viewer.component.js.map +1 -1
  37. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.d.ts +2 -2
  38. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js +7 -7
  39. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js.map +1 -1
  40. package/dist/lib/components/plugins/component-permission-evaluation.d.ts +2 -0
  41. package/dist/lib/components/plugins/component-permission-evaluation.d.ts.map +1 -1
  42. package/dist/lib/components/plugins/component-permission-evaluation.js +6 -2
  43. package/dist/lib/components/plugins/component-permission-evaluation.js.map +1 -1
  44. package/dist/lib/components/plugins/data-artifact-viewer.component.d.ts +17 -6
  45. package/dist/lib/components/plugins/data-artifact-viewer.component.d.ts.map +1 -1
  46. package/dist/lib/components/plugins/data-artifact-viewer.component.js +32 -22
  47. package/dist/lib/components/plugins/data-artifact-viewer.component.js.map +1 -1
  48. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.d.ts +56 -4
  49. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.d.ts.map +1 -1
  50. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.js +142 -36
  51. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.js.map +1 -1
  52. package/dist/lib/components/plugins/docx-artifact-viewer.component.d.ts +14 -2
  53. package/dist/lib/components/plugins/docx-artifact-viewer.component.d.ts.map +1 -1
  54. package/dist/lib/components/plugins/docx-artifact-viewer.component.js +32 -8
  55. package/dist/lib/components/plugins/docx-artifact-viewer.component.js.map +1 -1
  56. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts +17 -3
  57. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts.map +1 -1
  58. package/dist/lib/components/plugins/html-artifact-viewer.component.js +36 -8
  59. package/dist/lib/components/plugins/html-artifact-viewer.component.js.map +1 -1
  60. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts +41 -5
  61. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts.map +1 -1
  62. package/dist/lib/components/plugins/image-artifact-viewer.component.js +102 -30
  63. package/dist/lib/components/plugins/image-artifact-viewer.component.js.map +1 -1
  64. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts +33 -5
  65. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts.map +1 -1
  66. package/dist/lib/components/plugins/json-artifact-viewer.component.js +89 -33
  67. package/dist/lib/components/plugins/json-artifact-viewer.component.js.map +1 -1
  68. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts +12 -2
  69. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts.map +1 -1
  70. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js +28 -8
  71. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js.map +1 -1
  72. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.d.ts +4 -0
  73. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.d.ts.map +1 -1
  74. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.js +14 -6
  75. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.js.map +1 -1
  76. package/dist/lib/components/plugins/pdf-artifact-viewer.component.d.ts +47 -5
  77. package/dist/lib/components/plugins/pdf-artifact-viewer.component.d.ts.map +1 -1
  78. package/dist/lib/components/plugins/pdf-artifact-viewer.component.js +129 -45
  79. package/dist/lib/components/plugins/pdf-artifact-viewer.component.js.map +1 -1
  80. package/dist/lib/components/plugins/save-query-dialog.component.d.ts +5 -1
  81. package/dist/lib/components/plugins/save-query-dialog.component.d.ts.map +1 -1
  82. package/dist/lib/components/plugins/save-query-dialog.component.js +12 -4
  83. package/dist/lib/components/plugins/save-query-dialog.component.js.map +1 -1
  84. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts +17 -3
  85. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts.map +1 -1
  86. package/dist/lib/components/plugins/svg-artifact-viewer.component.js +36 -8
  87. package/dist/lib/components/plugins/svg-artifact-viewer.component.js.map +1 -1
  88. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts +9 -1
  89. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts.map +1 -1
  90. package/dist/lib/components/plugins/video-artifact-viewer.component.js +20 -4
  91. package/dist/lib/components/plugins/video-artifact-viewer.component.js.map +1 -1
  92. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.d.ts +28 -4
  93. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.d.ts.map +1 -1
  94. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.js +64 -16
  95. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.js.map +1 -1
  96. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts +9 -1
  97. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts.map +1 -1
  98. package/dist/lib/components/previews/audio-artifact-preview.component.js +20 -4
  99. package/dist/lib/components/previews/audio-artifact-preview.component.js.map +1 -1
  100. package/dist/lib/components/previews/image-artifact-preview.component.d.ts +16 -2
  101. package/dist/lib/components/previews/image-artifact-preview.component.d.ts.map +1 -1
  102. package/dist/lib/components/previews/image-artifact-preview.component.js +35 -7
  103. package/dist/lib/components/previews/image-artifact-preview.component.js.map +1 -1
  104. package/dist/lib/components/previews/video-artifact-preview.component.d.ts +9 -1
  105. package/dist/lib/components/previews/video-artifact-preview.component.d.ts.map +1 -1
  106. package/dist/lib/components/previews/video-artifact-preview.component.js +20 -4
  107. package/dist/lib/components/previews/video-artifact-preview.component.js.map +1 -1
  108. package/dist/lib/interfaces/artifact-viewer-plugin.interface.js.map +1 -1
  109. package/dist/lib/services/artifact-file.service.d.ts +8 -0
  110. package/dist/lib/services/artifact-file.service.d.ts.map +1 -1
  111. package/dist/lib/services/artifact-file.service.js +22 -6
  112. package/dist/lib/services/artifact-file.service.js.map +1 -1
  113. package/dist/lib/services/artifact-icon.service.d.ts +2 -0
  114. package/dist/lib/services/artifact-icon.service.d.ts.map +1 -1
  115. package/dist/lib/services/artifact-icon.service.js +5 -1
  116. package/dist/lib/services/artifact-icon.service.js.map +1 -1
  117. package/dist/lib/services/artifact-preview-resolver.service.d.ts +2 -0
  118. package/dist/lib/services/artifact-preview-resolver.service.d.ts.map +1 -1
  119. package/dist/lib/services/artifact-preview-resolver.service.js +5 -1
  120. package/dist/lib/services/artifact-preview-resolver.service.js.map +1 -1
  121. package/dist/lib/snapshot-helpers.d.ts +10 -0
  122. package/dist/lib/snapshot-helpers.d.ts.map +1 -1
  123. package/dist/lib/snapshot-helpers.js +25 -5
  124. package/dist/lib/snapshot-helpers.js.map +1 -1
  125. package/package.json +21 -21
@@ -12,27 +12,67 @@ import * as i0 from "@angular/core";
12
12
  export declare class ArtifactMessageCardComponent extends BaseAngularComponent implements OnInit, OnDestroy {
13
13
  private artifactIconService;
14
14
  artifactId: string;
15
- versionNumber?: number;
16
- currentUser: UserInfo;
17
- artifact?: MJArtifactEntity;
15
+ VersionNumber?: number;
16
+ /** @deprecated Use {@link VersionNumber}. */
17
+ set versionNumber(value: number | undefined);
18
+ /** @deprecated Use {@link VersionNumber}. */
19
+ get versionNumber(): number | undefined;
20
+ CurrentUser: UserInfo;
21
+ /** @deprecated Use {@link CurrentUser}. */
22
+ set currentUser(value: UserInfo);
23
+ /** @deprecated Use {@link CurrentUser}. */
24
+ get currentUser(): UserInfo;
25
+ Artifact?: MJArtifactEntity;
26
+ /** @deprecated Use {@link Artifact}. */
27
+ set artifact(value: MJArtifactEntity | undefined);
28
+ /** @deprecated Use {@link Artifact}. */
29
+ get artifact(): MJArtifactEntity | undefined;
18
30
  artifactVersion?: MJArtifactVersionEntity;
31
+ ActionPerformed: EventEmitter<{
32
+ action: string;
33
+ artifact: MJArtifactEntity;
34
+ version?: MJArtifactVersionEntity;
35
+ }>;
36
+ /**
37
+ * @deprecated Use {@link ActionPerformed}.
38
+ *
39
+ * The same emitter under the old binding name, so a template still binding
40
+ * (actionPerformed) keeps working. Must stay AFTER ActionPerformed: class fields
41
+ * initialise in order, and the other way round this captures undefined.
42
+ */
19
43
  actionPerformed: EventEmitter<{
20
44
  action: string;
21
45
  artifact: MJArtifactEntity;
22
46
  version?: MJArtifactVersionEntity;
23
47
  }>;
24
48
  _artifact: MJArtifactEntity | null;
25
- _currentVersion: MJArtifactVersionEntity | null;
26
- loading: boolean;
49
+ CurrentVersion: MJArtifactVersionEntity | null;
50
+ /** @deprecated Use {@link CurrentVersion}. */
51
+ get _currentVersion(): MJArtifactVersionEntity | null;
52
+ /** @deprecated Use {@link CurrentVersion}. */
53
+ set _currentVersion(value: MJArtifactVersionEntity | null);
54
+ Loading: boolean;
55
+ /** @deprecated Use {@link Loading}. */
56
+ get loading(): boolean;
57
+ /** @deprecated Use {@link Loading}. */
58
+ set loading(value: boolean);
27
59
  error: boolean;
28
60
  /**
29
61
  * Resolved inline-preview component for this artifact's type/contentType, or null when no plugin
30
62
  * exposes a matching preview (the card then falls back to its existing info-bar box). Resolved
31
63
  * SYNCHRONOUSLY up front (before the box renders) to avoid a flash / ExpressionChanged error.
32
64
  */
33
- previewComponentType: Type<IArtifactPreviewComponent> | null;
65
+ PreviewComponentType: Type<IArtifactPreviewComponent> | null;
66
+ /** @deprecated Use {@link PreviewComponentType}. */
67
+ get previewComponentType(): Type<IArtifactPreviewComponent> | null;
68
+ /** @deprecated Use {@link PreviewComponentType}. */
69
+ set previewComponentType(value: Type<IArtifactPreviewComponent> | null);
34
70
  /** Inputs forwarded to the dynamically rendered preview component via *ngComponentOutlet. */
35
- previewInputs: Record<string, unknown>;
71
+ PreviewInputs: Record<string, unknown>;
72
+ /** @deprecated Use {@link PreviewInputs}. */
73
+ get previewInputs(): Record<string, unknown>;
74
+ /** @deprecated Use {@link PreviewInputs}. */
75
+ set previewInputs(value: Record<string, unknown>);
36
76
  private destroy$;
37
77
  private readonly previewResolver;
38
78
  constructor(artifactIconService: ArtifactIconService);
@@ -43,6 +83,8 @@ export declare class ArtifactMessageCardComponent extends BaseAngularComponent i
43
83
  * No match → previewComponentType stays null → existing info-bar box renders unchanged.
44
84
  */
45
85
  private resolvePreview;
86
+ get ArtifactEntity(): MJArtifactEntity | null;
87
+ /** @deprecated Use {@link ArtifactEntity}. */
46
88
  get artifactEntity(): MJArtifactEntity | null;
47
89
  get currentVersion(): MJArtifactVersionEntity | null;
48
90
  ngOnDestroy(): void;
@@ -55,16 +97,26 @@ export declare class ArtifactMessageCardComponent extends BaseAngularComponent i
55
97
  /**
56
98
  * Get the display description - prefer version-specific description if available, otherwise use artifact description
57
99
  */
100
+ get DisplayDescription(): string | null;
101
+ /** @deprecated Use {@link DisplayDescription}. */
58
102
  get displayDescription(): string | null;
103
+ get IsCodeArtifact(): boolean;
104
+ /** @deprecated Use {@link IsCodeArtifact}. */
59
105
  get isCodeArtifact(): boolean;
60
106
  /**
61
107
  * Get the icon for this artifact using the centralized icon service.
62
108
  * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon
63
109
  */
110
+ GetArtifactIcon(): string;
111
+ /** @deprecated Use {@link GetArtifactIcon}. */
64
112
  getArtifactIcon(): string;
113
+ GetTypeBadgeColor(): string;
114
+ /** @deprecated Use {@link GetTypeBadgeColor}. */
65
115
  getTypeBadgeColor(): string;
116
+ OpenFullView(): void;
117
+ /** @deprecated Use {@link OpenFullView}. */
66
118
  openFullView(): void;
67
119
  static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactMessageCardComponent, never>;
68
- 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>;
120
+ static ɵcmp: i0.ɵɵComponentDeclaration<ArtifactMessageCardComponent, "mj-artifact-message-card", never, { "artifactId": { "alias": "artifactId"; "required": false; }; "VersionNumber": { "alias": "VersionNumber"; "required": false; }; "versionNumber": { "alias": "versionNumber"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Artifact": { "alias": "Artifact"; "required": false; }; "artifact": { "alias": "artifact"; "required": false; }; "artifactVersion": { "alias": "artifactVersion"; "required": false; }; }, { "ActionPerformed": "ActionPerformed"; "actionPerformed": "actionPerformed"; }, never, never, false, never>;
69
121
  }
70
122
  //# sourceMappingURL=artifact-message-card.component.d.ts.map
@@ -1 +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,IAAI,EAAU,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAW,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;;A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4BAA4B;2CAA5B,4BAA4B;CAgMxC"}
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,IAAI,EAAU,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAW,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;;AAE3F;;;GAGG;AACH,qBA0Oa,4BAA6B,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAkGrF,OAAO,CAAC,mBAAmB;IAjG9B,UAAU,EAAG,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC,6CAA6C;IAC7C,IAAa,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAEnD;IACD,6CAA6C;IAC7C,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IACQ,WAAW,EAAG,QAAQ,CAAC;IAEhC,2CAA2C;IAC3C,IAAa,WAAW,CAAC,KAAK,EAAE,QAAQ,EAEvC;IACD,2CAA2C;IAC3C,IAAI,WAAW,IAAI,QAAQ,CAE1B;IACQ,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAErC,wCAAwC;IACxC,IAAa,QAAQ,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,EAExD;IACD,wCAAwC;IACxC,IAAI,QAAQ,IAAI,gBAAgB,GAAG,SAAS,CAE3C;IACQ,eAAe,CAAC,EAAE,uBAAuB,CAAC;IACzC,eAAe;gBAA6B,MAAM;kBAAY,gBAAgB;kB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;IAED,8CAA8C;IAC9C,IAAW,cAAc,IAAI,gBAAgB,GAAG,IAAI,CAEnD;IAED,IAAW,cAAc,IAAI,uBAAuB,GAAG,IAAI,CAE1D;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,kDAAkD;IAClD,IAAW,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAE7C;IAED,IAAW,cAAc,IAAI,OAAO,CAKnC;IAED,8CAA8C;IAC9C,IAAW,cAAc,IAAI,OAAO,CAEnC;IAED;;;OAGG;IACI,eAAe,IAAI,MAAM;IAKhC,+CAA+C;IACxC,eAAe,IAAI,MAAM;IAIzB,iBAAiB,IAAI,MAAM;IAalC,iDAAiD;IAC1C,iBAAiB,IAAI,MAAM;IAI3B,YAAY,IAAI,IAAI;IAM3B,4CAA4C;IACrC,YAAY,IAAI,IAAI;yCAnShB,4BAA4B;2CAA5B,4BAA4B;CAsSxC"}
@@ -101,23 +101,87 @@ function ArtifactMessageCardComponent_Conditional_3_Template(rf, ctx) { if (rf &
101
101
  export class ArtifactMessageCardComponent extends BaseAngularComponent {
102
102
  artifactIconService;
103
103
  artifactId;
104
- versionNumber;
105
- currentUser;
106
- artifact; // Optional - if provided, skips loading
104
+ VersionNumber;
105
+ /** @deprecated Use {@link VersionNumber}. */
106
+ set versionNumber(value) {
107
+ this.VersionNumber = value;
108
+ }
109
+ /** @deprecated Use {@link VersionNumber}. */
110
+ get versionNumber() {
111
+ return this.VersionNumber;
112
+ }
113
+ CurrentUser;
114
+ /** @deprecated Use {@link CurrentUser}. */
115
+ set currentUser(value) {
116
+ this.CurrentUser = value;
117
+ }
118
+ /** @deprecated Use {@link CurrentUser}. */
119
+ get currentUser() {
120
+ return this.CurrentUser;
121
+ }
122
+ Artifact;
123
+ /** @deprecated Use {@link Artifact}. */
124
+ set artifact(value) {
125
+ this.Artifact = value;
126
+ }
127
+ /** @deprecated Use {@link Artifact}. */
128
+ get artifact() {
129
+ return this.Artifact;
130
+ } // Optional - if provided, skips loading
107
131
  artifactVersion; // Optional - if provided, skips loading
108
- actionPerformed = new EventEmitter();
109
- _artifact = null;
110
- _currentVersion = null;
111
- loading = true;
132
+ ActionPerformed = new EventEmitter();
133
+ /**
134
+ * @deprecated Use {@link ActionPerformed}.
135
+ *
136
+ * The same emitter under the old binding name, so a template still binding
137
+ * (actionPerformed) keeps working. Must stay AFTER ActionPerformed: class fields
138
+ * initialise in order, and the other way round this captures undefined.
139
+ */
140
+ actionPerformed = this.ActionPerformed;
141
+ _artifact = null; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope
142
+ CurrentVersion = null;
143
+ /** @deprecated Use {@link CurrentVersion}. */
144
+ get _currentVersion() {
145
+ return this.CurrentVersion;
146
+ }
147
+ /** @deprecated Use {@link CurrentVersion}. */
148
+ set _currentVersion(value) {
149
+ this.CurrentVersion = value;
150
+ }
151
+ Loading = true;
152
+ /** @deprecated Use {@link Loading}. */
153
+ get loading() {
154
+ return this.Loading;
155
+ }
156
+ /** @deprecated Use {@link Loading}. */
157
+ set loading(value) {
158
+ this.Loading = value;
159
+ }
112
160
  error = false;
113
161
  /**
114
162
  * Resolved inline-preview component for this artifact's type/contentType, or null when no plugin
115
163
  * exposes a matching preview (the card then falls back to its existing info-bar box). Resolved
116
164
  * SYNCHRONOUSLY up front (before the box renders) to avoid a flash / ExpressionChanged error.
117
165
  */
118
- previewComponentType = null;
166
+ PreviewComponentType = null;
167
+ /** @deprecated Use {@link PreviewComponentType}. */
168
+ get previewComponentType() {
169
+ return this.PreviewComponentType;
170
+ }
171
+ /** @deprecated Use {@link PreviewComponentType}. */
172
+ set previewComponentType(value) {
173
+ this.PreviewComponentType = value;
174
+ }
119
175
  /** Inputs forwarded to the dynamically rendered preview component via *ngComponentOutlet. */
120
- previewInputs = {};
176
+ PreviewInputs = {};
177
+ /** @deprecated Use {@link PreviewInputs}. */
178
+ get previewInputs() {
179
+ return this.PreviewInputs;
180
+ }
181
+ /** @deprecated Use {@link PreviewInputs}. */
182
+ set previewInputs(value) {
183
+ this.PreviewInputs = value;
184
+ }
121
185
  destroy$ = new Subject();
122
186
  previewResolver = inject(ArtifactPreviewResolverService);
123
187
  constructor(artifactIconService) {
@@ -126,10 +190,10 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
126
190
  }
127
191
  async ngOnInit() {
128
192
  // If entities are provided, use them directly
129
- if (this.artifact && this.artifactVersion) {
130
- this._artifact = this.artifact;
131
- this._currentVersion = this.artifactVersion;
132
- this.loading = false;
193
+ if (this.Artifact && this.artifactVersion) {
194
+ this._artifact = this.Artifact;
195
+ this.CurrentVersion = this.artifactVersion;
196
+ this.Loading = false;
133
197
  }
134
198
  else {
135
199
  // Otherwise load from database
@@ -145,21 +209,25 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
145
209
  * No match → previewComponentType stays null → existing info-bar box renders unchanged.
146
210
  */
147
211
  resolvePreview() {
148
- if (!this._artifact || !this._currentVersion) {
149
- this.previewComponentType = null;
212
+ if (!this._artifact || !this.CurrentVersion) {
213
+ this.PreviewComponentType = null;
150
214
  return;
151
215
  }
152
- this.previewComponentType = this.previewResolver.resolvePreviewComponent(this._artifact.Type, this._currentVersion.MimeType);
153
- if (this.previewComponentType) {
154
- this.previewInputs = { artifactVersion: this._currentVersion };
216
+ this.PreviewComponentType = this.previewResolver.resolvePreviewComponent(this._artifact.Type, this.CurrentVersion.MimeType);
217
+ if (this.PreviewComponentType) {
218
+ this.PreviewInputs = { artifactVersion: this.CurrentVersion };
155
219
  }
156
220
  }
157
221
  // Getters to access the internal properties
158
- get artifactEntity() {
222
+ get ArtifactEntity() {
159
223
  return this._artifact;
160
224
  }
225
+ /** @deprecated Use {@link ArtifactEntity}. */
226
+ get artifactEntity() {
227
+ return this.ArtifactEntity;
228
+ }
161
229
  get currentVersion() {
162
- return this._currentVersion;
230
+ return this.CurrentVersion;
163
231
  }
164
232
  ngOnDestroy() {
165
233
  this.destroy$.next();
@@ -168,11 +236,11 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
168
236
  async loadArtifact() {
169
237
  if (!this.artifactId) {
170
238
  this.error = true;
171
- this.loading = false;
239
+ this.Loading = false;
172
240
  return;
173
241
  }
174
242
  try {
175
- this.loading = true;
243
+ this.Loading = true;
176
244
  this.error = false;
177
245
  // Load artifact directly
178
246
  const rv = RunView.FromMetadataProvider(this.ProviderToUse);
@@ -181,7 +249,7 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
181
249
  ExtraFilter: `ID='${this.artifactId}'`,
182
250
  MaxRows: 1,
183
251
  ResultType: 'entity_object'
184
- }, this.currentUser);
252
+ }, this.CurrentUser);
185
253
  if (result.Success && result.Results && result.Results.length > 0) {
186
254
  this._artifact = result.Results[0];
187
255
  // Load version content
@@ -196,7 +264,7 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
196
264
  this.error = true;
197
265
  }
198
266
  finally {
199
- this.loading = false;
267
+ this.Loading = false;
200
268
  }
201
269
  }
202
270
  async loadVersionContent() {
@@ -204,8 +272,8 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
204
272
  return;
205
273
  try {
206
274
  const rv = RunView.FromMetadataProvider(this.ProviderToUse);
207
- const filter = this.versionNumber
208
- ? `ArtifactID='${this._artifact.ID}' AND VersionNumber=${this.versionNumber}`
275
+ const filter = this.VersionNumber
276
+ ? `ArtifactID='${this._artifact.ID}' AND VersionNumber=${this.VersionNumber}`
209
277
  : `ArtifactID='${this._artifact.ID}'`;
210
278
  const result = await rv.RunView({
211
279
  EntityName: 'MJ: Artifact Versions',
@@ -213,9 +281,9 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
213
281
  OrderBy: 'VersionNumber DESC',
214
282
  MaxRows: 1,
215
283
  ResultType: 'entity_object'
216
- }, this.currentUser);
284
+ }, this.CurrentUser);
217
285
  if (result.Success && result.Results && result.Results.length > 0) {
218
- this._currentVersion = result.Results[0];
286
+ this.CurrentVersion = result.Results[0];
219
287
  }
220
288
  }
221
289
  catch (err) {
@@ -226,37 +294,49 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
226
294
  * Get the display name - prefer version-specific name if available, otherwise use artifact name
227
295
  */
228
296
  get displayName() {
229
- if (this._currentVersion?.Name) {
230
- return this._currentVersion.Name;
297
+ if (this.CurrentVersion?.Name) {
298
+ return this.CurrentVersion.Name;
231
299
  }
232
300
  return this._artifact?.Name || 'Untitled';
233
301
  }
234
302
  /**
235
303
  * Get the display description - prefer version-specific description if available, otherwise use artifact description
236
304
  */
237
- get displayDescription() {
238
- if (this._currentVersion?.Description) {
239
- return this._currentVersion.Description;
305
+ get DisplayDescription() {
306
+ if (this.CurrentVersion?.Description) {
307
+ return this.CurrentVersion.Description;
240
308
  }
241
309
  return this._artifact?.Description || null;
242
310
  }
243
- get isCodeArtifact() {
311
+ /** @deprecated Use {@link DisplayDescription}. */
312
+ get displayDescription() {
313
+ return this.DisplayDescription;
314
+ }
315
+ get IsCodeArtifact() {
244
316
  if (!this._artifact)
245
317
  return false;
246
318
  const name = this._artifact.Name?.toLowerCase() || '';
247
319
  const codeExtensions = ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.cpp', '.c', '.go', '.rs', '.sql', '.html', '.css', '.scss'];
248
320
  return codeExtensions.some(ext => name.endsWith(ext));
249
321
  }
322
+ /** @deprecated Use {@link IsCodeArtifact}. */
323
+ get isCodeArtifact() {
324
+ return this.IsCodeArtifact;
325
+ }
250
326
  /**
251
327
  * Get the icon for this artifact using the centralized icon service.
252
328
  * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon
253
329
  */
254
- getArtifactIcon() {
330
+ GetArtifactIcon() {
255
331
  if (!this._artifact)
256
332
  return 'fa-file';
257
333
  return this.artifactIconService.getArtifactIcon(this._artifact);
258
334
  }
259
- getTypeBadgeColor() {
335
+ /** @deprecated Use {@link GetArtifactIcon}. */
336
+ getArtifactIcon() {
337
+ return this.GetArtifactIcon();
338
+ }
339
+ GetTypeBadgeColor() {
260
340
  if (!this._artifact)
261
341
  return '#6B7280';
262
342
  const type = this._artifact.Type?.toLowerCase() || '';
@@ -270,13 +350,21 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
270
350
  return '#F59E0B'; // Orange
271
351
  return '#6B7280'; // Gray
272
352
  }
273
- openFullView() {
353
+ /** @deprecated Use {@link GetTypeBadgeColor}. */
354
+ getTypeBadgeColor() {
355
+ return this.GetTypeBadgeColor();
356
+ }
357
+ OpenFullView() {
274
358
  if (this._artifact) {
275
- this.actionPerformed.emit({ action: 'open', artifact: this._artifact, version: this._currentVersion || undefined });
359
+ this.ActionPerformed.emit({ action: 'open', artifact: this._artifact, version: this.CurrentVersion || undefined });
276
360
  }
277
361
  }
362
+ /** @deprecated Use {@link OpenFullView}. */
363
+ openFullView() {
364
+ return this.OpenFullView();
365
+ }
278
366
  static ɵfac = function ArtifactMessageCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ArtifactMessageCardComponent)(i0.ɵɵdirectiveInject(i1.ArtifactIconService)); };
279
- 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" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 5, consts: [[1, "artifact-message-card"], [1, "artifact-skeleton"], [1, "artifact-error"], [1, "skeleton-icon"], [1, "skeleton-text"], [1, "fa-solid", "fa-exclamation-circle"], [1, "artifact-preview-wrapper", 3, "title"], [1, "artifact-info-bar"], [1, "artifact-preview-wrapper", 3, "click", "title"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "artifact-preview-caption"], [1, "fa-solid", 3, "ngClass"], [1, "artifact-name"], [1, "artifact-type-badge"], [1, "artifact-version"], [1, "open-icon"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "artifact-info-bar", 3, "click"], [1, "artifact-icon"], [1, "artifact-info"], [1, "artifact-meta"]], template: function ArtifactMessageCardComponent_Template(rf, ctx) { if (rf & 1) {
367
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactMessageCardComponent, selectors: [["mj-artifact-message-card"]], inputs: { artifactId: "artifactId", VersionNumber: "VersionNumber", versionNumber: "versionNumber", CurrentUser: "CurrentUser", currentUser: "currentUser", Artifact: "Artifact", artifact: "artifact", artifactVersion: "artifactVersion" }, outputs: { ActionPerformed: "ActionPerformed", actionPerformed: "actionPerformed" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 5, consts: [[1, "artifact-message-card"], [1, "artifact-skeleton"], [1, "artifact-error"], [1, "skeleton-icon"], [1, "skeleton-text"], [1, "fa-solid", "fa-exclamation-circle"], [1, "artifact-preview-wrapper", 3, "title"], [1, "artifact-info-bar"], [1, "artifact-preview-wrapper", 3, "click", "title"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "artifact-preview-caption"], [1, "fa-solid", 3, "ngClass"], [1, "artifact-name"], [1, "artifact-type-badge"], [1, "artifact-version"], [1, "open-icon"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "artifact-info-bar", 3, "click"], [1, "artifact-icon"], [1, "artifact-info"], [1, "artifact-meta"]], template: function ArtifactMessageCardComponent_Template(rf, ctx) { if (rf & 1) {
280
368
  i0.ɵɵelementStart(0, "div", 0);
281
369
  i0.ɵɵconditionalCreate(1, ArtifactMessageCardComponent_Conditional_1_Template, 3, 0, "div", 1)(2, ArtifactMessageCardComponent_Conditional_2_Template, 4, 0, "div", 2)(3, ArtifactMessageCardComponent_Conditional_3_Template, 2, 1);
282
370
  i0.ɵɵelementEnd();
@@ -342,14 +430,22 @@ export class ArtifactMessageCardComponent extends BaseAngularComponent {
342
430
  `, 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: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n }\n\n .skeleton-icon {\n width: 32px;\n height: 32px;\n background: var(--mj-border-default);\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: var(--mj-border-default);\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: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-bg-surface));\n border-radius: 6px;\n color: var(--mj-status-error);\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: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-info-bar:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-bg-surface-sunken);\n border-radius: 6px;\n flex-shrink: 0;\n color: var(--mj-text-muted);\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: var(--mj-text-primary);\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: var(--mj-text-inverse);\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: var(--mj-text-muted);\n font-weight: 500;\n }\n\n .open-icon {\n flex-shrink: 0;\n color: var(--mj-text-disabled);\n font-size: 14px;\n transition: color 200ms ease;\n }\n\n .artifact-info-bar:hover .open-icon {\n color: var(--mj-brand-primary);\n }\n\n .artifact-preview-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-preview-wrapper:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-preview-caption {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n color: var(--mj-text-muted);\n font-size: 12px;\n }\n\n .artifact-preview-caption .artifact-name {\n flex: 1;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .artifact-preview-caption .open-icon {\n color: var(--mj-text-disabled);\n transition: color 200ms ease;\n }\n\n .artifact-preview-wrapper:hover .artifact-preview-caption .open-icon {\n color: var(--mj-brand-primary);\n }\n "] }]
343
431
  }], () => [{ type: i1.ArtifactIconService }], { artifactId: [{
344
432
  type: Input
433
+ }], VersionNumber: [{
434
+ type: Input
345
435
  }], versionNumber: [{
346
436
  type: Input
437
+ }], CurrentUser: [{
438
+ type: Input
347
439
  }], currentUser: [{
348
440
  type: Input
441
+ }], Artifact: [{
442
+ type: Input
349
443
  }], artifact: [{
350
444
  type: Input
351
445
  }], artifactVersion: [{
352
446
  type: Input
447
+ }], ActionPerformed: [{
448
+ type: Output
353
449
  }], actionPerformed: [{
354
450
  type: Output
355
451
  }] }); })();
@@ -1 +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,EAA2B,MAAM,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;;;;;IAavF,8BAA+B;IAE7B,AADA,yBAAiC,aACA;IACnC,iBAAM;;;IAEN,8BAA4B;IAC1B,uBAA8C;IAC9C,4BAAM;IAAA,uCAAuB;IAC/B,AAD+B,iBAAO,EAChC;;;IAMF,wBAEgB;;;;IAHlB,8BAAqF;IAA/C,4MAAS,qBAAc,KAAC;IAC5D,2HAEC;IACD,+BAAsC;IACpC,wBAAsD;IACtD,gCAA4B;IAAA,YAAiB;IAAA,iBAAO;IACpD,gCAA2E;IACzE,YACF;IAAA,iBAAO;IACP,gCAA+B;IAAA,YAAwC;IAAA,iBAAO;IAC9E,iCAAwB;IAAA,yBAAsD;IAElF,AADE,AADgF,iBAAO,EACjF,EACF;;;IAbyD,0CAAqB;IAE/E,cAAyC;IAAA,AAAzC,+DAAyC,iDAAqB;IAG3C,eAA6B;IAA7B,kDAA6B;IACrB,eAAiB;IAAjB,wCAAiB;IACX,cAAwC;IAAxC,wDAAwC;IACxE,cACF;IADE,qDACF;IAC+B,eAAwC;IAAxC,oEAAwC;;;;IAK3E,+BAAwD;IAAzB,4MAAS,qBAAc,KAAC;IACrD,+BAA2B;IACzB,wBAAsD;IACxD,iBAAM;IAEJ,AADF,+BAA2B,eACG;IAAA,YAAiB;IAAA,iBAAO;IAElD,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EAAE,CAAC,CAAC;QACtH,CAAC;IACH,CAAC;sHA/LU,4BAA4B;6DAA5B,4BAA4B;YAtOrC,8BAAmF;YAW/E,AALA,AALF,8FAAe,wEAKK,8DAKG;YAsCzB,iBAAM;;YAjDuD,AAA1B,sCAAyB,oBAAsB;YAChF,cA+CC;YA/CD,yEA+CC;;;iFAsLM,4BAA4B;cA1OxC,SAAS;6BACI,KAAK,YACP,0BAA0B,YAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT;;kBAqLA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kFANI,4BAA4B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, Type, inject } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { ArtifactIconService } from '../services/artifact-icon.service';\nimport { ArtifactPreviewResolverService } from '../services/artifact-preview-resolver.service';\nimport { IArtifactPreviewComponent } from '../interfaces/artifact-viewer-plugin.interface';\n\n/**\n * Artifact message card component - displays a simple info bar for artifacts in conversation messages.\n * Shows artifact icon, name, type badge, and version. Click to open full artifact viewer.\n */\n@Component({\n standalone: false,\n selector: 'mj-artifact-message-card',\n template: `\n <div class=\"artifact-message-card\" [class.loading]=\"loading\" [class.error]=\"error\">\n @if (loading) {\n <div class=\"artifact-skeleton\">\n <div class=\"skeleton-icon\"></div>\n <div class=\"skeleton-text\"></div>\n </div>\n } @else if (error) {\n <div class=\"artifact-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <span>Failed to load artifact</span>\n </div>\n } @else if (artifact) {\n @if (previewComponentType && currentVersion) {\n <!-- Inline preview: a clickable wrapper still opens the full right-side viewer.\n Media controls inside the preview (video/audio) stop their own click propagation. -->\n <div class=\"artifact-preview-wrapper\" (click)=\"openFullView()\" [title]=\"displayName\">\n <ng-container\n *ngComponentOutlet=\"previewComponentType; inputs: previewInputs\"\n ></ng-container>\n <div class=\"artifact-preview-caption\">\n <i class=\"fa-solid\" [ngClass]=\"getArtifactIcon()\"></i>\n <span class=\"artifact-name\">{{ displayName }}</span>\n <span class=\"artifact-type-badge\" [style.background]=\"getTypeBadgeColor()\">\n {{ artifact.Type }}\n </span>\n <span class=\"artifact-version\">v{{ currentVersion.VersionNumber || 1 }}</span>\n <span class=\"open-icon\"><i class=\"fa-solid fa-arrow-up-right-from-square\"></i></span>\n </div>\n </div>\n } @else {\n <div class=\"artifact-info-bar\" (click)=\"openFullView()\">\n <div class=\"artifact-icon\">\n <i class=\"fa-solid\" [ngClass]=\"getArtifactIcon()\"></i>\n </div>\n <div class=\"artifact-info\">\n <span class=\"artifact-name\">{{ displayName }}</span>\n <div class=\"artifact-meta\">\n <span class=\"artifact-type-badge\" [style.background]=\"getTypeBadgeColor()\">\n {{ artifact.Type }}\n </span>\n <span class=\"artifact-version\">v{{ currentVersion?.VersionNumber || 1 }}</span>\n </div>\n </div>\n <div class=\"open-icon\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n </div>\n </div>\n }\n }\n </div>\n `,\n 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: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n }\n\n .skeleton-icon {\n width: 32px;\n height: 32px;\n background: var(--mj-border-default);\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: var(--mj-border-default);\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: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-bg-surface));\n border-radius: 6px;\n color: var(--mj-status-error);\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: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-info-bar:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-bg-surface-sunken);\n border-radius: 6px;\n flex-shrink: 0;\n color: var(--mj-text-muted);\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: var(--mj-text-primary);\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: var(--mj-text-inverse);\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: var(--mj-text-muted);\n font-weight: 500;\n }\n\n .open-icon {\n flex-shrink: 0;\n color: var(--mj-text-disabled);\n font-size: 14px;\n transition: color 200ms ease;\n }\n\n .artifact-info-bar:hover .open-icon {\n color: var(--mj-brand-primary);\n }\n\n .artifact-preview-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-preview-wrapper:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-preview-caption {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n color: var(--mj-text-muted);\n font-size: 12px;\n }\n\n .artifact-preview-caption .artifact-name {\n flex: 1;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .artifact-preview-caption .open-icon {\n color: var(--mj-text-disabled);\n transition: color 200ms ease;\n }\n\n .artifact-preview-wrapper:hover .artifact-preview-caption .open-icon {\n color: var(--mj-brand-primary);\n }\n `]\n})\nexport class ArtifactMessageCardComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() artifactId!: string;\n @Input() versionNumber?: number;\n @Input() currentUser!: UserInfo;\n @Input() artifact?: MJArtifactEntity; // Optional - if provided, skips loading\n @Input() artifactVersion?: MJArtifactVersionEntity; // Optional - if provided, skips loading\n @Output() actionPerformed = new EventEmitter<{action: string; artifact: MJArtifactEntity; version?: MJArtifactVersionEntity}>();\n\n public _artifact: MJArtifactEntity | null = null;\n public _currentVersion: MJArtifactVersionEntity | null = null;\n public loading = true;\n public error = false;\n\n /**\n * Resolved inline-preview component for this artifact's type/contentType, or null when no plugin\n * exposes a matching preview (the card then falls back to its existing info-bar box). Resolved\n * SYNCHRONOUSLY up front (before the box renders) to avoid a flash / ExpressionChanged error.\n */\n public previewComponentType: Type<IArtifactPreviewComponent> | null = null;\n\n /** Inputs forwarded to the dynamically rendered preview component via *ngComponentOutlet. */\n public previewInputs: Record<string, unknown> = {};\n\n private destroy$ = new Subject<void>();\n private readonly previewResolver = inject(ArtifactPreviewResolverService);\n\n constructor(private artifactIconService: ArtifactIconService) {\n super();}\n\n async ngOnInit(): Promise<void> {\n // If entities are provided, use them directly\n if (this.artifact && this.artifactVersion) {\n this._artifact = this.artifact;\n this._currentVersion = this.artifactVersion;\n this.loading = false;\n } else {\n // Otherwise load from database\n await this.loadArtifact();\n }\n // Resolve the inline preview once artifact + version are known. Synchronous so the correct\n // branch (preview vs. box) is decided before the template renders this state.\n this.resolvePreview();\n }\n\n /**\n * Pick the inline-preview component for this artifact, INDEPENDENTLY of the full viewer.\n * Type name comes from `artifact.Type`; content type from `artifactVersion.MimeType`.\n * No match → previewComponentType stays null → existing info-bar box renders unchanged.\n */\n private resolvePreview(): void {\n if (!this._artifact || !this._currentVersion) {\n this.previewComponentType = null;\n return;\n }\n this.previewComponentType = this.previewResolver.resolvePreviewComponent(\n this._artifact.Type,\n this._currentVersion.MimeType,\n );\n if (this.previewComponentType) {\n this.previewInputs = { artifactVersion: this._currentVersion };\n }\n }\n\n // Getters to access the internal properties\n public get artifactEntity(): MJArtifactEntity | null {\n return this._artifact;\n }\n\n public get currentVersion(): MJArtifactVersionEntity | null {\n return this._currentVersion;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private async loadArtifact(): Promise<void> {\n if (!this.artifactId) {\n this.error = true;\n this.loading = false;\n return;\n }\n\n try {\n this.loading = true;\n this.error = false;\n\n // Load artifact directly\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJArtifactEntity>({\n EntityName: 'MJ: Conversation Artifacts',\n ExtraFilter: `ID='${this.artifactId}'`,\n MaxRows: 1,\n ResultType: 'entity_object'\n }, this.currentUser);\n\n if (result.Success && result.Results && result.Results.length > 0) {\n this._artifact = result.Results[0];\n // Load version content\n await this.loadVersionContent();\n } else {\n this.error = true;\n }\n\n } catch (err) {\n console.error('Error loading artifact:', err);\n this.error = true;\n } finally {\n this.loading = false;\n }\n }\n\n private async loadVersionContent(): Promise<void> {\n if (!this._artifact) return;\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const filter = this.versionNumber\n ? `ArtifactID='${this._artifact.ID}' AND VersionNumber=${this.versionNumber}`\n : `ArtifactID='${this._artifact.ID}'`;\n\n const result = await rv.RunView<MJArtifactVersionEntity>({\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: filter,\n OrderBy: 'VersionNumber DESC',\n MaxRows: 1,\n ResultType: 'entity_object'\n }, this.currentUser);\n\n if (result.Success && result.Results && result.Results.length > 0) {\n this._currentVersion = result.Results[0];\n }\n } catch (err) {\n console.error('Error loading version content:', err);\n }\n }\n\n /**\n * Get the display name - prefer version-specific name if available, otherwise use artifact name\n */\n public get displayName(): string {\n if (this._currentVersion?.Name) {\n return this._currentVersion.Name;\n }\n return this._artifact?.Name || 'Untitled';\n }\n\n /**\n * Get the display description - prefer version-specific description if available, otherwise use artifact description\n */\n public get displayDescription(): string | null {\n if (this._currentVersion?.Description) {\n return this._currentVersion.Description;\n }\n return this._artifact?.Description || null;\n }\n\n public get isCodeArtifact(): boolean {\n if (!this._artifact) return false;\n const name = this._artifact.Name?.toLowerCase() || '';\n const codeExtensions = ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.cpp', '.c', '.go', '.rs', '.sql', '.html', '.css', '.scss'];\n return codeExtensions.some(ext => name.endsWith(ext));\n }\n\n /**\n * Get the icon for this artifact using the centralized icon service.\n * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon\n */\n public getArtifactIcon(): string {\n if (!this._artifact) return 'fa-file';\n return this.artifactIconService.getArtifactIcon(this._artifact);\n }\n\n public getTypeBadgeColor(): string {\n if (!this._artifact) return '#6B7280';\n\n const type = this._artifact.Type?.toLowerCase() || '';\n\n if (type.includes('code')) return '#8B5CF6'; // Purple\n if (type.includes('report')) return '#3B82F6'; // Blue\n if (type.includes('dashboard')) return '#10B981'; // Green\n if (type.includes('document')) return '#F59E0B'; // Orange\n\n return '#6B7280'; // Gray\n }\n\n public openFullView(): void {\n if (this._artifact) {\n this.actionPerformed.emit({ action: 'open', artifact: this._artifact, version: this._currentVersion || undefined });\n }\n }\n}\n"]}
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,EAA2B,MAAM,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;;;;;IAavF,8BAA+B;IAE7B,AADA,yBAAiC,aACA;IACnC,iBAAM;;;IAEN,8BAA4B;IAC1B,uBAA8C;IAC9C,4BAAM;IAAA,uCAAuB;IAC/B,AAD+B,iBAAO,EAChC;;;IAMF,wBAEgB;;;;IAHlB,8BAAqF;IAA/C,4MAAS,qBAAc,KAAC;IAC5D,2HAEC;IACD,+BAAsC;IACpC,wBAAsD;IACtD,gCAA4B;IAAA,YAAiB;IAAA,iBAAO;IACpD,gCAA2E;IACzE,YACF;IAAA,iBAAO;IACP,gCAA+B;IAAA,YAAwC;IAAA,iBAAO;IAC9E,iCAAwB;IAAA,yBAAsD;IAElF,AADE,AADgF,iBAAO,EACjF,EACF;;;IAbyD,0CAAqB;IAE/E,cAAyC;IAAA,AAAzC,+DAAyC,iDAAqB;IAG3C,eAA6B;IAA7B,kDAA6B;IACrB,eAAiB;IAAjB,wCAAiB;IACX,cAAwC;IAAxC,wDAAwC;IACxE,cACF;IADE,qDACF;IAC+B,eAAwC;IAAxC,oEAAwC;;;;IAK3E,+BAAwD;IAAzB,4MAAS,qBAAc,KAAC;IACrD,+BAA2B;IACzB,wBAAsD;IACxD,iBAAM;IAEJ,AADF,+BAA2B,eACG;IAAA,YAAiB;IAAA,iBAAO;IAElD,AADF,+BAA2B,eACkD;IACzE,YACF;IAAA,iBAAO;IACP,gCAA+B;IAAA,aAAyC;IA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AAC;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;IAED,iDAAiD;IAC1C,iBAAiB;QACtB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,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,cAAc,IAAI,SAAS,EAAE,CAAC,CAAC;QACrH,CAAC;IACH,CAAC;IAED,4CAA4C;IACrC,YAAY;QACjB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;sHArSU,4BAA4B;6DAA5B,4BAA4B;YAtOrC,8BAAmF;YAW/E,AALA,AALF,8FAAe,wEAKK,8DAKG;YAsCzB,iBAAM;;YAjDuD,AAA1B,sCAAyB,oBAAsB;YAChF,cA+CC;YA/CD,yEA+CC;;;iFAsLM,4BAA4B;cA1OxC,SAAS;6BACI,KAAK,YACP,0BAA0B,YAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT;;kBAqLA,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBACL,MAAM;;kBASN,MAAM;;kFA1CI,4BAA4B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, Type, inject } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { UserInfo, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { ArtifactIconService } from '../services/artifact-icon.service';\nimport { ArtifactPreviewResolverService } from '../services/artifact-preview-resolver.service';\nimport { IArtifactPreviewComponent } from '../interfaces/artifact-viewer-plugin.interface';\n\n/**\n * Artifact message card component - displays a simple info bar for artifacts in conversation messages.\n * Shows artifact icon, name, type badge, and version. Click to open full artifact viewer.\n */\n@Component({\n standalone: false,\n selector: 'mj-artifact-message-card',\n template: `\n <div class=\"artifact-message-card\" [class.loading]=\"loading\" [class.error]=\"error\">\n @if (loading) {\n <div class=\"artifact-skeleton\">\n <div class=\"skeleton-icon\"></div>\n <div class=\"skeleton-text\"></div>\n </div>\n } @else if (error) {\n <div class=\"artifact-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n <span>Failed to load artifact</span>\n </div>\n } @else if (artifact) {\n @if (previewComponentType && currentVersion) {\n <!-- Inline preview: a clickable wrapper still opens the full right-side viewer.\n Media controls inside the preview (video/audio) stop their own click propagation. -->\n <div class=\"artifact-preview-wrapper\" (click)=\"openFullView()\" [title]=\"displayName\">\n <ng-container\n *ngComponentOutlet=\"previewComponentType; inputs: previewInputs\"\n ></ng-container>\n <div class=\"artifact-preview-caption\">\n <i class=\"fa-solid\" [ngClass]=\"getArtifactIcon()\"></i>\n <span class=\"artifact-name\">{{ displayName }}</span>\n <span class=\"artifact-type-badge\" [style.background]=\"getTypeBadgeColor()\">\n {{ artifact.Type }}\n </span>\n <span class=\"artifact-version\">v{{ currentVersion.VersionNumber || 1 }}</span>\n <span class=\"open-icon\"><i class=\"fa-solid fa-arrow-up-right-from-square\"></i></span>\n </div>\n </div>\n } @else {\n <div class=\"artifact-info-bar\" (click)=\"openFullView()\">\n <div class=\"artifact-icon\">\n <i class=\"fa-solid\" [ngClass]=\"getArtifactIcon()\"></i>\n </div>\n <div class=\"artifact-info\">\n <span class=\"artifact-name\">{{ displayName }}</span>\n <div class=\"artifact-meta\">\n <span class=\"artifact-type-badge\" [style.background]=\"getTypeBadgeColor()\">\n {{ artifact.Type }}\n </span>\n <span class=\"artifact-version\">v{{ currentVersion?.VersionNumber || 1 }}</span>\n </div>\n </div>\n <div class=\"open-icon\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n </div>\n </div>\n }\n }\n </div>\n `,\n 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: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n }\n\n .skeleton-icon {\n width: 32px;\n height: 32px;\n background: var(--mj-border-default);\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: var(--mj-border-default);\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: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-bg-surface));\n border-radius: 6px;\n color: var(--mj-status-error);\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: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-info-bar:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--mj-bg-surface-sunken);\n border-radius: 6px;\n flex-shrink: 0;\n color: var(--mj-text-muted);\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: var(--mj-text-primary);\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: var(--mj-text-inverse);\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: var(--mj-text-muted);\n font-weight: 500;\n }\n\n .open-icon {\n flex-shrink: 0;\n color: var(--mj-text-disabled);\n font-size: 14px;\n transition: color 200ms ease;\n }\n\n .artifact-info-bar:hover .open-icon {\n color: var(--mj-brand-primary);\n }\n\n .artifact-preview-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n cursor: pointer;\n transition: all 200ms ease;\n }\n\n .artifact-preview-wrapper:hover {\n border-color: var(--mj-brand-primary);\n box-shadow: var(--mj-shadow-sm);\n }\n\n .artifact-preview-caption {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n color: var(--mj-text-muted);\n font-size: 12px;\n }\n\n .artifact-preview-caption .artifact-name {\n flex: 1;\n font-size: 13px;\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .artifact-preview-caption .open-icon {\n color: var(--mj-text-disabled);\n transition: color 200ms ease;\n }\n\n .artifact-preview-wrapper:hover .artifact-preview-caption .open-icon {\n color: var(--mj-brand-primary);\n }\n `]\n})\nexport class ArtifactMessageCardComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() artifactId!: string;\n @Input() VersionNumber?: number;\n\n /** @deprecated Use {@link VersionNumber}. */\n @Input() set versionNumber(value: number | undefined) {\n this.VersionNumber = value;\n }\n /** @deprecated Use {@link VersionNumber}. */\n get versionNumber(): number | undefined {\n return this.VersionNumber;\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 @Input() Artifact?: MJArtifactEntity;\n\n /** @deprecated Use {@link Artifact}. */\n @Input() set artifact(value: MJArtifactEntity | undefined) {\n this.Artifact = value;\n }\n /** @deprecated Use {@link Artifact}. */\n get artifact(): MJArtifactEntity | undefined {\n return this.Artifact;\n } // Optional - if provided, skips loading\n @Input() artifactVersion?: MJArtifactVersionEntity; // Optional - if provided, skips loading\n @Output() ActionPerformed = new EventEmitter<{action: string; artifact: MJArtifactEntity; version?: MJArtifactVersionEntity}>();\n\n /**\n * @deprecated Use {@link ActionPerformed}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (actionPerformed) keeps working. Must stay AFTER ActionPerformed: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() actionPerformed = this.ActionPerformed;\n\n public _artifact: MJArtifactEntity | null = null; // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope\n public CurrentVersion: MJArtifactVersionEntity | null = null;\n\n /** @deprecated Use {@link CurrentVersion}. */\n public get _currentVersion(): MJArtifactVersionEntity | null {\n return this.CurrentVersion;\n }\n /** @deprecated Use {@link CurrentVersion}. */\n public set _currentVersion(value: MJArtifactVersionEntity | null) {\n this.CurrentVersion = value;\n }\n public Loading = true;\n\n /** @deprecated Use {@link Loading}. */\n public get loading() {\n return this.Loading;\n }\n /** @deprecated Use {@link Loading}. */\n public set loading(value) {\n this.Loading = value;\n }\n public error = false;\n\n /**\n * Resolved inline-preview component for this artifact's type/contentType, or null when no plugin\n * exposes a matching preview (the card then falls back to its existing info-bar box). Resolved\n * SYNCHRONOUSLY up front (before the box renders) to avoid a flash / ExpressionChanged error.\n */\n public PreviewComponentType: Type<IArtifactPreviewComponent> | null = null;\n\n /** @deprecated Use {@link PreviewComponentType}. */\n public get previewComponentType(): Type<IArtifactPreviewComponent> | null {\n return this.PreviewComponentType;\n }\n /** @deprecated Use {@link PreviewComponentType}. */\n public set previewComponentType(value: Type<IArtifactPreviewComponent> | null) {\n this.PreviewComponentType = value;\n }\n\n /** Inputs forwarded to the dynamically rendered preview component via *ngComponentOutlet. */\n public PreviewInputs: Record<string, unknown> = {};\n\n /** @deprecated Use {@link PreviewInputs}. */\n public get previewInputs(): Record<string, unknown> {\n return this.PreviewInputs;\n }\n /** @deprecated Use {@link PreviewInputs}. */\n public set previewInputs(value: Record<string, unknown>) {\n this.PreviewInputs = value;\n }\n\n private destroy$ = new Subject<void>();\n private readonly previewResolver = inject(ArtifactPreviewResolverService);\n\n constructor(private artifactIconService: ArtifactIconService) {\n super();}\n\n async ngOnInit(): Promise<void> {\n // If entities are provided, use them directly\n if (this.Artifact && this.artifactVersion) {\n this._artifact = this.Artifact;\n this.CurrentVersion = this.artifactVersion;\n this.Loading = false;\n } else {\n // Otherwise load from database\n await this.loadArtifact();\n }\n // Resolve the inline preview once artifact + version are known. Synchronous so the correct\n // branch (preview vs. box) is decided before the template renders this state.\n this.resolvePreview();\n }\n\n /**\n * Pick the inline-preview component for this artifact, INDEPENDENTLY of the full viewer.\n * Type name comes from `artifact.Type`; content type from `artifactVersion.MimeType`.\n * No match → previewComponentType stays null → existing info-bar box renders unchanged.\n */\n private resolvePreview(): void {\n if (!this._artifact || !this.CurrentVersion) {\n this.PreviewComponentType = null;\n return;\n }\n this.PreviewComponentType = this.previewResolver.resolvePreviewComponent(\n this._artifact.Type,\n this.CurrentVersion.MimeType,\n );\n if (this.PreviewComponentType) {\n this.PreviewInputs = { artifactVersion: this.CurrentVersion };\n }\n }\n\n // Getters to access the internal properties\n public get ArtifactEntity(): MJArtifactEntity | null {\n return this._artifact;\n }\n\n /** @deprecated Use {@link ArtifactEntity}. */\n public get artifactEntity(): MJArtifactEntity | null {\n return this.ArtifactEntity;\n }\n\n public get currentVersion(): MJArtifactVersionEntity | null { // case-violation-ok-legacy-back-compat: the PascalCase name is already taken in this scope\n return this.CurrentVersion;\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private async loadArtifact(): Promise<void> {\n if (!this.artifactId) {\n this.error = true;\n this.Loading = false;\n return;\n }\n\n try {\n this.Loading = true;\n this.error = false;\n\n // Load artifact directly\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJArtifactEntity>({\n EntityName: 'MJ: Conversation Artifacts',\n ExtraFilter: `ID='${this.artifactId}'`,\n MaxRows: 1,\n ResultType: 'entity_object'\n }, this.CurrentUser);\n\n if (result.Success && result.Results && result.Results.length > 0) {\n this._artifact = result.Results[0];\n // Load version content\n await this.loadVersionContent();\n } else {\n this.error = true;\n }\n\n } catch (err) {\n console.error('Error loading artifact:', err);\n this.error = true;\n } finally {\n this.Loading = false;\n }\n }\n\n private async loadVersionContent(): Promise<void> {\n if (!this._artifact) return;\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const filter = this.VersionNumber\n ? `ArtifactID='${this._artifact.ID}' AND VersionNumber=${this.VersionNumber}`\n : `ArtifactID='${this._artifact.ID}'`;\n\n const result = await rv.RunView<MJArtifactVersionEntity>({\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: filter,\n OrderBy: 'VersionNumber DESC',\n MaxRows: 1,\n ResultType: 'entity_object'\n }, this.CurrentUser);\n\n if (result.Success && result.Results && result.Results.length > 0) {\n this.CurrentVersion = result.Results[0];\n }\n } catch (err) {\n console.error('Error loading version content:', err);\n }\n }\n\n /**\n * Get the display name - prefer version-specific name if available, otherwise use artifact name\n */\n public get displayName(): string {\n if (this.CurrentVersion?.Name) {\n return this.CurrentVersion.Name;\n }\n return this._artifact?.Name || 'Untitled';\n }\n\n /**\n * Get the display description - prefer version-specific description if available, otherwise use artifact description\n */\n public get DisplayDescription(): string | null {\n if (this.CurrentVersion?.Description) {\n return this.CurrentVersion.Description;\n }\n return this._artifact?.Description || null;\n }\n\n /** @deprecated Use {@link DisplayDescription}. */\n public get displayDescription(): string | null {\n return this.DisplayDescription;\n }\n\n public get IsCodeArtifact(): boolean {\n if (!this._artifact) return false;\n const name = this._artifact.Name?.toLowerCase() || '';\n const codeExtensions = ['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.cpp', '.c', '.go', '.rs', '.sql', '.html', '.css', '.scss'];\n return codeExtensions.some(ext => name.endsWith(ext));\n }\n\n /** @deprecated Use {@link IsCodeArtifact}. */\n public get isCodeArtifact(): boolean {\n return this.IsCodeArtifact;\n }\n\n /**\n * Get the icon for this artifact using the centralized icon service.\n * Fallback priority: Plugin icon > Metadata icon > Hardcoded mapping > Generic icon\n */\n public GetArtifactIcon(): string {\n if (!this._artifact) return 'fa-file';\n return this.artifactIconService.getArtifactIcon(this._artifact);\n }\n\n /** @deprecated Use {@link GetArtifactIcon}. */\n public getArtifactIcon(): string {\n return this.GetArtifactIcon();\n }\n\n public GetTypeBadgeColor(): string {\n if (!this._artifact) return '#6B7280';\n\n const type = this._artifact.Type?.toLowerCase() || '';\n\n if (type.includes('code')) return '#8B5CF6'; // Purple\n if (type.includes('report')) return '#3B82F6'; // Blue\n if (type.includes('dashboard')) return '#10B981'; // Green\n if (type.includes('document')) return '#F59E0B'; // Orange\n\n return '#6B7280'; // Gray\n }\n\n /** @deprecated Use {@link GetTypeBadgeColor}. */\n public getTypeBadgeColor(): string {\n return this.GetTypeBadgeColor();\n }\n\n public OpenFullView(): void {\n if (this._artifact) {\n this.ActionPerformed.emit({ action: 'open', artifact: this._artifact, version: this.CurrentVersion || undefined });\n }\n }\n\n /** @deprecated Use {@link OpenFullView}. */\n public openFullView(): void {\n return this.OpenFullView();\n }\n}\n"]}