@memberjunction/ng-record-process-studio 6.2.0-edge.3 → 6.2.0-edge.5

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.
@@ -6,12 +6,14 @@
6
6
  * @module @memberjunction/ng-record-process-studio
7
7
  */
8
8
  import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, inject, } from '@angular/core';
9
+ import { Subject } from 'rxjs';
10
+ import { debounceTime, takeUntil } from 'rxjs/operators';
9
11
  import { CommonModule } from '@angular/common';
10
12
  import { FormsModule } from '@angular/forms';
11
13
  import { BaseAngularComponent } from '@memberjunction/ng-base-types';
12
14
  import { LogError, RunView } from '@memberjunction/core';
13
15
  import { KnowledgeHubMetadataEngine, } from '@memberjunction/core-entities';
14
- import { renderConstraintBlock, validateSpec, GetFeaturePipelineCapabilities, ValidateOutputsAgainstCapabilities, FindEscalationTargetRowProblem, FindEscalationTargetSpecProblem, } from '@memberjunction/feature-pipelines';
16
+ import { OutputTargets, RenderConstraintBlock, OutputConstraintResolver, LookupConstraintValues, validateSpec, GetFeaturePipelineCapabilities, ValidateOutputsAgainstCapabilities, FindEscalationTargetRowProblem, FindEscalationTargetSpecProblem, } from '@memberjunction/feature-pipelines';
15
17
  import { EscapeSQLString, SafeJSONParse, UUIDsEqual } from '@memberjunction/global';
16
18
  import { MJButtonDirective, MJConfirmDialogComponent } from '@memberjunction/ng-ui-components';
17
19
  import * as i0 from "@angular/core";
@@ -126,7 +128,7 @@ function FeaturePipelineBuilderComponent_Conditional_56_Template(rf, ctx) { if (
126
128
  } if (rf & 2) {
127
129
  const ctx_r1 = i0.ɵɵnextContext();
128
130
  i0.ɵɵadvance(6);
129
- i0.ɵɵtextInterpolate(ctx_r1.renderedConstraintPreview);
131
+ i0.ɵɵtextInterpolate(ctx_r1.RenderedConstraintPreview);
130
132
  } }
131
133
  function FeaturePipelineBuilderComponent_Conditional_69_Template(rf, ctx) { if (rf & 1) {
132
134
  i0.ɵɵelementStart(0, "div", 24);
@@ -153,11 +155,19 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_For_22_Template(rf
153
155
  } if (rf & 2) {
154
156
  const m_r10 = ctx.$implicit;
155
157
  const output_r11 = i0.ɵɵnextContext().$implicit;
156
- i0.ɵɵproperty("value", m_r10.Value)("selected", m_r10.Value === output_r11.Target.Mode);
158
+ i0.ɵɵproperty("value", m_r10.Value)("selected", m_r10.Value === ((output_r11.Target == null ? null : output_r11.Target.Mode) ?? "none"));
157
159
  i0.ɵɵadvance();
158
160
  i0.ɵɵtextInterpolate(m_r10.Label);
159
161
  } }
160
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_For_7_Template(rf, ctx) { if (rf & 1) {
162
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Template(rf, ctx) { if (rf & 1) {
163
+ i0.ɵɵelementStart(0, "div", 3)(1, "label");
164
+ i0.ɵɵtext(2, "Target");
165
+ i0.ɵɵelementEnd();
166
+ i0.ɵɵelementStart(3, "p", 38);
167
+ i0.ɵɵtext(4, "Stored as a Feature Value on each record; nothing is written to the entity.");
168
+ i0.ɵɵelementEnd()();
169
+ } }
170
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_For_7_Template(rf, ctx) { if (rf & 1) {
161
171
  i0.ɵɵelementStart(0, "option", 5);
162
172
  i0.ɵɵtext(1);
163
173
  i0.ɵɵelementEnd();
@@ -168,17 +178,17 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_For
168
178
  i0.ɵɵadvance();
169
179
  i0.ɵɵtextInterpolate2("", f_r13.DisplayName || f_r13.Name, " (", f_r13.TSType, ")");
170
180
  } }
171
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Template(rf, ctx) { if (rf & 1) {
181
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Template(rf, ctx) { if (rf & 1) {
172
182
  const _r12 = i0.ɵɵgetCurrentView();
173
183
  i0.ɵɵelementStart(0, "div", 3)(1, "label");
174
184
  i0.ɵɵtext(2, "Target Field");
175
185
  i0.ɵɵelementEnd();
176
186
  i0.ɵɵelementStart(3, "select", 4);
177
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r12); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateFieldTarget(ɵ$index_185_r9, $event)); });
187
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r12); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateFieldTarget(ɵ$index_185_r9, $event)); });
178
188
  i0.ɵɵelementStart(4, "option", 18);
179
189
  i0.ɵɵtext(5, "\u2014 Select Column \u2014");
180
190
  i0.ɵɵelementEnd();
181
- i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_For_7_Template, 2, 4, "option", 5, _forTrack0);
191
+ i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_For_7_Template, 2, 4, "option", 5, _forTrack0);
182
192
  i0.ɵɵelementEnd()();
183
193
  } if (rf & 2) {
184
194
  const output_r11 = i0.ɵɵnextContext().$implicit;
@@ -188,7 +198,7 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Tem
188
198
  i0.ɵɵadvance(2);
189
199
  i0.ɵɵrepeater(ctx_r1.entityFields);
190
200
  } }
191
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_For_7_Template(rf, ctx) { if (rf & 1) {
201
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_26_For_7_Template(rf, ctx) { if (rf & 1) {
192
202
  i0.ɵɵelementStart(0, "option", 5);
193
203
  i0.ɵɵtext(1);
194
204
  i0.ɵɵelementEnd();
@@ -199,17 +209,17 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_For
199
209
  i0.ɵɵadvance();
200
210
  i0.ɵɵtextInterpolate(e_r15.DisplayName || e_r15.Name);
201
211
  } }
202
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Template(rf, ctx) { if (rf & 1) {
212
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_26_Template(rf, ctx) { if (rf & 1) {
203
213
  const _r14 = i0.ɵɵgetCurrentView();
204
214
  i0.ɵɵelementStart(0, "div", 3)(1, "label");
205
215
  i0.ɵɵtext(2, "Child Entity");
206
216
  i0.ɵɵelementEnd();
207
217
  i0.ɵɵelementStart(3, "select", 4);
208
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r14); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateChildTargetEntity(ɵ$index_185_r9, $event)); });
218
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_26_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r14); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateChildTargetEntity(ɵ$index_185_r9, $event)); });
209
219
  i0.ɵɵelementStart(4, "option", 18);
210
220
  i0.ɵɵtext(5, "\u2014 Select Entity \u2014");
211
221
  i0.ɵɵelementEnd();
212
- i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_For_7_Template, 2, 3, "option", 5, _forTrack1);
222
+ i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_26_For_7_Template, 2, 3, "option", 5, _forTrack1);
213
223
  i0.ɵɵelementEnd()();
214
224
  } if (rf & 2) {
215
225
  const output_r11 = i0.ɵɵnextContext().$implicit;
@@ -219,14 +229,14 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Tem
219
229
  i0.ɵɵadvance(2);
220
230
  i0.ɵɵrepeater(ctx_r1.availableEntities);
221
231
  } }
222
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_30_Template(rf, ctx) { if (rf & 1) {
232
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_31_Template(rf, ctx) { if (rf & 1) {
223
233
  i0.ɵɵelementStart(0, "option", 47);
224
234
  i0.ɵɵtext(1, "\u2014 Select Constraint \u2014");
225
235
  i0.ɵɵelementEnd();
226
236
  } if (rf & 2) {
227
237
  i0.ɵɵproperty("selected", true);
228
238
  } }
229
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_For_32_Template(rf, ctx) { if (rf & 1) {
239
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_For_33_Template(rf, ctx) { if (rf & 1) {
230
240
  i0.ɵɵelementStart(0, "option", 5);
231
241
  i0.ɵɵtext(1);
232
242
  i0.ɵɵelementEnd();
@@ -238,13 +248,13 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_For_32_Template(rf
238
248
  i0.ɵɵadvance();
239
249
  i0.ɵɵtextInterpolate(t_r16.Label);
240
250
  } }
241
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_33_Template(rf, ctx) { if (rf & 1) {
251
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template(rf, ctx) { if (rf & 1) {
242
252
  const _r17 = i0.ɵɵgetCurrentView();
243
253
  i0.ɵɵelementStart(0, "div", 3)(1, "label");
244
254
  i0.ɵɵtext(2, "Violation Policy");
245
255
  i0.ɵɵelementEnd();
246
256
  i0.ɵɵelementStart(3, "select", 13);
247
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_33_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r17); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateViolationPolicy(ɵ$index_185_r9, $event)); });
257
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template_select_change_3_listener($event) { i0.ɵɵrestoreView(_r17); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateViolationPolicy(ɵ$index_185_r9, $event)); });
248
258
  i0.ɵɵelementStart(4, "option", 48);
249
259
  i0.ɵɵtext(5, "Fail Row");
250
260
  i0.ɵɵelementEnd();
@@ -259,13 +269,13 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_33_Tem
259
269
  i0.ɵɵadvance(3);
260
270
  i0.ɵɵproperty("value", output_r11.Constraint.OnViolation || "fail");
261
271
  } }
262
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Conditional_4_For_7_Template(rf, ctx) { if (rf & 1) {
272
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_4_For_7_Template(rf, ctx) { if (rf & 1) {
263
273
  const _r19 = i0.ɵɵgetCurrentView();
264
274
  i0.ɵɵelementStart(0, "div", 53)(1, "span", 54);
265
275
  i0.ɵɵtext(2);
266
276
  i0.ɵɵelementEnd();
267
277
  i0.ɵɵelementStart(3, "input", 55);
268
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Conditional_4_For_7_Template_input_input_3_listener($event) { const val_r20 = i0.ɵɵrestoreView(_r19).$implicit; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateEnumValueDescription(ɵ$index_185_r9, val_r20, $event)); });
278
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_4_For_7_Template_input_input_3_listener($event) { const val_r20 = i0.ɵɵrestoreView(_r19).$implicit; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateEnumValueDescription(ɵ$index_185_r9, val_r20, $event)); });
269
279
  i0.ɵɵelementEnd()();
270
280
  } if (rf & 2) {
271
281
  const val_r20 = ctx.$implicit;
@@ -276,14 +286,14 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Con
276
286
  i0.ɵɵadvance();
277
287
  i0.ɵɵproperty("value", ctx_r1.GetEnumValueDescription(output_r11, val_r20))("placeholder", "Description for " + val_r20);
278
288
  } }
