@memberjunction/ng-actions 0.0.1 → 4.0.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 (26) hide show
  1. package/dist/lib/action-param-dialog/action-param-dialog.component.d.ts +59 -0
  2. package/dist/lib/action-param-dialog/action-param-dialog.component.d.ts.map +1 -0
  3. package/dist/lib/action-param-dialog/action-param-dialog.component.js +420 -0
  4. package/dist/lib/action-param-dialog/action-param-dialog.component.js.map +1 -0
  5. package/dist/lib/action-result-code-dialog/action-result-code-dialog.component.d.ts +47 -0
  6. package/dist/lib/action-result-code-dialog/action-result-code-dialog.component.d.ts.map +1 -0
  7. package/dist/lib/action-result-code-dialog/action-result-code-dialog.component.js +209 -0
  8. package/dist/lib/action-result-code-dialog/action-result-code-dialog.component.js.map +1 -0
  9. package/dist/lib/action-test-harness/action-test-harness.component.d.ts +69 -0
  10. package/dist/lib/action-test-harness/action-test-harness.component.d.ts.map +1 -0
  11. package/dist/lib/action-test-harness/action-test-harness.component.js +852 -0
  12. package/dist/lib/action-test-harness/action-test-harness.component.js.map +1 -0
  13. package/dist/lib/action-test-harness-dialog/action-test-harness-dialog.component.d.ts +37 -0
  14. package/dist/lib/action-test-harness-dialog/action-test-harness-dialog.component.d.ts.map +1 -0
  15. package/dist/lib/action-test-harness-dialog/action-test-harness-dialog.component.js +136 -0
  16. package/dist/lib/action-test-harness-dialog/action-test-harness-dialog.component.js.map +1 -0
  17. package/dist/lib/actions.module.d.ts +13 -0
  18. package/dist/lib/actions.module.d.ts.map +1 -0
  19. package/dist/lib/actions.module.js +44 -0
  20. package/dist/lib/actions.module.js.map +1 -0
  21. package/dist/public-api.d.ts +12 -0
  22. package/dist/public-api.d.ts.map +1 -0
  23. package/dist/public-api.js +17 -0
  24. package/dist/public-api.js.map +1 -0
  25. package/package.json +41 -6
  26. package/README.md +0 -45
