@memberjunction/ng-record-process-studio 6.1.4 → 6.2.0-edge.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/lib/feature-pipeline-builder/feature-pipeline-builder.component.d.ts +163 -0
  2. package/dist/lib/feature-pipeline-builder/feature-pipeline-builder.component.d.ts.map +1 -0
  3. package/dist/lib/feature-pipeline-builder/feature-pipeline-builder.component.js +1400 -0
  4. package/dist/lib/feature-pipeline-builder/feature-pipeline-builder.component.js.map +1 -0
  5. package/dist/lib/record-process-editor/record-process-editor.component.d.ts +19 -1
  6. package/dist/lib/record-process-editor/record-process-editor.component.d.ts.map +1 -1
  7. package/dist/lib/record-process-editor/record-process-editor.component.js +173 -53
  8. package/dist/lib/record-process-editor/record-process-editor.component.js.map +1 -1
  9. package/dist/lib/record-process-history/record-process-history.component.d.ts +10 -0
  10. package/dist/lib/record-process-history/record-process-history.component.d.ts.map +1 -1
  11. package/dist/lib/record-process-history/record-process-history.component.js +30 -10
  12. package/dist/lib/record-process-history/record-process-history.component.js.map +1 -1
  13. package/dist/lib/record-process-studio/record-process-studio.component.d.ts +12 -0
  14. package/dist/lib/record-process-studio/record-process-studio.component.d.ts.map +1 -1
  15. package/dist/lib/record-process-studio/record-process-studio.component.js +31 -7
  16. package/dist/lib/record-process-studio/record-process-studio.component.js.map +1 -1
  17. package/dist/lib/run-detail.d.ts +4 -0
  18. package/dist/lib/run-detail.d.ts.map +1 -1
  19. package/dist/lib/run-detail.js +10 -2
  20. package/dist/lib/run-detail.js.map +1 -1
  21. package/dist/public-api.d.ts +1 -0
  22. package/dist/public-api.d.ts.map +1 -1
  23. package/dist/public-api.js +3 -1
  24. package/dist/public-api.js.map +1 -1
  25. package/package.json +10 -9
@@ -13,6 +13,7 @@ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
13
13
  import { SafeJSONParse } from '@memberjunction/global';
14
14
  import { FieldRulesBuilderComponent, EntityActionUXHostComponent } from '@memberjunction/ng-entity-action-ux';
15
15
  import { MJButtonDirective } from '@memberjunction/ng-ui-components';
16
+ import { FeaturePipelineBuilderComponent } from '../feature-pipeline-builder/feature-pipeline-builder.component';
16
17
  import * as i0 from "@angular/core";
17
18
  const _forTrack0 = ($index, $item) => $item.ID;
18
19
  function RecordProcessEditorComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
@@ -31,45 +32,45 @@ function RecordProcessEditorComponent_Conditional_1_For_40_Template(rf, ctx) { i
31
32
  i0.ɵɵadvance();
32
33
  i0.ɵɵtextInterpolate(e_r3.DisplayName || e_r3.Name);
33
34
  } }
34
- function RecordProcessEditorComponent_Conditional_1_Conditional_57_Template(rf, ctx) { if (rf & 1) {
35
+ function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template(rf, ctx) { if (rf & 1) {
35
36
  const _r4 = i0.ɵɵgetCurrentView();
36
37
  i0.ɵɵelementStart(0, "div", 13)(1, "label");
37
38
  i0.ɵɵtext(2, "Filter ");
38
- i0.ɵɵelementStart(3, "span", 24);
39
+ i0.ɵɵelementStart(3, "span", 25);
39
40
  i0.ɵɵtext(4, "\u2014 overridden by the grid selection at run time");
40
41
  i0.ɵɵelementEnd()();
41
- i0.ɵɵelementStart(5, "input", 25);
42
- i0.ɵɵlistener("input", function RecordProcessEditorComponent_Conditional_1_Conditional_57_Template_input_input_5_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.set("ScopeFilter", $event)); });
42
+ i0.ɵɵelementStart(5, "input", 26);
43
+ i0.ɵɵlistener("input", function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template_input_input_5_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.set("ScopeFilter", $event)); });
43
44
  i0.ɵɵelementEnd()();
44
45
  } if (rf & 2) {
45
46
  const ctx_r1 = i0.ɵɵnextContext(2);
46
47
  i0.ɵɵadvance(5);
47
48
  i0.ɵɵproperty("value", ctx_r1.Record.ScopeFilter || "");
48
49
  } }
49
- function RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_6_Template(rf, ctx) { if (rf & 1) {
50
- i0.ɵɵelementStart(0, "span", 26);
50
+ function RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_6_Template(rf, ctx) { if (rf & 1) {
51
+ i0.ɵɵelementStart(0, "span", 27);
51
52
  i0.ɵɵtext(1, "choose an entity first");
52
53
  i0.ɵɵelementEnd();
53
54
  } }
54
- function RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_7_Template(rf, ctx) { if (rf & 1) {
55
+ function RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_7_Template(rf, ctx) { if (rf & 1) {
55
56
  const _r5 = i0.ɵɵgetCurrentView();
56
- i0.ɵɵelementStart(0, "mj-field-rules-builder", 28);
57
- i0.ɵɵlistener("ValueChange", function RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_7_Template_mj_field_rules_builder_ValueChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onRulesChange($event)); })("ValidChange", function RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_7_Template_mj_field_rules_builder_ValidChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.RulesValid = $event); });
57
+ i0.ɵɵelementStart(0, "mj-field-rules-builder", 29);
58
+ i0.ɵɵlistener("ValueChange", function RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_7_Template_mj_field_rules_builder_ValueChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onRulesChange($event)); })("ValidChange", function RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_7_Template_mj_field_rules_builder_ValidChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.RulesValid = $event); });
58
59
  i0.ɵɵelementEnd();
59
60
  } if (rf & 2) {
60
61
  const ctx_r1 = i0.ɵɵnextContext(3);
61
62
  i0.ɵɵproperty("EntityName", ctx_r1.SelectedEntityName)("Value", ctx_r1.RuleSet)("Provider", ctx_r1.Provider);
62
63
  } }
63
- function RecordProcessEditorComponent_Conditional_1_Conditional_58_Template(rf, ctx) { if (rf & 1) {
64
+ function RecordProcessEditorComponent_Conditional_1_Conditional_60_Template(rf, ctx) { if (rf & 1) {
64
65
  i0.ɵɵelementStart(0, "section", 3)(1, "div", 4)(2, "span", 5);
65
66
  i0.ɵɵtext(3, "3");
66
67
  i0.ɵɵelementEnd();
67
68
  i0.ɵɵelementStart(4, "h3");
68
69
  i0.ɵɵtext(5, "Rules");
69
70
  i0.ɵɵelementEnd();
70
- i0.ɵɵconditionalCreate(6, RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_6_Template, 2, 0, "span", 26);
71
+ i0.ɵɵconditionalCreate(6, RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_6_Template, 2, 0, "span", 27);
71
72
  i0.ɵɵelementEnd();
72
- i0.ɵɵconditionalCreate(7, RecordProcessEditorComponent_Conditional_1_Conditional_58_Conditional_7_Template, 1, 3, "mj-field-rules-builder", 27);
73
+ i0.ɵɵconditionalCreate(7, RecordProcessEditorComponent_Conditional_1_Conditional_60_Conditional_7_Template, 1, 3, "mj-field-rules-builder", 28);
73
74
  i0.ɵɵelementEnd();
74
75
  } if (rf & 2) {
75
76
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -78,9 +79,41 @@ function RecordProcessEditorComponent_Conditional_1_Conditional_58_Template(rf,
78
79
  i0.ɵɵadvance();
79
80
  i0.ɵɵconditional(ctx_r1.SelectedEntityName ? 7 : -1);
80
81
  } }
81
- function RecordProcessEditorComponent_Conditional_1_Conditional_59_Conditional_9_Template(rf, ctx) { if (rf & 1) {
82
- i0.ɵɵelementStart(0, "span", 34);
83
- i0.ɵɵelement(1, "i", 35);
82
+ function RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_6_Template(rf, ctx) { if (rf & 1) {
83
+ i0.ɵɵelementStart(0, "span", 27);
84
+ i0.ɵɵtext(1, "choose an entity first");
85
+ i0.ɵɵelementEnd();
86
+ } }
87
+ function RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_7_Template(rf, ctx) { if (rf & 1) {
88
+ const _r6 = i0.ɵɵgetCurrentView();
89
+ i0.ɵɵelementStart(0, "mj-feature-pipeline-builder", 31);
90
+ i0.ɵɵlistener("ValidChange", function RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_7_Template_mj_feature_pipeline_builder_ValidChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.FeaturePipelineValid = $event); })("SpecChange", function RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_7_Template_mj_feature_pipeline_builder_SpecChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onFeaturePipelineSpecChange($event)); });
91
+ i0.ɵɵelementEnd();
92
+ } if (rf & 2) {
93
+ const ctx_r1 = i0.ɵɵnextContext(3);
94
+ i0.ɵɵproperty("Record", ctx_r1.Record)("EntityID", ctx_r1.Record.EntityID);
95
+ } }
96
+ function RecordProcessEditorComponent_Conditional_1_Conditional_61_Template(rf, ctx) { if (rf & 1) {
97
+ i0.ɵɵelementStart(0, "section", 3)(1, "div", 4)(2, "span", 5);
98
+ i0.ɵɵtext(3, "3");
99
+ i0.ɵɵelementEnd();
100
+ i0.ɵɵelementStart(4, "h3");
101
+ i0.ɵɵtext(5, "Feature Pipeline Configuration");
102
+ i0.ɵɵelementEnd();
103
+ i0.ɵɵconditionalCreate(6, RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_6_Template, 2, 0, "span", 27);
104
+ i0.ɵɵelementEnd();
105
+ i0.ɵɵconditionalCreate(7, RecordProcessEditorComponent_Conditional_1_Conditional_61_Conditional_7_Template, 1, 2, "mj-feature-pipeline-builder", 30);
106
+ i0.ɵɵelementEnd();
107
+ } if (rf & 2) {
108
+ const ctx_r1 = i0.ɵɵnextContext(2);
109
+ i0.ɵɵadvance(6);
110
+ i0.ɵɵconditional(!ctx_r1.SelectedEntityName ? 6 : -1);
111
+ i0.ɵɵadvance();
112
+ i0.ɵɵconditional(ctx_r1.SelectedEntityName ? 7 : -1);
113
+ } }
114
+ function RecordProcessEditorComponent_Conditional_1_Conditional_62_Conditional_9_Template(rf, ctx) { if (rf & 1) {
115
+ i0.ɵɵelementStart(0, "span", 37);
116
+ i0.ɵɵelement(1, "i", 38);
84
117
  i0.ɵɵtext(2);
85
118
  i0.ɵɵelementEnd();
86
119
  } if (rf & 2) {
@@ -88,23 +121,23 @@ function RecordProcessEditorComponent_Conditional_1_Conditional_59_Conditional_9
88
121
  i0.ɵɵadvance(2);
89
122
  i0.ɵɵtextInterpolate1(" ", ctx_r1.ErrorMessage);
90
123
  } }
91
- function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template(rf, ctx) { if (rf & 1) {
92
- const _r6 = i0.ɵɵgetCurrentView();
93
- i0.ɵɵelementStart(0, "div", 22)(1, "button", 29);
94
- i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Save()); });
95
- i0.ɵɵelement(2, "i", 30);
124
+ function RecordProcessEditorComponent_Conditional_1_Conditional_62_Template(rf, ctx) { if (rf & 1) {
125
+ const _r7 = i0.ɵɵgetCurrentView();
126
+ i0.ɵɵelementStart(0, "div", 23)(1, "button", 32);
127
+ i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_62_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Save()); });
128
+ i0.ɵɵelement(2, "i", 33);
96
129
  i0.ɵɵtext(3, " Save ");