279
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Conditional_4_Template(rf, ctx) { if (rf & 1) {
289
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_4_Template(rf, ctx) { if (rf & 1) {
280
290
  i0.ɵɵelementStart(0, "div", 19)(1, "label");
281
291
  i0.ɵɵtext(2, "Value Descriptions ");
282
292
  i0.ɵɵelementStart(3, "span", 38);
283
293
  i0.ɵɵtext(4, "\u2014 Decision models require a description for every choice option");
284
294
  i0.ɵɵelementEnd()();
285
295
  i0.ɵɵelementStart(5, "div", 52);
286
- i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Conditional_4_For_7_Template, 4, 3, "div", 53, i0.ɵɵrepeaterTrackByIdentity);
296
+ i0.ɵɵrepeaterCreate(6, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_4_For_7_Template, 4, 3, "div", 53, i0.ɵɵrepeaterTrackByIdentity);
287
297
  i0.ɵɵelementEnd()();
288
298
  } if (rf & 2) {
289
299
  const output_r11 = i0.ɵɵnextContext(2).$implicit;
@@ -291,15 +301,15 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Con
291
301
  i0.ɵɵadvance(6);
292
302
  i0.ɵɵrepeater(ctx_r1.GetEnumValues(output_r11));
293
303
  } }
294
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template(rf, ctx) { if (rf & 1) {
304
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Template(rf, ctx) { if (rf & 1) {
295
305
  const _r18 = i0.ɵɵgetCurrentView();
296
306
  i0.ɵɵelementStart(0, "div", 19)(1, "label");
297
307
  i0.ɵɵtext(2, "Allowed Values (comma separated)");
298
308
  i0.ɵɵelementEnd();
299
309
  i0.ɵɵelementStart(3, "input", 51);
300
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template_input_input_3_listener($event) { i0.ɵɵrestoreView(_r18); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateEnumValues(ɵ$index_185_r9, $event)); });
310
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Template_input_input_3_listener($event) { i0.ɵɵrestoreView(_r18); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateEnumValues(ɵ$index_185_r9, $event)); });
301
311
  i0.ɵɵelementEnd()();
302
- i0.ɵɵconditionalCreate(4, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Conditional_4_Template, 8, 0, "div", 19);
312
+ i0.ɵɵconditionalCreate(4, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_4_Template, 8, 0, "div", 19);
303
313
  } if (rf & 2) {
304
314
  const output_r11 = i0.ɵɵnextContext().$implicit;
305
315
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -308,44 +318,44 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Tem
308
318
  i0.ɵɵadvance();
309
319
  i0.ɵɵconditional(ctx_r1.IsDecisionPipeline && ctx_r1.GetEnumValues(output_r11).length > 0 ? 4 : -1);
310
320
  } }
311
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
321
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template(rf, ctx) { if (rf & 1) {
312
322
  const _r22 = i0.ɵɵgetCurrentView();
313
323
  i0.ɵɵelementStart(0, "div", 59)(1, "span", 60);
314
324
  i0.ɵɵtext(2);
315
325
  i0.ɵɵelementEnd();
316
326
  i0.ɵɵelementStart(3, "input", 61);
317
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template_input_input_3_listener($event) { const ɵ$index_339_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateNumericLevel(ɵ$index_185_r9, ɵ$index_339_r23, $event)); });
327
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template_input_input_3_listener($event) { const ɵ$index_348_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateNumericLevel(ɵ$index_185_r9, ɵ$index_348_r23, $event)); });
318
328
  i0.ɵɵelementEnd();
319
329
  i0.ɵɵelementStart(4, "button", 62);
320
- i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template_button_click_4_listener() { const ɵ$index_339_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.MoveNumericLevel(ɵ$index_185_r9, ɵ$index_339_r23, "up")); });
330
+ i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template_button_click_4_listener() { const ɵ$index_348_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.MoveNumericLevel(ɵ$index_185_r9, ɵ$index_348_r23, "up")); });
321
331
  i0.ɵɵelement(5, "i", 63);
322
332
  i0.ɵɵelementEnd();
323
333
  i0.ɵɵelementStart(6, "button", 64);
324
- i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template_button_click_6_listener() { const ɵ$index_339_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.MoveNumericLevel(ɵ$index_185_r9, ɵ$index_339_r23, "down")); });
334
+ i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template_button_click_6_listener() { const ɵ$index_348_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.MoveNumericLevel(ɵ$index_185_r9, ɵ$index_348_r23, "down")); });
325
335
  i0.ɵɵelement(7, "i", 65);
326
336
  i0.ɵɵelementEnd();
327
337
  i0.ɵɵelementStart(8, "button", 66);
328
- i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template_button_click_8_listener() { const ɵ$index_339_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.RemoveNumericLevel(ɵ$index_185_r9, ɵ$index_339_r23)); });
338
+ i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template_button_click_8_listener() { const ɵ$index_348_r23 = i0.ɵɵrestoreView(_r22).$index; const ɵ$index_185_r9 = i0.ɵɵnextContext(3).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.RemoveNumericLevel(ɵ$index_185_r9, ɵ$index_348_r23)); });
329
339
  i0.ɵɵelement(9, "i", 44);
330
340
  i0.ɵɵelementEnd()();
331
341
  } if (rf & 2) {
332
342
  const lvl_r24 = ctx.$implicit;
333
- const ɵ$index_339_r23 = ctx.$index;
334
- const ɵ$count_339_r25 = ctx.$count;
343
+ const ɵ$index_348_r23 = ctx.$index;
344
+ const ɵ$count_348_r25 = ctx.$count;
335
345
  const output_r11 = i0.ɵɵnextContext(3).$implicit;
336
346
  const ctx_r1 = i0.ɵɵnextContext(2);
337
347
  i0.ɵɵadvance(2);
338
- i0.ɵɵtextInterpolate(ɵ$index_339_r23 + 1);
348
+ i0.ɵɵtextInterpolate(ɵ$index_348_r23 + 1);
339
349
  i0.ɵɵadvance();
340
350
  i0.ɵɵproperty("value", lvl_r24);
341
351
  i0.ɵɵadvance();
342
- i0.ɵɵproperty("disabled", ɵ$index_339_r23 === 0);
352
+ i0.ɵɵproperty("disabled", ɵ$index_348_r23 === 0);
343
353
  i0.ɵɵadvance(2);
344
- i0.ɵɵproperty("disabled", ɵ$index_339_r23 === ɵ$count_339_r25 - 1);
354
+ i0.ɵɵproperty("disabled", ɵ$index_348_r23 === ɵ$count_348_r25 - 1);
345
355
  i0.ɵɵadvance(2);
346
356
  i0.ɵɵproperty("disabled", ctx_r1.GetNumericLevels(output_r11).length <= 2);
347
357
  } }
348
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_Template(rf, ctx) { if (rf & 1) {
358
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_Template(rf, ctx) { if (rf & 1) {
349
359
  const _r21 = i0.ɵɵgetCurrentView();
350
360
  i0.ɵɵelementStart(0, "div", 19)(1, "div", 56)(2, "label");
351
361
  i0.ɵɵtext(3, "Numeric Levels ");
@@ -353,12 +363,12 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Con
353
363
  i0.ɵɵtext(5, "(Ordered: lowest to highest, 2 to 10 levels)");
354
364
  i0.ɵɵelementEnd()();
355
365
  i0.ɵɵelementStart(6, "button", 57);
356
- i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r21); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.AddNumericLevel(ɵ$index_185_r9)); });
366
+ i0.ɵɵlistener("click", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r21); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.AddNumericLevel(ɵ$index_185_r9)); });
357
367
  i0.ɵɵelement(7, "i", 23);
358
368
  i0.ɵɵtext(8, " Add Level ");
359
369
  i0.ɵɵelementEnd()();
360
370
  i0.ɵɵelementStart(9, "div", 58);
361
- i0.ɵɵrepeaterCreate(10, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_For_11_Template, 10, 5, "div", 59, i0.ɵɵrepeaterTrackByIndex);
371
+ i0.ɵɵrepeaterCreate(10, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_For_11_Template, 10, 5, "div", 59, i0.ɵɵrepeaterTrackByIndex);
362
372
  i0.ɵɵelementEnd()();
363
373
  } if (rf & 2) {
364
374
  const output_r11 = i0.ɵɵnextContext(2).$implicit;
@@ -368,19 +378,19 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Con
368
378
  i0.ɵɵadvance(4);
369
379
  i0.ɵɵrepeater(ctx_r1.GetNumericLevels(output_r11));
370
380
  } }
371
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_1_Template(rf, ctx) { if (rf & 1) {
381
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_1_Template(rf, ctx) { if (rf & 1) {
372
382
  const _r26 = i0.ɵɵgetCurrentView();
373
383
  i0.ɵɵelementStart(0, "div", 7)(1, "div", 3)(2, "label");
374
384
  i0.ɵɵtext(3, "Min Value");
375
385
  i0.ɵɵelementEnd();
376
386
  i0.ɵɵelementStart(4, "input", 67);
377
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_1_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r26); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateNumericMin(ɵ$index_185_r9, $event)); });
387
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_1_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r26); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateNumericMin(ɵ$index_185_r9, $event)); });
378
388
  i0.ɵɵelementEnd()();
379
389
  i0.ɵɵelementStart(5, "div", 3)(6, "label");
380
390
  i0.ɵɵtext(7, "Max Value");
381
391
  i0.ɵɵelementEnd();
382
392
  i0.ɵɵelementStart(8, "input", 67);
383
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_1_Template_input_input_8_listener($event) { i0.ɵɵrestoreView(_r26); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateNumericMax(ɵ$index_185_r9, $event)); });
393
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_1_Template_input_input_8_listener($event) { i0.ɵɵrestoreView(_r26); const ɵ$index_185_r9 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateNumericMax(ɵ$index_185_r9, $event)); });
384
394
  i0.ɵɵelementEnd()()();
385
395
  } if (rf & 2) {
386
396
  const output_r11 = i0.ɵɵnextContext(2).$implicit;
@@ -390,21 +400,106 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Con
390
400
  i0.ɵɵadvance(4);
391
401
  i0.ɵɵproperty("value", ctx_r1.getNumericMax(output_r11.Constraint));
392
402
  } }
