@memberjunction/ng-artifacts 5.30.0 → 5.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/lib/components/artifact-message-card.component.d.ts +2 -1
  2. package/dist/lib/components/artifact-message-card.component.d.ts.map +1 -1
  3. package/dist/lib/components/artifact-message-card.component.js +7 -5
  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 +2 -1
  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 +7 -6
  8. package/dist/lib/components/artifact-type-plugin-viewer.component.js.map +1 -1
  9. package/dist/lib/components/artifact-version-history.component.d.ts +2 -1
  10. package/dist/lib/components/artifact-version-history.component.d.ts.map +1 -1
  11. package/dist/lib/components/artifact-version-history.component.js +6 -5
  12. package/dist/lib/components/artifact-version-history.component.js.map +1 -1
  13. package/dist/lib/components/artifact-viewer-panel.component.d.ts +2 -1
  14. package/dist/lib/components/artifact-viewer-panel.component.d.ts.map +1 -1
  15. package/dist/lib/components/artifact-viewer-panel.component.js +18 -16
  16. package/dist/lib/components/artifact-viewer-panel.component.js.map +1 -1
  17. package/dist/lib/components/base-artifact-viewer.component.d.ts +2 -1
  18. package/dist/lib/components/base-artifact-viewer.component.d.ts.map +1 -1
  19. package/dist/lib/components/base-artifact-viewer.component.js +5 -4
  20. package/dist/lib/components/base-artifact-viewer.component.js.map +1 -1
  21. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts +5 -0
  22. package/dist/lib/components/plugins/component-artifact-viewer.component.d.ts.map +1 -1
  23. package/dist/lib/components/plugins/component-artifact-viewer.component.js +5 -0
  24. package/dist/lib/components/plugins/component-artifact-viewer.component.js.map +1 -1
  25. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.d.ts +2 -1
  26. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.d.ts.map +1 -1
  27. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js +7 -7
  28. package/dist/lib/components/plugins/component-feedback-panel/component-feedback-panel.component.js.map +1 -1
  29. package/dist/lib/components/plugins/data-artifact-viewer.component.d.ts.map +1 -1
  30. package/dist/lib/components/plugins/data-artifact-viewer.component.js +6 -6
  31. package/dist/lib/components/plugins/data-artifact-viewer.component.js.map +1 -1
  32. package/dist/lib/components/plugins/json-artifact-viewer.component.d.ts.map +1 -1
  33. package/dist/lib/components/plugins/json-artifact-viewer.component.js +2 -2
  34. package/dist/lib/components/plugins/json-artifact-viewer.component.js.map +1 -1
  35. package/dist/lib/components/plugins/save-query-dialog.component.d.ts +2 -1
  36. package/dist/lib/components/plugins/save-query-dialog.component.d.ts.map +1 -1
  37. package/dist/lib/components/plugins/save-query-dialog.component.js +8 -6
  38. package/dist/lib/components/plugins/save-query-dialog.component.js.map +1 -1
  39. package/dist/lib/services/analyze-artifact.service.d.ts +7 -1
  40. package/dist/lib/services/analyze-artifact.service.d.ts.map +1 -1
  41. package/dist/lib/services/analyze-artifact.service.js +12 -2
  42. package/dist/lib/services/analyze-artifact.service.js.map +1 -1
  43. package/package.json +16 -16
@@ -1,5 +1,6 @@
1
1
  import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
- import { Metadata, RunView, LogError } from '@memberjunction/core';
2
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
3
+ import { RunView, LogError } from '@memberjunction/core';
3
4
  import { ParseJSONRecursive, UUIDsEqual } from '@memberjunction/global';
4
5
  import { ArtifactMetadataEngine } from '@memberjunction/core-entities';
5
6
  import { MJNotificationService } from '@memberjunction/ng-notifications';
@@ -548,7 +549,7 @@ function ArtifactViewerPanelComponent_Conditional_5_Template(rf, ctx) { if (rf &
548
549
  i0.ɵɵadvance(2);
549
550
  i0.ɵɵconditional(ctx_r1.activeTab !== "display" && ctx_r1.activeTab !== "details" && ctx_r1.activeTab !== "links" ? 35 : -1);
550
551
  } }