97
130
  i0.ɵɵelementEnd();
98
- i0.ɵɵelementStart(4, "button", 31);
99
- i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Preview()); });
100
- i0.ɵɵelement(5, "i", 32);
131
+ i0.ɵɵelementStart(4, "button", 34);
132
+ i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_62_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Preview()); });
133
+ i0.ɵɵelement(5, "i", 35);
101
134
  i0.ɵɵtext(6, " Preview changes");
102
135
  i0.ɵɵelementEnd();
103
- i0.ɵɵelementStart(7, "button", 33);
104
- i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Cancel()); });
136
+ i0.ɵɵelementStart(7, "button", 36);
137
+ i0.ɵɵlistener("click", function RecordProcessEditorComponent_Conditional_1_Conditional_62_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Cancel()); });
105
138
  i0.ɵɵtext(8, "Cancel");
106
139
  i0.ɵɵelementEnd();
107
- i0.ɵɵconditionalCreate(9, RecordProcessEditorComponent_Conditional_1_Conditional_59_Conditional_9_Template, 3, 1, "span", 34);
140
+ i0.ɵɵconditionalCreate(9, RecordProcessEditorComponent_Conditional_1_Conditional_62_Conditional_9_Template, 3, 1, "span", 37);
108
141
  i0.ɵɵelementEnd();
109
142
  } if (rf & 2) {
110
143
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -117,10 +150,10 @@ function RecordProcessEditorComponent_Conditional_1_Conditional_59_Template(rf,
117
150
  i0.ɵɵadvance(5);
118
151
  i0.ɵɵconditional(ctx_r1.ErrorMessage ? 9 : -1);
119
152
  } }
120
- function RecordProcessEditorComponent_Conditional_1_Conditional_60_Template(rf, ctx) { if (rf & 1) {
121
- const _r7 = i0.ɵɵgetCurrentView();
122
- i0.ɵɵelementStart(0, "mj-entity-action-ux-host", 36);
123
- i0.ɵɵlistener("Completed", function RecordProcessEditorComponent_Conditional_1_Conditional_60_Template_mj_entity_action_ux_host_Completed_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPreviewDone($event)); })("Cancelled", function RecordProcessEditorComponent_Conditional_1_Conditional_60_Template_mj_entity_action_ux_host_Cancelled_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.PreviewDriver = null); });
153
+ function RecordProcessEditorComponent_Conditional_1_Conditional_63_Template(rf, ctx) { if (rf & 1) {
154
+ const _r8 = i0.ɵɵgetCurrentView();
155
+ i0.ɵɵelementStart(0, "mj-entity-action-ux-host", 39);
156
+ i0.ɵɵlistener("Completed", function RecordProcessEditorComponent_Conditional_1_Conditional_63_Template_mj_entity_action_ux_host_Completed_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPreviewDone($event)); })("Cancelled", function RecordProcessEditorComponent_Conditional_1_Conditional_63_Template_mj_entity_action_ux_host_Cancelled_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.PreviewDriver = null); });
124
157
  i0.ɵɵelementEnd();