393
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Template(rf, ctx) { if (rf & 1) {
394
- i0.ɵɵconditionalCreate(0, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_0_Template, 12, 1, "div", 19)(1, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Conditional_1_Template, 9, 2, "div", 7);
403
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Template(rf, ctx) { if (rf & 1) {
404
+ i0.ɵɵconditionalCreate(0, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_0_Template, 12, 1, "div", 19)(1, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Conditional_1_Template, 9, 2, "div", 7);
395
405
  } if (rf & 2) {
396
406
  const ctx_r1 = i0.ɵɵnextContext(3);
397
407
  i0.ɵɵconditional(ctx_r1.IsDecisionPipeline ? 0 : 1);
398
408
  } }
399
- function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Template(rf, ctx) { if (rf & 1) {
409
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Conditional_9_Template(rf, ctx) { if (rf & 1) {
410
+ i0.ɵɵelementStart(0, "option", 5);
411
+ i0.ɵɵtext(1);
412
+ i0.ɵɵelementEnd();
413
+ } if (rf & 2) {
414
+ let tmp_14_0;
415
+ let tmp_16_0;
416
+ const output_r11 = i0.ɵɵnextContext(2).$implicit;
417
+ const ctx_r1 = i0.ɵɵnextContext(2);
418
+ i0.ɵɵproperty("value", (tmp_14_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_14_0.Entity)("selected", true);
419
+ i0.ɵɵadvance();
420
+ i0.ɵɵtextInterpolate((tmp_16_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_16_0.Entity);
421
+ } }
422
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_For_11_Template(rf, ctx) { if (rf & 1) {
423
+ i0.ɵɵelementStart(0, "option", 5);
424
+ i0.ɵɵtext(1);
425
+ i0.ɵɵelementEnd();
426
+ } if (rf & 2) {
427
+ let tmp_24_0;
428
+ const e_r28 = ctx.$implicit;
429
+ const output_r11 = i0.ɵɵnextContext(2).$implicit;
430
+ const ctx_r1 = i0.ɵɵnextContext(2);
431
+ i0.ɵɵproperty("value", e_r28.Name)("selected", e_r28.Name === ((tmp_24_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_24_0.Entity));
432
+ i0.ɵɵadvance();
433
+ i0.ɵɵtextInterpolate(e_r28.DisplayName || e_r28.Name);
434
+ } }
435
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template(rf, ctx) { if (rf & 1) {
400
436
  const _r27 = i0.ɵɵgetCurrentView();
437
+ i0.ɵɵelementStart(0, "div", 7)(1, "div", 3)(2, "label");
438
+ i0.ɵɵtext(3, "Lookup Entity ");
439
+ i0.ɵɵelementStart(4, "span", 38);
440
+ i0.ɵɵtext(5, "\u2014 the entity whose rows are the allowed values");
441
+ i0.ɵɵelementEnd()();
442
+ i0.ɵɵelementStart(6, "select", 4);
443
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template_select_change_6_listener($event) { i0.ɵɵrestoreView(_r27); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateLookupEntity(ɵ$index_185_r9, $event)); });
444
+ i0.ɵɵelementStart(7, "option", 68);
445
+ i0.ɵɵtext(8, "\u2014 From the target field \u2014");
446
+ i0.ɵɵelementEnd();
447
+ i0.ɵɵconditionalCreate(9, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Conditional_9_Template, 2, 3, "option", 5);
448
+ i0.ɵɵrepeaterCreate(10, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_For_11_Template, 2, 3, "option", 5, _forTrack1);
449
+ i0.ɵɵelementEnd()();
450
+ i0.ɵɵelementStart(12, "div", 3)(13, "label");
451
+ i0.ɵɵtext(14, "Match Field ");
452
+ i0.ɵɵelementStart(15, "span", 38);
453
+ i0.ɵɵtext(16, "\u2014 the column the model's answer is matched on (default Name)");
454
+ i0.ɵɵelementEnd()();
455
+ i0.ɵɵelementStart(17, "input", 69);
456
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template_input_input_17_listener($event) { i0.ɵɵrestoreView(_r27); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateLookupMatchField(ɵ$index_185_r9, $event)); });
457
+ i0.ɵɵelementEnd()()();
458
+ i0.ɵɵelementStart(18, "div", 7)(19, "div", 3)(20, "label");
459
+ i0.ɵɵtext(21, "Display Fields ");
460
+ i0.ɵɵelementStart(22, "span", 38);
461
+ i0.ɵɵtext(23, "\u2014 comma separated, shown to the model next to each value");
462
+ i0.ɵɵelementEnd()();
463
+ i0.ɵɵelementStart(24, "input", 70);
464
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template_input_input_24_listener($event) { i0.ɵɵrestoreView(_r27); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateLookupDisplayFields(ɵ$index_185_r9, $event)); });
465
+ i0.ɵɵelementEnd()();
466
+ i0.ɵɵelementStart(25, "div", 3)(26, "label");
467
+ i0.ɵɵtext(27, "Filter ");
468
+ i0.ɵɵelementStart(28, "span", 38);
469
+ i0.ɵɵtext(29, "\u2014 limits which rows are allowed");
470
+ i0.ɵɵelementEnd()();
471
+ i0.ɵɵelementStart(30, "input", 71);
472
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template_input_input_30_listener($event) { i0.ɵɵrestoreView(_r27); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateLookupFilter(ɵ$index_185_r9, $event)); });
473
+ i0.ɵɵelementEnd()()();
474
+ } if (rf & 2) {
475
+ let tmp_13_0;
476
+ let tmp_14_0;
477
+ let tmp_16_0;
478
+ let tmp_18_0;
479
+ const output_r11 = i0.ɵɵnextContext().$implicit;
480
+ const ctx_r1 = i0.ɵɵnextContext(2);
481
+ i0.ɵɵadvance(7);
482
+ i0.ɵɵproperty("selected", !((tmp_13_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_13_0.Entity));
483
+ i0.ɵɵadvance(2);
484
+ i0.ɵɵconditional(((tmp_14_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_14_0.Entity) && !ctx_r1.IsEntityListed((tmp_14_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_14_0.Entity) ? 9 : -1);
485
+ i0.ɵɵadvance();
486
+ i0.ɵɵrepeater(ctx_r1.availableEntities);
487
+ i0.ɵɵadvance(7);
488
+ i0.ɵɵproperty("value", ((tmp_16_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_16_0.MatchField) || "");
489
+ i0.ɵɵadvance(7);
490
+ i0.ɵɵproperty("value", ctx_r1.GetLookupDisplayFieldsCsv(output_r11.Constraint));
491
+ i0.ɵɵadvance(6);
492
+ i0.ɵɵproperty("value", ((tmp_18_0 = ctx_r1.LookupOf(output_r11.Constraint)) == null ? null : tmp_18_0.Filter) || "");
493
+ } }
494
+ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_38_Template(rf, ctx) { if (rf & 1) {
495
+ const _r29 = i0.ɵɵgetCurrentView();
401
496
  i0.ɵɵelementStart(0, "div", 19)(1, "label");
402
497
  i0.ɵɵtext(2, "Decision Threshold (0.0 to 1.0) ");
403
498
  i0.ɵɵelementStart(3, "span", 38);
404
499
  i0.ɵɵtext(4, "\u2014 calibrated probability threshold for true");
405
500
  i0.ɵɵelementEnd()();
406
- i0.ɵɵelementStart(5, "input", 68);
407
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Template_input_input_5_listener($event) { i0.ɵɵrestoreView(_r27); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateBooleanThreshold(ɵ$index_185_r9, $event)); });
501
+ i0.ɵɵelementStart(5, "input", 72);
502
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_38_Template_input_input_5_listener($event) { i0.ɵɵrestoreView(_r29); const ɵ$index_185_r9 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.UpdateBooleanThreshold(ɵ$index_185_r9, $event)); });
408
503
  i0.ɵɵelementEnd()();
409
504
  } if (rf & 2) {
410
505
  const output_r11 = i0.ɵɵnextContext().$implicit;
@@ -443,21 +538,23 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Template(rf, ctx)
443
538
  i0.ɵɵrepeaterCreate(21, FeaturePipelineBuilderComponent_Conditional_70_For_2_For_22_Template, 2, 3, "option", 5, _forTrack2);
444
539
  i0.ɵɵelementEnd()()();
445
540
  i0.ɵɵelementStart(23, "div", 32);
446
- i0.ɵɵconditionalCreate(24, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Template, 8, 1, "div", 3);
541
+ i0.ɵɵconditionalCreate(24, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_24_Template, 5, 0, "div", 3);
447
542
  i0.ɵɵconditionalCreate(25, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_25_Template, 8, 1, "div", 3);
448
- i0.ɵɵelementStart(26, "div", 3)(27, "label");
449
- i0.ɵɵtext(28, "Constraint Type");
543
+ i0.ɵɵconditionalCreate(26, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_26_Template, 8, 1, "div", 3);
544
+ i0.ɵɵelementStart(27, "div", 3)(28, "label");
545
+ i0.ɵɵtext(29, "Constraint Type");
450
546
  i0.ɵɵelementEnd();
451
- i0.ɵɵelementStart(29, "select", 4);
452
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Template_select_change_29_listener($event) { const ɵ$index_185_r9 = i0.ɵɵrestoreView(_r8).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateConstraintType(ɵ$index_185_r9, $event)); });
453
- i0.ɵɵconditionalCreate(30, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_30_Template, 2, 1, "option", 47);
454
- i0.ɵɵrepeaterCreate(31, FeaturePipelineBuilderComponent_Conditional_70_For_2_For_32_Template, 2, 3, "option", 5, _forTrack2);
547
+ i0.ɵɵelementStart(30, "select", 4);
548
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_70_For_2_Template_select_change_30_listener($event) { const ɵ$index_185_r9 = i0.ɵɵrestoreView(_r8).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateConstraintType(ɵ$index_185_r9, $event)); });
549
+ i0.ɵɵconditionalCreate(31, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_31_Template, 2, 1, "option", 47);
550
+ i0.ɵɵrepeaterCreate(32, FeaturePipelineBuilderComponent_Conditional_70_For_2_For_33_Template, 2, 3, "option", 5, _forTrack2);
455
551
  i0.ɵɵelementEnd()();
456
- i0.ɵɵconditionalCreate(33, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_33_Template, 10, 1, "div", 3);
552
+ i0.ɵɵconditionalCreate(34, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template, 10, 1, "div", 3);
457
553
  i0.ɵɵelementEnd();
458
- i0.ɵɵconditionalCreate(34, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_34_Template, 5, 2);
459
- i0.ɵɵconditionalCreate(35, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Template, 2, 1);
460
- i0.ɵɵconditionalCreate(36, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Template, 6, 1, "div", 19);
554
+ i0.ɵɵconditionalCreate(35, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_35_Template, 5, 2);
555
+ i0.ɵɵconditionalCreate(36, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_36_Template, 2, 1);
556
+ i0.ɵɵconditionalCreate(37, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_37_Template, 31, 5);
557
+ i0.ɵɵconditionalCreate(38, FeaturePipelineBuilderComponent_Conditional_70_For_2_Conditional_38_Template, 6, 1, "div", 19);
461
558
  i0.ɵɵelementEnd();