@@ -0,0 +1,209 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@angular/forms";
4
+ function ActionResultCodeDialogComponent_Conditional_0_Conditional_26_Template(rf, ctx) { if (rf & 1) {
5
+ const _r3 = i0.ɵɵgetCurrentView();
6
+ i0.ɵɵelementStart(0, "input", 21);
7
+ i0.ɵɵtwoWayListener("ngModelChange", function ActionResultCodeDialogComponent_Conditional_0_Conditional_26_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.IsSuccess, $event) || (ctx_r1.IsSuccess = $event); return i0.ɵɵresetView($event); });
8
+ i0.ɵɵelementEnd();
9
+ i0.ɵɵelement(1, "span", 22);
10
+ } if (rf & 2) {
11
+ const ctx_r1 = i0.ɵɵnextContext(2);
12
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.IsSuccess);
13
+ } }
14
+ function ActionResultCodeDialogComponent_Conditional_0_Conditional_28_Template(rf, ctx) { if (rf & 1) {
15
+ i0.ɵɵelement(0, "i", 23);
16
+ i0.ɵɵtext(1, " This result indicates successful execution ");
17
+ } }
18
+ function ActionResultCodeDialogComponent_Conditional_0_Conditional_29_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelement(0, "i", 24);
20
+ i0.ɵɵtext(1, " This result indicates failed or partial execution ");
21
+ } }
22
+ function ActionResultCodeDialogComponent_Conditional_0_Conditional_35_Template(rf, ctx) { if (rf & 1) {
23
+ const _r4 = i0.ɵɵgetCurrentView();
24
+ i0.ɵɵelementStart(0, "button", 25);
25
+ i0.ɵɵlistener("click", function ActionResultCodeDialogComponent_Conditional_0_Conditional_35_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnSave()); });
26
+ i0.ɵɵtext(1);
27
+ i0.ɵɵelementEnd();
28
+ } if (rf & 2) {
29
+ const ctx_r1 = i0.ɵɵnextContext(2);
30
+ i0.ɵɵproperty("disabled", !ctx_r1.CanSave);
31
+ i0.ɵɵadvance();
32
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.IsNew ? "Add" : "Save", " ");
33
+ } }
34
+ function ActionResultCodeDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
35
+ const _r1 = i0.ɵɵgetCurrentView();
36
+ i0.ɵɵelementStart(0, "div", 1);
37
+ i0.ɵɵlistener("click", function ActionResultCodeDialogComponent_Conditional_0_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnBackdropClick($event)); });
38
+ i0.ɵɵelementStart(1, "div", 2)(2, "div", 3)(3, "span", 4);
39
+ i0.ɵɵelement(4, "i", 5);
40
+ i0.ɵɵtext(5);
41
+ i0.ɵɵelementEnd();
42
+ i0.ɵɵelementStart(6, "button", 6);
43
+ i0.ɵɵlistener("click", function ActionResultCodeDialogComponent_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
44
+ i0.ɵɵelement(7, "i", 7);
45
+ i0.ɵɵelementEnd()();
46
+ i0.ɵɵelementStart(8, "div", 8)(9, "div", 9)(10, "label", 10);
47
+ i0.ɵɵtext(11, "Result Code");
48
+ i0.ɵɵelementEnd();
49
+ i0.ɵɵelementStart(12, "input", 11);
50
+ i0.ɵɵtwoWayListener("ngModelChange", function ActionResultCodeDialogComponent_Conditional_0_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Code, $event) || (ctx_r1.Code = $event); return i0.ɵɵresetView($event); });
51
+ i0.ɵɵelementEnd();
52
+ i0.ɵɵelementStart(13, "div", 12);
53
+ i0.ɵɵtext(14, "A unique code that identifies this result type");
54
+ i0.ɵɵelementEnd()();
55
+ i0.ɵɵelementStart(15, "div", 9)(16, "label", 13);
56
+ i0.ɵɵtext(17, "Description");
57
+ i0.ɵɵelementEnd();
58
+ i0.ɵɵelementStart(18, "textarea", 14);
59
+ i0.ɵɵtwoWayListener("ngModelChange", function ActionResultCodeDialogComponent_Conditional_0_Template_textarea_ngModelChange_18_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Description, $event) || (ctx_r1.Description = $event); return i0.ɵɵresetView($event); });
60
+ i0.ɵɵelementEnd();
61
+ i0.ɵɵelementStart(19, "div", 12);
62
+ i0.ɵɵtext(20, "Explain when this result code is returned");
63
+ i0.ɵɵelementEnd()();
64
+ i0.ɵɵelementStart(21, "div", 9)(22, "label", 13);
65
+ i0.ɵɵtext(23, "Success Status");
66
+ i0.ɵɵelementEnd();
67
+ i0.ɵɵelementStart(24, "div", 15)(25, "label", 16);
68
+ i0.ɵɵconditionalCreate(26, ActionResultCodeDialogComponent_Conditional_0_Conditional_26_Template, 2, 1);
69
+ i0.ɵɵelementStart(27, "span", 17);
70
+ i0.ɵɵconditionalCreate(28, ActionResultCodeDialogComponent_Conditional_0_Conditional_28_Template, 2, 0)(29, ActionResultCodeDialogComponent_Conditional_0_Conditional_29_Template, 2, 0);
71
+ i0.ɵɵelementEnd()()();
72
+ i0.ɵɵelementStart(30, "div", 12);
73
+ i0.ɵɵtext(31, "Determines if this code represents a successful outcome");
74
+ i0.ɵɵelementEnd()()();
75
+ i0.ɵɵelementStart(32, "div", 18)(33, "button", 19);
76
+ i0.ɵɵlistener("click", function ActionResultCodeDialogComponent_Conditional_0_Template_button_click_33_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
77
+ i0.ɵɵtext(34, " Cancel ");
78
+ i0.ɵɵelementEnd();
79
+ i0.ɵɵconditionalCreate(35, ActionResultCodeDialogComponent_Conditional_0_Conditional_35_Template, 2, 2, "button", 20);
80
+ i0.ɵɵelementEnd()()();
81
+ } if (rf & 2) {
82
+ const ctx_r1 = i0.ɵɵnextContext();
83
+ i0.ɵɵadvance(5);
84
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.IsNew ? "Add" : "Edit", " Result Code ");
85
+ i0.ɵɵadvance(7);
86
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Code);
87
+ i0.ɵɵproperty("disabled", !ctx_r1.EditMode);
88
+ i0.ɵɵadvance(6);
89
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Description);
90
+ i0.ɵɵproperty("disabled", !ctx_r1.EditMode);
91
+ i0.ɵɵadvance(8);
92
+ i0.ɵɵconditional(ctx_r1.EditMode ? 26 : -1);
93
+ i0.ɵɵadvance(2);
94
+ i0.ɵɵconditional(ctx_r1.IsSuccess ? 28 : 29);
95
+ i0.ɵɵadvance(7);
96
+ i0.ɵɵconditional(ctx_r1.EditMode ? 35 : -1);
97
+ } }
98
+ /**
99
+ * A dialog component for editing action result codes.
100
+ * This component provides a form for creating and editing action result codes.
101
+ *
102
+ * Usage:
103
+ * <mj-action-result-code-dialog
104
+ * [ResultCode]="myResultCode"
105
+ * [IsNew]="false"
106
+ * [EditMode]="true"
107
+ * [IsOpen]="showDialog"
108
+ * (Close)="onDialogClose($event)">
109
+ * </mj-action-result-code-dialog>
110
+ */
111
+ export class ActionResultCodeDialogComponent {
112
+ constructor() {
113
+ this._isNew = false;
114
+ this._editMode = false;
115
+ this._isOpen = false;
116
+ this.Close = new EventEmitter();
117
+ // Form fields
118
+ this.Code = '';
119
+ this.Description = '';
120
+ this.IsSuccess = false;
121
+ }
122
+ set ResultCode(value) {
123
+ this._resultCode = value;
124
+ if (value) {
125
+ this.loadResultCodeValues();
126
+ }
127
+ }
128
+ get ResultCode() {
129
+ return this._resultCode;
130
+ }
131
+ set IsNew(value) {
132
+ this._isNew = value;
133
+ }
134
+ get IsNew() {
135
+ return this._isNew;
136
+ }
137
+ set EditMode(value) {
138
+ this._editMode = value;
139
+ }
140
+ get EditMode() {
141
+ return this._editMode;
142
+ }
143
+ set IsOpen(value) {
144
+ this._isOpen = value;
145
+ if (value) {
146
+ document.body.style.overflow = 'hidden';
147
+ this.loadResultCodeValues();
148
+ }
149
+ else {
150
+ document.body.style.overflow = '';
151
+ }
152
+ }
153
+ get IsOpen() {
154
+ return this._isOpen;
155
+ }
156
+ ngOnInit() {
157
+ this.loadResultCodeValues();
158
+ }
159
+ loadResultCodeValues() {
160
+ if (this._resultCode) {
161
+ this.Code = this._resultCode.ResultCode || '';
162
+ this.Description = this._resultCode.Description || '';
163
+ this.IsSuccess = this._resultCode.IsSuccess || false;
164
+ }
165
+ }
166
+ OnSave() {
167
+ // Update the result code entity with form values
168
+ this._resultCode.ResultCode = this.Code;
169
+ this._resultCode.Description = this.Description;
170
+ this._resultCode.IsSuccess = this.IsSuccess;
171
+ // Close dialog and pass back the result
172
+ this.IsOpen = false;
173
+ this.Close.emit({ ResultCode: this._resultCode, Save: true });
174
+ }
175
+ OnCancel() {
176
+ this.IsOpen = false;
177
+ this.Close.emit({ ResultCode: this._resultCode, Save: false });
178
+ }
179
+ OnBackdropClick(event) {
180
+ if (event.target.classList.contains('dialog-backdrop')) {
181
+ this.OnCancel();
182
+ }
183
+ }
184
+ get CanSave() {
185
+ return !!this.Code && this.Code.trim().length > 0;
186
+ }
187
+ static { this.ɵfac = function ActionResultCodeDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionResultCodeDialogComponent)(); }; }
188
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionResultCodeDialogComponent, selectors: [["mj-action-result-code-dialog"]], inputs: { ResultCode: "ResultCode", IsNew: "IsNew", EditMode: "EditMode", IsOpen: "IsOpen" }, outputs: { Close: "Close" }, standalone: false, decls: 1, vars: 1, consts: [[1, "dialog-backdrop"], [1, "dialog-backdrop", 3, "click"], [1, "dialog-container"], [1, "dialog-header"], [1, "dialog-title"], [1, "fa-solid", "fa-clipboard-check"], ["title", "Close", 1, "dialog-close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "dialog-content"], [1, "form-group"], [1, "form-label", "required"], ["type", "text", "placeholder", "Enter result code (e.g., SUCCESS, ERROR_TIMEOUT)", 1, "form-input", 3, "ngModelChange", "ngModel", "disabled"], [1, "form-hint"], [1, "form-label"], ["rows", "3", "placeholder", "Describe what this result code means", 1, "form-textarea", 3, "ngModelChange", "ngModel", "disabled"], [1, "checkbox-wrapper"], [1, "checkbox-label"], [1, "checkbox-text"], [1, "dialog-footer"], [1, "btn", "btn-outline", 3, "click"], [1, "btn", "btn-primary", 3, "disabled"], ["type", "checkbox", 1, "checkbox-input", 3, "ngModelChange", "ngModel"], [1, "checkbox-custom"], [1, "fa-solid", "fa-check-circle", "success-icon"], [1, "fa-solid", "fa-times-circle", "error-icon"], [1, "btn", "btn-primary", 3, "click", "disabled"]], template: function ActionResultCodeDialogComponent_Template(rf, ctx) { if (rf & 1) {
189
+ i0.ɵɵconditionalCreate(0, ActionResultCodeDialogComponent_Conditional_0_Template, 36, 8, "div", 0);
190
+ } if (rf & 2) {
191
+ i0.ɵɵconditional(ctx.IsOpen ? 0 : -1);
192
+ } }, dependencies: [i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".dialog-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n padding: 20px;\n}\n\n.dialog-container[_ngcontent-%COMP%] {\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 100%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.dialog-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: #f8f9fa;\n border-bottom: 1px solid #e9ecef;\n}\n\n.dialog-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 1.1rem;\n font-weight: 600;\n color: #2c3e50;\n}\n\n.dialog-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6f42c1;\n}\n\n.dialog-close-btn[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n color: #6c757d;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dialog-close-btn[_ngcontent-%COMP%]:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.dialog-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n}\n\n.form-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-group[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.form-label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 6px;\n font-weight: 500;\n color: #333;\n font-size: 0.9rem;\n}\n\n.form-label.required[_ngcontent-%COMP%]::after {\n content: ' *';\n color: #dc3545;\n}\n\n.form-input[_ngcontent-%COMP%], \n.form-textarea[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-family: inherit;\n font-size: 0.95em;\n transition: border-color 0.2s, box-shadow 0.2s;\n background: white;\n}\n\n.form-input[_ngcontent-%COMP%]:disabled, \n.form-textarea[_ngcontent-%COMP%]:disabled {\n background: #f8f9fa;\n cursor: not-allowed;\n}\n\n.form-input[_ngcontent-%COMP%]:focus, \n.form-textarea[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #6f42c1;\n box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.1);\n}\n\n.form-textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 80px;\n}\n\n.form-hint[_ngcontent-%COMP%] {\n margin-top: 4px;\n font-size: 0.85rem;\n color: #6c757d;\n}\n\n.checkbox-wrapper[_ngcontent-%COMP%] {\n margin-top: 8px;\n}\n\n.checkbox-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n}\n\n.checkbox-input[_ngcontent-%COMP%] {\n display: none;\n}\n\n.checkbox-custom[_ngcontent-%COMP%] {\n width: 18px;\n height: 18px;\n border: 2px solid #ced4da;\n border-radius: 3px;\n position: relative;\n transition: all 0.2s;\n flex-shrink: 0;\n}\n\n.checkbox-input[_ngcontent-%COMP%]:checked + .checkbox-custom[_ngcontent-%COMP%] {\n background: #6f42c1;\n border-color: #6f42c1;\n}\n\n.checkbox-input[_ngcontent-%COMP%]:checked + .checkbox-custom[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n left: 5px;\n top: 1px;\n width: 4px;\n height: 9px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n\n.checkbox-text[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 0.95rem;\n}\n\n.success-icon[_ngcontent-%COMP%] {\n color: #28a745;\n}\n\n.error-icon[_ngcontent-%COMP%] {\n color: #dc3545;\n}\n\n.dialog-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 12px 20px;\n background: #f8f9fa;\n border-top: 1px solid #e9ecef;\n}\n\n\n\n.btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: 1px solid transparent;\n border-radius: 4px;\n font-size: 0.95em;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n font-family: inherit;\n}\n\n.btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.65;\n cursor: not-allowed;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background: #6f42c1;\n color: white;\n border-color: #6f42c1;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #5a32a3;\n border-color: #5a32a3;\n}\n\n.btn-outline[_ngcontent-%COMP%] {\n background: white;\n color: #495057;\n border-color: #ced4da;\n}\n\n.btn-outline[_ngcontent-%COMP%]:hover {\n background: #f8f9fa;\n border-color: #adb5bd;\n}\n\n\n\n@media (max-width: 768px) {\n .dialog-backdrop[_ngcontent-%COMP%] {\n padding: 10px;\n }\n}"] }); }
193
+ }
194
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionResultCodeDialogComponent, [{
195
+ type: Component,
196
+ args: [{ standalone: false, selector: 'mj-action-result-code-dialog', template: "@if (IsOpen) {\n <div class=\"dialog-backdrop\" (click)=\"OnBackdropClick($event)\">\n <div class=\"dialog-container\">\n <div class=\"dialog-header\">\n <span class=\"dialog-title\">\n <i class=\"fa-solid fa-clipboard-check\"></i>\n {{ IsNew ? 'Add' : 'Edit' }} Result Code\n </span>\n <button class=\"dialog-close-btn\" (click)=\"OnCancel()\" title=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"dialog-content\">\n <div class=\"form-group\">\n <label class=\"form-label required\">Result Code</label>\n <input\n type=\"text\"\n [(ngModel)]=\"Code\"\n [disabled]=\"!EditMode\"\n placeholder=\"Enter result code (e.g., SUCCESS, ERROR_TIMEOUT)\"\n class=\"form-input\">\n <div class=\"form-hint\">A unique code that identifies this result type</div>\n </div>\n\n <div class=\"form-group\">\n <label class=\"form-label\">Description</label>\n <textarea\n [(ngModel)]=\"Description\"\n [disabled]=\"!EditMode\"\n rows=\"3\"\n placeholder=\"Describe what this result code means\"\n class=\"form-textarea\"></textarea>\n <div class=\"form-hint\">Explain when this result code is returned</div>\n </div>\n\n <div class=\"form-group\">\n <label class=\"form-label\">Success Status</label>\n <div class=\"checkbox-wrapper\">\n <label class=\"checkbox-label\">\n @if (EditMode) {\n <input\n type=\"checkbox\"\n [(ngModel)]=\"IsSuccess\"\n class=\"checkbox-input\">\n <span class=\"checkbox-custom\"></span>\n }\n <span class=\"checkbox-text\">\n @if (IsSuccess) {\n <i class=\"fa-solid fa-check-circle success-icon\"></i>\n This result indicates successful execution\n } @else {\n <i class=\"fa-solid fa-times-circle error-icon\"></i>\n This result indicates failed or partial execution\n }\n </span>\n </label>\n </div>\n <div class=\"form-hint\">Determines if this code represents a successful outcome</div>\n </div>\n </div>\n\n <div class=\"dialog-footer\">\n <button class=\"btn btn-outline\" (click)=\"OnCancel()\">\n Cancel\n </button>\n @if (EditMode) {\n <button class=\"btn btn-primary\" (click)=\"OnSave()\" [disabled]=\"!CanSave\">\n {{ IsNew ? 'Add' : 'Save' }}\n </button>\n }\n </div>\n </div>\n </div>\n}\n", styles: [".dialog-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n padding: 20px;\n}\n\n.dialog-container {\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);\n max-width: 500px;\n width: 100%;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n background: #f8f9fa;\n border-bottom: 1px solid #e9ecef;\n}\n\n.dialog-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 1.1rem;\n font-weight: 600;\n color: #2c3e50;\n}\n\n.dialog-title i {\n color: #6f42c1;\n}\n\n.dialog-close-btn {\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n color: #6c757d;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dialog-close-btn:hover {\n background: #e9ecef;\n color: #495057;\n}\n\n.dialog-content {\n flex: 1;\n overflow-y: auto;\n padding: 20px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\n.form-group:last-child {\n margin-bottom: 0;\n}\n\n.form-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 500;\n color: #333;\n font-size: 0.9rem;\n}\n\n.form-label.required::after {\n content: ' *';\n color: #dc3545;\n}\n\n.form-input,\n.form-textarea {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-family: inherit;\n font-size: 0.95em;\n transition: border-color 0.2s, box-shadow 0.2s;\n background: white;\n}\n\n.form-input:disabled,\n.form-textarea:disabled {\n background: #f8f9fa;\n cursor: not-allowed;\n}\n\n.form-input:focus,\n.form-textarea:focus {\n outline: none;\n border-color: #6f42c1;\n box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.1);\n}\n\n.form-textarea {\n resize: vertical;\n min-height: 80px;\n}\n\n.form-hint {\n margin-top: 4px;\n font-size: 0.85rem;\n color: #6c757d;\n}\n\n.checkbox-wrapper {\n margin-top: 8px;\n}\n\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 10px;\n cursor: pointer;\n}\n\n.checkbox-input {\n display: none;\n}\n\n.checkbox-custom {\n width: 18px;\n height: 18px;\n border: 2px solid #ced4da;\n border-radius: 3px;\n position: relative;\n transition: all 0.2s;\n flex-shrink: 0;\n}\n\n.checkbox-input:checked + .checkbox-custom {\n background: #6f42c1;\n border-color: #6f42c1;\n}\n\n.checkbox-input:checked + .checkbox-custom::after {\n content: '';\n position: absolute;\n left: 5px;\n top: 1px;\n width: 4px;\n height: 9px;\n border: solid white;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n\n.checkbox-text {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 0.95rem;\n}\n\n.success-icon {\n color: #28a745;\n}\n\n.error-icon {\n color: #dc3545;\n}\n\n.dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 12px 20px;\n background: #f8f9fa;\n border-top: 1px solid #e9ecef;\n}\n\n/* Button styles */\n.btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: 1px solid transparent;\n border-radius: 4px;\n font-size: 0.95em;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n font-family: inherit;\n}\n\n.btn:disabled {\n opacity: 0.65;\n cursor: not-allowed;\n}\n\n.btn-primary {\n background: #6f42c1;\n color: white;\n border-color: #6f42c1;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #5a32a3;\n border-color: #5a32a3;\n}\n\n.btn-outline {\n background: white;\n color: #495057;\n border-color: #ced4da;\n}\n\n.btn-outline:hover {\n background: #f8f9fa;\n border-color: #adb5bd;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .dialog-backdrop {\n padding: 10px;\n }\n}\n"] }]
197
+ }], null, { ResultCode: [{
198
+ type: Input
199
+ }], IsNew: [{
200
+ type: Input
201
+ }], EditMode: [{
202
+ type: Input
203
+ }], IsOpen: [{
204
+ type: Input
205
+ }], Close: [{
206
+ type: Output
207
+ }] }); })();
208
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionResultCodeDialogComponent, { className: "ActionResultCodeDialogComponent", filePath: "lib/action-result-code-dialog/action-result-code-dialog.component.ts", lineNumber: 28 }); })();
209
+ //# sourceMappingURL=action-result-code-dialog.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-result-code-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/action-result-code-dialog/action-result-code-dialog.component.ts","../../../src/lib/action-result-code-dialog/action-result-code-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;;;;;ICyC/C,iCAG2B;IADvB,yUAAuB;IAF3B,iBAG2B;IAC3B,2BAAqC;;;IAFjC,gDAAuB;;;IAMvB,wBAAqD;IACrD,4DACJ;;;IACI,wBAAmD;IACnD,mEACJ;;;;IAaZ,kCAAyE;IAAzC,mNAAS,eAAQ,KAAC;IAC9C,YACJ;IAAA,iB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AAd,qCA0EC;;;iFD/CY,+BAA+B;cAN3C,SAAS;6BACI,KAAK,YACL,8BAA8B;;kBAWvC,KAAK;;kBAWL,KAAK;;kBAQL,KAAK;;kBAQL,KAAK;;kBAcL,MAAM;;kFAhDE,+BAA+B"}
@@ -0,0 +1,69 @@
1
+ import { EventEmitter, OnInit, ChangeDetectorRef, ElementRef } from '@angular/core';
2
+ import { ActionEntity, ActionParamEntity } from '@memberjunction/core-entities';
3
+ import * as i0 from "@angular/core";
4
+ export interface ActionParamValue {
5
+ Param: ActionParamEntity;
6
+ Value: unknown;
7
+ Error?: string;
8
+ }
9
+ export interface ActionResult {
10
+ Success: boolean;
11
+ Message?: string;
12
+ ResultCode?: string;
13
+ ResultData?: unknown;
14
+ }
15
+ export declare class ActionTestHarnessComponent implements OnInit {
16
+ private cdr;
17
+ ResultsSectionRef: ElementRef<HTMLDivElement>;
18
+ private _action;
19
+ private _actionParams;
20
+ private _isVisible;
21
+ set Action(value: ActionEntity);
22
+ get Action(): ActionEntity;
23
+ set ActionParams(value: ActionParamEntity[]);
24
+ get ActionParams(): ActionParamEntity[];
25
+ set IsVisible(value: boolean);
26
+ get IsVisible(): boolean;
27
+ VisibilityChange: EventEmitter<boolean>;
28
+ ExecutionComplete: EventEmitter<ActionResult>;
29
+ ParamValues: ActionParamValue[];
30
+ IsExecuting: boolean;
31
+ ExecutionResult: ActionResult | null;
32
+ ExecutionError: string | null;
33
+ ExecutionTime: number;
34
+ ShowRawResult: boolean;
35
+ SkipActionLog: boolean;
36
+ InputsCollapsed: boolean;
37
+ constructor(cdr: ChangeDetectorRef);
38
+ ngOnInit(): void;
39
+ private initializeParamValues;
40
+ /**
41
+ * Load cached input values from UserInfoEngine
42
+ */
43
+ private loadCachedInputs;
44
+ /**
45
+ * Save current input values to cache using debounced setting
46
+ */
47
+ private saveCachedInputs;
48
+ private getDefaultValue;
49
+ private parseDefaultValue;
50
+ GetInputType(param: ActionParamEntity): string;
51
+ OnParamValueChange(paramValue: ActionParamValue, event: Event): void;
52
+ GetParamDisplayValue(paramValue: ActionParamValue): string;
53
+ ValidateParams(): boolean;
54
+ ExecuteAction(): Promise<void>;
55
+ private ScrollToResults;
56
+ ToggleInputsCollapsed(): void;
57
+ ClearResults(): void;
58
+ ResetParams(): void;
59
+ CopyResultToClipboard(): void;
60
+ CopyResultDataToClipboard(): void;
61
+ GetResultIcon(): string;
62
+ GetResultColor(): string;
63
+ GetOutputParams(): ActionParamEntity[];
64
+ GetOutputParamValue(paramName: string): string;
65
+ FormatResultData(data: unknown): string;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActionTestHarnessComponent, never>;
67
+ static ɵcmp: i0.ɵɵComponentDeclaration<ActionTestHarnessComponent, "mj-action-test-harness", never, { "Action": { "alias": "Action"; "required": false; }; "ActionParams": { "alias": "ActionParams"; "required": false; }; "IsVisible": { "alias": "IsVisible"; "required": false; }; }, { "VisibilityChange": "VisibilityChange"; "ExecutionComplete": "ExecutionComplete"; }, never, never, false, never>;
68
+ }
69
+ //# sourceMappingURL=action-test-harness.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-test-harness.component.d.ts","sourceRoot":"","sources":["../../../src/lib/action-test-harness/action-test-harness.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAkB,MAAM,+BAA+B,CAAC;;AAOhG,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;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