125
158
  } if (rf & 2) {
126
159
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -197,13 +230,17 @@ function RecordProcessEditorComponent_Conditional_1_Template(rf, ctx) { if (rf &
197
230
  i0.ɵɵlistener("change", function RecordProcessEditorComponent_Conditional_1_Template_select_change_54_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.set("WorkType", $event)); });
198
231
  i0.ɵɵelementStart(55, "option", 21);
199
232
  i0.ɵɵtext(56, "Field Rules");
233
+ i0.ɵɵelementEnd();
234
+ i0.ɵɵelementStart(57, "option", 22);
235
+ i0.ɵɵtext(58, "Feature Pipeline (Infer)");
200
236
  i0.ɵɵelementEnd()()()();
201
- i0.ɵɵconditionalCreate(57, RecordProcessEditorComponent_Conditional_1_Conditional_57_Template, 6, 1, "div", 13);
237
+ i0.ɵɵconditionalCreate(59, RecordProcessEditorComponent_Conditional_1_Conditional_59_Template, 6, 1, "div", 13);
202
238
  i0.ɵɵelementEnd();
203
- i0.ɵɵconditionalCreate(58, RecordProcessEditorComponent_Conditional_1_Conditional_58_Template, 8, 2, "section", 3);
204
- i0.ɵɵconditionalCreate(59, RecordProcessEditorComponent_Conditional_1_Conditional_59_Template, 10, 9, "div", 22);
239
+ i0.ɵɵconditionalCreate(60, RecordProcessEditorComponent_Conditional_1_Conditional_60_Template, 8, 2, "section", 3);
240
+ i0.ɵɵconditionalCreate(61, RecordProcessEditorComponent_Conditional_1_Conditional_61_Template, 8, 2, "section", 3);
241
+ i0.ɵɵconditionalCreate(62, RecordProcessEditorComponent_Conditional_1_Conditional_62_Template, 10, 9, "div", 23);
205
242
  i0.ɵɵelementEnd();
206
- i0.ɵɵconditionalCreate(60, RecordProcessEditorComponent_Conditional_1_Conditional_60_Template, 1, 2, "mj-entity-action-ux-host", 23);
243
+ i0.ɵɵconditionalCreate(63, RecordProcessEditorComponent_Conditional_1_Conditional_63_Template, 1, 2, "mj-entity-action-ux-host", 24);
207
244
  } if (rf & 2) {
208
245
  const ctx_r1 = i0.ɵɵnextContext();
209
246
  i0.ɵɵadvance(11);
@@ -220,14 +257,16 @@ function RecordProcessEditorComponent_Conditional_1_Template(rf, ctx) { if (rf &
220
257
  i0.ɵɵproperty("value", ctx_r1.Record.ScopeType || "Filter");
221
258
  i0.ɵɵadvance(10);
222
259
  i0.ɵɵproperty("value", ctx_r1.Record.WorkType || "FieldRules");
223
- i0.ɵɵadvance(3);
224
- i0.ɵɵconditional(ctx_r1.Record.ScopeType === "Filter" ? 57 : -1);
260
+ i0.ɵɵadvance(5);
261
+ i0.ɵɵconditional(ctx_r1.Record.ScopeType === "Filter" ? 59 : -1);
262
+ i0.ɵɵadvance();
263
+ i0.ɵɵconditional(ctx_r1.Record.WorkType === "FieldRules" ? 60 : -1);
225
264
  i0.ɵɵadvance();
226
- i0.ɵɵconditional(ctx_r1.Record.WorkType === "FieldRules" ? 58 : -1);
265
+ i0.ɵɵconditional(ctx_r1.Record.WorkType === "Infer" ? 61 : -1);
227
266
  i0.ɵɵadvance();
228
- i0.ɵɵconditional(ctx_r1.ShowToolbar ? 59 : -1);
267
+ i0.ɵɵconditional(ctx_r1.ShowToolbar ? 62 : -1);
229
268
  i0.ɵɵadvance();
230
- i0.ɵɵconditional(ctx_r1.PreviewDriver ? 60 : -1);
269
+ i0.ɵɵconditional(ctx_r1.PreviewDriver ? 63 : -1);
231
270
  } }
232
271
  export class RecordProcessEditorComponent extends BaseAngularComponent {
233
272
  cdr = inject(ChangeDetectorRef);
@@ -237,6 +276,10 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
237
276
  RecordProcessID = null;
238
277
  /** Default EntityID for a brand-new process (e.g. the grid the user came from). */
239
278
  DefaultEntityID = null;
279
+ /** Default WorkType for a brand-new process (e.g. 'Infer' when opened from Feature Pipelines). */
280
+ DefaultWorkType = null;
281
+ /** Default CategoryID for a brand-new process (e.g. Feature Pipeline category ID). */
282
+ DefaultCategoryID = null;
240
283
  /** Show the built-in Save / Preview / Cancel toolbar. Set false when an outer form owns Save. */
241
284
  ShowToolbar = true;
242
285
  /** Emitted after a successful Save (the persisted record). */
@@ -247,11 +290,27 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
247
290
  SelectedEntityName = '';
248
291
  RuleSet = { Rules: [] };
249
292
  RulesValid = true;
293
+ FeaturePipelineValid = true;
294
+ FeaturePipelineSpec = null;
250
295
  Saving = false;
251
296
  ErrorMessage = '';
252
297
  PreviewDriver = null;
253
- get CanSave() { return !!this.Record?.Name && !!this.Record?.EntityID && this.RulesValid; }
254
- get CanPreview() { return this.CanSave && this.RuleSet.Rules.length > 0; }
298
+ get CanSave() {
299
+ if (!this.Record?.Name || !this.Record?.EntityID)
300
+ return false;
301
+ if (this.Record.WorkType === 'FieldRules')
302
+ return this.RulesValid;
303
+ if (this.Record.WorkType === 'Infer')
304
+ return this.FeaturePipelineValid && !!this.Record.PromptID;
305
+ return true;
306
+ }
307
+ get CanPreview() {
308
+ if (this.Record?.WorkType === 'FieldRules')
309
+ return this.CanSave && this.RuleSet.Rules.length > 0;
310
+ if (this.Record?.WorkType === 'Infer')
311
+ return this.CanSave;
312
+ return false;
313
+ }
255
314
  async ngOnInit() {
256
315
  const provider = this.ProviderToUse;
257
316
  this.Entities = [...provider.Entities].sort((a, b) => (a.DisplayName || a.Name).localeCompare(b.DisplayName || b.Name));
@@ -267,19 +326,26 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
267
326
  }
268
327
  else {
269
328
  this.Record.NewRecord();
270
- this.Record.WorkType = 'FieldRules';
329
+ this.Record.WorkType = this.DefaultWorkType ?? 'FieldRules';
271
330
  this.Record.ScopeType = 'Filter';
272
331
  this.Record.Status = 'Draft';
273
332
  if (this.DefaultEntityID)
274
333
  this.Record.EntityID = this.DefaultEntityID;
334
+ if (this.DefaultCategoryID)
335
+ this.Record.CategoryID = this.DefaultCategoryID;
275
336
  }
276
337
  }
277
- this.RuleSet = this.Record.Configuration ? (SafeJSONParse(this.Record.Configuration) ?? { Rules: [] }) : { Rules: [] };
338
+ if (this.Record.WorkType === 'FieldRules') {
339
+ this.RuleSet = this.Record.Configuration ? (SafeJSONParse(this.Record.Configuration) ?? { Rules: [] }) : { Rules: [] };
340
+ }
341
+ else if (this.Record.WorkType === 'Infer') {
342
+ this.FeaturePipelineSpec = this.Record.Configuration ? SafeJSONParse(this.Record.Configuration) : null;
343
+ }
278
344
  this.resolveEntityName();
279
345
  this.cdr.detectChanges();
280
346
  }
281
347
  /** Generic setter for the simple string/enum fields, driven by the template inputs. */
282
- set(field, event) {
348
+ Set(field, event) {
283
349
  if (!this.Record)
284
350
  return;
285
351
  const value = event.target.value;
@@ -306,19 +372,42 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
306
372
  }
307
373
  this.cdr.detectChanges();
308
374
  }