462
559
  } if (rf & 2) {
463
560
  const output_r11 = ctx.$implicit;
@@ -474,25 +571,29 @@ function FeaturePipelineBuilderComponent_Conditional_70_For_2_Template(rf, ctx)
474
571
  i0.ɵɵadvance();
475
572
  i0.ɵɵrepeater(ctx_r1.AvailableTargetModes);
476
573
  i0.ɵɵadvance(3);
477
- i0.ɵɵconditional(output_r11.Target.Mode === "field" ? 24 : -1);
574
+ i0.ɵɵconditional(!output_r11.Target ? 24 : -1);
478
575
  i0.ɵɵadvance();
479
- i0.ɵɵconditional(output_r11.Target.Mode === "child" ? 25 : -1);
576
+ i0.ɵɵconditional(output_r11.Target && output_r11.Target.Mode === "field" ? 25 : -1);
577
+ i0.ɵɵadvance();
578
+ i0.ɵɵconditional(output_r11.Target && output_r11.Target.Mode === "child" ? 26 : -1);
480
579
  i0.ɵɵadvance(5);
481
- i0.ɵɵconditional(!ctx_r1.IsConstraintTypeOffered(output_r11) ? 30 : -1);
580
+ i0.ɵɵconditional(!ctx_r1.IsConstraintTypeOffered(output_r11) ? 31 : -1);
482
581
  i0.ɵɵadvance();
483
582
  i0.ɵɵrepeater(ctx_r1.AvailableConstraintTypes);
484
583
  i0.ɵɵadvance(2);
485
- i0.ɵɵconditional(output_r11.Constraint ? 33 : -1);
584
+ i0.ɵɵconditional(output_r11.Constraint ? 34 : -1);
585
+ i0.ɵɵadvance();
586
+ i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "enum" ? 35 : -1);
486
587
  i0.ɵɵadvance();
487
- i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "enum" ? 34 : -1);
588
+ i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "numeric" ? 36 : -1);
488
589
  i0.ɵɵadvance();
489
- i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "numeric" ? 35 : -1);
590
+ i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "lookup" ? 37 : -1);
490
591
  i0.ɵɵadvance();
491
- i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "boolean" && ctx_r1.IsDecisionPipeline ? 36 : -1);
592
+ i0.ɵɵconditional((output_r11.Constraint == null ? null : output_r11.Constraint.Type) === "boolean" && ctx_r1.IsDecisionPipeline ? 38 : -1);
492
593
  } }
493
594
  function FeaturePipelineBuilderComponent_Conditional_70_Template(rf, ctx) { if (rf & 1) {
494
595
  i0.ɵɵelementStart(0, "div", 25);
495
- i0.ɵɵrepeaterCreate(1, FeaturePipelineBuilderComponent_Conditional_70_For_2_Template, 37, 12, "div", 41, i0.ɵɵrepeaterTrackByIndex);
596
+ i0.ɵɵrepeaterCreate(1, FeaturePipelineBuilderComponent_Conditional_70_For_2_Template, 39, 14, "div", 41, i0.ɵɵrepeaterTrackByIndex);
496
597
  i0.ɵɵelementEnd();
497
598
  } if (rf & 2) {
498
599
  const ctx_r1 = i0.ɵɵnextContext();
@@ -500,33 +601,33 @@ function FeaturePipelineBuilderComponent_Conditional_70_Template(rf, ctx) { if (
500
601
  i0.ɵɵrepeater(ctx_r1.spec.Outputs);
501
602
  } }
502
603
  function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_For_8_Template(rf, ctx) { if (rf & 1) {
503
- i0.ɵɵelementStart(0, "option", 73);
604
+ i0.ɵɵelementStart(0, "option", 77);
504
605
  i0.ɵɵtext(1);
505
606
  i0.ɵɵelementEnd();
506
607
  } if (rf & 2) {
507
- const target_r30 = ctx.$implicit;
608
+ const target_r32 = ctx.$implicit;
508
609
  const ctx_r1 = i0.ɵɵnextContext(3);
509
- i0.ɵɵproperty("value", target_r30.ID)("disabled", !!ctx_r1.GetTargetProblem(target_r30))("selected", ctx_r1.IsSavedEscalationTarget(target_r30));
610
+ i0.ɵɵproperty("value", target_r32.ID)("disabled", !!ctx_r1.GetTargetProblem(target_r32))("selected", ctx_r1.IsSavedEscalationTarget(target_r32));
510
611
  i0.ɵɵadvance();
511
- i0.ɵɵtextInterpolate2(" ", target_r30.Name, "", ctx_r1.GetTargetProblem(target_r30) ? " (" + ctx_r1.GetTargetProblem(target_r30) + ")" : "", " ");
612
+ i0.ɵɵtextInterpolate2(" ", target_r32.Name, "", ctx_r1.GetTargetProblem(target_r32) ? " (" + ctx_r1.GetTargetProblem(target_r32) + ")" : "", " ");
512
613
  } }
513
614
  function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template(rf, ctx) { if (rf & 1) {
514
- const _r29 = i0.ɵɵgetCurrentView();
615
+ const _r31 = i0.ɵɵgetCurrentView();
515
616
  i0.ɵɵelementStart(0, "div", 7)(1, "div", 3)(2, "label");
516
617
  i0.ɵɵtext(3, "Target LLM Pipeline");
517
618
  i0.ɵɵelementEnd();
518
619
  i0.ɵɵelementStart(4, "select", 4);
519
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template_select_change_4_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnEscalationTargetChange($event)); });
620
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template_select_change_4_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnEscalationTargetChange($event)); });
520
621
  i0.ɵɵelementStart(5, "option", 18);
521
622
  i0.ɵɵtext(6);
522
623
  i0.ɵɵelementEnd();
523
- i0.ɵɵrepeaterCreate(7, FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_For_8_Template, 2, 5, "option", 73, _forTrack1);
624
+ i0.ɵɵrepeaterCreate(7, FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_For_8_Template, 2, 5, "option", 77, _forTrack1);
524
625
  i0.ɵɵelementEnd()();
525
626
  i0.ɵɵelementStart(9, "div", 3)(10, "label");
526
627
  i0.ɵɵtext(11, "Confidence Floor (0.0 to 1.0)");
527
628
  i0.ɵɵelementEnd();
528
- i0.ɵɵelementStart(12, "input", 74);
529
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template_input_input_12_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnEscalationFloorChange($event)); });
629
+ i0.ɵɵelementStart(12, "input", 78);
630
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template_input_input_12_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnEscalationFloorChange($event)); });
530
631
  i0.ɵɵelementEnd()()();
531
632
  } if (rf & 2) {
532
633
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -540,17 +641,17 @@ function FeaturePipelineBuilderComponent_Conditional_71_Conditional_12_Template(
540
641
  i0.ɵɵproperty("value", (ctx_r1.spec.Escalation == null ? null : ctx_r1.spec.Escalation.BelowConfidence) ?? "");
541
642
  } }
542
643
  function FeaturePipelineBuilderComponent_Conditional_71_Template(rf, ctx) { if (rf & 1) {
543
- const _r28 = i0.ɵɵgetCurrentView();
644
+ const _r30 = i0.ɵɵgetCurrentView();
544
645
  i0.ɵɵelementStart(0, "section", 26)(1, "div", 9);
545
- i0.ɵɵelement(2, "i", 69);
646
+ i0.ɵɵelement(2, "i", 73);
546
647
  i0.ɵɵelementStart(3, "h3");
547
648
  i0.ɵɵtext(4, "Borderline Escalation");
548
649
  i0.ɵɵelementEnd()();
549
650
  i0.ɵɵelementStart(5, "p", 11);
550
651
  i0.ɵɵtext(6, "Records any output of which the decision model answers below this confidence are re-run through the chosen LLM pipeline. Only those records are re-run.");
551
652
  i0.ɵɵelementEnd();
552
- i0.ɵɵelementStart(7, "div", 70)(8, "label", 71)(9, "input", 72);
553
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_71_Template_input_change_9_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnEscalationToggle($event)); });
653
+ i0.ɵɵelementStart(7, "div", 74)(8, "label", 75)(9, "input", 76);
654
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_71_Template_input_change_9_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnEscalationToggle($event)); });
554
655
  i0.ɵɵelementEnd();
555
656
  i0.ɵɵelementStart(10, "span");
556
657
  i0.ɵɵtext(11, "Escalate borderline records to an LLM pipeline");
@@ -565,28 +666,28 @@ function FeaturePipelineBuilderComponent_Conditional_71_Template(rf, ctx) { if (
565
666
  i0.ɵɵconditional(ctx_r1.IsEscalationEnabled ? 12 : -1);
566
667
  } }
567
668
  function FeaturePipelineBuilderComponent_Conditional_105_Template(rf, ctx) { if (rf & 1) {
568
- const _r31 = i0.ɵɵgetCurrentView();
669
+ const _r33 = i0.ɵɵgetCurrentView();
569
670
  i0.ɵɵelementStart(0, "div", 32)(1, "div", 3)(2, "label");
570
671
  i0.ɵɵtext(3, "Cache Key Fields (comma separated)");
571
672
  i0.ɵɵelementEnd();
572
- i0.ɵɵelementStart(4, "input", 75);
573
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_105_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheKeyFields($event)); });
673
+ i0.ɵɵelementStart(4, "input", 79);
674
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_105_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheKeyFields($event)); });
574
675
  i0.ɵɵelementEnd()();
575
676
  i0.ɵɵelementStart(5, "div", 3)(6, "label");
576
677
  i0.ɵɵtext(7, "Cache TTL (Seconds)");
577
678
  i0.ɵɵelementEnd();
578
679
  i0.ɵɵelementStart(8, "input", 67);
579
- i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_105_Template_input_input_8_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheTTL($event)); });
680
+ i0.ɵɵlistener("input", function FeaturePipelineBuilderComponent_Conditional_105_Template_input_input_8_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheTTL($event)); });
580
681
  i0.ɵɵelementEnd()();
581
682
  i0.ɵɵelementStart(9, "div", 3)(10, "label");
582
683
  i0.ɵɵtext(11, "Cache Scope");
583
684
  i0.ɵɵelementEnd();
584
685
  i0.ɵɵelementStart(12, "select", 13);
585
- i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_105_Template_select_change_12_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheScope($event)); });
586
- i0.ɵɵelementStart(13, "option", 76);
686
+ i0.ɵɵlistener("change", function FeaturePipelineBuilderComponent_Conditional_105_Template_select_change_12_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateCacheScope($event)); });
687
+ i0.ɵɵelementStart(13, "option", 80);
587
688
  i0.ɵɵtext(14, "Pipeline (Isolated to this process)");
