resolveStepperErrorSummary
projects/common/stepper/stepper-state-view.ts
Description#
Aggregate error phrase shared by the minimal skins (text / progress-bar)
and the classic mobile-collapse text branch. A single errored step names
itself ("Payment: Errored"); several collapse to the i18n count phrase
("2 errors"). Returns '' when no step errored - callers gate on
view.hasAnyError() so the empty string never reaches the DOM.
The optional messageOf resolver lets callers surface a per-step
reason (a direct [error] string or the first aggregator label) in the
single-error case instead of the generic errored status word. When
omitted - or when it returns undefined/'' - the helper produces
byte-identical output to the no-resolver form, so existing callers
(the classic mobile-collapse summary) are a guaranteed no-op.
Pure helper - reads signals at call time, intended to be wrapped in the
caller's computed().