@seniorsistemas/angular-components 17.8.14 → 17.8.15
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.
- package/bundles/seniorsistemas-angular-components.umd.js +23 -9
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/tiered-menu/tiered-menu.directive.d.ts +1 -0
- package/esm2015/components/navigation-button/navigation-button.component.js +17 -9
- package/esm2015/components/tiered-menu/tiered-menu.directive.js +7 -2
- package/esm5/components/navigation-button/navigation-button.component.js +17 -9
- package/esm5/components/tiered-menu/tiered-menu.directive.js +8 -2
- package/fesm2015/seniorsistemas-angular-components.js +22 -9
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +23 -9
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -14804,11 +14804,11 @@ var NavigationButtonComponent = /** @class */ (function () {
|
|
|
14804
14804
|
var previous = this.steps[this.currentIndex];
|
|
14805
14805
|
if (this.currentIndex < this.steps.length - 1) {
|
|
14806
14806
|
this.currentIndex++;
|
|
14807
|
+
var current = this.steps[this.currentIndex];
|
|
14808
|
+
this._onChange && this._onChange(current.value);
|
|
14809
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14807
14810
|
}
|
|
14808
|
-
var current = this.steps[this.currentIndex];
|
|
14809
14811
|
this._onTouched && this._onTouched();
|
|
14810
|
-
this._onChange && this._onChange(current.value);
|
|
14811
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14812
14812
|
};
|
|
14813
14813
|
NavigationButtonComponent.prototype.onPrevious = function () {
|
|
14814
14814
|
if (this.isDisabled)
|
|
@@ -14816,18 +14816,26 @@ var NavigationButtonComponent = /** @class */ (function () {
|
|
|
14816
14816
|
var previous = this.steps[this.currentIndex];
|
|
14817
14817
|
if (this.currentIndex > 0) {
|
|
14818
14818
|
this.currentIndex--;
|
|
14819
|
+
var current = this.steps[this.currentIndex];
|
|
14820
|
+
this._onChange && this._onChange(current.value);
|
|
14821
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14819
14822
|
}
|
|
14820
|
-
var current = this.steps[this.currentIndex];
|
|
14821
14823
|
this._onTouched && this._onTouched();
|
|
14822
|
-
this._onChange && this._onChange(current.value);
|
|
14823
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14824
14824
|
};
|
|
14825
14825
|
NavigationButtonComponent.prototype._createTieredMenuItems = function () {
|
|
14826
14826
|
var _this = this;
|
|
14827
14827
|
this.steps.forEach(function (step) {
|
|
14828
14828
|
_this.tieredMenuItems.push({
|
|
14829
14829
|
label: step.label,
|
|
14830
|
-
command: function () {
|
|
14830
|
+
command: function () {
|
|
14831
|
+
var index = _this.steps.findIndex(function (s) { return s === step; });
|
|
14832
|
+
if (_this.currentIndex !== index) {
|
|
14833
|
+
_this._onChange && _this._onChange(step.value);
|
|
14834
|
+
_this.stepChanged.emit({ previous: _this.steps[_this.currentIndex], current: step });
|
|
14835
|
+
_this.currentIndex = index;
|
|
14836
|
+
}
|
|
14837
|
+
_this._onTouched && _this._onTouched();
|
|
14838
|
+
},
|
|
14831
14839
|
});
|
|
14832
14840
|
});
|
|
14833
14841
|
};
|
|
@@ -14853,7 +14861,7 @@ var NavigationButtonComponent = /** @class */ (function () {
|
|
|
14853
14861
|
NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
|
|
14854
14862
|
Component({
|
|
14855
14863
|
selector: "s-navigation-button",
|
|
14856
|
-
template: "<div class=\"navigation-button\" [ngClass]=\"{ 'navigation-button--disabled': isDisabled}\">\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n <ng-container *ngIf=\"steps[currentIndex].tooltip || tooltip; then tooltipBlock; else noTooltipBlock\"></ng-container>\n\n <ng-template #tooltipBlock>\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu [items]=\"tieredMenuItems\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <ng-template #noTooltipBlock>\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n",
|
|
14864
|
+
template: "<div class=\"navigation-button\" [ngClass]=\"{ 'navigation-button--disabled': isDisabled}\">\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n <ng-container *ngIf=\"steps[currentIndex].tooltip || tooltip; then tooltipBlock; else noTooltipBlock\"></ng-container>\n\n <ng-template #tooltipBlock>\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu [items]=\"tieredMenuItems\"\n [focusedItem]=\"tieredMenuItems[currentIndex]\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <ng-template #noTooltipBlock>\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n",
|
|
14857
14865
|
providers: [
|
|
14858
14866
|
{
|
|
14859
14867
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -15486,6 +15494,7 @@ var TieredMenuDirective = /** @class */ (function () {
|
|
|
15486
15494
|
this._tieredMenuGlobalService = _tieredMenuGlobalService;
|
|
15487
15495
|
this._changeDetectorRef = _changeDetectorRef;
|
|
15488
15496
|
this.items = [];
|
|
15497
|
+
this.focusedItem = undefined;
|
|
15489
15498
|
this.triggerEvent = "click";
|
|
15490
15499
|
this._componentRef = null;
|
|
15491
15500
|
this._isNested = false;
|
|
@@ -15640,9 +15649,11 @@ var TieredMenuDirective = /** @class */ (function () {
|
|
|
15640
15649
|
this._destroy();
|
|
15641
15650
|
};
|
|
15642
15651
|
TieredMenuDirective.prototype._updateServiceItems = function () {
|
|
15652
|
+
var _this = this;
|
|
15653
|
+
var _a;
|
|
15643
15654
|
this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
|
|
15644
15655
|
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
15645
|
-
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
15656
|
+
this._tieredMenuService.currentItem = (_a = this._tieredMenuService.items.find(function (i) { var _a; return i.label === ((_a = _this.focusedItem) === null || _a === void 0 ? void 0 : _a.label); })) !== null && _a !== void 0 ? _a : this._tieredMenuService.items[0];
|
|
15646
15657
|
};
|
|
15647
15658
|
TieredMenuDirective.ctorParameters = function () { return [
|
|
15648
15659
|
{ type: ElementRef },
|
|
@@ -15657,6 +15668,9 @@ var TieredMenuDirective = /** @class */ (function () {
|
|
|
15657
15668
|
__decorate([
|
|
15658
15669
|
Input()
|
|
15659
15670
|
], TieredMenuDirective.prototype, "items", void 0);
|
|
15671
|
+
__decorate([
|
|
15672
|
+
Input()
|
|
15673
|
+
], TieredMenuDirective.prototype, "focusedItem", void 0);
|
|
15660
15674
|
__decorate([
|
|
15661
15675
|
Input()
|
|
15662
15676
|
], TieredMenuDirective.prototype, "triggerEvent", void 0);
|