309
- onEntityChange(event) {
375
+ /** @deprecated Use {@link Set}. */
376
+ set(field, event) {
377
+ return this.Set(field, event);
378
+ }
379
+ OnEntityChange(event) {
310
380
  if (!this.Record)
311
381
  return;
312
382
  this.Record.EntityID = event.target.value;
313
383
  this.resolveEntityName();
314
384
  this.cdr.detectChanges();
315
385
  }
316
- onRulesChange(ruleSet) {
386
+ /** @deprecated Use {@link OnEntityChange}. */
387
+ onEntityChange(event) {
388
+ return this.OnEntityChange(event);
389
+ }
390
+ OnRulesChange(ruleSet) {
317
391
  this.RuleSet = ruleSet;
318
392
  if (this.Record)
319
393
  this.Record.Configuration = JSON.stringify(ruleSet);
320
394
  this.cdr.detectChanges();
321
395
  }
396
+ /** @deprecated Use {@link OnRulesChange}. */
397
+ onRulesChange(ruleSet) {
398
+ return this.OnRulesChange(ruleSet);
399
+ }
400
+ OnFeaturePipelineSpecChange(spec) {
401
+ this.FeaturePipelineSpec = spec;
402
+ if (this.Record) {
403
+ this.Record.Configuration = JSON.stringify(spec);
404
+ }
405
+ this.cdr.detectChanges();
406
+ }
407
+ /** @deprecated Use {@link OnFeaturePipelineSpecChange}. */
408
+ onFeaturePipelineSpecChange(spec) {
409
+ return this.OnFeaturePipelineSpecChange(spec);
410
+ }
322
411
  /** Saves the record (and emits). Returns success. */
323
412
  async Save() {
324
413
  if (!this.Record || !this.CanSave)
@@ -326,7 +415,12 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
326
415
  this.Saving = true;
327
416
  this.ErrorMessage = '';
328
417
  this.cdr.detectChanges();
329
- this.Record.Configuration = JSON.stringify(this.RuleSet);
418
+ if (this.Record.WorkType === 'FieldRules') {
419
+ this.Record.Configuration = JSON.stringify(this.RuleSet);
420
+ }
421
+ else if (this.Record.WorkType === 'Infer' && this.FeaturePipelineSpec) {
422
+ this.Record.Configuration = JSON.stringify(this.FeaturePipelineSpec);
423
+ }
330
424
  const ok = await this.Record.Save();
331
425
  this.Saving = false;
332
426
  if (ok) {
@@ -368,24 +462,28 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
368
462
  };
369
463
  this.cdr.detectChanges();
370
464
  }
371
- onPreviewDone(_result) {
465
+ OnPreviewDone(_result) {
372
466
  this.PreviewDriver = null;
373
467
  this.cdr.detectChanges();
374
468
  }
469
+ /** @deprecated Use {@link OnPreviewDone}. */
470
+ onPreviewDone(_result) {
471
+ return this.OnPreviewDone(_result);
472
+ }
375
473
  Cancel() { this.Cancelled.emit(); }
376
474
  resolveEntityName() {
377
475
  this.SelectedEntityName = this.Record?.EntityID ? (this.ProviderToUse.EntityByID(this.Record.EntityID)?.Name ?? '') : '';
378
476
  }
379
477
  static ɵfac = /*@__PURE__*/ (() => { let ɵRecordProcessEditorComponent_BaseFactory; return function RecordProcessEditorComponent_Factory(__ngFactoryType__) { return (ɵRecordProcessEditorComponent_BaseFactory || (ɵRecordProcessEditorComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RecordProcessEditorComponent)))(__ngFactoryType__ || RecordProcessEditorComponent); }; })();
380
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecordProcessEditorComponent, selectors: [["mj-record-process-editor"]], inputs: { Record: "Record", RecordProcessID: "RecordProcessID", DefaultEntityID: "DefaultEntityID", ShowToolbar: "ShowToolbar" }, outputs: { Saved: "Saved", Cancelled: "Cancelled" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "rpe-loading"], [1, "fa-solid", "fa-circle-notch", "fa-spin"], [1, "rpe"], [1, "rpe-sec"], [1, "rpe-sec-h"], [1, "num"], [1, "rpe-grid2"], [1, "field"], ["placeholder", "e.g. Mark idle prompts for review", 1, "mj-input", 3, "input", "value"], [1, "mj-input", 3, "change", "value"], ["value", "Draft"], ["value", "Active"], ["value", "Disabled"], [1, "field", "rpe-mt"], ["placeholder", "What does this process do?", 1, "mj-input", 3, "input", "value"], [1, "rpe-grid3"], ["value", "", "disabled", ""], [3, "value"], ["value", "Filter"], ["value", "View"], ["value", "List"], ["value", "FieldRules"], [1, "rpe-bar"], [3, "DriverClass", "Context"], [1, "muted"], ["placeholder", "e.g. Status = 'Active'", 1, "mj-input", "mono", 3, "input", "value"], [1, "muted", "rpe-h-note"], [3, "EntityName", "Value", "Provider"], [3, "ValueChange", "ValidChange", "EntityName", "Value", "Provider"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-flask"], ["mjButton", "", "variant", "flat", 3, "click"], [1, "rpe-err"], [1, "fa-solid", "fa-triangle-exclamation"], [3, "Completed", "Cancelled", "DriverClass", "Context"]], template: function RecordProcessEditorComponent_Template(rf, ctx) { if (rf & 1) {
381
- i0.ɵɵconditionalCreate(0, RecordProcessEditorComponent_Conditional_0_Template, 3, 0, "div", 0)(1, RecordProcessEditorComponent_Conditional_1_Template, 61, 10);
478
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecordProcessEditorComponent, selectors: [["mj-record-process-editor"]], inputs: { Record: "Record", RecordProcessID: "RecordProcessID", DefaultEntityID: "DefaultEntityID", DefaultWorkType: "DefaultWorkType", DefaultCategoryID: "DefaultCategoryID", ShowToolbar: "ShowToolbar" }, outputs: { Saved: "Saved", Cancelled: "Cancelled" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "rpe-loading"], [1, "fa-solid", "fa-circle-notch", "fa-spin"], [1, "rpe"], [1, "rpe-sec"], [1, "rpe-sec-h"], [1, "num"], [1, "rpe-grid2"], [1, "field"], ["placeholder", "e.g. Mark idle prompts for review", 1, "mj-input", 3, "input", "value"], [1, "mj-input", 3, "change", "value"], ["value", "Draft"], ["value", "Active"], ["value", "Disabled"], [1, "field", "rpe-mt"], ["placeholder", "What does this process do?", 1, "mj-input", 3, "input", "value"], [1, "rpe-grid3"], ["value", "", "disabled", ""], [3, "value"], ["value", "Filter"], ["value", "View"], ["value", "List"], ["value", "FieldRules"], ["value", "Infer"], [1, "rpe-bar"], [3, "DriverClass", "Context"], [1, "muted"], ["placeholder", "e.g. Status = 'Active'", 1, "mj-input", "mono", 3, "input", "value"], [1, "muted", "rpe-h-note"], [3, "EntityName", "Value", "Provider"], [3, "ValueChange", "ValidChange", "EntityName", "Value", "Provider"], [3, "Record", "EntityID"], [3, "ValidChange", "SpecChange", "Record", "EntityID"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid"], ["mjButton", "", 3, "click", "disabled"], [1, "fa-solid", "fa-flask"], ["mjButton", "", "variant", "flat", 3, "click"], [1, "rpe-err"], [1, "fa-solid", "fa-triangle-exclamation"], [3, "Completed", "Cancelled", "DriverClass", "Context"]], template: function RecordProcessEditorComponent_Template(rf, ctx) { if (rf & 1) {
479
+ i0.ɵɵconditionalCreate(0, RecordProcessEditorComponent_Conditional_0_Template, 3, 0, "div", 0)(1, RecordProcessEditorComponent_Conditional_1_Template, 64, 11);
382
480
  } if (rf & 2) {
383
481
  i0.ɵɵconditional(!ctx.Record ? 0 : 1);
384
- } }, dependencies: [FieldRulesBuilderComponent, EntityActionUXHostComponent, MJButtonDirective], styles: [".rpe-loading[_ngcontent-%COMP%]{padding:30px;color:var(--mj-text-muted);display:flex;align-items:center;gap:10px}\n .rpe[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:22px;color:var(--mj-text-primary)}\n .rpe-sec[_ngcontent-%COMP%]{background:var(--mj-bg-surface-card);border:1px solid var(--mj-border-subtle);border-radius:var(--mj-radius-md,10px);padding:18px 20px}\n .rpe-sec-h[_ngcontent-%COMP%]{display:flex;align-items:center;gap:11px;margin-bottom:16px}\n .rpe-sec-h[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:700}\n .rpe-sec-h[_ngcontent-%COMP%] .num[_ngcontent-%COMP%]{width:23px;height:23px;border-radius:50%;background:var(--mj-brand-primary);color:var(--mj-text-inverse);display:grid;place-items:center;font-size:12px;font-weight:800}\n .rpe-h-note[_ngcontent-%COMP%]{margin-left:6px;font-size:12.5px}\n .rpe-grid2[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 220px;gap:16px}\n .rpe-grid3[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px}\n .field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}\n .field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600;color:var(--mj-text-secondary)}\n .rpe-mt[_ngcontent-%COMP%]{margin-top:16px}\n .mono[_ngcontent-%COMP%]{font-family:var(--mj-font-mono,monospace);font-size:12.5px}\n .muted[_ngcontent-%COMP%]{color:var(--mj-text-muted);font-weight:400}\n .rpe-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding-top:4px}\n .rpe-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:6px}\n .rpe-err[_ngcontent-%COMP%]{color:var(--mj-status-error-text);font-size:13px;display:flex;align-items:center;gap:7px}\n .rpe-err[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--mj-status-error)}"], changeDetection: 0 });
482
+ } }, dependencies: [FieldRulesBuilderComponent, FeaturePipelineBuilderComponent, EntityActionUXHostComponent, MJButtonDirective], styles: [".rpe-loading[_ngcontent-%COMP%]{padding:30px;color:var(--mj-text-muted);display:flex;align-items:center;gap:10px}\n .rpe[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:22px;color:var(--mj-text-primary)}\n .rpe-sec[_ngcontent-%COMP%]{background:var(--mj-bg-surface-card);border:1px solid var(--mj-border-subtle);border-radius:var(--mj-radius-md,10px);padding:18px 20px}\n .rpe-sec-h[_ngcontent-%COMP%]{display:flex;align-items:center;gap:11px;margin-bottom:16px}\n .rpe-sec-h[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:700}\n .rpe-sec-h[_ngcontent-%COMP%] .num[_ngcontent-%COMP%]{width:23px;height:23px;border-radius:50%;background:var(--mj-brand-primary);color:var(--mj-text-inverse);display:grid;place-items:center;font-size:12px;font-weight:800}\n .rpe-h-note[_ngcontent-%COMP%]{margin-left:6px;font-size:12.5px}\n .rpe-grid2[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 220px;gap:16px}\n .rpe-grid3[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px}\n .field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}\n .field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600;color:var(--mj-text-secondary)}\n .rpe-mt[_ngcontent-%COMP%]{margin-top:16px}\n .mono[_ngcontent-%COMP%]{font-family:var(--mj-font-mono,monospace);font-size:12.5px}\n .muted[_ngcontent-%COMP%]{color:var(--mj-text-muted);font-weight:400}\n .rpe-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding-top:4px}\n .rpe-bar[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:6px}\n .rpe-err[_ngcontent-%COMP%]{color:var(--mj-status-error-text);font-size:13px;display:flex;align-items:center;gap:7px}\n .rpe-err[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--mj-status-error)}"], changeDetection: 0 });
385
483
  }
