| 586 | } |
| 587 | |
| 588 | private _anyControlsInvalidOrPending(index: number): boolean { |
| 589 | if (this.linear && index >= 0) { |
| 590 | return this.steps |
| 591 | .toArray() |
| 592 | .slice(0, index) |
| 593 | .some(step => { |
| 594 | const control = step.stepControl; |
| 595 | const isIncomplete = control |
| 596 | ? control.invalid || control.pending || !step.interacted |
| 597 | : !step.completed; |
| 598 | return isIncomplete && !step.optional && !step._completedOverride(); |
| 599 | }); |
| 600 | } |
| 601 | |
| 602 | return false; |
| 603 | } |
| 604 | |
| 605 | private _layoutDirection(): Direction { |
| 606 | return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr'; |