@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
|
@@ -14950,11 +14950,11 @@
|
|
|
14950
14950
|
var previous = this.steps[this.currentIndex];
|
|
14951
14951
|
if (this.currentIndex < this.steps.length - 1) {
|
|
14952
14952
|
this.currentIndex++;
|
|
14953
|
+
var current = this.steps[this.currentIndex];
|
|
14954
|
+
this._onChange && this._onChange(current.value);
|
|
14955
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14953
14956
|
}
|
|
14954
|
-
var current = this.steps[this.currentIndex];
|
|
14955
14957
|
this._onTouched && this._onTouched();
|
|
14956
|
-
this._onChange && this._onChange(current.value);
|
|
14957
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14958
14958
|
};
|
|
14959
14959
|
NavigationButtonComponent.prototype.onPrevious = function () {
|
|
14960
14960
|
if (this.isDisabled)
|
|
@@ -14962,18 +14962,26 @@
|
|
|
14962
14962
|
var previous = this.steps[this.currentIndex];
|
|
14963
14963
|
if (this.currentIndex > 0) {
|
|
14964
14964
|
this.currentIndex--;
|
|
14965
|
+
var current = this.steps[this.currentIndex];
|
|
14966
|
+
this._onChange && this._onChange(current.value);
|
|
14967
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14965
14968
|
}
|
|
14966
|
-
var current = this.steps[this.currentIndex];
|
|
14967
14969
|
this._onTouched && this._onTouched();
|
|
14968
|
-
this._onChange && this._onChange(current.value);
|
|
14969
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14970
14970
|
};
|
|
14971
14971
|
NavigationButtonComponent.prototype._createTieredMenuItems = function () {
|
|
14972
14972
|
var _this = this;
|
|
14973
14973
|
this.steps.forEach(function (step) {
|
|
14974
14974
|
_this.tieredMenuItems.push({
|
|
14975
14975
|
label: step.label,
|
|
14976
|
-
command: function () {
|
|
14976
|
+
command: function () {
|
|
14977
|
+
var index = _this.steps.findIndex(function (s) { return s === step; });
|
|
14978
|
+
if (_this.currentIndex !== index) {
|
|
14979
|
+
_this._onChange && _this._onChange(step.value);
|
|
14980
|
+
_this.stepChanged.emit({ previous: _this.steps[_this.currentIndex], current: step });
|
|
14981
|
+
_this.currentIndex = index;
|
|
14982
|
+
}
|
|
14983
|
+
_this._onTouched && _this._onTouched();
|
|
14984
|
+
},
|
|
14977
14985
|
});
|
|
14978
14986
|
});
|
|
14979
14987
|
};
|
|
@@ -14999,7 +15007,7 @@
|
|
|
14999
15007
|
NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
|
|
15000
15008
|
core.Component({
|
|
15001
15009
|
selector: "s-navigation-button",
|
|
15002
|
-
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",
|
|
15010
|
+
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",
|
|
15003
15011
|
providers: [
|
|
15004
15012
|
{
|
|
15005
15013
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -15632,6 +15640,7 @@
|
|
|
15632
15640
|
this._tieredMenuGlobalService = _tieredMenuGlobalService;
|
|
15633
15641
|
this._changeDetectorRef = _changeDetectorRef;
|
|
15634
15642
|
this.items = [];
|
|
15643
|
+
this.focusedItem = undefined;
|
|
15635
15644
|
this.triggerEvent = "click";
|
|
15636
15645
|
this._componentRef = null;
|
|
15637
15646
|
this._isNested = false;
|
|
@@ -15786,9 +15795,11 @@
|
|
|
15786
15795
|
this._destroy();
|
|
15787
15796
|
};
|
|
15788
15797
|
TieredMenuDirective.prototype._updateServiceItems = function () {
|
|
15798
|
+
var _this = this;
|
|
15799
|
+
var _a;
|
|
15789
15800
|
this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
|
|
15790
15801
|
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
15791
|
-
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
15802
|
+
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];
|
|
15792
15803
|
};
|
|
15793
15804
|
TieredMenuDirective.ctorParameters = function () { return [
|
|
15794
15805
|
{ type: core.ElementRef },
|
|
@@ -15803,6 +15814,9 @@
|
|
|
15803
15814
|
__decorate([
|
|
15804
15815
|
core.Input()
|
|
15805
15816
|
], TieredMenuDirective.prototype, "items", void 0);
|
|
15817
|
+
__decorate([
|
|
15818
|
+
core.Input()
|
|
15819
|
+
], TieredMenuDirective.prototype, "focusedItem", void 0);
|
|
15806
15820
|
__decorate([
|
|
15807
15821
|
core.Input()
|
|
15808
15822
|
], TieredMenuDirective.prototype, "triggerEvent", void 0);
|