588
689
  i0.ɵɵelementEnd();
589
- i0.ɵɵelementStart(15, "option", 77);
690
+ i0.ɵɵelementStart(15, "option", 81);
590
691
  i0.ɵɵtext(16, "Prompt (Shared across processes with same prompt)");
591
692
  i0.ɵɵelementEnd()()()();
592
693
  } if (rf & 2) {
@@ -603,9 +704,9 @@ function FeaturePipelineBuilderComponent_Conditional_106_For_6_Conditional_4_Tem
603
704
  i0.ɵɵtext(1);
604
705
  i0.ɵɵelementEnd();
605
706
  } if (rf & 2) {
606
- const issue_r32 = i0.ɵɵnextContext().$implicit;
707
+ const issue_r34 = i0.ɵɵnextContext().$implicit;
607
708
  i0.ɵɵadvance();
608
- i0.ɵɵtextInterpolate1("(Fix: ", issue_r32.FixRecommendation, ")");
709
+ i0.ɵɵtextInterpolate1("(Fix: ", issue_r34.FixRecommendation, ")");
609
710
  } }
610
711
  function FeaturePipelineBuilderComponent_Conditional_106_For_6_Template(rf, ctx) { if (rf & 1) {
611
712
  i0.ɵɵelementStart(0, "li")(1, "strong");
@@ -615,17 +716,17 @@ function FeaturePipelineBuilderComponent_Conditional_106_For_6_Template(rf, ctx)
615
716
  i0.ɵɵconditionalCreate(4, FeaturePipelineBuilderComponent_Conditional_106_For_6_Conditional_4_Template, 2, 1, "span", 38);
616
717
  i0.ɵɵelementEnd();
617
718
  } if (rf & 2) {
618
- const issue_r32 = ctx.$implicit;
719
+ const issue_r34 = ctx.$implicit;
619
720
  i0.ɵɵadvance(2);
620
- i0.ɵɵtextInterpolate(issue_r32.Field ? issue_r32.Field + ": " : "");
721
+ i0.ɵɵtextInterpolate(issue_r34.Field ? issue_r34.Field + ": " : "");
621
722
  i0.ɵɵadvance();
622
- i0.ɵɵtextInterpolate1("", issue_r32.Message, " ");
723
+ i0.ɵɵtextInterpolate1("", issue_r34.Message, " ");
623
724
  i0.ɵɵadvance();
624
- i0.ɵɵconditional(issue_r32.FixRecommendation ? 4 : -1);
725
+ i0.ɵɵconditional(issue_r34.FixRecommendation ? 4 : -1);
625
726
  } }
