/** * @fileoverview A visual authoring surface for a {@link FieldRuleSet} — the rules that drive a FieldRules * Record Process. Each rule sets a target field from a chosen source (static / another field / formula / * entity lookup / AI prompt), optionally gated by a condition. Validates live against the entity's metadata * via `EntityFieldRules.Validate`, and emits the typed rule set (the consumer serializes it into the * Record Process `Configuration`). * @module @memberjunction/ng-entity-action-ux */ import { EventEmitter } from '@angular/core'; import { type IMetadataProvider } from '@memberjunction/core'; import type { FieldRuleSet } from '@memberjunction/global'; import { type RuleDraft } from '../field-rules-model'; import * as i0 from "@angular/core"; export declare class FieldRulesBuilderComponent { private cdr; Rules: RuleDraft[]; Errors: string[]; WritableFields: Array<{ Name: string; DisplayNameOrName: string; }>; AllFields: Array<{ Name: string; DisplayNameOrName: string; }>; private _entityName; private entity?; /** Metadata provider (multi-provider). Falls back to the global default when null. */ Provider: IMetadataProvider | null; /** The entity whose fields the rules target. Loads the field lists when set. */ set EntityName(value: string); get EntityName(): string; /** * Serialized form of our last emitted rule set. Consumers typically feed our `ValueChange` output * straight back in as `[Value]` (controlled-component style). Re-seeding the drafts from that echo * would wipe in-progress edits — most visibly a freshly-added **blank** rule, which serializes to * nothing (`draftsToRuleSet` drops rules with no target), so the echo arrives as `{Rules:[]}` and * resets the row the user just added. We ignore the echo and only re-seed on a genuinely different * (external) value. */ private lastEmittedJSON; /** The initial rule set (e.g. an existing Record Process Configuration). */ set Value(value: FieldRuleSet | null | undefined); /** Emits the typed rule set on every edit; the consumer serializes it into the Configuration. */ ValueChange: EventEmitter; /** Emits the live validation result (true when every rule is valid against the entity). */ ValidChange: EventEmitter; get EntityLabel(): string; AddRule(): void; RemoveRule(index: number): void; SetTarget(index: number, event: Event): void; SetKind(index: number, event: Event): void; SetField(index: number, field: keyof RuleDraft, event: Event): void; SetPrompt(index: number, promptID: string | null): void; /** Serializes the drafts, validates, and emits. */ private emit; private validate; private loadEntity; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=field-rules-builder.component.d.ts.map