386
484
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RecordProcessEditorComponent, [{
387
485
  type: Component,
388
- args: [{ selector: 'mj-record-process-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FieldRulesBuilderComponent, EntityActionUXHostComponent, MJButtonDirective], template: `
486
+ args: [{ selector: 'mj-record-process-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FieldRulesBuilderComponent, FeaturePipelineBuilderComponent, EntityActionUXHostComponent, MJButtonDirective], template: `
389
487
  @if (!Record) {
390
488
  <div class="rpe-loading"><i class="fa-solid fa-circle-notch fa-spin"></i> Loading…</div>
391
489
  } @else {
@@ -421,6 +519,7 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
421
519
  <div class="field"><label>Work type</label>
422
520
  <select class="mj-input" [value]="Record.WorkType || 'FieldRules'" (change)="set('WorkType', $event)">
423
521
  <option value="FieldRules">Field Rules</option>
522
+ <option value="Infer">Feature Pipeline (Infer)</option>
424
523
  </select></div>
425
524
  </div>
426
525
  @if (Record.ScopeType === 'Filter') {
@@ -447,6 +546,23 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
447
546
  </section>
448
547
  }
449
548
 
549
+ <!-- FEATURE PIPELINE (INFER) -->
550
+ @if (Record.WorkType === 'Infer') {
551
+ <section class="rpe-sec">
552
+ <div class="rpe-sec-h"><span class="num">3</span><h3>Feature Pipeline Configuration</h3>
553
+ @if (!SelectedEntityName) { <span class="muted rpe-h-note">choose an entity first</span> }
554
+ </div>
555
+ @if (SelectedEntityName) {
556
+ <mj-feature-pipeline-builder
557
+ [Record]="Record"
558
+ [EntityID]="Record.EntityID"
559
+ (ValidChange)="FeaturePipelineValid = $event"
560
+ (SpecChange)="onFeaturePipelineSpecChange($event)">
561
+ </mj-feature-pipeline-builder>
562
+ }
563
+ </section>
564
+ }
565
+
450
566
  <!-- TOOLBAR -->
451
567
  @if (ShowToolbar) {
452
568
  <div class="rpe-bar">
@@ -474,6 +590,10 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
474
590
  type: Input
475
591
  }], DefaultEntityID: [{
476
592
  type: Input
593
+ }], DefaultWorkType: [{
594
+ type: Input
595
+ }], DefaultCategoryID: [{
596
+ type: Input
477
597
  }], ShowToolbar: [{
478
598
  type: Input
479
599
  }], Saved: [{
@@ -481,5 +601,5 @@ export class RecordProcessEditorComponent extends BaseAngularComponent {
481
601
  }], Cancelled: [{
482
602
  type: Output
483
603
  }] }); })();
484
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordProcessEditorComponent, { className: "RecordProcessEditorComponent", filePath: "lib/record-process-editor/record-process-editor.component.ts", lineNumber: 130 }); })();
604
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordProcessEditorComponent, { className: "RecordProcessEditorComponent", filePath: "lib/record-process-editor/record-process-editor.component.ts", lineNumber: 150 }); })();
485
605
  //# sourceMappingURL=record-process-editor.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record-process-editor.component.js","sourceRoot":"","sources":["../../../src/lib/record-process-editor/record-process-editor.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnI,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,aAAa,EAAqB,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAyD,MAAM,qCAAqC,CAAC;AACrK,OAAO,EAAE,iBA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BAEN,MAAM;;kFAfE,4BAA4B","sourcesContent":["/**\n * @fileoverview The authoring surface for a single Record Process (a reusable bulk operation). Edits the\n * basics + target entity + scope, and — for the FieldRules work type — embeds the visual\n * `<mj-field-rules-builder>` so a business user defines rules without touching JSON. An inline \"Preview\"\n * runs the same server dry-run + diff runner used at invocation time.\n *\n * Reused in two places: standalone in the Bulk Operations hub (owns its Save/Preview toolbar), and inside\n * the custom Record Process entity form (toolbar hidden — the form owns Save).\n * @module @memberjunction/ng-record-process-studio\n */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { type EntityInfo } from '@memberjunction/core';\nimport { SafeJSONParse, type FieldRuleSet } from '@memberjunction/global';\nimport { MJRecordProcessEntity } from '@memberjunction/core-entities';\nimport { FieldRulesBuilderComponent, EntityActionUXHostComponent, type EntityActionUXContext, type EntityActionUXResult } from '@memberjunction/ng-entity-action-ux';\nimport { MJButtonDirective } from '@memberjunction/ng-ui-components';\n\ntype ScopeKind = 'Filter' | 'View' | 'List';\n\n@Component({\n selector: 'mj-record-process-editor',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FieldRulesBuilderComponent, EntityActionUXHostComponent, MJButtonDirective],\n template: `\n @if (!Record) {\n <div class=\"rpe-loading\"><i class=\"fa-solid fa-circle-notch fa-spin\"></i> Loading…</div>\n } @else {\n <div class=\"rpe\">\n <!-- BASICS -->\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">1</span><h3>Basics</h3></div>\n <div class=\"rpe-grid2\">\n <div class=\"field\"><label>Name</label>\n <input class=\"mj-input\" [value]=\"Record.Name || ''\" (input)=\"set('Name', $event)\" placeholder=\"e.g. Mark idle prompts for review\"></div>\n <div class=\"field\"><label>Status</label>\n <select class=\"mj-input\" [value]=\"Record.Status || 'Active'\" (change)=\"set('Status', $event)\">\n <option value=\"Draft\">Draft</option><option value=\"Active\">Active</option><option value=\"Disabled\">Disabled</option>\n </select></div>\n </div>\n <div class=\"field rpe-mt\"><label>Description</label>\n <input class=\"mj-input\" [value]=\"Record.Description || ''\" (input)=\"set('Description', $event)\" placeholder=\"What does this process do?\"></div>\n </section>\n\n <!-- TARGET + SCOPE -->\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">2</span><h3>What it acts on</h3></div>\n <div class=\"rpe-grid3\">\n <div class=\"field\"><label>Entity</label>\n <select class=\"mj-input\" [value]=\"Record.EntityID || ''\" (change)=\"onEntityChange($event)\">\n <option value=\"\" disabled>— choose an entity —</option>\n @for (e of Entities; track e.ID) { <option [value]=\"e.ID\">{{ e.DisplayName || e.Name }}</option> }\n </select></div>\n <div class=\"field\"><label>Default scope</label>\n <select class=\"mj-input\" [value]=\"Record.ScopeType || 'Filter'\" (change)=\"set('ScopeType', $event)\">\n <option value=\"Filter\">Filter</option><option value=\"View\">A view</option><option value=\"List\">A list</option>\n </select></div>\n <div class=\"field\"><label>Work type</label>\n <select class=\"mj-input\" [value]=\"Record.WorkType || 'FieldRules'\" (change)=\"set('WorkType', $event)\">\n <option value=\"FieldRules\">Field Rules</option>\n </select></div>\n </div>\n @if (Record.ScopeType === 'Filter') {\n <div class=\"field rpe-mt\"><label>Filter <span class=\"muted\">— overridden by the grid selection at run time</span></label>\n <input class=\"mj-input mono\" [value]=\"Record.ScopeFilter || ''\" (input)=\"set('ScopeFilter', $event)\" placeholder=\"e.g. Status = 'Active'\"></div>\n }\n </section>\n\n <!-- RULES -->\n @if (Record.WorkType === 'FieldRules') {\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">3</span><h3>Rules</h3>\n @if (!SelectedEntityName) { <span class=\"muted rpe-h-note\">choose an entity first</span> }\n </div>\n @if (SelectedEntityName) {\n <mj-field-rules-builder\n [EntityName]=\"SelectedEntityName\"\n [Value]=\"RuleSet\"\n [Provider]=\"Provider\"\n (ValueChange)=\"onRulesChange($event)\"\n (ValidChange)=\"RulesValid = $event\">\n </mj-field-rules-builder>\n }\n </section>\n }\n\n <!-- TOOLBAR -->\n @if (ShowToolbar) {\n <div class=\"rpe-bar\">\n <button mjButton variant=\"primary\" [disabled]=\"!CanSave || Saving\" (click)=\"Save()\">\n <i class=\"fa-solid\" [class.fa-floppy-disk]=\"!Saving\" [class.fa-circle-notch]=\"Saving\" [class.fa-spin]=\"Saving\"></i> Save\n </button>\n <button mjButton [disabled]=\"!CanPreview || Saving\" (click)=\"Preview()\"><i class=\"fa-solid fa-flask\"></i> Preview changes</button>\n <button mjButton variant=\"flat\" (click)=\"Cancel()\">Cancel</button>\n @if (ErrorMessage) { <span class=\"rpe-err\"><i class=\"fa-solid fa-triangle-exclamation\"></i> {{ ErrorMessage }}</span> }\n </div>\n }\n </div>\n\n @if (PreviewDriver) {\n <mj-entity-action-ux-host\n [DriverClass]=\"PreviewDriver.DriverClass\" [Context]=\"PreviewDriver.Context\"\n (Completed)=\"onPreviewDone($event)\" (Cancelled)=\"PreviewDriver = null\">\n </mj-entity-action-ux-host>\n }\n }\n `,\n styles: [`\n .rpe-loading{padding:30px;color:var(--mj-text-muted);display:flex;align-items:center;gap:10px}\n .rpe{display:flex;flex-direction:column;gap:22px;color:var(--mj-text-primary)}\n .rpe-sec{background:var(--mj-bg-surface-card);border:1px solid var(--mj-border-subtle);border-radius:var(--mj-radius-md,10px);padding:18px 20px}\n .rpe-sec-h{display:flex;align-items:center;gap:11px;margin-bottom:16px}\n .rpe-sec-h h3{margin:0;font-size:16px;font-weight:700}\n .rpe-sec-h .num{width:23px;height:23px;border-radius:50%;background:var(--mj-brand-primary);color:var(--mj-text-inverse);display:grid;place-items:center;font-size:12px;font-weight:800}\n .rpe-h-note{margin-left:6px;font-size:12.5px}\n .rpe-grid2{display:grid;grid-template-columns:1fr 220px;gap:16px}\n .rpe-grid3{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px}\n .field{display:flex;flex-direction:column;gap:6px}\n .field label{font-size:12.5px;font-weight:600;color:var(--mj-text-secondary)}\n .rpe-mt{margin-top:16px}\n .mono{font-family:var(--mj-font-mono,monospace);font-size:12.5px}\n .muted{color:var(--mj-text-muted);font-weight:400}\n .rpe-bar{display:flex;align-items:center;gap:10px;padding-top:4px}\n .rpe-bar button i{margin-right:6px}\n .rpe-err{color:var(--mj-status-error-text);font-size:13px;display:flex;align-items:center;gap:7px}\n .rpe-err i{color:var(--mj-status-error)}\n `],\n})\nexport class RecordProcessEditorComponent extends BaseAngularComponent implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n /** The process being edited. Set this OR `RecordProcessID` (or neither, for a new draft). */\n @Input() Record: MJRecordProcessEntity | null = null;\n /** Load an existing process by ID (alternative to passing `Record`). */\n @Input() RecordProcessID: string | null = null;\n /** Default EntityID for a brand-new process (e.g. the grid the user came from). */\n @Input() DefaultEntityID: string | null = null;\n /** Show the built-in Save / Preview / Cancel toolbar. Set false when an outer form owns Save. */\n @Input() ShowToolbar = true;\n\n /** Emitted after a successful Save (the persisted record). */\n @Output() Saved = new EventEmitter<MJRecordProcessEntity>();\n /** Emitted when the user cancels. */\n @Output() Cancelled = new EventEmitter<void>();\n\n public Entities: EntityInfo[] = [];\n public SelectedEntityName = '';\n public RuleSet: FieldRuleSet = { Rules: [] };\n public RulesValid = true;\n public Saving = false;\n public ErrorMessage = '';\n public PreviewDriver: { DriverClass: string; Context: EntityActionUXContext } | null = null;\n\n get CanSave(): boolean { return !!this.Record?.Name && !!this.Record?.EntityID && this.RulesValid; }\n get CanPreview(): boolean { return this.CanSave && this.RuleSet.Rules.length > 0; }\n\n async ngOnInit(): Promise<void> {\n const provider = this.ProviderToUse;\n this.Entities = [...provider.Entities].sort((a, b) => (a.DisplayName || a.Name).localeCompare(b.DisplayName || b.Name));\n await this.loadRecord();\n }\n\n /** Resolves the record to edit: passed instance → by ID → a fresh draft. */\n private async loadRecord(): Promise<void> {\n const provider = this.ProviderToUse;\n if (!this.Record) {\n this.Record = await provider.GetEntityObject<MJRecordProcessEntity>('MJ: Record Processes', provider.CurrentUser);\n if (this.RecordProcessID) {\n await this.Record.Load(this.RecordProcessID);\n } else {\n this.Record.NewRecord();\n this.Record.WorkType = 'FieldRules';\n this.Record.ScopeType = 'Filter';\n this.Record.Status = 'Draft';\n if (this.DefaultEntityID) this.Record.EntityID = this.DefaultEntityID;\n }\n }\n this.RuleSet = this.Record.Configuration ? (SafeJSONParse<FieldRuleSet>(this.Record.Configuration) ?? { Rules: [] }) : { Rules: [] };\n this.resolveEntityName();\n this.cdr.detectChanges();\n }\n\n /** Generic setter for the simple string/enum fields, driven by the template inputs. */\n set(field: 'Name' | 'Description' | 'Status' | 'ScopeType' | 'ScopeFilter' | 'WorkType', event: Event): void {\n if (!this.Record) return;\n const value = (event.target as HTMLInputElement | HTMLSelectElement).value;\n // Strongly-typed assignment per field (no dynamic Set()).\n switch (field) {\n case 'Name': this.Record.Name = value; break;\n case 'Description': this.Record.Description = value; break;\n case 'Status': this.Record.Status = value as MJRecordProcessEntity['Status']; break;\n case 'ScopeType': this.Record.ScopeType = value as MJRecordProcessEntity['ScopeType']; break;\n case 'ScopeFilter': this.Record.ScopeFilter = value; break;\n case 'WorkType': this.Record.WorkType = value as MJRecordProcessEntity['WorkType']; break;\n }\n this.cdr.detectChanges();\n }\n\n onEntityChange(event: Event): void {\n if (!this.Record) return;\n this.Record.EntityID = (event.target as HTMLSelectElement).value;\n this.resolveEntityName();\n this.cdr.detectChanges();\n }\n\n onRulesChange(ruleSet: FieldRuleSet): void {\n this.RuleSet = ruleSet;\n if (this.Record) this.Record.Configuration = JSON.stringify(ruleSet);\n this.cdr.detectChanges();\n }\n\n /** Saves the record (and emits). Returns success. */\n async Save(): Promise<boolean> {\n if (!this.Record || !this.CanSave) return false;\n this.Saving = true; this.ErrorMessage = ''; this.cdr.detectChanges();\n this.Record.Configuration = JSON.stringify(this.RuleSet);\n const ok = await this.Record.Save();\n this.Saving = false;\n if (ok) {\n this.Saved.emit(this.Record);\n } else {\n this.ErrorMessage = this.Record.LatestResult?.CompleteMessage ?? 'Save failed';\n }\n this.cdr.detectChanges();\n return ok;\n }\n\n /** Saves (if needed) then mounts the dry-run runner against the process's default scope. */\n async Preview(): Promise<void> {\n if (!this.Record) return;\n if (this.Record.Dirty || !this.Record.IsSaved) {\n const ok = await this.Save();\n if (!ok) return;\n }\n const entity = this.ProviderToUse.EntityByID(this.Record.EntityID);\n if (!entity) { this.ErrorMessage = 'Target entity not found'; this.cdr.detectChanges(); return; }\n this.PreviewDriver = {\n DriverClass: 'RecordProcessRunnerUX',\n Context: {\n EntityInfo: entity,\n ScopeKind: (this.Record.ScopeType?.toLowerCase() as EntityActionUXContext['ScopeKind']) || 'filter',\n Filter: this.Record.ScopeFilter ?? undefined,\n ViewID: this.Record.ScopeViewID ?? undefined,\n ListID: this.Record.ScopeListID ?? undefined,\n Config: { RecordProcessID: this.Record.ID },\n Provider: this.ProviderToUse,\n ActionLabel: `Preview: ${this.Record.Name}`,\n },\n };\n this.cdr.detectChanges();\n }\n\n onPreviewDone(_result: EntityActionUXResult): void {\n this.PreviewDriver = null;\n this.cdr.detectChanges();\n }\n\n Cancel(): void { this.Cancelled.emit(); }\n\n private resolveEntityName(): void {\n this.SelectedEntityName = this.Record?.EntityID ? (this.ProviderToUse.EntityByID(this.Record.EntityID)?.Name ?? '') : '';\n }\n}\n"]}