626
727
  function FeaturePipelineBuilderComponent_Conditional_106_Template(rf, ctx) { if (rf & 1) {
627
728
  i0.ɵɵelementStart(0, "div", 33)(1, "h4");
628
- i0.ɵɵelement(2, "i", 78);
729
+ i0.ɵɵelement(2, "i", 82);
629
730
  i0.ɵɵtext(3, " Specification Issues");
630
731
  i0.ɵɵelementEnd();
631
732
  i0.ɵɵelementStart(4, "ul");
@@ -641,10 +742,12 @@ function FeaturePipelineBuilderComponent_For_110_Template(rf, ctx) { if (rf & 1)
641
742
  i0.ɵɵtext(1);
642
743
  i0.ɵɵelementEnd();
643
744
  } if (rf & 2) {
644
- const issue_r33 = ctx.$implicit;
745
+ const issue_r35 = ctx.$implicit;
645
746
  i0.ɵɵadvance();
646
- i0.ɵɵtextInterpolate(issue_r33);
747
+ i0.ɵɵtextInterpolate(issue_r35);
647
748
  } }
749
+ /** How long typing in a lookup's editor must pause before the preview reads the lookup entity's rows. */
750
+ const LOOKUP_PREVIEW_DEBOUNCE_MS = 400;
648
751
  /**
649
752
  * The confidence floor typed into the builder, as a number. A blank or non-numeric entry is NaN, so the spec
650
753
  * check reports it ("must be a number greater than 0 and less than 1, but is NaN") instead of the builder
@@ -720,6 +823,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
720
823
  const opt = this.AvailablePipelineTypes.find((t) => t.Name.toLowerCase() === cur);
721
824
  return opt?.Description ?? '';
722
825
  }
826
+ /** `none` (Feature Value only) is always offered, first: it writes nothing, so no driver capability gates it. */
723
827
  get AvailableTargetModes() {
724
828
  const all = [
725
829
  { Value: 'field', Label: 'Entity Column (field)' },
@@ -727,27 +831,37 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
727
831
  { Value: 'tags', Label: 'Taxonomy Tags (tags)' },
728
832
  ];
729
833
  const supported = this.CurrentCapabilities.TargetModes;
730
- return all.filter((m) => supported.includes(m.Value));
834
+ return [{ Value: 'none', Label: 'Feature value only (no write-back)' }, ...all.filter((m) => supported.includes(m.Value))];
731
835
  }
836
+ /** Every constraint type the pipeline type's driver declares, plus `none` when an unconstrained output is allowed. */
732
837
  get AvailableConstraintTypes() {
733
838
  const options = [];
734
839
  if (!this.IsDecisionPipeline) {
735
840
  options.push({ Value: 'none', Label: 'None / Unconstrained' });
736
841
  }
737
- if (this.CurrentCapabilities.ConstraintTypes.includes('boolean')) {
738
- options.push({ Value: 'boolean', Label: 'Boolean' });
739
- }
740
- if (this.CurrentCapabilities.ConstraintTypes.includes('enum')) {
741
- options.push({ Value: 'enum', Label: 'Enum (Allowed Values)' });
742
- }
743
- if (this.CurrentCapabilities.ConstraintTypes.includes('numeric')) {
744
- options.push({ Value: 'numeric', Label: this.IsDecisionPipeline ? 'Numeric (Levels)' : 'Numeric (Min/Max)' });
745
- }
746
- if (this.CurrentCapabilities.ConstraintTypes.includes('freetext')) {
747
- options.push({ Value: 'freetext', Label: 'Free Text' });
842
+ const declared = this.CurrentCapabilities.ConstraintTypes;
843
+ for (const type of FeaturePipelineBuilderComponent.constraintTypeOrder) {
844
+ if (declared.includes(type)) {
845
+ options.push({ Value: type, Label: this.constraintTypeLabel(type) });
846
+ }
748
847
  }
749
848
  return options;
750
849
  }
850
+ /** The picker's label for every constraint type, keyed so the compiler fails when the spec gains a type this does not name. */
851
+ static constraintTypeLabels = {
852
+ boolean: 'Boolean',
853
+ enum: 'Enum (Allowed Values)',
854
+ numeric: 'Numeric (Min/Max)',
855
+ lookup: 'Lookup (Existing Records)',
856
+ money: 'Money',
857
+ date: 'Date',
858
+ freetext: 'Free Text',
859
+ };
860
+ /** The picker's order of the constraint types. */
861
+ static constraintTypeOrder = Object.keys(FeaturePipelineBuilderComponent.constraintTypeLabels);
862
+ constraintTypeLabel(type) {
863
+ return type === 'numeric' && this.IsDecisionPipeline ? 'Numeric (Levels)' : FeaturePipelineBuilderComponent.constraintTypeLabels[type];
864
+ }
751
865
  // The pickers mark the saved option with [selected] on each <option>, not [value] on the <select>. A [value]
752
866
  // binding runs before @for creates the options, matches nothing, and does not run again, so the browser shows
753
867
  // the first option. When the saved value is not listed, the placeholder is selected. A placeholder inside @if
@@ -768,7 +882,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
768
882
  }
769
883
  /** Whether the target mode picker lists the output's saved mode. */
770
884
  IsTargetModeOffered(output) {
771
- return this.AvailableTargetModes.some((m) => m.Value === output.Target.Mode);
885
+ return this.AvailableTargetModes.some((m) => m.Value === (output.Target?.Mode ?? 'none'));
772
886
  }
773
887
  /** Whether the target field picker lists a field named `name`. */
774
888
  IsEntityFieldListed(name) {
@@ -875,14 +989,20 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
875
989
  set validationErrors(value) {
876
990
  this.ValidationErrors = value;
877
991
  }
992
+ /** The constraint block the model is sent, as the runner renders it (see {@link RenderConstraintPreview}). */
878
993
  RenderedConstraintPreview = '';
879
- /** @deprecated Use {@link RenderedConstraintPreview}. */
880
- get renderedConstraintPreview() {
881
- return this.RenderedConstraintPreview;
882
- }
883
- /** @deprecated Use {@link RenderedConstraintPreview}. */
884
- set renderedConstraintPreview(value) {
885
- this.RenderedConstraintPreview = value;
994
+ /** Each lookup's allowed rows for the preview, read once per lookup; a failed read is not kept. */
995
+ previewLookupRows = new Map();
996
+ /** Counts preview renders, so a lookup load that finishes after a later edit does not overwrite that edit's preview. */
997
+ previewRenderVersion = 0;
998
+ /** The lookup step of each preview render, debounced so typing in a lookup's editor does not read its entity per keystroke. */
999
+ lookupPreviewRequests = new Subject();
1000
+ destroy$ = new Subject();
1001
+ constructor() {
1002
+ super();
1003
+ this.lookupPreviewRequests
1004
+ .pipe(debounceTime(LOOKUP_PREVIEW_DEBOUNCE_MS), takeUntil(this.destroy$))
1005
+ .subscribe((request) => void this.RenderPreviewWithLookupRows(request.Outputs, request.Entity, request.Version));
886
1006
  }
887
1007
  async ngOnInit() {
888
1008
  this.AvailableEntities = [...this.ProviderToUse.Entities].sort((a, b) => (a.DisplayName || a.Name).localeCompare(b.DisplayName || b.Name));
@@ -892,6 +1012,10 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
892
1012
  await this.LoadEscalationTargets();
893
1013
  this.SyncFromRecord();
894
1014
  }
1015
+ ngOnDestroy() {
1016
+ this.destroy$.next();
1017
+ this.destroy$.complete();
1018
+ }
895
1019
  ngOnChanges(changes) {
896
1020
  if (changes['Record'] || changes['EntityID']) {
897
1021
  this.SyncFromRecord();
@@ -1265,18 +1389,37 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1265
1389
  return this.RemoveOutput(index);
1266
1390
  }
1267
1391
  UpdateOutputProp(index, prop, event) {
1392
+ if (!this.spec?.Outputs || index < 0 || index >= this.spec.Outputs.length)
1393
+ return;
1394
+ const output = this.spec.Outputs[index];
1268
1395
  const val = event.target.value;
1269
- this.spec.Outputs[index][prop] = val;
1396
+ if (prop === 'Name') {
1397
+ const prevName = output.Name;
1398
+ output.Name = val;
1399
+ if (!output.Ref || output.Ref === `$.${prevName}`) {
1400
+ output.Ref = `$.${val}`;
1401
+ }
1402
+ }
1403
+ else if (prop === 'Ref') {
1404
+ output.Ref = val;
1405
+ }
1270
1406
  this.emitChanges();
1271
1407
  }
1272
1408
  /** @deprecated Use {@link UpdateOutputProp}. */
1273
1409
  updateOutputProp(index, prop, event) {
1274
1410
  return this.UpdateOutputProp(index, prop, event);
1275
1411
  }
1412
+ /** @deprecated Use {@link UpdateOutputProp}. */
1413
+ onOutputPropertyChange(index, prop, event) {
1414
+ return this.UpdateOutputProp(index, prop, event);
1415
+ }
1276
1416
  UpdateTargetMode(index, event) {
1277
1417
  const mode = event.target.value;
1278
1418
  const current = this.spec.Outputs[index];
1279
- if (mode === 'field') {
1419
+ if (mode === 'none') {
1420
+ delete current.Target;
1421
+ }
1422
+ else if (mode === 'field') {
1280
1423
  current.Target = {
1281
1424
  Mode: 'field',
1282
1425
  EntityFieldName: this.EntityFields.length > 0 ? this.EntityFields[0].Name : '',
@@ -1305,7 +1448,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1305
1448
  UpdateFieldTarget(index, event) {
1306
1449
  const fieldName = event.target.value;
1307
1450
  const target = this.spec.Outputs[index].Target;
1308
- if (target.Mode === 'field') {
1451
+ if (target?.Mode === 'field') {
1309
1452
  target.EntityFieldName = fieldName;
1310
1453
  if (this.spec.Outputs[index].Constraint?.Type === 'enum') {
1311
1454
  this.prefillEnumValuesFromField(this.spec.Outputs[index]);
@@ -1320,7 +1463,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1320
1463
  UpdateChildTargetEntity(index, event) {
1321
1464
  const entityName = event.target.value;
1322
1465
  const target = this.spec.Outputs[index].Target;
1323
- if (target.Mode === 'child') {
1466
+ if (target?.Mode === 'child') {
1324
1467
  target.EntityName = entityName;
1325
1468
  }
1326
1469
  this.emitChanges();
@@ -1329,9 +1472,13 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1329
1472
  updateChildTargetEntity(index, event) {
1330
1473
  return this.UpdateChildTargetEntity(index, event);
1331
1474
  }
1475
+ /** Switches the output's constraint type; re-choosing its current type keeps the saved constraint's settings. */
1332
1476
  UpdateConstraintType(index, event) {
1333
1477
  const type = event.target.value;
1334
1478
  const output = this.spec.Outputs[index];
1479
+ if ((output.Constraint?.Type || 'none') === type) {
1480
+ return;
1481
+ }
1335
1482
  if (type === 'none') {
1336
1483
  output.Constraint = undefined;
1337
1484
  }
@@ -1350,6 +1497,15 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1350
1497
  else if (type === 'boolean') {
1351
1498
  output.Constraint = { Type: 'boolean', OnViolation: 'fail' };
1352
1499
  }
1500
+ else if (type === 'lookup') {
1501
+ output.Constraint = { Type: 'lookup', OnViolation: 'fail' };
1502
+ }
1503
+ else if (type === 'money') {
1504
+ output.Constraint = { Type: 'money', OnViolation: 'fail' };
1505
+ }
1506
+ else if (type === 'date') {
1507
+ output.Constraint = { Type: 'date', OnViolation: 'fail' };
1508
+ }
1353
1509
  else if (type === 'freetext') {
1354
1510
  output.Constraint = { Type: 'freetext', MaxLength: 500, OnViolation: 'fail' };
1355
1511
  }
@@ -1434,6 +1590,48 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1434
1590
  updateNumericMax(index, event) {
1435
1591
  return this.UpdateNumericMax(index, event);
1436
1592
  }
1593
+ /** The constraint as a lookup, or undefined when it is another type. */
1594
+ LookupOf(constraint) {
1595
+ return constraint?.Type === 'lookup' ? constraint : undefined;
1596
+ }
1597
+ /** A lookup's display fields as the comma separated text the editor shows. */
1598
+ GetLookupDisplayFieldsCsv(constraint) {
1599
+ return this.LookupOf(constraint)?.DisplayFields?.join(', ') || '';
1600
+ }
1601
+ UpdateLookupEntity(index, event) {
1602
+ const lookup = this.LookupOf(this.spec.Outputs[index].Constraint);
1603
+ if (lookup) {
1604
+ lookup.Entity = FeaturePipelineBuilderComponent.textOrUndefined(event);
1605
+ }
1606
+ this.emitChanges();
1607
+ }
1608
+ UpdateLookupMatchField(index, event) {
1609
+ const lookup = this.LookupOf(this.spec.Outputs[index].Constraint);
1610
+ if (lookup) {
1611
+ lookup.MatchField = FeaturePipelineBuilderComponent.textOrUndefined(event);
1612
+ }
1613
+ this.emitChanges();
1614
+ }
1615
+ UpdateLookupDisplayFields(index, event) {
1616
+ const lookup = this.LookupOf(this.spec.Outputs[index].Constraint);
1617
+ if (lookup) {
1618
+ const fields = event.target.value.split(',').map((f) => f.trim()).filter((f) => f.length > 0);
1619
+ lookup.DisplayFields = fields.length > 0 ? fields : undefined;
1620
+ }
1621
+ this.emitChanges();
1622
+ }
1623
+ UpdateLookupFilter(index, event) {
1624
+ const lookup = this.LookupOf(this.spec.Outputs[index].Constraint);
1625
+ if (lookup) {
1626
+ lookup.Filter = FeaturePipelineBuilderComponent.textOrUndefined(event);
1627
+ }
1628
+ this.emitChanges();
1629
+ }
1630
+ /** The event target's trimmed text, or undefined when it is empty (so an emptied editor field leaves the spec). */
1631
+ static textOrUndefined(event) {
1632
+ const text = event.target.value.trim();
1633
+ return text.length > 0 ? text : undefined;
1634
+ }
1437
1635
  UpdateWatermarkStrategy(event) {
1438
1636
  if (this.Record) {
1439
1637
  this.Record.WatermarkStrategy = event.target.value;
@@ -1675,7 +1873,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1675
1873
  }
1676
1874
  }
1677
1875
  prefillEnumValuesFromField(output) {
1678
- if (output.Target.Mode !== 'field' || output.Constraint?.Type !== 'enum') {
1876
+ if (!OutputTargets.HasWriteTarget(output) || output.Target.Mode !== 'field' || output.Constraint?.Type !== 'enum') {
1679
1877
  return;
1680
1878
  }
1681
1879
  const fieldName = output.Target.EntityFieldName;
@@ -1726,7 +1924,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1726
1924
  return;
1727
1925
  const fields = Object.create(null);
1728
1926
  for (const out of this.spec.Outputs) {
1729
- if (out.Target.Mode === 'field' && out.Target.EntityFieldName) {
1927
+ if (out.Target?.Mode === 'field' && out.Target.EntityFieldName) {
1730
1928
  fields[out.Target.EntityFieldName] = out.Ref;
1731
1929
  }
1732
1930
  }
@@ -1738,8 +1936,74 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1738
1936
  return field?.EntityFieldValues ? field.EntityFieldValues.map((v) => ({ Value: v.Value, Description: v.Description })) : undefined;
1739
1937
  };
1740
1938
  }
1939
+ /**
1940
+ * Renders the constraint block preview as the runner renders the block it sends ({@link OutputConstraintResolver}):
1941
+ * at once from the entity's fields, then again once the lookup outputs' allowed rows have loaded. The lookup step
1942
+ * is debounced ({@link LOOKUP_PREVIEW_DEBOUNCE_MS}) so a filter typed character by character reads its entity once.
1943
+ */
1944
+ RenderConstraintPreview() {
1945
+ const outputs = this.spec.Outputs;
1946
+ const entity = this.PreviewEntity();
1947
+ this.RenderedConstraintPreview = RenderConstraintBlock(outputs, OutputConstraintResolver.ResolveFromFields(outputs, entity));
1948
+ const version = ++this.previewRenderVersion;
1949
+ if (outputs.some((o) => o.Constraint?.Type === 'lookup')) {
1950
+ this.lookupPreviewRequests.next({ Outputs: outputs, Entity: entity, Version: version });
1951
+ }
1952
+ }
1953
+ /** The pipeline's entity, whose fields the constraints resolve against; undefined before one is chosen. */
1954
+ PreviewEntity() {
1955
+ const entityID = this.Record?.EntityID || this.EntityID;
1956
+ return entityID ? this.ProviderToUse.EntityByID(entityID) : undefined;
1957
+ }
1958
+ /**
1959
+ * Re-renders the preview with the lookup rows loaded, unless a later edit has rendered it since. Afterwards the
1960
+ * rows cache keeps only the lookups this render used, so edited-away filters and removed outputs do not pile up.
1961
+ */
1962
+ async RenderPreviewWithLookupRows(outputs, entity, version) {
1963
+ const keysInUse = new Set();
1964
+ const resolved = await OutputConstraintResolver.Resolve(outputs, entity, (lookup) => this.PreviewLookupRows(lookup, keysInUse));
1965
+ if (version !== this.previewRenderVersion) {
1966
+ return;
1967
+ }
1968
+ for (const key of this.previewLookupRows.keys()) {
1969
+ if (!keysInUse.has(key)) {
1970
+ this.previewLookupRows.delete(key);
1971
+ }
1972
+ }
1973
+ this.RenderedConstraintPreview = RenderConstraintBlock(outputs, resolved);
1974
+ this.cdr.markForCheck();
1975
+ }
1976
+ /**
1977
+ * A lookup's allowed rows for the preview; none for an entity that is not known (one still being typed). The
1978
+ * lookup's cache key is added to `keysInUse`, so the render can drop the cache entries it no longer needs.
1979
+ */
1980
+ PreviewLookupRows(lookup, keysInUse) {
1981
+ const entityName = lookup.RelatedEntityName;
1982
+ if (!entityName || !this.ProviderToUse.EntityByName(entityName)) {
1983
+ return Promise.resolve([]);
1984
+ }
1985
+ const key = JSON.stringify([entityName.toLowerCase(), lookup.LookupMatchField || 'Name', lookup.DisplayFields || [], lookup.Filter || '']);
1986
+ keysInUse.add(key);
1987
+ let rows = this.previewLookupRows.get(key);
1988
+ if (!rows) {
1989
+ rows = this.LoadPreviewLookupRows(lookup, key);
1990
+ this.previewLookupRows.set(key, rows);
1991
+ }
1992
+ return rows;
1993
+ }
1994
+ /** Reads a lookup's allowed rows for the preview. A failed read is logged and dropped, so the next edit reads again. */
1995
+ async LoadPreviewLookupRows(lookup, key) {
1996
+ try {
1997
+ return await LookupConstraintValues.Load(lookup, this.ProviderToUse, this.ProviderToUse.CurrentUser);
1998
+ }
1999
+ catch (e) {
2000
+ LogError(`FeaturePipelineBuilder: the preview could not load the allowed values of '${lookup.RelatedEntityName}': ${e instanceof Error ? e.message : String(e)}`);
2001
+ this.previewLookupRows.delete(key);
2002
+ return [];
2003
+ }
2004
+ }
1741
2005
  recomputeValidation() {
1742
- this.RenderedConstraintPreview = renderConstraintBlock(this.spec.Outputs);
2006
+ this.RenderConstraintPreview();
1743
2007
  const entity = this.Record?.EntityID ? this.ProviderToUse.EntityByID(this.Record.EntityID) : null;
1744
2008
  if (entity) {
1745
2009
  const stub = {
@@ -1806,8 +2070,8 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1806
2070
  const hasErrors = this.ValidationErrors.some((i) => i.Severity === 'error');
1807
2071
  this.ValidChange.emit(!hasErrors);
1808
2072
  }
1809
- static ɵfac = /*@__PURE__*/ (() => { let ɵFeaturePipelineBuilderComponent_BaseFactory; return function FeaturePipelineBuilderComponent_Factory(__ngFactoryType__) { return (ɵFeaturePipelineBuilderComponent_BaseFactory || (ɵFeaturePipelineBuilderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(FeaturePipelineBuilderComponent)))(__ngFactoryType__ || FeaturePipelineBuilderComponent); }; })();
1810
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FeaturePipelineBuilderComponent, selectors: [["mj-feature-pipeline-builder"]], inputs: { Record: "Record", EntityID: "EntityID" }, outputs: { SpecChange: "SpecChange", ValidChange: "ValidChange" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 111, vars: 18, consts: [[1, "fpb"], [1, "rpe-sec", "fpb-type-sec"], [1, "rpe-grid2"], [1, "field"], [1, "mj-input", 3, "change"], [3, "value", "selected"], [1, "rpe-static-text"], [1, "rpe-grid2", "rpe-mt"], [1, "rpe-sec"], [1, "rpe-sec-h"], [1, "num"], [1, "rpe-desc"], [1, "rpe-grid3"], [1, "mj-input", 3, "change", "value"], ["value", "fields"], ["value", "document"], ["value", "query"], ["placeholder", "e.g. FirstName, LastName, Title", 1, "mj-input", 3, "input", "value"], ["value", "", "disabled", "", 3, "selected"], [1, "field", "rpe-mt"], [1, "rpe-sec-h", "fpb-split-h"], [1, "fpb-title-group"], ["mjButton", "", "size", "sm", "variant", "secondary", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fpb-empty-outputs"], [1, "fpb-outputs-list"], [1, "rpe-sec", "fpb-escalation-sec"], ["value", "Checksum"], ["value", "UpdatedAt"], ["value", "None"], ["value", "true"], ["value", "false"], [1, "rpe-grid3", "rpe-mt"], [1, "fpb-issues-card", "fpb-issues-card--error"], ["Type", "warning", "Title", "Switch Pipeline Type", "ConfirmText", "Switch Anyway", "CancelText", "Cancel", 3, "VisibleChange", "Confirmed", "Cancelled", "Visible", "Message"], [1, "fpb-confirm-issues"], [1, "mj-input", "fpb-reasoning-select", 3, "change", "value"], ["placeholder", "UUID of approved Query", 1, "mj-input", "mono", 3, "input", "value"], [1, "muted"], [1, "fpb-code-preview"], [1, "fa-solid", "fa-arrow-turn-up"], [1, "fpb-output-card"], [1, "fpb-output-head"], ["mjButton", "", "size", "sm", "variant", "flat", 3, "click"], [1, "fa-solid", "fa-trash"], ["placeholder", "e.g. SentimentScore", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. $.sentiment or $", 1, "mj-input", "mono", 3, "input", "value"], ["value", "none", "disabled", "", 3, "selected"], ["value", "fail"], ["value", "null"], ["value", "coerce-to-other"], ["placeholder", "e.g. Positive, Neutral, Negative", 1, "mj-input", 3, "input", "value"], [1, "fpb-enum-descriptions"], [1, "fpb-enum-desc-row"], [1, "fpb-enum-val-badge"], [1, "mj-input", 3, "input", "value", "placeholder"], [1, "fpb-levels-header"], ["mjButton", "", "size", "sm", "variant", "secondary", "type", "button", 3, "click", "disabled"], [1, "fpb-levels-list"], [1, "fpb-level-row"], [1, "fpb-level-num"], ["placeholder", "Level label (e.g. Low, Medium, High)", 1, "mj-input", 3, "input", "value"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Move Up", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-up"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Move Down", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-down"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Remove Level", 3, "click", "disabled"], ["type", "number", 1, "mj-input", 3, "input", "value"], ["type", "number", "min", "0", "max", "1", "step", "0.05", "placeholder", "0.5", 1, "mj-input", 3, "input", "value"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "fpb-escalation-toggle-row"], [1, "fpb-checkbox-label"], ["type", "checkbox", 3, "change", "checked"], [3, "value", "disabled", "selected"], ["type", "number", "min", "0", "max", "1", "step", "0.05", "placeholder", "0.7", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. CurrentJobTitle", 1, "mj-input", 3, "input", "value"], ["value", "pipeline"], ["value", "prompt"], [1, "fa-solid", "fa-triangle-exclamation"]], template: function FeaturePipelineBuilderComponent_Template(rf, ctx) { if (rf & 1) {
2073
+ static ɵfac = function FeaturePipelineBuilderComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FeaturePipelineBuilderComponent)(); };
2074
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FeaturePipelineBuilderComponent, selectors: [["mj-feature-pipeline-builder"]], inputs: { Record: "Record", EntityID: "EntityID" }, outputs: { SpecChange: "SpecChange", ValidChange: "ValidChange" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 111, vars: 18, consts: [[1, "fpb"], [1, "rpe-sec", "fpb-type-sec"], [1, "rpe-grid2"], [1, "field"], [1, "mj-input", 3, "change"], [3, "value", "selected"], [1, "rpe-static-text"], [1, "rpe-grid2", "rpe-mt"], [1, "rpe-sec"], [1, "rpe-sec-h"], [1, "num"], [1, "rpe-desc"], [1, "rpe-grid3"], [1, "mj-input", 3, "change", "value"], ["value", "fields"], ["value", "document"], ["value", "query"], ["placeholder", "e.g. FirstName, LastName, Title", 1, "mj-input", 3, "input", "value"], ["value", "", "disabled", "", 3, "selected"], [1, "field", "rpe-mt"], [1, "rpe-sec-h", "fpb-split-h"], [1, "fpb-title-group"], ["mjButton", "", "size", "sm", "variant", "secondary", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fpb-empty-outputs"], [1, "fpb-outputs-list"], [1, "rpe-sec", "fpb-escalation-sec"], ["value", "Checksum"], ["value", "UpdatedAt"], ["value", "None"], ["value", "true"], ["value", "false"], [1, "rpe-grid3", "rpe-mt"], [1, "fpb-issues-card", "fpb-issues-card--error"], ["Type", "warning", "Title", "Switch Pipeline Type", "ConfirmText", "Switch Anyway", "CancelText", "Cancel", 3, "VisibleChange", "Confirmed", "Cancelled", "Visible", "Message"], [1, "fpb-confirm-issues"], [1, "mj-input", "fpb-reasoning-select", 3, "change", "value"], ["placeholder", "UUID of approved Query", 1, "mj-input", "mono", 3, "input", "value"], [1, "muted"], [1, "fpb-code-preview"], [1, "fa-solid", "fa-arrow-turn-up"], [1, "fpb-output-card"], [1, "fpb-output-head"], ["mjButton", "", "size", "sm", "variant", "flat", 3, "click"], [1, "fa-solid", "fa-trash"], ["placeholder", "e.g. SentimentScore", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. $.sentiment or $", 1, "mj-input", "mono", 3, "input", "value"], ["value", "none", "disabled", "", 3, "selected"], ["value", "fail"], ["value", "null"], ["value", "coerce-to-other"], ["placeholder", "e.g. Positive, Neutral, Negative", 1, "mj-input", 3, "input", "value"], [1, "fpb-enum-descriptions"], [1, "fpb-enum-desc-row"], [1, "fpb-enum-val-badge"], [1, "mj-input", 3, "input", "value", "placeholder"], [1, "fpb-levels-header"], ["mjButton", "", "size", "sm", "variant", "secondary", "type", "button", 3, "click", "disabled"], [1, "fpb-levels-list"], [1, "fpb-level-row"], [1, "fpb-level-num"], ["placeholder", "Level label (e.g. Low, Medium, High)", 1, "mj-input", 3, "input", "value"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Move Up", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-up"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Move Down", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-down"], ["mjButton", "", "size", "sm", "variant", "flat", "type", "button", "title", "Remove Level", 3, "click", "disabled"], ["type", "number", 1, "mj-input", 3, "input", "value"], ["value", "", 3, "selected"], ["placeholder", "e.g. Name", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. Name, Description", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. Status='Active'", 1, "mj-input", 3, "input", "value"], ["type", "number", "min", "0", "max", "1", "step", "0.05", "placeholder", "0.5", 1, "mj-input", 3, "input", "value"], [1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "fpb-escalation-toggle-row"], [1, "fpb-checkbox-label"], ["type", "checkbox", 3, "change", "checked"], [3, "value", "disabled", "selected"], ["type", "number", "min", "0", "max", "1", "step", "0.05", "placeholder", "0.7", 1, "mj-input", 3, "input", "value"], ["placeholder", "e.g. CurrentJobTitle", 1, "mj-input", 3, "input", "value"], ["value", "pipeline"], ["value", "prompt"], [1, "fa-solid", "fa-triangle-exclamation"]], template: function FeaturePipelineBuilderComponent_Template(rf, ctx) { if (rf & 1) {
1811
2075
  i0.ɵɵelementStart(0, "div", 0)(1, "section", 1)(2, "div", 2)(3, "div", 3)(4, "label");
1812
2076
  i0.ɵɵtext(5, "Pipeline Type");
1813
2077
  i0.ɵɵelementEnd();
@@ -1964,7 +2228,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
1964
2228
  i0.ɵɵadvance(2);
1965
2229
  i0.ɵɵconditional(ctx.selectedPrompt ? 55 : -1);
1966
2230
  i0.ɵɵadvance();
1967
- i0.ɵɵconditional(ctx.renderedConstraintPreview ? 56 : -1);
2231
+ i0.ɵɵconditional(ctx.RenderedConstraintPreview ? 56 : -1);
1968
2232
  i0.ɵɵadvance(13);
1969
2233
  i0.ɵɵconditional(!ctx.spec.Outputs || ctx.spec.Outputs.length === 0 ? 69 : 70);
1970
2234
  i0.ɵɵadvance(2);
@@ -2087,10 +2351,10 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2087
2351
  }
2088
2352
  </div>
2089
2353
 
2090
- @if (renderedConstraintPreview) {
2354
+ @if (RenderedConstraintPreview) {
2091
2355
  <div class="field rpe-mt">
2092
2356
  <label>Injected Constraint Block <span class="muted">— automatically appended to prompt instructions</span></label>
2093
- <pre class="fpb-code-preview">{{ renderedConstraintPreview }}</pre>
2357
+ <pre class="fpb-code-preview">{{ RenderedConstraintPreview }}</pre>
2094
2358
  </div>
2095
2359
  }
2096
2360
  </section>
@@ -2140,7 +2404,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2140
2404
  <option value="" disabled [selected]="true">— Select Target Mode —</option>
2141
2405
  }
2142
2406
  @for (m of AvailableTargetModes; track m.Value) {
2143
- <option [value]="m.Value" [selected]="m.Value === output.Target.Mode">{{ m.Label }}</option>
2407
+ <option [value]="m.Value" [selected]="m.Value === (output.Target?.Mode ?? 'none')">{{ m.Label }}</option>
2144
2408
  }
2145
2409
  </select>
2146
2410
  </div>
@@ -2148,7 +2412,14 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2148
2412
 
2149
2413
  <!-- Target details -->
2150
2414
  <div class="rpe-grid3 rpe-mt">
2151
- @if (output.Target.Mode === 'field') {
2415
+ @if (!output.Target) {
2416
+ <div class="field">
2417
+ <label>Target</label>
2418
+ <p class="muted">Stored as a Feature Value on each record; nothing is written to the entity.</p>
2419
+ </div>
2420
+ }
2421
+
2422
+ @if (output.Target && output.Target.Mode === 'field') {
2152
2423
  <div class="field">
2153
2424
  <label>Target Field</label>
2154
2425
  <select class="mj-input" (change)="updateFieldTarget(outputIndex, $event)">
@@ -2160,7 +2431,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2160
2431
  </div>
2161
2432
  }
2162
2433
 
2163
- @if (output.Target.Mode === 'child') {
2434
+ @if (output.Target && output.Target.Mode === 'child') {
2164
2435
  <div class="field">
2165
2436
  <label>Child Entity</label>
2166
2437
  <select class="mj-input" (change)="updateChildTargetEntity(outputIndex, $event)">
@@ -2292,6 +2563,36 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2292
2563
  </div>
2293
2564
  }
2294
2565
  }
2566
+ @if (output.Constraint?.Type === 'lookup') {
2567
+ <div class="rpe-grid2 rpe-mt">
2568
+ <div class="field">
2569
+ <label>Lookup Entity <span class="muted">— the entity whose rows are the allowed values</span></label>
2570
+ <select class="mj-input" (change)="UpdateLookupEntity(outputIndex, $event)">
2571
+ <option value="" [selected]="!LookupOf(output.Constraint)?.Entity">— From the target field —</option>
2572
+ @if (LookupOf(output.Constraint)?.Entity && !IsEntityListed(LookupOf(output.Constraint)?.Entity)) {
2573
+ <option [value]="LookupOf(output.Constraint)?.Entity" [selected]="true">{{ LookupOf(output.Constraint)?.Entity }}</option>
2574
+ }
2575
+ @for (e of availableEntities; track e.ID) {
2576
+ <option [value]="e.Name" [selected]="e.Name === LookupOf(output.Constraint)?.Entity">{{ e.DisplayName || e.Name }}</option>
2577
+ }
2578
+ </select>
2579
+ </div>
2580
+ <div class="field">
2581
+ <label>Match Field <span class="muted">— the column the model's answer is matched on (default Name)</span></label>
2582
+ <input class="mj-input" [value]="LookupOf(output.Constraint)?.MatchField || ''" (input)="UpdateLookupMatchField(outputIndex, $event)" placeholder="e.g. Name">
2583
+ </div>
2584
+ </div>
2585
+ <div class="rpe-grid2 rpe-mt">
2586
+ <div class="field">
2587
+ <label>Display Fields <span class="muted">— comma separated, shown to the model next to each value</span></label>
2588
+ <input class="mj-input" [value]="GetLookupDisplayFieldsCsv(output.Constraint)" (input)="UpdateLookupDisplayFields(outputIndex, $event)" placeholder="e.g. Name, Description">
2589
+ </div>
2590
+ <div class="field">
2591
+ <label>Filter <span class="muted">— limits which rows are allowed</span></label>
2592
+ <input class="mj-input" [value]="LookupOf(output.Constraint)?.Filter || ''" (input)="UpdateLookupFilter(outputIndex, $event)" placeholder="e.g. Status='Active'">
2593
+ </div>
2594
+ </div>
2595
+ }
2295
2596
  @if (output.Constraint?.Type === 'boolean' && IsDecisionPipeline) {
2296
2597
  <div class="field rpe-mt">
2297
2598
  <label>Decision Threshold (0.0 to 1.0) <span class="muted">— calibrated probability threshold for true</span></label>
@@ -2446,7 +2747,7 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2446
2747
  </mj-confirm-dialog>
2447
2748
  </div>
2448
2749
  `, styles: ["\n .fpb { display: flex; flex-direction: column; gap: 20px; }\n .rpe-desc { font-size: 13px; color: var(--mj-text-secondary); margin: -6px 0 16px 0; }\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 .fpb-type-sec { border-left: 3px solid var(--mj-brand-primary); }\n .rpe-sec-h { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }\n .rpe-sec-h h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--mj-text-primary); }\n .rpe-sec-h .num { width: 24px; height: 24px; border-radius: 50%; background: var(--mj-brand-primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }\n .fpb-split-h { justify-content: space-between; }\n .fpb-title-group { display: flex; align-items: center; gap: 11px; }\n .rpe-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }\n .rpe-grid3 { display: grid; grid-template-columns: 1fr 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: 14px; }\n .mono { font-family: monospace; font-size: 12.5px; }\n .muted { color: var(--mj-text-muted); font-weight: 400; }\n .rpe-static-text { font-size: 13px; color: var(--mj-text-muted); padding: 7px 0; }\n .fpb-code-preview { background: var(--mj-bg-surface-sunken, #0f172a); color: var(--mj-text-code, var(--mj-text-primary, #e2e8f0)); border: 1px solid var(--mj-border-subtle, #334155); padding: 12px; border-radius: 6px; font-size: 12px; font-family: var(--mj-font-mono, monospace); white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow-y: auto; margin: 0; }\n .fpb-empty-outputs { display: flex; align-items: center; gap: 10px; padding: 20px; border: 1px dashed var(--mj-border-subtle); border-radius: 8px; color: var(--mj-text-muted); font-size: 13px; }\n .fpb-outputs-list { display: flex; flex-direction: column; gap: 16px; }\n .fpb-output-card { border: 1px solid var(--mj-border-subtle); border-radius: 8px; padding: 14px 16px; background: var(--mj-bg-surface); }\n .fpb-output-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; border-bottom: 1px solid var(--mj-border-subtle); padding-bottom: 8px; }\n .fpb-output-head h4 { margin: 0; font-size: 14px; font-weight: 600; }\n .fpb-issues-card { border-radius: 8px; padding: 12px 16px; font-size: 13px; }\n .fpb-issues-card--error { background: rgba(239, 68, 68, 0.08); border: 1px solid var(--mj-status-error); color: var(--mj-status-error-text); }\n .fpb-issues-card h4 { margin: 0 0 8px 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }\n .fpb-issues-card ul { margin: 0; padding-left: 20px; }\n .fpb-confirm-issues { margin: 10px 0 0 0; padding-left: 20px; color: var(--mj-status-error-text, var(--mj-text-primary)); font-size: 13px; }\n .fpb-confirm-issues li { margin-bottom: 4px; }\n .fpb-levels-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }\n .fpb-levels-list { display: flex; flex-direction: column; gap: 8px; }\n .fpb-level-row { display: flex; align-items: center; gap: 8px; }\n .fpb-level-num { width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 700; border-radius: var(--mj-radius-sm, 4px); background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); flex-shrink: 0; }\n .fpb-enum-descriptions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }\n .fpb-enum-desc-row { display: flex; align-items: center; gap: 10px; }\n .fpb-enum-val-badge { min-width: 90px; padding: 4px 8px; background: var(--mj-bg-surface-sunken); color: var(--mj-text-primary); border: 1px solid var(--mj-border-subtle); border-radius: var(--mj-radius-sm, 4px); font-size: 12px; font-weight: 600; text-align: center; flex-shrink: 0; }\n .fpb-escalation-toggle-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }\n .fpb-checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--mj-text-primary); user-select: none; }\n .fpb-checkbox-label input[type=\"checkbox\"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--mj-brand-primary); }\n "] }]
2449
- }], null, { Record: [{
2750
+ }], () => [], { Record: [{
2450
2751
  type: Input
2451
2752
  }], EntityID: [{
2452
2753
  type: Input
@@ -2455,5 +2756,5 @@ export class FeaturePipelineBuilderComponent extends BaseAngularComponent {
2455
2756
  }], ValidChange: [{
2456
2757
  type: Output
2457
2758
  }] }); })();
2458
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FeaturePipelineBuilderComponent, { className: "FeaturePipelineBuilderComponent", filePath: "lib/feature-pipeline-builder/feature-pipeline-builder.component.ts", lineNumber: 584 }); })();
2759
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FeaturePipelineBuilderComponent, { className: "FeaturePipelineBuilderComponent", filePath: "lib/feature-pipeline-builder/feature-pipeline-builder.component.ts", lineNumber: 643 }); })();
2459
2760
  //# sourceMappingURL=feature-pipeline-builder.component.js.map