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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/lib/components/artifact-message-card.component.d.ts +60 -8
  2. package/dist/lib/components/artifact-message-card.component.d.ts.map +1 -1
  3. package/dist/lib/components/artifact-message-card.component.js +135 -39
  4. package/dist/lib/components/artifact-message-card.component.js.map +1 -1
  5. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts +58 -6
  6. package/dist/lib/components/artifact-type-plugin-viewer.component.d.ts.map +1 -1
  7. package/dist/lib/components/artifact-type-plugin-viewer.component.js +113 -35
  8. package/dist/lib/components/artifact-type-plugin-viewer.component.js.map +1 -1
  9. package/dist/lib/components/artifact-version-download.d.ts +5 -3
  10. package/dist/lib/components/artifact-version-download.d.ts.map +1 -1
  11. package/dist/lib/components/artifact-version-download.js +11 -7
  12. package/dist/lib/components/artifact-version-download.js.map +1 -1
  13. package/dist/lib/components/artifact-version-history.component.d.ts +74 -8
  14. package/dist/lib/components/artifact-version-history.component.d.ts.map +1 -1
  15. package/dist/lib/components/artifact-version-history.component.js +152 -34
  16. package/dist/lib/components/artifact-version-history.component.js.map +1 -1
  17. package/dist/lib/components/artifact-viewer-panel.component.d.ts +328 -35
  18. package/dist/lib/components/artifact-viewer-panel.component.d.ts.map +1 -1
  19. package/dist/lib/components/artifact-viewer-panel.component.js +701 -213
  20. package/dist/lib/components/artifact-viewer-panel.component.js.map +1 -1
  21. package/dist/lib/components/file-artifact-toolbar.component.d.ts +112 -10
  22. package/dist/lib/components/file-artifact-toolbar.component.d.ts.map +1 -1
  23. package/dist/lib/components/file-artifact-toolbar.component.js +197 -23
  24. package/dist/lib/components/file-artifact-toolbar.component.js.map +1 -1
  25. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts +9 -1
  26. package/dist/lib/components/plugins/audio-artifact-viewer.component.d.ts.map +1 -1
  27. package/dist/lib/components/plugins/audio-artifact-viewer.component.js +20 -4
  28. package/dist/lib/components/plugins/audio-artifact-viewer.component.js.map +1 -1
  29. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts +23 -5
  30. package/dist/lib/components/plugins/code-artifact-viewer.component.d.ts.map +1 -1
  31. package/dist/lib/components/plugins/code-artifact-viewer.component.js +69 -31
  32. package/dist/lib/components/plugins/code-artifact-viewer.component.js.map +1 -1
  33. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts +136 -18
  34. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts.map +1 -1
  35. package/dist/lib/components/plugins/component-artifact-viewer.component.js +285 -97
  36. package/dist/lib/components/plugins/component-artifact-viewer.component.js.map +1 -1
  37. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.d.ts +2 -2
  38. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js +7 -7
  39. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js.map +1 -1
  40. package/dist/lib/components/plugins/component-permission-evaluation.d.ts +2 -0
  41. package/dist/lib/components/plugins/component-permission-evaluation.d.ts.map +1 -1
  42. package/dist/lib/components/plugins/component-permission-evaluation.js +6 -2
  43. package/dist/lib/components/plugins/component-permission-evaluation.js.map +1 -1
  44. package/dist/lib/components/plugins/data-artifact-viewer.component.d.ts +17 -6
  45. package/dist/lib/components/plugins/data-artifact-viewer.component.d.ts.map +1 -1
  46. package/dist/lib/components/plugins/data-artifact-viewer.component.js +32 -22
  47. package/dist/lib/components/plugins/data-artifact-viewer.component.js.map +1 -1
  48. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.d.ts +56 -4
  49. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.d.ts.map +1 -1
  50. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.js +142 -36
  51. package/dist/lib/components/plugins/data-requirements-viewer/data-requirements-viewer.component.js.map +1 -1
  52. package/dist/lib/components/plugins/docx-artifact-viewer.component.d.ts +14 -2
  53. package/dist/lib/components/plugins/docx-artifact-viewer.component.d.ts.map +1 -1
  54. package/dist/lib/components/plugins/docx-artifact-viewer.component.js +32 -8
  55. package/dist/lib/components/plugins/docx-artifact-viewer.component.js.map +1 -1
  56. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts +17 -3
  57. package/dist/lib/components/plugins/html-artifact-viewer.component.d.ts.map +1 -1
  58. package/dist/lib/components/plugins/html-artifact-viewer.component.js +36 -8
  59. package/dist/lib/components/plugins/html-artifact-viewer.component.js.map +1 -1
  60. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts +41 -5
  61. package/dist/lib/components/plugins/image-artifact-viewer.component.d.ts.map +1 -1
  62. package/dist/lib/components/plugins/image-artifact-viewer.component.js +102 -30
  63. package/dist/lib/components/plugins/image-artifact-viewer.component.js.map +1 -1
  64. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts +33 -5
  65. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts.map +1 -1
  66. package/dist/lib/components/plugins/json-artifact-viewer.component.js +89 -33
  67. package/dist/lib/components/plugins/json-artifact-viewer.component.js.map +1 -1
  68. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts +12 -2
  69. package/dist/lib/components/plugins/markdown-artifact-viewer.component.d.ts.map +1 -1
  70. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js +28 -8
  71. package/dist/lib/components/plugins/markdown-artifact-viewer.component.js.map +1 -1
  72. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.d.ts +4 -0
  73. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.d.ts.map +1 -1
  74. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.js +14 -6
  75. package/dist/lib/components/plugins/ml-experiment-results-viewer.component.js.map +1 -1
  76. package/dist/lib/components/plugins/pdf-artifact-viewer.component.d.ts +47 -5
  77. package/dist/lib/components/plugins/pdf-artifact-viewer.component.d.ts.map +1 -1
  78. package/dist/lib/components/plugins/pdf-artifact-viewer.component.js +129 -45
  79. package/dist/lib/components/plugins/pdf-artifact-viewer.component.js.map +1 -1
  80. package/dist/lib/components/plugins/save-query-dialog.component.d.ts +5 -1
  81. package/dist/lib/components/plugins/save-query-dialog.component.d.ts.map +1 -1
  82. package/dist/lib/components/plugins/save-query-dialog.component.js +12 -4
  83. package/dist/lib/components/plugins/save-query-dialog.component.js.map +1 -1
  84. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts +17 -3
  85. package/dist/lib/components/plugins/svg-artifact-viewer.component.d.ts.map +1 -1
  86. package/dist/lib/components/plugins/svg-artifact-viewer.component.js +36 -8
  87. package/dist/lib/components/plugins/svg-artifact-viewer.component.js.map +1 -1
  88. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts +9 -1
  89. package/dist/lib/components/plugins/video-artifact-viewer.component.d.ts.map +1 -1
  90. package/dist/lib/components/plugins/video-artifact-viewer.component.js +20 -4
  91. package/dist/lib/components/plugins/video-artifact-viewer.component.js.map +1 -1
  92. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.d.ts +28 -4
  93. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.d.ts.map +1 -1
  94. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.js +64 -16
  95. package/dist/lib/components/plugins/xlsx-artifact-viewer.component.js.map +1 -1
  96. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts +9 -1
  97. package/dist/lib/components/previews/audio-artifact-preview.component.d.ts.map +1 -1
  98. package/dist/lib/components/previews/audio-artifact-preview.component.js +20 -4
  99. package/dist/lib/components/previews/audio-artifact-preview.component.js.map +1 -1
  100. package/dist/lib/components/previews/image-artifact-preview.component.d.ts +16 -2
  101. package/dist/lib/components/previews/image-artifact-preview.component.d.ts.map +1 -1
  102. package/dist/lib/components/previews/image-artifact-preview.component.js +35 -7
  103. package/dist/lib/components/previews/image-artifact-preview.component.js.map +1 -1
  104. package/dist/lib/components/previews/video-artifact-preview.component.d.ts +9 -1
  105. package/dist/lib/components/previews/video-artifact-preview.component.d.ts.map +1 -1
  106. package/dist/lib/components/previews/video-artifact-preview.component.js +20 -4
  107. package/dist/lib/components/previews/video-artifact-preview.component.js.map +1 -1
  108. package/dist/lib/interfaces/artifact-viewer-plugin.interface.js.map +1 -1
  109. package/dist/lib/services/artifact-file.service.d.ts +8 -0
  110. package/dist/lib/services/artifact-file.service.d.ts.map +1 -1
  111. package/dist/lib/services/artifact-file.service.js +22 -6
  112. package/dist/lib/services/artifact-file.service.js.map +1 -1
  113. package/dist/lib/services/artifact-icon.service.d.ts +2 -0
  114. package/dist/lib/services/artifact-icon.service.d.ts.map +1 -1
  115. package/dist/lib/services/artifact-icon.service.js +5 -1
  116. package/dist/lib/services/artifact-icon.service.js.map +1 -1
  117. package/dist/lib/services/artifact-preview-resolver.service.d.ts +2 -0
  118. package/dist/lib/services/artifact-preview-resolver.service.d.ts.map +1 -1
  119. package/dist/lib/services/artifact-preview-resolver.service.js +5 -1
  120. package/dist/lib/services/artifact-preview-resolver.service.js.map +1 -1
  121. package/dist/lib/snapshot-helpers.d.ts +10 -0
  122. package/dist/lib/snapshot-helpers.d.ts.map +1 -1
  123. package/dist/lib/snapshot-helpers.js +25 -5
  124. package/dist/lib/snapshot-helpers.js.map +1 -1
  125. package/package.json +21 -21
