@memberjunction/ng-artifacts 2.108.0 → 2.110.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.
@@ -1,16 +1,19 @@
1
- import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
1
+ import { Component, Input, Output, EventEmitter, ViewChild, SecurityContext } from '@angular/core';
2
2
  import { Metadata, RunView, LogError } from '@memberjunction/core';
3
+ import { ParseJSONRecursive } from '@memberjunction/global';
3
4
  import { ArtifactMetadataEngine } from '@memberjunction/core-entities';
4
5
  import { MJNotificationService } from '@memberjunction/ng-notifications';
5
6
  import { Subject } from 'rxjs';
6
7
  import { takeUntil } from 'rxjs/operators';
7
8
  import { ArtifactTypePluginViewerComponent } from './artifact-type-plugin-viewer.component';
9
+ import { marked } from 'marked';
8
10
  import * as i0 from "@angular/core";
9
- import * as i1 from "@angular/forms";
10
- import * as i2 from "ngx-markdown";
11
- import * as i3 from "@memberjunction/ng-code-editor";
12
- import * as i4 from "./artifact-type-plugin-viewer.component";
13
- import * as i5 from "@angular/common";
11
+ import * as i1 from "@memberjunction/ng-notifications";
12
+ import * as i2 from "@angular/platform-browser";
13
+ import * as i3 from "ngx-markdown";
14
+ import * as i4 from "@memberjunction/ng-code-editor";
15
+ import * as i5 from "./artifact-type-plugin-viewer.component";
16
+ import * as i6 from "@angular/common";
14
17
  const _forTrack0 = ($index, $item) => $item.ID;
15
18
  const _forTrack1 = ($index, $item) => $item.id;
16
19
  function ArtifactViewerPanelComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
@@ -91,305 +94,335 @@ function ArtifactViewerPanelComponent_Conditional_19_Template(rf, ctx) { if (rf
91
94
  i0.ɵɵadvance(3);
92
95
  i0.ɵɵtextInterpolate(ctx_r0.error);
93
96
  } }
94
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_2_Template(rf, ctx) { if (rf & 1) {
95
- const _r7 = i0.ɵɵgetCurrentView();
96
- i0.ɵɵelementStart(0, "button", 31);
97
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.setActiveTab("display")); });
98
- i0.ɵɵelement(1, "i", 38);
99
- i0.ɵɵtext(2, " Display ");
100
- i0.ɵɵelementEnd();
97
+ function ArtifactViewerPanelComponent_Conditional_20_For_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
98
+ i0.ɵɵelement(0, "i");
101
99
  } if (rf & 2) {
100
+ const tab_r7 = i0.ɵɵnextContext().$implicit;
102
101
  const ctx_r0 = i0.ɵɵnextContext(2);
103
- i0.ɵɵclassProp("active", ctx_r0.activeTab === "display");
102
+ i0.ɵɵclassMap(ctx_r0.GetTabIcon(tab_r7));
104
103
  } }
105
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_3_Template(rf, ctx) { if (rf & 1) {
106
- const _r8 = i0.ɵɵgetCurrentView();
107
- i0.ɵɵelementStart(0, "button", 31);
108
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.setActiveTab("json")); });
109
- i0.ɵɵelement(1, "i", 39);
110
- i0.ɵɵtext(2, " JSON ");
104
+ function ArtifactViewerPanelComponent_Conditional_20_For_3_Template(rf, ctx) { if (rf & 1) {
105
+ const _r6 = i0.ɵɵgetCurrentView();
106
+ i0.ɵɵelementStart(0, "button", 42);
107
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_For_3_Template_button_click_0_listener() { const tab_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SetActiveTab(tab_r7)); });
108
+ i0.ɵɵtemplate(1, ArtifactViewerPanelComponent_Conditional_20_For_3_Conditional_1_Template, 1, 2, "i", 43);
109
+ i0.ɵɵtext(2);
111
110
  i0.ɵɵelementEnd();
112
111
  } if (rf & 2) {
112
+ const tab_r7 = ctx.$implicit;
113
113
  const ctx_r0 = i0.ɵɵnextContext(2);
114
- i0.ɵɵclassProp("active", ctx_r0.activeTab === "json");
114
+ i0.ɵɵclassProp("active", ctx_r0.activeTab === tab_r7.toLowerCase());
115
+ i0.ɵɵadvance();
116
+ i0.ɵɵconditional(ctx_r0.GetTabIcon(tab_r7) ? 1 : -1);
117
+ i0.ɵɵadvance();
118
+ i0.ɵɵtextInterpolate1(" ", tab_r7, " ");
115
119
  } }
116
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_7_Template(rf, ctx) { if (rf & 1) {
117
- const _r9 = i0.ɵɵgetCurrentView();
118
- i0.ɵɵelementStart(0, "button", 31);
119
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.setActiveTab("links")); });
120
- i0.ɵɵelement(1, "i", 40);
121
- i0.ɵɵtext(2, " Links ");
120
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_5_Template(rf, ctx) { if (rf & 1) {
121
+ i0.ɵɵelementStart(0, "div", 44);
122
+ i0.ɵɵelement(1, "mj-artifact-type-plugin-viewer", 45);
122
123
  i0.ɵɵelementEnd();
123
124
  } if (rf & 2) {
124
125
  const ctx_r0 = i0.ɵɵnextContext(2);
125
- i0.ɵɵclassProp("active", ctx_r0.activeTab === "links");
126
- } }
127
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
128
- i0.ɵɵelement(0, "mj-artifact-type-plugin-viewer", 41);
129
- } if (rf & 2) {
130
- const ctx_r0 = i0.ɵɵnextContext(3);
126
+ i0.ɵɵstyleProp("display", ctx_r0.activeTab === "display" ? "block" : "none");
127
+ i0.ɵɵadvance();
131
128
  i0.ɵɵproperty("artifactVersion", ctx_r0.artifactVersion)("artifactTypeName", ctx_r0.artifactTypeName)("contentType", ctx_r0.contentType)("readonly", true);
132
129
  } }
133
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
134
- i0.ɵɵelementStart(0, "div", 47);
135
- i0.ɵɵelement(1, "markdown", 49);
130
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
131
+ i0.ɵɵelementStart(0, "div", 51);
132
+ i0.ɵɵelement(1, "markdown", 53);
136
133
  i0.ɵɵelementEnd();
137
134
  } if (rf & 2) {
138
135
  const ctx_r0 = i0.ɵɵnextContext(4);
139
136
  i0.ɵɵadvance();
140
137
  i0.ɵɵproperty("data", ctx_r0.displayMarkdown);
141
138
  } }
142
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
143
- i0.ɵɵelement(0, "div", 48);
139
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
140
+ i0.ɵɵelement(0, "div", 52);
144
141
  } if (rf & 2) {
145
142
  const ctx_r0 = i0.ɵɵnextContext(4);
146
143
  i0.ɵɵproperty("innerHTML", ctx_r0.displayHtml, i0.ɵɵsanitizeHtml);
147
144
  } }
148
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
149
- const _r10 = i0.ɵɵgetCurrentView();
150
- i0.ɵɵelementStart(0, "div", 42)(1, "button", 43);
151
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onPrintDisplayContent()); });
152
- i0.ɵɵelement(2, "i", 44);
145
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
146
+ const _r8 = i0.ɵɵgetCurrentView();
147
+ i0.ɵɵelementStart(0, "div", 46)(1, "button", 47);
148
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onPrintDisplayContent()); });
149
+ i0.ɵɵelement(2, "i", 48);
153
150
  i0.ɵɵtext(3, " Print ");
154
151
  i0.ɵɵelementEnd();
155
- i0.ɵɵelementStart(4, "button", 45);
156
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onCopyDisplayContent()); });
157
- i0.ɵɵelement(5, "i", 46);
152
+ i0.ɵɵelementStart(4, "button", 49);
153
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onCopyDisplayContent()); });
154
+ i0.ɵɵelement(5, "i", 50);
158
155
  i0.ɵɵtext(6, " Copy ");
159
156
  i0.ɵɵelementEnd()();
160
- i0.ɵɵtemplate(7, ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Conditional_7_Template, 2, 1, "div", 47)(8, ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Conditional_8_Template, 1, 1, "div", 48);
157
+ i0.ɵɵtemplate(7, ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Conditional_7_Template, 2, 1, "div", 51)(8, ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Conditional_8_Template, 1, 1, "div", 52);
161
158
  } if (rf & 2) {
162
159
  const ctx_r0 = i0.ɵɵnextContext(3);
163
160
  i0.ɵɵadvance(7);
164
161
  i0.ɵɵconditional(ctx_r0.displayMarkdown ? 7 : ctx_r0.displayHtml ? 8 : -1);
165
162
  } }
166
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Template(rf, ctx) { if (rf & 1) {
167
- i0.ɵɵelementStart(0, "div", 34);
168
- i0.ɵɵtemplate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_1_Template, 1, 4, "mj-artifact-type-plugin-viewer", 41)(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Conditional_2_Template, 9, 1);
163
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Template(rf, ctx) { if (rf & 1) {
164
+ i0.ɵɵelementStart(0, "div", 33);
165
+ i0.ɵɵtemplate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Conditional_1_Template, 9, 1);
169
166
  i0.ɵɵelementEnd();
170
167
  } if (rf & 2) {
171
168
  const ctx_r0 = i0.ɵɵnextContext(2);
172
169
  i0.ɵɵadvance();
173
- i0.ɵɵconditional(ctx_r0.hasPlugin && ctx_r0.artifactVersion && ctx_r0.artifactTypeName ? 1 : ctx_r0.displayMarkdown || ctx_r0.displayHtml ? 2 : -1);
174
- } }
175
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_10_Template(rf, ctx) { if (rf & 1) {
176
- const _r11 = i0.ɵɵgetCurrentView();
177
- i0.ɵɵelementStart(0, "div", 35)(1, "div", 50)(2, "button", 51);
178
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_10_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCopyToClipboard()); });
179
- i0.ɵɵelement(3, "i", 46);
180
- i0.ɵɵtext(4, " Copy ");
181
- i0.ɵɵelementEnd()();
182
- i0.ɵɵelementStart(5, "div", 52)(6, "mj-code-editor", 53);
183
- i0.ɵɵtwoWayListener("ngModelChange", function ArtifactViewerPanelComponent_Conditional_20_Conditional_10_Template_mj_code_editor_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.jsonContent, $event) || (ctx_r0.jsonContent = $event); return i0.ɵɵresetView($event); });
184
- i0.ɵɵelementEnd()()();
185
- } if (rf & 2) {
186
- const ctx_r0 = i0.ɵɵnextContext(2);
187
- i0.ɵɵadvance(6);
188
- i0.ɵɵtwoWayProperty("ngModel", ctx_r0.jsonContent);
189
- i0.ɵɵproperty("language", "json")("readonly", true);
170
+ i0.ɵɵconditional(ctx_r0.displayMarkdown || ctx_r0.displayHtml ? 1 : -1);
190
171
  } }