551
- export class ArtifactViewerPanelComponent {
552
+ export class ArtifactViewerPanelComponent extends BaseAngularComponent {
552
553
  cdr;
553
554
  notificationService;
554
555
  sanitizer;
@@ -712,6 +713,7 @@ export class ArtifactViewerPanelComponent {
712
713
  }
713
714
  recentAccessService;
714
715
  constructor(cdr, notificationService, sanitizer, artifactIconService) {
716
+ super();
715
717
  this.cdr = cdr;
716
718
  this.notificationService = notificationService;
717
719
  this.sanitizer = sanitizer;
@@ -781,7 +783,7 @@ export class ArtifactViewerPanelComponent {
781
783
  this.error = null;
782
784
  // Clear links data from previous artifact to prevent stale Links tab
783
785
  this.clearLinksData();
784
- const md = new Metadata();
786
+ const md = this.ProviderToUse;
785
787
  // Load artifact — assign to local first to avoid mid-cycle icon flicker
786
788
  const artifactEntity = await md.GetEntityObject('MJ: Artifacts', this.currentUser);
787
789
  const loaded = await artifactEntity.Load(this.artifactId);
@@ -792,7 +794,7 @@ export class ArtifactViewerPanelComponent {
792
794
  this.artifact = artifactEntity;
793
795
  // PERF: Batch load version metadata, collection associations, and conversation links
794
796
  // in a single RunViews call. Content is excluded here — loaded on-demand for the selected version.
795
- const rv = new RunView();
797
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
796
798
  const batchResults = await rv.RunViews([
797
799
  {
798
800
  // [0] Version metadata (lightweight — no Content field)
@@ -874,7 +876,7 @@ export class ArtifactViewerPanelComponent {
874
876
  */
875
877
  async loadVersionContent(versionId) {
876
878
  try {
877
- const md = new Metadata();
879
+ const md = this.ProviderToUse;
878
880
  const versionEntity = await md.GetEntityObject('MJ: Artifact Versions', this.currentUser);
879
881
  const loaded = await versionEntity.Load(versionId);
880
882
  return loaded ? versionEntity : null;
@@ -918,7 +920,7 @@ export class ArtifactViewerPanelComponent {
918
920
  if (!this.artifactVersion)
919
921
  return;
920
922
  try {
921
- const rv = new RunView();
923
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
922
924
  const result = await rv.RunView({
923
925
  EntityName: 'MJ: Artifact Version Attributes',
924
926
  ExtraFilter: `ArtifactVersionID='${this.artifactVersion.ID}'`,
@@ -1088,7 +1090,7 @@ export class ArtifactViewerPanelComponent {
1088
1090
  collectionRows = collectionsResult.Results;
1089
1091
  }
1090
1092
  else {
1091
- const rv = new RunView();
1093
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1092
1094
  const result = await rv.RunView({
1093
1095
  EntityName: 'MJ: Collection Artifacts',
1094
1096
  ExtraFilter: `ArtifactVersionID IN (
@@ -1118,7 +1120,7 @@ export class ArtifactViewerPanelComponent {
1118
1120
  const collectionId = collectionRows[0].CollectionID ||
1119
1121
  this.artifactCollections[0].CollectionID;
1120
1122
  if (collectionId) {
1121
- const md = new Metadata();
1123
+ const md = this.ProviderToUse;
1122
1124
  this.primaryCollection = await md.GetEntityObject('MJ: Collections', this.currentUser);
1123
1125
  await this.primaryCollection.Load(collectionId);
1124
1126
  }
@@ -1261,7 +1263,7 @@ export class ArtifactViewerPanelComponent {
1261
1263
  return false;
1262
1264
  }
1263
1265
  try {
1264
- const md = new Metadata();
1266
+ const md = this.ProviderToUse;
1265
1267
  let successCount = 0;
1266
1268
  // Get current version ID - save the version being viewed
1267
1269
  const currentVersionId = this.artifactVersion?.ID;
@@ -1273,7 +1275,7 @@ export class ArtifactViewerPanelComponent {
1273
1275
  // Save artifact version to each selected collection
1274
1276
  for (const collectionId of collectionIds) {
1275
1277
  // Double check this exact version doesn't already exist in the collection
1276
- const rv = new RunView();
1278
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1277
1279
  const existingResult = await rv.RunView({
1278
1280
  EntityName: 'MJ: Collection Artifacts',
1279
1281
  ExtraFilter: `CollectionID='${collectionId}' AND ArtifactVersionID='${currentVersionId}'`,
@@ -1323,8 +1325,8 @@ export class ArtifactViewerPanelComponent {
1323
1325
  // Clear old links data first to prevent stale data from previous artifact
1324
1326
  this.clearLinksData();
1325
1327
  try {
1326
- const md = new Metadata();
1327
- const rv = new RunView();
1328
+ const md = this.ProviderToUse;
1329
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
1328
1330
  // Use pre-fetched collection data or fetch if not provided
1329
1331
  let collectionRows = [];
1330
1332
  if (collectionsResult?.Success && collectionsResult.Results) {
@@ -1513,7 +1515,7 @@ export class ArtifactViewerPanelComponent {
1513
1515
  */
1514
1516
  async getArtifactTypeById(id) {
1515
1517
  try {
1516
- const md = new Metadata();
1518
+ const md = this.ProviderToUse;
1517
1519
  const artifactType = await md.GetEntityObject('MJ: Artifact Types', this.currentUser);
1518
1520
  const loaded = await artifactType.Load(id);
1519
1521
  if (loaded) {
@@ -1594,7 +1596,7 @@ export class ArtifactViewerPanelComponent {
1594
1596
  if (!this.artifactVersion?.ID || !this.currentUser?.ID) {
1595
1597
  return;
1596
1598
  }
1597
- const md = new Metadata();
1599
+ const md = this.ProviderToUse;
1598
1600
  const usage = await md.GetEntityObject('MJ: Artifact Uses');
1599
1601
  usage.ArtifactVersionID = this.artifactVersion.ID;
1600
1602
  usage.UserID = this.currentUser.ID;
@@ -1654,7 +1656,7 @@ export class ArtifactViewerPanelComponent {
1654
1656
  } if (rf & 2) {
1655
1657
  let _t;
1656
1658
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pluginViewer = _t.first);
1657
- } }, inputs: { artifactId: "artifactId", currentUser: "currentUser", environmentId: "environmentId", versionNumber: "versionNumber", showSaveToCollection: "showSaveToCollection", showHeader: "showHeader", showTabs: "showTabs", showCloseButton: "showCloseButton", showMaximizeButton: "showMaximizeButton", refreshTrigger: "refreshTrigger", viewContext: "viewContext", contextCollectionId: "contextCollectionId", canShare: "canShare", canEdit: "canEdit", isMaximized: "isMaximized" }, outputs: { closed: "closed", saveToCollectionRequested: "saveToCollectionRequested", navigateToLink: "navigateToLink", shareRequested: "shareRequested", maximizeToggled: "maximizeToggled", openEntityRecord: "openEntityRecord", navigationRequest: "navigationRequest", analyzeRequested: "analyzeRequested" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 6, vars: 6, consts: [[1, "artifact-viewer-panel"], [1, "panel-header"], [1, "panel-content"], [1, "loading-state"], [1, "error-state"], [1, "artifact-content-wrapper", 3, "no-tabs"], [1, "panel-header-left"], [1, "fas", 3, "ngClass"], [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", "Inspect & rate components", 1, "feedback-btn"], [1, "save-to-collection-btn", 3, "in-collection", "title"], ["title", "Share", 1, "share-btn"], ["title", "Analyze this artifact with AI", 1, "analyze-btn", 3, "click"], [1, "fas", "fa-magnifying-glass-chart"], [1, "maximize-btn", 3, "title"], ["title", "Close", 1, "close-btn"], [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", "Inspect & rate components", 1, "feedback-btn", 3, "click"], [1, "fas", "fa-star-half-stroke"], [1, "save-to-collection-btn", 3, "click", "title"], ["title", "Share", 1, "share-btn", 3, "click"], [1, "fas", "fa-share-nodes"], [1, "maximize-btn", 3, "click", "title"], ["title", "Close", 1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "artifact-content-wrapper"], [1, "tab-navigation"], [1, "tab-content"], [1, "plugin-container", 3, "plugin-hidden"], [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, "active"], [1, "tab-btn", 3, "click"], [3, "class"], [1, "plugin-container"], [3, "openEntityRecord", "navigationRequest", "pluginLoaded", "tabsChanged", "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", "enableCollapsibleHeadings", "enableLineNumbers", "enableSmartypants", "enableHtml"], [1, "attributes-list"], [1, "attribute-item"], [1, "attribute-empty-pill"], [1, "link-item", 3, "disabled", "clickable", "title"], [1, "link-item", 3, "click", "title"], [1, "link-icon"], [1, "fas", "fa-comments"], [1, "fas", "fa-folder"], [1, "link-content"], [1, "link-name"], [1, "link-type"], [1, "link-actions"], [1, "fas", "fa-arrow-right"], [1, "fas", "fa-link"], [1, "component-tab-content"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "dynamic-tab-content"], [1, "markdown-viewer"], [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) {
1659
+ } }, inputs: { artifactId: "artifactId", currentUser: "currentUser", environmentId: "environmentId", versionNumber: "versionNumber", showSaveToCollection: "showSaveToCollection", showHeader: "showHeader", showTabs: "showTabs", showCloseButton: "showCloseButton", showMaximizeButton: "showMaximizeButton", refreshTrigger: "refreshTrigger", viewContext: "viewContext", contextCollectionId: "contextCollectionId", canShare: "canShare", canEdit: "canEdit", isMaximized: "isMaximized" }, outputs: { closed: "closed", saveToCollectionRequested: "saveToCollectionRequested", navigateToLink: "navigateToLink", shareRequested: "shareRequested", maximizeToggled: "maximizeToggled", openEntityRecord: "openEntityRecord", navigationRequest: "navigationRequest", analyzeRequested: "analyzeRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 6, vars: 6, consts: [[1, "artifact-viewer-panel"], [1, "panel-header"], [1, "panel-content"], [1, "loading-state"], [1, "error-state"], [1, "artifact-content-wrapper", 3, "no-tabs"], [1, "panel-header-left"], [1, "fas", 3, "ngClass"], [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", "Inspect & rate components", 1, "feedback-btn"], [1, "save-to-collection-btn", 3, "in-collection", "title"], ["title", "Share", 1, "share-btn"], ["title", "Analyze this artifact with AI", 1, "analyze-btn", 3, "click"], [1, "fas", "fa-magnifying-glass-chart"], [1, "maximize-btn", 3, "title"], ["title", "Close", 1, "close-btn"], [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", "Inspect & rate components", 1, "feedback-btn", 3, "click"], [1, "fas", "fa-star-half-stroke"], [1, "save-to-collection-btn", 3, "click", "title"], ["title", "Share", 1, "share-btn", 3, "click"], [1, "fas", "fa-share-nodes"], [1, "maximize-btn", 3, "click", "title"], ["title", "Close", 1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-exclamation-triangle"], [1, "artifact-content-wrapper"], [1, "tab-navigation"], [1, "tab-content"], [1, "plugin-container", 3, "plugin-hidden"], [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, "active"], [1, "tab-btn", 3, "click"], [3, "class"], [1, "plugin-container"], [3, "openEntityRecord", "navigationRequest", "pluginLoaded", "tabsChanged", "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", "enableCollapsibleHeadings", "enableLineNumbers", "enableSmartypants", "enableHtml"], [1, "attributes-list"], [1, "attribute-item"], [1, "attribute-empty-pill"], [1, "link-item", 3, "disabled", "clickable", "title"], [1, "link-item", 3, "click", "title"], [1, "link-icon"], [1, "fas", "fa-comments"], [1, "fas", "fa-folder"], [1, "link-content"], [1, "link-name"], [1, "link-type"], [1, "link-actions"], [1, "fas", "fa-arrow-right"], [1, "fas", "fa-link"], [1, "component-tab-content"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], [1, "dynamic-tab-content"], [1, "markdown-viewer"], [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) {
1658
1660
  i0.ɵɵelementStart(0, "div", 0);
1659
1661
  i0.ɵɵconditionalCreate(1, ArtifactViewerPanelComponent_Conditional_1_Template, 20, 13, "div", 1);
1660
1662
  i0.ɵɵelementStart(2, "div", 2);
@@ -1727,5 +1729,5 @@ export class ArtifactViewerPanelComponent {
1727
1729
  type: ViewChild,
1728
1730
  args: [ArtifactTypePluginViewerComponent]
1729
1731
  }] }); })();
1730
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactViewerPanelComponent, { className: "ArtifactViewerPanelComponent", filePath: "src/lib/components/artifact-viewer-panel.component.ts", lineNumber: 20 }); })();
1732
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactViewerPanelComponent, { className: "ArtifactViewerPanelComponent", filePath: "src/lib/components/artifact-viewer-panel.component.ts", lineNumber: 21 }); })();
1731
1733
  //# sourceMappingURL=artifact-viewer-panel.component.js.map