@seniorsistemas/angular-components 16.11.2 → 16.12.0
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 +133 -12
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/slide-bar/index.d.ts +2 -0
- package/components/slide-bar/slide-bar.component.d.ts +23 -0
- package/components/slide-bar/slide-bar.module.d.ts +2 -0
- package/esm2015/components/accordion/components/accordion-panel/accordion-panel.component.js +11 -12
- package/esm2015/components/control-errors/control-errors.component.js +4 -3
- package/esm2015/components/slide-bar/index.js +3 -0
- package/esm2015/components/slide-bar/slide-bar.component.js +105 -0
- package/esm2015/components/slide-bar/slide-bar.module.js +19 -0
- package/esm2015/public-api.js +2 -1
- package/esm5/components/accordion/components/accordion-panel/accordion-panel.component.js +11 -12
- package/esm5/components/control-errors/control-errors.component.js +4 -3
- package/esm5/components/slide-bar/index.js +3 -0
- package/esm5/components/slide-bar/slide-bar.component.js +107 -0
- package/esm5/components/slide-bar/slide-bar.module.js +22 -0
- package/esm5/public-api.js +2 -1
- package/fesm2015/seniorsistemas-angular-components.js +127 -13
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +132 -13
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -288,17 +288,16 @@
|
|
|
288
288
|
AccordionPanelComponent = __decorate([
|
|
289
289
|
core.Component({
|
|
290
290
|
selector: "s-accordion-panel",
|
|
291
|
-
template: "<div\n class=\"accordion-panel\"\n [ngClass]=\"{\n 'accordion-panel--open': isOpen,\n 'accordion-panel--disabled': disabled\n }\">\n <div class=\"header\" (click)=\"onTabClick()\">\n <div class=\"header__title\">\n <span class=\"icon\" [ngClass]=\"isOpen ? 'fas fa-minus' : 'fas fa-plus'\"></span>\n <span\n *ngIf=\"validationMessage\"\n class=\"exclamation-icon fas fa-exclamation-circle\"\n [sTooltip]=\"validationMessage\">\n </span>\n <span class=\"title\">{{ header }}</span>\n </div>\n <div class=\"header__controls\">\n <button\n *ngFor=\"let button of buttons\"\n class=\"icon-button\"\n [ngClass]=\"button.icon\"\n (click)=\"onIconButtonsClick($event, button.onClick)\">\n </button>\n <p-inputSwitch\n *ngIf=\"switch\"\n class=\"switch\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"switchState\"\n (click)=\"$event.stopPropagation()\"\n (onChange)=\"switch.onChange($event)\">\n </p-inputSwitch>\n </div>\n </div>\n <ng-container *ngIf=\"cache; then
|
|
291
|
+
template: "<div\n class=\"accordion-panel\"\n [ngClass]=\"{\n 'accordion-panel--open': isOpen,\n 'accordion-panel--disabled': disabled\n }\">\n <div class=\"header\" (click)=\"onTabClick()\">\n <div class=\"header__title\">\n <span class=\"icon\" [ngClass]=\"isOpen ? 'fas fa-minus' : 'fas fa-plus'\"></span>\n <span\n *ngIf=\"validationMessage\"\n class=\"exclamation-icon fas fa-exclamation-circle\"\n [sTooltip]=\"validationMessage\">\n </span>\n <span class=\"title\">{{ header }}</span>\n </div>\n <div class=\"header__controls\">\n <button\n *ngFor=\"let button of buttons\"\n class=\"icon-button\"\n [ngClass]=\"button.icon\"\n (click)=\"onIconButtonsClick($event, button.onClick)\">\n </button>\n <p-inputSwitch\n *ngIf=\"switch\"\n class=\"switch\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"switchState\"\n (click)=\"$event.stopPropagation()\"\n (onChange)=\"switch.onChange($event)\">\n </p-inputSwitch>\n </div>\n </div>\n <ng-container *ngIf=\"cache; then cacheTemplate else cachelessTemplate\"></ng-container>\n</div>\n\n<ng-template #cacheTemplate>\n <div\n class=\"content\"\n [@cacheAnimation]=\"isOpen\"\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cacheAnimation.start)=\"onContentAnimationStart()\"\n (@cacheAnimation.done)=\"onContentAnimationDone()\">\n <div class=\"content-container\">\n <ng-container [ngTemplateOutlet]=\"panelContent\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cachelessTemplate>\n <div\n *ngIf=\"isOpen\"\n class=\"content\"\n @cachelessAnimation\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cachelessAnimation.start)=\"onContentAnimationStart()\"\n (@cachelessAnimation.done)=\"onContentAnimationDone()\">\n <div class=\"content-container\">\n <ng-container [ngTemplateOutlet]=\"panelContent\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #panelContent>\n <ng-content></ng-content>\n</ng-template>",
|
|
292
292
|
animations: [
|
|
293
|
-
animations.trigger("
|
|
294
|
-
animations.transition(":enter", [
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
animations.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
]),
|
|
293
|
+
animations.trigger("cachelessAnimation", [
|
|
294
|
+
animations.transition(":enter", [animations.style({ height: "0" }), animations.animate("200ms linear", animations.style({ height: "*" }))]),
|
|
295
|
+
animations.transition(":leave", [animations.style({ height: "*" }), animations.animate("200ms linear", animations.style({ height: "0" }))]),
|
|
296
|
+
]),
|
|
297
|
+
animations.trigger("cacheAnimation", [
|
|
298
|
+
animations.state("true", animations.style({ height: "*" })),
|
|
299
|
+
animations.state("false", animations.style({ height: '0px' })),
|
|
300
|
+
animations.transition("* => *", animations.animate("200ms")),
|
|
302
301
|
]),
|
|
303
302
|
],
|
|
304
303
|
styles: [".accordion-panel{border-bottom:1px solid #c1c1cc}.accordion-panel .header{-ms-flex-align:center;align-items:center;background-color:#fff;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.accordion-panel .header .header__title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.accordion-panel .header .header__title .icon{color:#212533;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .exclamation-icon{color:#c13018;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .title{font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:700;line-height:150%;text-transform:uppercase}.accordion-panel .header .header__controls{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;margin-left:16px}.accordion-panel .header .header__controls .icon-button{color:#212533;cursor:pointer;font-size:1rem;margin-left:16px;border:none;background:0 0}.accordion-panel .header .header__controls .switch{padding-left:16px}.accordion-panel .content{background-color:#fff;overflow:hidden}.accordion-panel .content .content-container{margin:20px}.accordion-panel--open .header{background-color:#eeebf2;border-bottom:1px solid #c1c1cc}.accordion-panel--disabled .header{cursor:auto}.accordion-panel--disabled .header .header__title .icon,.accordion-panel--disabled .header .header__title .title{color:#c1c1cc}.accordion-panel--disabled .header .header__controls .icon-button{color:#c1c1cc;cursor:auto}"]
|
|
@@ -1810,9 +1809,10 @@
|
|
|
1810
1809
|
ControlErrorsComponent_1 = ControlErrorsComponent;
|
|
1811
1810
|
ControlErrorsComponent.prototype.getErrorMessagesList = function () {
|
|
1812
1811
|
var _this = this;
|
|
1813
|
-
if (!this.control || !this.control.dirty)
|
|
1812
|
+
if (!this.control || !this.control.dirty) {
|
|
1814
1813
|
return [];
|
|
1815
|
-
|
|
1814
|
+
}
|
|
1815
|
+
return Object.keys(this.control.errors || {}).map(function (error) { var _a; return (_a = _this.errorMessages) === null || _a === void 0 ? void 0 : _a[error]; });
|
|
1816
1816
|
};
|
|
1817
1817
|
var ControlErrorsComponent_1;
|
|
1818
1818
|
ControlErrorsComponent.nextId = 0;
|
|
@@ -9688,6 +9688,125 @@
|
|
|
9688
9688
|
return SidebarModule;
|
|
9689
9689
|
}());
|
|
9690
9690
|
|
|
9691
|
+
var SMALL_DEVICE_BREAKPOINT = 420;
|
|
9692
|
+
var SlideBarComponent = /** @class */ (function () {
|
|
9693
|
+
function SlideBarComponent() {
|
|
9694
|
+
this.openIcon = "fas fa-chevron-right";
|
|
9695
|
+
this.closeIcon = "fas fa-chevron-left";
|
|
9696
|
+
this.cache = false;
|
|
9697
|
+
this.barOpened = new core.EventEmitter();
|
|
9698
|
+
this.barClosed = new core.EventEmitter();
|
|
9699
|
+
this.slideHeight = 0;
|
|
9700
|
+
this.isOpen = false;
|
|
9701
|
+
this.isSlideOver = false;
|
|
9702
|
+
this.isAnimating = false;
|
|
9703
|
+
this.isContentAnimationDisabled = true;
|
|
9704
|
+
}
|
|
9705
|
+
SlideBarComponent.prototype.onResize = function () {
|
|
9706
|
+
this._checkOverBehavior();
|
|
9707
|
+
};
|
|
9708
|
+
SlideBarComponent.prototype.ngOnInit = function () {
|
|
9709
|
+
this._checkOverBehavior();
|
|
9710
|
+
};
|
|
9711
|
+
SlideBarComponent.prototype.ngAfterViewChecked = function () {
|
|
9712
|
+
var _this = this;
|
|
9713
|
+
// to executed at a safe time prior to control returning to the browser's event loop
|
|
9714
|
+
queueMicrotask(function () {
|
|
9715
|
+
_this._calculateSlideHeight();
|
|
9716
|
+
_this.isContentAnimationDisabled = false;
|
|
9717
|
+
});
|
|
9718
|
+
};
|
|
9719
|
+
SlideBarComponent.prototype.onClickButton = function () {
|
|
9720
|
+
if (this.isAnimating) {
|
|
9721
|
+
return;
|
|
9722
|
+
}
|
|
9723
|
+
this.isOpen = !this.isOpen;
|
|
9724
|
+
if (this.isOpen) {
|
|
9725
|
+
this.barOpened.emit();
|
|
9726
|
+
}
|
|
9727
|
+
else {
|
|
9728
|
+
this.barClosed.emit();
|
|
9729
|
+
}
|
|
9730
|
+
};
|
|
9731
|
+
SlideBarComponent.prototype.onContentAnimationStart = function () {
|
|
9732
|
+
this.isAnimating = true;
|
|
9733
|
+
};
|
|
9734
|
+
SlideBarComponent.prototype.onContentAnimationDone = function () {
|
|
9735
|
+
this.isAnimating = false;
|
|
9736
|
+
};
|
|
9737
|
+
SlideBarComponent.prototype._checkOverBehavior = function () {
|
|
9738
|
+
this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
|
|
9739
|
+
};
|
|
9740
|
+
SlideBarComponent.prototype._calculateSlideHeight = function () {
|
|
9741
|
+
this.slideHeight = this.sideContent.nativeElement.clientHeight;
|
|
9742
|
+
};
|
|
9743
|
+
__decorate([
|
|
9744
|
+
core.Input()
|
|
9745
|
+
], SlideBarComponent.prototype, "openIcon", void 0);
|
|
9746
|
+
__decorate([
|
|
9747
|
+
core.Input()
|
|
9748
|
+
], SlideBarComponent.prototype, "closeIcon", void 0);
|
|
9749
|
+
__decorate([
|
|
9750
|
+
core.Input()
|
|
9751
|
+
], SlideBarComponent.prototype, "cache", void 0);
|
|
9752
|
+
__decorate([
|
|
9753
|
+
core.Output()
|
|
9754
|
+
], SlideBarComponent.prototype, "barOpened", void 0);
|
|
9755
|
+
__decorate([
|
|
9756
|
+
core.Output()
|
|
9757
|
+
], SlideBarComponent.prototype, "barClosed", void 0);
|
|
9758
|
+
__decorate([
|
|
9759
|
+
core.ViewChild("mainContainer")
|
|
9760
|
+
], SlideBarComponent.prototype, "mainContainer", void 0);
|
|
9761
|
+
__decorate([
|
|
9762
|
+
core.ViewChild("sideContent")
|
|
9763
|
+
], SlideBarComponent.prototype, "sideContent", void 0);
|
|
9764
|
+
__decorate([
|
|
9765
|
+
core.HostListener("window:resize")
|
|
9766
|
+
], SlideBarComponent.prototype, "onResize", null);
|
|
9767
|
+
SlideBarComponent = __decorate([
|
|
9768
|
+
core.Component({
|
|
9769
|
+
selector: "s-slide-bar",
|
|
9770
|
+
template: "<div class=\"slide-bar\">\n <div\n class=\"slide-content\"\n [ngClass]=\"{\n 'slide-content--closed': !isOpen,\n 'slide-content--over': isSlideOver\n }\">\n <div\n #mainContainer\n class=\"main-container\"\n [style.maxHeight]=\"slideHeight + 'px'\">\n <ng-container *ngIf=\"cache; then cacheTemplate else cachelessTemplate\"></ng-container>\n </div>\n <button\n class=\"button\"\n [ngClass]=\"isOpen ? closeIcon : openIcon\"\n (click)=\"onClickButton()\">\n </button>\n </div>\n <div #sideContent class=\"side-content\">\n <ng-content select=\"[side-content]\"></ng-content>\n </div>\n</div>\n\n<ng-template #cacheTemplate>\n <div\n class=\"content-container\"\n [@cacheAnimation]=\"isOpen\"\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cacheAnimation.start)=\"onContentAnimationStart()\"\n (@cacheAnimation.done)=\"onContentAnimationDone()\">\n <ng-container [ngTemplateOutlet]=\"slideContent\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #cachelessTemplate>\n <div\n *ngIf=\"isOpen\"\n class=\"content-container\"\n @cachelessAnimation\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cachelessAnimation.start)=\"onContentAnimationStart()\"\n (@cachelessAnimation.done)=\"onContentAnimationDone()\">\n <ng-container [ngTemplateOutlet]=\"slideContent\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #slideContent>\n <ng-content select=\"[slide-content]\"></ng-content>\n</ng-template>",
|
|
9771
|
+
animations: [
|
|
9772
|
+
animations.trigger("cachelessAnimation", [
|
|
9773
|
+
animations.transition(":enter", [
|
|
9774
|
+
animations.style({ width: "0" }),
|
|
9775
|
+
animations.animate("200ms linear", animations.style({ width: "*" })),
|
|
9776
|
+
]),
|
|
9777
|
+
animations.transition(":leave", [
|
|
9778
|
+
animations.style({ width: "*" }),
|
|
9779
|
+
animations.animate("200ms linear", animations.style({ width: "0" })),
|
|
9780
|
+
]),
|
|
9781
|
+
]),
|
|
9782
|
+
animations.trigger("cacheAnimation", [
|
|
9783
|
+
animations.state("true", animations.style({ width: "*", padding: '0 16px' })),
|
|
9784
|
+
animations.state("false", animations.style({ width: '0px', padding: '0' })),
|
|
9785
|
+
animations.transition("* => *", animations.animate("200ms")),
|
|
9786
|
+
]),
|
|
9787
|
+
],
|
|
9788
|
+
styles: [".slide-bar{display:-ms-flexbox;display:flex}.slide-bar .slide-content{display:-ms-flexbox;display:flex;position:relative}.slide-bar .slide-content .main-container{background-color:#eeebf2;display:-ms-flexbox;display:flex;border:1px solid #ccc;overflow:hidden;position:relative}.slide-bar .slide-content .main-container .content-container{overflow-y:auto;overflow-x:hidden;padding:16px}.slide-bar .slide-content .button{-ms-flex-align:center;align-items:center;background-color:#eeebf2;border:1px solid #ccc;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;display:-ms-flexbox;display:flex;font-size:16px;height:32px;-ms-flex-pack:center;justify-content:center;position:absolute;right:-32px;top:16px;width:32px}.slide-bar .slide-content--closed .main-container{border:none}.slide-bar .slide-content--over{position:absolute}.slide-bar .side-content{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;height:-webkit-max-content;height:max-content}"]
|
|
9789
|
+
})
|
|
9790
|
+
], SlideBarComponent);
|
|
9791
|
+
return SlideBarComponent;
|
|
9792
|
+
}());
|
|
9793
|
+
|
|
9794
|
+
var SlideBarModule = /** @class */ (function () {
|
|
9795
|
+
function SlideBarModule() {
|
|
9796
|
+
}
|
|
9797
|
+
SlideBarModule = __decorate([
|
|
9798
|
+
core.NgModule({
|
|
9799
|
+
imports: [
|
|
9800
|
+
common.CommonModule,
|
|
9801
|
+
animations$1.BrowserAnimationsModule,
|
|
9802
|
+
],
|
|
9803
|
+
declarations: [SlideBarComponent],
|
|
9804
|
+
exports: [SlideBarComponent],
|
|
9805
|
+
})
|
|
9806
|
+
], SlideBarModule);
|
|
9807
|
+
return SlideBarModule;
|
|
9808
|
+
}());
|
|
9809
|
+
|
|
9691
9810
|
var StatsCardComponent = /** @class */ (function () {
|
|
9692
9811
|
function StatsCardComponent() {
|
|
9693
9812
|
this.id = "s-stats-card-" + StatsCardComponent_1.nextId++;
|
|
@@ -12901,6 +13020,8 @@
|
|
|
12901
13020
|
exports.SelectOption = SelectOption;
|
|
12902
13021
|
exports.SidebarComponent = SidebarComponent;
|
|
12903
13022
|
exports.SidebarModule = SidebarModule;
|
|
13023
|
+
exports.SlideBarComponent = SlideBarComponent;
|
|
13024
|
+
exports.SlideBarModule = SlideBarModule;
|
|
12904
13025
|
exports.SplitButtonComponent = SplitButtonComponent;
|
|
12905
13026
|
exports.SplitButtonModule = SplitButtonModule;
|
|
12906
13027
|
exports.StatsCardComponent = StatsCardComponent;
|