Interface: ConfiguratorVisibilityRule
Client-side evaluation of configurator visibility rules (ConfiguratorField.visibleIf).
Render a field only when this returns true; when a field becomes hidden (the shopper
changed the parent choice), clear its value — the server rejects selections for hidden
fields with the ATTRIBUTE_CONDITION_NOT_MET error code, so client evaluation is a
rendering convenience, never the security boundary (the platform validates
authoritatively on every cart write and again at checkout).
Semantics (mirrors the platform's evaluation):
- no rules = visible;
- rules combine with AND;
- EQUALS / ONE_OF with
optionIds: visible when ANY listed option of the referenced field is currently selected (multi-select parents included); - NOT_EQUALS with
optionIds: visible when NONE of the listed options is selected (an unanswered parent satisfies it); - a rule with
value(free-input parents): EQUALS compares the answer, NOT_EQUALS is satisfied by a different answer or no answer; - a rule with neither
optionIdsnorvaluenever matches (the field stays hidden).
Properties
fieldId
fieldId:
string
operator
operator:
"EQUALS"|"NOT_EQUALS"|"ONE_OF"
optionIds?
optionaloptionIds?: readonlystring[] |null
value?
optionalvalue?:string|null