@memberjunction/ng-core-entity-forms 2.129.0 → 2.130.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 (95) hide show
  1. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts +44 -0
  2. package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -0
  3. package/dist/lib/custom/Tests/entity-link-pill.component.js +124 -0
  4. package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -0
  5. package/dist/lib/custom/Tests/test-form.component.d.ts +96 -9
  6. package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
  7. package/dist/lib/custom/Tests/test-form.component.js +1529 -277
  8. package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
  9. package/dist/lib/custom/Tests/test-run-form.component.d.ts +50 -9
  10. package/dist/lib/custom/Tests/test-run-form.component.d.ts.map +1 -1
  11. package/dist/lib/custom/Tests/test-run-form.component.js +1079 -426
  12. package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
  13. package/dist/lib/custom/Tests/test-suite-form.component.d.ts +228 -5
  14. package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
  15. package/dist/lib/custom/Tests/test-suite-form.component.js +3309 -201
  16. package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
  17. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts +88 -3
  18. package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts.map +1 -1
  19. package/dist/lib/custom/Tests/test-suite-run-form.component.js +1976 -262
  20. package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
  21. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +9 -2
  22. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
  23. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +275 -244
  24. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  25. package/dist/lib/custom/custom-forms.module.d.ts +27 -26
  26. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  27. package/dist/lib/custom/custom-forms.module.js +9 -3
  28. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  29. package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.d.ts.map +1 -1
  30. package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js +154 -122
  31. package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js.map +1 -1
  32. package/dist/lib/generated/Entities/AIAgentModality/aiagentmodality.form.component.d.ts +11 -0
  33. package/dist/lib/generated/Entities/AIAgentModality/aiagentmodality.form.component.d.ts.map +1 -0
  34. package/dist/lib/generated/Entities/AIAgentModality/aiagentmodality.form.component.js +75 -0
  35. package/dist/lib/generated/Entities/AIAgentModality/aiagentmodality.form.component.js.map +1 -0
  36. package/dist/lib/generated/Entities/AIArchitecture/aiarchitecture.form.component.d.ts +11 -0
  37. package/dist/lib/generated/Entities/AIArchitecture/aiarchitecture.form.component.d.ts.map +1 -0
  38. package/dist/lib/generated/Entities/AIArchitecture/aiarchitecture.form.component.js +121 -0
  39. package/dist/lib/generated/Entities/AIArchitecture/aiarchitecture.form.component.js.map +1 -0
  40. package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.d.ts.map +1 -1
  41. package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js +77 -41
  42. package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js.map +1 -1
  43. package/dist/lib/generated/Entities/AIModality/aimodality.form.component.d.ts +11 -0
  44. package/dist/lib/generated/Entities/AIModality/aimodality.form.component.d.ts.map +1 -0
  45. package/dist/lib/generated/Entities/AIModality/aimodality.form.component.js +167 -0
  46. package/dist/lib/generated/Entities/AIModality/aimodality.form.component.js.map +1 -0
  47. package/dist/lib/generated/Entities/AIModel/aimodel.form.component.d.ts.map +1 -1
  48. package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js +160 -102
  49. package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js.map +1 -1
  50. package/dist/lib/generated/Entities/AIModelArchitecture/aimodelarchitecture.form.component.d.ts +11 -0
  51. package/dist/lib/generated/Entities/AIModelArchitecture/aimodelarchitecture.form.component.d.ts.map +1 -0
  52. package/dist/lib/generated/Entities/AIModelArchitecture/aimodelarchitecture.form.component.js +73 -0
  53. package/dist/lib/generated/Entities/AIModelArchitecture/aimodelarchitecture.form.component.js.map +1 -0
  54. package/dist/lib/generated/Entities/AIModelModality/aimodelmodality.form.component.d.ts +11 -0
  55. package/dist/lib/generated/Entities/AIModelModality/aimodelmodality.form.component.d.ts.map +1 -0
  56. package/dist/lib/generated/Entities/AIModelModality/aimodelmodality.form.component.js +89 -0
  57. package/dist/lib/generated/Entities/AIModelModality/aimodelmodality.form.component.js.map +1 -0
  58. package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.d.ts.map +1 -1
  59. package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js +27 -13
  60. package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js.map +1 -1
  61. package/dist/lib/generated/Entities/ConversationDetail/conversationdetail.form.component.d.ts.map +1 -1
  62. package/dist/lib/generated/Entities/ConversationDetail/conversationdetail.form.component.js +39 -21
  63. package/dist/lib/generated/Entities/ConversationDetail/conversationdetail.form.component.js.map +1 -1
  64. package/dist/lib/generated/Entities/ConversationDetailAttachment/conversationdetailattachment.form.component.d.ts +11 -0
  65. package/dist/lib/generated/Entities/ConversationDetailAttachment/conversationdetailattachment.form.component.d.ts.map +1 -0
  66. package/dist/lib/generated/Entities/ConversationDetailAttachment/conversationdetailattachment.form.component.js +95 -0
  67. package/dist/lib/generated/Entities/ConversationDetailAttachment/conversationdetailattachment.form.component.js.map +1 -0
  68. package/dist/lib/generated/Entities/Entity/entity.form.component.d.ts.map +1 -1
  69. package/dist/lib/generated/Entities/Entity/entity.form.component.js +61 -43
  70. package/dist/lib/generated/Entities/Entity/entity.form.component.js.map +1 -1
  71. package/dist/lib/generated/Entities/File/file.form.component.d.ts.map +1 -1
  72. package/dist/lib/generated/Entities/File/file.form.component.js +22 -4
  73. package/dist/lib/generated/Entities/File/file.form.component.js.map +1 -1
  74. package/dist/lib/generated/Entities/FileStorageProvider/filestorageprovider.form.component.d.ts.map +1 -1
  75. package/dist/lib/generated/Entities/FileStorageProvider/filestorageprovider.form.component.js +40 -4
  76. package/dist/lib/generated/Entities/FileStorageProvider/filestorageprovider.form.component.js.map +1 -1
  77. package/dist/lib/generated/Entities/Test/test.form.component.js +17 -15
  78. package/dist/lib/generated/Entities/Test/test.form.component.js.map +1 -1
  79. package/dist/lib/generated/Entities/TestRun/testrun.form.component.d.ts.map +1 -1
  80. package/dist/lib/generated/Entities/TestRun/testrun.form.component.js +55 -43
  81. package/dist/lib/generated/Entities/TestRun/testrun.form.component.js.map +1 -1
  82. package/dist/lib/generated/Entities/TestRunFeedback/testrunfeedback.form.component.d.ts.map +1 -1
  83. package/dist/lib/generated/Entities/TestRunFeedback/testrunfeedback.form.component.js +9 -15
  84. package/dist/lib/generated/Entities/TestRunFeedback/testrunfeedback.form.component.js.map +1 -1
  85. package/dist/lib/generated/Entities/TestSuite/testsuite.form.component.d.ts.map +1 -1
  86. package/dist/lib/generated/Entities/TestSuite/testsuite.form.component.js +39 -19
  87. package/dist/lib/generated/Entities/TestSuite/testsuite.form.component.js.map +1 -1
  88. package/dist/lib/generated/Entities/TestSuiteRun/testsuiterun.form.component.d.ts.map +1 -1
  89. package/dist/lib/generated/Entities/TestSuiteRun/testsuiterun.form.component.js +40 -16
  90. package/dist/lib/generated/Entities/TestSuiteRun/testsuiterun.form.component.js.map +1 -1
  91. package/dist/lib/generated/generated-forms.module.d.ts +145 -134
  92. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  93. package/dist/lib/generated/generated-forms.module.js +168 -87
  94. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  95. package/package.json +28 -27
