@seniorsistemas/angular-components 17.8.13 → 17.8.14

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.
Files changed (22) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +28 -9
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/navigation-button/index.d.ts +1 -1
  6. package/components/navigation-button/models/index.d.ts +2 -0
  7. package/components/navigation-button/models/navigation-button-step-changed-info.d.ts +5 -0
  8. package/components/navigation-button/navigation-button.component.d.ts +9 -6
  9. package/esm2015/components/navigation-button/index.js +1 -1
  10. package/esm2015/components/navigation-button/models/index.js +1 -0
  11. package/esm2015/components/navigation-button/models/navigation-button-step-changed-info.js +1 -0
  12. package/esm2015/components/navigation-button/navigation-button.component.js +29 -10
  13. package/esm5/components/navigation-button/index.js +1 -1
  14. package/esm5/components/navigation-button/models/index.js +1 -0
  15. package/esm5/components/navigation-button/models/navigation-button-step-changed-info.js +1 -0
  16. package/esm5/components/navigation-button/navigation-button.component.js +30 -11
  17. package/fesm2015/seniorsistemas-angular-components.js +27 -8
  18. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  19. package/fesm5/seniorsistemas-angular-components.js +28 -9
  20. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  21. package/package.json +1 -1
  22. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -14753,7 +14753,9 @@ var KanbanModule = /** @class */ (function () {
14753
14753
  }());
14754
14754
 
14755
14755
  var NavigationButtonComponent = /** @class */ (function () {
14756
- function NavigationButtonComponent() {
14756
+ function NavigationButtonComponent(changeDetectorRef) {
14757
+ this.changeDetectorRef = changeDetectorRef;
14758
+ this.changeOnInit = false;
14757
14759
  this.stepChanged = new EventEmitter();
14758
14760
  this.currentIndex = 0;
14759
14761
  this.isDisabled = false;
@@ -14761,14 +14763,25 @@ var NavigationButtonComponent = /** @class */ (function () {
14761
14763
  }
14762
14764
  NavigationButtonComponent_1 = NavigationButtonComponent;
14763
14765
  NavigationButtonComponent.prototype.ngOnInit = function () {
14764
- var _this = this;
14765
- var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14766
- this.currentIndex = index !== -1 ? index : 0;
14767
- this.stepChanged.emit({
14768
- previous: undefined,
14769
- current: this.steps[this.currentIndex],
14770
- });
14771
14766
  this._createTieredMenuItems();
14767
+ if (this.changeOnInit) {
14768
+ this.stepChanged.emit({
14769
+ previous: undefined,
14770
+ current: this.steps[this.currentIndex],
14771
+ });
14772
+ }
14773
+ };
14774
+ NavigationButtonComponent.prototype.ngAfterViewInit = function () {
14775
+ this._setDefaultValue();
14776
+ };
14777
+ NavigationButtonComponent.prototype._setDefaultValue = function () {
14778
+ var _this = this;
14779
+ if (this.defaultValue) {
14780
+ this._value = this.defaultValue;
14781
+ var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14782
+ this.currentIndex = index !== -1 ? index : 0;
14783
+ this.changeDetectorRef.detectChanges();
14784
+ }
14772
14785
  };
14773
14786
  NavigationButtonComponent.prototype.writeValue = function (value) {
14774
14787
  var _this = this;
@@ -14814,11 +14827,14 @@ var NavigationButtonComponent = /** @class */ (function () {
14814
14827
  this.steps.forEach(function (step) {
14815
14828
  _this.tieredMenuItems.push({
14816
14829
  label: step.label,
14817
- command: function () { return _this.currentIndex = _this.steps.findIndex(function (s) { return s === step; }); },
14830
+ command: function () { return (_this.currentIndex = _this.steps.findIndex(function (s) { return s === step; })); },
14818
14831
  });
14819
14832
  });
14820
14833
  };
14821
14834
  var NavigationButtonComponent_1;
14835
+ NavigationButtonComponent.ctorParameters = function () { return [
14836
+ { type: ChangeDetectorRef }
14837
+ ]; };
14822
14838
  __decorate([
14823
14839
  Input()
14824
14840
  ], NavigationButtonComponent.prototype, "steps", void 0);
@@ -14828,6 +14844,9 @@ var NavigationButtonComponent = /** @class */ (function () {
14828
14844
  __decorate([
14829
14845
  Input()
14830
14846
  ], NavigationButtonComponent.prototype, "tooltip", void 0);
14847
+ __decorate([
14848
+ Input()
14849
+ ], NavigationButtonComponent.prototype, "changeOnInit", void 0);
14831
14850
  __decorate([
14832
14851
  Output()
14833
14852
  ], NavigationButtonComponent.prototype, "stepChanged", void 0);