191
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_24_Template(rf, ctx) { if (rf & 1) {
192
- i0.ɵɵelementStart(0, "div", 56)(1, "label");
172
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_31_Template(rf, ctx) { if (rf & 1) {
173
+ i0.ɵɵelementStart(0, "div", 37)(1, "label");
193
174
  i0.ɵɵtext(2, "Artifact Description");
194
175
  i0.ɵɵelementEnd();
195
176
  i0.ɵɵelementStart(3, "span");
196
177
  i0.ɵɵtext(4);
197
178
  i0.ɵɵelementEnd()();
198
179
  } if (rf & 2) {
199
- const ctx_r0 = i0.ɵɵnextContext(3);
180
+ const ctx_r0 = i0.ɵɵnextContext(2);
200
181
  i0.ɵɵadvance(4);
201
182
  i0.ɵɵtextInterpolate(ctx_r0.artifact.Description);
202
183
  } }
203
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_25_Template(rf, ctx) { if (rf & 1) {
204
- i0.ɵɵelementStart(0, "div", 56)(1, "label");
184
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_32_Template(rf, ctx) { if (rf & 1) {
185
+ i0.ɵɵelementStart(0, "div", 37)(1, "label");
205
186
  i0.ɵɵtext(2, "Version Description");
206
187
  i0.ɵɵelementEnd();
207
188
  i0.ɵɵelementStart(3, "span");
208
189
  i0.ɵɵtext(4);
209
190
  i0.ɵɵelementEnd()();
210
191
  } if (rf & 2) {
211
- const ctx_r0 = i0.ɵɵnextContext(3);
192
+ const ctx_r0 = i0.ɵɵnextContext(2);
212
193
  i0.ɵɵadvance(4);
213
194
  i0.ɵɵtextInterpolate(ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.Description);
214
195
  } }
215
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
196
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
216
197
  i0.ɵɵelementStart(0, "span");
217
198
  i0.ɵɵtext(1);
218
199
  i0.ɵɵelementEnd();
219
200
  } if (rf & 2) {
220
- const attr_r12 = i0.ɵɵnextContext().$implicit;
201
+ const attr_r9 = i0.ɵɵnextContext().$implicit;
221
202
  i0.ɵɵadvance();
222
- i0.ɵɵtextInterpolate(attr_r12.Value);
203
+ i0.ɵɵtextInterpolate(attr_r9.Value);
223
204
  } }
224
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Conditional_4_Template(rf, ctx) { if (rf & 1) {
225
- i0.ɵɵelementStart(0, "span", 60);
205
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Conditional_4_Template(rf, ctx) { if (rf & 1) {
206
+ i0.ɵɵelementStart(0, "span", 56);
226
207
  i0.ɵɵtext(1, "Empty");
227
208
  i0.ɵɵelementEnd();
228
209
  } }
229
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Template(rf, ctx) { if (rf & 1) {
230
- i0.ɵɵelementStart(0, "div", 59)(1, "label");
210
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Template(rf, ctx) { if (rf & 1) {
211
+ i0.ɵɵelementStart(0, "div", 55)(1, "label");
231
212
  i0.ɵɵtext(2);
232
213
  i0.ɵɵelementEnd();
233
- i0.ɵɵtemplate(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Conditional_3_Template, 2, 1, "span")(4, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Conditional_4_Template, 2, 0, "span", 60);
214
+ i0.ɵɵtemplate(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Conditional_3_Template, 2, 1, "span")(4, ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Conditional_4_Template, 2, 0, "span", 56);
234
215
  i0.ɵɵelementEnd();
235
216
  } if (rf & 2) {
236
- const attr_r12 = ctx.$implicit;
217
+ const attr_r9 = ctx.$implicit;
237
218
  i0.ɵɵadvance(2);
238
- i0.ɵɵtextInterpolate(attr_r12.Name);
219
+ i0.ɵɵtextInterpolate(attr_r9.Name);
239
220
  i0.ɵɵadvance();
240
- i0.ɵɵconditional(attr_r12.Value ? 3 : 4);
221
+ i0.ɵɵconditional(attr_r9.Value ? 3 : 4);
241
222
  } }
242
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_Template(rf, ctx) { if (rf & 1) {
243
- i0.ɵɵelementStart(0, "div", 57)(1, "h4");
223
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_33_Template(rf, ctx) { if (rf & 1) {
224
+ i0.ɵɵelementStart(0, "div", 38)(1, "h4");
244
225
  i0.ɵɵtext(2, "Version Attributes");
245
226
  i0.ɵɵelementEnd();
246
- i0.ɵɵelementStart(3, "div", 58);
247
- i0.ɵɵrepeaterCreate(4, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_For_5_Template, 5, 2, "div", 59, _forTrack0);
227
+ i0.ɵɵelementStart(3, "div", 54);
228
+ i0.ɵɵrepeaterCreate(4, ArtifactViewerPanelComponent_Conditional_20_Conditional_33_For_5_Template, 5, 2, "div", 55, _forTrack0);
248
229
  i0.ɵɵelementEnd()();
249
230
  } if (rf & 2) {
250
- const ctx_r0 = i0.ɵɵnextContext(3);
231
+ const ctx_r0 = i0.ɵɵnextContext(2);
251
232
  i0.ɵɵadvance(4);
252
233
  i0.ɵɵrepeater(ctx_r0.filteredAttributes);
253
234
  } }
254
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Template(rf, ctx) { if (rf & 1) {
255
- i0.ɵɵelementStart(0, "div", 36)(1, "div", 54)(2, "div", 55)(3, "label");
256
- i0.ɵɵtext(4, "Type");
257
- i0.ɵɵelementEnd();
258
- i0.ɵɵelementStart(5, "span");
259
- i0.ɵɵtext(6);
260
- i0.ɵɵelementEnd()();
261
- i0.ɵɵelementStart(7, "div", 55)(8, "label");
262
- i0.ɵɵtext(9, "Version");
263
- i0.ɵɵelementEnd();
264
- i0.ɵɵelementStart(10, "span");
265
- i0.ɵɵtext(11);
266
- i0.ɵɵelementEnd()();
267
- i0.ɵɵelementStart(12, "div", 55)(13, "label");
268
- i0.ɵɵtext(14, "Created");
269
- i0.ɵɵelementEnd();
270
- i0.ɵɵelementStart(15, "span");
271
- i0.ɵɵtext(16);
272
- i0.ɵɵpipe(17, "date");
273
- i0.ɵɵelementEnd()();
274
- i0.ɵɵelementStart(18, "div", 55)(19, "label");
275
- i0.ɵɵtext(20, "Updated");
276
- i0.ɵɵelementEnd();
277
- i0.ɵɵelementStart(21, "span");
278
- i0.ɵɵtext(22);
279
- i0.ɵɵpipe(23, "date");
280
- i0.ɵɵelementEnd()();
281
- i0.ɵɵtemplate(24, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_24_Template, 5, 1, "div", 56)(25, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_25_Template, 5, 1, "div", 56);
282
- i0.ɵɵelementEnd();
283
- i0.ɵɵtemplate(26, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Conditional_26_Template, 6, 0, "div", 57);
284
- i0.ɵɵelementEnd();
285
- } if (rf & 2) {
286
- const ctx_r0 = i0.ɵɵnextContext(2);
287
- i0.ɵɵadvance(6);
288
- i0.ɵɵtextInterpolate(ctx_r0.artifact.Type);
289
- i0.ɵɵadvance(5);
290
- i0.ɵɵtextInterpolate((ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.VersionNumber) || 1);
291
- i0.ɵɵadvance(5);
292
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(17, 7, ctx_r0.artifact.__mj_CreatedAt, "short"));
293
- i0.ɵɵadvance(6);
294
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(23, 10, ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.__mj_UpdatedAt, "short"));
295
- i0.ɵɵadvance(2);
296
- i0.ɵɵconditional(ctx_r0.artifact.Description ? 24 : -1);
297
- i0.ɵɵadvance();
298
- i0.ɵɵconditional((ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.Description) && ctx_r0.artifact.Description && (ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.Description) !== ctx_r0.artifact.Description ? 25 : -1);
299
- i0.ɵɵadvance();
300
- i0.ɵɵconditional(ctx_r0.filteredAttributes.length > 0 ? 26 : -1);
301
- } }
302
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
303
- i0.ɵɵelement(0, "i", 65);
235
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
236
+ i0.ɵɵelement(0, "i", 59);
304
237
  } }
305
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
306
- i0.ɵɵelement(0, "i", 66);
238
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
239
+ i0.ɵɵelement(0, "i", 60);
307
240
  } }
308
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
309
- const _r13 = i0.ɵɵgetCurrentView();
310
- i0.ɵɵelementStart(0, "div", 63)(1, "div", 64);
311
- i0.ɵɵtemplate(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Conditional_2_Template, 1, 0, "i", 65)(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Conditional_3_Template, 1, 0, "i", 66);
241
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Template(rf, ctx) { if (rf & 1) {
242
+ const _r10 = i0.ɵɵgetCurrentView();
243
+ i0.ɵɵelementStart(0, "div", 57)(1, "div", 58);
244
+ i0.ɵɵtemplate(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Conditional_2_Template, 1, 0, "i", 59)(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Conditional_3_Template, 1, 0, "i", 60);
312
245
  i0.ɵɵelementEnd();
313
- i0.ɵɵelementStart(4, "div", 67)(5, "div", 68);
246
+ i0.ɵɵelementStart(4, "div", 61)(5, "div", 62);
314
247
  i0.ɵɵtext(6);
315
248
  i0.ɵɵelementEnd();
316
- i0.ɵɵelementStart(7, "div", 69);
249
+ i0.ɵɵelementStart(7, "div", 63);
317
250
  i0.ɵɵtext(8);
318
251
  i0.ɵɵelementEnd()();
319
- i0.ɵɵelementStart(9, "div", 70)(10, "button", 71);
320
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Template_button_click_10_listener() { const link_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.onNavigateToLink(link_r14)); });
321
- i0.ɵɵelement(11, "i", 72);
252
+ i0.ɵɵelementStart(9, "div", 64)(10, "button", 65);
253
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Template_button_click_10_listener() { const link_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onNavigateToLink(link_r11)); });
254
+ i0.ɵɵelement(11, "i", 66);
322
255
  i0.ɵɵelementEnd()()();
323
256
  } if (rf & 2) {
324
- const link_r14 = ctx.$implicit;
257
+ const link_r11 = ctx.$implicit;
325
258
  i0.ɵɵadvance(2);
326
- i0.ɵɵconditional(link_r14.type === "conversation" ? 2 : 3);
259
+ i0.ɵɵconditional(link_r11.type === "conversation" ? 2 : 3);
327
260
  i0.ɵɵadvance(4);
328
- i0.ɵɵtextInterpolate(link_r14.name);
261
+ i0.ɵɵtextInterpolate(link_r11.name);
329
262
  i0.ɵɵadvance(2);
330
- i0.ɵɵtextInterpolate(link_r14.type === "conversation" ? "Conversation" : "Collection");
263
+ i0.ɵɵtextInterpolate(link_r11.type === "conversation" ? "Conversation" : "Collection");
331
264
  i0.ɵɵadvance(2);
332
- i0.ɵɵproperty("disabled", !link_r14.hasAccess)("title", link_r14.hasAccess ? "Open" : "No access");
265
+ i0.ɵɵproperty("disabled", !link_r11.hasAccess)("title", link_r11.hasAccess ? "Open" : "No access");
333
266
  } }
334
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
335
- i0.ɵɵelementStart(0, "div", 61);
336
- i0.ɵɵrepeaterCreate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_For_2_Template, 12, 5, "div", 63, _forTrack1);
267
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_35_Template(rf, ctx) { if (rf & 1) {
268
+ i0.ɵɵelementStart(0, "div", 40);
269
+ i0.ɵɵrepeaterCreate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_35_For_2_Template, 12, 5, "div", 57, _forTrack1);
337
270
  i0.ɵɵelementEnd();
338
271
  } if (rf & 2) {
339
- const ctx_r0 = i0.ɵɵnextContext(3);
272
+ const ctx_r0 = i0.ɵɵnextContext(2);
340
273
  i0.ɵɵadvance();
341
274
  i0.ɵɵrepeater(ctx_r0.linksToShow);
342
275
  } }
343
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_2_Template(rf, ctx) { if (rf & 1) {
344
- i0.ɵɵelementStart(0, "div", 62);
345
- i0.ɵɵelement(1, "i", 40);
276
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_36_Template(rf, ctx) { if (rf & 1) {
277
+ i0.ɵɵelementStart(0, "div", 41);
278
+ i0.ɵɵelement(1, "i", 67);
346
279
  i0.ɵɵelementStart(2, "p");
347
280
  i0.ɵɵtext(3, "No links available");
348
281
  i0.ɵɵelementEnd()();
349
282
  } }
350
- function ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Template(rf, ctx) { if (rf & 1) {
351
- i0.ɵɵelementStart(0, "div", 37);
352
- i0.ɵɵtemplate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_1_Template, 3, 0, "div", 61)(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Conditional_2_Template, 4, 0, "div", 62);
283
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_1_Template(rf, ctx) { if (rf & 1) {
284
+ i0.ɵɵelement(0, "div", 69);
285
+ } if (rf & 2) {
286
+ const tabData_r12 = i0.ɵɵnextContext();
287
+ const ctx_r0 = i0.ɵɵnextContext(3);
288
+ i0.ɵɵproperty("innerHTML", ctx_r0.RenderMarkdown(tabData_r12.content), i0.ɵɵsanitizeHtml);
289
+ } }
290
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_2_Template(rf, ctx) { if (rf & 1) {
291
+ const _r13 = i0.ɵɵgetCurrentView();
292
+ i0.ɵɵelementStart(0, "div", 70)(1, "div", 74)(2, "button", 75);
293
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_2_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r13); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.onCopyToClipboard()); });
294
+ i0.ɵɵelement(3, "i", 50);
295
+ i0.ɵɵtext(4, " Copy ");
296
+ i0.ɵɵelementEnd()();
297
+ i0.ɵɵelementStart(5, "div", 76);
298
+ i0.ɵɵelement(6, "mj-code-editor", 77);
299
+ i0.ɵɵelementEnd()();
300
+ } if (rf & 2) {
301
+ const tabData_r12 = i0.ɵɵnextContext();
302
+ i0.ɵɵadvance(6);
303
+ i0.ɵɵproperty("value", tabData_r12.content)("language", "json")("readonly", true)("lineWrapping", true);
304
+ } }
305
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_3_Template(rf, ctx) { if (rf & 1) {
306
+ const _r14 = i0.ɵɵgetCurrentView();
307
+ i0.ɵɵelementStart(0, "div", 71)(1, "div", 78)(2, "button", 79);
308
+ i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r14); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.onCopyToClipboard()); });
309
+ i0.ɵɵelement(3, "i", 50);
310
+ i0.ɵɵtext(4, " Copy ");
311
+ i0.ɵɵelementEnd()();
312
+ i0.ɵɵelementStart(5, "div", 80);
313
+ i0.ɵɵelement(6, "mj-code-editor", 77);
314
+ i0.ɵɵelementEnd()();
315
+ } if (rf & 2) {
316
+ const tabData_r12 = i0.ɵɵnextContext();
317
+ i0.ɵɵadvance(6);
318
+ i0.ɵɵproperty("value", tabData_r12.content)("language", tabData_r12.language || "typescript")("readonly", true)("lineWrapping", true);
319
+ } }
320
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_4_Template(rf, ctx) { if (rf & 1) {
321
+ i0.ɵɵelement(0, "div", 72);
322
+ } if (rf & 2) {
323
+ const tabData_r12 = i0.ɵɵnextContext();
324
+ i0.ɵɵproperty("innerHTML", tabData_r12.content, i0.ɵɵsanitizeHtml);
325
+ } }
326
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_5_Template(rf, ctx) { if (rf & 1) {
327
+ i0.ɵɵelementStart(0, "pre", 73);
328
+ i0.ɵɵtext(1);
353
329
  i0.ɵɵelementEnd();
354
330
  } if (rf & 2) {
355
- const ctx_r0 = i0.ɵɵnextContext(2);
331
+ const tabData_r12 = i0.ɵɵnextContext();
356
332
  i0.ɵɵadvance();
357
- i0.ɵɵconditional(ctx_r0.linksToShow.length > 0 ? 1 : 2);
333
+ i0.ɵɵtextInterpolate(tabData_r12.content);
334
+ } }
335
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Template(rf, ctx) { if (rf & 1) {
336
+ i0.ɵɵelementStart(0, "div", 68);
337
+ i0.ɵɵtemplate(1, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_1_Template, 1, 1, "div", 69)(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_2_Template, 7, 4, "div", 70)(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_3_Template, 7, 4, "div", 71)(4, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_4_Template, 1, 1, "div", 72)(5, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Case_5_Template, 2, 1, "pre", 73);
338
+ i0.ɵɵelementEnd();
339
+ } if (rf & 2) {
340
+ let tmp_4_0;
341
+ i0.ɵɵadvance();
342
+ i0.ɵɵconditional((tmp_4_0 = ctx.type) === "markdown" ? 1 : tmp_4_0 === "json" ? 2 : tmp_4_0 === "code" ? 3 : tmp_4_0 === "html" ? 4 : tmp_4_0 === "plaintext" ? 5 : -1);
343
+ } }
344
+ function ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Template(rf, ctx) { if (rf & 1) {
345
+ i0.ɵɵtemplate(0, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Conditional_0_Template, 6, 1, "div", 68);
346
+ } if (rf & 2) {
347
+ let tmp_2_0;
348
+ const ctx_r0 = i0.ɵɵnextContext(2);
349
+ i0.ɵɵconditional((tmp_2_0 = ctx_r0.GetTabContent(ctx_r0.activeTab)) ? 0 : -1, tmp_2_0);
358
350
  } }