@@ -10,16 +10,43 @@ import * as i0 from "@angular/core";
10
10
  */
11
11
  export declare class ArtifactTypePluginViewerComponent extends BaseAngularComponent implements OnInit, OnChanges {
12
12
  artifactVersion: MJArtifactVersionEntity;
13
- artifactTypeName: string;
14
- contentType?: string;
13
+ ArtifactTypeName: string;
14
+ /** @deprecated Use {@link ArtifactTypeName}. */
15
+ set artifactTypeName(value: string);
16
+ /** @deprecated Use {@link ArtifactTypeName}. */
17
+ get artifactTypeName(): string;
18
+ ContentType?: string;
19
+ /** @deprecated Use {@link ContentType}. */
20
+ set contentType(value: string | undefined);
21
+ /** @deprecated Use {@link ContentType}. */
22
+ get contentType(): string | undefined;
15
23
  height?: string;
16
24
  readonly: boolean;
17
25
  cssClass?: string;
26
+ OpenEntityRecord: EventEmitter<{
27
+ entityName: string;
28
+ compositeKey: CompositeKey;
29
+ }>;
30
+ /**
31
+ * @deprecated Use {@link OpenEntityRecord}.
32
+ *
33
+ * The same emitter under the old binding name, so a template still binding
34
+ * (openEntityRecord) keeps working. Must stay AFTER OpenEntityRecord: class fields
35
+ * initialise in order, and the other way round this captures undefined.
36
+ */
18
37
  openEntityRecord: EventEmitter<{
19
38
  entityName: string;
20
39
  compositeKey: CompositeKey;
21
40
  }>;
22
41
  navigationRequest: EventEmitter<NavigationRequest>;
42
+ PluginLoaded: EventEmitter<void>;
43
+ /**
44
+ * @deprecated Use {@link PluginLoaded}.
45
+ *
46
+ * The same emitter under the old binding name, so a template still binding
47
+ * (pluginLoaded) keeps working. Must stay AFTER PluginLoaded: class fields
48
+ * initialise in order, and the other way round this captures undefined.
49
+ */
23
50
  pluginLoaded: EventEmitter<void>;
24
51
  tabsChanged: EventEmitter<void>;
25
52
  /**
@@ -28,19 +55,44 @@ export declare class ArtifactTypePluginViewerComponent extends BaseAngularCompon
28
55
  * consumer (chat message card, conversation host) can invoke the
29
56
  * Create-or-Modify Interactive Form action behind a confirmation dialog.
30
57
  */
58
+ ApplyFormRequested: EventEmitter<{
59
+ spec: unknown;
60
+ entityName: string;
61
+ }>;
62
+ /**
63
+ * @deprecated Use {@link ApplyFormRequested}.
64
+ *
65
+ * The same emitter under the old binding name, so a template still binding
66
+ * (applyFormRequested) keeps working. Must stay AFTER ApplyFormRequested: class fields
67
+ * initialise in order, and the other way round this captures undefined.
68
+ */
31
69
  applyFormRequested: EventEmitter<{
32
70
  spec: unknown;
33
71
  entityName: string;
34
72
  }>;
35
- viewerContainer: ViewContainerRef;
73
+ ViewerContainer: ViewContainerRef;
74
+ /** @deprecated Use {@link ViewerContainer}. */
75
+ get viewerContainer(): ViewContainerRef;
76
+ /** @deprecated Use {@link ViewerContainer}. */
77
+ set viewerContainer(value: ViewContainerRef);
36
78
  isLoading: boolean;
37
79
  error: string | null;
38
- errorDetails: string | null;
39
- errorTitle: string | null;
80
+ ErrorDetails: string | null;
81
+ /** @deprecated Use {@link ErrorDetails}. */
82
+ get errorDetails(): string | null;
83
+ /** @deprecated Use {@link ErrorDetails}. */
84
+ set errorDetails(value: string | null);
85
+ ErrorTitle: string | null;
86
+ /** @deprecated Use {@link ErrorTitle}. */
87
+ get errorTitle(): string | null;
88
+ /** @deprecated Use {@link ErrorTitle}. */
89
+ set errorTitle(value: string | null);
40
90
  private componentRef;
41
91
  /**
42
92
  * Get the loaded plugin instance (if available)
43
93
  */
94
+ get PluginInstance(): BaseArtifactViewerPluginComponent | null;
95
+ /** @deprecated Use {@link PluginInstance}. */
44
96
  get pluginInstance(): BaseArtifactViewerPluginComponent | null;
45
97
  /**
46
98
  * Whether the loaded plugin supports user feedback.
@@ -88,6 +140,6 @@ export declare class ArtifactTypePluginViewerComponent extends BaseAngularCompon
88
140
  */
89
141
  private destroyCurrentViewer;
90
142
  static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactTypePluginViewerComponent, never>;
91
- static ɵcmp: i0.ɵɵComponentDeclaration<ArtifactTypePluginViewerComponent, "mj-artifact-type-plugin-viewer", never, { "artifactVersion": { "alias": "artifactVersion"; "required": false; }; "artifactTypeName": { "alias": "artifactTypeName"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; }, { "openEntityRecord": "openEntityRecord"; "navigationRequest": "navigationRequest"; "pluginLoaded": "pluginLoaded"; "tabsChanged": "tabsChanged"; "applyFormRequested": "applyFormRequested"; }, never, never, false, never>;
143
+ static ɵcmp: i0.ɵɵComponentDeclaration<ArtifactTypePluginViewerComponent, "mj-artifact-type-plugin-viewer", never, { "artifactVersion": { "alias": "artifactVersion"; "required": false; }; "ArtifactTypeName": { "alias": "ArtifactTypeName"; "required": false; }; "artifactTypeName": { "alias": "artifactTypeName"; "required": false; }; "ContentType": { "alias": "ContentType"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "cssClass": { "alias": "cssClass"; "required": false; }; }, { "OpenEntityRecord": "OpenEntityRecord"; "openEntityRecord": "openEntityRecord"; "navigationRequest": "navigationRequest"; "PluginLoaded": "PluginLoaded"; "pluginLoaded": "pluginLoaded"; "tabsChanged": "tabsChanged"; "ApplyFormRequested": "ApplyFormRequested"; "applyFormRequested": "applyFormRequested"; }, never, never, false, never>;
92
144
  }
93
145
  //# sourceMappingURL=artifact-type-plugin-viewer.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-type-plugin-viewer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-type-plugin-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,aAAa,EAEb,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAgD,MAAM,+BAA+B,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAA+B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EAAE,iCAAiC,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;AAExG;;;GAGG;AACH,qBA2Fa,iCAAkC,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAC7F,eAAe,EAAG,uBAAuB,CAAC;IAC1C,gBAAgB,EAAG,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAQ;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAEjB,gBAAgB;oBAAiC,MAAM;sBAAgB,YAAY;OAAK;IACxF,iBAAiB,kCAAyC;IAC1D,YAAY,qBAA4B;IACxC,WAAW,qBAA4B;IACjD;;;;;OAKG;IACO,kBAAkB;cAA4B,OAAO;oBAAc,MAAM;OAAM;IAGzF,eAAe,EAAG,gBAAgB,CAAC;IAE5B,SAAS,UAAQ;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC,OAAO,CAAC,YAAY,CAAkC;IAEtD;;OAEG;IACH,IAAW,cAAc,IAAI,iCAAiC,GAAG,IAAI,CAEpE;IAED;;;OAGG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED;;;OAGG;IACI,kBAAkB,IAAI,IAAI;IAI3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,WAAW,IAAI,IAAI;IAInB;;OAEG;YACW,UAAU;IAoJxB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAMhB;;OAEG;YACW,eAAe;IAW7B;;;;;;OAMG;YACW,kBAAkB;IAyBhC;;OAEG;YACW,mBAAmB;IAiBjC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;OAEG;IACH,OAAO,CAAC,oBAAoB;yCA7TjB,iCAAiC;2CAAjC,iCAAiC;CAoU7C"}
1
+ {"version":3,"file":"artifact-type-plugin-viewer.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-type-plugin-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,aAAa,EAEb,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAgD,MAAM,+BAA+B,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAA+B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EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1C,4CAA4C;IAC5C,IAAW,YAAY,IAAI,MAAM,GAAG,IAAI,CAEvC;IACD,4CAA4C;IAC5C,IAAW,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAE3C;IACM,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC,0CAA0C;IAC1C,IAAW,UAAU,IAAI,MAAM,GAAG,IAAI,CAErC;IACD,0CAA0C;IAC1C,IAAW,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAEzC;IAED,OAAO,CAAC,YAAY,CAAkC;IAEtD;;OAEG;IACH,IAAW,cAAc,IAAI,iCAAiC,GAAG,IAAI,CAEpE;IAED,8CAA8C;IAC9C,IAAW,cAAc,IAAI,iCAAiC,GAAG,IAAI,CAEpE;IAED;;;OAGG;IACH,IAAW,gBAAgB,IAAI,OAAO,CAErC;IAED;;;OAGG;IACI,kBAAkB,IAAI,IAAI;IAI3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxD,WAAW,IAAI,IAAI;IAInB;;OAEG;YACW,UAAU;IAoJxB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAMhB;;OAEG;YACW,eAAe;IAW7B;;;;;;OAMG;YACW,kBAAkB;IAyBhC;;OAEG;YACW,mBAAmB;IAiBjC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiBzB;;OAEG;IACH,OAAO,CAAC,oBAAoB;yCA1YjB,iCAAiC;2CAAjC,iCAAiC;CAiZ7C"}
@@ -55,14 +55,46 @@ function ArtifactTypePluginViewerComponent_Conditional_2_Template(rf, ctx) { if
55
55
  */
56
56
  export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
57
57
  artifactVersion;
58
- artifactTypeName;
59
- contentType;
58
+ ArtifactTypeName;
59
+ /** @deprecated Use {@link ArtifactTypeName}. */
60
+ set artifactTypeName(value) {
61
+ this.ArtifactTypeName = value;
62
+ }
63
+ /** @deprecated Use {@link ArtifactTypeName}. */
64
+ get artifactTypeName() {
65
+ return this.ArtifactTypeName;
66
+ }
67
+ ContentType;
68
+ /** @deprecated Use {@link ContentType}. */
69
+ set contentType(value) {
70
+ this.ContentType = value;
71
+ }
72
+ /** @deprecated Use {@link ContentType}. */
73
+ get contentType() {
74
+ return this.ContentType;
75
+ }
60
76
  height;
61
77
  readonly = true;
62
78
  cssClass;
63
- openEntityRecord = new EventEmitter();
79
+ OpenEntityRecord = new EventEmitter();
80
+ /**
81
+ * @deprecated Use {@link OpenEntityRecord}.
82
+ *
83
+ * The same emitter under the old binding name, so a template still binding
84
+ * (openEntityRecord) keeps working. Must stay AFTER OpenEntityRecord: class fields
85
+ * initialise in order, and the other way round this captures undefined.
86
+ */
87
+ openEntityRecord = this.OpenEntityRecord;
64
88
  navigationRequest = new EventEmitter();
65
- pluginLoaded = new EventEmitter();
89
+ PluginLoaded = new EventEmitter();
90
+ /**
91
+ * @deprecated Use {@link PluginLoaded}.
92
+ *
93
+ * The same emitter under the old binding name, so a template still binding
94
+ * (pluginLoaded) keeps working. Must stay AFTER PluginLoaded: class fields
95
+ * initialise in order, and the other way round this captures undefined.
96
+ */
97
+ pluginLoaded = this.PluginLoaded;
66
98
  tabsChanged = new EventEmitter();
67
99
  /**
68
100
  * Bubbled up from the component-artifact-viewer's form-aware branch when
@@ -70,32 +102,68 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
70
102
  * consumer (chat message card, conversation host) can invoke the
71
103
  * Create-or-Modify Interactive Form action behind a confirmation dialog.
72
104
  */
73
- applyFormRequested = new EventEmitter();
74
- viewerContainer;
105
+ ApplyFormRequested = new EventEmitter();
106
+ /**
107
+ * @deprecated Use {@link ApplyFormRequested}.
108
+ *
109
+ * The same emitter under the old binding name, so a template still binding
110
+ * (applyFormRequested) keeps working. Must stay AFTER ApplyFormRequested: class fields
111
+ * initialise in order, and the other way round this captures undefined.
112
+ */
113
+ applyFormRequested = this.ApplyFormRequested;
114
+ ViewerContainer;
115
+ /** @deprecated Use {@link ViewerContainer}. */
116
+ get viewerContainer() {
117
+ return this.ViewerContainer;
118
+ }
119
+ /** @deprecated Use {@link ViewerContainer}. */
120
+ set viewerContainer(value) {
121
+ this.ViewerContainer = value;
122
+ }
75
123
  isLoading = true;
76
124
  error = null;
77
- errorDetails = null;
78
- errorTitle = null;
125
+ ErrorDetails = null;
126
+ /** @deprecated Use {@link ErrorDetails}. */
127
+ get errorDetails() {
128
+ return this.ErrorDetails;
129
+ }
130
+ /** @deprecated Use {@link ErrorDetails}. */
131
+ set errorDetails(value) {
132
+ this.ErrorDetails = value;
133
+ }
134
+ ErrorTitle = null;
135
+ /** @deprecated Use {@link ErrorTitle}. */
136
+ get errorTitle() {
137
+ return this.ErrorTitle;
138
+ }
139
+ /** @deprecated Use {@link ErrorTitle}. */
140
+ set errorTitle(value) {
141
+ this.ErrorTitle = value;
142
+ }
79
143
  componentRef = null;
80
144
  /**
81
145
  * Get the loaded plugin instance (if available)
82
146
  */
83
- get pluginInstance() {
147
+ get PluginInstance() {
84
148
  return this.componentRef?.instance || null;
85
149
  }
150
+ /** @deprecated Use {@link PluginInstance}. */
151
+ get pluginInstance() {
152
+ return this.PluginInstance;
153
+ }
86
154
  /**
87
155
  * Whether the loaded plugin supports user feedback.
88
156
  * Pass-through to the plugin instance for use by the parent panel wrapper.
89
157
  */
90
158
  get SupportsFeedback() {
91
- return this.pluginInstance?.SupportsFeedback ?? false;
159
+ return this.PluginInstance?.SupportsFeedback ?? false;
92
160
  }
93
161
  /**
94
162
  * Ask the loaded plugin to show its feedback UX.
95
163
  * Pass-through to the plugin instance, called from the parent panel header.
96
164
  */
97
165
  AskUserForFeedback() {
98
- this.pluginInstance?.AskUserForFeedback();
166
+ this.PluginInstance?.AskUserForFeedback();
99
167
  }
100
168
  async ngOnInit() {
101
169
  await this.loadViewer();
@@ -116,14 +184,14 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
116
184
  try {
117
185
  this.isLoading = true;
118
186
  this.error = null;
119
- this.errorTitle = null;
120
- this.errorDetails = null;
187
+ this.ErrorTitle = null;
188
+ this.ErrorDetails = null;
121
189
  if (!this.artifactVersion) {
122
190
  this.setError('Missing Artifact Data', 'Unable to display this artifact because the version information is missing.', 'artifactVersion is null or undefined');
123
191
  this.isLoading = false;
124
192
  return;
125
193
  }
126
- if (!this.artifactTypeName) {
194
+ if (!this.ArtifactTypeName) {
127
195
  this.setError('Missing Artifact Type', 'Unable to display this artifact because the type information is missing.', 'artifactTypeName is empty');
128
196
  this.isLoading = false;
129
197
  return;
@@ -131,31 +199,31 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
131
199
  // Get the artifact type entity to find the DriverClass
132
200
  const artifactType = await this.getArtifactType();
133
201
  if (!artifactType) {
134
- this.setError('Unknown Artifact Type', `The artifact type "${this.artifactTypeName}" is not recognized. This might be a custom type that hasn't been properly configured.`, `Artifact type "${this.artifactTypeName}" not found in metadata`);
202
+ this.setError('Unknown Artifact Type', `The artifact type "${this.ArtifactTypeName}" is not recognized. This might be a custom type that hasn't been properly configured.`, `Artifact type "${this.ArtifactTypeName}" not found in metadata`);
135
203
  this.isLoading = false;
136
204
  return;
137
205
  }
138
206
  // Resolve DriverClass by traversing parent hierarchy if needed
139
207
  const driverClass = await this.resolveDriverClass(artifactType);
140
208
  if (!driverClass) {
141
- this.setError('No Viewer Available', `This artifact type (${this.artifactTypeName}) doesn't have a viewer component configured. The artifact content may need to be viewed in the JSON tab.`, `No DriverClass in hierarchy and content is not valid JSON`);
209
+ this.setError('No Viewer Available', `This artifact type (${this.ArtifactTypeName}) doesn't have a viewer component configured. The artifact content may need to be viewed in the JSON tab.`, `No DriverClass in hierarchy and content is not valid JSON`);
142
210
  this.isLoading = false;
143
211
  return;
144
212
  }
145
- // Get the component type using MJGlobal ClassFactory
146
- // CreateInstance returns the registered component class for the given DriverClass key
147
- const tempInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync(BaseArtifactViewerPluginComponent, driverClass);
148
- if (!tempInstance) {
213
+ // Look up the registered component class from ClassFactory WITHOUT instantiating it,
214
+ // so Angular's createComponent can properly instantiate it within the Angular injection context.
215
+ const registration = await MJGlobal.Instance.ClassFactory.GetRegistrationAsync(BaseArtifactViewerPluginComponent, driverClass);
216
+ if (!registration?.SubClass) {
149
217
  this.setError('Viewer Component Not Found', `The viewer component "${driverClass}" is not registered in the application. This usually means the required package or module hasn't been loaded.`, `Component "${driverClass}" not found in ClassFactory registry. Ensure it's registered with @RegisterClass(BaseArtifactViewerPluginComponent, '${driverClass}').`);
150
218
  this.isLoading = false;
151
219
  return;
152
220
  }
153
- // Get the component type from the instance
154
- const componentType = tempInstance.constructor;
221
+ // Get the component type from the registration
222
+ const componentType = registration.SubClass;
155
223
  // Destroy previous viewer if exists
156
224
  this.destroyCurrentViewer();
157
225
  // Create and configure the viewer component
158
- this.componentRef = this.viewerContainer.createComponent(componentType);
226
+ this.componentRef = this.ViewerContainer.createComponent(componentType);
159
227
  // Set inputs using setInput() which properly triggers ngOnChanges
160
228
  // This is critical for plugins like ComponentArtifactViewerComponent that
161
229
  // need to process the artifactVersion in ngOnChanges before pluginLoaded fires
@@ -169,14 +237,14 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
169
237
  if (this.cssClass !== undefined) {
170
238
  this.componentRef.setInput('cssClass', this.cssClass);
171
239
  }
172
- if (this.contentType !== undefined) {
173
- this.componentRef.setInput('contentType', this.contentType);
240
+ if (this.ContentType !== undefined) {
241
+ this.componentRef.setInput('contentType', this.ContentType);
174
242
  }
175
243
  // Subscribe to openEntityRecord event if the plugin emits it
176
244
  const componentInstance = this.componentRef.instance;
177
245
  if (componentInstance.openEntityRecord) {
178
246
  componentInstance.openEntityRecord.subscribe((event) => {
179
- this.openEntityRecord.emit(event);
247
+ this.OpenEntityRecord.emit(event);
180
248
  });
181
249
  }
182
250
  // Subscribe to navigationRequest event if the plugin emits it
@@ -196,14 +264,14 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
196
264
  // form-role spec. Other plugin types don't have this output.
197
265
  if (componentInstance.applyFormRequested) {
198
266
  componentInstance.applyFormRequested.subscribe((event) => {
199
- this.applyFormRequested.emit(event);
267
+ this.ApplyFormRequested.emit(event);
200
268
  });
201
269
  }
202
270
  // Trigger change detection
203
271
  this.componentRef.changeDetectorRef.detectChanges();
204
272
  this.isLoading = false;
205
273
  // Notify parent that plugin has loaded (for tab selection timing)
206
- this.pluginLoaded.emit();
274
+ this.PluginLoaded.emit();
207
275
  }
208
276
  catch (err) {
209
277
  console.error('Error loading artifact viewer:', err);
@@ -218,9 +286,9 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
218
286
  * Set a structured error message with title, user-friendly description, and technical details
219
287
  */
220
288
  setError(title, userMessage, technicalDetails) {
221
- this.errorTitle = title;
289
+ this.ErrorTitle = title;
222
290
  this.error = userMessage;
223
- this.errorDetails = technicalDetails;
291
+ this.ErrorDetails = technicalDetails;
224
292
  }
225
293
  /**
226
294
  * Get the artifact type entity for the current artifact using the cached ArtifactMetadataEngine
@@ -228,7 +296,7 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
228
296
  async getArtifactType() {
229
297
  try {
230
298
  // Use the cached metadata engine instead of querying the database
231
- const artifactType = ArtifactMetadataEngine.Instance.FindArtifactType(this.artifactTypeName);
299
+ const artifactType = ArtifactMetadataEngine.Instance.FindArtifactType(this.ArtifactTypeName);
232
300
  return artifactType || null;
233
301
  }
234
302
  catch (err) {
@@ -310,15 +378,15 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
310
378
  this.componentRef.destroy();
311
379
  this.componentRef = null;
312
380
  }
313
- this.viewerContainer.clear();
381
+ this.ViewerContainer.clear();
314
382
  }
315
383
  static ɵfac = /*@__PURE__*/ (() => { let ɵArtifactTypePluginViewerComponent_BaseFactory; return function ArtifactTypePluginViewerComponent_Factory(__ngFactoryType__) { return (ɵArtifactTypePluginViewerComponent_BaseFactory || (ɵArtifactTypePluginViewerComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ArtifactTypePluginViewerComponent)))(__ngFactoryType__ || ArtifactTypePluginViewerComponent); }; })();
316
384
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactTypePluginViewerComponent, selectors: [["mj-artifact-type-plugin-viewer"]], viewQuery: function ArtifactTypePluginViewerComponent_Query(rf, ctx) { if (rf & 1) {
317
385
  i0.ɵɵviewQuery(_c0, 7, ViewContainerRef);
318
386
  } if (rf & 2) {
319
387
  let _t;
320
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewerContainer = _t.first);
321
- } }, inputs: { artifactVersion: "artifactVersion", artifactTypeName: "artifactTypeName", contentType: "contentType", height: "height", readonly: "readonly", cssClass: "cssClass" }, outputs: { openEntityRecord: "openEntityRecord", navigationRequest: "navigationRequest", pluginLoaded: "pluginLoaded", tabsChanged: "tabsChanged", applyFormRequested: "applyFormRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 5, vars: 2, consts: [["viewerContainer", ""], [1, "artifact-type-plugin-viewer"], [1, "loading-state"], [1, "error-state"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "error-title"], [1, "error-details"], [1, "error-tech-details"]], template: function ArtifactTypePluginViewerComponent_Template(rf, ctx) { if (rf & 1) {
388
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ViewerContainer = _t.first);
389
+ } }, inputs: { artifactVersion: "artifactVersion", ArtifactTypeName: "ArtifactTypeName", artifactTypeName: "artifactTypeName", ContentType: "ContentType", contentType: "contentType", height: "height", readonly: "readonly", cssClass: "cssClass" }, outputs: { OpenEntityRecord: "OpenEntityRecord", openEntityRecord: "openEntityRecord", navigationRequest: "navigationRequest", PluginLoaded: "PluginLoaded", pluginLoaded: "pluginLoaded", tabsChanged: "tabsChanged", ApplyFormRequested: "ApplyFormRequested", applyFormRequested: "applyFormRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 5, vars: 2, consts: [["viewerContainer", ""], [1, "artifact-type-plugin-viewer"], [1, "loading-state"], [1, "error-state"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "error-title"], [1, "error-details"], [1, "error-tech-details"]], template: function ArtifactTypePluginViewerComponent_Template(rf, ctx) { if (rf & 1) {
322
390
  i0.ɵɵelementStart(0, "div", 1);
323
391
  i0.ɵɵconditionalCreate(1, ArtifactTypePluginViewerComponent_Conditional_1_Template, 4, 0, "div", 2);
324
392
  i0.ɵɵconditionalCreate(2, ArtifactTypePluginViewerComponent_Conditional_2_Template, 6, 3, "div", 3);
@@ -358,8 +426,12 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
358
426
  `, styles: ["\n .artifact-type-plugin-viewer {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .artifact-type-plugin-viewer ::ng-deep > * {\n flex: 1;\n min-height: 0;\n }\n\n .loading-state,\n .error-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n gap: 16px;\n color: #6c757d;\n width: 100%;\n height: 100%;\n min-height: 200px;\n }\n\n .loading-state i {\n font-size: 32px;\n }\n\n .error-state {\n color: #dc3545;\n text-align: center;\n max-width: 600px;\n }\n\n .error-state i {\n font-size: 32px;\n }\n\n .error-state .error-title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 8px;\n }\n\n .error-state .error-details {\n font-size: 14px;\n line-height: 1.5;\n color: #6c757d;\n }\n\n .error-state .error-tech-details {\n margin-top: 12px;\n padding: 12px;\n background: #f8f9fa;\n border-radius: 4px;\n font-family: monospace;\n font-size: 12px;\n color: #495057;\n word-break: break-word;\n }\n "] }]
359
427
  }], null, { artifactVersion: [{
360
428
  type: Input
429
+ }], ArtifactTypeName: [{
430
+ type: Input
361
431
  }], artifactTypeName: [{
362
432
  type: Input
433
+ }], ContentType: [{
434
+ type: Input
363
435
  }], contentType: [{
364
436
  type: Input
365
437
  }], height: [{
@@ -368,17 +440,23 @@ export class ArtifactTypePluginViewerComponent extends BaseAngularComponent {
368
440
  type: Input
369
441
  }], cssClass: [{
370
442
  type: Input
443
+ }], OpenEntityRecord: [{
444
+ type: Output
371
445
  }], openEntityRecord: [{
372
446
  type: Output
373
447
  }], navigationRequest: [{
374
448
  type: Output
449
+ }], PluginLoaded: [{
450
+ type: Output
375
451
  }], pluginLoaded: [{
376
452
  type: Output
377
453
  }], tabsChanged: [{
378
454
  type: Output
455
+ }], ApplyFormRequested: [{
456
+ type: Output
379
457
  }], applyFormRequested: [{
380
458
  type: Output
381
- }], viewerContainer: [{
459
+ }], ViewerContainer: [{
382
460
  type: ViewChild,
383
461
  args: ['viewerContainer', { read: ViewContainerRef, static: true }]
384
462
  }] }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-type-plugin-viewer.component.js","sourceRoot":"","sources":["../../../src/lib/components/artifact-type-plugin-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAIZ,SAAS,EACT,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAiD,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAY,QAAQ,EAAyB,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,iCAAiC,EAAqB,MAAM,kCAAkC,CAAC;;;;IAYhG,8BAA2B;IACzB,uBAAsC;IACtC,4BAAM;IAAA,0CAA0B;IAClC,AADkC,iBAAO,EACnC;;;IAMF,8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IAC/B,CAAC;iTAnUU,iCAAiC,yBAAjC,iCAAiC;6DAAjC,iCAAiC;mCAoBN,gBAAgB;;;;;YA3GpD,8BAAyC;YACvC,mGAAiB;YAMjB,mGAAa;YAYb,iCAA8C;YAChD,iBAAM;;YAnBJ,cAKC;YALD,wCAKC;YACD,cAWC;YAXD,oCAWC;;;iFAqEM,iCAAiC;cA3F7C,SAAS;6BACI,KAAK,YACP,gCAAgC,YAChC;;;;;;;;;;;;;;;;;;;;;;GAsBT;;kBAmEA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAON,MAAM;;kBAEN,SAAS;mBAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kFApB3D,iCAAiC","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n SimpleChanges,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n Type\n} from '@angular/core';\nimport { MJArtifactVersionEntity, MJArtifactTypeEntity, ArtifactMetadataEngine } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { Metadata, LogError, RunView, CompositeKey } from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { IArtifactViewerComponent } from '../interfaces/artifact-viewer-plugin.interface';\nimport { BaseArtifactViewerPluginComponent, NavigationRequest } from './base-artifact-viewer.component';\n\n/**\n * Artifact type plugin viewer that loads the appropriate plugin based on the artifact's DriverClass.\n * Uses MJGlobal.Instance.ClassFactory.CreateInstance() to dynamically load viewer plugins.\n */\n@Component({\n standalone: false,\n selector: 'mj-artifact-type-plugin-viewer',\n template: `\n <div class=\"artifact-type-plugin-viewer\">\n @if (isLoading) {\n <div class=\"loading-state\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading artifact viewer...</span>\n </div>\n }\n @if (error) {\n <div class=\"error-state\">\n <i class=\"fas fa-exclamation-triangle\"></i>\n @if (errorTitle) {\n <div class=\"error-title\">{{ errorTitle }}</div>\n }\n <div class=\"error-details\">{{ error }}</div>\n @if (errorDetails) {\n <div class=\"error-tech-details\">{{ errorDetails }}</div>\n }\n </div>\n }\n <ng-container #viewerContainer></ng-container>\n </div>\n `,\n styles: [`\n .artifact-type-plugin-viewer {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .artifact-type-plugin-viewer ::ng-deep > * {\n flex: 1;\n min-height: 0;\n }\n\n .loading-state,\n .error-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n gap: 16px;\n color: #6c757d;\n width: 100%;\n height: 100%;\n min-height: 200px;\n }\n\n .loading-state i {\n font-size: 32px;\n }\n\n .error-state {\n color: #dc3545;\n text-align: center;\n max-width: 600px;\n }\n\n .error-state i {\n font-size: 32px;\n }\n\n .error-state .error-title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 8px;\n }\n\n .error-state .error-details {\n font-size: 14px;\n line-height: 1.5;\n color: #6c757d;\n }\n\n .error-state .error-tech-details {\n margin-top: 12px;\n padding: 12px;\n background: #f8f9fa;\n border-radius: 4px;\n font-family: monospace;\n font-size: 12px;\n color: #495057;\n word-break: break-word;\n }\n `]\n})\nexport class ArtifactTypePluginViewerComponent extends BaseAngularComponent implements OnInit, OnChanges {\n @Input() artifactVersion!: MJArtifactVersionEntity;\n @Input() artifactTypeName!: string;\n @Input() contentType?: string;\n @Input() height?: string;\n @Input() readonly: boolean = true;\n @Input() cssClass?: string;\n\n @Output() openEntityRecord = new EventEmitter<{entityName: string; compositeKey: CompositeKey}>();\n @Output() navigationRequest = new EventEmitter<NavigationRequest>();\n @Output() pluginLoaded = new EventEmitter<void>();\n @Output() tabsChanged = new EventEmitter<void>();\n /**\n * Bubbled up from the component-artifact-viewer's form-aware branch when\n * the user clicks \"Apply to my form\". Carries the spec + entity so the\n * consumer (chat message card, conversation host) can invoke the\n * Create-or-Modify Interactive Form action behind a confirmation dialog.\n */\n @Output() applyFormRequested = new EventEmitter<{ spec: unknown; entityName: string }>();\n\n @ViewChild('viewerContainer', { read: ViewContainerRef, static: true })\n viewerContainer!: ViewContainerRef;\n\n public isLoading = true;\n public error: string | null = null;\n public errorDetails: string | null = null;\n public errorTitle: string | null = null;\n\n private componentRef: ComponentRef<any> | null = null;\n\n /**\n * Get the loaded plugin instance (if available)\n */\n public get pluginInstance(): BaseArtifactViewerPluginComponent | null {\n return this.componentRef?.instance as BaseArtifactViewerPluginComponent || null;\n }\n\n /**\n * Whether the loaded plugin supports user feedback.\n * Pass-through to the plugin instance for use by the parent panel wrapper.\n */\n public get SupportsFeedback(): boolean {\n return this.pluginInstance?.SupportsFeedback ?? false;\n }\n\n /**\n * Ask the loaded plugin to show its feedback UX.\n * Pass-through to the plugin instance, called from the parent panel header.\n */\n public AskUserForFeedback(): void {\n this.pluginInstance?.AskUserForFeedback();\n }\n\n async ngOnInit(): Promise<void> {\n await this.loadViewer();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n if ((changes['artifactVersion'] || changes['artifactTypeName']) &&\n !changes['artifactVersion']?.firstChange) {\n await this.loadViewer();\n }\n }\n\n ngOnDestroy(): void {\n this.destroyCurrentViewer();\n }\n\n /**\n * Load the appropriate viewer plugin for the artifact\n */\n private async loadViewer(): Promise<void> {\n try {\n this.isLoading = true;\n this.error = null;\n this.errorTitle = null;\n this.errorDetails = null;\n\n if (!this.artifactVersion) {\n this.setError(\n 'Missing Artifact Data',\n 'Unable to display this artifact because the version information is missing.',\n 'artifactVersion is null or undefined'\n );\n this.isLoading = false;\n return;\n }\n\n if (!this.artifactTypeName) {\n this.setError(\n 'Missing Artifact Type',\n 'Unable to display this artifact because the type information is missing.',\n 'artifactTypeName is empty'\n );\n this.isLoading = false;\n return;\n }\n\n // Get the artifact type entity to find the DriverClass\n const artifactType = await this.getArtifactType();\n if (!artifactType) {\n this.setError(\n 'Unknown Artifact Type',\n `The artifact type \"${this.artifactTypeName}\" is not recognized. This might be a custom type that hasn't been properly configured.`,\n `Artifact type \"${this.artifactTypeName}\" not found in metadata`\n );\n this.isLoading = false;\n return;\n }\n\n // Resolve DriverClass by traversing parent hierarchy if needed\n const driverClass = await this.resolveDriverClass(artifactType);\n if (!driverClass) {\n this.setError(\n 'No Viewer Available',\n `This artifact type (${this.artifactTypeName}) doesn't have a viewer component configured. The artifact content may need to be viewed in the JSON tab.`,\n `No DriverClass in hierarchy and content is not valid JSON`\n );\n this.isLoading = false;\n return;\n }\n\n // Get the component type using MJGlobal ClassFactory\n // CreateInstance returns the registered component class for the given DriverClass key\n const tempInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync<BaseArtifactViewerPluginComponent>(\n BaseArtifactViewerPluginComponent,\n driverClass\n );\n\n if (!tempInstance) {\n this.setError(\n 'Viewer Component Not Found',\n `The viewer component \"${driverClass}\" is not registered in the application. This usually means the required package or module hasn't been loaded.`,\n `Component \"${driverClass}\" not found in ClassFactory registry. Ensure it's registered with @RegisterClass(BaseArtifactViewerPluginComponent, '${driverClass}').`\n );\n this.isLoading = false;\n return;\n }\n\n // Get the component type from the instance\n const componentType = tempInstance.constructor as Type<BaseArtifactViewerPluginComponent>;\n\n // Destroy previous viewer if exists\n this.destroyCurrentViewer();\n\n // Create and configure the viewer component\n this.componentRef = this.viewerContainer.createComponent(componentType);\n\n // Set inputs using setInput() which properly triggers ngOnChanges\n // This is critical for plugins like ComponentArtifactViewerComponent that\n // need to process the artifactVersion in ngOnChanges before pluginLoaded fires\n this.componentRef.setInput('artifactVersion', this.artifactVersion);\n if (this.height !== undefined) {\n this.componentRef.setInput('height', this.height);\n }\n if (this.readonly !== undefined) {\n this.componentRef.setInput('readonly', this.readonly);\n }\n if (this.cssClass !== undefined) {\n this.componentRef.setInput('cssClass', this.cssClass);\n }\n if (this.contentType !== undefined) {\n this.componentRef.setInput('contentType', this.contentType);\n }\n\n // Subscribe to openEntityRecord event if the plugin emits it\n const componentInstance = this.componentRef.instance;\n if (componentInstance.openEntityRecord) {\n componentInstance.openEntityRecord.subscribe((event: {entityName: string; compositeKey: CompositeKey}) => {\n this.openEntityRecord.emit(event);\n });\n }\n\n // Subscribe to navigationRequest event if the plugin emits it\n if (componentInstance.navigationRequest) {\n componentInstance.navigationRequest.subscribe((event: NavigationRequest) => {\n this.navigationRequest.emit(event);\n });\n }\n\n // Subscribe to tabsChanged event if the plugin emits it (e.g., after async spec loading)\n if (componentInstance.tabsChanged) {\n componentInstance.tabsChanged.subscribe(() => {\n this.tabsChanged.emit();\n });\n }\n\n // Subscribe to the form-aware \"Apply to my form\" event when the\n // underlying plugin is a component-artifact-viewer rendering a\n // form-role spec. Other plugin types don't have this output.\n if (componentInstance.applyFormRequested) {\n componentInstance.applyFormRequested.subscribe(\n (event: { spec: unknown; entityName: string }) => {\n this.applyFormRequested.emit(event);\n }\n );\n }\n\n // Trigger change detection\n this.componentRef.changeDetectorRef.detectChanges();\n\n this.isLoading = false;\n\n // Notify parent that plugin has loaded (for tab selection timing)\n this.pluginLoaded.emit();\n } catch (err) {\n console.error('Error loading artifact viewer:', err);\n LogError(err);\n const errorMessage = err instanceof Error ? err.message : String(err);\n const errorStack = err instanceof Error && err.stack ? err.stack : undefined;\n this.setError(\n 'Failed to Load Viewer',\n 'An unexpected error occurred while loading the artifact viewer. Please try refreshing the page or contact support if the problem persists.',\n errorStack || errorMessage\n );\n this.isLoading = false;\n }\n }\n\n /**\n * Set a structured error message with title, user-friendly description, and technical details\n */\n private setError(title: string, userMessage: string, technicalDetails: string): void {\n this.errorTitle = title;\n this.error = userMessage;\n this.errorDetails = technicalDetails;\n }\n\n /**\n * Get the artifact type entity for the current artifact using the cached ArtifactMetadataEngine\n */\n private async getArtifactType(): Promise<MJArtifactTypeEntity | null> {\n try {\n // Use the cached metadata engine instead of querying the database\n const artifactType = ArtifactMetadataEngine.Instance.FindArtifactType(this.artifactTypeName);\n return artifactType || null;\n } catch (err) {\n console.error('Error loading artifact type:', err);\n return null;\n }\n }\n\n /**\n * Resolves the DriverClass for an artifact type by traversing up the parent hierarchy.\n * Falls back to JSON viewer if content is valid JSON and no DriverClass is found.\n *\n * @param artifactType The artifact type to resolve the DriverClass for\n * @returns The DriverClass string, or null if none found and no JSON fallback available\n */\n private async resolveDriverClass(artifactType: MJArtifactTypeEntity): Promise<string | null> {\n // Check if current artifact type has a DriverClass\n if (artifactType.DriverClass) {\n console.log(`✅ Found DriverClass '${artifactType.DriverClass}' on artifact type '${artifactType.Name}'`);\n return artifactType.DriverClass;\n }\n\n // No DriverClass on current type - check if it has a parent\n if (artifactType.ParentID) {\n console.log(`🔍 No DriverClass on '${artifactType.Name}', checking parent...`);\n const parentType = await this.getArtifactTypeById(artifactType.ParentID);\n\n if (parentType) {\n // Recursively check parent\n return await this.resolveDriverClass(parentType);\n } else {\n console.warn(`⚠️ Parent artifact type '${artifactType.ParentID}' not found`);\n }\n }\n\n // Reached root with no DriverClass - check for JSON fallback\n console.log(`📄 No DriverClass found in hierarchy for '${artifactType.Name}', checking JSON fallback...`);\n return this.checkJsonFallback();\n }\n\n /**\n * Loads an artifact type by ID\n */\n private async getArtifactTypeById(id: string): Promise<MJArtifactTypeEntity | null> {\n try {\n const md = this.ProviderToUse;\n const artifactType = await md.GetEntityObject<MJArtifactTypeEntity>('MJ: Artifact Types');\n const loaded = await artifactType.Load(id);\n\n if (loaded) {\n return artifactType;\n }\n\n return null;\n } catch (err) {\n console.error('Error loading artifact type by ID:', err);\n return null;\n }\n }\n\n /**\n * Checks if the artifact content is valid JSON and returns the JSON viewer plugin if so\n */\n private checkJsonFallback(): string | null {\n if (!this.artifactVersion || !this.artifactVersion.Content) {\n console.log('❌ No content available for JSON fallback');\n return null;\n }\n\n try {\n // Try to parse the content as JSON\n JSON.parse(this.artifactVersion.Content);\n console.log('✅ Content is valid JSON, using JsonArtifactViewerPlugin as fallback');\n return 'JsonArtifactViewerPlugin';\n } catch {\n console.log('❌ Content is not valid JSON, no fallback available');\n return null;\n }\n }\n\n /**\n * Destroy the current viewer component\n */\n private destroyCurrentViewer(): void {\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n this.viewerContainer.clear();\n }\n}\n"]}
1
+ {"version":3,"file":"artifact-type-plugin-viewer.component.js","sourceRoot":"","sources":["../../../src/lib/components/artifact-type-plugin-viewer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAIZ,SAAS,EACT,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAiD,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAY,QAAQ,EAAyB,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,iCAAiC,EAAqB,MAAM,kCAAkC,CAAC;;;;IAYhG,8BAA2B;IACzB,uBAAsC;IACtC,4BAAM;IAAA,0CAA0B;IAClC,AADkC,iBAAO,EACnC;;;IAMF,8BAAyB;IAAA,YAAgB;IAAA,iBAAM;;;IAAtB,cAAgB;IAAhB,uCAAgB;;;IAIzC,8BAAgC;IAAA,YAAkB;IAAA,iBAAM;;;IAAxB,cAAkB;IAAlB,yCAAkB;;;IAPtD,8BAAyB;IACvB,uBAA2C;IAC3C,iHAAkB;IAGlB,8BAA2B;IAAA,YAAW;IAAA,iBAAM;IAC5C,iHAAoB;IAGtB,iBAAM;;;IAPJ,eAEC;IAFD,4CAEC;IAC0B,eAAW;IAAX,kCAAW;IACtC,cAEC;IAFD,8CAEC;;AAxBX;;;GAGG;AA4FH,MAAM,OAAO,iCAAkC,SAAQ,oBAAoB;IAChE,eAAe,CAA2B;IAC1C,gBAAgB,CAAU;IAEnC,gDAAgD;IAChD,I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BACN,MAAM;;kBAON,MAAM;;kBASN,MAAM;;kBAEN,SAAS;mBAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;kFAjE3D,iCAAiC","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n OnInit,\n OnChanges,\n SimpleChanges,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n Type\n} from '@angular/core';\nimport { MJArtifactVersionEntity, MJArtifactTypeEntity, ArtifactMetadataEngine } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { Metadata, LogError, RunView, CompositeKey } from '@memberjunction/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { IArtifactViewerComponent } from '../interfaces/artifact-viewer-plugin.interface';\nimport { BaseArtifactViewerPluginComponent, NavigationRequest } from './base-artifact-viewer.component';\n\n/**\n * Artifact type plugin viewer that loads the appropriate plugin based on the artifact's DriverClass.\n * Uses MJGlobal.Instance.ClassFactory.CreateInstance() to dynamically load viewer plugins.\n */\n@Component({\n standalone: false,\n selector: 'mj-artifact-type-plugin-viewer',\n template: `\n <div class=\"artifact-type-plugin-viewer\">\n @if (isLoading) {\n <div class=\"loading-state\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading artifact viewer...</span>\n </div>\n }\n @if (error) {\n <div class=\"error-state\">\n <i class=\"fas fa-exclamation-triangle\"></i>\n @if (errorTitle) {\n <div class=\"error-title\">{{ errorTitle }}</div>\n }\n <div class=\"error-details\">{{ error }}</div>\n @if (errorDetails) {\n <div class=\"error-tech-details\">{{ errorDetails }}</div>\n }\n </div>\n }\n <ng-container #viewerContainer></ng-container>\n </div>\n `,\n styles: [`\n .artifact-type-plugin-viewer {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .artifact-type-plugin-viewer ::ng-deep > * {\n flex: 1;\n min-height: 0;\n }\n\n .loading-state,\n .error-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n gap: 16px;\n color: #6c757d;\n width: 100%;\n height: 100%;\n min-height: 200px;\n }\n\n .loading-state i {\n font-size: 32px;\n }\n\n .error-state {\n color: #dc3545;\n text-align: center;\n max-width: 600px;\n }\n\n .error-state i {\n font-size: 32px;\n }\n\n .error-state .error-title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 8px;\n }\n\n .error-state .error-details {\n font-size: 14px;\n line-height: 1.5;\n color: #6c757d;\n }\n\n .error-state .error-tech-details {\n margin-top: 12px;\n padding: 12px;\n background: #f8f9fa;\n border-radius: 4px;\n font-family: monospace;\n font-size: 12px;\n color: #495057;\n word-break: break-word;\n }\n `]\n})\nexport class ArtifactTypePluginViewerComponent extends BaseAngularComponent implements OnInit, OnChanges {\n @Input() artifactVersion!: MJArtifactVersionEntity;\n @Input() ArtifactTypeName!: string;\n\n /** @deprecated Use {@link ArtifactTypeName}. */\n @Input() set artifactTypeName(value: string) {\n this.ArtifactTypeName = value;\n }\n /** @deprecated Use {@link ArtifactTypeName}. */\n get artifactTypeName(): string {\n return this.ArtifactTypeName;\n }\n @Input() ContentType?: string;\n\n /** @deprecated Use {@link ContentType}. */\n @Input() set contentType(value: string | undefined) {\n this.ContentType = value;\n }\n /** @deprecated Use {@link ContentType}. */\n get contentType(): string | undefined {\n return this.ContentType;\n }\n @Input() height?: string;\n @Input() readonly: boolean = true;\n @Input() cssClass?: string;\n\n @Output() OpenEntityRecord = new EventEmitter<{entityName: string; compositeKey: CompositeKey}>();\n\n /**\n * @deprecated Use {@link OpenEntityRecord}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (openEntityRecord) keeps working. Must stay AFTER OpenEntityRecord: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() openEntityRecord = this.OpenEntityRecord;\n @Output() navigationRequest = new EventEmitter<NavigationRequest>();\n @Output() PluginLoaded = new EventEmitter<void>();\n\n /**\n * @deprecated Use {@link PluginLoaded}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (pluginLoaded) keeps working. Must stay AFTER PluginLoaded: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() pluginLoaded = this.PluginLoaded;\n @Output() tabsChanged = new EventEmitter<void>();\n /**\n * Bubbled up from the component-artifact-viewer's form-aware branch when\n * the user clicks \"Apply to my form\". Carries the spec + entity so the\n * consumer (chat message card, conversation host) can invoke the\n * Create-or-Modify Interactive Form action behind a confirmation dialog.\n */\n @Output() ApplyFormRequested = new EventEmitter<{ spec: unknown; entityName: string }>();\n\n /**\n * @deprecated Use {@link ApplyFormRequested}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (applyFormRequested) keeps working. Must stay AFTER ApplyFormRequested: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() applyFormRequested = this.ApplyFormRequested;\n\n @ViewChild('viewerContainer', { read: ViewContainerRef, static: true })\n ViewerContainer!: ViewContainerRef;\n\n /** @deprecated Use {@link ViewerContainer}. */\n get viewerContainer(): ViewContainerRef {\n return this.ViewerContainer;\n }\n /** @deprecated Use {@link ViewerContainer}. */\n set viewerContainer(value: ViewContainerRef) {\n this.ViewerContainer = value;\n }\n\n public isLoading = true;\n public error: string | null = null;\n public ErrorDetails: string | null = null;\n\n /** @deprecated Use {@link ErrorDetails}. */\n public get errorDetails(): string | null {\n return this.ErrorDetails;\n }\n /** @deprecated Use {@link ErrorDetails}. */\n public set errorDetails(value: string | null) {\n this.ErrorDetails = value;\n }\n public ErrorTitle: string | null = null;\n\n /** @deprecated Use {@link ErrorTitle}. */\n public get errorTitle(): string | null {\n return this.ErrorTitle;\n }\n /** @deprecated Use {@link ErrorTitle}. */\n public set errorTitle(value: string | null) {\n this.ErrorTitle = value;\n }\n\n private componentRef: ComponentRef<any> | null = null;\n\n /**\n * Get the loaded plugin instance (if available)\n */\n public get PluginInstance(): BaseArtifactViewerPluginComponent | null {\n return this.componentRef?.instance as BaseArtifactViewerPluginComponent || null;\n }\n\n /** @deprecated Use {@link PluginInstance}. */\n public get pluginInstance(): BaseArtifactViewerPluginComponent | null {\n return this.PluginInstance;\n }\n\n /**\n * Whether the loaded plugin supports user feedback.\n * Pass-through to the plugin instance for use by the parent panel wrapper.\n */\n public get SupportsFeedback(): boolean {\n return this.PluginInstance?.SupportsFeedback ?? false;\n }\n\n /**\n * Ask the loaded plugin to show its feedback UX.\n * Pass-through to the plugin instance, called from the parent panel header.\n */\n public AskUserForFeedback(): void {\n this.PluginInstance?.AskUserForFeedback();\n }\n\n async ngOnInit(): Promise<void> {\n await this.loadViewer();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n if ((changes['artifactVersion'] || changes['artifactTypeName']) &&\n !changes['artifactVersion']?.firstChange) {\n await this.loadViewer();\n }\n }\n\n ngOnDestroy(): void {\n this.destroyCurrentViewer();\n }\n\n /**\n * Load the appropriate viewer plugin for the artifact\n */\n private async loadViewer(): Promise<void> {\n try {\n this.isLoading = true;\n this.error = null;\n this.ErrorTitle = null;\n this.ErrorDetails = null;\n\n if (!this.artifactVersion) {\n this.setError(\n 'Missing Artifact Data',\n 'Unable to display this artifact because the version information is missing.',\n 'artifactVersion is null or undefined'\n );\n this.isLoading = false;\n return;\n }\n\n if (!this.ArtifactTypeName) {\n this.setError(\n 'Missing Artifact Type',\n 'Unable to display this artifact because the type information is missing.',\n 'artifactTypeName is empty'\n );\n this.isLoading = false;\n return;\n }\n\n // Get the artifact type entity to find the DriverClass\n const artifactType = await this.getArtifactType();\n if (!artifactType) {\n this.setError(\n 'Unknown Artifact Type',\n `The artifact type \"${this.ArtifactTypeName}\" is not recognized. This might be a custom type that hasn't been properly configured.`,\n `Artifact type \"${this.ArtifactTypeName}\" not found in metadata`\n );\n this.isLoading = false;\n return;\n }\n\n // Resolve DriverClass by traversing parent hierarchy if needed\n const driverClass = await this.resolveDriverClass(artifactType);\n if (!driverClass) {\n this.setError(\n 'No Viewer Available',\n `This artifact type (${this.ArtifactTypeName}) doesn't have a viewer component configured. The artifact content may need to be viewed in the JSON tab.`,\n `No DriverClass in hierarchy and content is not valid JSON`\n );\n this.isLoading = false;\n return;\n }\n\n // Look up the registered component class from ClassFactory WITHOUT instantiating it,\n // so Angular's createComponent can properly instantiate it within the Angular injection context.\n const registration = await MJGlobal.Instance.ClassFactory.GetRegistrationAsync(\n BaseArtifactViewerPluginComponent,\n driverClass\n );\n\n if (!registration?.SubClass) {\n this.setError(\n 'Viewer Component Not Found',\n `The viewer component \"${driverClass}\" is not registered in the application. This usually means the required package or module hasn't been loaded.`,\n `Component \"${driverClass}\" not found in ClassFactory registry. Ensure it's registered with @RegisterClass(BaseArtifactViewerPluginComponent, '${driverClass}').`\n );\n this.isLoading = false;\n return;\n }\n\n // Get the component type from the registration\n const componentType = registration.SubClass as Type<BaseArtifactViewerPluginComponent>;\n\n // Destroy previous viewer if exists\n this.destroyCurrentViewer();\n\n // Create and configure the viewer component\n this.componentRef = this.ViewerContainer.createComponent(componentType);\n\n // Set inputs using setInput() which properly triggers ngOnChanges\n // This is critical for plugins like ComponentArtifactViewerComponent that\n // need to process the artifactVersion in ngOnChanges before pluginLoaded fires\n this.componentRef.setInput('artifactVersion', this.artifactVersion);\n if (this.height !== undefined) {\n this.componentRef.setInput('height', this.height);\n }\n if (this.readonly !== undefined) {\n this.componentRef.setInput('readonly', this.readonly);\n }\n if (this.cssClass !== undefined) {\n this.componentRef.setInput('cssClass', this.cssClass);\n }\n if (this.ContentType !== undefined) {\n this.componentRef.setInput('contentType', this.ContentType);\n }\n\n // Subscribe to openEntityRecord event if the plugin emits it\n const componentInstance = this.componentRef.instance;\n if (componentInstance.openEntityRecord) {\n componentInstance.openEntityRecord.subscribe((event: {entityName: string; compositeKey: CompositeKey}) => {\n this.OpenEntityRecord.emit(event);\n });\n }\n\n // Subscribe to navigationRequest event if the plugin emits it\n if (componentInstance.navigationRequest) {\n componentInstance.navigationRequest.subscribe((event: NavigationRequest) => {\n this.navigationRequest.emit(event);\n });\n }\n\n // Subscribe to tabsChanged event if the plugin emits it (e.g., after async spec loading)\n if (componentInstance.tabsChanged) {\n componentInstance.tabsChanged.subscribe(() => {\n this.tabsChanged.emit();\n });\n }\n\n // Subscribe to the form-aware \"Apply to my form\" event when the\n // underlying plugin is a component-artifact-viewer rendering a\n // form-role spec. Other plugin types don't have this output.\n if (componentInstance.applyFormRequested) {\n componentInstance.applyFormRequested.subscribe(\n (event: { spec: unknown; entityName: string }) => {\n this.ApplyFormRequested.emit(event);\n }\n );\n }\n\n // Trigger change detection\n this.componentRef.changeDetectorRef.detectChanges();\n\n this.isLoading = false;\n\n // Notify parent that plugin has loaded (for tab selection timing)\n this.PluginLoaded.emit();\n } catch (err) {\n console.error('Error loading artifact viewer:', err);\n LogError(err);\n const errorMessage = err instanceof Error ? err.message : String(err);\n const errorStack = err instanceof Error && err.stack ? err.stack : undefined;\n this.setError(\n 'Failed to Load Viewer',\n 'An unexpected error occurred while loading the artifact viewer. Please try refreshing the page or contact support if the problem persists.',\n errorStack || errorMessage\n );\n this.isLoading = false;\n }\n }\n\n /**\n * Set a structured error message with title, user-friendly description, and technical details\n */\n private setError(title: string, userMessage: string, technicalDetails: string): void {\n this.ErrorTitle = title;\n this.error = userMessage;\n this.ErrorDetails = technicalDetails;\n }\n\n /**\n * Get the artifact type entity for the current artifact using the cached ArtifactMetadataEngine\n */\n private async getArtifactType(): Promise<MJArtifactTypeEntity | null> {\n try {\n // Use the cached metadata engine instead of querying the database\n const artifactType = ArtifactMetadataEngine.Instance.FindArtifactType(this.ArtifactTypeName);\n return artifactType || null;\n } catch (err) {\n console.error('Error loading artifact type:', err);\n return null;\n }\n }\n\n /**\n * Resolves the DriverClass for an artifact type by traversing up the parent hierarchy.\n * Falls back to JSON viewer if content is valid JSON and no DriverClass is found.\n *\n * @param artifactType The artifact type to resolve the DriverClass for\n * @returns The DriverClass string, or null if none found and no JSON fallback available\n */\n private async resolveDriverClass(artifactType: MJArtifactTypeEntity): Promise<string | null> {\n // Check if current artifact type has a DriverClass\n if (artifactType.DriverClass) {\n console.log(`✅ Found DriverClass '${artifactType.DriverClass}' on artifact type '${artifactType.Name}'`);\n return artifactType.DriverClass;\n }\n\n // No DriverClass on current type - check if it has a parent\n if (artifactType.ParentID) {\n console.log(`🔍 No DriverClass on '${artifactType.Name}', checking parent...`);\n const parentType = await this.getArtifactTypeById(artifactType.ParentID);\n\n if (parentType) {\n // Recursively check parent\n return await this.resolveDriverClass(parentType);\n } else {\n console.warn(`⚠️ Parent artifact type '${artifactType.ParentID}' not found`);\n }\n }\n\n // Reached root with no DriverClass - check for JSON fallback\n console.log(`📄 No DriverClass found in hierarchy for '${artifactType.Name}', checking JSON fallback...`);\n return this.checkJsonFallback();\n }\n\n /**\n * Loads an artifact type by ID\n */\n private async getArtifactTypeById(id: string): Promise<MJArtifactTypeEntity | null> {\n try {\n const md = this.ProviderToUse;\n const artifactType = await md.GetEntityObject<MJArtifactTypeEntity>('MJ: Artifact Types');\n const loaded = await artifactType.Load(id);\n\n if (loaded) {\n return artifactType;\n }\n\n return null;\n } catch (err) {\n console.error('Error loading artifact type by ID:', err);\n return null;\n }\n }\n\n /**\n * Checks if the artifact content is valid JSON and returns the JSON viewer plugin if so\n */\n private checkJsonFallback(): string | null {\n if (!this.artifactVersion || !this.artifactVersion.Content) {\n console.log('❌ No content available for JSON fallback');\n return null;\n }\n\n try {\n // Try to parse the content as JSON\n JSON.parse(this.artifactVersion.Content);\n console.log('✅ Content is valid JSON, using JsonArtifactViewerPlugin as fallback');\n return 'JsonArtifactViewerPlugin';\n } catch {\n console.log('❌ Content is not valid JSON, no fallback available');\n return null;\n }\n }\n\n /**\n * Destroy the current viewer component\n */\n private destroyCurrentViewer(): void {\n if (this.componentRef) {\n this.componentRef.destroy();\n this.componentRef = null;\n }\n this.ViewerContainer.clear();\n }\n}\n"]}
@@ -5,9 +5,9 @@
5
5
  */
6
6
  /** What the browser should be handed: the bytes (or text), its MIME type, and a filename. */
7
7
  export interface VersionDownload {
8
- data: BlobPart;
9
- mimeType: string;
10
- fileName: string;
8
+ Data: BlobPart;
9
+ MimeType: string;
10
+ FileName: string;
11
11
  }
12
12
  /**
13
13
  * Turn a version's stored `Content` into a real download.
@@ -27,5 +27,7 @@ export interface VersionDownload {
27
27
  * @param versionNumber used only in the fallback name
28
28
  * @param mimeType the version's `MimeType`, used when the content is not a data URI
29
29
  */
30
+ export declare function BuildVersionDownload(content: string, fileName: string | null | undefined, artifactName: string | null | undefined, versionNumber: number | null | undefined, mimeType?: string | null): VersionDownload;
31
+ /** @deprecated Use {@link BuildVersionDownload}. */
30
32
  export declare function buildVersionDownload(content: string, fileName: string | null | undefined, artifactName: string | null | undefined, versionNumber: number | null | undefined, mimeType?: string | null): VersionDownload;
31
33
  //# sourceMappingURL=artifact-version-download.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-version-download.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-version-download.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,eAAe,CAmCjB"}
1
+ {"version":3,"file":"artifact-version-download.d.ts","sourceRoot":"","sources":["../../../src/lib/components/artifact-version-download.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,eAAe,CAmCjB;AAED,oDAAoD;AACpD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GACvB,eAAe,CAEjB"}
@@ -21,7 +21,7 @@
21
21
  * @param versionNumber used only in the fallback name
22
22
  * @param mimeType the version's `MimeType`, used when the content is not a data URI
23
23
  */
24
- export function buildVersionDownload(content, fileName, artifactName, versionNumber, mimeType) {
24
+ export function BuildVersionDownload(content, fileName, artifactName, versionNumber, mimeType) {
25
25
  const dataUri = /^data:([^;,]+);base64,(.*)$/is.exec(content.trim());
26
26
  if (dataUri) {
27
27
  const [, uriMimeType, base64] = dataUri;
@@ -41,10 +41,10 @@ export function buildVersionDownload(content, fileName, artifactName, versionNum
41
41
  bytes[i] = binary.charCodeAt(i);
42
42
  }
43
43
  return {
44
- data: bytes,
45
- mimeType: uriMimeType,
44
+ Data: bytes,
45
+ MimeType: uriMimeType,
46
46
  // The stored FileName already carries the correct extension; only fall back when absent.
47
- fileName: fileName?.trim() || `${artifactName ?? 'artifact'}_v${versionNumber ?? 1}`,
47
+ FileName: fileName?.trim() || `${artifactName ?? 'artifact'}_v${versionNumber ?? 1}`,
48
48
  };
49
49
  }
50
50
  // Fall through to the text path below: a click that hands over the stored bytes beats one
@@ -52,9 +52,13 @@ export function buildVersionDownload(content, fileName, artifactName, versionNum
52
52
  }
53
53
  // Text content — unchanged from the original behaviour, but honour a real filename when present.
54
54
  return {
55
- data: content,
56
- mimeType: mimeType?.trim() || 'text/plain',
57
- fileName: fileName?.trim() || `${artifactName ?? 'artifact'}_v${versionNumber ?? 1}.txt`,
55
+ Data: content,
56
+ MimeType: mimeType?.trim() || 'text/plain',
57
+ FileName: fileName?.trim() || `${artifactName ?? 'artifact'}_v${versionNumber ?? 1}.txt`,
58
58
  };
59
59
  }
60
+ /** @deprecated Use {@link BuildVersionDownload}. */
61
+ export function buildVersionDownload(content, fileName, artifactName, versionNumber, mimeType) {
62
+ return BuildVersionDownload(content, fileName, artifactName, versionNumber, mimeType);
63
+ }
60
64
  //# sourceMappingURL=artifact-version-download.js.map