@educarehq/solaris-components 0.6.7 → 0.6.8

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.
@@ -637,6 +637,26 @@ class SolarisStepper {
637
637
  this.syncItems();
638
638
  }
639
639
  }
640
+ previous() {
641
+ const target = this.findAdjacentNavigableIndex(this.currentIndex, -1);
642
+ if (target === null)
643
+ return;
644
+ this.commitIndexChange(target, 'previous');
645
+ this.previousChange.emit(target);
646
+ }
647
+ setActiveStep(index) {
648
+ if (!this.isProgrammaticallyNavigable(index))
649
+ return;
650
+ this.commitIndexChange(index, 'programmatic');
651
+ }
652
+ isProgrammaticallyNavigable(index) {
653
+ if (!this.isInBounds(index))
654
+ return false;
655
+ const item = this.items[index];
656
+ if (!item)
657
+ return false;
658
+ return !this.isDisabledLike(item);
659
+ }
640
660
  next() {
641
661
  const target = this.findAdjacentNavigableIndex(this.currentIndex, 1);
642
662
  if (target === null)