359
351
  function ArtifactViewerPanelComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
360
- const _r6 = i0.ɵɵgetCurrentView();
361
352
  i0.ɵɵelementStart(0, "div", 17)(1, "div", 29);
362
- i0.ɵɵtemplate(2, ArtifactViewerPanelComponent_Conditional_20_Conditional_2_Template, 3, 2, "button", 30)(3, ArtifactViewerPanelComponent_Conditional_20_Conditional_3_Template, 3, 2, "button", 30);
363
- i0.ɵɵelementStart(4, "button", 31);
364
- i0.ɵɵlistener("click", function ArtifactViewerPanelComponent_Conditional_20_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setActiveTab("details")); });
365
- i0.ɵɵelement(5, "i", 32);
366
- i0.ɵɵtext(6, " Details ");
353
+ i0.ɵɵrepeaterCreate(2, ArtifactViewerPanelComponent_Conditional_20_For_3_Template, 3, 4, "button", 30, i0.ɵɵrepeaterTrackByIdentity);
354
+ i0.ɵɵelementEnd();
355
+ i0.ɵɵelementStart(4, "div", 31);
356
+ i0.ɵɵtemplate(5, ArtifactViewerPanelComponent_Conditional_20_Conditional_5_Template, 2, 6, "div", 32)(6, ArtifactViewerPanelComponent_Conditional_20_Conditional_6_Template, 2, 1, "div", 33);
357
+ i0.ɵɵelementStart(7, "div", 34)(8, "div", 35)(9, "div", 36)(10, "label");
358
+ i0.ɵɵtext(11, "Type");
359
+ i0.ɵɵelementEnd();
360
+ i0.ɵɵelementStart(12, "span");
361
+ i0.ɵɵtext(13);
362
+ i0.ɵɵelementEnd()();
363
+ i0.ɵɵelementStart(14, "div", 36)(15, "label");
364
+ i0.ɵɵtext(16, "Version");
365
+ i0.ɵɵelementEnd();
366
+ i0.ɵɵelementStart(17, "span");
367
+ i0.ɵɵtext(18);
368
+ i0.ɵɵelementEnd()();
369
+ i0.ɵɵelementStart(19, "div", 36)(20, "label");
370
+ i0.ɵɵtext(21, "Created");
367
371
  i0.ɵɵelementEnd();
368
- i0.ɵɵtemplate(7, ArtifactViewerPanelComponent_Conditional_20_Conditional_7_Template, 3, 2, "button", 30);
372
+ i0.ɵɵelementStart(22, "span");
373
+ i0.ɵɵtext(23);
374
+ i0.ɵɵpipe(24, "date");
375
+ i0.ɵɵelementEnd()();
376
+ i0.ɵɵelementStart(25, "div", 36)(26, "label");
377
+ i0.ɵɵtext(27, "Updated");
378
+ i0.ɵɵelementEnd();
379
+ i0.ɵɵelementStart(28, "span");
380
+ i0.ɵɵtext(29);
381
+ i0.ɵɵpipe(30, "date");
382
+ i0.ɵɵelementEnd()();
383
+ i0.ɵɵtemplate(31, ArtifactViewerPanelComponent_Conditional_20_Conditional_31_Template, 5, 1, "div", 37)(32, ArtifactViewerPanelComponent_Conditional_20_Conditional_32_Template, 5, 1, "div", 37);
384
+ i0.ɵɵelementEnd();
385
+ i0.ɵɵtemplate(33, ArtifactViewerPanelComponent_Conditional_20_Conditional_33_Template, 6, 0, "div", 38);
386
+ i0.ɵɵelementEnd();
387
+ i0.ɵɵelementStart(34, "div", 39);
388
+ i0.ɵɵtemplate(35, ArtifactViewerPanelComponent_Conditional_20_Conditional_35_Template, 3, 0, "div", 40)(36, ArtifactViewerPanelComponent_Conditional_20_Conditional_36_Template, 4, 0, "div", 41);
369
389
  i0.ɵɵelementEnd();
370
- i0.ɵɵelementStart(8, "div", 33);
371
- i0.ɵɵtemplate(9, ArtifactViewerPanelComponent_Conditional_20_Conditional_9_Template, 3, 1, "div", 34)(10, ArtifactViewerPanelComponent_Conditional_20_Conditional_10_Template, 7, 3, "div", 35)(11, ArtifactViewerPanelComponent_Conditional_20_Conditional_11_Template, 27, 13, "div", 36)(12, ArtifactViewerPanelComponent_Conditional_20_Conditional_12_Template, 3, 1, "div", 37);
390
+ i0.ɵɵtemplate(37, ArtifactViewerPanelComponent_Conditional_20_Conditional_37_Template, 1, 1);
372
391
  i0.ɵɵelementEnd()();
373
392
  } if (rf & 2) {
374
393
  const ctx_r0 = i0.ɵɵnextContext();
375
394
  i0.ɵɵadvance(2);
376
- i0.ɵɵconditional(ctx_r0.hasDisplayTab ? 2 : -1);
395
+ i0.ɵɵrepeater(ctx_r0.allTabs);
396
+ i0.ɵɵadvance(3);
397
+ i0.ɵɵconditional(ctx_r0.hasPlugin && ctx_r0.artifactVersion && ctx_r0.artifactTypeName ? 5 : -1);
377
398
  i0.ɵɵadvance();
378
- i0.ɵɵconditional(ctx_r0.hasJsonTab ? 3 : -1);
399
+ i0.ɵɵconditional(ctx_r0.activeTab === "display" && (!ctx_r0.hasPlugin || !ctx_r0.artifactVersion) ? 6 : -1);
379
400
  i0.ɵɵadvance();
380
- i0.ɵɵclassProp("active", ctx_r0.activeTab === "details");
381
- i0.ɵɵadvance(3);
382
- i0.ɵɵconditional(ctx_r0.hasLinksTab ? 7 : -1);
401
+ i0.ɵɵstyleProp("display", ctx_r0.activeTab === "details" ? "block" : "none");
402
+ i0.ɵɵadvance(6);
403
+ i0.ɵɵtextInterpolate(ctx_r0.artifact.Type);
404
+ i0.ɵɵadvance(5);
405
+ i0.ɵɵtextInterpolate((ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.VersionNumber) || 1);
406
+ i0.ɵɵadvance(5);
407
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(24, 15, ctx_r0.artifact.__mj_CreatedAt, "short"));
408
+ i0.ɵɵadvance(6);
409
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(30, 18, ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.__mj_UpdatedAt, "short"));
383
410
  i0.ɵɵadvance(2);
384
- i0.ɵɵconditional(ctx_r0.activeTab === "display" && ctx_r0.hasDisplayTab ? 9 : -1);
411
+ i0.ɵɵconditional(ctx_r0.artifact.Description ? 31 : -1);
385
412
  i0.ɵɵadvance();
386
- i0.ɵɵconditional(ctx_r0.activeTab === "json" && ctx_r0.hasJsonTab ? 10 : -1);
413
+ i0.ɵɵconditional((ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.Description) && ctx_r0.artifact.Description && (ctx_r0.artifactVersion == null ? null : ctx_r0.artifactVersion.Description) !== ctx_r0.artifact.Description ? 32 : -1);
387
414
  i0.ɵɵadvance();
388
- i0.ɵɵconditional(ctx_r0.activeTab === "details" ? 11 : -1);
415
+ i0.ɵɵconditional(ctx_r0.filteredAttributes.length > 0 ? 33 : -1);
389
416
  i0.ɵɵadvance();
390
- i0.ɵɵconditional(ctx_r0.activeTab === "links" ? 12 : -1);
417
+ i0.ɵɵstyleProp("display", ctx_r0.activeTab === "links" ? "block" : "none");
418
+ i0.ɵɵadvance();
419
+ i0.ɵɵconditional(ctx_r0.linksToShow.length > 0 ? 35 : 36);
420
+ i0.ɵɵadvance(2);
421
+ i0.ɵɵconditional(ctx_r0.activeTab !== "display" && ctx_r0.activeTab !== "details" && ctx_r0.activeTab !== "links" ? 37 : -1);
391
422
  } }