@@ -0,0 +1,44 @@
1
+ import { ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { EntityInfo } from '@memberjunction/core';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * A clickable pill component that displays a link to a related entity record.
6
+ * Shows the entity icon (from metadata) and either the record name or entity name.
7
+ * Clicking opens the entity record in a new tab.
8
+ *
9
+ * Usage:
10
+ * ```html
11
+ * <mj-entity-link-pill
12
+ * [entityName]="'MJ: AI Agent Runs'"
13
+ * [recordId]="run.TargetLogID"
14
+ * [recordName]="run.AgentRunName">
15
+ * </mj-entity-link-pill>
16
+ * ```
17
+ */
18
+ export declare class EntityLinkPillComponent implements OnChanges {
19
+ private cdr;
20
+ /**
21
+ * The entity name to link to (e.g., 'MJ: AI Agent Runs')
22
+ */
23
+ entityName: string | null;
24
+ /**
25
+ * The record ID to link to
26
+ */
27
+ recordId: string | null;
28
+ /**
29
+ * Optional display name for the record. If not provided, uses entity name.
30
+ */
31
+ recordName: string | null;
32
+ entityInfo: EntityInfo | null;
33
+ private metadata;
34
+ constructor(cdr: ChangeDetectorRef);
35
+ ngOnChanges(changes: SimpleChanges): void;
36
+ get iconClass(): string;
37
+ get displayLabel(): string;
38
+ get tooltipText(): string;
39
+ openRecord(): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityLinkPillComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntityLinkPillComponent, "mj-entity-link-pill", never, { "entityName": { "alias": "entityName"; "required": false; }; "recordId": { "alias": "recordId"; "required": false; }; "recordName": { "alias": "recordName"; "required": false; }; }, {}, never, never, false, never>;
42
+ }
43
+ export declare function LoadEntityLinkPillComponent(): void;
44
+ //# sourceMappingURL=entity-link-pill.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-link-pill.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Tests/entity-link-pill.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACvH,OAAO,EAA0B,UAAU,EAAE,MAAM,sBAAsB,CAAC;;AAG1E;;;;;;;;;;;;;GAaG;AACH,qBAyDa,uBAAwB,YAAW,SAAS;IAmB3C,OAAO,CAAC,GAAG;IAlBvB;;OAEG;IACM,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1C;;OAEG;IACM,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC;;OAEG;IACM,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1C,UAAU,EAAE,UAAU,GAAG,IAAI,CAAQ;IACrC,OAAO,CAAC,QAAQ,CAAkB;gBAEd,GAAG,EAAE,iBAAiB;IAE1C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAOzC,IAAI,SAAS,IAAI,MAAM,CAYtB;IAED,IAAI,YAAY,IAAI,MAAM,CAQzB;IAED,IAAI,WAAW,IAAI,MAAM,CAMxB;IAED,UAAU,IAAI,IAAI;yCA5DP,uBAAuB;2CAAvB,uBAAuB;CAiEnC;AAED,wBAAgB,2BAA2B,SAE1C"}
@@ -0,0 +1,124 @@
1
+ import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
2
+ import { CompositeKey, Metadata } from '@memberjunction/core';
3
+ import { SharedService } from '@memberjunction/ng-shared';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ function EntityLinkPillComponent_span_0_Template(rf, ctx) { if (rf & 1) {
7
+ const _r1 = i0.ɵɵgetCurrentView();
8
+ i0.ɵɵelementStart(0, "span", 1);
9
+ i0.ɵɵlistener("click", function EntityLinkPillComponent_span_0_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openRecord()); });
10
+ i0.ɵɵelement(1, "i", 2);
11
+ i0.ɵɵelementStart(2, "span", 3);
12
+ i0.ɵɵtext(3);
13
+ i0.ɵɵelementEnd();
14
+ i0.ɵɵelement(4, "i", 4);
15
+ i0.ɵɵelementEnd();
16
+ } if (rf & 2) {
17
+ const ctx_r1 = i0.ɵɵnextContext();
18
+ i0.ɵɵproperty("title", ctx_r1.tooltipText);
19
+ i0.ɵɵadvance();
20
+ i0.ɵɵproperty("ngClass", ctx_r1.iconClass);
21
+ i0.ɵɵadvance(2);
22
+ i0.ɵɵtextInterpolate(ctx_r1.displayLabel);
23
+ } }
24
+ /**
25
+ * A clickable pill component that displays a link to a related entity record.
26
+ * Shows the entity icon (from metadata) and either the record name or entity name.
27
+ * Clicking opens the entity record in a new tab.
28
+ *
29
+ * Usage:
30
+ * ```html
31
+ * <mj-entity-link-pill
32
+ * [entityName]="'MJ: AI Agent Runs'"
33
+ * [recordId]="run.TargetLogID"
34
+ * [recordName]="run.AgentRunName">
35
+ * </mj-entity-link-pill>
36
+ * ```
37
+ */
38
+ export class EntityLinkPillComponent {
39
+ constructor(cdr) {
40
+ this.cdr = cdr;
41
+ /**
42
+ * The entity name to link to (e.g., 'MJ: AI Agent Runs')
43
+ */
44
+ this.entityName = null;
45
+ /**
46
+ * The record ID to link to
47
+ */
48
+ this.recordId = null;
49
+ /**
50
+ * Optional display name for the record. If not provided, uses entity name.
51
+ */
52
+ this.recordName = null;
53
+ this.entityInfo = null;
54
+ this.metadata = new Metadata();
55
+ }
56
+ ngOnChanges(changes) {
57
+ if (changes['entityName'] && this.entityName) {
58
+ this.entityInfo = this.metadata.EntityByName(this.entityName);
59
+ this.cdr.markForCheck();
60
+ }
61
+ }
62
+ get iconClass() {
63
+ if (this.entityInfo?.Icon) {
64
+ // Entity icon is typically a Font Awesome class like 'fa-robot'
65
+ // Ensure it has the proper prefix
66
+ const icon = this.entityInfo.Icon;
67
+ if (icon.startsWith('fa-')) {
68
+ return `fas ${icon}`;
69
+ }
70
+ return icon;
71
+ }
72
+ // Default icon if none specified
73
+ return 'fas fa-link';
74
+ }
75
+ get displayLabel() {
76
+ if (this.recordName) {
77
+ return this.recordName;
78
+ }
79
+ if (this.entityInfo) {
80
+ return this.entityInfo.Name;
81
+ }
82
+ return 'View Record';
83
+ }
84
+ get tooltipText() {
85
+ const entityLabel = this.entityInfo?.Name || 'Record';
86
+ if (this.recordName) {
87
+ return `Open ${entityLabel}: ${this.recordName}`;
88
+ }
89
+ return `Open ${entityLabel}`;
90
+ }
91
+ openRecord() {
92
+ if (this.entityName && this.recordId) {
93
+ SharedService.Instance.OpenEntityRecord(this.entityName, CompositeKey.FromID(this.recordId));
94
+ }
95
+ }
96
+ static { this.ɵfac = function EntityLinkPillComponent_Factory(t) { return new (t || EntityLinkPillComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
97
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityLinkPillComponent, selectors: [["mj-entity-link-pill"]], inputs: { entityName: "entityName", recordId: "recordId", recordName: "recordName" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [["class", "entity-link-pill", 3, "title", "click", 4, "ngIf"], [1, "entity-link-pill", 3, "click", "title"], [1, "entity-icon", 3, "ngClass"], [1, "entity-label"], [1, "fas", "fa-external-link-alt", "pill-action"]], template: function EntityLinkPillComponent_Template(rf, ctx) { if (rf & 1) {
98
+ i0.ɵɵtemplate(0, EntityLinkPillComponent_span_0_Template, 5, 3, "span", 0);
99
+ } if (rf & 2) {
100
+ i0.ɵɵproperty("ngIf", ctx.entityInfo && ctx.recordId);
101
+ } }, dependencies: [i1.NgClass, i1.NgIf], styles: [".entity-link-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.08));\n border: 1px solid rgba(59, 130, 246, 0.2);\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n color: #3b82f6;\n cursor: pointer;\n transition: all 0.2s ease;\n white-space: nowrap;\n max-width: 200px;\n }\n\n .entity-link-pill[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));\n border-color: rgba(59, 130, 246, 0.4);\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);\n }\n\n .entity-icon[_ngcontent-%COMP%] {\n font-size: 11px;\n opacity: 0.9;\n }\n\n .entity-label[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 150px;\n }\n\n .pill-action[_ngcontent-%COMP%] {\n font-size: 9px;\n opacity: 0.6;\n transition: opacity 0.2s ease;\n }\n\n .entity-link-pill[_ngcontent-%COMP%]:hover .pill-action[_ngcontent-%COMP%] {\n opacity: 1;\n }"], changeDetection: 0 }); }
102
+ }
103
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityLinkPillComponent, [{
104
+ type: Component,
105
+ args: [{ selector: 'mj-entity-link-pill', template: `
106
+ <span class="entity-link-pill" *ngIf="entityInfo && recordId" (click)="openRecord()" [title]="tooltipText">
107
+ <i class="entity-icon" [ngClass]="iconClass"></i>
108
+ <span class="entity-label">{{ displayLabel }}</span>
109
+ <i class="fas fa-external-link-alt pill-action"></i>
110
+ </span>
111
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["\n .entity-link-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.08));\n border: 1px solid rgba(59, 130, 246, 0.2);\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n color: #3b82f6;\n cursor: pointer;\n transition: all 0.2s ease;\n white-space: nowrap;\n max-width: 200px;\n }\n\n .entity-link-pill:hover {\n background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.15));\n border-color: rgba(59, 130, 246, 0.4);\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);\n }\n\n .entity-icon {\n font-size: 11px;\n opacity: 0.9;\n }\n\n .entity-label {\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 150px;\n }\n\n .pill-action {\n font-size: 9px;\n opacity: 0.6;\n transition: opacity 0.2s ease;\n }\n\n .entity-link-pill:hover .pill-action {\n opacity: 1;\n }\n "] }]
112
+ }], () => [{ type: i0.ChangeDetectorRef }], { entityName: [{
113
+ type: Input
114
+ }], recordId: [{
115
+ type: Input
116
+ }], recordName: [{
117
+ type: Input
118
+ }] }); })();
119
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityLinkPillComponent, { className: "EntityLinkPillComponent", filePath: "src/lib/custom/Tests/entity-link-pill.component.ts", lineNumber: 76 }); })();
120
+ export function LoadEntityLinkPillComponent() {
121
+ // Prevents tree-shaking
122
+ }
123
+ LoadEntityLinkPillComponent();
124
+ //# sourceMappingURL=entity-link-pill.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-link-pill.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/Tests/entity-link-pill.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,uBAAuB,EAA+C,MAAM,eAAe,CAAC;AACvH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAc,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;;;;;IAmBtD,+BAA2G;IAA7C,kLAAS,mBAAY,KAAC;IAClF,uBAAiD;IACjD,+BAA2B;IAAA,YAAkB;IAAA,iBAAO;IACpD,uBAAoD;IACtD,iBAAO;;;IAJ8E,0CAAqB;IACjF,cAAqB;IAArB,0CAAqB;IACjB,eAAkB;IAAlB,yCAAkB;;AAnBnD;;;;;;;;;;;;;GAaG;AA0DH,MAAM,OAAO,uBAAuB;IAmBlC,YAAoB,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;QAlB1C;;WAEG;QACM,eAAU,GA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CAAC,UAAU,EAAE,CAAC;QACnD,CAAC;QACD,OAAO,QAAQ,WAAW,EAAE,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;wFAhEU,uBAAuB;oEAAvB,uBAAuB;YAtDhC,0EAA2G;;YAA3E,qDAA4B;;;iFAsDnD,uBAAuB;cAzDnC,SAAS;2BACE,qBAAqB,YACrB;;;;;;GAMT,mBA+CgB,uBAAuB,CAAC,MAAM;kDAMtC,UAAU;kBAAlB,KAAK;YAKG,QAAQ;kBAAhB,KAAK;YAKG,UAAU;kBAAlB,KAAK;;kFAdK,uBAAuB;AAmEpC,MAAM,UAAU,2BAA2B;IACzC,wBAAwB;AAC1B,CAAC;AAED,2BAA2B,EAAE,CAAC"}
@@ -1,52 +1,139 @@
1
- import { OnInit, OnDestroy, ChangeDetectorRef, ElementRef } from '@angular/core';
1
+ import { OnInit, OnDestroy, ChangeDetectorRef, ElementRef, ViewContainerRef } from '@angular/core';
2
2
  import { Router, ActivatedRoute } from '@angular/router';
3
- import { TestEntity, TestRunEntity, TestSuiteTestEntity } from '@memberjunction/core-entities';
3
+ import { TestEntity, TestRunEntity, TestSuiteTestEntity, TestRunFeedbackEntity } from '@memberjunction/core-entities';
4
4
  import { SharedService } from '@memberjunction/ng-shared';
5
5
  import { TestFormComponent } from '../../generated/Entities/Test/test.form.component';
6
- import { TestingDialogService } from '@memberjunction/ng-testing';
6
+ import { TestingDialogService, EvaluationPreferencesService, EvaluationPreferences } from '@memberjunction/ng-testing';
7
+ import { ToolbarConfig } from '@memberjunction/ng-code-editor';
7
8
  import * as i0 from "@angular/core";
9
+ interface HistoryDataPoint {
10
+ date: Date;
11
+ passRate: number;
12
+ avgScore: number;
13
+ avgDuration: number;
14
+ avgCost: number;
15
+ runCount: number;
16
+ passCount: number;
17
+ failCount: number;
18
+ }
19
+ interface SuitePerformance {
20
+ suiteId: string;
21
+ suiteName: string;
22
+ totalRuns: number;
23
+ passedRuns: number;
24
+ failedRuns: number;
25
+ passRate: number;
26
+ avgScore: number;
27
+ avgDuration: number;
28
+ avgCost: number;
29
+ lastRun: Date | null;
30
+ tags: string[];
31
+ }
8
32
  interface ParsedJSON {
9
- inputDefinition?: any;
10
- expectedOutcomes?: any;
11
- configuration?: any;
33
+ inputDefinition?: Record<string, unknown>;
34
+ expectedOutcomes?: Record<string, unknown>;
35
+ configuration?: Record<string, unknown>;
12
36
  tags?: string[];
13
37
  }
14
38
  export declare class TestFormComponentExtended extends TestFormComponent implements OnInit, OnDestroy {
15
39
  protected router: Router;
16
40
  protected cdr: ChangeDetectorRef;
17
41
  private testingDialogService;
42
+ private evalPrefsService;
43
+ private viewContainerRef;
18
44
  record: TestEntity;
19
45
  private destroy$;
20
46
  activeTab: string;
21
47
  loading: boolean;
48
+ loadingRuns: boolean;
49
+ loadingSuites: boolean;
22
50
  error: string | null;
23
51
  testRunsLoaded: boolean;
24
52
  suiteTestsLoaded: boolean;
53
+ isRefreshing: boolean;
25
54
  testRuns: TestRunEntity[];
26
55
  suiteTests: TestSuiteTestEntity[];
56
+ feedbackMap: Map<string, TestRunFeedbackEntity>;
57
+ historyLoaded: boolean;
58
+ loadingHistory: boolean;
59
+ historyTimeRange: '7d' | '30d' | '90d' | 'all';
60
+ historyData: HistoryDataPoint[];
61
+ suitePerformance: SuitePerformance[];
62
+ uniqueTags: string[];
63
+ selectedTagFilter: string | null;
27
64
  parsedData: ParsedJSON;
28
65
  activeJsonView: 'input' | 'expected' | 'config' | 'tags';
29
- constructor(elementRef: ElementRef, sharedService: SharedService, router: Router, route: ActivatedRoute, cdr: ChangeDetectorRef, testingDialogService: TestingDialogService);
66
+ jsonToolbar: ToolbarConfig;
67
+ keyboardShortcutsEnabled: boolean;
68
+ showShortcuts: boolean;
69
+ private shortcutsSettingEntity;
70
+ private metadata;
71
+ evalPreferences: EvaluationPreferences;
72
+ constructor(elementRef: ElementRef, sharedService: SharedService, router: Router, route: ActivatedRoute, cdr: ChangeDetectorRef, testingDialogService: TestingDialogService, evalPrefsService: EvaluationPreferencesService, viewContainerRef: ViewContainerRef);
30
73
  ngOnInit(): Promise<void>;
31
74
  ngOnDestroy(): void;
32
- private loadRelatedData;
75
+ handleKeyboardShortcut(event: KeyboardEvent): void;
33
76
  private loadTestRuns;
77
+ /**
78
+ * Load feedbacks for a batch of test run IDs
79
+ */
80
+ private loadFeedbacksForTestRuns;
81
+ /**
82
+ * Get feedback for a specific test run
83
+ */
84
+ getFeedbackForRun(testRunId: string): TestRunFeedbackEntity | undefined;
85
+ /**
86
+ * Get tooltip for status indicator
87
+ */
88
+ getStatusTooltip(status: string): string;
89
+ /**
90
+ * Get tooltip for human review with rating and optional comments
91
+ */
92
+ getHumanTooltip(rating: number, comments: string | null): string;
34
93
  private loadSuiteTests;
35
94
  private parseJsonFields;
36
95
  changeTab(tab: string): void;
37
96
  setJsonView(view: 'input' | 'expected' | 'config' | 'tags'): void;
38
97
  getStatusColor(): string;
39
98
  getStatusIcon(): string;
99
+ getStatusClass(): string;
100
+ getRunStatusColor(status: string): string;
40
101
  getPassRate(): number;
41
102
  getAverageCost(): number;
42
103
  getAverageDuration(): number;
43
104
  formatDuration(seconds: number): string;
44
105
  formatCost(cost: number): string;
106
+ formatTimeout(ms: number | null): string;
45
107
  openTestRun(runId: string): void;
108
+ getRunTags(run: TestRunEntity): string[];
46
109
  openTestSuite(suiteId: string): void;
47
110
  runTest(): Promise<void>;
48
111
  refresh(): Promise<void>;
49
- getJsonData(): any;
112
+ getJsonData(): string;
113
+ getRelativeTime(date: Date | string | null): string;
114
+ loadHistory(): Promise<void>;
115
+ private buildHistoryData;
116
+ private filterRunsByTimeRange;
117
+ private buildSuitePerformance;
118
+ setHistoryTimeRange(range: '7d' | '30d' | '90d' | 'all'): void;
119
+ setTagFilter(tag: string | null): void;
120
+ getFilteredHistoryData(): HistoryDataPoint[];
121
+ getOverallPassRate(): number;
122
+ getOverallAvgScore(): number;
123
+ getOverallAvgDuration(): number;
124
+ getOverallAvgCost(): number;
125
+ getTotalRuns(): number;
126
+ getPassRateTrend(): 'up' | 'down' | 'stable';
127
+ exportHistoryToCSV(): void;
128
+ openSuiteFromHistory(suiteId: string): void;
129
+ /**
130
+ * Load keyboard shortcuts visibility setting from user settings
131
+ */
132
+ private loadShortcutsSetting;
133
+ /**
134
+ * Toggle keyboard shortcuts visibility and save preference
135
+ */
136
+ toggleShortcuts(): Promise<void>;
50
137
  static ɵfac: i0.ɵɵFactoryDeclaration<TestFormComponentExtended, never>;
51
138
  static ɵcmp: i0.ɵɵComponentDeclaration<TestFormComponentExtended, "mj-test-form", never, {}, {}, never, never, false, never>;
52
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"test-form.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Tests/test-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAA2B,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAG/F,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;;AAElE,UAAU,UAAU;IAClB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,IAAI,CAAC,EAAE,M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ab,WAAW,IAAI,GAAG;yCAnOP,yBAAyB;2CAAzB,yBAAyB;CA4OrC;AAED,wBAAgB,6BAA6B,SAE5C"}
1
+ {"version":3,"file":"test-form.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Tests/test-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAyC,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACrJ,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAyD,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAG7K,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EACL,oBAAoB,EAEpB,4BAA4B,EAC5B,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAyB,aAAa,EAAE,MAAM,gCAAgC,CAAC;;AAKtF,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,E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