1
+ {"version":3,"file":"record-process-editor.component.js","sourceRoot":"","sources":["../../../src/lib/record-process-editor/record-process-editor.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnI,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,aAAa,EAAqB,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EA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,mBACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,0BAA0B,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,iBAAiB,CAAC,YAC5G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoGT;;kBA0BA,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAGL,MAAM;;kBAEN,MAAM;;kFAnBE,4BAA4B","sourcesContent":["/**\n * @fileoverview The authoring surface for a single Record Process (a reusable bulk operation). Edits the\n * basics + target entity + scope, and — for the FieldRules work type — embeds the visual\n * `<mj-field-rules-builder>` so a business user defines rules without touching JSON. An inline \"Preview\"\n * runs the same server dry-run + diff runner used at invocation time.\n *\n * Reused in two places: standalone in the Bulk Operations hub (owns its Save/Preview toolbar), and inside\n * the custom Record Process entity form (toolbar hidden — the form owns Save).\n * @module @memberjunction/ng-record-process-studio\n */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { type EntityInfo } from '@memberjunction/core';\nimport { SafeJSONParse, type FieldRuleSet } from '@memberjunction/global';\nimport { MJRecordProcessEntity } from '@memberjunction/core-entities';\nimport { FieldRulesBuilderComponent, EntityActionUXHostComponent, type EntityActionUXContext, type EntityActionUXResult } from '@memberjunction/ng-entity-action-ux';\nimport { MJButtonDirective } from '@memberjunction/ng-ui-components';\nimport { type DataFeatureSpec } from '@memberjunction/feature-pipelines';\nimport { FeaturePipelineBuilderComponent } from '../feature-pipeline-builder/feature-pipeline-builder.component';\n\ntype ScopeKind = 'Filter' | 'View' | 'List';\n\n@Component({\n selector: 'mj-record-process-editor',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FieldRulesBuilderComponent, FeaturePipelineBuilderComponent, EntityActionUXHostComponent, MJButtonDirective],\n template: `\n @if (!Record) {\n <div class=\"rpe-loading\"><i class=\"fa-solid fa-circle-notch fa-spin\"></i> Loading…</div>\n } @else {\n <div class=\"rpe\">\n <!-- BASICS -->\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">1</span><h3>Basics</h3></div>\n <div class=\"rpe-grid2\">\n <div class=\"field\"><label>Name</label>\n <input class=\"mj-input\" [value]=\"Record.Name || ''\" (input)=\"set('Name', $event)\" placeholder=\"e.g. Mark idle prompts for review\"></div>\n <div class=\"field\"><label>Status</label>\n <select class=\"mj-input\" [value]=\"Record.Status || 'Active'\" (change)=\"set('Status', $event)\">\n <option value=\"Draft\">Draft</option><option value=\"Active\">Active</option><option value=\"Disabled\">Disabled</option>\n </select></div>\n </div>\n <div class=\"field rpe-mt\"><label>Description</label>\n <input class=\"mj-input\" [value]=\"Record.Description || ''\" (input)=\"set('Description', $event)\" placeholder=\"What does this process do?\"></div>\n </section>\n\n <!-- TARGET + SCOPE -->\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">2</span><h3>What it acts on</h3></div>\n <div class=\"rpe-grid3\">\n <div class=\"field\"><label>Entity</label>\n <select class=\"mj-input\" [value]=\"Record.EntityID || ''\" (change)=\"onEntityChange($event)\">\n <option value=\"\" disabled>— choose an entity —</option>\n @for (e of Entities; track e.ID) { <option [value]=\"e.ID\">{{ e.DisplayName || e.Name }}</option> }\n </select></div>\n <div class=\"field\"><label>Default scope</label>\n <select class=\"mj-input\" [value]=\"Record.ScopeType || 'Filter'\" (change)=\"set('ScopeType', $event)\">\n <option value=\"Filter\">Filter</option><option value=\"View\">A view</option><option value=\"List\">A list</option>\n </select></div>\n <div class=\"field\"><label>Work type</label>\n <select class=\"mj-input\" [value]=\"Record.WorkType || 'FieldRules'\" (change)=\"set('WorkType', $event)\">\n <option value=\"FieldRules\">Field Rules</option>\n <option value=\"Infer\">Feature Pipeline (Infer)</option>\n </select></div>\n </div>\n @if (Record.ScopeType === 'Filter') {\n <div class=\"field rpe-mt\"><label>Filter <span class=\"muted\">— overridden by the grid selection at run time</span></label>\n <input class=\"mj-input mono\" [value]=\"Record.ScopeFilter || ''\" (input)=\"set('ScopeFilter', $event)\" placeholder=\"e.g. Status = 'Active'\"></div>\n }\n </section>\n\n <!-- RULES -->\n @if (Record.WorkType === 'FieldRules') {\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">3</span><h3>Rules</h3>\n @if (!SelectedEntityName) { <span class=\"muted rpe-h-note\">choose an entity first</span> }\n </div>\n @if (SelectedEntityName) {\n <mj-field-rules-builder\n [EntityName]=\"SelectedEntityName\"\n [Value]=\"RuleSet\"\n [Provider]=\"Provider\"\n (ValueChange)=\"onRulesChange($event)\"\n (ValidChange)=\"RulesValid = $event\">\n </mj-field-rules-builder>\n }\n </section>\n }\n\n <!-- FEATURE PIPELINE (INFER) -->\n @if (Record.WorkType === 'Infer') {\n <section class=\"rpe-sec\">\n <div class=\"rpe-sec-h\"><span class=\"num\">3</span><h3>Feature Pipeline Configuration</h3>\n @if (!SelectedEntityName) { <span class=\"muted rpe-h-note\">choose an entity first</span> }\n </div>\n @if (SelectedEntityName) {\n <mj-feature-pipeline-builder\n [Record]=\"Record\"\n [EntityID]=\"Record.EntityID\"\n (ValidChange)=\"FeaturePipelineValid = $event\"\n (SpecChange)=\"onFeaturePipelineSpecChange($event)\">\n </mj-feature-pipeline-builder>\n }\n </section>\n }\n\n <!-- TOOLBAR -->\n @if (ShowToolbar) {\n <div class=\"rpe-bar\">\n <button mjButton variant=\"primary\" [disabled]=\"!CanSave || Saving\" (click)=\"Save()\">\n <i class=\"fa-solid\" [class.fa-floppy-disk]=\"!Saving\" [class.fa-circle-notch]=\"Saving\" [class.fa-spin]=\"Saving\"></i> Save\n </button>\n <button mjButton [disabled]=\"!CanPreview || Saving\" (click)=\"Preview()\"><i class=\"fa-solid fa-flask\"></i> Preview changes</button>\n <button mjButton variant=\"flat\" (click)=\"Cancel()\">Cancel</button>\n @if (ErrorMessage) { <span class=\"rpe-err\"><i class=\"fa-solid fa-triangle-exclamation\"></i> {{ ErrorMessage }}</span> }\n </div>\n }\n </div>\n\n @if (PreviewDriver) {\n <mj-entity-action-ux-host\n [DriverClass]=\"PreviewDriver.DriverClass\" [Context]=\"PreviewDriver.Context\"\n (Completed)=\"onPreviewDone($event)\" (Cancelled)=\"PreviewDriver = null\">\n </mj-entity-action-ux-host>\n }\n }\n `,\n styles: [`\n .rpe-loading{padding:30px;color:var(--mj-text-muted);display:flex;align-items:center;gap:10px}\n .rpe{display:flex;flex-direction:column;gap:22px;color:var(--mj-text-primary)}\n .rpe-sec{background:var(--mj-bg-surface-card);border:1px solid var(--mj-border-subtle);border-radius:var(--mj-radius-md,10px);padding:18px 20px}\n .rpe-sec-h{display:flex;align-items:center;gap:11px;margin-bottom:16px}\n .rpe-sec-h h3{margin:0;font-size:16px;font-weight:700}\n .rpe-sec-h .num{width:23px;height:23px;border-radius:50%;background:var(--mj-brand-primary);color:var(--mj-text-inverse);display:grid;place-items:center;font-size:12px;font-weight:800}\n .rpe-h-note{margin-left:6px;font-size:12.5px}\n .rpe-grid2{display:grid;grid-template-columns:1fr 220px;gap:16px}\n .rpe-grid3{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px}\n .field{display:flex;flex-direction:column;gap:6px}\n .field label{font-size:12.5px;font-weight:600;color:var(--mj-text-secondary)}\n .rpe-mt{margin-top:16px}\n .mono{font-family:var(--mj-font-mono,monospace);font-size:12.5px}\n .muted{color:var(--mj-text-muted);font-weight:400}\n .rpe-bar{display:flex;align-items:center;gap:10px;padding-top:4px}\n .rpe-bar button i{margin-right:6px}\n .rpe-err{color:var(--mj-status-error-text);font-size:13px;display:flex;align-items:center;gap:7px}\n .rpe-err i{color:var(--mj-status-error)}\n `],\n})\nexport class RecordProcessEditorComponent extends BaseAngularComponent implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n\n /** The process being edited. Set this OR `RecordProcessID` (or neither, for a new draft). */\n @Input() Record: MJRecordProcessEntity | null = null;\n /** Load an existing process by ID (alternative to passing `Record`). */\n @Input() RecordProcessID: string | null = null;\n /** Default EntityID for a brand-new process (e.g. the grid the user came from). */\n @Input() DefaultEntityID: string | null = null;\n /** Default WorkType for a brand-new process (e.g. 'Infer' when opened from Feature Pipelines). */\n @Input() DefaultWorkType: MJRecordProcessEntity['WorkType'] | null = null;\n /** Default CategoryID for a brand-new process (e.g. Feature Pipeline category ID). */\n @Input() DefaultCategoryID: string | null = null;\n /** Show the built-in Save / Preview / Cancel toolbar. Set false when an outer form owns Save. */\n @Input() ShowToolbar = true;\n\n /** Emitted after a successful Save (the persisted record). */\n @Output() Saved = new EventEmitter<MJRecordProcessEntity>();\n /** Emitted when the user cancels. */\n @Output() Cancelled = new EventEmitter<void>();\n\n public Entities: EntityInfo[] = [];\n public SelectedEntityName = '';\n public RuleSet: FieldRuleSet = { Rules: [] };\n public RulesValid = true;\n public FeaturePipelineValid = true;\n public FeaturePipelineSpec: DataFeatureSpec | null = null;\n public Saving = false;\n public ErrorMessage = '';\n public PreviewDriver: { DriverClass: string; Context: EntityActionUXContext } | null = null;\n\n get CanSave(): boolean {\n if (!this.Record?.Name || !this.Record?.EntityID) return false;\n if (this.Record.WorkType === 'FieldRules') return this.RulesValid;\n if (this.Record.WorkType === 'Infer') return this.FeaturePipelineValid && !!this.Record.PromptID;\n return true;\n }\n get CanPreview(): boolean {\n if (this.Record?.WorkType === 'FieldRules') return this.CanSave && this.RuleSet.Rules.length > 0;\n if (this.Record?.WorkType === 'Infer') return this.CanSave;\n return false;\n }\n\n async ngOnInit(): Promise<void> {\n const provider = this.ProviderToUse;\n this.Entities = [...provider.Entities].sort((a, b) => (a.DisplayName || a.Name).localeCompare(b.DisplayName || b.Name));\n await this.loadRecord();\n }\n\n /** Resolves the record to edit: passed instance → by ID → a fresh draft. */\n private async loadRecord(): Promise<void> {\n const provider = this.ProviderToUse;\n if (!this.Record) {\n this.Record = await provider.GetEntityObject<MJRecordProcessEntity>('MJ: Record Processes', provider.CurrentUser);\n if (this.RecordProcessID) {\n await this.Record.Load(this.RecordProcessID);\n } else {\n this.Record.NewRecord();\n this.Record.WorkType = this.DefaultWorkType ?? 'FieldRules';\n this.Record.ScopeType = 'Filter';\n this.Record.Status = 'Draft';\n if (this.DefaultEntityID) this.Record.EntityID = this.DefaultEntityID;\n if (this.DefaultCategoryID) this.Record.CategoryID = this.DefaultCategoryID;\n }\n }\n if (this.Record.WorkType === 'FieldRules') {\n this.RuleSet = this.Record.Configuration ? (SafeJSONParse<FieldRuleSet>(this.Record.Configuration) ?? { Rules: [] }) : { Rules: [] };\n } else if (this.Record.WorkType === 'Infer') {\n this.FeaturePipelineSpec = this.Record.Configuration ? SafeJSONParse<DataFeatureSpec>(this.Record.Configuration) : null;\n }\n this.resolveEntityName();\n this.cdr.detectChanges();\n }\n\n /** Generic setter for the simple string/enum fields, driven by the template inputs. */\n Set(field: 'Name' | 'Description' | 'Status' | 'ScopeType' | 'ScopeFilter' | 'WorkType', event: Event): void {\n if (!this.Record) return;\n const value = (event.target as HTMLInputElement | HTMLSelectElement).value;\n // Strongly-typed assignment per field (no dynamic Set()).\n switch (field) {\n case 'Name': this.Record.Name = value; break;\n case 'Description': this.Record.Description = value; break;\n case 'Status': this.Record.Status = value as MJRecordProcessEntity['Status']; break;\n case 'ScopeType': this.Record.ScopeType = value as MJRecordProcessEntity['ScopeType']; break;\n case 'ScopeFilter': this.Record.ScopeFilter = value; break;\n case 'WorkType': this.Record.WorkType = value as MJRecordProcessEntity['WorkType']; break;\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link Set}. */\n set(field: 'Name' | 'Description' | 'Status' | 'ScopeType' | 'ScopeFilter' | 'WorkType', event: Event): void {\n return this.Set(field, event);\n }\n\n OnEntityChange(event: Event): void {\n if (!this.Record) return;\n this.Record.EntityID = (event.target as HTMLSelectElement).value;\n this.resolveEntityName();\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnEntityChange}. */\n onEntityChange(event: Event): void {\n return this.OnEntityChange(event);\n }\n\n OnRulesChange(ruleSet: FieldRuleSet): void {\n this.RuleSet = ruleSet;\n if (this.Record) this.Record.Configuration = JSON.stringify(ruleSet);\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnRulesChange}. */\n onRulesChange(ruleSet: FieldRuleSet): void {\n return this.OnRulesChange(ruleSet);\n }\n\n OnFeaturePipelineSpecChange(spec: DataFeatureSpec): void {\n this.FeaturePipelineSpec = spec;\n if (this.Record) {\n this.Record.Configuration = JSON.stringify(spec);\n }\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnFeaturePipelineSpecChange}. */\n onFeaturePipelineSpecChange(spec: DataFeatureSpec): void {\n return this.OnFeaturePipelineSpecChange(spec);\n }\n\n /** Saves the record (and emits). Returns success. */\n async Save(): Promise<boolean> {\n if (!this.Record || !this.CanSave) return false;\n this.Saving = true; this.ErrorMessage = ''; this.cdr.detectChanges();\n if (this.Record.WorkType === 'FieldRules') {\n this.Record.Configuration = JSON.stringify(this.RuleSet);\n } else if (this.Record.WorkType === 'Infer' && this.FeaturePipelineSpec) {\n this.Record.Configuration = JSON.stringify(this.FeaturePipelineSpec);\n }\n const ok = await this.Record.Save();\n this.Saving = false;\n if (ok) {\n this.Saved.emit(this.Record);\n } else {\n this.ErrorMessage = this.Record.LatestResult?.CompleteMessage ?? 'Save failed';\n }\n this.cdr.detectChanges();\n return ok;\n }\n\n /** Saves (if needed) then mounts the dry-run runner against the process's default scope. */\n async Preview(): Promise<void> {\n if (!this.Record) return;\n if (this.Record.Dirty || !this.Record.IsSaved) {\n const ok = await this.Save();\n if (!ok) return;\n }\n const entity = this.ProviderToUse.EntityByID(this.Record.EntityID);\n if (!entity) { this.ErrorMessage = 'Target entity not found'; this.cdr.detectChanges(); return; }\n this.PreviewDriver = {\n DriverClass: 'RecordProcessRunnerUX',\n Context: {\n EntityInfo: entity,\n ScopeKind: (this.Record.ScopeType?.toLowerCase() as EntityActionUXContext['ScopeKind']) || 'filter',\n Filter: this.Record.ScopeFilter ?? undefined,\n ViewID: this.Record.ScopeViewID ?? undefined,\n ListID: this.Record.ScopeListID ?? undefined,\n Config: { RecordProcessID: this.Record.ID },\n Provider: this.ProviderToUse,\n ActionLabel: `Preview: ${this.Record.Name}`,\n },\n };\n this.cdr.detectChanges();\n }\n\n OnPreviewDone(_result: EntityActionUXResult): void {\n this.PreviewDriver = null;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnPreviewDone}. */\n onPreviewDone(_result: EntityActionUXResult): void {\n return this.OnPreviewDone(_result);\n }\n\n Cancel(): void { this.Cancelled.emit(); }\n\n private resolveEntityName(): void {\n this.SelectedEntityName = this.Record?.EntityID ? (this.ProviderToUse.EntityByID(this.Record.EntityID)?.Name ?? '') : '';\n }\n}\n"]}
@@ -57,10 +57,20 @@ export declare class RecordProcessHistoryComponent extends BaseAngularComponent
57
57
  private subscribeToRunChanges;
58
58
  /** Debounce a burst of run/detail/checkpoint saves into a single reload; defer if the user is drilled into a detail. */
59
59
  private scheduleReload;
60
+ Reload(): Promise<void>;
61
+ /** @deprecated Use {@link Reload}. */
60
62
  reload(): Promise<void>;
63
+ OpenRun(run: RunRow): Promise<void>;
64
+ /** @deprecated Use {@link OpenRun}. */
61
65
  openRun(run: RunRow): Promise<void>;
66
+ BackToList(): void;
67
+ /** @deprecated Use {@link BackToList}. */
62
68
  backToList(): void;
69
+ Fmt(value?: string | Date): string;
70
+ /** @deprecated Use {@link Fmt}. */
63
71
  fmt(value?: string | Date): string;
72
+ Disp(value: unknown): string;
73
+ /** @deprecated Use {@link Disp}. */
64
74
  disp(value: unknown): string;
65
75
  static ɵfac: i0.ɵɵFactoryDeclaration<RecordProcessHistoryComponent, never>;
66
76
  static ɵcmp: i0.ɵɵComponentDeclaration<RecordProcessHistoryComponent, "mj-record-process-history", never, { "RecordProcessID": { "alias": "RecordProcessID"; "required": false; }; }, {}, never, never, true, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"record-process-history.component.d.ts","sourceRoot":"","sources":["../../../src/lib/record-process-history/record-process-history.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAgE,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAAiD,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;;AAEpG,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CACxF;AACD,UAAU,MAAO,SAAQ,MAAM;IAAG,WAAW,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;CAAE;AAG5E,UAAU,SAAS;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAAE;AAE5G,qBAwGa,6BAA8B,SAAQ,oBAAqB,YAAW,MAAM,EAAE,SAAS;IAChG,OAAO,CAAC,GAAG,CAA6B;IAExC,uDAAuD;IAC9C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAU;IACjC,OAAO,UAAQ;IACf,aAAa,UAAS;IACtB,IAAI,EAAE,MAAM,EAAE,CAAM;IACpB,OAAO,EAAE,SAAS,EAAE,CAAM;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAA8C;IAE3D,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAK/B,WAAW,IAAI,IAAI;IAOnB,0GAA0G;IAC1G,OAAO,CAAC,qBAAqB;IAgB7B,wHAAwH;IACxH,OAAO,CAAC,cAAc;IAchB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAyBvB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAezC,UAAU,IAAI,IAAI;IAUlB,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM;IAKlC,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;yCA1HnB,6BAA6B;2CAA7B,6BAA6B;CA2HzC"}
1
+ {"version":3,"file":"record-process-history.component.d.ts","sourceRoot":"","sources":["../../../src/lib/record-process-history/record-process-history.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAgE,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrE,OAAO,EAAiD,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;;AAEpG,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IA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