392
423
  export class ArtifactViewerPanelComponent {
424
+ notificationService;
425
+ sanitizer;
393
426
  artifactId;
394
427
  currentUser;
395
428
  environmentId;
@@ -414,7 +447,7 @@ export class ArtifactViewerPanelComponent {
414
447
  artifactCollections = [];
415
448
  primaryCollection = null;
416
449
  // Tabbed interface
417
- activeTab = 'display';
450
+ activeTab = 'display'; // Changed to string to support dynamic tabs
418
451
  displayMarkdown = null;
419
452
  displayHtml = null;
420
453
  versionAttributes = [];
@@ -423,9 +456,62 @@ export class ArtifactViewerPanelComponent {
423
456
  originConversation = null;
424
457
  allCollections = [];
425
458
  hasAccessToOriginConversation = false;
426
- // Cache plugin state to avoid losing it when switching tabs
427
- cachedPluginShouldShowRaw = false;
428
- cachedPluginIsElevated = false;
459
+ // Dynamic tabs from plugin
460
+ get allTabs() {
461
+ // Start with Display tab (cannot be removed)
462
+ const tabs = ['Display'];
463
+ // Get plugin tabs directly from plugin instance (no caching needed - plugin always exists)
464
+ if (this.pluginViewer?.pluginInstance?.GetAdditionalTabs) {
465
+ const pluginTabs = this.pluginViewer.pluginInstance.GetAdditionalTabs();
466
+ const pluginTabLabels = pluginTabs.map((t) => t.label);
467
+ tabs.push(...pluginTabLabels);
468
+ }
469
+ // Get tabs to remove from plugin (case-insensitive)
470
+ const removals = this.pluginViewer?.pluginInstance?.GetStandardTabRemovals?.() || [];
471
+ const removalsLower = removals.map(r => r.toLowerCase());
472
+ // Add standard tabs (unless plugin removed them)
473
+ if (!removalsLower.includes('json')) {
474
+ tabs.push('JSON');
475
+ }
476
+ if (!removalsLower.includes('details')) {
477
+ tabs.push('Details');
478
+ }
479
+ // Conditionally add Links tab if has links AND not removed by plugin
480
+ if (this.hasLinksTab && !removalsLower.includes('links')) {
481
+ tabs.push('Links');
482
+ }
483
+ return tabs;
484
+ }
485
+ GetTabContent(tabName) {
486
+ // Check if this is a plugin-provided tab (query directly from plugin - no cache needed)
487
+ if (this.pluginViewer?.pluginInstance?.GetAdditionalTabs) {
488
+ const pluginTabs = this.pluginViewer.pluginInstance.GetAdditionalTabs();
489
+ const pluginTab = pluginTabs.find((t) => t.label.toLowerCase() === tabName.toLowerCase());
490
+ if (pluginTab) {
491
+ const content = typeof pluginTab.content === 'function'
492
+ ? pluginTab.content()
493
+ : pluginTab.content;
494
+ return {
495
+ type: pluginTab.contentType,
496
+ content: content,
497
+ language: pluginTab.language
498
+ };
499
+ }
500
+ }
501
+ // Handle base tabs
502
+ switch (tabName.toLowerCase()) {
503
+ case 'json':
504
+ return { type: 'json', content: this.jsonContent, language: 'json' };
505
+ case 'details':
506
+ return { type: 'html', content: this.displayMarkdown || this.displayHtml || '' };
507
+ default:
508
+ return null;
509
+ }
510
+ }
511
+ constructor(notificationService, sanitizer) {
512
+ this.notificationService = notificationService;
513
+ this.sanitizer = sanitizer;
514
+ }
429
515
  async ngOnInit() {
430
516
  // Subscribe to refresh trigger for dynamic version changes
431
517
  if (this.refreshTrigger) {
@@ -456,7 +542,7 @@ export class ArtifactViewerPanelComponent {
456
542
  // Just switch to the version we already have
457
543
  this.artifactVersion = targetVersion;
458
544
  this.selectedVersionNumber = targetVersion.VersionNumber || 1;
459
- this.jsonContent = targetVersion.Content || '{}';
545
+ this.jsonContent = this.FormatJSON(targetVersion.Content || '{}');
460
546
  console.log(`📦 Switched to cached version ${this.selectedVersionNumber}`);
461
547
  // Load version attributes
462
548
  await this.loadVersionAttributes();
@@ -476,9 +562,6 @@ export class ArtifactViewerPanelComponent {
476
562
  try {
477
563
  this.isLoading = true;
478
564
  this.error = null;
479
- // Reset cached plugin state when loading new artifact
480
- this.cachedPluginShouldShowRaw = false;
481
- this.cachedPluginIsElevated = false;
482
565
  const md = new Metadata();
483
566
  // Load artifact
484
567
  this.artifact = await md.GetEntityObject('MJ: Artifacts', this.currentUser);
@@ -506,21 +589,21 @@ export class ArtifactViewerPanelComponent {
506
589
  console.log(`📦 Loading specified version ${targetVersionNumber}`);
507
590
  this.artifactVersion = targetVersion;
508
591
  this.selectedVersionNumber = targetVersion.VersionNumber || 1;
509
- this.jsonContent = targetVersion.Content || '{}';
592
+ this.jsonContent = this.FormatJSON(targetVersion.Content || '{}');
510
593
  }
511
594
  else {
512
595
  console.warn(`📦 Version ${targetVersionNumber} not found, defaulting to latest`);
513
596
  // Target version not found, default to latest
514
597
  this.artifactVersion = result.Results[0];
515
598
  this.selectedVersionNumber = this.artifactVersion.VersionNumber || 1;
516
- this.jsonContent = this.artifactVersion.Content || '{}';
599
+ this.jsonContent = this.FormatJSON(this.artifactVersion.Content || '{}');
517
600
  }
518
601
  }
519
602
  else {
520
603
  // No target version, default to latest version (first in DESC order)
521
604
  this.artifactVersion = result.Results[0];
522
605
  this.selectedVersionNumber = this.artifactVersion.VersionNumber || 1;
523
- this.jsonContent = this.artifactVersion.Content || '{}';
606
+ this.jsonContent = this.FormatJSON(this.artifactVersion.Content || '{}');
524
607
  }
525
608
  // Load version attributes
526
609
  await this.loadVersionAttributes();
@@ -624,16 +707,9 @@ export class ArtifactViewerPanelComponent {
624
707
  return !!this.artifactTypeDriverClass;
625
708
  }
626
709
  get hasJsonTab() {
627
- // Try to get fresh plugin state if plugin viewer is available
710
+ // Query plugin directly (no cache needed - plugin always exists when it should)
628
711
  const pluginInstance = this.pluginViewer?.pluginInstance;
629
- if (pluginInstance) {
630
- // Update cache with current values
631
- this.cachedPluginShouldShowRaw = pluginInstance.parentShouldShowRawContent;
632
- this.cachedPluginIsElevated = pluginInstance.isShowingElevatedDisplay;
633
- }
634
- // Use cached value (or current value if plugin is available)
635
- // This ensures the JSON tab doesn't disappear when switching to it
636
- return this.cachedPluginShouldShowRaw;
712
+ return pluginInstance?.parentShouldShowRawContent || false;
637
713
  }
638
714
  get artifactTypeName() {
639
715
  return this.artifact?.Type || '';
@@ -783,11 +859,10 @@ export class ArtifactViewerPanelComponent {
783
859
  async selectVersion(version) {
784
860
  this.artifactVersion = version;
785
861
  this.selectedVersionNumber = version.VersionNumber || 1;
786
- this.jsonContent = version.Content || '{}';
862
+ this.jsonContent = this.FormatJSON(version.Content || '{}');
787
863
  this.showVersionDropdown = false;
788
864
  // Load attributes for the selected version
789
865
  await this.loadVersionAttributes();
790
- console.log(`📦 Switched to version ${this.selectedVersionNumber}`);
791
866
  }
792
867
  async onSaveToLibrary() {
793
868
  // Always show the collection picker modal
@@ -1031,13 +1106,86 @@ export class ArtifactViewerPanelComponent {
1031
1106
  return null;
1032
1107
  }
1033
1108
  }
1034
- static ɵfac = function ArtifactViewerPanelComponent_Factory(t) { return new (t || ArtifactViewerPanelComponent)(); };
1109
+ /**
1110
+ * Format JSON content using ParseJSONRecursive for deep parsing and formatting
1111
+ */
1112
+ FormatJSON(content) {
1113
+ try {
1114
+ // First parse the JSON string to an object
1115
+ const obj = JSON.parse(content);
1116
+ // Then use ParseJSONRecursive to extract any inline JSON strings
1117
+ const parseOptions = {
1118
+ extractInlineJson: true,
1119
+ maxDepth: 100,
1120
+ debug: false
1121
+ };
1122
+ const parsed = ParseJSONRecursive(obj, parseOptions);
1123
+ // Finally stringify with formatting
1124
+ return JSON.stringify(parsed, null, 2);
1125
+ }
1126
+ catch (e) {
1127
+ // Fallback to simple parse/stringify if ParseJSONRecursive fails
1128
+ try {
1129
+ const obj = JSON.parse(content);
1130
+ return JSON.stringify(obj, null, 2);
1131
+ }
1132
+ catch (e2) {
1133
+ // If even simple parse fails, return as-is
1134
+ return content;
1135
+ }
1136
+ }
1137
+ }
1138
+ /**
1139
+ * Get icon class for a tab
1140
+ */
1141
+ GetTabIcon(tabName) {
1142
+ // Base tabs
1143
+ const baseIcons = {
1144
+ 'Display': 'fas fa-eye',
1145
+ 'Code': 'fas fa-code',
1146
+ 'JSON': 'fas fa-file-code',
1147
+ 'Details': 'fas fa-info-circle',
1148
+ 'Links': 'fas fa-link'
1149
+ };
1150
+ if (baseIcons[tabName]) {
1151
+ return baseIcons[tabName];
1152
+ }
1153
+ // Check plugin tabs
1154
+ const plugin = this.pluginViewer?.pluginInstance;
1155
+ if (plugin?.GetAdditionalTabs) {
1156
+ const pluginTab = plugin.GetAdditionalTabs().find((t) => t.label === tabName);
1157
+ if (pluginTab?.icon) {
1158
+ return 'fas ' + pluginTab.icon; // Ensure full Font Awesome class
1159
+ }
1160
+ }
1161
+ return null;
1162
+ }
1163
+ /**
1164
+ * Render markdown to HTML (for markdown tabs)
1165
+ */
1166
+ RenderMarkdown(markdown) {
1167
+ try {
1168
+ const html = marked.parse(markdown);
1169
+ return this.sanitizer.sanitize(SecurityContext.HTML, html) || '';
1170
+ }
1171
+ catch (e) {
1172
+ console.error('Failed to render markdown:', e);
1173
+ return markdown;
1174
+ }
1175
+ }
1176
+ /**
1177
+ * Set active tab
1178
+ */
1179
+ SetActiveTab(tabName) {
1180
+ this.activeTab = tabName.toLowerCase();
1181
+ }
1182
+ static ɵfac = function ArtifactViewerPanelComponent_Factory(t) { return new (t || ArtifactViewerPanelComponent)(i0.ɵɵdirectiveInject(i1.MJNotificationService), i0.ɵɵdirectiveInject(i2.DomSanitizer)); };
1035
1183
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactViewerPanelComponent, selectors: [["mj-artifact-viewer-panel"]], viewQuery: function ArtifactViewerPanelComponent_Query(rf, ctx) { if (rf & 1) {
1036
1184
  i0.ɵɵviewQuery(ArtifactTypePluginViewerComponent, 5);
1037
1185
  } if (rf & 2) {
1038
1186
  let _t;
1039
1187
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pluginViewer = _t.first);
1040
- } }, inputs: { artifactId: "artifactId", currentUser: "currentUser", environmentId: "environmentId", versionNumber: "versionNumber", showSaveToCollection: "showSaveToCollection", refreshTrigger: "refreshTrigger", viewContext: "viewContext", contextCollectionId: "contextCollectionId" }, outputs: { closed: "closed", saveToCollectionRequested: "saveToCollectionRequested", navigateToLink: "navigateToLink" }, features: [i0.ɵɵNgOnChangesFeature], decls: 21, vars: 11, consts: [[1, "artifact-viewer-panel"], [1, "panel-header"], [1, "panel-header-left"], [1, "fas", "fa-cube"], [1, "header-description"], [1, "panel-header-right"], [1, "version-selector", 3, "click"], [1, "fas", "fa-history"], [1, "version-label"], [1, "fas", "fa-chevron-down", "dropdown-icon", 3, "open"], [1, "version-dropdown"], ["title", "Save to Collection", 1, "save-to-collection-btn"], ["title", "Close", 1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "panel-content"], [1, "loading-state"], [1, "error-state"], [1, "artifact-content-wrapper"], [1, "fas", "fa-chevron-down", "dropdown-icon"], [1, "version-dropdown", 3, "click"], [1, "version-option", 3, "selected"], [1, "version-option", 3, "click"], [1, "version-number"], [1, "version-date"], [1, "fas", "fa-check"], ["title", "Save to Collection", 1, "save-to-collection-btn", 3, "click"], [1, "far", "fa-bookmark"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "tab-navigation"], [1, "tab-btn", 3, "active"], [1, "tab-btn", 3, "click"], [1, "fas", "fa-info-circle"], [1, "tab-content"], [1, "display-content"], [1, "json-viewer"], [1, "details-content"], [1, "links-container"], [1, "fas", "fa-eye"], [1, "fas", "fa-code"], [1, "fas", "fa-link"], [3, "artifactVersion", "artifactTypeName", "contentType", "readonly"], [1, "display-toolbar"], ["title", "Print", 1, "btn-icon", 3, "click"], [1, "fas", "fa-print"], ["title", "Copy Content", 1, "btn-icon", 3, "click"], [1, "fas", "fa-copy"], [1, "markdown-content"], [1, "html-content", 3, "innerHTML"], [3, "data"], [1, "json-toolbar"], ["title", "Copy JSON", 1, "btn-icon", 3, "click"], [1, "json-editor-container"], [2, "width", "100%", "height", "100%", 3, "ngModelChange", "ngModel", "language", "readonly"], [1, "artifact-meta"], [1, "meta-item"], [1, "meta-item", "full-width"], [1, "attributes-section"], [1, "attributes-list"], [1, "attribute-item"], [1, "attribute-empty-pill"], [1, "links-section"], [1, "empty-state"], [1, "link-item"], [1, "link-icon"], [1, "fas", "fa-comments"], [1, "fas", "fa-folder"], [1, "link-content"], [1, "link-name"], [1, "link-type"], [1, "link-actions"], [1, "link-action-btn", 3, "click", "disabled", "title"], [1, "fas", "fa-arrow-right"]], template: function ArtifactViewerPanelComponent_Template(rf, ctx) { if (rf & 1) {
1188
+ } }, inputs: { artifactId: "artifactId", currentUser: "currentUser", environmentId: "environmentId", versionNumber: "versionNumber", showSaveToCollection: "showSaveToCollection", refreshTrigger: "refreshTrigger", viewContext: "viewContext", contextCollectionId: "contextCollectionId" }, outputs: { closed: "closed", saveToCollectionRequested: "saveToCollectionRequested", navigateToLink: "navigateToLink" }, features: [i0.ɵɵNgOnChangesFeature], decls: 21, vars: 11, consts: [[1, "artifact-viewer-panel"], [1, "panel-header"], [1, "panel-header-left"], [1, "fas", "fa-cube"], [1, "header-description"], [1, "panel-header-right"], [1, "version-selector", 3, "click"], [1, "fas", "fa-history"], [1, "version-label"], [1, "fas", "fa-chevron-down", "dropdown-icon", 3, "open"], [1, "version-dropdown"], ["title", "Save to Collection", 1, "save-to-collection-btn"], ["title", "Close", 1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "panel-content"], [1, "loading-state"], [1, "error-state"], [1, "artifact-content-wrapper"], [1, "fas", "fa-chevron-down", "dropdown-icon"], [1, "version-dropdown", 3, "click"], [1, "version-option", 3, "selected"], [1, "version-option", 3, "click"], [1, "version-number"], [1, "version-date"], [1, "fas", "fa-check"], ["title", "Save to Collection", 1, "save-to-collection-btn", 3, "click"], [1, "far", "fa-bookmark"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "tab-navigation"], [1, "tab-btn", 3, "active"], [1, "tab-content"], [1, "plugin-container", 3, "display"], [1, "display-content"], [1, "details-content"], [1, "artifact-meta"], [1, "meta-item"], [1, "meta-item", "full-width"], [1, "attributes-section"], [1, "links-container"], [1, "links-section"], [1, "empty-state"], [1, "tab-btn", 3, "click"], [3, "class"], [1, "plugin-container"], [3, "artifactVersion", "artifactTypeName", "contentType", "readonly"], [1, "display-toolbar"], ["title", "Print", 1, "btn-icon", 3, "click"], [1, "fas", "fa-print"], ["title", "Copy Content", 1, "btn-icon", 3, "click"], [1, "fas", "fa-copy"], [1, "markdown-content"], [1, "html-content", 3, "innerHTML"], [3, "data"], [1, "attributes-list"], [1, "attribute-item"], [1, "attribute-empty-pill"], [1, "link-item"], [1, "link-icon"], [1, "fas", "fa-comments"], [1, "fas", "fa-folder"], [1, "link-content"], [1, "link-name"], [1, "link-type"], [1, "link-actions"], [1, "link-action-btn", 3, "click", "disabled", "title"], [1, "fas", "fa-arrow-right"], [1, "fas", "fa-link"], [1, "dynamic-tab-content"], [1, "markdown-viewer", 3, "innerHTML"], [1, "json-viewer"], [1, "code-viewer"], [1, "html-viewer", 3, "innerHTML"], [1, "plaintext-viewer"], [1, "json-toolbar"], ["title", "Copy JSON", 1, "btn-icon", 3, "click"], [1, "json-editor-container"], [2, "width", "100%", "height", "100%", 3, "value", "language", "readonly", "lineWrapping"], [1, "code-toolbar"], ["title", "Copy Code", 1, "btn-icon", 3, "click"], [1, "code-editor-container"]], template: function ArtifactViewerPanelComponent_Template(rf, ctx) { if (rf & 1) {
1041
1189
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h3");
1042
1190
  i0.ɵɵelement(4, "i", 3);
1043
1191
  i0.ɵɵtext(5);
@@ -1058,7 +1206,7 @@ export class ArtifactViewerPanelComponent {
1058
1206
  i0.ɵɵelement(16, "i", 13);
1059
1207
  i0.ɵɵelementEnd()()();
1060
1208
  i0.ɵɵelementStart(17, "div", 14);
1061
- i0.ɵɵtemplate(18, ArtifactViewerPanelComponent_Conditional_18_Template, 4, 0, "div", 15)(19, ArtifactViewerPanelComponent_Conditional_19_Template, 4, 1, "div", 16)(20, ArtifactViewerPanelComponent_Conditional_20_Template, 13, 9, "div", 17);
1209
+ i0.ɵɵtemplate(18, ArtifactViewerPanelComponent_Conditional_18_Template, 4, 0, "div", 15)(19, ArtifactViewerPanelComponent_Conditional_19_Template, 4, 1, "div", 16)(20, ArtifactViewerPanelComponent_Conditional_20_Template, 38, 21, "div", 17);
1062
1210
  i0.ɵɵelementEnd()();
1063
1211
  } if (rf & 2) {
1064
1212
  i0.ɵɵadvance(5);
@@ -1081,12 +1229,12 @@ export class ArtifactViewerPanelComponent {
1081
1229
  i0.ɵɵconditional(ctx.error ? 19 : -1);
1082
1230
  i0.ɵɵadvance();
1083
1231
  i0.ɵɵconditional(!ctx.isLoading && !ctx.error && ctx.artifact ? 20 : -1);
1084
- } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.MarkdownComponent, i3.CodeEditorComponent, i4.ArtifactTypePluginViewerComponent, i5.DatePipe], styles: [".artifact-viewer-panel[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n background: white;\n border-left: 1px solid #E5E7EB;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.panel-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n background: white;\n flex-shrink: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.panel-header-left[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n margin-right: 16px;\n}\n\n.panel-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6366F1;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.header-description[_ngcontent-%COMP%] {\n margin: 4px 0 0 0;\n font-size: 12px;\n color: #6B7280;\n font-weight: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n}\n\n.version-selector[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F3F4F6;\n border-radius: 12px;\n font-size: 12px;\n color: #6B7280;\n font-weight: 500;\n transition: all 0.2s;\n}\n\n.version-selector.clickable[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n.version-selector.clickable[_ngcontent-%COMP%]:hover {\n background: #E5E7EB;\n}\n\n.version-selector[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}\n\n.version-selector[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%] {\n margin-left: 2px;\n transition: transform 0.2s;\n}\n\n.version-selector[_ngcontent-%COMP%] .dropdown-icon.open[_ngcontent-%COMP%] {\n transform: rotate(180deg);\n}\n\n.version-label[_ngcontent-%COMP%] {\n font-family: monospace;\n}\n\n.version-dropdown[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.version-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 13px;\n}\n\n.version-option[_ngcontent-%COMP%]:hover {\n background: #F9FAFB;\n}\n\n.version-option.selected[_ngcontent-%COMP%] {\n background: #EEF2FF;\n color: #4F46E5;\n}\n\n.version-option[_ngcontent-%COMP%] .version-number[_ngcontent-%COMP%] {\n font-family: monospace;\n font-weight: 600;\n min-width: 35px;\n}\n\n.version-option[_ngcontent-%COMP%] .version-date[_ngcontent-%COMP%] {\n flex: 1;\n color: #6B7280;\n font-size: 12px;\n}\n\n.version-option[_ngcontent-%COMP%] i.fa-check[_ngcontent-%COMP%] {\n color: #10B981;\n margin-left: auto;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n color: #9CA3AF;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #6B7280;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.close-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.close-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #111827;\n}\n\n.close-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.panel-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.artifact-content-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.loading-state[_ngcontent-%COMP%], \n.error-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n color: #6B7280;\n}\n\n.error-state[_ngcontent-%COMP%] {\n color: #DC2626;\n}\n\n.loading-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n}\n\n.artifact-meta[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 16px;\n margin-bottom: 16px;\n padding: 16px;\n background: #F9FAFB;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 500;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #111827;\n}\n\n.artifact-description[_ngcontent-%COMP%] {\n padding: 12px;\n margin-bottom: 16px;\n background: #EFF6FF;\n border-left: 3px solid #3B82F6;\n border-radius: 4px;\n color: #1E40AF;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n.json-viewer[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-editor-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n color: #374151;\n font-size: 14px;\n transition: all 0.2s;\n}\n\n.btn-icon[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n border-color: #9CA3AF;\n}\n\n.btn-icon.btn-primary[_ngcontent-%COMP%] {\n background: #4F46E5;\n border-color: #4F46E5;\n color: white;\n}\n\n.btn-icon.btn-primary[_ngcontent-%COMP%]:hover {\n background: #4338CA;\n border-color: #4338CA;\n}\n\n.btn-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n\n\n.modal-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.modal-content[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 90%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n\n.modal-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n\n.modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #F59E0B;\n}\n\n.modal-body[_ngcontent-%COMP%] {\n padding: 20px;\n overflow-y: auto;\n}\n\n.modal-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n}\n\n.form-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-section[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: #374151;\n}\n\n.form-select[_ngcontent-%COMP%], \n.form-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 14px;\n color: #111827;\n background: white;\n transition: border-color 0.2s;\n}\n\n.form-select[_ngcontent-%COMP%]:focus, \n.form-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #4F46E5;\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n}\n\n.divider[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n margin: 24px 0;\n color: #9CA3AF;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.divider[_ngcontent-%COMP%]::before, \n.divider[_ngcontent-%COMP%]::after {\n content: '';\n flex: 1;\n height: 1px;\n background: #E5E7EB;\n}\n\n.divider[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n padding: 0 12px;\n}\n\n.create-collection-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n\n.create-collection-row[_ngcontent-%COMP%] .form-input[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n}\n\n.btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background: #4F46E5;\n color: white;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #4338CA;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #D1D5DB;\n color: #374151;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #F3F4F6;\n}\n\n\n\n.tab-navigation[_ngcontent-%COMP%] {\n display: flex;\n gap: 0;\n border-bottom: 2px solid #E5E7EB;\n padding: 0 16px;\n background: white;\n}\n\n.tab-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 12px 20px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n margin-bottom: -2px;\n color: #6B7280;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 150ms ease;\n}\n\n.tab-btn[_ngcontent-%COMP%]:hover {\n color: #1e40af;\n background: #F9FAFB;\n}\n\n.tab-btn.active[_ngcontent-%COMP%] {\n color: #1e40af;\n border-bottom-color: #1e40af;\n}\n\n.tab-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n\n\n.tab-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n width: 100%;\n box-sizing: border-box;\n margin-bottom: 5px;\n min-width: 0;\n}\n\n.display-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n min-height: 0;\n min-width: 0;\n}\n\n.display-toolbar[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 8px;\n z-index: 10;\n}\n\n.markdown-content[_ngcontent-%COMP%], \n.html-content[_ngcontent-%COMP%] {\n flex: 1;\n font-size: 14px;\n line-height: 1.6;\n width: 100%;\n padding: 20px 10px 5px 20px; \n\n box-sizing: border-box;\n overflow: auto;\n min-height: 0;\n}\n\n.details-content[_ngcontent-%COMP%] {\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n}\n\n.details-content[_ngcontent-%COMP%] .artifact-meta[_ngcontent-%COMP%] {\n margin-bottom: 0;\n padding: 20px;\n}\n\n.details-content[_ngcontent-%COMP%] .meta-item.full-width[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.attributes-section[_ngcontent-%COMP%] {\n margin-top: 24px;\n padding: 24px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.attributes-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0 0 16px 0;\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.attributes-list[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 16px;\n}\n\n.attribute-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n}\n\n.attribute-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.attribute-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #111827;\n word-break: break-word;\n}\n\n.attribute-empty-pill[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 8px;\n background: #F3F4F6;\n color: #9CA3AF;\n font-size: 11px;\n font-weight: 500;\n border-radius: 4px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.links-container[_ngcontent-%COMP%] {\n padding: 20px;\n}\n\n.links-section[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.link-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: all 0.15s;\n}\n\n.link-item[_ngcontent-%COMP%]:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.link-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.link-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #1e40af;\n}\n\n.link-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.link-name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 500;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.link-type[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n}\n\n.link-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n\n.link-action-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n color: #1e40af;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.link-action-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #EFF6FF;\n border-color: #1e40af;\n}\n\n.link-action-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n color: #9CA3AF;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n color: #9CA3AF;\n text-align: center;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n}"] });
1232
+ } }, dependencies: [i3.MarkdownComponent, i4.CodeEditorComponent, i5.ArtifactTypePluginViewerComponent, i6.DatePipe], styles: [".artifact-viewer-panel[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n background: white;\n border-left: 1px solid #E5E7EB;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.panel-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n background: white;\n flex-shrink: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.panel-header-left[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n margin-right: 16px;\n}\n\n.panel-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6366F1;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.header-description[_ngcontent-%COMP%] {\n margin: 4px 0 0 0;\n font-size: 12px;\n color: #6B7280;\n font-weight: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n}\n\n.version-selector[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F3F4F6;\n border-radius: 12px;\n font-size: 12px;\n color: #6B7280;\n font-weight: 500;\n transition: all 0.2s;\n}\n\n.version-selector.clickable[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n.version-selector.clickable[_ngcontent-%COMP%]:hover {\n background: #E5E7EB;\n}\n\n.version-selector[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}\n\n.version-selector[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%] {\n margin-left: 2px;\n transition: transform 0.2s;\n}\n\n.version-selector[_ngcontent-%COMP%] .dropdown-icon.open[_ngcontent-%COMP%] {\n transform: rotate(180deg);\n}\n\n.version-label[_ngcontent-%COMP%] {\n font-family: monospace;\n}\n\n.version-dropdown[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.version-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 13px;\n}\n\n.version-option[_ngcontent-%COMP%]:hover {\n background: #F9FAFB;\n}\n\n.version-option.selected[_ngcontent-%COMP%] {\n background: #EEF2FF;\n color: #4F46E5;\n}\n\n.version-option[_ngcontent-%COMP%] .version-number[_ngcontent-%COMP%] {\n font-family: monospace;\n font-weight: 600;\n min-width: 35px;\n}\n\n.version-option[_ngcontent-%COMP%] .version-date[_ngcontent-%COMP%] {\n flex: 1;\n color: #6B7280;\n font-size: 12px;\n}\n\n.version-option[_ngcontent-%COMP%] i.fa-check[_ngcontent-%COMP%] {\n color: #10B981;\n margin-left: auto;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n color: #9CA3AF;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #6B7280;\n}\n\n.save-to-collection-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.close-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.close-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #111827;\n}\n\n.close-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.panel-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.artifact-content-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.loading-state[_ngcontent-%COMP%], \n.error-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n color: #6B7280;\n}\n\n.error-state[_ngcontent-%COMP%] {\n color: #DC2626;\n}\n\n.loading-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n}\n\n.artifact-meta[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 16px;\n margin-bottom: 16px;\n padding: 16px;\n background: #F9FAFB;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 500;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #111827;\n}\n\n.artifact-description[_ngcontent-%COMP%] {\n padding: 12px;\n margin-bottom: 16px;\n background: #EFF6FF;\n border-left: 3px solid #3B82F6;\n border-radius: 4px;\n color: #1E40AF;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n.json-viewer[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-editor-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.btn-icon[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n color: #374151;\n font-size: 14px;\n transition: all 0.2s;\n}\n\n.btn-icon[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n border-color: #9CA3AF;\n}\n\n.btn-icon.btn-primary[_ngcontent-%COMP%] {\n background: #4F46E5;\n border-color: #4F46E5;\n color: white;\n}\n\n.btn-icon.btn-primary[_ngcontent-%COMP%]:hover {\n background: #4338CA;\n border-color: #4338CA;\n}\n\n.btn-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n\n\n.modal-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.modal-content[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 90%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n\n.modal-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n\n.modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #F59E0B;\n}\n\n.modal-body[_ngcontent-%COMP%] {\n padding: 20px;\n overflow-y: auto;\n}\n\n.modal-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n}\n\n.form-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-section[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: #374151;\n}\n\n.form-select[_ngcontent-%COMP%], \n.form-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 14px;\n color: #111827;\n background: white;\n transition: border-color 0.2s;\n}\n\n.form-select[_ngcontent-%COMP%]:focus, \n.form-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #4F46E5;\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n}\n\n.divider[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n margin: 24px 0;\n color: #9CA3AF;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.divider[_ngcontent-%COMP%]::before, \n.divider[_ngcontent-%COMP%]::after {\n content: '';\n flex: 1;\n height: 1px;\n background: #E5E7EB;\n}\n\n.divider[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n padding: 0 12px;\n}\n\n.create-collection-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n\n.create-collection-row[_ngcontent-%COMP%] .form-input[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n}\n\n.btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background: #4F46E5;\n color: white;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #4338CA;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #D1D5DB;\n color: #374151;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #F3F4F6;\n}\n\n\n\n.tab-navigation[_ngcontent-%COMP%] {\n display: flex;\n gap: 0;\n border-bottom: 2px solid #E5E7EB;\n padding: 0 16px;\n background: white;\n}\n\n.tab-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 12px 20px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n margin-bottom: -2px;\n color: #6B7280;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 150ms ease;\n}\n\n.tab-btn[_ngcontent-%COMP%]:hover {\n color: #1e40af;\n background: #F9FAFB;\n}\n\n.tab-btn.active[_ngcontent-%COMP%] {\n color: #1e40af;\n border-bottom-color: #1e40af;\n}\n\n.tab-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n\n\n.tab-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n width: 100%;\n box-sizing: border-box;\n margin-bottom: 5px;\n min-width: 0;\n}\n\n.display-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n min-height: 0;\n min-width: 0;\n padding: 7px;\n}\n\n.display-toolbar[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 8px;\n z-index: 10;\n}\n\n.markdown-content[_ngcontent-%COMP%], \n.html-content[_ngcontent-%COMP%] {\n flex: 1;\n font-size: 14px;\n line-height: 1.6;\n width: 100%;\n padding: 20px 10px 5px 20px; \n\n box-sizing: border-box;\n overflow: auto;\n min-height: 0;\n}\n\n.details-content[_ngcontent-%COMP%] {\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n}\n\n.details-content[_ngcontent-%COMP%] .artifact-meta[_ngcontent-%COMP%] {\n margin-bottom: 0;\n padding: 20px;\n}\n\n.details-content[_ngcontent-%COMP%] .meta-item.full-width[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.attributes-section[_ngcontent-%COMP%] {\n margin-top: 24px;\n padding: 24px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.attributes-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0 0 16px 0;\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.attributes-list[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 16px;\n}\n\n.attribute-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n}\n\n.attribute-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.attribute-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #111827;\n word-break: break-word;\n}\n\n.attribute-empty-pill[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 8px;\n background: #F3F4F6;\n color: #9CA3AF;\n font-size: 11px;\n font-weight: 500;\n border-radius: 4px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.links-container[_ngcontent-%COMP%] {\n padding: 20px;\n}\n\n.links-section[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.link-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: all 0.15s;\n}\n\n.link-item[_ngcontent-%COMP%]:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.link-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.link-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #1e40af;\n}\n\n.link-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.link-name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 500;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.link-type[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n}\n\n.link-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n\n.link-action-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n color: #1e40af;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.link-action-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #EFF6FF;\n border-color: #1e40af;\n}\n\n.link-action-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n color: #9CA3AF;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n color: #9CA3AF;\n text-align: center;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.links-container[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n}\n\n\n\n.dynamic-tab-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 16px;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 20px;\n background: white;\n line-height: 1.6;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .markdown-viewer[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .markdown-viewer[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin-top: 24px;\n margin-bottom: 12px;\n font-weight: 600;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] { font-size: 24px; }\n.markdown-viewer[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] { font-size: 20px; }\n.markdown-viewer[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] { font-size: 18px; }\n\n.markdown-viewer[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .markdown-viewer[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n padding-left: 24px;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n background: #f3f4f6;\n padding: 2px 6px;\n border-radius: 3px;\n font-family: 'Courier New', monospace;\n font-size: 13px;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] {\n background: #f3f4f6;\n padding: 12px;\n border-radius: 6px;\n overflow-x: auto;\n margin-bottom: 12px;\n}\n\n.markdown-viewer[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n background: none;\n padding: 0;\n}\n\n.code-viewer[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.code-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.code-editor-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.plaintext-viewer[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 12px;\n background: #f9fafb;\n font-family: 'Courier New', monospace;\n font-size: 13px;\n white-space: pre-wrap;\n}\n\n.html-viewer[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 20px;\n background: white;\n}"] });
1085
1233
  }
1086
1234
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArtifactViewerPanelComponent, [{
1087
1235
  type: Component,
1088
- args: [{ selector: 'mj-artifact-viewer-panel', template: "<div class=\"artifact-viewer-panel\">\n <div class=\"panel-header\">\n <div class=\"panel-header-left\">\n <h3>\n <i class=\"fas fa-cube\"></i>\n {{ displayName }}\n </h3>\n @if (displayDescription) {\n <p class=\"header-description\">{{ displayDescription }}</p>\n }\n </div>\n <div class=\"panel-header-right\">\n <div class=\"version-selector\" [class.clickable]=\"allVersions.length > 1\" (click)=\"toggleVersionDropdown()\">\n <i class=\"fas fa-history\"></i>\n <span class=\"version-label\">v{{ selectedVersionNumber }}</span>\n @if (allVersions.length > 1) {\n <i class=\"fas fa-chevron-down dropdown-icon\" [class.open]=\"showVersionDropdown\"></i>\n }\n @if (showVersionDropdown) {\n <div class=\"version-dropdown\" (click)=\"$event.stopPropagation()\">\n @for (version of allVersions; track version.ID) {\n <div class=\"version-option\"\n [class.selected]=\"version.VersionNumber === selectedVersionNumber\"\n (click)=\"selectVersion(version); $event.stopPropagation()\">\n <span class=\"version-number\">v{{ version.VersionNumber }}</span>\n <span class=\"version-date\">{{ version.__mj_CreatedAt | date:'short' }}</span>\n @if (version.VersionNumber === selectedVersionNumber) {\n <i class=\"fas fa-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n @if (showSaveToCollection) {\n <button class=\"save-to-collection-btn\"\n (click)=\"onSaveToLibrary()\"\n title=\"Save to Collection\">\n <i class=\"far fa-bookmark\"></i>\n </button>\n }\n <button class=\"close-btn\" (click)=\"onClose()\" title=\"Close\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"panel-content\">\n @if (isLoading) {\n <div class=\"loading-state\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading artifact...</span>\n </div>\n }\n\n @if (error) {\n <div class=\"error-state\">\n <i class=\"fas fa-exclamation-triangle\"></i>\n <span>{{ error }}</span>\n </div>\n }\n\n @if (!isLoading && !error && artifact) {\n <div class=\"artifact-content-wrapper\">\n <!-- Tab Navigation -->\n <div class=\"tab-navigation\">\n @if (hasDisplayTab) {\n <button class=\"tab-btn\" [class.active]=\"activeTab === 'display'\" (click)=\"setActiveTab('display')\">\n <i class=\"fas fa-eye\"></i> Display\n </button>\n }\n @if (hasJsonTab) {\n <button class=\"tab-btn\" [class.active]=\"activeTab === 'json'\" (click)=\"setActiveTab('json')\">\n <i class=\"fas fa-code\"></i> JSON\n </button>\n }\n <button class=\"tab-btn\" [class.active]=\"activeTab === 'details'\" (click)=\"setActiveTab('details')\">\n <i class=\"fas fa-info-circle\"></i> Details\n </button>\n @if (hasLinksTab) {\n <button class=\"tab-btn\" [class.active]=\"activeTab === 'links'\" (click)=\"setActiveTab('links')\">\n <i class=\"fas fa-link\"></i> Links\n </button>\n }\n </div>\n\n <!-- Tab Content -->\n <div class=\"tab-content\">\n <!-- Display Tab (uses plugin system OR extracted attributes) -->\n @if (activeTab === 'display' && hasDisplayTab) {\n <div class=\"display-content\">\n @if (hasPlugin && artifactVersion && artifactTypeName) {\n <!-- Use plugin viewer if available -->\n <mj-artifact-type-plugin-viewer\n [artifactVersion]=\"artifactVersion\"\n [artifactTypeName]=\"artifactTypeName\"\n [contentType]=\"contentType\"\n [readonly]=\"true\">\n </mj-artifact-type-plugin-viewer>\n } @else if (displayMarkdown || displayHtml) {\n <!-- Fallback to extracted markdown/HTML attributes -->\n <div class=\"display-toolbar\">\n <button class=\"btn-icon\" title=\"Print\" (click)=\"onPrintDisplayContent()\">\n <i class=\"fas fa-print\"></i> Print\n </button>\n <button class=\"btn-icon\" title=\"Copy Content\" (click)=\"onCopyDisplayContent()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n @if (displayMarkdown) {\n <div class=\"markdown-content\">\n <markdown [data]=\"displayMarkdown\"></markdown>\n </div>\n } @else if (displayHtml) {\n <div class=\"html-content\" [innerHTML]=\"displayHtml\"></div>\n }\n }\n </div>\n }\n\n <!-- JSON Tab (only shown for elevated displays with JSON content) -->\n @if (activeTab === 'json' && hasJsonTab) {\n <div class=\"json-viewer\">\n <div class=\"json-toolbar\">\n <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"onCopyToClipboard()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n <div class=\"json-editor-container\">\n <mj-code-editor\n [(ngModel)]=\"jsonContent\"\n [language]=\"'json'\"\n [readonly]=\"true\"\n style=\"width: 100%; height: 100%;\">\n </mj-code-editor>\n </div>\n </div>\n }\n\n <!-- Details Tab -->\n @if (activeTab === 'details') {\n <div class=\"details-content\">\n <div class=\"artifact-meta\">\n <div class=\"meta-item\">\n <label>Type</label>\n <span>{{ artifact.Type }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Version</label>\n <span>{{ artifactVersion?.VersionNumber || 1 }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Created</label>\n <span>{{ artifact.__mj_CreatedAt | date:'short' }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Updated</label>\n <span>{{ artifactVersion?.__mj_UpdatedAt | date:'short' }}</span>\n </div>\n @if (artifact.Description) {\n <div class=\"meta-item full-width\">\n <label>Artifact Description</label>\n <span>{{ artifact.Description }}</span>\n </div>\n }\n @if (artifactVersion?.Description && artifact.Description && artifactVersion?.Description !== artifact.Description) {\n <div class=\"meta-item full-width\">\n <label>Version Description</label>\n <span>{{ artifactVersion?.Description }}</span>\n </div>\n }\n </div>\n\n <!-- Version Attributes -->\n @if (filteredAttributes.length > 0) {\n <div class=\"attributes-section\">\n <h4>Version Attributes</h4>\n <div class=\"attributes-list\">\n @for (attr of filteredAttributes; track attr.ID) {\n <div class=\"attribute-item\">\n <label>{{ attr.Name }}</label>\n @if (attr.Value) {\n <span>{{ attr.Value }}</span>\n } @else {\n <span class=\"attribute-empty-pill\">Empty</span>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Links Tab -->\n @if (activeTab === 'links') {\n <div class=\"links-container\">\n @if (linksToShow.length > 0) {\n <div class=\"links-section\">\n @for (link of linksToShow; track link.id) {\n <div class=\"link-item\">\n <div class=\"link-icon\">\n @if (link.type === 'conversation') {\n <i class=\"fas fa-comments\"></i>\n } @else {\n <i class=\"fas fa-folder\"></i>\n }\n </div>\n <div class=\"link-content\">\n <div class=\"link-name\">{{ link.name }}</div>\n <div class=\"link-type\">{{ link.type === 'conversation' ? 'Conversation' : 'Collection' }}</div>\n </div>\n <div class=\"link-actions\">\n <button\n class=\"link-action-btn\"\n [disabled]=\"!link.hasAccess\"\n [title]=\"link.hasAccess ? 'Open' : 'No access'\"\n (click)=\"onNavigateToLink(link)\">\n <i class=\"fas fa-arrow-right\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <i class=\"fas fa-link\"></i>\n <p>No links available</p>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n</div>\n\n", styles: [".artifact-viewer-panel {\n width: 100%;\n height: 100%;\n background: white;\n border-left: 1px solid #E5E7EB;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n background: white;\n flex-shrink: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.panel-header-left {\n flex: 1;\n min-width: 0;\n margin-right: 16px;\n}\n\n.panel-header h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header h3 i {\n color: #6366F1;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.header-description {\n margin: 4px 0 0 0;\n font-size: 12px;\n color: #6B7280;\n font-weight: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header-right {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n}\n\n.version-selector {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F3F4F6;\n border-radius: 12px;\n font-size: 12px;\n color: #6B7280;\n font-weight: 500;\n transition: all 0.2s;\n}\n\n.version-selector.clickable {\n cursor: pointer;\n}\n\n.version-selector.clickable:hover {\n background: #E5E7EB;\n}\n\n.version-selector i {\n font-size: 11px;\n}\n\n.version-selector .dropdown-icon {\n margin-left: 2px;\n transition: transform 0.2s;\n}\n\n.version-selector .dropdown-icon.open {\n transform: rotate(180deg);\n}\n\n.version-label {\n font-family: monospace;\n}\n\n.version-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.version-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 13px;\n}\n\n.version-option:hover {\n background: #F9FAFB;\n}\n\n.version-option.selected {\n background: #EEF2FF;\n color: #4F46E5;\n}\n\n.version-option .version-number {\n font-family: monospace;\n font-weight: 600;\n min-width: 35px;\n}\n\n.version-option .version-date {\n flex: 1;\n color: #6B7280;\n font-size: 12px;\n}\n\n.version-option i.fa-check {\n color: #10B981;\n margin-left: auto;\n}\n\n.save-to-collection-btn {\n background: none;\n border: none;\n cursor: pointer;\n color: #9CA3AF;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.save-to-collection-btn:hover {\n background: #F3F4F6;\n color: #6B7280;\n}\n\n.save-to-collection-btn i {\n font-size: 14px;\n}\n\n.close-btn {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.close-btn:hover {\n background: #F3F4F6;\n color: #111827;\n}\n\n.close-btn i {\n font-size: 14px;\n}\n\n.panel-content {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.artifact-content-wrapper {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.loading-state,\n.error-state {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n color: #6B7280;\n}\n\n.error-state {\n color: #DC2626;\n}\n\n.loading-state i {\n font-size: 24px;\n}\n\n.artifact-meta {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 16px;\n margin-bottom: 16px;\n padding: 16px;\n background: #F9FAFB;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.meta-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-item label {\n font-size: 12px;\n font-weight: 500;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-item span {\n font-size: 14px;\n color: #111827;\n}\n\n.artifact-description {\n padding: 12px;\n margin-bottom: 16px;\n background: #EFF6FF;\n border-left: 3px solid #3B82F6;\n border-radius: 4px;\n color: #1E40AF;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n.json-viewer {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-editor-container {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-toolbar {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.btn-icon {\n display: flex;\n align-items: center;\n gap: 6px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n color: #374151;\n font-size: 14px;\n transition: all 0.2s;\n}\n\n.btn-icon:hover {\n background: #F3F4F6;\n border-color: #9CA3AF;\n}\n\n.btn-icon.btn-primary {\n background: #4F46E5;\n border-color: #4F46E5;\n color: white;\n}\n\n.btn-icon.btn-primary:hover {\n background: #4338CA;\n border-color: #4338CA;\n}\n\n.btn-icon i {\n font-size: 14px;\n}\n\n/* Library Dialog Styles */\n.modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.modal-content {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 90%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n\n.modal-header h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.modal-header h3 i {\n color: #F59E0B;\n}\n\n.modal-body {\n padding: 20px;\n overflow-y: auto;\n}\n\n.modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n}\n\n.form-section {\n margin-bottom: 20px;\n}\n\n.form-section label {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: #374151;\n}\n\n.form-select,\n.form-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 14px;\n color: #111827;\n background: white;\n transition: border-color 0.2s;\n}\n\n.form-select:focus,\n.form-input:focus {\n outline: none;\n border-color: #4F46E5;\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n}\n\n.divider {\n display: flex;\n align-items: center;\n margin: 24px 0;\n color: #9CA3AF;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.divider::before,\n.divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: #E5E7EB;\n}\n\n.divider span {\n padding: 0 12px;\n}\n\n.create-collection-row {\n display: flex;\n gap: 8px;\n}\n\n.create-collection-row .form-input {\n flex: 1;\n}\n\n.btn {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n}\n\n.btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-primary {\n background: #4F46E5;\n color: white;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #4338CA;\n}\n\n.btn-secondary {\n background: white;\n border: 1px solid #D1D5DB;\n color: #374151;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: #F3F4F6;\n}\n\n/* Tab Navigation */\n.tab-navigation {\n display: flex;\n gap: 0;\n border-bottom: 2px solid #E5E7EB;\n padding: 0 16px;\n background: white;\n}\n\n.tab-btn {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 12px 20px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n margin-bottom: -2px;\n color: #6B7280;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 150ms ease;\n}\n\n.tab-btn:hover {\n color: #1e40af;\n background: #F9FAFB;\n}\n\n.tab-btn.active {\n color: #1e40af;\n border-bottom-color: #1e40af;\n}\n\n.tab-btn i {\n font-size: 14px;\n}\n\n/* Tab Content */\n.tab-content {\n flex: 1;\n overflow: auto;\n width: 100%;\n box-sizing: border-box;\n margin-bottom: 5px;\n min-width: 0;\n}\n\n.display-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n min-height: 0;\n min-width: 0;\n}\n\n.display-toolbar {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 8px;\n z-index: 10;\n}\n\n.markdown-content,\n.html-content {\n flex: 1;\n font-size: 14px;\n line-height: 1.6;\n width: 100%;\n padding: 20px 10px 5px 20px; /* top right bottom left */\n box-sizing: border-box;\n overflow: auto;\n min-height: 0;\n}\n\n.details-content {\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n}\n\n.details-content .artifact-meta {\n margin-bottom: 0;\n padding: 20px;\n}\n\n.details-content .meta-item.full-width {\n grid-column: 1 / -1;\n}\n\n.attributes-section {\n margin-top: 24px;\n padding: 24px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.attributes-section h4 {\n margin: 0 0 16px 0;\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.attributes-list {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 16px;\n}\n\n.attribute-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n}\n\n.attribute-item label {\n font-size: 11px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.attribute-item span {\n font-size: 13px;\n color: #111827;\n word-break: break-word;\n}\n\n.attribute-empty-pill {\n display: inline-block;\n padding: 2px 8px;\n background: #F3F4F6;\n color: #9CA3AF;\n font-size: 11px;\n font-weight: 500;\n border-radius: 4px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Links Tab */\n.links-container {\n padding: 20px;\n}\n\n.links-section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.link-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: all 0.15s;\n}\n\n.link-item:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.link-icon {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.link-icon i {\n font-size: 18px;\n color: #1e40af;\n}\n\n.link-content {\n flex: 1;\n min-width: 0;\n}\n\n.link-name {\n font-size: 14px;\n font-weight: 500;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.link-type {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n}\n\n.link-actions {\n display: flex;\n gap: 8px;\n}\n\n.link-action-btn {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n color: #1e40af;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.link-action-btn:hover:not(:disabled) {\n background: #EFF6FF;\n border-color: #1e40af;\n}\n\n.link-action-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n color: #9CA3AF;\n}\n\n.links-container .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n color: #9CA3AF;\n text-align: center;\n}\n\n.links-container .empty-state i {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.links-container .empty-state p {\n margin: 0;\n font-size: 14px;\n}\n"] }]
1089
- }], null, { artifactId: [{
1236
+ args: [{ selector: 'mj-artifact-viewer-panel', template: "<div class=\"artifact-viewer-panel\">\n <div class=\"panel-header\">\n <div class=\"panel-header-left\">\n <h3>\n <i class=\"fas fa-cube\"></i>\n {{ displayName }}\n </h3>\n @if (displayDescription) {\n <p class=\"header-description\">{{ displayDescription }}</p>\n }\n </div>\n <div class=\"panel-header-right\">\n <div class=\"version-selector\" [class.clickable]=\"allVersions.length > 1\" (click)=\"toggleVersionDropdown()\">\n <i class=\"fas fa-history\"></i>\n <span class=\"version-label\">v{{ selectedVersionNumber }}</span>\n @if (allVersions.length > 1) {\n <i class=\"fas fa-chevron-down dropdown-icon\" [class.open]=\"showVersionDropdown\"></i>\n }\n @if (showVersionDropdown) {\n <div class=\"version-dropdown\" (click)=\"$event.stopPropagation()\">\n @for (version of allVersions; track version.ID) {\n <div class=\"version-option\"\n [class.selected]=\"version.VersionNumber === selectedVersionNumber\"\n (click)=\"selectVersion(version); $event.stopPropagation()\">\n <span class=\"version-number\">v{{ version.VersionNumber }}</span>\n <span class=\"version-date\">{{ version.__mj_CreatedAt | date:'short' }}</span>\n @if (version.VersionNumber === selectedVersionNumber) {\n <i class=\"fas fa-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n @if (showSaveToCollection) {\n <button class=\"save-to-collection-btn\"\n (click)=\"onSaveToLibrary()\"\n title=\"Save to Collection\">\n <i class=\"far fa-bookmark\"></i>\n </button>\n }\n <button class=\"close-btn\" (click)=\"onClose()\" title=\"Close\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"panel-content\">\n @if (isLoading) {\n <div class=\"loading-state\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading artifact...</span>\n </div>\n }\n\n @if (error) {\n <div class=\"error-state\">\n <i class=\"fas fa-exclamation-triangle\"></i>\n <span>{{ error }}</span>\n </div>\n }\n\n @if (!isLoading && !error && artifact) {\n <div class=\"artifact-content-wrapper\">\n <!-- Tab Navigation (Dynamic) -->\n <div class=\"tab-navigation\">\n @for (tab of allTabs; track tab) {\n <button class=\"tab-btn\"\n [class.active]=\"activeTab === tab.toLowerCase()\"\n (click)=\"SetActiveTab(tab)\">\n @if (GetTabIcon(tab)) {\n <i [class]=\"GetTabIcon(tab)!\"></i>\n }\n {{ tab }}\n </button>\n }\n </div>\n\n <!-- Tab Content (Dynamic) -->\n <div class=\"tab-content\">\n <!-- Plugin Viewer - Created once, kept alive, shown/hidden with CSS -->\n @if (hasPlugin && artifactVersion && artifactTypeName) {\n <div class=\"plugin-container\" [style.display]=\"activeTab === 'display' ? 'block' : 'none'\">\n <mj-artifact-type-plugin-viewer\n [artifactVersion]=\"artifactVersion\"\n [artifactTypeName]=\"artifactTypeName\"\n [contentType]=\"contentType\"\n [readonly]=\"true\">\n </mj-artifact-type-plugin-viewer>\n </div>\n }\n\n <!-- Display Tab - Fallback content when no plugin -->\n @if (activeTab === 'display' && (!hasPlugin || !artifactVersion)) {\n <div class=\"display-content\">\n @if (displayMarkdown || displayHtml) {\n <!-- Fallback to extracted markdown/HTML attributes -->\n <div class=\"display-toolbar\">\n <button class=\"btn-icon\" title=\"Print\" (click)=\"onPrintDisplayContent()\">\n <i class=\"fas fa-print\"></i> Print\n </button>\n <button class=\"btn-icon\" title=\"Copy Content\" (click)=\"onCopyDisplayContent()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n @if (displayMarkdown) {\n <div class=\"markdown-content\">\n <markdown [data]=\"displayMarkdown\"></markdown>\n </div>\n } @else if (displayHtml) {\n <div class=\"html-content\" [innerHTML]=\"displayHtml\"></div>\n }\n }\n </div>\n }\n\n <!-- Details Tab - Artifact metadata (always in DOM, hidden with CSS) -->\n <div class=\"details-content\" [style.display]=\"activeTab === 'details' ? 'block' : 'none'\">\n <div class=\"artifact-meta\">\n <div class=\"meta-item\">\n <label>Type</label>\n <span>{{ artifact.Type }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Version</label>\n <span>{{ artifactVersion?.VersionNumber || 1 }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Created</label>\n <span>{{ artifact.__mj_CreatedAt | date:'short' }}</span>\n </div>\n <div class=\"meta-item\">\n <label>Updated</label>\n <span>{{ artifactVersion?.__mj_UpdatedAt | date:'short' }}</span>\n </div>\n @if (artifact.Description) {\n <div class=\"meta-item full-width\">\n <label>Artifact Description</label>\n <span>{{ artifact.Description }}</span>\n </div>\n }\n @if (artifactVersion?.Description && artifact.Description && artifactVersion?.Description !== artifact.Description) {\n <div class=\"meta-item full-width\">\n <label>Version Description</label>\n <span>{{ artifactVersion?.Description }}</span>\n </div>\n }\n </div>\n\n <!-- Version Attributes -->\n @if (filteredAttributes.length > 0) {\n <div class=\"attributes-section\">\n <h4>Version Attributes</h4>\n <div class=\"attributes-list\">\n @for (attr of filteredAttributes; track attr.ID) {\n <div class=\"attribute-item\">\n <label>{{ attr.Name }}</label>\n @if (attr.Value) {\n <span>{{ attr.Value }}</span>\n } @else {\n <span class=\"attribute-empty-pill\">Empty</span>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Links Tab - Conversations and Collections (always in DOM, hidden with CSS) -->\n <div class=\"links-container\" [style.display]=\"activeTab === 'links' ? 'block' : 'none'\">\n @if (linksToShow.length > 0) {\n <div class=\"links-section\">\n @for (link of linksToShow; track link.id) {\n <div class=\"link-item\">\n <div class=\"link-icon\">\n @if (link.type === 'conversation') {\n <i class=\"fas fa-comments\"></i>\n } @else {\n <i class=\"fas fa-folder\"></i>\n }\n </div>\n <div class=\"link-content\">\n <div class=\"link-name\">{{ link.name }}</div>\n <div class=\"link-type\">{{ link.type === 'conversation' ? 'Conversation' : 'Collection' }}</div>\n </div>\n <div class=\"link-actions\">\n <button\n class=\"link-action-btn\"\n [disabled]=\"!link.hasAccess\"\n [title]=\"link.hasAccess ? 'Open' : 'No access'\"\n (click)=\"onNavigateToLink(link)\">\n <i class=\"fas fa-arrow-right\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <i class=\"fas fa-link\"></i>\n <p>No links available</p>\n </div>\n }\n </div>\n\n <!-- Dynamic Plugin Tabs and Base Tabs (JSON, etc.) -->\n @if (activeTab !== 'display' && activeTab !== 'details' && activeTab !== 'links') {\n @if (GetTabContent(activeTab); as tabData) {\n <div class=\"dynamic-tab-content\">\n @switch (tabData.type) {\n @case ('markdown') {\n <div class=\"markdown-viewer\" [innerHTML]=\"RenderMarkdown(tabData.content)\"></div>\n }\n @case ('json') {\n <div class=\"json-viewer\">\n <div class=\"json-toolbar\">\n <button class=\"btn-icon\" title=\"Copy JSON\" (click)=\"onCopyToClipboard()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n <div class=\"json-editor-container\">\n <mj-code-editor\n [value]=\"tabData.content\"\n [language]=\"'json'\"\n [readonly]=\"true\"\n [lineWrapping]=\"true\"\n style=\"width: 100%; height: 100%;\">\n </mj-code-editor>\n </div>\n </div>\n }\n @case ('code') {\n <div class=\"code-viewer\">\n <div class=\"code-toolbar\">\n <button class=\"btn-icon\" title=\"Copy Code\" (click)=\"onCopyToClipboard()\">\n <i class=\"fas fa-copy\"></i> Copy\n </button>\n </div>\n <div class=\"code-editor-container\">\n <mj-code-editor\n [value]=\"tabData.content\"\n [language]=\"tabData.language || 'typescript'\"\n [readonly]=\"true\"\n [lineWrapping]=\"true\"\n style=\"width: 100%; height: 100%;\">\n </mj-code-editor>\n </div>\n </div>\n }\n @case ('html') {\n <div class=\"html-viewer\" [innerHTML]=\"tabData.content\"></div>\n }\n @case ('plaintext') {\n <pre class=\"plaintext-viewer\">{{ tabData.content }}</pre>\n }\n }\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n</div>\n\n", styles: [".artifact-viewer-panel {\n width: 100%;\n height: 100%;\n background: white;\n border-left: 1px solid #E5E7EB;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.panel-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n background: white;\n flex-shrink: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.panel-header-left {\n flex: 1;\n min-width: 0;\n margin-right: 16px;\n}\n\n.panel-header h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header h3 i {\n color: #6366F1;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.header-description {\n margin: 4px 0 0 0;\n font-size: 12px;\n color: #6B7280;\n font-weight: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n}\n\n.panel-header-right {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-shrink: 0;\n}\n\n.version-selector {\n position: relative;\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F3F4F6;\n border-radius: 12px;\n font-size: 12px;\n color: #6B7280;\n font-weight: 500;\n transition: all 0.2s;\n}\n\n.version-selector.clickable {\n cursor: pointer;\n}\n\n.version-selector.clickable:hover {\n background: #E5E7EB;\n}\n\n.version-selector i {\n font-size: 11px;\n}\n\n.version-selector .dropdown-icon {\n margin-left: 2px;\n transition: transform 0.2s;\n}\n\n.version-selector .dropdown-icon.open {\n transform: rotate(180deg);\n}\n\n.version-label {\n font-family: monospace;\n}\n\n.version-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n z-index: 1000;\n overflow: hidden;\n}\n\n.version-option {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 13px;\n}\n\n.version-option:hover {\n background: #F9FAFB;\n}\n\n.version-option.selected {\n background: #EEF2FF;\n color: #4F46E5;\n}\n\n.version-option .version-number {\n font-family: monospace;\n font-weight: 600;\n min-width: 35px;\n}\n\n.version-option .version-date {\n flex: 1;\n color: #6B7280;\n font-size: 12px;\n}\n\n.version-option i.fa-check {\n color: #10B981;\n margin-left: auto;\n}\n\n.save-to-collection-btn {\n background: none;\n border: none;\n cursor: pointer;\n color: #9CA3AF;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.save-to-collection-btn:hover {\n background: #F3F4F6;\n color: #6B7280;\n}\n\n.save-to-collection-btn i {\n font-size: 14px;\n}\n\n.close-btn {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 6px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n}\n\n.close-btn:hover {\n background: #F3F4F6;\n color: #111827;\n}\n\n.close-btn i {\n font-size: 14px;\n}\n\n.panel-content {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n display: flex;\n flex-direction: column;\n width: 100%;\n box-sizing: border-box;\n}\n\n.artifact-content-wrapper {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n.loading-state,\n.error-state {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n color: #6B7280;\n}\n\n.error-state {\n color: #DC2626;\n}\n\n.loading-state i {\n font-size: 24px;\n}\n\n.artifact-meta {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 16px;\n margin-bottom: 16px;\n padding: 16px;\n background: #F9FAFB;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.meta-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-item label {\n font-size: 12px;\n font-weight: 500;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-item span {\n font-size: 14px;\n color: #111827;\n}\n\n.artifact-description {\n padding: 12px;\n margin-bottom: 16px;\n background: #EFF6FF;\n border-left: 3px solid #3B82F6;\n border-radius: 4px;\n color: #1E40AF;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n.json-viewer {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-editor-container {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.json-toolbar {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.btn-icon {\n display: flex;\n align-items: center;\n gap: 6px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n color: #374151;\n font-size: 14px;\n transition: all 0.2s;\n}\n\n.btn-icon:hover {\n background: #F3F4F6;\n border-color: #9CA3AF;\n}\n\n.btn-icon.btn-primary {\n background: #4F46E5;\n border-color: #4F46E5;\n color: white;\n}\n\n.btn-icon.btn-primary:hover {\n background: #4338CA;\n border-color: #4338CA;\n}\n\n.btn-icon i {\n font-size: 14px;\n}\n\n/* Library Dialog Styles */\n.modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n}\n\n.modal-content {\n background: white;\n border-radius: 12px;\n box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 90%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n\n.modal-header h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.modal-header h3 i {\n color: #F59E0B;\n}\n\n.modal-body {\n padding: 20px;\n overflow-y: auto;\n}\n\n.modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #E5E7EB;\n}\n\n.form-section {\n margin-bottom: 20px;\n}\n\n.form-section label {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: #374151;\n}\n\n.form-select,\n.form-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 14px;\n color: #111827;\n background: white;\n transition: border-color 0.2s;\n}\n\n.form-select:focus,\n.form-input:focus {\n outline: none;\n border-color: #4F46E5;\n box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);\n}\n\n.divider {\n display: flex;\n align-items: center;\n margin: 24px 0;\n color: #9CA3AF;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.divider::before,\n.divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: #E5E7EB;\n}\n\n.divider span {\n padding: 0 12px;\n}\n\n.create-collection-row {\n display: flex;\n gap: 8px;\n}\n\n.create-collection-row .form-input {\n flex: 1;\n}\n\n.btn {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n}\n\n.btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-primary {\n background: #4F46E5;\n color: white;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #4338CA;\n}\n\n.btn-secondary {\n background: white;\n border: 1px solid #D1D5DB;\n color: #374151;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: #F3F4F6;\n}\n\n/* Tab Navigation */\n.tab-navigation {\n display: flex;\n gap: 0;\n border-bottom: 2px solid #E5E7EB;\n padding: 0 16px;\n background: white;\n}\n\n.tab-btn {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 12px 20px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n margin-bottom: -2px;\n color: #6B7280;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 150ms ease;\n}\n\n.tab-btn:hover {\n color: #1e40af;\n background: #F9FAFB;\n}\n\n.tab-btn.active {\n color: #1e40af;\n border-bottom-color: #1e40af;\n}\n\n.tab-btn i {\n font-size: 14px;\n}\n\n/* Tab Content */\n.tab-content {\n flex: 1;\n overflow: auto;\n width: 100%;\n box-sizing: border-box;\n margin-bottom: 5px;\n min-width: 0;\n}\n\n.display-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n min-height: 0;\n min-width: 0;\n padding: 7px;\n}\n\n.display-toolbar {\n position: absolute;\n top: 12px;\n right: 12px;\n display: flex;\n gap: 8px;\n z-index: 10;\n}\n\n.markdown-content,\n.html-content {\n flex: 1;\n font-size: 14px;\n line-height: 1.6;\n width: 100%;\n padding: 20px 10px 5px 20px; /* top right bottom left */\n box-sizing: border-box;\n overflow: auto;\n min-height: 0;\n}\n\n.details-content {\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n}\n\n.details-content .artifact-meta {\n margin-bottom: 0;\n padding: 20px;\n}\n\n.details-content .meta-item.full-width {\n grid-column: 1 / -1;\n}\n\n.attributes-section {\n margin-top: 24px;\n padding: 24px;\n background: #F9FAFB;\n border-radius: 8px;\n}\n\n.attributes-section h4 {\n margin: 0 0 16px 0;\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.attributes-list {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n gap: 16px;\n}\n\n.attribute-item {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #E5E7EB;\n}\n\n.attribute-item label {\n font-size: 11px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.attribute-item span {\n font-size: 13px;\n color: #111827;\n word-break: break-word;\n}\n\n.attribute-empty-pill {\n display: inline-block;\n padding: 2px 8px;\n background: #F3F4F6;\n color: #9CA3AF;\n font-size: 11px;\n font-weight: 500;\n border-radius: 4px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Links Tab */\n.links-container {\n padding: 20px;\n}\n\n.links-section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.link-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n transition: all 0.15s;\n}\n\n.link-item:hover {\n border-color: #1e40af;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.link-icon {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border-radius: 8px;\n flex-shrink: 0;\n}\n\n.link-icon i {\n font-size: 18px;\n color: #1e40af;\n}\n\n.link-content {\n flex: 1;\n min-width: 0;\n}\n\n.link-name {\n font-size: 14px;\n font-weight: 500;\n color: #111827;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.link-type {\n font-size: 12px;\n color: #6B7280;\n margin-top: 2px;\n}\n\n.link-actions {\n display: flex;\n gap: 8px;\n}\n\n.link-action-btn {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n color: #1e40af;\n cursor: pointer;\n transition: all 0.15s;\n}\n\n.link-action-btn:hover:not(:disabled) {\n background: #EFF6FF;\n border-color: #1e40af;\n}\n\n.link-action-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n color: #9CA3AF;\n}\n\n.links-container .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 48px 24px;\n color: #9CA3AF;\n text-align: center;\n}\n\n.links-container .empty-state i {\n font-size: 48px;\n margin-bottom: 16px;\n opacity: 0.3;\n}\n\n.links-container .empty-state p {\n margin: 0;\n font-size: 14px;\n}\n\n/* Dynamic Tab Content Styles */\n.dynamic-tab-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 16px;\n}\n\n.markdown-viewer {\n flex: 1;\n overflow: auto;\n padding: 20px;\n background: white;\n line-height: 1.6;\n}\n\n.markdown-viewer h1, .markdown-viewer h2, .markdown-viewer h3 {\n margin-top: 24px;\n margin-bottom: 12px;\n font-weight: 600;\n}\n\n.markdown-viewer h1 { font-size: 24px; }\n.markdown-viewer h2 { font-size: 20px; }\n.markdown-viewer h3 { font-size: 18px; }\n\n.markdown-viewer p {\n margin-bottom: 12px;\n}\n\n.markdown-viewer ul, .markdown-viewer ol {\n margin-bottom: 12px;\n padding-left: 24px;\n}\n\n.markdown-viewer code {\n background: #f3f4f6;\n padding: 2px 6px;\n border-radius: 3px;\n font-family: 'Courier New', monospace;\n font-size: 13px;\n}\n\n.markdown-viewer pre {\n background: #f3f4f6;\n padding: 12px;\n border-radius: 6px;\n overflow-x: auto;\n margin-bottom: 12px;\n}\n\n.markdown-viewer pre code {\n background: none;\n padding: 0;\n}\n\n.code-viewer {\n flex: 1;\n display: flex;\n flex-direction: column;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n overflow: hidden;\n min-height: 0;\n}\n\n.code-toolbar {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 12px;\n background: #F9FAFB;\n border-bottom: 1px solid #E5E7EB;\n flex-shrink: 0;\n}\n\n.code-editor-container {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n}\n\n.plaintext-viewer {\n flex: 1;\n overflow: auto;\n padding: 12px;\n background: #f9fafb;\n font-family: 'Courier New', monospace;\n font-size: 13px;\n white-space: pre-wrap;\n}\n\n.html-viewer {\n flex: 1;\n overflow: auto;\n padding: 20px;\n background: white;\n}\n"] }]
1237
+ }], () => [{ type: i1.MJNotificationService }, { type: i2.DomSanitizer }], { artifactId: [{
1090
1238
  type: Input
1091
1239
  }], currentUser: [{
1092
1240
  type: Input
@@ -1112,5 +1260,5 @@ export class ArtifactViewerPanelComponent {
1112
1260
  type: ViewChild,
1113
1261
  args: [ArtifactTypePluginViewerComponent]
1114
1262
  }] }); })();
1115
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactViewerPanelComponent, { className: "ArtifactViewerPanelComponent", filePath: "src/lib/components/artifact-viewer-panel.component.ts", lineNumber: 14 }); })();
1263
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactViewerPanelComponent, { className: "ArtifactViewerPanelComponent", filePath: "src/lib/components/artifact-viewer-panel.component.ts", lineNumber: 18 }); })();
1116
1264
  //# sourceMappingURL=artifact-viewer-panel.component.js.map