@memberjunction/ng-actions 0.0.1 → 3.4.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 +60 -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 +424 -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 +48 -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 +213 -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 +70 -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 +850 -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 +38 -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 +140 -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 +14 -0
  18. package/dist/lib/actions.module.d.ts.map +1 -0
  19. package/dist/lib/actions.module.js +48 -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,850 @@
1
+ import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+ import { UserInfoEngine } from '@memberjunction/core-entities';
3
+ import { Metadata } from '@memberjunction/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/forms";
6
+ const _c0 = ["resultsSection"];
7
+ const _forTrack0 = ($index, $item) => $item.Param.ID;
8
+ const _forTrack1 = ($index, $item) => $item.ID;
9
+ function ActionTestHarnessComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
10
+ i0.ɵɵelementStart(0, "span", 11);
11
+ i0.ɵɵtext(1);
12
+ i0.ɵɵelementEnd();
13
+ } if (rf & 2) {
14
+ const ctx_r0 = i0.ɵɵnextContext();
15
+ i0.ɵɵadvance();
16
+ i0.ɵɵtextInterpolate1("(", ctx_r0.ParamValues.length, ")");
17
+ } }
18
+ function ActionTestHarnessComponent_Conditional_16_Conditional_0_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelementStart(0, "div", 19);
20
+ i0.ɵɵelement(1, "i", 21);
21
+ i0.ɵɵelementStart(2, "p");
22
+ i0.ɵɵtext(3, "This action has no input parameters");
23
+ i0.ɵɵelementEnd()();
24
+ } }
25
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
26
+ i0.ɵɵelementStart(0, "span", 24);
27
+ i0.ɵɵtext(1, "*");
28
+ i0.ɵɵelementEnd();
29
+ } }
30
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
31
+ i0.ɵɵelementStart(0, "span", 25);
32
+ i0.ɵɵtext(1, "Array");
33
+ i0.ɵɵelementEnd();
34
+ } }
35
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
36
+ i0.ɵɵelementStart(0, "div", 27);
37
+ i0.ɵɵtext(1);
38
+ i0.ɵɵelementEnd();
39
+ } if (rf & 2) {
40
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵtextInterpolate(paramValue_r2.Param.Description);
43
+ } }
44
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_8_Template(rf, ctx) { if (rf & 1) {
45
+ const _r3 = i0.ɵɵgetCurrentView();
46
+ i0.ɵɵelementStart(0, "textarea", 35);
47
+ i0.ɵɵlistener("change", function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_8_Template_textarea_change_0_listener($event) { i0.ɵɵrestoreView(_r3); const paramValue_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnParamValueChange(paramValue_r2, $event)); });
48
+ i0.ɵɵelementEnd();
49
+ } if (rf & 2) {
50
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
51
+ const ctx_r0 = i0.ɵɵnextContext(3);
52
+ i0.ɵɵproperty("value", ctx_r0.GetParamDisplayValue(paramValue_r2))("placeholder", paramValue_r2.Param.IsArray ? "Enter JSON array" : paramValue_r2.Param.ValueType === "Simple Object" ? "Enter JSON object" : "Enter value");
53
+ } }
54
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_9_Template(rf, ctx) { if (rf & 1) {
55
+ const _r4 = i0.ɵɵgetCurrentView();
56
+ i0.ɵɵelementStart(0, "div", 29)(1, "input", 36);
57
+ i0.ɵɵlistener("change", function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_9_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r4); const paramValue_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnParamValueChange(paramValue_r2, $event)); });
58
+ i0.ɵɵelementEnd()();
59
+ } if (rf & 2) {
60
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
61
+ i0.ɵɵadvance();
62
+ i0.ɵɵproperty("checked", paramValue_r2.Value);
63
+ } }
64
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_10_Template(rf, ctx) { if (rf & 1) {
65
+ const _r5 = i0.ɵɵgetCurrentView();
66
+ i0.ɵɵelementStart(0, "input", 37);
67
+ i0.ɵɵlistener("change", function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_10_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r5); const paramValue_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnParamValueChange(paramValue_r2, $event)); });
68
+ i0.ɵɵelementEnd();
69
+ } if (rf & 2) {
70
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
71
+ i0.ɵɵproperty("value", paramValue_r2.Value);
72
+ } }
73
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_11_Template(rf, ctx) { if (rf & 1) {
74
+ const _r6 = i0.ɵɵgetCurrentView();
75
+ i0.ɵɵelementStart(0, "input", 38);
76
+ i0.ɵɵlistener("change", function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_11_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r6); const paramValue_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnParamValueChange(paramValue_r2, $event)); });
77
+ i0.ɵɵelementEnd();
78
+ } if (rf & 2) {
79
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
80
+ i0.ɵɵproperty("value", paramValue_r2.Value);
81
+ } }
82
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_12_Template(rf, ctx) { if (rf & 1) {
83
+ const _r7 = i0.ɵɵgetCurrentView();
84
+ i0.ɵɵelementStart(0, "input", 39);
85
+ i0.ɵɵlistener("change", function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_12_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r7); const paramValue_r2 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OnParamValueChange(paramValue_r2, $event)); });
86
+ i0.ɵɵelementEnd();
87
+ } if (rf & 2) {
88
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
89
+ i0.ɵɵproperty("value", paramValue_r2.Value || "");
90
+ } }
91
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
92
+ i0.ɵɵelementStart(0, "div", 33);
93
+ i0.ɵɵelement(1, "i", 40);
94
+ i0.ɵɵtext(2);
95
+ i0.ɵɵelementEnd();
96
+ } if (rf & 2) {
97
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
98
+ i0.ɵɵadvance(2);
99
+ i0.ɵɵtextInterpolate1(" ", paramValue_r2.Error, " ");
100
+ } }
101
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_14_Template(rf, ctx) { if (rf & 1) {
102
+ i0.ɵɵelementStart(0, "div", 34);
103
+ i0.ɵɵtext(1);
104
+ i0.ɵɵelementEnd();
105
+ } if (rf & 2) {
106
+ const paramValue_r2 = i0.ɵɵnextContext().$implicit;
107
+ i0.ɵɵadvance();
108
+ i0.ɵɵtextInterpolate1(" Default: ", paramValue_r2.Param.DefaultValue, " ");
109
+ } }
110
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
111
+ i0.ɵɵelementStart(0, "div", 23)(1, "label");
112
+ i0.ɵɵtext(2);
113
+ i0.ɵɵtemplate(3, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_3_Template, 2, 0, "span", 24)(4, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_4_Template, 2, 0, "span", 25);
114
+ i0.ɵɵelementStart(5, "span", 26);
115
+ i0.ɵɵtext(6);
116
+ i0.ɵɵelementEnd()();
117
+ i0.ɵɵtemplate(7, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_7_Template, 2, 1, "div", 27)(8, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_8_Template, 1, 2, "textarea", 28)(9, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_9_Template, 2, 1, "div", 29)(10, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_10_Template, 1, 1, "input", 30)(11, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_11_Template, 1, 1, "input", 31)(12, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Case_12_Template, 1, 1, "input", 32)(13, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_13_Template, 3, 1, "div", 33)(14, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Conditional_14_Template, 2, 1, "div", 34);
118
+ i0.ɵɵelementEnd();
119
+ } if (rf & 2) {
120
+ let tmp_19_0;
121
+ const paramValue_r2 = ctx.$implicit;
122
+ const ctx_r0 = i0.ɵɵnextContext(3);
123
+ i0.ɵɵclassProp("required", paramValue_r2.Param.IsRequired)("error", paramValue_r2.Error);
124
+ i0.ɵɵadvance(2);
125
+ i0.ɵɵtextInterpolate1(" ", paramValue_r2.Param.Name, " ");
126
+ i0.ɵɵadvance();
127
+ i0.ɵɵconditional(paramValue_r2.Param.IsRequired ? 3 : -1);
128
+ i0.ɵɵadvance();
129
+ i0.ɵɵconditional(paramValue_r2.Param.IsArray ? 4 : -1);
130
+ i0.ɵɵadvance(2);
131
+ i0.ɵɵtextInterpolate(paramValue_r2.Param.ValueType);
132
+ i0.ɵɵadvance();
133
+ i0.ɵɵconditional(paramValue_r2.Param.Description ? 7 : -1);
134
+ i0.ɵɵadvance();
135
+ i0.ɵɵconditional((tmp_19_0 = ctx_r0.GetInputType(paramValue_r2.Param)) === "textarea" ? 8 : tmp_19_0 === "checkbox" ? 9 : tmp_19_0 === "number" ? 10 : tmp_19_0 === "datetime-local" ? 11 : 12);
136
+ i0.ɵɵadvance(5);
137
+ i0.ɵɵconditional(paramValue_r2.Error ? 13 : -1);
138
+ i0.ɵɵadvance();
139
+ i0.ɵɵconditional(paramValue_r2.Param.DefaultValue && !paramValue_r2.Value ? 14 : -1);
140
+ } }
141
+ function ActionTestHarnessComponent_Conditional_16_Conditional_1_Template(rf, ctx) { if (rf & 1) {
142
+ i0.ɵɵelementStart(0, "div", 20);
143
+ i0.ɵɵrepeaterCreate(1, ActionTestHarnessComponent_Conditional_16_Conditional_1_For_2_Template, 15, 12, "div", 22, _forTrack0);
144
+ i0.ɵɵelementEnd();
145
+ } if (rf & 2) {
146
+ const ctx_r0 = i0.ɵɵnextContext(2);
147
+ i0.ɵɵadvance();
148
+ i0.ɵɵrepeater(ctx_r0.ParamValues);
149
+ } }
150
+ function ActionTestHarnessComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
151
+ i0.ɵɵtemplate(0, ActionTestHarnessComponent_Conditional_16_Conditional_0_Template, 4, 0, "div", 19)(1, ActionTestHarnessComponent_Conditional_16_Conditional_1_Template, 3, 0, "div", 20);
152
+ } if (rf & 2) {
153
+ const ctx_r0 = i0.ɵɵnextContext();
154
+ i0.ɵɵconditional(ctx_r0.ParamValues.length === 0 ? 0 : 1);
155
+ } }
156
+ function ActionTestHarnessComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
157
+ i0.ɵɵelement(0, "i", 41);
158
+ i0.ɵɵtext(1, " Executing... ");
159
+ } }
160
+ function ActionTestHarnessComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
161
+ i0.ɵɵelement(0, "i", 42);
162
+ i0.ɵɵtext(1, " Execute Action ");
163
+ } }
164
+ function ActionTestHarnessComponent_Conditional_24_Template(rf, ctx) { if (rf & 1) {
165
+ const _r8 = i0.ɵɵgetCurrentView();
166
+ i0.ɵɵelementStart(0, "button", 15);
167
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_24_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.ClearResults()); });
168
+ i0.ɵɵelement(1, "i", 43);
169
+ i0.ɵɵtext(2, " Clear Results ");
170
+ i0.ɵɵelementEnd();
171
+ } }
172
+ function ActionTestHarnessComponent_Conditional_25_Conditional_10_Template(rf, ctx) { if (rf & 1) {
173
+ const _r9 = i0.ɵɵgetCurrentView();
174
+ i0.ɵɵelementStart(0, "button", 51);
175
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_25_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.CopyResultToClipboard()); });
176
+ i0.ɵɵelement(1, "i", 52);
177
+ i0.ɵɵtext(2, " Copy ");
178
+ i0.ɵɵelementEnd();
179
+ i0.ɵɵelementStart(3, "button", 51);
180
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_25_Conditional_10_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ShowRawResult = !ctx_r0.ShowRawResult); });
181
+ i0.ɵɵelement(4, "i", 53);
182
+ i0.ɵɵtext(5);
183
+ i0.ɵɵelementEnd();
184
+ } if (rf & 2) {
185
+ const ctx_r0 = i0.ɵɵnextContext(2);
186
+ i0.ɵɵadvance(5);
187
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.ShowRawResult ? "Hide" : "Show", " Raw ");
188
+ } }
189
+ function ActionTestHarnessComponent_Conditional_25_Conditional_11_Template(rf, ctx) { if (rf & 1) {
190
+ i0.ɵɵelementStart(0, "div", 49);
191
+ i0.ɵɵelement(1, "i", 54);
192
+ i0.ɵɵelementStart(2, "div", 55)(3, "h5");
193
+ i0.ɵɵtext(4, "Execution Error");
194
+ i0.ɵɵelementEnd();
195
+ i0.ɵɵelementStart(5, "p");
196
+ i0.ɵɵtext(6);
197
+ i0.ɵɵelementEnd()()();
198
+ } if (rf & 2) {
199
+ const ctx_r0 = i0.ɵɵnextContext(2);
200
+ i0.ɵɵadvance(6);
201
+ i0.ɵɵtextInterpolate(ctx_r0.ExecutionError);
202
+ } }
203
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_5_Template(rf, ctx) { if (rf & 1) {
204
+ i0.ɵɵelementStart(0, "span", 58);
205
+ i0.ɵɵtext(1);
206
+ i0.ɵɵelementEnd();
207
+ } if (rf & 2) {
208
+ const ctx_r0 = i0.ɵɵnextContext(3);
209
+ i0.ɵɵadvance();
210
+ i0.ɵɵtextInterpolate(ctx_r0.ExecutionResult.ResultCode);
211
+ } }
212
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_6_Template(rf, ctx) { if (rf & 1) {
213
+ i0.ɵɵelementStart(0, "div", 59)(1, "h5");
214
+ i0.ɵɵelement(2, "i", 61);
215
+ i0.ɵɵtext(3, " Message ");
216
+ i0.ɵɵelementEnd();
217
+ i0.ɵɵelementStart(4, "div", 62)(5, "pre", 63);
218
+ i0.ɵɵtext(6);
219
+ i0.ɵɵelementEnd()()();
220
+ } if (rf & 2) {
221
+ const ctx_r0 = i0.ɵɵnextContext(3);
222
+ i0.ɵɵadvance(6);
223
+ i0.ɵɵtextInterpolate(ctx_r0.ExecutionResult.Message);
224
+ } }
225
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_7_Template(rf, ctx) { if (rf & 1) {
226
+ const _r11 = i0.ɵɵgetCurrentView();
227
+ i0.ɵɵelementStart(0, "div", 62)(1, "div", 67)(2, "span", 68);
228
+ i0.ɵɵtext(3, "JSON");
229
+ i0.ɵɵelementEnd();
230
+ i0.ɵɵelementStart(4, "button", 69);
231
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_7_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.CopyResultDataToClipboard()); });
232
+ i0.ɵɵelement(5, "i", 52);
233
+ i0.ɵɵelementEnd()();
234
+ i0.ɵɵelementStart(6, "pre", 70);
235
+ i0.ɵɵtext(7);
236
+ i0.ɵɵelementEnd()();
237
+ } if (rf & 2) {
238
+ const ctx_r0 = i0.ɵɵnextContext(4);
239
+ i0.ɵɵadvance(7);
240
+ i0.ɵɵtextInterpolate(ctx_r0.FormatResultData(ctx_r0.ExecutionResult.ResultData));
241
+ } }
242
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_0_For_2_Template(rf, ctx) { if (rf & 1) {
243
+ i0.ɵɵelementStart(0, "div", 72)(1, "label");
244
+ i0.ɵɵelement(2, "i", 73);
245
+ i0.ɵɵtext(3);
246
+ i0.ɵɵelementEnd();
247
+ i0.ɵɵelementStart(4, "div", 74)(5, "pre", 63);
248
+ i0.ɵɵtext(6);
249
+ i0.ɵɵelementEnd()()();
250
+ } if (rf & 2) {
251
+ const outputParam_r12 = ctx.$implicit;
252
+ const ctx_r0 = i0.ɵɵnextContext(6);
253
+ i0.ɵɵadvance(3);
254
+ i0.ɵɵtextInterpolate1(" ", outputParam_r12.Name, " ");
255
+ i0.ɵɵadvance(3);
256
+ i0.ɵɵtextInterpolate(ctx_r0.GetOutputParamValue(outputParam_r12.Name));
257
+ } }
258
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
259
+ i0.ɵɵelementStart(0, "div", 71);
260
+ i0.ɵɵrepeaterCreate(1, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_0_For_2_Template, 7, 2, "div", 72, _forTrack1);
261
+ i0.ɵɵelementEnd();
262
+ } if (rf & 2) {
263
+ const ctx_r0 = i0.ɵɵnextContext(5);
264
+ i0.ɵɵadvance();
265
+ i0.ɵɵrepeater(ctx_r0.GetOutputParams());
266
+ } }
267
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
268
+ const _r13 = i0.ɵɵgetCurrentView();
269
+ i0.ɵɵelementStart(0, "div", 62)(1, "div", 67)(2, "span", 68);
270
+ i0.ɵɵtext(3, "JSON");
271
+ i0.ɵɵelementEnd();
272
+ i0.ɵɵelementStart(4, "button", 69);
273
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r13); const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.CopyResultDataToClipboard()); });
274
+ i0.ɵɵelement(5, "i", 52);
275
+ i0.ɵɵelementEnd()();
276
+ i0.ɵɵelementStart(6, "pre", 70);
277
+ i0.ɵɵtext(7);
278
+ i0.ɵɵelementEnd()();
279
+ } if (rf & 2) {
280
+ const ctx_r0 = i0.ɵɵnextContext(5);
281
+ i0.ɵɵadvance(7);
282
+ i0.ɵɵtextInterpolate(ctx_r0.FormatResultData(ctx_r0.ExecutionResult.ResultData));
283
+ } }
284
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Template(rf, ctx) { if (rf & 1) {
285
+ i0.ɵɵtemplate(0, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_0_Template, 3, 0, "div", 71)(1, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Conditional_1_Template, 8, 1, "div", 62);
286
+ } if (rf & 2) {
287
+ const ctx_r0 = i0.ɵɵnextContext(4);
288
+ i0.ɵɵconditional(ctx_r0.GetOutputParams().length > 0 ? 0 : 1);
289
+ } }
290
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Template(rf, ctx) { if (rf & 1) {
291
+ const _r10 = i0.ɵɵgetCurrentView();
292
+ i0.ɵɵelementStart(0, "div", 60)(1, "h5");
293
+ i0.ɵɵelement(2, "i", 64);
294
+ i0.ɵɵtext(3, " Result Data ");
295
+ i0.ɵɵelementStart(4, "button", 65);
296
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ShowRawResult = !ctx_r0.ShowRawResult); });
297
+ i0.ɵɵelement(5, "i", 66);
298
+ i0.ɵɵtext(6);
299
+ i0.ɵɵelementEnd()();
300
+ i0.ɵɵtemplate(7, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_7_Template, 8, 1, "div", 62)(8, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Conditional_8_Template, 2, 1);
301
+ i0.ɵɵelementEnd();
302
+ } if (rf & 2) {
303
+ const ctx_r0 = i0.ɵɵnextContext(3);
304
+ i0.ɵɵadvance(5);
305
+ i0.ɵɵclassProp("fa-code", !ctx_r0.ShowRawResult)("fa-list", ctx_r0.ShowRawResult);
306
+ i0.ɵɵadvance();
307
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.ShowRawResult ? "Formatted View" : "Raw JSON", " ");
308
+ i0.ɵɵadvance();
309
+ i0.ɵɵconditional(ctx_r0.ShowRawResult ? 7 : 8);
310
+ } }
311
+ function ActionTestHarnessComponent_Conditional_25_Conditional_12_Template(rf, ctx) { if (rf & 1) {
312
+ i0.ɵɵelementStart(0, "div", 56)(1, "div", 57);
313
+ i0.ɵɵelement(2, "i");
314
+ i0.ɵɵelementStart(3, "span");
315
+ i0.ɵɵtext(4);
316
+ i0.ɵɵelementEnd();
317
+ i0.ɵɵtemplate(5, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_5_Template, 2, 1, "span", 58);
318
+ i0.ɵɵelementEnd();
319
+ i0.ɵɵtemplate(6, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_6_Template, 7, 1, "div", 59)(7, ActionTestHarnessComponent_Conditional_25_Conditional_12_Conditional_7_Template, 9, 6, "div", 60);
320
+ i0.ɵɵelementEnd();
321
+ } if (rf & 2) {
322
+ const ctx_r0 = i0.ɵɵnextContext(2);
323
+ i0.ɵɵclassProp("failure", !ctx_r0.ExecutionResult.Success);
324
+ i0.ɵɵadvance();
325
+ i0.ɵɵstyleProp("background-color", ctx_r0.GetResultColor());
326
+ i0.ɵɵadvance();
327
+ i0.ɵɵclassMap("fa-solid " + ctx_r0.GetResultIcon());
328
+ i0.ɵɵadvance(2);
329
+ i0.ɵɵtextInterpolate(ctx_r0.ExecutionResult.Success ? "Success" : "Failed");
330
+ i0.ɵɵadvance();
331
+ i0.ɵɵconditional(ctx_r0.ExecutionResult.ResultCode ? 5 : -1);
332
+ i0.ɵɵadvance();
333
+ i0.ɵɵconditional(ctx_r0.ExecutionResult.Message ? 6 : -1);
334
+ i0.ɵɵadvance();
335
+ i0.ɵɵconditional(ctx_r0.ExecutionResult.ResultData !== null && ctx_r0.ExecutionResult.ResultData !== undefined ? 7 : -1);
336
+ } }
337
+ function ActionTestHarnessComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
338
+ i0.ɵɵelementStart(0, "div", 18, 0)(2, "div", 44)(3, "h4");
339
+ i0.ɵɵelement(4, "i", 45);
340
+ i0.ɵɵtext(5, " Execution Results ");
341
+ i0.ɵɵelementEnd();
342
+ i0.ɵɵelementStart(6, "div", 46)(7, "span", 47);
343
+ i0.ɵɵelement(8, "i", 48);
344
+ i0.ɵɵtext(9);
345
+ i0.ɵɵelementEnd();
346
+ i0.ɵɵtemplate(10, ActionTestHarnessComponent_Conditional_25_Conditional_10_Template, 6, 1);
347
+ i0.ɵɵelementEnd()();
348
+ i0.ɵɵtemplate(11, ActionTestHarnessComponent_Conditional_25_Conditional_11_Template, 7, 1, "div", 49)(12, ActionTestHarnessComponent_Conditional_25_Conditional_12_Template, 8, 10, "div", 50);
349
+ i0.ɵɵelementEnd();
350
+ } if (rf & 2) {
351
+ const ctx_r0 = i0.ɵɵnextContext();
352
+ i0.ɵɵadvance(9);
353
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.ExecutionTime, "ms ");
354
+ i0.ɵɵadvance();
355
+ i0.ɵɵconditional(ctx_r0.ExecutionResult ? 10 : -1);
356
+ i0.ɵɵadvance();
357
+ i0.ɵɵconditional(ctx_r0.ExecutionError ? 11 : -1);
358
+ i0.ɵɵadvance();
359
+ i0.ɵɵconditional(ctx_r0.ExecutionResult ? 12 : -1);
360
+ } }
361
+ // Setting key prefix for action run input caching
362
+ const ACTION_INPUT_CACHE_PREFIX = '__ACTION_DASHBOARD__action-run-inputs/';
363
+ export class ActionTestHarnessComponent {
364
+ // Input properties with getter/setters
365
+ set Action(value) {
366
+ this._action = value;
367
+ if (value && this._actionParams.length > 0) {
368
+ this.initializeParamValues();
369
+ }
370
+ }
371
+ get Action() {
372
+ return this._action;
373
+ }
374
+ set ActionParams(value) {
375
+ this._actionParams = value || [];
376
+ if (this._action && value) {
377
+ this.initializeParamValues();
378
+ }
379
+ }
380
+ get ActionParams() {
381
+ return this._actionParams;
382
+ }
383
+ set IsVisible(value) {
384
+ this._isVisible = value;
385
+ }
386
+ get IsVisible() {
387
+ return this._isVisible;
388
+ }
389
+ constructor(cdr) {
390
+ this.cdr = cdr;
391
+ this._actionParams = [];
392
+ this._isVisible = false;
393
+ this.VisibilityChange = new EventEmitter();
394
+ this.ExecutionComplete = new EventEmitter();
395
+ // Public state properties
396
+ this.ParamValues = [];
397
+ this.IsExecuting = false;
398
+ this.ExecutionResult = null;
399
+ this.ExecutionError = null;
400
+ this.ExecutionTime = 0;
401
+ this.ShowRawResult = false;
402
+ this.SkipActionLog = false;
403
+ this.InputsCollapsed = false;
404
+ }
405
+ ngOnInit() {
406
+ this.initializeParamValues();
407
+ }
408
+ initializeParamValues() {
409
+ // Initialize parameter values with defaults
410
+ this.ParamValues = this._actionParams
411
+ .filter(p => {
412
+ const type = p.Type?.trim().toLowerCase();
413
+ return type === 'input' || type === 'both';
414
+ })
415
+ .sort((a, b) => {
416
+ // Sort required params first, then by name
417
+ if (a.IsRequired !== b.IsRequired) {
418
+ return a.IsRequired ? -1 : 1;
419
+ }
420
+ return a.Name.localeCompare(b.Name);
421
+ })
422
+ .map(param => ({
423
+ Param: param,
424
+ Value: this.getDefaultValue(param)
425
+ }));
426
+ // Load cached values for this action
427
+ this.loadCachedInputs();
428
+ }
429
+ /**
430
+ * Load cached input values from UserInfoEngine
431
+ */
432
+ loadCachedInputs() {
433
+ if (!this._action?.ID)
434
+ return;
435
+ try {
436
+ const cacheKey = `${ACTION_INPUT_CACHE_PREFIX}${this._action.ID}`;
437
+ const cachedJson = UserInfoEngine.Instance.GetSetting(cacheKey);
438
+ if (cachedJson) {
439
+ const cachedValues = JSON.parse(cachedJson);
440
+ // Apply cached values to matching parameters
441
+ for (const paramValue of this.ParamValues) {
442
+ const paramName = paramValue.Param.Name;
443
+ if (paramName in cachedValues) {
444
+ paramValue.Value = cachedValues[paramName];
445
+ }
446
+ }
447
+ }
448
+ }
449
+ catch (error) {
450
+ // Silently ignore cache load errors - just use defaults
451
+ console.warn('Action Test Harness: Failed to load cached inputs', error);
452
+ }
453
+ }
454
+ /**
455
+ * Save current input values to cache using debounced setting
456
+ */
457
+ saveCachedInputs() {
458
+ if (!this._action?.ID)
459
+ return;
460
+ try {
461
+ const cacheKey = `${ACTION_INPUT_CACHE_PREFIX}${this._action.ID}`;
462
+ const values = {};
463
+ for (const paramValue of this.ParamValues) {
464
+ values[paramValue.Param.Name] = paramValue.Value;
465
+ }
466
+ // Use debounced setting to avoid excessive saves during rapid typing
467
+ UserInfoEngine.Instance.SetSettingDebounced(cacheKey, JSON.stringify(values));
468
+ }
469
+ catch (error) {
470
+ // Silently ignore cache save errors
471
+ console.warn('Action Test Harness: Failed to save cached inputs', error);
472
+ }
473
+ }
474
+ getDefaultValue(param) {
475
+ if (param.DefaultValue) {
476
+ return this.parseDefaultValue(param.DefaultValue, param.ValueType);
477
+ }
478
+ // Return appropriate empty value based on type
479
+ if (param.IsArray) {
480
+ return [];
481
+ }
482
+ switch (param.ValueType) {
483
+ case 'Scalar':
484
+ return null;
485
+ case 'Simple Object':
486
+ return {};
487
+ case 'BaseEntity Sub-Class':
488
+ return null;
489
+ default:
490
+ return null;
491
+ }
492
+ }
493
+ parseDefaultValue(defaultValue, valueType) {
494
+ try {
495
+ // Try to parse as JSON first
496
+ return JSON.parse(defaultValue);
497
+ }
498
+ catch {
499
+ // If not JSON, return as string for scalar types
500
+ if (valueType === 'Scalar') {
501
+ return defaultValue;
502
+ }
503
+ return defaultValue;
504
+ }
505
+ }
506
+ GetInputType(param) {
507
+ if (param.IsArray || param.ValueType === 'Simple Object' || param.ValueType === 'BaseEntity Sub-Class') {
508
+ return 'textarea';
509
+ }
510
+ // Try to infer from default value or name
511
+ const value = param.DefaultValue?.toLowerCase() || param.Name.toLowerCase();
512
+ if (value.includes('date') || value.includes('time')) {
513
+ return 'datetime-local';
514
+ }
515
+ if (value === 'true' || value === 'false') {
516
+ return 'checkbox';
517
+ }
518
+ if (!isNaN(Number(value))) {
519
+ return 'number';
520
+ }
521
+ return 'text';
522
+ }
523
+ OnParamValueChange(paramValue, event) {
524
+ const target = event.target;
525
+ const inputType = this.GetInputType(paramValue.Param);
526
+ if (inputType === 'checkbox') {
527
+ paramValue.Value = target.checked;
528
+ }
529
+ else if (inputType === 'number') {
530
+ paramValue.Value = target.valueAsNumber;
531
+ }
532
+ else if (inputType === 'textarea') {
533
+ // For complex types, try to parse as JSON
534
+ try {
535
+ paramValue.Value = JSON.parse(target.value);
536
+ paramValue.Error = undefined;
537
+ }
538
+ catch {
539
+ // If not valid JSON, keep as string
540
+ paramValue.Value = target.value;
541
+ if (paramValue.Param.ValueType !== 'Scalar') {
542
+ paramValue.Error = 'Invalid JSON format';
543
+ }
544
+ }
545
+ }
546
+ else {
547
+ paramValue.Value = target.value;
548
+ }
549
+ // Cache the inputs for this action (debounced)
550
+ this.saveCachedInputs();
551
+ }
552
+ GetParamDisplayValue(paramValue) {
553
+ if (paramValue.Value === null || paramValue.Value === undefined) {
554
+ return '';
555
+ }
556
+ if (typeof paramValue.Value === 'object') {
557
+ return JSON.stringify(paramValue.Value, null, 2);
558
+ }
559
+ return String(paramValue.Value);
560
+ }
561
+ ValidateParams() {
562
+ let isValid = true;
563
+ for (const paramValue of this.ParamValues) {
564
+ // Check required fields
565
+ if (paramValue.Param.IsRequired) {
566
+ if (paramValue.Value === null || paramValue.Value === undefined ||
567
+ (typeof paramValue.Value === 'string' && paramValue.Value.trim() === '') ||
568
+ (Array.isArray(paramValue.Value) && paramValue.Value.length === 0)) {
569
+ paramValue.Error = 'This field is required';
570
+ isValid = false;
571
+ }
572
+ }
573
+ // Check for JSON parse errors
574
+ if (paramValue.Error) {
575
+ isValid = false;
576
+ }
577
+ }
578
+ return isValid;
579
+ }
580
+ async ExecuteAction() {
581
+ if (!this.ValidateParams()) {
582
+ return;
583
+ }
584
+ this.IsExecuting = true;
585
+ this.ExecutionResult = null;
586
+ this.ExecutionError = null;
587
+ const startTime = Date.now();
588
+ try {
589
+ // Build parameters object
590
+ const params = {};
591
+ for (const paramValue of this.ParamValues) {
592
+ params[paramValue.Param.Name] = paramValue.Value;
593
+ }
594
+ // Execute the action using GraphQL
595
+ const query = `
596
+ mutation RunAction($input: RunActionInput!) {
597
+ RunAction(input: $input) {
598
+ Success
599
+ Message
600
+ ResultCode
601
+ ResultData
602
+ }
603
+ }
604
+ `;
605
+ // Get GraphQL data provider from Metadata
606
+ const graphQLProvider = Metadata.Provider;
607
+ // Convert params to ActionParamInput array format
608
+ const actionParams = this.ParamValues.map(paramValue => {
609
+ // Determine the actual data type for the Type field
610
+ let dataType = 'string'; // default
611
+ if (paramValue.Param.ValueType === 'Scalar') {
612
+ // For scalar, check the actual value type
613
+ if (typeof paramValue.Value === 'boolean') {
614
+ dataType = 'boolean';
615
+ }
616
+ else if (typeof paramValue.Value === 'number') {
617
+ dataType = 'number';
618
+ }
619
+ else {
620
+ dataType = 'string';
621
+ }
622
+ }
623
+ else if (paramValue.Param.ValueType === 'Simple Object') {
624
+ dataType = 'object';
625
+ }
626
+ else if (paramValue.Param.IsArray) {
627
+ dataType = 'array';
628
+ }
629
+ return {
630
+ Name: paramValue.Param.Name,
631
+ Value: paramValue.Value === null || paramValue.Value === undefined
632
+ ? null
633
+ : typeof paramValue.Value === 'object'
634
+ ? JSON.stringify(paramValue.Value)
635
+ : String(paramValue.Value),
636
+ Type: dataType
637
+ };
638
+ });
639
+ const variables = {
640
+ input: {
641
+ ActionID: this._action.ID,
642
+ Params: actionParams,
643
+ SkipActionLog: this.SkipActionLog
644
+ }
645
+ };
646
+ let result;
647
+ try {
648
+ result = await graphQLProvider.ExecuteGQL(query, variables);
649
+ }
650
+ catch (gqlError) {
651
+ const error = gqlError;
652
+ console.error('Action Test Harness: GraphQL execution failed', {
653
+ error: gqlError,
654
+ message: error?.message,
655
+ networkError: error?.networkError,
656
+ graphQLErrors: error?.graphQLErrors
657
+ });
658
+ throw gqlError;
659
+ }
660
+ this.ExecutionTime = Date.now() - startTime;
661
+ if (result?.RunAction) {
662
+ this.ExecutionResult = result.RunAction;
663
+ // If result is false/failed, it might still have an error in the data
664
+ if (!this.ExecutionResult?.Success && this.ExecutionResult?.Message) {
665
+ console.warn('Action Test Harness: Action failed with message', this.ExecutionResult.Message);
666
+ }
667
+ // Emit the execution complete event
668
+ if (this.ExecutionResult) {
669
+ this.ExecutionComplete.emit(this.ExecutionResult);
670
+ }
671
+ }
672
+ else {
673
+ console.error('Action Test Harness: No RunAction in result', {
674
+ result,
675
+ resultType: typeof result,
676
+ resultStringified: JSON.stringify(result)
677
+ });
678
+ throw new Error('No result returned from action execution');
679
+ }
680
+ }
681
+ catch (error) {
682
+ this.ExecutionTime = Date.now() - startTime;
683
+ const err = error;
684
+ this.ExecutionError = err.message || 'An unknown error occurred';
685
+ console.error('Action Test Harness: Caught error during action execution', {
686
+ error: error,
687
+ message: err?.message,
688
+ stack: err?.stack,
689
+ type: err?.constructor?.name
690
+ });
691
+ }
692
+ finally {
693
+ this.IsExecuting = false;
694
+ // Auto-collapse inputs and scroll to results
695
+ this.InputsCollapsed = true;
696
+ this.cdr.detectChanges();
697
+ // Scroll to results section after a small delay to allow DOM update
698
+ setTimeout(() => {
699
+ this.ScrollToResults();
700
+ }, 100);
701
+ }
702
+ }
703
+ ScrollToResults() {
704
+ if (this.ResultsSectionRef?.nativeElement) {
705
+ this.ResultsSectionRef.nativeElement.scrollIntoView({
706
+ behavior: 'smooth',
707
+ block: 'start'
708
+ });
709
+ }
710
+ }
711
+ ToggleInputsCollapsed() {
712
+ this.InputsCollapsed = !this.InputsCollapsed;
713
+ }
714
+ ClearResults() {
715
+ this.ExecutionResult = null;
716
+ this.ExecutionError = null;
717
+ this.ExecutionTime = 0;
718
+ }
719
+ ResetParams() {
720
+ this.initializeParamValues();
721
+ this.ClearResults();
722
+ }
723
+ CopyResultToClipboard() {
724
+ if (!this.ExecutionResult)
725
+ return;
726
+ const resultText = JSON.stringify(this.ExecutionResult, null, 2);
727
+ navigator.clipboard.writeText(resultText).catch(() => {
728
+ // Failed to copy to clipboard
729
+ });
730
+ }
731
+ CopyResultDataToClipboard() {
732
+ if (!this.ExecutionResult?.ResultData)
733
+ return;
734
+ const resultDataText = this.FormatResultData(this.ExecutionResult.ResultData);
735
+ navigator.clipboard.writeText(resultDataText).catch(() => {
736
+ // Failed to copy to clipboard
737
+ });
738
+ }
739
+ GetResultIcon() {
740
+ if (!this.ExecutionResult)
741
+ return '';
742
+ return this.ExecutionResult.Success ? 'fa-check-circle' : 'fa-times-circle';
743
+ }
744
+ GetResultColor() {
745
+ if (!this.ExecutionResult)
746
+ return '';
747
+ return this.ExecutionResult.Success ? '#28a745' : '#dc3545';
748
+ }
749
+ GetOutputParams() {
750
+ return this._actionParams.filter(p => p.Type === 'Output' || p.Type === 'Both');
751
+ }
752
+ GetOutputParamValue(paramName) {
753
+ if (!this.ExecutionResult?.ResultData)
754
+ return 'null';
755
+ const data = this.ExecutionResult.ResultData;
756
+ return this.FormatResultData(data[paramName]);
757
+ }
758
+ FormatResultData(data) {
759
+ if (data === null || data === undefined)
760
+ return 'null';
761
+ if (typeof data === 'object') {
762
+ return JSON.stringify(data, null, 2);
763
+ }
764
+ return String(data);
765
+ }
766
+ static { this.ɵfac = function ActionTestHarnessComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionTestHarnessComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
767
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionTestHarnessComponent, selectors: [["mj-action-test-harness"]], viewQuery: function ActionTestHarnessComponent_Query(rf, ctx) { if (rf & 1) {
768
+ i0.ɵɵviewQuery(_c0, 5);
769
+ } if (rf & 2) {
770
+ let _t;
771
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ResultsSectionRef = _t.first);
772
+ } }, inputs: { Action: "Action", ActionParams: "ActionParams", IsVisible: "IsVisible" }, outputs: { VisibilityChange: "VisibilityChange", ExecutionComplete: "ExecutionComplete" }, decls: 26, vars: 14, consts: [["resultsSection", ""], [1, "action-test-harness"], [1, "harness-header"], [1, "fa-solid", "fa-flask"], [1, "header-actions"], [1, "toggle-label"], ["type", "checkbox", 1, "toggle-checkbox", 3, "ngModelChange", "ngModel"], [1, "toggle-slider"], [1, "parameters-section"], [1, "section-header", "clickable", 3, "click"], [1, "fa-solid", "fa-sliders"], [1, "param-count"], [1, "collapse-icon", "fa-solid"], [1, "action-buttons"], [1, "btn", "btn-primary", "btn-large", 3, "click", "disabled"], [1, "btn", "btn-outline", 3, "click"], [1, "fa-solid", "fa-undo"], [1, "btn", "btn-outline"], [1, "results-section"], [1, "no-params"], [1, "params-grid"], [1, "fa-solid", "fa-inbox"], [1, "param-field", 3, "required", "error"], [1, "param-field"], [1, "required-indicator"], [1, "array-badge"], [1, "value-type"], [1, "param-description"], ["rows", "4", 1, "param-input", 3, "value", "placeholder"], [1, "checkbox-wrapper"], ["type", "number", "placeholder", "Enter number", 1, "param-input", 3, "value"], ["type", "datetime-local", 1, "param-input", 3, "value"], ["type", "text", "placeholder", "Enter value", 1, "param-input", 3, "value"], [1, "field-error"], [1, "default-hint"], ["rows", "4", 1, "param-input", 3, "change", "value", "placeholder"], ["type", "checkbox", 1, "param-checkbox", 3, "change", "checked"], ["type", "number", "placeholder", "Enter number", 1, "param-input", 3, "change", "value"], ["type", "datetime-local", 1, "param-input", 3, "change", "value"], ["type", "text", "placeholder", "Enter value", 1, "param-input", 3, "change", "value"], [1, "fa-solid", "fa-exclamation-circle"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-trash"], [1, "results-header"], [1, "fa-solid", "fa-poll"], [1, "execution-meta"], [1, "execution-time"], [1, "fa-solid", "fa-clock"], [1, "error-result"], [1, "success-result", 3, "failure"], [1, "btn", "btn-flat", "btn-small", 3, "click"], [1, "fa-solid", "fa-copy"], [1, "fa-solid", "fa-code"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "error-content"], [1, "success-result"], [1, "status-banner"], [1, "result-code"], [1, "result-message"], [1, "result-data"], [1, "fa-solid", "fa-message"], [1, "code-editor-container"], [1, "code-editor"], [1, "fa-solid", "fa-database"], [1, "btn", "btn-flat", "btn-small", "toggle-view-btn", 3, "click"], [1, "fa-solid"], [1, "code-editor-header"], [1, "language-badge"], [1, "btn", "btn-flat", "btn-small", "copy-btn", 3, "click"], [1, "code-editor", "json"], [1, "output-params"], [1, "output-param"], [1, "fa-solid", "fa-tag"], [1, "code-editor-container", "compact"]], template: function ActionTestHarnessComponent_Template(rf, ctx) { if (rf & 1) {
773
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "h3");
774
+ i0.ɵɵelement(3, "i", 3);
775
+ i0.ɵɵtext(4);
776
+ i0.ɵɵelementEnd();
777
+ i0.ɵɵelementStart(5, "div", 4)(6, "label", 5)(7, "input", 6);
778
+ i0.ɵɵtwoWayListener("ngModelChange", function ActionTestHarnessComponent_Template_input_ngModelChange_7_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.SkipActionLog, $event) || (ctx.SkipActionLog = $event); return $event; });
779
+ i0.ɵɵelementEnd();
780
+ i0.ɵɵelement(8, "span", 7);
781
+ i0.ɵɵtext(9, " Skip Action Log ");
782
+ i0.ɵɵelementEnd()()();
783
+ i0.ɵɵelementStart(10, "div", 8)(11, "h4", 9);
784
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Template_h4_click_11_listener() { return ctx.ToggleInputsCollapsed(); });
785
+ i0.ɵɵelement(12, "i", 10);
786
+ i0.ɵɵtext(13, " Input Parameters ");
787
+ i0.ɵɵtemplate(14, ActionTestHarnessComponent_Conditional_14_Template, 2, 1, "span", 11);
788
+ i0.ɵɵelement(15, "i", 12);
789
+ i0.ɵɵelementEnd();
790
+ i0.ɵɵtemplate(16, ActionTestHarnessComponent_Conditional_16_Template, 2, 1);
791
+ i0.ɵɵelementEnd();
792
+ i0.ɵɵelementStart(17, "div", 13)(18, "button", 14);
793
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Template_button_click_18_listener() { return ctx.ExecuteAction(); });
794
+ i0.ɵɵtemplate(19, ActionTestHarnessComponent_Conditional_19_Template, 2, 0)(20, ActionTestHarnessComponent_Conditional_20_Template, 2, 0);
795
+ i0.ɵɵelementEnd();
796
+ i0.ɵɵelementStart(21, "button", 15);
797
+ i0.ɵɵlistener("click", function ActionTestHarnessComponent_Template_button_click_21_listener() { return ctx.ResetParams(); });
798
+ i0.ɵɵelement(22, "i", 16);
799
+ i0.ɵɵtext(23, " Reset ");
800
+ i0.ɵɵelementEnd();
801
+ i0.ɵɵtemplate(24, ActionTestHarnessComponent_Conditional_24_Template, 3, 0, "button", 17);
802
+ i0.ɵɵelementEnd();
803
+ i0.ɵɵtemplate(25, ActionTestHarnessComponent_Conditional_25_Template, 13, 4, "div", 18);
804
+ i0.ɵɵelementEnd();
805
+ } if (rf & 2) {
806
+ i0.ɵɵadvance(4);
807
+ i0.ɵɵtextInterpolate1(" Test Harness for ", ctx.Action.Name, " ");
808
+ i0.ɵɵadvance(3);
809
+ i0.ɵɵtwoWayProperty("ngModel", ctx.SkipActionLog);
810
+ i0.ɵɵadvance(3);
811
+ i0.ɵɵclassProp("collapsed", ctx.InputsCollapsed);
812
+ i0.ɵɵadvance(4);
813
+ i0.ɵɵconditional(ctx.ParamValues.length > 0 ? 14 : -1);
814
+ i0.ɵɵadvance();
815
+ i0.ɵɵclassProp("fa-chevron-down", ctx.InputsCollapsed)("fa-chevron-up", !ctx.InputsCollapsed);
816
+ i0.ɵɵadvance();
817
+ i0.ɵɵconditional(!ctx.InputsCollapsed ? 16 : -1);
818
+ i0.ɵɵadvance(2);
819
+ i0.ɵɵproperty("disabled", ctx.IsExecuting || ctx.Action.Status !== "Active");
820
+ i0.ɵɵadvance();
821
+ i0.ɵɵconditional(ctx.IsExecuting ? 19 : 20);
822
+ i0.ɵɵadvance(5);
823
+ i0.ɵɵconditional(ctx.ExecutionResult || ctx.ExecutionError ? 24 : -1);
824
+ i0.ɵɵadvance();
825
+ i0.ɵɵconditional(ctx.ExecutionResult || ctx.ExecutionError ? 25 : -1);
826
+ } }, dependencies: [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel], styles: [".action-test-harness[_ngcontent-%COMP%] {\n background: white;\n border-radius: 8px;\n padding: 24px;\n max-width: 100%;\n margin: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n\n\n.action-test-harness[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n box-sizing: border-box;\n}\n\n\n\n.harness-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #e9ecef;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.harness-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.harness-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6f42c1;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n.toggle-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9em;\n color: #495057;\n}\n\n.toggle-checkbox[_ngcontent-%COMP%] {\n display: none;\n}\n\n.toggle-slider[_ngcontent-%COMP%] {\n position: relative;\n width: 36px;\n height: 20px;\n background: #dee2e6;\n border-radius: 10px;\n transition: background 0.2s;\n}\n\n.toggle-slider[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n background: white;\n border-radius: 50%;\n transition: transform 0.2s;\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n\n.toggle-checkbox[_ngcontent-%COMP%]:checked + .toggle-slider[_ngcontent-%COMP%] {\n background: #6f42c1;\n}\n\n.toggle-checkbox[_ngcontent-%COMP%]:checked + .toggle-slider[_ngcontent-%COMP%]::before {\n transform: translateX(16px);\n}\n\n\n\n.parameters-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n width: 100%;\n overflow-x: auto;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n background: #fff;\n}\n\n.parameters-section.collapsed[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n}\n\n.parameters-section[_ngcontent-%COMP%] h4.section-header[_ngcontent-%COMP%] {\n margin: 0;\n padding: 12px 16px;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n background: #f8f9fa;\n border-radius: 6px 6px 0 0;\n}\n\n.parameters-section.collapsed[_ngcontent-%COMP%] h4.section-header[_ngcontent-%COMP%] {\n border-radius: 6px;\n}\n\n.section-header.clickable[_ngcontent-%COMP%] {\n cursor: pointer;\n user-select: none;\n}\n\n.section-header.clickable[_ngcontent-%COMP%]:hover {\n background: #e9ecef;\n}\n\n.param-count[_ngcontent-%COMP%] {\n color: #6c757d;\n font-weight: 400;\n font-size: 0.9em;\n}\n\n.collapse-icon[_ngcontent-%COMP%] {\n margin-left: auto;\n color: #6c757d;\n font-size: 0.85em;\n transition: transform 0.2s ease;\n}\n\n.no-params[_ngcontent-%COMP%] {\n text-align: center;\n padding: 40px 16px;\n color: #6c757d;\n}\n\n.no-params[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 2.5em;\n margin-bottom: 12px;\n opacity: 0.3;\n display: block;\n}\n\n.params-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 16px;\n width: 100%;\n padding: 16px;\n}\n\n.param-field[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n padding: 12px;\n transition: all 0.2s;\n min-width: 0;\n overflow: hidden;\n}\n\n.param-field[_ngcontent-%COMP%]:hover {\n border-color: #dee2e6;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.param-field.required[_ngcontent-%COMP%] {\n border-left: 3px solid #ffc107;\n}\n\n.param-field.error[_ngcontent-%COMP%] {\n border-color: #dc3545;\n background: #f8d7da20;\n}\n\n.param-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n flex-wrap: wrap;\n font-size: 0.95em;\n}\n\n.required-indicator[_ngcontent-%COMP%] {\n color: #dc3545;\n}\n\n.array-badge[_ngcontent-%COMP%] {\n background: #6f42c1;\n color: white;\n padding: 2px 6px;\n border-radius: 10px;\n font-size: 0.75em;\n font-weight: 500;\n}\n\n.value-type[_ngcontent-%COMP%] {\n margin-left: auto;\n color: #6c757d;\n font-size: 0.8em;\n font-weight: 400;\n white-space: nowrap;\n}\n\n.param-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 0.9em;\n margin-bottom: 8px;\n line-height: 1.4;\n}\n\n.param-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 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;\n box-sizing: border-box;\n max-width: 100%;\n}\n\n.param-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #80bdff;\n box-shadow: 0 0 0 2px rgba(0,123,255,0.1);\n}\n\ntextarea.param-input[_ngcontent-%COMP%] {\n resize: vertical;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n}\n\n.checkbox-wrapper[_ngcontent-%COMP%] {\n padding: 8px 0;\n}\n\n.param-checkbox[_ngcontent-%COMP%] {\n width: 20px;\n height: 20px;\n cursor: pointer;\n}\n\n.field-error[_ngcontent-%COMP%] {\n margin-top: 6px;\n color: #dc3545;\n font-size: 0.85em;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.default-hint[_ngcontent-%COMP%] {\n margin-top: 6px;\n color: #6c757d;\n font-size: 0.85em;\n font-style: italic;\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:not(:disabled) {\n background: #f8f9fa;\n border-color: #adb5bd;\n}\n\n.btn-flat[_ngcontent-%COMP%] {\n background: transparent;\n color: #6c757d;\n border: none;\n padding: 4px 8px;\n}\n\n.btn-flat[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: rgba(0,0,0,0.05);\n color: #495057;\n}\n\n.btn-large[_ngcontent-%COMP%] {\n padding: 12px 24px;\n font-size: 1em;\n}\n\n.btn-small[_ngcontent-%COMP%] {\n padding: 4px 8px;\n font-size: 0.85em;\n}\n\n\n\n.action-buttons[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 6px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n\n\n.results-section[_ngcontent-%COMP%] {\n border: 2px solid #e9ecef;\n border-radius: 8px;\n overflow: hidden;\n margin-top: 20px;\n}\n\n.results-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n background: #f8f9fa;\n border-bottom: 1px solid #e9ecef;\n}\n\n.results-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.execution-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.execution-time[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 0.9em;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n\n\n.error-result[_ngcontent-%COMP%] {\n padding: 20px;\n background: #f8d7da;\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n\n.error-result[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n font-size: 1.5em;\n color: #dc3545;\n flex-shrink: 0;\n}\n\n.error-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n margin: 0 0 8px 0;\n color: #721c24;\n}\n\n.error-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: #721c24;\n}\n\n\n\n.success-result[_ngcontent-%COMP%] {\n background: white;\n}\n\n.success-result.failure[_ngcontent-%COMP%] .status-banner[_ngcontent-%COMP%] {\n background: #dc3545 !important;\n}\n\n.status-banner[_ngcontent-%COMP%] {\n padding: 16px 20px;\n color: white;\n display: flex;\n align-items: center;\n gap: 12px;\n font-weight: 600;\n font-size: 1.1em;\n}\n\n.status-banner[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1.2em;\n}\n\n.result-code[_ngcontent-%COMP%] {\n margin-left: auto;\n background: rgba(255,255,255,0.2);\n padding: 4px 10px;\n border-radius: 12px;\n font-size: 0.9em;\n}\n\n.result-message[_ngcontent-%COMP%] {\n padding: 20px;\n border-bottom: 1px solid #e9ecef;\n}\n\n.result-message[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n margin: 0 0 12px 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.result-message[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #17a2b8;\n}\n\n.result-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: #6c757d;\n line-height: 1.5;\n}\n\n.result-message[_ngcontent-%COMP%] .code-editor-container[_ngcontent-%COMP%] {\n margin-bottom: 0;\n}\n\n.result-message[_ngcontent-%COMP%] .code-editor[_ngcontent-%COMP%] {\n color: #e8e8e8;\n background: #2d2d30;\n max-height: 200px;\n overflow-y: auto;\n}\n\n\n\n.result-data[_ngcontent-%COMP%] {\n padding: 20px;\n}\n\n.result-data[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n margin: 0 0 16px 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.result-data[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6f42c1;\n}\n\n.toggle-view-btn[_ngcontent-%COMP%] {\n margin-left: auto;\n font-size: 0.85em;\n}\n\n.raw-data[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 4px;\n padding: 16px;\n margin: 0;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n\n\n.code-editor-container[_ngcontent-%COMP%] {\n background: #1e1e1e;\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 16px;\n}\n\n.code-editor-container.compact[_ngcontent-%COMP%] {\n margin-bottom: 0;\n}\n\n.code-editor-header[_ngcontent-%COMP%] {\n background: #2d2d30;\n padding: 8px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #3e3e42;\n}\n\n.language-badge[_ngcontent-%COMP%] {\n background: #007acc;\n color: white;\n padding: 2px 8px;\n border-radius: 3px;\n font-size: 0.75em;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.copy-btn[_ngcontent-%COMP%] {\n color: #cccccc;\n padding: 4px 8px;\n min-width: auto;\n}\n\n.copy-btn[_ngcontent-%COMP%]:hover {\n color: #ffffff;\n background: rgba(255, 255, 255, 0.1);\n}\n\n.code-editor[_ngcontent-%COMP%] {\n background: #1e1e1e;\n color: #d4d4d4;\n border: none;\n border-radius: 0;\n padding: 16px;\n margin: 0;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n line-height: 1.5;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.code-editor.json[_ngcontent-%COMP%] {\n \n\n color: #9cdcfe;\n}\n\n\n\n.output-params[_ngcontent-%COMP%] {\n display: grid;\n gap: 16px;\n}\n\n.output-param[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n padding: 16px;\n}\n\n.output-param[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n}\n\n.output-param[_ngcontent-%COMP%] label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6f42c1;\n font-size: 0.9em;\n}\n\n.output-value[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #dee2e6;\n border-radius: 4px;\n padding: 12px;\n}\n\n.output-value[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] {\n margin: 0;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.no-value[_ngcontent-%COMP%] {\n color: #6c757d;\n font-style: italic;\n}\n\n\n\n@media (max-width: 768px) {\n .params-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n\n .harness-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n\n .results-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n\n .action-buttons[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n }\n}"] }); }
827
+ }
828
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionTestHarnessComponent, [{
829
+ type: Component,
830
+ args: [{ selector: 'mj-action-test-harness', template: "<div class=\"action-test-harness\">\n <div class=\"harness-header\">\n <h3>\n <i class=\"fa-solid fa-flask\"></i>\n Test Harness for {{ Action.Name }}\n </h3>\n <div class=\"header-actions\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [(ngModel)]=\"SkipActionLog\"\n class=\"toggle-checkbox\">\n <span class=\"toggle-slider\"></span>\n Skip Action Log\n </label>\n </div>\n </div>\n\n <!-- Input Parameters Section -->\n <div class=\"parameters-section\" [class.collapsed]=\"InputsCollapsed\">\n <h4 class=\"section-header clickable\" (click)=\"ToggleInputsCollapsed()\">\n <i class=\"fa-solid fa-sliders\"></i>\n Input Parameters\n @if (ParamValues.length > 0) {\n <span class=\"param-count\">({{ ParamValues.length }})</span>\n }\n <i class=\"collapse-icon fa-solid\" [class.fa-chevron-down]=\"InputsCollapsed\" [class.fa-chevron-up]=\"!InputsCollapsed\"></i>\n </h4>\n\n @if (!InputsCollapsed) {\n @if (ParamValues.length === 0) {\n <div class=\"no-params\">\n <i class=\"fa-solid fa-inbox\"></i>\n <p>This action has no input parameters</p>\n </div>\n } @else {\n <div class=\"params-grid\">\n @for (paramValue of ParamValues; track paramValue.Param.ID) {\n <div class=\"param-field\" [class.required]=\"paramValue.Param.IsRequired\" [class.error]=\"paramValue.Error\">\n <label>\n {{ paramValue.Param.Name }}\n @if (paramValue.Param.IsRequired) {\n <span class=\"required-indicator\">*</span>\n }\n @if (paramValue.Param.IsArray) {\n <span class=\"array-badge\">Array</span>\n }\n <span class=\"value-type\">{{ paramValue.Param.ValueType }}</span>\n </label>\n\n @if (paramValue.Param.Description) {\n <div class=\"param-description\">{{ paramValue.Param.Description }}</div>\n }\n\n @switch (GetInputType(paramValue.Param)) {\n @case ('textarea') {\n <textarea\n [value]=\"GetParamDisplayValue(paramValue)\"\n (change)=\"OnParamValueChange(paramValue, $event)\"\n [placeholder]=\"paramValue.Param.IsArray ? 'Enter JSON array' : paramValue.Param.ValueType === 'Simple Object' ? 'Enter JSON object' : 'Enter value'\"\n rows=\"4\"\n class=\"param-input\"></textarea>\n }\n @case ('checkbox') {\n <div class=\"checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [checked]=\"paramValue.Value\"\n (change)=\"OnParamValueChange(paramValue, $event)\"\n class=\"param-checkbox\">\n </div>\n }\n @case ('number') {\n <input\n type=\"number\"\n [value]=\"paramValue.Value\"\n (change)=\"OnParamValueChange(paramValue, $event)\"\n placeholder=\"Enter number\"\n class=\"param-input\">\n }\n @case ('datetime-local') {\n <input\n type=\"datetime-local\"\n [value]=\"paramValue.Value\"\n (change)=\"OnParamValueChange(paramValue, $event)\"\n class=\"param-input\">\n }\n @default {\n <input\n type=\"text\"\n [value]=\"paramValue.Value || ''\"\n (change)=\"OnParamValueChange(paramValue, $event)\"\n placeholder=\"Enter value\"\n class=\"param-input\">\n }\n }\n\n @if (paramValue.Error) {\n <div class=\"field-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ paramValue.Error }}\n </div>\n }\n\n @if (paramValue.Param.DefaultValue && !paramValue.Value) {\n <div class=\"default-hint\">\n Default: {{ paramValue.Param.DefaultValue }}\n </div>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n\n <!-- Action Buttons -->\n <div class=\"action-buttons\">\n <button\n class=\"btn btn-primary btn-large\"\n (click)=\"ExecuteAction()\"\n [disabled]=\"IsExecuting || Action.Status !== 'Active'\">\n @if (IsExecuting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Executing...\n } @else {\n <i class=\"fa-solid fa-play\"></i> Execute Action\n }\n </button>\n\n <button\n class=\"btn btn-outline\"\n (click)=\"ResetParams()\">\n <i class=\"fa-solid fa-undo\"></i> Reset\n </button>\n\n @if (ExecutionResult || ExecutionError) {\n <button\n class=\"btn btn-outline\"\n (click)=\"ClearResults()\">\n <i class=\"fa-solid fa-trash\"></i> Clear Results\n </button>\n }\n </div>\n\n <!-- Results Section -->\n @if (ExecutionResult || ExecutionError) {\n <div class=\"results-section\" #resultsSection>\n <div class=\"results-header\">\n <h4>\n <i class=\"fa-solid fa-poll\"></i>\n Execution Results\n </h4>\n <div class=\"execution-meta\">\n <span class=\"execution-time\">\n <i class=\"fa-solid fa-clock\"></i>\n {{ ExecutionTime }}ms\n </span>\n @if (ExecutionResult) {\n <button\n class=\"btn btn-flat btn-small\"\n (click)=\"CopyResultToClipboard()\">\n <i class=\"fa-solid fa-copy\"></i> Copy\n </button>\n <button\n class=\"btn btn-flat btn-small\"\n (click)=\"ShowRawResult = !ShowRawResult\">\n <i class=\"fa-solid fa-code\"></i>\n {{ ShowRawResult ? 'Hide' : 'Show' }} Raw\n </button>\n }\n </div>\n </div>\n\n @if (ExecutionError) {\n <div class=\"error-result\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <div class=\"error-content\">\n <h5>Execution Error</h5>\n <p>{{ ExecutionError }}</p>\n </div>\n </div>\n }\n\n @if (ExecutionResult) {\n <div class=\"success-result\" [class.failure]=\"!ExecutionResult.Success\">\n <!-- Status Banner -->\n <div class=\"status-banner\" [style.background-color]=\"GetResultColor()\">\n <i [class]=\"'fa-solid ' + GetResultIcon()\"></i>\n <span>{{ ExecutionResult.Success ? 'Success' : 'Failed' }}</span>\n @if (ExecutionResult.ResultCode) {\n <span class=\"result-code\">{{ ExecutionResult.ResultCode }}</span>\n }\n </div>\n\n <!-- Message -->\n @if (ExecutionResult.Message) {\n <div class=\"result-message\">\n <h5>\n <i class=\"fa-solid fa-message\"></i> Message\n </h5>\n <div class=\"code-editor-container\">\n <pre class=\"code-editor\">{{ ExecutionResult.Message }}</pre>\n </div>\n </div>\n }\n\n <!-- Result Data -->\n @if (ExecutionResult.ResultData !== null && ExecutionResult.ResultData !== undefined) {\n <div class=\"result-data\">\n <h5>\n <i class=\"fa-solid fa-database\"></i> Result Data\n <button\n class=\"btn btn-flat btn-small toggle-view-btn\"\n (click)=\"ShowRawResult = !ShowRawResult\">\n <i class=\"fa-solid\" [class.fa-code]=\"!ShowRawResult\" [class.fa-list]=\"ShowRawResult\"></i>\n {{ ShowRawResult ? 'Formatted View' : 'Raw JSON' }}\n </button>\n </h5>\n @if (ShowRawResult) {\n <div class=\"code-editor-container\">\n <div class=\"code-editor-header\">\n <span class=\"language-badge\">JSON</span>\n <button\n class=\"btn btn-flat btn-small copy-btn\"\n (click)=\"CopyResultDataToClipboard()\">\n <i class=\"fa-solid fa-copy\"></i>\n </button>\n </div>\n <pre class=\"code-editor json\">{{ FormatResultData(ExecutionResult.ResultData) }}</pre>\n </div>\n } @else {\n <!-- Output Parameters Mapping -->\n @if (GetOutputParams().length > 0) {\n <div class=\"output-params\">\n @for (outputParam of GetOutputParams(); track outputParam.ID) {\n <div class=\"output-param\">\n <label>\n <i class=\"fa-solid fa-tag\"></i> {{ outputParam.Name }}\n </label>\n <div class=\"code-editor-container compact\">\n <pre class=\"code-editor\">{{ GetOutputParamValue(outputParam.Name) }}</pre>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"code-editor-container\">\n <div class=\"code-editor-header\">\n <span class=\"language-badge\">JSON</span>\n <button\n class=\"btn btn-flat btn-small copy-btn\"\n (click)=\"CopyResultDataToClipboard()\">\n <i class=\"fa-solid fa-copy\"></i>\n </button>\n </div>\n <pre class=\"code-editor json\">{{ FormatResultData(ExecutionResult.ResultData) }}</pre>\n </div>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [".action-test-harness {\n background: white;\n border-radius: 8px;\n padding: 24px;\n max-width: 100%;\n margin: 0;\n width: 100%;\n box-sizing: border-box;\n}\n\n/* Ensure all child elements use border-box */\n.action-test-harness * {\n box-sizing: border-box;\n}\n\n/* Header */\n.harness-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #e9ecef;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.harness-header h3 {\n margin: 0;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.harness-header h3 i {\n color: #6f42c1;\n}\n\n.header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Toggle Switch */\n.toggle-label {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 0.9em;\n color: #495057;\n}\n\n.toggle-checkbox {\n display: none;\n}\n\n.toggle-slider {\n position: relative;\n width: 36px;\n height: 20px;\n background: #dee2e6;\n border-radius: 10px;\n transition: background 0.2s;\n}\n\n.toggle-slider::before {\n content: '';\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n background: white;\n border-radius: 50%;\n transition: transform 0.2s;\n box-shadow: 0 1px 3px rgba(0,0,0,0.2);\n}\n\n.toggle-checkbox:checked + .toggle-slider {\n background: #6f42c1;\n}\n\n.toggle-checkbox:checked + .toggle-slider::before {\n transform: translateX(16px);\n}\n\n/* Parameters Section */\n.parameters-section {\n margin-bottom: 20px;\n width: 100%;\n overflow-x: auto;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n background: #fff;\n}\n\n.parameters-section.collapsed {\n margin-bottom: 12px;\n}\n\n.parameters-section h4.section-header {\n margin: 0;\n padding: 12px 16px;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n background: #f8f9fa;\n border-radius: 6px 6px 0 0;\n}\n\n.parameters-section.collapsed h4.section-header {\n border-radius: 6px;\n}\n\n.section-header.clickable {\n cursor: pointer;\n user-select: none;\n}\n\n.section-header.clickable:hover {\n background: #e9ecef;\n}\n\n.param-count {\n color: #6c757d;\n font-weight: 400;\n font-size: 0.9em;\n}\n\n.collapse-icon {\n margin-left: auto;\n color: #6c757d;\n font-size: 0.85em;\n transition: transform 0.2s ease;\n}\n\n.no-params {\n text-align: center;\n padding: 40px 16px;\n color: #6c757d;\n}\n\n.no-params i {\n font-size: 2.5em;\n margin-bottom: 12px;\n opacity: 0.3;\n display: block;\n}\n\n.params-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 16px;\n width: 100%;\n padding: 16px;\n}\n\n.param-field {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n padding: 12px;\n transition: all 0.2s;\n min-width: 0;\n overflow: hidden;\n}\n\n.param-field:hover {\n border-color: #dee2e6;\n box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n}\n\n.param-field.required {\n border-left: 3px solid #ffc107;\n}\n\n.param-field.error {\n border-color: #dc3545;\n background: #f8d7da20;\n}\n\n.param-field label {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n flex-wrap: wrap;\n font-size: 0.95em;\n}\n\n.required-indicator {\n color: #dc3545;\n}\n\n.array-badge {\n background: #6f42c1;\n color: white;\n padding: 2px 6px;\n border-radius: 10px;\n font-size: 0.75em;\n font-weight: 500;\n}\n\n.value-type {\n margin-left: auto;\n color: #6c757d;\n font-size: 0.8em;\n font-weight: 400;\n white-space: nowrap;\n}\n\n.param-description {\n color: #6c757d;\n font-size: 0.9em;\n margin-bottom: 8px;\n line-height: 1.4;\n}\n\n.param-input {\n width: 100%;\n padding: 8px 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;\n box-sizing: border-box;\n max-width: 100%;\n}\n\n.param-input:focus {\n outline: none;\n border-color: #80bdff;\n box-shadow: 0 0 0 2px rgba(0,123,255,0.1);\n}\n\ntextarea.param-input {\n resize: vertical;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n}\n\n.checkbox-wrapper {\n padding: 8px 0;\n}\n\n.param-checkbox {\n width: 20px;\n height: 20px;\n cursor: pointer;\n}\n\n.field-error {\n margin-top: 6px;\n color: #dc3545;\n font-size: 0.85em;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.default-hint {\n margin-top: 6px;\n color: #6c757d;\n font-size: 0.85em;\n font-style: italic;\n}\n\n/* Buttons */\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:not(:disabled) {\n background: #f8f9fa;\n border-color: #adb5bd;\n}\n\n.btn-flat {\n background: transparent;\n color: #6c757d;\n border: none;\n padding: 4px 8px;\n}\n\n.btn-flat:hover:not(:disabled) {\n background: rgba(0,0,0,0.05);\n color: #495057;\n}\n\n.btn-large {\n padding: 12px 24px;\n font-size: 1em;\n}\n\n.btn-small {\n padding: 4px 8px;\n font-size: 0.85em;\n}\n\n/* Action Buttons */\n.action-buttons {\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 6px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n/* Results Section */\n.results-section {\n border: 2px solid #e9ecef;\n border-radius: 8px;\n overflow: hidden;\n margin-top: 20px;\n}\n\n.results-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n background: #f8f9fa;\n border-bottom: 1px solid #e9ecef;\n}\n\n.results-header h4 {\n margin: 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.execution-meta {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.execution-time {\n color: #6c757d;\n font-size: 0.9em;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Error Result */\n.error-result {\n padding: 20px;\n background: #f8d7da;\n display: flex;\n gap: 16px;\n align-items: flex-start;\n}\n\n.error-result > i {\n font-size: 1.5em;\n color: #dc3545;\n flex-shrink: 0;\n}\n\n.error-content h5 {\n margin: 0 0 8px 0;\n color: #721c24;\n}\n\n.error-content p {\n margin: 0;\n color: #721c24;\n}\n\n/* Success Result */\n.success-result {\n background: white;\n}\n\n.success-result.failure .status-banner {\n background: #dc3545 !important;\n}\n\n.status-banner {\n padding: 16px 20px;\n color: white;\n display: flex;\n align-items: center;\n gap: 12px;\n font-weight: 600;\n font-size: 1.1em;\n}\n\n.status-banner i {\n font-size: 1.2em;\n}\n\n.result-code {\n margin-left: auto;\n background: rgba(255,255,255,0.2);\n padding: 4px 10px;\n border-radius: 12px;\n font-size: 0.9em;\n}\n\n.result-message {\n padding: 20px;\n border-bottom: 1px solid #e9ecef;\n}\n\n.result-message h5 {\n margin: 0 0 12px 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.result-message h5 i {\n color: #17a2b8;\n}\n\n.result-message p {\n margin: 0;\n color: #6c757d;\n line-height: 1.5;\n}\n\n.result-message .code-editor-container {\n margin-bottom: 0;\n}\n\n.result-message .code-editor {\n color: #e8e8e8;\n background: #2d2d30;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* Result Data */\n.result-data {\n padding: 20px;\n}\n\n.result-data h5 {\n margin: 0 0 16px 0;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.result-data h5 i {\n color: #6f42c1;\n}\n\n.toggle-view-btn {\n margin-left: auto;\n font-size: 0.85em;\n}\n\n.raw-data {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 4px;\n padding: 16px;\n margin: 0;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* Code Editor Styles */\n.code-editor-container {\n background: #1e1e1e;\n border-radius: 6px;\n overflow: hidden;\n margin-bottom: 16px;\n}\n\n.code-editor-container.compact {\n margin-bottom: 0;\n}\n\n.code-editor-header {\n background: #2d2d30;\n padding: 8px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid #3e3e42;\n}\n\n.language-badge {\n background: #007acc;\n color: white;\n padding: 2px 8px;\n border-radius: 3px;\n font-size: 0.75em;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.copy-btn {\n color: #cccccc;\n padding: 4px 8px;\n min-width: auto;\n}\n\n.copy-btn:hover {\n color: #ffffff;\n background: rgba(255, 255, 255, 0.1);\n}\n\n.code-editor {\n background: #1e1e1e;\n color: #d4d4d4;\n border: none;\n border-radius: 0;\n padding: 16px;\n margin: 0;\n font-family: 'Consolas', 'Monaco', 'Courier New', monospace;\n font-size: 13px;\n line-height: 1.5;\n overflow-x: auto;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.code-editor.json {\n /* JSON syntax highlighting simulation */\n color: #9cdcfe;\n}\n\n/* Output Parameters */\n.output-params {\n display: grid;\n gap: 16px;\n}\n\n.output-param {\n background: #f8f9fa;\n border: 1px solid #e9ecef;\n border-radius: 6px;\n padding: 16px;\n}\n\n.output-param label {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n}\n\n.output-param label i {\n color: #6f42c1;\n font-size: 0.9em;\n}\n\n.output-value {\n background: white;\n border: 1px solid #dee2e6;\n border-radius: 4px;\n padding: 12px;\n}\n\n.output-value pre {\n margin: 0;\n font-family: 'Courier New', monospace;\n font-size: 0.9em;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.no-value {\n color: #6c757d;\n font-style: italic;\n}\n\n/* Responsive */\n@media (max-width: 768px) {\n .params-grid {\n grid-template-columns: 1fr;\n }\n\n .harness-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n\n .results-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n\n .action-buttons {\n flex-wrap: wrap;\n }\n}\n"] }]
831
+ }], () => [{ type: i0.ChangeDetectorRef }], { ResultsSectionRef: [{
832
+ type: ViewChild,
833
+ args: ['resultsSection']
834
+ }], Action: [{
835
+ type: Input
836
+ }], ActionParams: [{
837
+ type: Input
838
+ }], IsVisible: [{
839
+ type: Input
840
+ }], VisibilityChange: [{
841
+ type: Output
842
+ }], ExecutionComplete: [{
843
+ type: Output
844
+ }] }); })();
845
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionTestHarnessComponent, { className: "ActionTestHarnessComponent", filePath: "lib/action-test-harness/action-test-harness.component.ts", lineNumber: 27 }); })();
846
+ // Tree-shaking prevention function
847
+ export function LoadActionTestHarnessComponent() {
848
+ // This function ensures the component is included in the bundle
849
+ }
850
+ //# sourceMappingURL=action-test-harness.component.js.map