@seniorsistemas/angular-components 17.8.10 → 17.8.11

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 (28) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +2076 -1965
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/index.d.ts +1 -0
  6. package/components/navigation-button/index.d.ts +3 -0
  7. package/components/navigation-button/models/navigation-button-item.d.ts +5 -0
  8. package/components/navigation-button/navigation-button.component.d.ts +27 -0
  9. package/components/navigation-button/navigation-button.module.d.ts +2 -0
  10. package/esm2015/components/index.js +2 -1
  11. package/esm2015/components/navigation-button/index.js +3 -0
  12. package/esm2015/components/navigation-button/models/navigation-button-item.js +1 -0
  13. package/esm2015/components/navigation-button/navigation-button.component.js +95 -0
  14. package/esm2015/components/navigation-button/navigation-button.module.js +17 -0
  15. package/esm2015/seniorsistemas-angular-components.js +14 -14
  16. package/esm5/components/index.js +2 -1
  17. package/esm5/components/navigation-button/index.js +3 -0
  18. package/esm5/components/navigation-button/models/navigation-button-item.js +1 -0
  19. package/esm5/components/navigation-button/navigation-button.component.js +100 -0
  20. package/esm5/components/navigation-button/navigation-button.module.js +20 -0
  21. package/esm5/seniorsistemas-angular-components.js +14 -14
  22. package/fesm2015/seniorsistemas-angular-components.js +1912 -1811
  23. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  24. package/fesm5/seniorsistemas-angular-components.js +2064 -1955
  25. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  26. package/package.json +1 -1
  27. package/seniorsistemas-angular-components.d.ts +13 -13
  28. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -14721,2327 +14721,2436 @@ var KanbanModule = /** @class */ (function () {
14721
14721
  return KanbanModule;
14722
14722
  }());
14723
14723
 
14724
- var ObjectCardFieldComponent = /** @class */ (function () {
14725
- function ObjectCardFieldComponent() {
14726
- this.id = "s-object-card-field-" + ObjectCardFieldComponent_1.nextId++;
14727
- this.buttonClick = new EventEmitter();
14728
- }
14729
- ObjectCardFieldComponent_1 = ObjectCardFieldComponent;
14730
- var ObjectCardFieldComponent_1;
14731
- ObjectCardFieldComponent.nextId = 0;
14732
- __decorate([
14733
- Input()
14734
- ], ObjectCardFieldComponent.prototype, "id", void 0);
14735
- __decorate([
14736
- Input()
14737
- ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
14738
- __decorate([
14739
- Input()
14740
- ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
14741
- __decorate([
14742
- Input()
14743
- ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
14744
- __decorate([
14745
- Input()
14746
- ], ObjectCardFieldComponent.prototype, "label", void 0);
14724
+ var NavigationButtonComponent = /** @class */ (function () {
14725
+ function NavigationButtonComponent() {
14726
+ this.stepChanged = new EventEmitter();
14727
+ this.currentIndex = 0;
14728
+ this.isDisabled = false;
14729
+ this.tieredMenuItems = [];
14730
+ }
14731
+ NavigationButtonComponent_1 = NavigationButtonComponent;
14732
+ NavigationButtonComponent.prototype.ngOnInit = function () {
14733
+ var _this = this;
14734
+ var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14735
+ this.currentIndex = index !== -1 ? index : 0;
14736
+ this.stepChanged.emit({
14737
+ previous: undefined,
14738
+ current: this.steps[this.currentIndex],
14739
+ });
14740
+ this._createTieredMenuItems();
14741
+ };
14742
+ NavigationButtonComponent.prototype.writeValue = function (value) {
14743
+ var _this = this;
14744
+ this._value = value;
14745
+ var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14746
+ this.currentIndex = index !== -1 ? index : 0;
14747
+ };
14748
+ NavigationButtonComponent.prototype.registerOnChange = function (onChange) {
14749
+ this._onChange = onChange;
14750
+ };
14751
+ NavigationButtonComponent.prototype.registerOnTouched = function (onTouched) {
14752
+ this._onTouched = onTouched;
14753
+ };
14754
+ NavigationButtonComponent.prototype.setDisabledState = function (isDisabled) {
14755
+ this.isDisabled = isDisabled;
14756
+ };
14757
+ NavigationButtonComponent.prototype.onNext = function () {
14758
+ if (this.isDisabled)
14759
+ return;
14760
+ var previous = this.steps[this.currentIndex];
14761
+ if (this.currentIndex < this.steps.length - 1) {
14762
+ this.currentIndex++;
14763
+ }
14764
+ var current = this.steps[this.currentIndex];
14765
+ this._onTouched && this._onTouched();
14766
+ this._onChange && this._onChange(current.value);
14767
+ this.stepChanged.emit({ previous: previous, current: current });
14768
+ };
14769
+ NavigationButtonComponent.prototype.onPrevious = function () {
14770
+ if (this.isDisabled)
14771
+ return;
14772
+ var previous = this.steps[this.currentIndex];
14773
+ if (this.currentIndex > 0) {
14774
+ this.currentIndex--;
14775
+ }
14776
+ var current = this.steps[this.currentIndex];
14777
+ this._onTouched && this._onTouched();
14778
+ this._onChange && this._onChange(current.value);
14779
+ this.stepChanged.emit({ previous: previous, current: current });
14780
+ };
14781
+ NavigationButtonComponent.prototype._createTieredMenuItems = function () {
14782
+ var _this = this;
14783
+ this.steps.forEach(function (step) {
14784
+ _this.tieredMenuItems.push({
14785
+ label: step.label,
14786
+ command: function () { return _this.currentIndex = _this.steps.findIndex(function (s) { return s === step; }); },
14787
+ });
14788
+ });
14789
+ };
14790
+ var NavigationButtonComponent_1;
14747
14791
  __decorate([
14748
14792
  Input()
14749
- ], ObjectCardFieldComponent.prototype, "description", void 0);
14793
+ ], NavigationButtonComponent.prototype, "steps", void 0);
14750
14794
  __decorate([
14751
14795
  Input()
14752
- ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
14796
+ ], NavigationButtonComponent.prototype, "defaultValue", void 0);
14753
14797
  __decorate([
14754
14798
  Input()
14755
- ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
14799
+ ], NavigationButtonComponent.prototype, "tooltip", void 0);
14756
14800
  __decorate([
14757
14801
  Output()
14758
- ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
14759
- __decorate([
14760
- ContentChild(ThumbnailComponent, { static: true })
14761
- ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
14762
- __decorate([
14763
- ViewChild(TemplateRef, { static: true })
14764
- ], ObjectCardFieldComponent.prototype, "content", void 0);
14765
- ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
14802
+ ], NavigationButtonComponent.prototype, "stepChanged", void 0);
14803
+ NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
14766
14804
  Component({
14767
- selector: "s-object-card-field",
14768
- template: "<ng-template>\n <div class=\"container\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n *ngIf=\"!thumbnailComponent && (imageSource || iconClass)\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n size=\"small\"\n ></s-thumbnail>\n\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n </div>\n</ng-template>\n",
14769
- styles: [".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%}.info-container{margin-left:10px}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{color:#999;display:block}.info-container .description{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.info-container{-ms-flex:1;flex:1}}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}.info-container:only-child{margin-left:0}"]
14805
+ selector: "s-navigation-button",
14806
+ 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",
14807
+ providers: [
14808
+ {
14809
+ provide: NG_VALUE_ACCESSOR,
14810
+ useExisting: forwardRef(function () { return NavigationButtonComponent_1; }),
14811
+ multi: true,
14812
+ },
14813
+ ],
14814
+ styles: [".navigation-button{display:-ms-inline-flexbox;display:inline-flex}.navigation-button .option,.navigation-button .step{background-color:#428bca;border:none;color:#fff}.navigation-button:not(.navigation-button--disabled) .step{cursor:pointer}.navigation-button:not(.navigation-button--disabled) .step:hover{background-color:#063951}.navigation-button .option{padding:8px 12px}.navigation-button .option--previous{border-radius:16px 0 0 16px}.navigation-button .option--next{border-radius:0 16px 16px 0}.navigation-button .option--disabled{opacity:.5}.navigation-button .option:not(.option--disabled):hover{cursor:pointer;background-color:#063951}.navigation-button .step{font-family:\"Open Sans\",sans-serif;font-size:14px;padding:8px 16px;text-align:center}.navigation-button--disabled{opacity:.5}"]
14770
14815
  })
14771
- ], ObjectCardFieldComponent);
14772
- return ObjectCardFieldComponent;
14816
+ ], NavigationButtonComponent);
14817
+ return NavigationButtonComponent;
14773
14818
  }());
14774
14819
 
14775
- var ObjectCardMainComponent = /** @class */ (function () {
14776
- function ObjectCardMainComponent() {
14777
- this.id = "s-object-card-main-" + ObjectCardMainComponent_1.nextId++;
14778
- this.iconClass = "fa fa-picture-o";
14779
- this.hasThumbnail = true;
14780
- this.hasDescription = true;
14781
- this.isBrand = false;
14782
- this.buttonClick = new EventEmitter();
14783
- this._thumbnailSize = ThumbnailSize.Medium;
14820
+ var TieredMenuDividerComponent = /** @class */ (function () {
14821
+ function TieredMenuDividerComponent() {
14784
14822
  }
14785
- ObjectCardMainComponent_1 = ObjectCardMainComponent;
14786
- Object.defineProperty(ObjectCardMainComponent.prototype, "thumbnailSize", {
14787
- get: function () {
14788
- return this._thumbnailSize;
14789
- },
14790
- set: function (value) {
14791
- this._thumbnailSize = value;
14792
- if (this.thumbnailComponent)
14793
- this.thumbnailComponent.size = value;
14794
- },
14795
- enumerable: true,
14796
- configurable: true
14797
- });
14798
- ObjectCardMainComponent.prototype.onResize = function () {
14799
- this.update();
14823
+ TieredMenuDividerComponent = __decorate([
14824
+ Component({
14825
+ selector: "s-tiered-menu-divider",
14826
+ template: "<div class=\"divider\"></div>",
14827
+ styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
14828
+ })
14829
+ ], TieredMenuDividerComponent);
14830
+ return TieredMenuDividerComponent;
14831
+ }());
14832
+
14833
+ var TieredMenuEventService = /** @class */ (function () {
14834
+ function TieredMenuEventService() {
14835
+ this.incrementCurrentItemEvent = new EventEmitter();
14836
+ this.decrementCurrentItemEvent = new EventEmitter();
14837
+ this.closeAllMenusEvent = new EventEmitter();
14838
+ this.selectItemEvent = new EventEmitter();
14839
+ this.openItemMenuEvent = new EventEmitter();
14840
+ this.closeItemMenuEvent = new EventEmitter();
14841
+ this.createMenuEvent = new EventEmitter();
14842
+ }
14843
+ TieredMenuEventService = __decorate([
14844
+ Injectable()
14845
+ ], TieredMenuEventService);
14846
+ return TieredMenuEventService;
14847
+ }());
14848
+
14849
+ var TieredMenuItemComponent = /** @class */ (function () {
14850
+ function TieredMenuItemComponent(_tieredMenuEventService) {
14851
+ this._tieredMenuEventService = _tieredMenuEventService;
14852
+ this.focused = false;
14853
+ this.highlight = false;
14854
+ this.triggerEvent = "click";
14855
+ this.closeOnClick = false;
14856
+ }
14857
+ TieredMenuItemComponent.prototype.onClick = function () {
14858
+ if (this.item.disabled)
14859
+ return;
14860
+ if (this.item.submenu) {
14861
+ if (!this.item.isOpen) {
14862
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
14863
+ }
14864
+ else if (this.closeOnClick) {
14865
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
14866
+ }
14867
+ }
14868
+ else {
14869
+ this._tieredMenuEventService.selectItemEvent.emit(this.item);
14870
+ }
14800
14871
  };
14801
- ObjectCardMainComponent.prototype.ngAfterContentInit = function () {
14802
- this.update();
14872
+ TieredMenuItemComponent.prototype.onMouseEnter = function () {
14873
+ var _this = this;
14874
+ if (this.item.disabled)
14875
+ return;
14876
+ if (this.triggerEvent === "hover" && !this.item.isOpen) {
14877
+ this._showTimeout = window.setTimeout(function () {
14878
+ _this._tieredMenuEventService.openItemMenuEvent.emit(_this.item);
14879
+ }, 300);
14880
+ }
14803
14881
  };
14804
- ObjectCardMainComponent.prototype.update = function () {
14805
- var windowWidth = window.innerWidth;
14806
- if (windowWidth <= Breakpoints.SM_MAX)
14807
- this.thumbnailSize = ThumbnailSize.Small;
14808
- else
14809
- this.thumbnailSize = ThumbnailSize.Medium;
14882
+ TieredMenuItemComponent.prototype.onMouseLeave = function () {
14883
+ window.clearTimeout(this._showTimeout);
14810
14884
  };
14811
- var ObjectCardMainComponent_1;
14812
- ObjectCardMainComponent.nextId = 0;
14813
- __decorate([
14814
- Input()
14815
- ], ObjectCardMainComponent.prototype, "id", void 0);
14816
- __decorate([
14817
- Input()
14818
- ], ObjectCardMainComponent.prototype, "imageSource", void 0);
14819
- __decorate([
14820
- Input()
14821
- ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
14822
- __decorate([
14823
- Input()
14824
- ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
14825
- __decorate([
14826
- Input()
14827
- ], ObjectCardMainComponent.prototype, "iconClass", void 0);
14828
- __decorate([
14829
- Input()
14830
- ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
14831
- __decorate([
14832
- Input()
14833
- ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
14885
+ TieredMenuItemComponent.ctorParameters = function () { return [
14886
+ { type: TieredMenuEventService }
14887
+ ]; };
14834
14888
  __decorate([
14835
14889
  Input()
14836
- ], ObjectCardMainComponent.prototype, "isBrand", void 0);
14890
+ ], TieredMenuItemComponent.prototype, "item", void 0);
14837
14891
  __decorate([
14838
14892
  Input()
14839
- ], ObjectCardMainComponent.prototype, "label", void 0);
14893
+ ], TieredMenuItemComponent.prototype, "focused", void 0);
14840
14894
  __decorate([
14841
14895
  Input()
14842
- ], ObjectCardMainComponent.prototype, "description", void 0);
14896
+ ], TieredMenuItemComponent.prototype, "highlight", void 0);
14843
14897
  __decorate([
14844
14898
  Input()
14845
- ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
14899
+ ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
14846
14900
  __decorate([
14847
14901
  Input()
14848
- ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
14902
+ ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
14849
14903
  __decorate([
14850
- Output()
14851
- ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
14904
+ HostListener("click"),
14905
+ HostListener("touchend")
14906
+ ], TieredMenuItemComponent.prototype, "onClick", null);
14852
14907
  __decorate([
14853
- ContentChild(ThumbnailComponent, { static: true })
14854
- ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
14908
+ HostListener("mouseenter")
14909
+ ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
14855
14910
  __decorate([
14856
- HostListener("window:resize")
14857
- ], ObjectCardMainComponent.prototype, "onResize", null);
14858
- ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
14911
+ HostListener("mouseleave")
14912
+ ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
14913
+ TieredMenuItemComponent = __decorate([
14859
14914
  Component({
14860
- selector: "s-object-card-main",
14861
- template: "<ng-container *ngIf=\"hasThumbnail\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageFallback]=\"imageFallback\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n [size]=\"thumbnailSize\"\n *ngIf=\"!thumbnailComponent\"\n [isBrand]=\"isBrand\"\n ></s-thumbnail>\n</ng-container>\n\n<ng-container *ngIf=\"hasDescription\">\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n</ng-container>\n",
14862
- styles: [":host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;min-height:70px}.info-container{margin-left:10px;-ms-flex:1;flex:1}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{display:block;font-weight:700}.info-container .description{color:#999;display:block}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}"]
14915
+ selector: "s-tiered-menu-item",
14916
+ template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled\n }\">\n <div class=\"tiered-menu-item-content\">\n <span class=\"icon\" [ngClass]=\"item.iconClass\"></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n <span\n *ngIf=\"item.submenu\"\n class=\"submenu-icon\"\n [ngClass]=\"{\n 'fas': true,\n 'fa-chevron-left': item.isOpen,\n 'fa-chevron-right': !item.isOpen\n }\">\n </span>\n</div>",
14917
+ styles: [".tiered-menu-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}"]
14863
14918
  })
14864
- ], ObjectCardMainComponent);
14865
- return ObjectCardMainComponent;
14919
+ ], TieredMenuItemComponent);
14920
+ return TieredMenuItemComponent;
14866
14921
  }());
14867
14922
 
14868
- var EnumSeverity;
14869
- (function (EnumSeverity) {
14870
- EnumSeverity["Default"] = "Default";
14871
- EnumSeverity["Info"] = "Info";
14872
- EnumSeverity["Warn"] = "Warn";
14873
- EnumSeverity["Error"] = "Error";
14874
- EnumSeverity["Success"] = "Success";
14875
- })(EnumSeverity || (EnumSeverity = {}));
14876
-
14877
- var elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
14878
- var ObjectCardComponent = /** @class */ (function () {
14879
- function ObjectCardComponent(cdr, elementRef) {
14880
- this.cdr = cdr;
14881
- this.elementRef = elementRef;
14882
- this.id = "s-object-card-" + ObjectCardComponent_1.nextId++;
14883
- this.expanded = false;
14884
- this.expandTooltip = "Abrir painel";
14885
- this.collapseTooltip = "Fechar painel";
14886
- this.fieldsMinWidth = 200;
14887
- this.expandedChange = new EventEmitter();
14888
- this.maxVisibleFields = 0;
14889
- this.severity = EnumSeverity.Default;
14890
- this.EnumSeverity = EnumSeverity;
14923
+ var TieredMenuService = /** @class */ (function () {
14924
+ function TieredMenuService() {
14925
+ this.currentItems = [];
14926
+ this.items = [];
14891
14927
  }
14892
- ObjectCardComponent_1 = ObjectCardComponent;
14893
- ObjectCardComponent.prototype.ngAfterViewInit = function () {
14928
+ TieredMenuService.prototype.normalizeData = function (items, parent) {
14894
14929
  var _this = this;
14895
- this.update();
14896
- this.cdr.detectChanges();
14897
- this.fields.changes.subscribe(function () {
14898
- _this.update();
14899
- });
14900
- var erd = elementResizeDetectorMaker({
14901
- strategy: "scroll",
14930
+ return items.map(function (i) {
14931
+ var item = __assign({ visible: true }, i);
14932
+ if (item.submenu) {
14933
+ item.submenu = _this.normalizeData(item.submenu, item);
14934
+ }
14935
+ item.id = _this._generateId();
14936
+ item.parent = parent;
14937
+ item.isOpen = false;
14938
+ return item;
14902
14939
  });
14903
- erd.listenTo(this.elementRef.nativeElement, function () { return _this.update(); });
14904
14940
  };
14905
- ObjectCardComponent.prototype.update = function () {
14906
- var e_1, _a;
14907
- var windowWidth = window.innerWidth;
14908
- var containerWidth = this.elementRef.nativeElement.offsetWidth;
14909
- var mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
14910
- var fieldsMinWidth = this.fieldsMinWidth;
14911
- var expandIconWidth = 50;
14912
- var fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
14913
- try {
14914
- for (var fieldElementList_1 = __values(fieldElementList), fieldElementList_1_1 = fieldElementList_1.next(); !fieldElementList_1_1.done; fieldElementList_1_1 = fieldElementList_1.next()) {
14915
- var element = fieldElementList_1_1.value;
14916
- element.style.minWidth = this.fieldsMinWidth + "px";
14941
+ TieredMenuService.prototype.markAllItemsAsClosed = function (items) {
14942
+ var _this = this;
14943
+ return items.map(function (i) {
14944
+ var item = __assign({}, i);
14945
+ if (item.submenu) {
14946
+ item.submenu = _this.markAllItemsAsClosed(item.submenu);
14917
14947
  }
14918
- }
14919
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
14920
- finally {
14921
- try {
14922
- if (fieldElementList_1_1 && !fieldElementList_1_1.done && (_a = fieldElementList_1.return)) _a.call(fieldElementList_1);
14948
+ item.isOpen = false;
14949
+ return item;
14950
+ });
14951
+ };
14952
+ TieredMenuService.prototype.searchTheHierarchy = function (itemA, itemB) {
14953
+ var item = itemB;
14954
+ while (item) {
14955
+ if (item === itemA) {
14956
+ return true;
14923
14957
  }
14924
- finally { if (e_1) throw e_1.error; }
14958
+ item = item.parent;
14925
14959
  }
14926
- var maxFieldQtd;
14927
- if (windowWidth <= Breakpoints.SM_MAX)
14928
- maxFieldQtd = 0;
14929
- else
14930
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
14931
- if (maxFieldQtd && maxFieldQtd < this.fields.length) {
14932
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
14960
+ return false;
14961
+ };
14962
+ TieredMenuService.prototype.cloneItems = function (items) {
14963
+ return JSON.parse(JSON.stringify(items));
14964
+ };
14965
+ TieredMenuService.prototype._generateId = function () {
14966
+ return "id-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9);
14967
+ };
14968
+ TieredMenuService = __decorate([
14969
+ Injectable()
14970
+ ], TieredMenuService);
14971
+ return TieredMenuService;
14972
+ }());
14973
+
14974
+ var TieredMenuNestedComponent = /** @class */ (function () {
14975
+ function TieredMenuNestedComponent(tieredMenuService, _tieredMenuEventService) {
14976
+ this.tieredMenuService = tieredMenuService;
14977
+ this._tieredMenuEventService = _tieredMenuEventService;
14978
+ this.top = 0;
14979
+ this.left = 0;
14980
+ this._unsubscribe$ = new Subject();
14981
+ }
14982
+ TieredMenuNestedComponent.prototype.onResize = function () {
14983
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14984
+ };
14985
+ TieredMenuNestedComponent.prototype.onDocumentClick = function (event) {
14986
+ // Closing menu when clicked outside.
14987
+ var target = event.target;
14988
+ var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
14989
+ if (!clickedInside) {
14990
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14933
14991
  }
14934
- this.maxVisibleFields = maxFieldQtd;
14935
- if (maxFieldQtd >= this.fields.length && this.expanded)
14936
- this.collapse();
14937
14992
  };
14938
- ObjectCardComponent.prototype.toggle = function () {
14939
- this.expanded ? this.collapse() : this.expand();
14993
+ TieredMenuNestedComponent.prototype.onKeydownHandler = function (event) {
14994
+ switch (event.key) {
14995
+ case "Escape":
14996
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14997
+ break;
14998
+ case " ":
14999
+ case "Enter":
15000
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15001
+ break;
15002
+ case "ArrowLeft":
15003
+ // When nested I need a reference to the current item's parent item, otherwise just the current item.
15004
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
15005
+ break;
15006
+ case "ArrowRight":
15007
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15008
+ break;
15009
+ case "ArrowUp":
15010
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15011
+ break;
15012
+ case "ArrowDown":
15013
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15014
+ break;
15015
+ }
14940
15016
  };
14941
- ObjectCardComponent.prototype.expand = function () {
14942
- this.expanded = true;
14943
- this.expandedChange.emit(this.expanded);
15017
+ TieredMenuNestedComponent.prototype.ngOnInit = function () {
15018
+ this.tieredMenuService.currentItems = this.items;
15019
+ this._subscribeEvents();
14944
15020
  };
14945
- ObjectCardComponent.prototype.collapse = function () {
14946
- this.expanded = false;
14947
- this.expandedChange.emit(this.expanded);
15021
+ TieredMenuNestedComponent.prototype.ngOnDestroy = function () {
15022
+ this._unsubscribe$.next();
15023
+ this._unsubscribe$.complete();
14948
15024
  };
14949
- ObjectCardComponent.prototype.getExpandedFieldWidth = function () {
14950
- var containerWidth = this.elementRef.nativeElement.offsetWidth;
14951
- var fieldsPerRow;
14952
- if (containerWidth <= Breakpoints.SM_MAX)
14953
- fieldsPerRow = 1;
14954
- else if (containerWidth <= Breakpoints.MD_MAX)
14955
- fieldsPerRow = 2;
14956
- else if (containerWidth <= Breakpoints.LG_MAX)
14957
- fieldsPerRow = 4;
14958
- else
14959
- fieldsPerRow = 6;
14960
- return 12 / fieldsPerRow;
15025
+ TieredMenuNestedComponent.prototype._incrementCurItem = function () {
15026
+ if (!this.tieredMenuService.currentItem) {
15027
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15028
+ return;
15029
+ }
15030
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15031
+ if (curIndex < this.tieredMenuService.currentItems.length) {
15032
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15033
+ }
15034
+ else {
15035
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15036
+ }
15037
+ if (this.tieredMenuService.currentItem.divider) {
15038
+ this._incrementCurItem();
15039
+ }
14961
15040
  };
14962
- var ObjectCardComponent_1;
14963
- ObjectCardComponent.nextId = 0;
14964
- ObjectCardComponent.ctorParameters = function () { return [
14965
- { type: ChangeDetectorRef },
14966
- { type: ElementRef }
15041
+ TieredMenuNestedComponent.prototype._decrementCurItem = function () {
15042
+ if (!this.tieredMenuService.currentItem) {
15043
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15044
+ return;
15045
+ }
15046
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15047
+ if (curIndex >= 0) {
15048
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15049
+ }
15050
+ else {
15051
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15052
+ }
15053
+ if (this.tieredMenuService.currentItem.divider) {
15054
+ this._decrementCurItem();
15055
+ }
15056
+ };
15057
+ TieredMenuNestedComponent.prototype._closeItem = function (item) {
15058
+ var _a;
15059
+ var itemAux = this._lastOpenItem;
15060
+ while (itemAux && itemAux != item) {
15061
+ itemAux.isOpen = false;
15062
+ itemAux = itemAux.parent;
15063
+ }
15064
+ item.isOpen = false;
15065
+ this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
15066
+ this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
15067
+ };
15068
+ TieredMenuNestedComponent.prototype._openItem = function (item) {
15069
+ if (item === null || item === void 0 ? void 0 : item.submenu) {
15070
+ item.isOpen = true;
15071
+ this.tieredMenuService.currentItems = item.submenu;
15072
+ // Only has focus if there has already been interaction.
15073
+ if (this.tieredMenuService.currentItem) {
15074
+ this.tieredMenuService.currentItem = item.submenu[0];
15075
+ }
15076
+ this._lastOpenItem = item;
15077
+ }
15078
+ };
15079
+ TieredMenuNestedComponent.prototype._subscribeEvents = function () {
15080
+ var _this = this;
15081
+ this._tieredMenuEventService.incrementCurrentItemEvent
15082
+ .pipe(takeUntil(this._unsubscribe$))
15083
+ .subscribe(function () {
15084
+ _this._incrementCurItem();
15085
+ });
15086
+ this._tieredMenuEventService.decrementCurrentItemEvent
15087
+ .pipe(takeUntil(this._unsubscribe$))
15088
+ .subscribe(function () {
15089
+ _this._decrementCurItem();
15090
+ });
15091
+ this._tieredMenuEventService.selectItemEvent
15092
+ .pipe(takeUntil(this._unsubscribe$))
15093
+ .subscribe(function (item) {
15094
+ if (item.command) {
15095
+ item.command();
15096
+ // Close all menus after the item was selected.
15097
+ _this._tieredMenuEventService.closeAllMenusEvent.emit();
15098
+ }
15099
+ });
15100
+ this._tieredMenuEventService.openItemMenuEvent
15101
+ .pipe(takeUntil(this._unsubscribe$))
15102
+ .subscribe(function (item) {
15103
+ var _a, _b;
15104
+ if (!_this.tieredMenuService.currentItems.includes(item)) {
15105
+ var itemAux = _this._lastOpenItem;
15106
+ while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
15107
+ itemAux = itemAux.parent;
15108
+ }
15109
+ _this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
15110
+ }
15111
+ _this._lastOpenItem = item;
15112
+ _this._openItem(item);
15113
+ });
15114
+ this._tieredMenuEventService.closeItemMenuEvent
15115
+ .pipe(takeUntil(this._unsubscribe$))
15116
+ .subscribe(function (item) {
15117
+ if (item) {
15118
+ _this._closeItem(item);
15119
+ }
15120
+ });
15121
+ };
15122
+ TieredMenuNestedComponent.ctorParameters = function () { return [
15123
+ { type: TieredMenuService },
15124
+ { type: TieredMenuEventService }
14967
15125
  ]; };
14968
15126
  __decorate([
14969
- Input()
14970
- ], ObjectCardComponent.prototype, "id", void 0);
14971
- __decorate([
14972
- Input()
14973
- ], ObjectCardComponent.prototype, "expanded", void 0);
14974
- __decorate([
14975
- Input()
14976
- ], ObjectCardComponent.prototype, "expandTooltip", void 0);
14977
- __decorate([
14978
- Input()
14979
- ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
15127
+ HostListener("window:resize")
15128
+ ], TieredMenuNestedComponent.prototype, "onResize", null);
14980
15129
  __decorate([
14981
- Input()
14982
- ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
15130
+ HostListener("document:click", ["$event"])
15131
+ ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
14983
15132
  __decorate([
14984
- Output()
14985
- ], ObjectCardComponent.prototype, "expandedChange", void 0);
14986
- __decorate([
14987
- ContentChild(ObjectCardMainComponent, { static: true })
14988
- ], ObjectCardComponent.prototype, "main", void 0);
14989
- __decorate([
14990
- ContentChildren(ObjectCardFieldComponent, { descendants: true })
14991
- ], ObjectCardComponent.prototype, "fields", void 0);
14992
- __decorate([
14993
- Input()
14994
- ], ObjectCardComponent.prototype, "severity", void 0);
14995
- __decorate([
14996
- Input()
14997
- ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
14998
- ObjectCardComponent = ObjectCardComponent_1 = __decorate([
14999
- Component({
15000
- selector: "s-object-card",
15001
- template: "<div [id]=\"id\" class=\"container\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"object-card__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div\n [id]=\"id + '-main-container'\"\n class=\"main-container\"\n [ngClass]=\"{\n 'with-hidden-fields': fields.length > maxVisibleFields,\n 'with-visible-fields': fields.length && maxVisibleFields,\n 'main-container--severity-default': severity === EnumSeverity.Default,\n 'main-container--severity-info': severity === EnumSeverity.Info,\n 'main-container--severity-warn': severity === EnumSeverity.Warn,\n 'main-container--severity-error': severity === EnumSeverity.Error,\n 'main-container--severity-success': severity == EnumSeverity.Success\n }\"\n >\n <div class=\"object-content\">\n <div class=\"s-object-card-main\"><ng-content select=\"s-object-card-main\"></ng-content></div>\n\n <div class=\"divider\" *ngIf=\"maxVisibleFields && fields.length\"></div>\n\n <div *ngFor=\"let field of (fields.toArray() | slice: 0:maxVisibleFields)\" class=\"s-object-card-field\">\n <ng-container *ngTemplateOutlet=\"field.content\"></ng-container>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expand-icon-container'\"\n class=\"expand-icon-container\"\n (click)=\"toggle()\"\n [pTooltip]=\"expanded ? collapseTooltip : expandTooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n >\n <span [id]=\"id + '-expand-icon'\" class=\"expand-icon fa\" [ngClass]=\"{ 'fa-minus': expanded, 'fa-plus': !expanded }\"></span>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expandable-container'\"\n [@expandableContent]=\"expanded\"\n class=\"expandable-container\"\n [ngClass]=\"{\n 'expandable-container--severity-default':\n severity === EnumSeverity.Default,\n 'expandable-container--severity-info': severity === EnumSeverity.Info,\n 'expandable-container--severity-warn': severity === EnumSeverity.Warn,\n 'expandable-container--severity-error': severity === EnumSeverity.Error,\n 'expandable-container--severity-success':\n severity == EnumSeverity.Success\n }\"\n >\n <div class=\"ui-g ui-g-12\">\n <ng-container\n *ngFor=\"\n let field of fields.toArray()\n | slice : maxVisibleFields : fields.length\n \"\n >\n <div class=\"ui-g-{{ getExpandedFieldWidth() }}\">\n <div class=\"s-object-card-field\">\n <ng-container\n *ngTemplateOutlet=\"field.content\"\n ></ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n",
15002
- animations: [
15003
- trigger("expandableContent", [
15004
- state("*", style$7({
15005
- height: "0",
15006
- })),
15007
- state("false", style$7({
15008
- height: "0",
15009
- })),
15010
- state("true", style$7({
15011
- height: "*",
15012
- })),
15013
- transition("* => true", animate("200ms ease-out")),
15014
- transition("false <=> true", animate("200ms ease-out")),
15015
- ]),
15016
- trigger("BorderButtonAnimation", [
15017
- transition(":enter", [
15018
- style$7({ transform: "scaleY(0)", opacity: 0 }),
15019
- animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
15020
- ]),
15021
- transition(":leave", [
15022
- style$7({ transform: "scaleY(1)", opacity: 1 }),
15023
- animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
15024
- ]),
15025
- ]),
15026
- ],
15027
- styles: [":host{display:block}.container{margin-bottom:20px;position:relative}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container--severity-default{border-color:#ccc;border-top:initial}.expandable-container--severity-info{transition:border-color .5s;border-color:#428bca;border-top:initial}.expandable-container--severity-warn{transition:border-color .5s;border-color:#f8931f;border-top:initial}.expandable-container--severity-error{transition:border-color .5s;border-color:#c13018;border-top:initial}.expandable-container--severity-success{transition:border-color .5s;border-color:#0c9348;border-top:initial}.main-container--severity-default{border-color:#ccc}.main-container--severity-info{transition:border-color .5s;border-color:#428bca}.main-container--severity-warn{transition:border-color .5s;border-color:#f8931f}.main-container--severity-error{transition:border-color .5s;border-color:#c13018}.main-container--severity-success{transition:border-color .5s;border-color:#0c9348}.object-card__border-button{position:absolute;top:-13px;right:15px;z-index:1}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]
15028
- })
15029
- ], ObjectCardComponent);
15030
- return ObjectCardComponent;
15031
- }());
15032
-
15033
- var BorderButtonComponent = /** @class */ (function () {
15034
- function BorderButtonComponent() {
15035
- this.severity = EnumSeverity.Default;
15036
- this.EnumSeverity = EnumSeverity;
15037
- this.TooltipPosition = TooltipPosition;
15038
- }
15039
- __decorate([
15040
- Input()
15041
- ], BorderButtonComponent.prototype, "severity", void 0);
15042
- __decorate([
15043
- Input()
15044
- ], BorderButtonComponent.prototype, "options", void 0);
15045
- BorderButtonComponent = __decorate([
15133
+ HostListener("document:keydown", ["$event"])
15134
+ ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
15135
+ TieredMenuNestedComponent = __decorate([
15046
15136
  Component({
15047
- selector: "s-border-button",
15048
- template: "<button\n class=\"border-button\"\n [ngClass]=\"{\n 'border-button--severity-default': severity === EnumSeverity.Default,\n 'border-button--severity-info': severity === EnumSeverity.Info,\n 'border-button--severity-warn': severity === EnumSeverity.Warn,\n 'border-button--severity-error': severity === EnumSeverity.Error,\n 'border-button--severity-success': severity == EnumSeverity.Success,\n 'border-button--disabled': options?.disabled\n ? options?.disabled(severity)\n : false\n }\"\n (click)=\"options?.onClick ? options?.onClick(severity) : null\"\n [sTooltip]=\"options?.tooltip ? options?.tooltip(severity) : null\"\n [tooltipPosition]=\"TooltipPosition.Left\"\n [disabled]=\"options?.disabled ? options?.disabled(severity) : false\"\n>\n <span class=\"border-button__label\">\n {{ options?.label ? options?.label(severity) : null }}\n </span>\n <span\n *ngIf=\"options?.icon ? options?.icon(severity) : false\"\n class=\"border-button__icon {{ options?.icon(severity) }}\"\n ></span>\n</button>",
15049
- styles: [".border-button{padding:0 8px;border:1px solid;border-radius:12px;height:23px;max-width:320px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.border-button__label{font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;width:100%;display:block;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-button__icon{font-size:12px;color:#333;margin-left:8px}.border-button--severity-default{border-color:#ccc;background-color:#fff}.border-button--severity-info{border-color:#428bca;background-color:#d5e8ec;transition:background-color .5s,border-color .5s}.border-button--severity-info:enabled:hover{background-color:#9ecad4;cursor:pointer}.border-button--severity-info:enabled:active{transition:none;background-color:#67acbc;border-color:#67acbc}.border-button--severity-warn{border-color:#f8931f;background-color:#fce3ba;transition:background-color .5s,border-color .5s}.border-button--severity-warn:enabled:hover{background-color:#f8bf5e;cursor:pointer}.border-button--severity-warn:enabled:active{transition:none;background-color:#f5a319;border-color:#f5a319}.border-button--severity-error{border-color:#c13018;background-color:#fcd2d2;transition:background-color .5s,border-color .5s}.border-button--severity-error:enabled:hover{background-color:#f89696;cursor:pointer}.border-button--severity-error:enabled:active{transition:none;background-color:#f45b5b;border-color:#f45b5b}.border-button--severity-success{border-color:#0c9348;background-color:#e6ffb3;transition:background-color .5s,border-color .5s}.border-button--severity-success:enabled:hover{background-color:#c8ff5c;cursor:pointer}.border-button--severity-success:enabled:active{transition:none;background-color:#ade500;border-color:#ade500}.border-button--disabled:disabled:hover{cursor:default}"]
15050
- })
15051
- ], BorderButtonComponent);
15052
- return BorderButtonComponent;
15053
- }());
15054
-
15055
- var BorderButtonModule = /** @class */ (function () {
15056
- function BorderButtonModule() {
15057
- }
15058
- BorderButtonModule = __decorate([
15059
- NgModule({
15060
- imports: [CommonModule, TooltipModule],
15061
- declarations: [BorderButtonComponent],
15062
- exports: [BorderButtonComponent]
15063
- })
15064
- ], BorderButtonModule);
15065
- return BorderButtonModule;
15066
- }());
15067
-
15068
- var ObjectCardModule = /** @class */ (function () {
15069
- function ObjectCardModule() {
15070
- }
15071
- ObjectCardModule = __decorate([
15072
- NgModule({
15073
- imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
15074
- declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15075
- exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15137
+ template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n 'top': top + 'px',\n 'left': left + 'px'\n }\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"></ng-container>\n</div>\n\n<ng-template #itemsTemplate let-items>\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\">\n </s-tiered-menu-item>\n\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n\n <div *ngIf=\"item.submenu && item.isOpen\">\n <div class=\"submenu\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: item.submenu }\"></ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n",
15138
+ styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}"]
15076
15139
  })
15077
- ], ObjectCardModule);
15078
- return ObjectCardModule;
15140
+ ], TieredMenuNestedComponent);
15141
+ return TieredMenuNestedComponent;
15079
15142
  }());
15080
15143
 
15081
- var ProductHeaderComponent = /** @class */ (function () {
15082
- function ProductHeaderComponent() {
15083
- this.id = "s-product-header-" + ProductHeaderComponent_1.nextId++;
15084
- this.baseZIndex = 0;
15085
- this.isHeaderFrame = true;
15144
+ var TieredMenuComponent = /** @class */ (function () {
15145
+ function TieredMenuComponent(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
15146
+ this._appRef = _appRef;
15147
+ this._componentFactoryResolver = _componentFactoryResolver;
15148
+ this._injector = _injector;
15149
+ this._changeDetectorRef = _changeDetectorRef;
15150
+ this.tieredMenuService = tieredMenuService;
15151
+ this._tieredMenuEventService = _tieredMenuEventService;
15152
+ this.top = 0;
15153
+ this.left = 0;
15154
+ this.menuTriggerEvent = "hover";
15155
+ this._componentRef = null;
15156
+ this._unsubscribe$ = new Subject();
15157
+ this.destroyRequest = new EventEmitter();
15086
15158
  }
15087
- ProductHeaderComponent_1 = ProductHeaderComponent;
15088
- ProductHeaderComponent.prototype.ngAfterViewInit = function () {
15089
- this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++DomHandler.zindex);
15090
- if (this.isHeaderFrame) {
15091
- this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
15159
+ TieredMenuComponent_1 = TieredMenuComponent;
15160
+ TieredMenuComponent.prototype.onResize = function () {
15161
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15162
+ };
15163
+ TieredMenuComponent.prototype.onDocumentClick = function (event) {
15164
+ // Closing menu when clicked outside.
15165
+ var target = event.target;
15166
+ var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
15167
+ if (!clickedInside) {
15168
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15092
15169
  }
15093
- else {
15094
- this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
15170
+ };
15171
+ TieredMenuComponent.prototype.onKeydownHandler = function (event) {
15172
+ switch (event.key) {
15173
+ case "Escape":
15174
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15175
+ break;
15176
+ case " ":
15177
+ case "Enter":
15178
+ if (!this.tieredMenuService.currentItem.disabled) {
15179
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15180
+ }
15181
+ break;
15182
+ case "ArrowLeft":
15183
+ if (this.items.includes(this.tieredMenuService.currentItem)) {
15184
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
15185
+ this._changeDetectorRef.detectChanges();
15186
+ }
15187
+ break;
15188
+ case "ArrowRight":
15189
+ if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
15190
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15191
+ event.stopImmediatePropagation();
15192
+ }
15193
+ break;
15194
+ case "ArrowUp":
15195
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15196
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15197
+ event.stopImmediatePropagation();
15198
+ }
15199
+ break;
15200
+ case "ArrowDown":
15201
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15202
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15203
+ event.stopImmediatePropagation();
15204
+ }
15205
+ break;
15095
15206
  }
15096
15207
  };
15097
- var ProductHeaderComponent_1;
15098
- ProductHeaderComponent.nextId = 0;
15099
- __decorate([
15100
- Input()
15101
- ], ProductHeaderComponent.prototype, "id", void 0);
15102
- __decorate([
15103
- Input()
15104
- ], ProductHeaderComponent.prototype, "header", void 0);
15105
- __decorate([
15106
- Input()
15107
- ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
15108
- __decorate([
15109
- Input()
15110
- ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
15111
- __decorate([
15112
- ViewChild("headerContainer", { static: false })
15113
- ], ProductHeaderComponent.prototype, "container", void 0);
15114
- ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
15115
- Component({
15116
- selector: "s-product-header",
15117
- template: "<div [id]=\"id\" class=\"box\">\n <div\n #headerContainer\n class=\"sds-container\"\n [class]=\"isHeaderFrame ? 'header-frame' : 'primary-header'\"\n >\n <h1 [class]=\"isHeaderFrame ? 'title' : 'primary-title'\">{{ header }}</h1>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n",
15118
- styles: [".box{position:relative;width:100%;height:70px}.header-frame{padding-top:15px;padding-bottom:15px;width:100%;top:0;left:0;height:70px;background-color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;position:fixed}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.primary-header{display:-ms-flexbox;display:flex;width:100%;height:70px;padding:15px 20px;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-bottom:1px solid #ddd;background-color:#fff;gap:24px}@media (max-width:768px){.primary-header{width:100%}}.primary-header .primary-title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis}"]
15119
- })
15120
- ], ProductHeaderComponent);
15121
- return ProductHeaderComponent;
15122
- }());
15123
-
15124
- var ProductHeaderModule = /** @class */ (function () {
15125
- function ProductHeaderModule() {
15126
- }
15127
- ProductHeaderModule = __decorate([
15128
- NgModule({
15129
- imports: [CommonModule, TooltipModule$1, ThumbnailModule],
15130
- declarations: [ProductHeaderComponent],
15131
- exports: [ProductHeaderComponent, ThumbnailModule],
15132
- })
15133
- ], ProductHeaderModule);
15134
- return ProductHeaderModule;
15135
- }());
15136
-
15137
- var ProgressBarColors;
15138
- (function (ProgressBarColors) {
15139
- ProgressBarColors["Blue"] = "blue";
15140
- ProgressBarColors["Green"] = "green";
15141
- ProgressBarColors["Red"] = "red";
15142
- ProgressBarColors["Yellow"] = "yellow";
15143
- })(ProgressBarColors || (ProgressBarColors = {}));
15144
-
15145
- var ProgressBarMode;
15146
- (function (ProgressBarMode) {
15147
- ProgressBarMode["Determinate"] = "determinate";
15148
- ProgressBarMode["Indeterminate"] = "indeterminate";
15149
- })(ProgressBarMode || (ProgressBarMode = {}));
15150
-
15151
- var ProgressBarComponent = /** @class */ (function () {
15152
- function ProgressBarComponent() {
15153
- this.numberFormatOptions = {
15154
- style: "decimal",
15155
- minimumFractionDigits: 0,
15156
- maximumFractionDigits: 2,
15157
- };
15158
- this.showValue = true;
15159
- this.mode = ProgressBarMode.Determinate;
15160
- }
15161
- ProgressBarComponent.prototype.ngOnInit = function () {
15162
- this.validateInputs();
15208
+ TieredMenuComponent.prototype.ngOnInit = function () {
15209
+ this.tieredMenuService.currentItems = this.items;
15210
+ this._subscribeEvents();
15163
15211
  };
15164
- ProgressBarComponent.prototype.validateInputs = function () {
15165
- if (this.value < 0 || this.value > 100) {
15166
- throw new Error("Invalid value for value");
15212
+ TieredMenuComponent.prototype.ngOnDestroy = function () {
15213
+ this._unsubscribe$.next();
15214
+ this._unsubscribe$.complete();
15215
+ };
15216
+ TieredMenuComponent.prototype._incrementCurItem = function () {
15217
+ if (!this.tieredMenuService.currentItem) {
15218
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15219
+ return;
15167
15220
  }
15168
- if (this.targetValue < 0 || this.targetValue > 100) {
15169
- throw new Error("Invalid value for targetValue");
15221
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15222
+ // Checking if it is the current menu.
15223
+ return;
15170
15224
  }
15171
- if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
15172
- throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
15225
+ var currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15226
+ if (currentIndex < this.tieredMenuService.currentItems.length) {
15227
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
15228
+ }
15229
+ else {
15230
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15231
+ }
15232
+ if (this.tieredMenuService.currentItem.divider) {
15233
+ this._incrementCurItem();
15173
15234
  }
15174
15235
  };
15175
- __decorate([
15176
- Input()
15177
- ], ProgressBarComponent.prototype, "value", void 0);
15178
- __decorate([
15179
- Input()
15180
- ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
15181
- __decorate([
15182
- Input()
15183
- ], ProgressBarComponent.prototype, "targetValue", void 0);
15184
- __decorate([
15185
- Input()
15186
- ], ProgressBarComponent.prototype, "label", void 0);
15187
- __decorate([
15188
- Input()
15189
- ], ProgressBarComponent.prototype, "targetLabel", void 0);
15190
- __decorate([
15191
- Input()
15192
- ], ProgressBarComponent.prototype, "activeColor", void 0);
15193
- __decorate([
15194
- Input()
15195
- ], ProgressBarComponent.prototype, "showValue", void 0);
15196
- __decorate([
15197
- Input()
15198
- ], ProgressBarComponent.prototype, "mode", void 0);
15199
- ProgressBarComponent = __decorate([
15200
- Component({
15201
- selector: "s-progressbar",
15202
- template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
15203
- styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
15204
- })
15205
- ], ProgressBarComponent);
15206
- return ProgressBarComponent;
15207
- }());
15208
-
15209
- var ProgressBarDeterminateComponent = /** @class */ (function () {
15210
- function ProgressBarDeterminateComponent(localeService) {
15211
- this.localeService = localeService;
15212
- this.showValue = true;
15213
- }
15214
- ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
15215
- this.validateValues();
15216
- this.onGetLocale();
15236
+ TieredMenuComponent.prototype._decrementCurItem = function () {
15237
+ if (!this.tieredMenuService.currentItem) {
15238
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15239
+ return;
15240
+ // Checking if it is the current menu.
15241
+ }
15242
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15243
+ return;
15244
+ }
15245
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15246
+ if (curIndex >= 0) {
15247
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15248
+ }
15249
+ else {
15250
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15251
+ }
15252
+ if (this.tieredMenuService.currentItem.divider) {
15253
+ this._decrementCurItem();
15254
+ }
15217
15255
  };
15218
- ProgressBarDeterminateComponent.prototype.onGetLocale = function () {
15256
+ TieredMenuComponent.prototype._createMenu = function (items, position) {
15219
15257
  var _this = this;
15220
- this.localeService.getLocale().subscribe({
15221
- next: function (locale) {
15222
- _this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", _this.numberFormatOptions);
15223
- },
15224
- error: function () {
15225
- _this.numberFormat = new Intl.NumberFormat("pt-BR", _this.numberFormatOptions);
15226
- },
15227
- });
15258
+ if (!this._componentRef && items) {
15259
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
15260
+ this._componentRef = componentFactory.create(this._injector);
15261
+ this._appRef.attachView(this._componentRef.hostView);
15262
+ var domElem = this._componentRef.hostView.rootNodes[0];
15263
+ document.body.appendChild(domElem);
15264
+ // Setting the menu items.
15265
+ this._componentRef.instance.items = items;
15266
+ // Subscribe menu events.
15267
+ this._componentRef.instance.destroyRequest.subscribe(function (propagate) {
15268
+ _this._destroy(propagate);
15269
+ });
15270
+ this._menuDivElement = domElem.querySelector(".menu");
15271
+ this._setMenuPosition(position);
15272
+ }
15228
15273
  };
15229
- ProgressBarDeterminateComponent.prototype.validateValues = function () {
15230
- if (this.value < 0 || this.value > 100) {
15231
- throw new Error("Invalid value for value");
15274
+ TieredMenuComponent.prototype._destroy = function (propagate) {
15275
+ if (propagate === void 0) { propagate = true; }
15276
+ if (this._componentRef !== null) {
15277
+ this._appRef.detachView(this._componentRef.hostView);
15278
+ this._componentRef.destroy();
15279
+ this._componentRef = null;
15280
+ this._menuDivElement = null;
15232
15281
  }
15233
- if (this.targetValue < 0 || this.targetValue > 100) {
15234
- throw new Error("Invalid value for targetValue");
15282
+ if (propagate) {
15283
+ this.destroyRequest.emit();
15235
15284
  }
15236
15285
  };
15237
- ProgressBarDeterminateComponent.ctorParameters = function () { return [
15238
- { type: LocaleService }
15239
- ]; };
15240
- __decorate([
15241
- Input()
15242
- ], ProgressBarDeterminateComponent.prototype, "value", void 0);
15243
- __decorate([
15244
- Input()
15245
- ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
15246
- __decorate([
15247
- Input()
15248
- ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
15249
- __decorate([
15250
- Input()
15251
- ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
15252
- __decorate([
15253
- Input()
15254
- ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
15255
- __decorate([
15256
- Input()
15257
- ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
15258
- ProgressBarDeterminateComponent = __decorate([
15259
- Component({
15260
- selector: "s-progressbar-determinate",
15261
- template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
15262
- styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
15263
- })
15264
- ], ProgressBarDeterminateComponent);
15265
- return ProgressBarDeterminateComponent;
15266
- }());
15267
-
15268
- var ProgressBarIndeterminateComponent = /** @class */ (function () {
15269
- function ProgressBarIndeterminateComponent() {
15270
- }
15271
- __decorate([
15272
- Input()
15273
- ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
15274
- __decorate([
15275
- Input()
15276
- ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
15277
- ProgressBarIndeterminateComponent = __decorate([
15278
- Component({
15279
- selector: "s-progressbar-indeterminate",
15280
- template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
15281
- styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
15282
- })
15283
- ], ProgressBarIndeterminateComponent);
15284
- return ProgressBarIndeterminateComponent;
15285
- }());
15286
-
15287
- var ProgressBarModule = /** @class */ (function () {
15288
- function ProgressBarModule() {
15289
- }
15290
- ProgressBarModule = __decorate([
15291
- NgModule({
15292
- imports: [CommonModule],
15293
- declarations: [
15294
- ProgressBarComponent,
15295
- ProgressBarDeterminateComponent,
15296
- ProgressBarIndeterminateComponent,
15297
- ],
15298
- exports: [ProgressBarComponent],
15299
- })
15300
- ], ProgressBarModule);
15301
- return ProgressBarModule;
15302
- }());
15303
-
15304
- var PanelComponent = /** @class */ (function () {
15305
- function PanelComponent() {
15306
- this.toggleable = true;
15307
- this.collapsed = false;
15308
- this.severity = EnumSeverity.Default;
15309
- this.collapsedChange = new EventEmitter();
15310
- this.EnumSeverity = EnumSeverity;
15311
- }
15312
- PanelComponent.prototype.onCollapsedChange = function (collapsed) {
15313
- this.collapsed = collapsed;
15314
- this.collapsedChange.emit(this.collapsed);
15315
- };
15316
- __decorate([
15317
- Input()
15318
- ], PanelComponent.prototype, "header", void 0);
15319
- __decorate([
15320
- Input()
15321
- ], PanelComponent.prototype, "toggleable", void 0);
15322
- __decorate([
15323
- Input()
15324
- ], PanelComponent.prototype, "collapsed", void 0);
15325
- __decorate([
15326
- Input()
15327
- ], PanelComponent.prototype, "severity", void 0);
15328
- __decorate([
15329
- Input()
15330
- ], PanelComponent.prototype, "borderButtonOptions", void 0);
15331
- __decorate([
15332
- Output()
15333
- ], PanelComponent.prototype, "collapsedChange", void 0);
15334
- PanelComponent = __decorate([
15335
- Component({
15336
- selector: "s-panel",
15337
- template: "<p-panel\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n [ngClass]=\"{\n 'panel--severity-default': severity === EnumSeverity.Default,\n 'panel--severity-info': severity === EnumSeverity.Info,\n 'panel--severity-warn': severity === EnumSeverity.Warn,\n 'panel--severity-error': severity === EnumSeverity.Error,\n 'panel--severity-success': severity == EnumSeverity.Success\n }\"\n (collapsedChange)=\"onCollapsedChange($event)\"\n>\n <p-header>\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"panel__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n <span>\n {{ header }}\n </span>\n </p-header>\n\n <ng-content></ng-content>\n</p-panel>",
15338
- animations: [
15339
- trigger("BorderButtonAnimation", [
15340
- transition(":enter", [
15341
- style$7({ transform: "scaleY(0)", opacity: 0 }),
15342
- animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
15343
- ]),
15344
- transition(":leave", [
15345
- style$7({ transform: "scaleY(1)", opacity: 1 }),
15346
- animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
15347
- ]),
15348
- ]),
15349
- ],
15350
- styles: [":host{display:block}:host ::ng-deep .ui-panel{position:relative}:host ::ng-deep .panel--severity-default .ui-panel{border-color:#ccc}:host ::ng-deep .panel--severity-info .ui-panel{border-color:#428bca;transition:border-color .5s}:host ::ng-deep .panel--severity-warn .ui-panel{border-color:#f8931f;transition:border-color .5s}:host ::ng-deep .panel--severity-error .ui-panel{border-color:#c13018;transition:border-color .5s}:host ::ng-deep .panel--severity-success .ui-panel{border-color:#0c9348;transition:border-color .5s}.panel__border-button{position:absolute;top:-13px;right:15px;z-index:1}"]
15351
- })
15352
- ], PanelComponent);
15353
- return PanelComponent;
15354
- }());
15355
-
15356
- var PanelModule = /** @class */ (function () {
15357
- function PanelModule() {
15358
- }
15359
- PanelModule = __decorate([
15360
- NgModule({
15361
- imports: [CommonModule, PanelModule$1, BorderButtonModule],
15362
- declarations: [PanelComponent],
15363
- exports: [PanelComponent],
15364
- })
15365
- ], PanelModule);
15366
- return PanelModule;
15367
- }());
15368
-
15369
- var RatingScaleComponent = /** @class */ (function () {
15370
- function RatingScaleComponent() {
15371
- this.disabled = false;
15372
- }
15373
- RatingScaleComponent_1 = RatingScaleComponent;
15374
- RatingScaleComponent.prototype.writeValue = function (value) {
15375
- if (!this.disabled) {
15376
- this.value = value;
15286
+ TieredMenuComponent.prototype._setMenuPosition = function (position) {
15287
+ var _a, _b;
15288
+ var ITEM_HEIGHT = 37;
15289
+ var DIVIDER_HEIGHT = 5;
15290
+ var PADDING = 8;
15291
+ if (this._componentRef !== null) {
15292
+ var top_1 = position.top, right = position.right, bottom = position.bottom, left = position.left;
15293
+ var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
15294
+ return !item.divider ? count + 1 : count;
15295
+ }, 0);
15296
+ var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
15297
+ return item.divider ? count + 1 : count;
15298
+ }, 0);
15299
+ // I need to calculate the height of the component because the internal elements have not been created yet.
15300
+ var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
15301
+ var menuWidth = this._menuDivElement.getBoundingClientRect().width;
15302
+ var rightFreeSpace = window.innerWidth - right;
15303
+ var bottomFreeSpace = window.innerHeight - bottom;
15304
+ if (rightFreeSpace > menuWidth) {
15305
+ this._componentRef.instance.left = right;
15306
+ }
15307
+ else {
15308
+ this._componentRef.instance.left = left - menuWidth;
15309
+ }
15310
+ if (bottomFreeSpace <= menuHeight) {
15311
+ this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
15312
+ }
15313
+ else {
15314
+ this._componentRef.instance.top = window.scrollY + top_1;
15315
+ }
15377
15316
  }
15378
15317
  };
15379
- RatingScaleComponent.prototype.registerOnChange = function (onChange) {
15380
- this._onChange = onChange;
15381
- };
15382
- RatingScaleComponent.prototype.registerOnTouched = function (onTouched) {
15383
- this._onTouched = onTouched;
15384
- };
15385
- RatingScaleComponent.prototype.onSelect = function (rating) {
15386
- this.value = rating;
15387
- if (this._onChange) {
15388
- this._onChange(this.value);
15389
- }
15318
+ TieredMenuComponent.prototype._subscribeEvents = function () {
15319
+ var _this = this;
15320
+ // Increment current item event.
15321
+ this._tieredMenuEventService.incrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
15322
+ _this._incrementCurItem();
15323
+ });
15324
+ // Decrement current item event.
15325
+ this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
15326
+ _this._decrementCurItem();
15327
+ });
15328
+ // Select item event.
15329
+ this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function (item) {
15330
+ if (item.submenu) {
15331
+ _this._tieredMenuEventService.openItemMenuEvent.emit(item);
15332
+ }
15333
+ else if (item.command) {
15334
+ _this._tieredMenuEventService.closeAllMenusEvent.emit();
15335
+ item.command();
15336
+ }
15337
+ });
15338
+ // Close all menus event.
15339
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
15340
+ _this._destroy();
15341
+ _this.tieredMenuService.currentItem = null;
15342
+ _this.tieredMenuService.currentItems = _this.tieredMenuService.items;
15343
+ _this.tieredMenuService.markAllItemsAsClosed(_this.tieredMenuService.items);
15344
+ });
15345
+ // Open item menu event.
15346
+ this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function (item) {
15347
+ if (_this.tieredMenuService.currentItem) {
15348
+ if (_this.tieredMenuService.currentItem.parent === item) {
15349
+ return;
15350
+ }
15351
+ if (!_this.tieredMenuService.searchTheHierarchy(_this.tieredMenuService.currentItem.parent, item)) {
15352
+ var current = _this.tieredMenuService.currentItem;
15353
+ current.isOpen = false;
15354
+ while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
15355
+ _this._tieredMenuEventService.closeItemMenuEvent.emit(current);
15356
+ _this._changeDetectorRef.detectChanges();
15357
+ current = current.parent;
15358
+ }
15359
+ if (current) {
15360
+ current.isOpen = false;
15361
+ }
15362
+ }
15363
+ }
15364
+ if (item.submenu && !item.isOpen && _this.items.includes(item)) {
15365
+ var _a = document.querySelector("#" + item.id).getBoundingClientRect(), top_2 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
15366
+ var position = { top: top_2, right: right, left: left, bottom: bottom };
15367
+ _this._createMenu(item.submenu, position);
15368
+ _this.tieredMenuService.currentItems = item.submenu;
15369
+ _this.tieredMenuService.currentItem = item.submenu[0];
15370
+ item.isOpen = true;
15371
+ }
15372
+ });
15373
+ // Close item menu event.
15374
+ this._tieredMenuEventService.closeItemMenuEvent
15375
+ .pipe(takeUntil(this._unsubscribe$))
15376
+ .subscribe(function (item) {
15377
+ var _a, _b;
15378
+ if (_this.items.some(function (i) { return i.id === item.id; })) {
15379
+ if (item.parent) {
15380
+ item.parent.isOpen = false;
15381
+ }
15382
+ _this.tieredMenuService.currentItems = ((_b = (_a = item === null || item === void 0 ? void 0 : item.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.submenu) || _this.tieredMenuService.items;
15383
+ _this.tieredMenuService.currentItem = item.parent;
15384
+ _this.destroyRequest.emit(false);
15385
+ }
15386
+ });
15390
15387
  };
15391
- var RatingScaleComponent_1;
15388
+ var TieredMenuComponent_1;
15389
+ TieredMenuComponent.ctorParameters = function () { return [
15390
+ { type: ApplicationRef },
15391
+ { type: ComponentFactoryResolver },
15392
+ { type: Injector },
15393
+ { type: ChangeDetectorRef },
15394
+ { type: TieredMenuService },
15395
+ { type: TieredMenuEventService }
15396
+ ]; };
15392
15397
  __decorate([
15393
- Input()
15394
- ], RatingScaleComponent.prototype, "nodes", void 0);
15398
+ Output()
15399
+ ], TieredMenuComponent.prototype, "destroyRequest", void 0);
15395
15400
  __decorate([
15396
- Input()
15397
- ], RatingScaleComponent.prototype, "startLabel", void 0);
15401
+ HostListener("window:resize")
15402
+ ], TieredMenuComponent.prototype, "onResize", null);
15398
15403
  __decorate([
15399
- Input()
15400
- ], RatingScaleComponent.prototype, "endLabel", void 0);
15404
+ HostListener("document:click", ["$event"])
15405
+ ], TieredMenuComponent.prototype, "onDocumentClick", null);
15401
15406
  __decorate([
15402
- Input()
15403
- ], RatingScaleComponent.prototype, "disabled", void 0);
15404
- RatingScaleComponent = RatingScaleComponent_1 = __decorate([
15407
+ HostListener("document:keydown", ["$event"])
15408
+ ], TieredMenuComponent.prototype, "onKeydownHandler", null);
15409
+ TieredMenuComponent = TieredMenuComponent_1 = __decorate([
15405
15410
  Component({
15406
- selector: "s-rating-scale",
15407
- template: "<div\n class=\"rating-scale\"\n [ngClass]=\"{ 'rating-scale--disabled': disabled }\">\n <div class=\"nodes\">\n <button\n *ngFor=\"let node of nodes; index as i\"\n class=\"node\"\n [ngClass]=\"{ 'node--selected': value?.id === node.id && !disabled }\"\n tabindex=\"0\"\n (click)=\"onSelect(node)\"> \n <span\n *ngIf=\"node.icon\"\n class=\"icon fas\"\n [ngClass]=\"node.icon\">\n </span>\n <span\n *ngIf=\"node.title\"\n class=\"label\">\n {{ node.title }}\n </span>\n </button>\n </div>\n <div class=\"labels\">\n <span>{{ startLabel }}</span>\n <span>{{ endLabel }}</span>\n </div>\n</div>",
15408
- providers: [{
15409
- provide: NG_VALUE_ACCESSOR,
15410
- useExisting: forwardRef(function () { return RatingScaleComponent_1; }),
15411
- multi: true,
15412
- }],
15413
- styles: [".rating-scale{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-scale .nodes{display:-ms-flexbox;display:flex}.rating-scale .nodes .node{-ms-flex-align:center;align-items:center;background-color:#fff;border-radius:6px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:center;justify-content:center;margin:0 2px;padding:8px;border:1px solid #7892a1}.rating-scale .nodes .node .icon{color:#6e7280;font-size:1rem}.rating-scale .nodes .node .label{color:#212533;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale .nodes .node .icon,.rating-scale .nodes .node .label{margin:6px}.rating-scale .nodes .node--selected{background-color:#d5e8ec;border-color:#428bca;color:#428bca}.rating-scale .nodes .node:first-child{margin-left:0}.rating-scale .nodes .node:last-child{margin-right:0}.rating-scale .labels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px 0}.rating-scale .labels span{color:#080808;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale--disabled{opacity:.5}.rating-scale:not(.rating-scale--disabled) .node{cursor:pointer}.rating-scale:not(.rating-scale--disabled) .node:hover{background-color:#dedce5}.rating-scale:not(.rating-scale--disabled) .node:focus{border-width:2px;outline:0}"]
15411
+ selector: "s-tiered-menu",
15412
+ template: "<div\n class=\"menu\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\">\n\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n triggerEvent=\"hover\"\n [closeOnClick]=\"false\">\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div>\n</div>",
15413
+ styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}"]
15414
15414
  })
15415
- ], RatingScaleComponent);
15416
- return RatingScaleComponent;
15415
+ ], TieredMenuComponent);
15416
+ return TieredMenuComponent;
15417
15417
  }());
15418
15418
 
15419
- var RatingScaleModule = /** @class */ (function () {
15420
- function RatingScaleModule() {
15419
+ var TieredMenuGlobalService = /** @class */ (function () {
15420
+ function TieredMenuGlobalService() {
15421
15421
  }
15422
- RatingScaleModule = __decorate([
15423
- NgModule({
15424
- imports: [
15425
- CommonModule,
15426
- ReactiveFormsModule,
15427
- ],
15428
- declarations: [RatingScaleComponent],
15429
- exports: [RatingScaleComponent],
15430
- })
15431
- ], RatingScaleModule);
15432
- return RatingScaleModule;
15422
+ TieredMenuGlobalService = __decorate([
15423
+ Injectable()
15424
+ ], TieredMenuGlobalService);
15425
+ return TieredMenuGlobalService;
15433
15426
  }());
15434
15427
 
15435
- var SelectButtonComponent = /** @class */ (function () {
15436
- function SelectButtonComponent() {
15437
- this.multiple = false;
15438
- this.itemSelected = new EventEmitter();
15439
- this.itemClicked = new EventEmitter();
15440
- this.disabled = false;
15441
- this.activeItems = new Set();
15428
+ var TieredMenuDirective = /** @class */ (function () {
15429
+ function TieredMenuDirective(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
15430
+ this._elementRef = _elementRef;
15431
+ this._appRef = _appRef;
15432
+ this._componentFactoryResolver = _componentFactoryResolver;
15433
+ this._injector = _injector;
15434
+ this._tieredMenuEventService = _tieredMenuEventService;
15435
+ this._tieredMenuService = _tieredMenuService;
15436
+ this._tieredMenuGlobalService = _tieredMenuGlobalService;
15437
+ this._changeDetectorRef = _changeDetectorRef;
15438
+ this.items = [];
15439
+ this.triggerEvent = "click";
15440
+ this._componentRef = null;
15441
+ this._isNested = false;
15442
+ this._isOpen = false;
15443
+ this._unsubscribe$ = new Subject();
15442
15444
  }
15443
- SelectButtonComponent_1 = SelectButtonComponent;
15444
- SelectButtonComponent.prototype.writeValue = function (value) {
15445
- var _this = this;
15446
- if (!value)
15447
- return;
15448
- this.activeItems.clear();
15449
- if (Array.isArray(value)) {
15450
- value.forEach(function (item) {
15451
- _this.items.forEach(function (iItem) {
15452
- if (_this._compareItems(item, iItem)) {
15453
- _this.activeItems.add(iItem);
15454
- }
15455
- });
15456
- });
15445
+ TieredMenuDirective.prototype.onClick = function (event) {
15446
+ if (this.triggerEvent === "click" && !this._isOpen) {
15447
+ this._lastActiveElement = document.activeElement;
15448
+ this._createMenu();
15449
+ event.preventDefault();
15450
+ event.stopPropagation();
15451
+ }
15452
+ };
15453
+ TieredMenuDirective.prototype.ngOnInit = function () {
15454
+ this._subscribeEvents();
15455
+ };
15456
+ TieredMenuDirective.prototype.ngDoCheck = function () {
15457
+ if (!this.previousItems) {
15458
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
15459
+ }
15460
+ var hasChanges = false;
15461
+ if (this.items.length !== this.previousItems.length) {
15462
+ hasChanges = true;
15457
15463
  }
15458
15464
  else {
15459
- this.items.forEach(function (iItem) {
15460
- if (_this._compareItems(value, iItem)) {
15461
- _this.activeItems.add(iItem);
15465
+ for (var i = 0; i < this.items.length; i++) {
15466
+ if (!this._compareItems(this.items[i], this.previousItems[i])) {
15467
+ hasChanges = true;
15468
+ break;
15462
15469
  }
15463
- });
15470
+ }
15464
15471
  }
15472
+ if (hasChanges) {
15473
+ this._updateServiceItems();
15474
+ this._changeDetectorRef.detectChanges();
15475
+ this._rebuildMenu();
15476
+ }
15477
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
15465
15478
  };
15466
- SelectButtonComponent.prototype.registerOnChange = function (onChange) {
15467
- this.onChange = onChange;
15479
+ TieredMenuDirective.prototype.ngOnDestroy = function () {
15480
+ this._unsubscribe$.next();
15481
+ this._unsubscribe$.complete();
15482
+ this._destroy();
15468
15483
  };
15469
- SelectButtonComponent.prototype.registerOnTouched = function (onTouched) {
15470
- this.onTouched = onTouched;
15484
+ TieredMenuDirective.prototype._createMenu = function () {
15485
+ var _a, _b, _c;
15486
+ this._updateServiceItems();
15487
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15488
+ (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
15489
+ this._tieredMenuGlobalService.lastInstance = this;
15490
+ (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
15491
+ this._isOpen = true;
15492
+ this._isNested = document.body.clientWidth < 600;
15493
+ this._isNested ? this._createNestedMenu() : this._createTieredMenu();
15494
+ }
15471
15495
  };
15472
- SelectButtonComponent.prototype.setDisabledState = function (disabled) {
15473
- this.disabled = disabled;
15496
+ TieredMenuDirective.prototype._createTieredMenu = function () {
15497
+ var _this = this;
15498
+ var _a;
15499
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15500
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
15501
+ this._componentRef = componentFactory.create(this._injector);
15502
+ this._appRef.attachView(this._componentRef.hostView);
15503
+ var domElem = this._componentRef.hostView.rootNodes[0];
15504
+ document.body.appendChild(domElem);
15505
+ this._setMenuComponentProperties();
15506
+ this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
15507
+ _this._destroy();
15508
+ });
15509
+ this._setMenuPosition();
15510
+ }
15474
15511
  };
15475
- SelectButtonComponent.prototype.onItemSelect = function (item) {
15476
- var _a, _b;
15477
- if (this.disabled || item.disabled)
15478
- return;
15479
- this.itemClicked.emit(item);
15480
- if (!this.multiple) {
15481
- this.activeItems.clear();
15512
+ TieredMenuDirective.prototype._createNestedMenu = function () {
15513
+ var _a;
15514
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15515
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
15516
+ this._componentRef = componentFactory.create(this._injector);
15517
+ this._appRef.attachView(this._componentRef.hostView);
15518
+ var domElem = this._componentRef.hostView.rootNodes[0];
15519
+ document.body.appendChild(domElem);
15520
+ this._setMenuComponentProperties();
15521
+ this._setMenuPosition();
15482
15522
  }
15483
- this.activeItems.add(item);
15484
- this.itemSelected.emit(__spread(this.activeItems));
15485
- (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, __spread(this.activeItems));
15486
- (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, __spread(this.activeItems));
15487
15523
  };
15488
- SelectButtonComponent.prototype._compareItems = function (item1, item2) {
15489
- var _compare = function (a, b) {
15490
- var e_1, _a;
15491
- if (a === b) {
15492
- return true;
15493
- }
15494
- if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
15495
- return false;
15496
- }
15497
- if (Array.isArray(a) !== Array.isArray(b)) {
15498
- return false;
15499
- }
15500
- var keysA = Object.keys(a);
15501
- var keysB = Object.keys(b);
15502
- if (keysA.length !== keysB.length) {
15503
- return false;
15524
+ TieredMenuDirective.prototype._destroy = function () {
15525
+ if (this._componentRef) {
15526
+ this._isOpen = false;
15527
+ window.clearTimeout(this._showTimeout);
15528
+ this._appRef.detachView(this._componentRef.hostView);
15529
+ this._componentRef.destroy();
15530
+ this._componentRef = null;
15531
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
15532
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15533
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15534
+ }
15535
+ };
15536
+ TieredMenuDirective.prototype._setMenuPosition = function () {
15537
+ var _a, _b;
15538
+ var ITEM_HEIGHT = 37;
15539
+ var ITEM_WIDTH = 176;
15540
+ var DIVIDER_HEIGHT = 5;
15541
+ var PADDING = 8;
15542
+ var MARGIN = 4;
15543
+ if (this._componentRef !== null) {
15544
+ this._componentRef.instance.top = 8;
15545
+ var _c = this._elementRef.nativeElement.getBoundingClientRect(), bottom = _c.bottom, left = _c.left, right = _c.right;
15546
+ var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
15547
+ return !item.divider ? count + 1 : count;
15548
+ }, 0);
15549
+ var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
15550
+ return item.divider ? count + 1 : count;
15551
+ }, 0);
15552
+ var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
15553
+ var rightFreeSpace = window.innerWidth - right;
15554
+ var bottomFreeSpace = window.innerHeight - bottom;
15555
+ this._componentRef.instance.top = bottom;
15556
+ this._componentRef.instance.left = left;
15557
+ if (bottomFreeSpace <= menuHeight) {
15558
+ this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
15504
15559
  }
15505
- try {
15506
- for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
15507
- var key = keysA_1_1.value;
15508
- if (!keysB.includes(key) || !_compare(a[key], b[key])) {
15509
- return false;
15510
- }
15511
- }
15560
+ else {
15561
+ this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
15512
15562
  }
15513
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
15514
- finally {
15515
- try {
15516
- if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
15517
- }
15518
- finally { if (e_1) throw e_1.error; }
15563
+ if (rightFreeSpace > 176) {
15564
+ this._componentRef.instance.left = window.scrollX + left;
15519
15565
  }
15520
- for (var key in a) {
15521
- if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
15522
- return false;
15523
- }
15566
+ else {
15567
+ this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
15524
15568
  }
15525
- return true;
15526
- };
15527
- return _compare(item1, item2);
15569
+ if (this._isNested) {
15570
+ this._componentRef.instance.left = MARGIN;
15571
+ }
15572
+ }
15528
15573
  };
15529
- var SelectButtonComponent_1;
15574
+ TieredMenuDirective.prototype._setMenuComponentProperties = function () {
15575
+ if (this._componentRef != null) {
15576
+ this._componentRef.instance.items = this._tieredMenuService.items;
15577
+ }
15578
+ };
15579
+ TieredMenuDirective.prototype._subscribeEvents = function () {
15580
+ var _this = this;
15581
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
15582
+ _this._tieredMenuService.items = _this._tieredMenuService.markAllItemsAsClosed(_this._tieredMenuService.items);
15583
+ _this._destroy();
15584
+ });
15585
+ };
15586
+ TieredMenuDirective.prototype._compareItems = function (item1, item2) {
15587
+ return JSON.stringify(item1) === JSON.stringify(item2);
15588
+ };
15589
+ TieredMenuDirective.prototype._rebuildMenu = function () {
15590
+ this._destroy();
15591
+ };
15592
+ TieredMenuDirective.prototype._updateServiceItems = function () {
15593
+ this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
15594
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
15595
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15596
+ };
15597
+ TieredMenuDirective.ctorParameters = function () { return [
15598
+ { type: ElementRef },
15599
+ { type: ApplicationRef },
15600
+ { type: ComponentFactoryResolver },
15601
+ { type: Injector },
15602
+ { type: TieredMenuEventService },
15603
+ { type: TieredMenuService },
15604
+ { type: TieredMenuGlobalService },
15605
+ { type: ChangeDetectorRef }
15606
+ ]; };
15530
15607
  __decorate([
15531
15608
  Input()
15532
- ], SelectButtonComponent.prototype, "items", void 0);
15609
+ ], TieredMenuDirective.prototype, "items", void 0);
15533
15610
  __decorate([
15534
15611
  Input()
15535
- ], SelectButtonComponent.prototype, "multiple", void 0);
15536
- __decorate([
15537
- Output()
15538
- ], SelectButtonComponent.prototype, "itemSelected", void 0);
15612
+ ], TieredMenuDirective.prototype, "triggerEvent", void 0);
15539
15613
  __decorate([
15540
- Output()
15541
- ], SelectButtonComponent.prototype, "itemClicked", void 0);
15542
- SelectButtonComponent = SelectButtonComponent_1 = __decorate([
15543
- Component({
15544
- selector: "s-select-button",
15545
- template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems?.has(item)\"\n [disabled]=\"disabled || item.disabled\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n</div>",
15546
- providers: [
15547
- {
15548
- provide: NG_VALUE_ACCESSOR,
15549
- useExisting: forwardRef(function () { return SelectButtonComponent_1; }),
15550
- multi: true,
15551
- },
15614
+ HostListener("click", ["$event"])
15615
+ ], TieredMenuDirective.prototype, "onClick", null);
15616
+ TieredMenuDirective = __decorate([
15617
+ Directive({
15618
+ selector: "[sTieredMenu]",
15619
+ providers: [TieredMenuEventService, TieredMenuService],
15620
+ })
15621
+ ], TieredMenuDirective);
15622
+ return TieredMenuDirective;
15623
+ }());
15624
+
15625
+ var TieredMenuModule = /** @class */ (function () {
15626
+ function TieredMenuModule() {
15627
+ }
15628
+ TieredMenuModule = __decorate([
15629
+ NgModule({
15630
+ imports: [
15631
+ CommonModule,
15552
15632
  ],
15553
- styles: [".select-button{overflow:hidden}"]
15633
+ declarations: [
15634
+ TieredMenuDirective,
15635
+ TieredMenuComponent,
15636
+ TieredMenuNestedComponent,
15637
+ TieredMenuItemComponent,
15638
+ TieredMenuDividerComponent,
15639
+ ],
15640
+ exports: [TieredMenuDirective],
15641
+ providers: [TieredMenuGlobalService],
15554
15642
  })
15555
- ], SelectButtonComponent);
15556
- return SelectButtonComponent;
15643
+ ], TieredMenuModule);
15644
+ return TieredMenuModule;
15557
15645
  }());
15558
15646
 
15559
- var SelectButtonItemComponent = /** @class */ (function () {
15560
- function SelectButtonItemComponent() {
15561
- this.active = false;
15562
- this.first = false;
15563
- this.last = false;
15564
- this.disabled = false;
15647
+ var NavigationButtonModule = /** @class */ (function () {
15648
+ function NavigationButtonModule() {
15649
+ }
15650
+ NavigationButtonModule = __decorate([
15651
+ NgModule({
15652
+ imports: [CommonModule, TieredMenuModule, TooltipModule],
15653
+ declarations: [NavigationButtonComponent],
15654
+ exports: [NavigationButtonComponent],
15655
+ })
15656
+ ], NavigationButtonModule);
15657
+ return NavigationButtonModule;
15658
+ }());
15659
+
15660
+ var ObjectCardFieldComponent = /** @class */ (function () {
15661
+ function ObjectCardFieldComponent() {
15662
+ this.id = "s-object-card-field-" + ObjectCardFieldComponent_1.nextId++;
15663
+ this.buttonClick = new EventEmitter();
15565
15664
  }
15665
+ ObjectCardFieldComponent_1 = ObjectCardFieldComponent;
15666
+ var ObjectCardFieldComponent_1;
15667
+ ObjectCardFieldComponent.nextId = 0;
15566
15668
  __decorate([
15567
15669
  Input()
15568
- ], SelectButtonItemComponent.prototype, "label", void 0);
15670
+ ], ObjectCardFieldComponent.prototype, "id", void 0);
15569
15671
  __decorate([
15570
15672
  Input()
15571
- ], SelectButtonItemComponent.prototype, "active", void 0);
15673
+ ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
15572
15674
  __decorate([
15573
15675
  Input()
15574
- ], SelectButtonItemComponent.prototype, "first", void 0);
15676
+ ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
15575
15677
  __decorate([
15576
15678
  Input()
15577
- ], SelectButtonItemComponent.prototype, "last", void 0);
15679
+ ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
15578
15680
  __decorate([
15579
15681
  Input()
15580
- ], SelectButtonItemComponent.prototype, "disabled", void 0);
15581
- SelectButtonItemComponent = __decorate([
15682
+ ], ObjectCardFieldComponent.prototype, "label", void 0);
15683
+ __decorate([
15684
+ Input()
15685
+ ], ObjectCardFieldComponent.prototype, "description", void 0);
15686
+ __decorate([
15687
+ Input()
15688
+ ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
15689
+ __decorate([
15690
+ Input()
15691
+ ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
15692
+ __decorate([
15693
+ Output()
15694
+ ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
15695
+ __decorate([
15696
+ ContentChild(ThumbnailComponent, { static: true })
15697
+ ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
15698
+ __decorate([
15699
+ ViewChild(TemplateRef, { static: true })
15700
+ ], ObjectCardFieldComponent.prototype, "content", void 0);
15701
+ ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
15582
15702
  Component({
15583
- selector: "s-select-button-item",
15584
- template: "<button\n class=\"select-button-item\"\n [ngClass]=\"{\n 'select-button-item--active': active,\n 'select-button-item--disabled': disabled,\n 'select-button-item--first': first,\n 'select-button-item--last': last\n }\">\n <span class=\"select-button-item__label\">{{ label }}</span>\n</button>",
15585
- styles: [".select-button-item{padding:8px 12px;cursor:pointer;background-color:#fff;border:none;border-left:1px solid #c1c1cc;border-top:1px solid #c1c1cc;border-bottom:1px solid #c1c1cc}.select-button-item__label{font-family:\"Open Sans\" sans-serif;font-size:14px}.select-button-item:not(.select-button-item--disabled):not(.select-button-item--active):hover{background-color:#eeebf2}.select-button-item--active,.select-button-item--active:hover{background-color:#c1c1cc;font-weight:700}.select-button-item--disabled{opacity:.5;cursor:default}.select-button-item--first{border-top-left-radius:2px;border-bottom-left-radius:2px}.select-button-item--last{border-right:1px solid #c1c1cc;border-top-right-radius:2px;border-bottom-right-radius:2px}"]
15586
- })
15587
- ], SelectButtonItemComponent);
15588
- return SelectButtonItemComponent;
15589
- }());
15590
-
15591
- var SelectButtonModule = /** @class */ (function () {
15592
- function SelectButtonModule() {
15593
- }
15594
- SelectButtonModule = __decorate([
15595
- NgModule({
15596
- imports: [CommonModule],
15597
- declarations: [
15598
- SelectButtonComponent,
15599
- SelectButtonItemComponent,
15600
- ],
15601
- exports: [SelectButtonComponent],
15703
+ selector: "s-object-card-field",
15704
+ template: "<ng-template>\n <div class=\"container\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n *ngIf=\"!thumbnailComponent && (imageSource || iconClass)\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n size=\"small\"\n ></s-thumbnail>\n\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n </div>\n</ng-template>\n",
15705
+ styles: [".container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%}.info-container{margin-left:10px}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{color:#999;display:block}.info-container .description{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.info-container{-ms-flex:1;flex:1}}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}.info-container:only-child{margin-left:0}"]
15602
15706
  })
15603
- ], SelectButtonModule);
15604
- return SelectButtonModule;
15707
+ ], ObjectCardFieldComponent);
15708
+ return ObjectCardFieldComponent;
15605
15709
  }());
15606
15710
 
15607
- var SidebarComponent = /** @class */ (function () {
15608
- function SidebarComponent(focusTrapFactory) {
15609
- this.focusTrapFactory = focusTrapFactory;
15610
- this.id = "s-sidebar-" + SidebarComponent_1.nextId++;
15611
- this.visible = false;
15612
- this.baseZIndex = 0;
15613
- this.largeSized = false;
15614
- this.visibleChange = new EventEmitter();
15711
+ var ObjectCardMainComponent = /** @class */ (function () {
15712
+ function ObjectCardMainComponent() {
15713
+ this.id = "s-object-card-main-" + ObjectCardMainComponent_1.nextId++;
15714
+ this.iconClass = "fa fa-picture-o";
15715
+ this.hasThumbnail = true;
15716
+ this.hasDescription = true;
15717
+ this.isBrand = false;
15718
+ this.buttonClick = new EventEmitter();
15719
+ this._thumbnailSize = ThumbnailSize.Medium;
15615
15720
  }
15616
- SidebarComponent_1 = SidebarComponent;
15617
- SidebarComponent.prototype.onShow = function () {
15618
- DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
15619
- var focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
15620
- focusTrap.focusInitialElementWhenReady();
15721
+ ObjectCardMainComponent_1 = ObjectCardMainComponent;
15722
+ Object.defineProperty(ObjectCardMainComponent.prototype, "thumbnailSize", {
15723
+ get: function () {
15724
+ return this._thumbnailSize;
15725
+ },
15726
+ set: function (value) {
15727
+ this._thumbnailSize = value;
15728
+ if (this.thumbnailComponent)
15729
+ this.thumbnailComponent.size = value;
15730
+ },
15731
+ enumerable: true,
15732
+ configurable: true
15733
+ });
15734
+ ObjectCardMainComponent.prototype.onResize = function () {
15735
+ this.update();
15621
15736
  };
15622
- SidebarComponent.prototype.onHide = function () {
15623
- DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15737
+ ObjectCardMainComponent.prototype.ngAfterContentInit = function () {
15738
+ this.update();
15624
15739
  };
15625
- SidebarComponent.prototype.close = function (event) {
15626
- DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15627
- this.visibleChange.emit(false);
15628
- event.preventDefault();
15740
+ ObjectCardMainComponent.prototype.update = function () {
15741
+ var windowWidth = window.innerWidth;
15742
+ if (windowWidth <= Breakpoints.SM_MAX)
15743
+ this.thumbnailSize = ThumbnailSize.Small;
15744
+ else
15745
+ this.thumbnailSize = ThumbnailSize.Medium;
15629
15746
  };
15630
- var SidebarComponent_1;
15631
- SidebarComponent.nextId = 0;
15632
- SidebarComponent.ctorParameters = function () { return [
15633
- { type: FocusTrapFactory }
15634
- ]; };
15747
+ var ObjectCardMainComponent_1;
15748
+ ObjectCardMainComponent.nextId = 0;
15635
15749
  __decorate([
15636
15750
  Input()
15637
- ], SidebarComponent.prototype, "id", void 0);
15751
+ ], ObjectCardMainComponent.prototype, "id", void 0);
15638
15752
  __decorate([
15639
15753
  Input()
15640
- ], SidebarComponent.prototype, "visible", void 0);
15754
+ ], ObjectCardMainComponent.prototype, "imageSource", void 0);
15641
15755
  __decorate([
15642
15756
  Input()
15643
- ], SidebarComponent.prototype, "header", void 0);
15757
+ ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
15644
15758
  __decorate([
15645
15759
  Input()
15646
- ], SidebarComponent.prototype, "baseZIndex", void 0);
15760
+ ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
15647
15761
  __decorate([
15648
15762
  Input()
15649
- ], SidebarComponent.prototype, "largeSized", void 0);
15763
+ ], ObjectCardMainComponent.prototype, "iconClass", void 0);
15764
+ __decorate([
15765
+ Input()
15766
+ ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
15767
+ __decorate([
15768
+ Input()
15769
+ ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
15770
+ __decorate([
15771
+ Input()
15772
+ ], ObjectCardMainComponent.prototype, "isBrand", void 0);
15773
+ __decorate([
15774
+ Input()
15775
+ ], ObjectCardMainComponent.prototype, "label", void 0);
15776
+ __decorate([
15777
+ Input()
15778
+ ], ObjectCardMainComponent.prototype, "description", void 0);
15779
+ __decorate([
15780
+ Input()
15781
+ ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
15782
+ __decorate([
15783
+ Input()
15784
+ ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
15650
15785
  __decorate([
15651
15786
  Output()
15652
- ], SidebarComponent.prototype, "visibleChange", void 0);
15653
- __decorate([
15654
- ViewChild(Sidebar, { static: true })
15655
- ], SidebarComponent.prototype, "innerSidebar", void 0);
15787
+ ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
15656
15788
  __decorate([
15657
- ContentChild(HeaderComponent, { static: true })
15658
- ], SidebarComponent.prototype, "headerSection", void 0);
15789
+ ContentChild(ThumbnailComponent, { static: true })
15790
+ ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
15659
15791
  __decorate([
15660
- ContentChild(FooterComponent, { static: true })
15661
- ], SidebarComponent.prototype, "footerSection", void 0);
15662
- SidebarComponent = SidebarComponent_1 = __decorate([
15792
+ HostListener("window:resize")
15793
+ ], ObjectCardMainComponent.prototype, "onResize", null);
15794
+ ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
15663
15795
  Component({
15664
- selector: "s-sidebar",
15665
- template: "<p-sidebar\n [id]=\"id\"\n [visible]=\"visible\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [blockScroll]=\"true\"\n [baseZIndex]=\"baseZIndex\"\n [modal]=\"true\"\n [dismissible]=\"false\"\n [showCloseIcon]=\"false\"\n position=\"right\"\n appendTo=\"body\"\n [styleClass]=\"largeSized ? 's-sidebar-panel s-sidebar-panel-lg' : 's-sidebar-panel'\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\">\n <div\n [id]=\"id + '-container'\"\n class=\"s-sidebar-container\">\n <a\n href=\"#\"\n role=\"button\"\n class=\"s-sidebar-close\"\n (click)=\"close($event)\">\n <span\n class=\"fa fa-times\"\n aria-hidden=\"true\">\n </span></a>\n <div\n *ngIf=\"header && !headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <h2 class=\"sds-panel-title s-sidebar-header__title\">{{header}}</h2>\n </div>\n <div\n *ngIf=\"headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <ng-content select=\"s-header\"></ng-content>\n </div>\n <p-scrollPanel\n [id]=\"id + '-content-container'\"\n class=\"s-sidebar-content-container\"\n styleClass=\"s-sidebar-content\">\n <ng-content></ng-content>\n </p-scrollPanel>\n <div\n *ngIf=\"footerSection\"\n [id]=\"id + '-footer'\"\n class=\"s-sidebar-footer\">\n <ng-content select=\"s-footer\"></ng-content>\n </div>\n </div>\n</p-sidebar>\n",
15666
- encapsulation: ViewEncapsulation.None,
15667
- styles: [".ui-overflow-hidden-sidebar{overflow:hidden}body .ui-sidebar.s-sidebar-panel{width:50%;padding:0}@media (max-width:767px){body .ui-sidebar.s-sidebar-panel{width:100%}}@media (min-width:768px){body .ui-sidebar.s-sidebar-panel{width:75%}}@media (min-width:992px){body .ui-sidebar.s-sidebar-panel{width:50%}body .ui-sidebar.s-sidebar-panel.s-sidebar-panel-lg{width:75%}}body .ui-sidebar.s-sidebar-panel .s-sidebar-container{height:100%;width:100%;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}body .ui-sidebar.s-sidebar-panel .s-sidebar-close{position:absolute;right:20px;top:20px;color:#333}body .ui-sidebar.s-sidebar-panel .s-sidebar-header{border-bottom:1px solid #ccc;padding-bottom:15px;padding-right:20px;margin-bottom:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel .s-sidebar-content-container{-ms-flex:1;flex:1;overflow:hidden}body .ui-sidebar.s-sidebar-panel .s-sidebar-content{height:100%}body .ui-sidebar.s-sidebar-panel .s-sidebar-footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel p-scrollpanel{padding-top:30px}body .ui-sidebar.s-sidebar-panel .s-sidebar-header+p-scrollpanel{padding-top:0}p-scrollPanel{display:block}.s-sidebar-header__title{font-weight:400}"]
15668
- })
15669
- ], SidebarComponent);
15670
- return SidebarComponent;
15671
- }());
15672
-
15673
- var SidebarModule = /** @class */ (function () {
15674
- function SidebarModule() {
15675
- }
15676
- SidebarModule = __decorate([
15677
- NgModule({
15678
- imports: [CommonModule, A11yModule, SidebarModule$1, ScrollPanelModule, StructureModule],
15679
- declarations: [SidebarComponent],
15680
- exports: [StructureModule, SidebarComponent],
15796
+ selector: "s-object-card-main",
15797
+ template: "<ng-container *ngIf=\"hasThumbnail\">\n <ng-content select=\"s-thumbnail\"></ng-content>\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageFallback]=\"imageFallback\"\n [imageAlt]=\"imageAlt || label\"\n [iconClass]=\"iconClass\"\n [size]=\"thumbnailSize\"\n *ngIf=\"!thumbnailComponent\"\n [isBrand]=\"isBrand\"\n ></s-thumbnail>\n</ng-container>\n\n<ng-container *ngIf=\"hasDescription\">\n <div class=\"info-container\">\n <div #labelTemplate><ng-content select=\"[labelTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-label'\"\n *ngIf=\"!labelTemplate.children.length\"\n class=\"label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ label }}</span\n >\n\n <div #descriptionTemplate><ng-content select=\"[descriptionTemplate]\"></ng-content></div>\n <span\n [id]=\"id + '-description'\"\n *ngIf=\"!descriptionTemplate.children.length\"\n class=\"description\"\n [pTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >{{ description }}</span\n >\n <s-button\n [id]=\"id + '-button'\"\n *ngIf=\"buttonLabel\"\n styleClass=\"object-card-button\"\n priority=\"link\"\n [label]=\"buttonLabel\"\n [model]=\"buttonModel\"\n size=\"small\"\n (onClick)=\"buttonClick.emit($event)\"\n ></s-button>\n </div>\n</ng-container>\n",
15798
+ styles: [":host{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;min-height:70px}.info-container{margin-left:10px;-ms-flex:1;flex:1}.info-container,.info-container span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.info-container .label{display:block;font-weight:700}.info-container .description{color:#999;display:block}@media (max-width:767px){.info-container,.info-container span{white-space:normal}}"]
15681
15799
  })
15682
- ], SidebarModule);
15683
- return SidebarModule;
15800
+ ], ObjectCardMainComponent);
15801
+ return ObjectCardMainComponent;
15684
15802
  }());
15685
15803
 
15686
- var SlidePanelService = /** @class */ (function () {
15687
- function SlidePanelService() {
15688
- this.modalCloseMap = new Map();
15689
- }
15690
- SlidePanelService.prototype.createSlidePanel = function (id) {
15691
- var panelSubject = new Subject();
15692
- this.modalCloseMap.set(id, panelSubject);
15693
- return panelSubject.asObservable();
15694
- };
15695
- SlidePanelService.prototype.getModalCloseObservable = function (id) {
15696
- return this.modalCloseMap.get(id).asObservable();
15697
- };
15698
- SlidePanelService.prototype.closeModal = function (id) {
15699
- var subject = this.modalCloseMap.get(id);
15700
- if (subject) {
15701
- subject.next();
15702
- }
15703
- };
15704
- SlidePanelService = __decorate([
15705
- Injectable()
15706
- ], SlidePanelService);
15707
- return SlidePanelService;
15708
- }());
15804
+ var EnumSeverity;
15805
+ (function (EnumSeverity) {
15806
+ EnumSeverity["Default"] = "Default";
15807
+ EnumSeverity["Info"] = "Info";
15808
+ EnumSeverity["Warn"] = "Warn";
15809
+ EnumSeverity["Error"] = "Error";
15810
+ EnumSeverity["Success"] = "Success";
15811
+ })(EnumSeverity || (EnumSeverity = {}));
15709
15812
 
15710
- var SMALL_DEVICE_BREAKPOINT = 420;
15711
- var SlidePanelComponent = /** @class */ (function () {
15712
- function SlidePanelComponent(slidePanelService) {
15713
- this.slidePanelService = slidePanelService;
15714
- this.id = "slide-panel-" + ++SlidePanelComponent_1.nextId;
15715
- this.openIcon = "fas fa-chevron-right";
15716
- this.closeIcon = "fas fa-chevron-left";
15717
- this.cache = false;
15718
- this.createOpen = false;
15719
- this.panelOpened = new EventEmitter();
15720
- this.panelClosed = new EventEmitter();
15721
- this.isOpen = false;
15722
- this.isSlideOver = false;
15723
- this.isAnimating = false;
15724
- this.isContentAnimationDisabled = true;
15725
- this.slideHeight = 0;
15726
- this.sideContentWidth = 0;
15727
- this._unsubscribe$ = new Subject();
15813
+ var elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
15814
+ var ObjectCardComponent = /** @class */ (function () {
15815
+ function ObjectCardComponent(cdr, elementRef) {
15816
+ this.cdr = cdr;
15817
+ this.elementRef = elementRef;
15818
+ this.id = "s-object-card-" + ObjectCardComponent_1.nextId++;
15819
+ this.expanded = false;
15820
+ this.expandTooltip = "Abrir painel";
15821
+ this.collapseTooltip = "Fechar painel";
15822
+ this.fieldsMinWidth = 200;
15823
+ this.expandedChange = new EventEmitter();
15824
+ this.maxVisibleFields = 0;
15825
+ this.severity = EnumSeverity.Default;
15826
+ this.EnumSeverity = EnumSeverity;
15728
15827
  }
15729
- SlidePanelComponent_1 = SlidePanelComponent;
15730
- SlidePanelComponent.prototype.onResize = function () {
15731
- this._checkOverBehavior();
15732
- };
15733
- SlidePanelComponent.prototype.ngOnInit = function () {
15734
- var _this = this;
15735
- this._checkOverBehavior();
15736
- this.slidePanelService.createSlidePanel(this.id)
15737
- .pipe(takeUntil(this._unsubscribe$))
15738
- .subscribe(function () {
15739
- _this.isOpen = false;
15740
- });
15741
- };
15742
- SlidePanelComponent.prototype.ngAfterViewInit = function () {
15828
+ ObjectCardComponent_1 = ObjectCardComponent;
15829
+ ObjectCardComponent.prototype.ngAfterViewInit = function () {
15743
15830
  var _this = this;
15744
- queueMicrotask(function () {
15745
- if (_this.createOpen) {
15746
- _this.isOpen = true;
15747
- }
15831
+ this.update();
15832
+ this.cdr.detectChanges();
15833
+ this.fields.changes.subscribe(function () {
15834
+ _this.update();
15748
15835
  });
15749
- };
15750
- SlidePanelComponent.prototype.ngAfterViewChecked = function () {
15751
- var _this = this;
15752
- // to executed at a safe time prior to control returning to the browser's event loop
15753
- queueMicrotask(function () {
15754
- _this._calculateSlideHeight();
15755
- _this._calculateSideContentWidth();
15756
- _this.isContentAnimationDisabled = false;
15836
+ var erd = elementResizeDetectorMaker({
15837
+ strategy: "scroll",
15757
15838
  });
15839
+ erd.listenTo(this.elementRef.nativeElement, function () { return _this.update(); });
15758
15840
  };
15759
- SlidePanelComponent.prototype.ngOnDestroy = function () {
15760
- this._unsubscribe$.next();
15761
- this._unsubscribe$.complete();
15762
- };
15763
- SlidePanelComponent.prototype.onClickButton = function () {
15764
- if (this.isAnimating) {
15765
- return;
15841
+ ObjectCardComponent.prototype.update = function () {
15842
+ var e_1, _a;
15843
+ var windowWidth = window.innerWidth;
15844
+ var containerWidth = this.elementRef.nativeElement.offsetWidth;
15845
+ var mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
15846
+ var fieldsMinWidth = this.fieldsMinWidth;
15847
+ var expandIconWidth = 50;
15848
+ var fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
15849
+ try {
15850
+ for (var fieldElementList_1 = __values(fieldElementList), fieldElementList_1_1 = fieldElementList_1.next(); !fieldElementList_1_1.done; fieldElementList_1_1 = fieldElementList_1.next()) {
15851
+ var element = fieldElementList_1_1.value;
15852
+ element.style.minWidth = this.fieldsMinWidth + "px";
15853
+ }
15766
15854
  }
15767
- this.isOpen = !this.isOpen;
15768
- if (this.isOpen) {
15769
- this.panelOpened.emit();
15855
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
15856
+ finally {
15857
+ try {
15858
+ if (fieldElementList_1_1 && !fieldElementList_1_1.done && (_a = fieldElementList_1.return)) _a.call(fieldElementList_1);
15859
+ }
15860
+ finally { if (e_1) throw e_1.error; }
15770
15861
  }
15771
- else {
15772
- this.panelClosed.emit();
15862
+ var maxFieldQtd;
15863
+ if (windowWidth <= Breakpoints.SM_MAX)
15864
+ maxFieldQtd = 0;
15865
+ else
15866
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
15867
+ if (maxFieldQtd && maxFieldQtd < this.fields.length) {
15868
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
15773
15869
  }
15870
+ this.maxVisibleFields = maxFieldQtd;
15871
+ if (maxFieldQtd >= this.fields.length && this.expanded)
15872
+ this.collapse();
15774
15873
  };
15775
- SlidePanelComponent.prototype.onContentAnimationStart = function () {
15776
- this.isAnimating = true;
15777
- };
15778
- SlidePanelComponent.prototype.onContentAnimationDone = function () {
15779
- this.isAnimating = false;
15780
- this._calculateSideContentWidth();
15874
+ ObjectCardComponent.prototype.toggle = function () {
15875
+ this.expanded ? this.collapse() : this.expand();
15781
15876
  };
15782
- SlidePanelComponent.prototype._checkOverBehavior = function () {
15783
- this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
15877
+ ObjectCardComponent.prototype.expand = function () {
15878
+ this.expanded = true;
15879
+ this.expandedChange.emit(this.expanded);
15784
15880
  };
15785
- SlidePanelComponent.prototype._calculateSlideHeight = function () {
15786
- this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
15881
+ ObjectCardComponent.prototype.collapse = function () {
15882
+ this.expanded = false;
15883
+ this.expandedChange.emit(this.expanded);
15787
15884
  };
15788
- SlidePanelComponent.prototype._calculateSideContentWidth = function () {
15789
- var slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
15790
- var slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
15791
- this.sideContentWidth = slidePanelWidth - slideContentWidth;
15885
+ ObjectCardComponent.prototype.getExpandedFieldWidth = function () {
15886
+ var containerWidth = this.elementRef.nativeElement.offsetWidth;
15887
+ var fieldsPerRow;
15888
+ if (containerWidth <= Breakpoints.SM_MAX)
15889
+ fieldsPerRow = 1;
15890
+ else if (containerWidth <= Breakpoints.MD_MAX)
15891
+ fieldsPerRow = 2;
15892
+ else if (containerWidth <= Breakpoints.LG_MAX)
15893
+ fieldsPerRow = 4;
15894
+ else
15895
+ fieldsPerRow = 6;
15896
+ return 12 / fieldsPerRow;
15792
15897
  };
15793
- var SlidePanelComponent_1;
15794
- SlidePanelComponent.nextId = 0;
15795
- SlidePanelComponent.ctorParameters = function () { return [
15796
- { type: SlidePanelService }
15898
+ var ObjectCardComponent_1;
15899
+ ObjectCardComponent.nextId = 0;
15900
+ ObjectCardComponent.ctorParameters = function () { return [
15901
+ { type: ChangeDetectorRef },
15902
+ { type: ElementRef }
15797
15903
  ]; };
15798
15904
  __decorate([
15799
15905
  Input()
15800
- ], SlidePanelComponent.prototype, "id", void 0);
15906
+ ], ObjectCardComponent.prototype, "id", void 0);
15801
15907
  __decorate([
15802
15908
  Input()
15803
- ], SlidePanelComponent.prototype, "openIcon", void 0);
15909
+ ], ObjectCardComponent.prototype, "expanded", void 0);
15804
15910
  __decorate([
15805
15911
  Input()
15806
- ], SlidePanelComponent.prototype, "closeIcon", void 0);
15912
+ ], ObjectCardComponent.prototype, "expandTooltip", void 0);
15807
15913
  __decorate([
15808
15914
  Input()
15809
- ], SlidePanelComponent.prototype, "cache", void 0);
15915
+ ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
15810
15916
  __decorate([
15811
15917
  Input()
15812
- ], SlidePanelComponent.prototype, "createOpen", void 0);
15813
- __decorate([
15814
- Output()
15815
- ], SlidePanelComponent.prototype, "panelOpened", void 0);
15918
+ ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
15816
15919
  __decorate([
15817
15920
  Output()
15818
- ], SlidePanelComponent.prototype, "panelClosed", void 0);
15921
+ ], ObjectCardComponent.prototype, "expandedChange", void 0);
15819
15922
  __decorate([
15820
- ViewChild("slidePanel")
15821
- ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
15923
+ ContentChild(ObjectCardMainComponent, { static: true })
15924
+ ], ObjectCardComponent.prototype, "main", void 0);
15822
15925
  __decorate([
15823
- ViewChild("slideContent")
15824
- ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
15926
+ ContentChildren(ObjectCardFieldComponent, { descendants: true })
15927
+ ], ObjectCardComponent.prototype, "fields", void 0);
15825
15928
  __decorate([
15826
- ViewChild("sideContent")
15827
- ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
15929
+ Input()
15930
+ ], ObjectCardComponent.prototype, "severity", void 0);
15828
15931
  __decorate([
15829
- HostListener("window:resize")
15830
- ], SlidePanelComponent.prototype, "onResize", null);
15831
- SlidePanelComponent = SlidePanelComponent_1 = __decorate([
15932
+ Input()
15933
+ ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
15934
+ ObjectCardComponent = ObjectCardComponent_1 = __decorate([
15832
15935
  Component({
15833
- selector: "s-slide-panel",
15834
- template: "<div #slidePanel class=\"slide-panel\">\n <div\n #slideContent\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 \n #sideContent\n class=\"side-content\"\n [ngStyle]=\"{ 'width.px': sideContentWidth }\">\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]=\"slideContentTemplate\"></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]=\"slideContentTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #slideContentTemplate>\n <ng-content select=\"[slide-content]\"></ng-content>\n</ng-template>",
15936
+ selector: "s-object-card",
15937
+ template: "<div [id]=\"id\" class=\"container\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"object-card__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div\n [id]=\"id + '-main-container'\"\n class=\"main-container\"\n [ngClass]=\"{\n 'with-hidden-fields': fields.length > maxVisibleFields,\n 'with-visible-fields': fields.length && maxVisibleFields,\n 'main-container--severity-default': severity === EnumSeverity.Default,\n 'main-container--severity-info': severity === EnumSeverity.Info,\n 'main-container--severity-warn': severity === EnumSeverity.Warn,\n 'main-container--severity-error': severity === EnumSeverity.Error,\n 'main-container--severity-success': severity == EnumSeverity.Success\n }\"\n >\n <div class=\"object-content\">\n <div class=\"s-object-card-main\"><ng-content select=\"s-object-card-main\"></ng-content></div>\n\n <div class=\"divider\" *ngIf=\"maxVisibleFields && fields.length\"></div>\n\n <div *ngFor=\"let field of (fields.toArray() | slice: 0:maxVisibleFields)\" class=\"s-object-card-field\">\n <ng-container *ngTemplateOutlet=\"field.content\"></ng-container>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expand-icon-container'\"\n class=\"expand-icon-container\"\n (click)=\"toggle()\"\n [pTooltip]=\"expanded ? collapseTooltip : expandTooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n >\n <span [id]=\"id + '-expand-icon'\" class=\"expand-icon fa\" [ngClass]=\"{ 'fa-minus': expanded, 'fa-plus': !expanded }\"></span>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expandable-container'\"\n [@expandableContent]=\"expanded\"\n class=\"expandable-container\"\n [ngClass]=\"{\n 'expandable-container--severity-default':\n severity === EnumSeverity.Default,\n 'expandable-container--severity-info': severity === EnumSeverity.Info,\n 'expandable-container--severity-warn': severity === EnumSeverity.Warn,\n 'expandable-container--severity-error': severity === EnumSeverity.Error,\n 'expandable-container--severity-success':\n severity == EnumSeverity.Success\n }\"\n >\n <div class=\"ui-g ui-g-12\">\n <ng-container\n *ngFor=\"\n let field of fields.toArray()\n | slice : maxVisibleFields : fields.length\n \"\n >\n <div class=\"ui-g-{{ getExpandedFieldWidth() }}\">\n <div class=\"s-object-card-field\">\n <ng-container\n *ngTemplateOutlet=\"field.content\"\n ></ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n",
15835
15938
  animations: [
15836
- trigger("cachelessAnimation", [
15939
+ trigger("expandableContent", [
15940
+ state("*", style$7({
15941
+ height: "0",
15942
+ })),
15943
+ state("false", style$7({
15944
+ height: "0",
15945
+ })),
15946
+ state("true", style$7({
15947
+ height: "*",
15948
+ })),
15949
+ transition("* => true", animate("200ms ease-out")),
15950
+ transition("false <=> true", animate("200ms ease-out")),
15951
+ ]),
15952
+ trigger("BorderButtonAnimation", [
15837
15953
  transition(":enter", [
15838
- style$7({ width: "0" }),
15839
- animate("200ms linear", style$7({ width: "*" })),
15954
+ style$7({ transform: "scaleY(0)", opacity: 0 }),
15955
+ animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
15840
15956
  ]),
15841
15957
  transition(":leave", [
15842
- style$7({ width: "*" }),
15843
- animate("200ms linear", style$7({ width: "0" })),
15958
+ style$7({ transform: "scaleY(1)", opacity: 1 }),
15959
+ animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
15844
15960
  ]),
15845
15961
  ]),
15846
- trigger("cacheAnimation", [
15847
- state("true", style$7({ width: "*", padding: '0 16px' })),
15848
- state("false", style$7({ width: '0px', padding: '0' })),
15849
- transition("* => *", animate("200ms")),
15850
- ]),
15851
15962
  ],
15852
- styles: [".slide-panel{display:-ms-flexbox;display:flex;width:100%}.slide-panel .slide-content{display:-ms-flexbox;display:flex;position:relative}.slide-panel .slide-content .main-container{background-color:#eeebf2;display:-ms-flexbox;display:flex;border:1px solid #ccc;overflow:hidden;position:relative}.slide-panel .slide-content .main-container .content-container{overflow-y:auto;overflow-x:hidden;padding:16px}.slide-panel .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-family:\"Font Awesome 5 Pro\";font-size:16px;height:32px;-ms-flex-pack:center;justify-content:center;position:absolute;right:-32px;top:16px;width:32px;z-index:99}.slide-panel .slide-content--closed .main-container{border:none}.slide-panel .slide-content--over{position:absolute}.slide-panel .side-content{display:-ms-flexbox;display:flex;height:-webkit-max-content;height:max-content;overflow:auto;transition:width .1s linear}"]
15963
+ styles: [":host{display:block}.container{margin-bottom:20px;position:relative}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container--severity-default{border-color:#ccc;border-top:initial}.expandable-container--severity-info{transition:border-color .5s;border-color:#428bca;border-top:initial}.expandable-container--severity-warn{transition:border-color .5s;border-color:#f8931f;border-top:initial}.expandable-container--severity-error{transition:border-color .5s;border-color:#c13018;border-top:initial}.expandable-container--severity-success{transition:border-color .5s;border-color:#0c9348;border-top:initial}.main-container--severity-default{border-color:#ccc}.main-container--severity-info{transition:border-color .5s;border-color:#428bca}.main-container--severity-warn{transition:border-color .5s;border-color:#f8931f}.main-container--severity-error{transition:border-color .5s;border-color:#c13018}.main-container--severity-success{transition:border-color .5s;border-color:#0c9348}.object-card__border-button{position:absolute;top:-13px;right:15px;z-index:1}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]
15853
15964
  })
15854
- ], SlidePanelComponent);
15855
- return SlidePanelComponent;
15965
+ ], ObjectCardComponent);
15966
+ return ObjectCardComponent;
15856
15967
  }());
15857
15968
 
15858
- var SlidePanelModule = /** @class */ (function () {
15859
- function SlidePanelModule() {
15969
+ var BorderButtonComponent = /** @class */ (function () {
15970
+ function BorderButtonComponent() {
15971
+ this.severity = EnumSeverity.Default;
15972
+ this.EnumSeverity = EnumSeverity;
15973
+ this.TooltipPosition = TooltipPosition;
15860
15974
  }
15861
- SlidePanelModule = __decorate([
15975
+ __decorate([
15976
+ Input()
15977
+ ], BorderButtonComponent.prototype, "severity", void 0);
15978
+ __decorate([
15979
+ Input()
15980
+ ], BorderButtonComponent.prototype, "options", void 0);
15981
+ BorderButtonComponent = __decorate([
15982
+ Component({
15983
+ selector: "s-border-button",
15984
+ template: "<button\n class=\"border-button\"\n [ngClass]=\"{\n 'border-button--severity-default': severity === EnumSeverity.Default,\n 'border-button--severity-info': severity === EnumSeverity.Info,\n 'border-button--severity-warn': severity === EnumSeverity.Warn,\n 'border-button--severity-error': severity === EnumSeverity.Error,\n 'border-button--severity-success': severity == EnumSeverity.Success,\n 'border-button--disabled': options?.disabled\n ? options?.disabled(severity)\n : false\n }\"\n (click)=\"options?.onClick ? options?.onClick(severity) : null\"\n [sTooltip]=\"options?.tooltip ? options?.tooltip(severity) : null\"\n [tooltipPosition]=\"TooltipPosition.Left\"\n [disabled]=\"options?.disabled ? options?.disabled(severity) : false\"\n>\n <span class=\"border-button__label\">\n {{ options?.label ? options?.label(severity) : null }}\n </span>\n <span\n *ngIf=\"options?.icon ? options?.icon(severity) : false\"\n class=\"border-button__icon {{ options?.icon(severity) }}\"\n ></span>\n</button>",
15985
+ styles: [".border-button{padding:0 8px;border:1px solid;border-radius:12px;height:23px;max-width:320px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.border-button__label{font-family:Open Sans,sans-serif;font-size:12px;line-height:150%;width:100%;display:block;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-button__icon{font-size:12px;color:#333;margin-left:8px}.border-button--severity-default{border-color:#ccc;background-color:#fff}.border-button--severity-info{border-color:#428bca;background-color:#d5e8ec;transition:background-color .5s,border-color .5s}.border-button--severity-info:enabled:hover{background-color:#9ecad4;cursor:pointer}.border-button--severity-info:enabled:active{transition:none;background-color:#67acbc;border-color:#67acbc}.border-button--severity-warn{border-color:#f8931f;background-color:#fce3ba;transition:background-color .5s,border-color .5s}.border-button--severity-warn:enabled:hover{background-color:#f8bf5e;cursor:pointer}.border-button--severity-warn:enabled:active{transition:none;background-color:#f5a319;border-color:#f5a319}.border-button--severity-error{border-color:#c13018;background-color:#fcd2d2;transition:background-color .5s,border-color .5s}.border-button--severity-error:enabled:hover{background-color:#f89696;cursor:pointer}.border-button--severity-error:enabled:active{transition:none;background-color:#f45b5b;border-color:#f45b5b}.border-button--severity-success{border-color:#0c9348;background-color:#e6ffb3;transition:background-color .5s,border-color .5s}.border-button--severity-success:enabled:hover{background-color:#c8ff5c;cursor:pointer}.border-button--severity-success:enabled:active{transition:none;background-color:#ade500;border-color:#ade500}.border-button--disabled:disabled:hover{cursor:default}"]
15986
+ })
15987
+ ], BorderButtonComponent);
15988
+ return BorderButtonComponent;
15989
+ }());
15990
+
15991
+ var BorderButtonModule = /** @class */ (function () {
15992
+ function BorderButtonModule() {
15993
+ }
15994
+ BorderButtonModule = __decorate([
15862
15995
  NgModule({
15863
- imports: [CommonModule],
15864
- declarations: [SlidePanelComponent],
15865
- exports: [SlidePanelComponent],
15866
- providers: [SlidePanelService],
15996
+ imports: [CommonModule, TooltipModule],
15997
+ declarations: [BorderButtonComponent],
15998
+ exports: [BorderButtonComponent]
15867
15999
  })
15868
- ], SlidePanelModule);
15869
- return SlidePanelModule;
16000
+ ], BorderButtonModule);
16001
+ return BorderButtonModule;
15870
16002
  }());
15871
16003
 
15872
- var SplitButtonType;
15873
- (function (SplitButtonType) {
15874
- SplitButtonType["Primary"] = "primary";
15875
- SplitButtonType["Secondary"] = "secondary";
15876
- SplitButtonType["Default"] = "default";
15877
- })(SplitButtonType || (SplitButtonType = {}));
16004
+ var ObjectCardModule = /** @class */ (function () {
16005
+ function ObjectCardModule() {
16006
+ }
16007
+ ObjectCardModule = __decorate([
16008
+ NgModule({
16009
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
16010
+ declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
16011
+ exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
16012
+ })
16013
+ ], ObjectCardModule);
16014
+ return ObjectCardModule;
16015
+ }());
15878
16016
 
15879
- var SplitButtonComponent = /** @class */ (function () {
15880
- function SplitButtonComponent(eRef) {
15881
- this.eRef = eRef;
15882
- this.disabled = false;
15883
- this.type = SplitButtonType.Primary;
15884
- this.buttonClicked = new EventEmitter();
15885
- this.open = false;
16017
+ var ProductHeaderComponent = /** @class */ (function () {
16018
+ function ProductHeaderComponent() {
16019
+ this.id = "s-product-header-" + ProductHeaderComponent_1.nextId++;
16020
+ this.baseZIndex = 0;
16021
+ this.isHeaderFrame = true;
15886
16022
  }
15887
- SplitButtonComponent.prototype.onClickout = function (event) {
15888
- if (!this.eRef.nativeElement.contains(event.target)) {
15889
- this.closeDropdown();
15890
- }
15891
- };
15892
- SplitButtonComponent.prototype.onButtonClick = function () {
15893
- if (!this.disabled) {
15894
- this.buttonClicked.emit();
15895
- this.closeDropdown();
16023
+ ProductHeaderComponent_1 = ProductHeaderComponent;
16024
+ ProductHeaderComponent.prototype.ngAfterViewInit = function () {
16025
+ this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++DomHandler.zindex);
16026
+ if (this.isHeaderFrame) {
16027
+ this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
15896
16028
  }
15897
- };
15898
- SplitButtonComponent.prototype.onDropdownClick = function () {
15899
- if (!this.disabled) {
15900
- this.open = !this.open;
16029
+ else {
16030
+ this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
15901
16031
  }
15902
16032
  };
15903
- SplitButtonComponent.prototype.onOptionClick = function (option) {
15904
- option.action && option.action();
15905
- this.closeDropdown();
15906
- };
15907
- SplitButtonComponent.prototype.closeDropdown = function () {
15908
- this.open = false;
15909
- };
15910
- SplitButtonComponent.ctorParameters = function () { return [
15911
- { type: ElementRef }
15912
- ]; };
15913
- __decorate([
15914
- Input()
15915
- ], SplitButtonComponent.prototype, "disabled", void 0);
16033
+ var ProductHeaderComponent_1;
16034
+ ProductHeaderComponent.nextId = 0;
15916
16035
  __decorate([
15917
16036
  Input()
15918
- ], SplitButtonComponent.prototype, "iconClass", void 0);
16037
+ ], ProductHeaderComponent.prototype, "id", void 0);
15919
16038
  __decorate([
15920
16039
  Input()
15921
- ], SplitButtonComponent.prototype, "label", void 0);
16040
+ ], ProductHeaderComponent.prototype, "header", void 0);
15922
16041
  __decorate([
15923
16042
  Input()
15924
- ], SplitButtonComponent.prototype, "type", void 0);
16043
+ ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
15925
16044
  __decorate([
15926
16045
  Input()
15927
- ], SplitButtonComponent.prototype, "options", void 0);
15928
- __decorate([
15929
- Output()
15930
- ], SplitButtonComponent.prototype, "buttonClicked", void 0);
16046
+ ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
15931
16047
  __decorate([
15932
- HostListener("document:click", ["$event"])
15933
- ], SplitButtonComponent.prototype, "onClickout", null);
15934
- SplitButtonComponent = __decorate([
16048
+ ViewChild("headerContainer", { static: false })
16049
+ ], ProductHeaderComponent.prototype, "container", void 0);
16050
+ ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
15935
16051
  Component({
15936
- selector: "s-split-button",
15937
- template: "<div class=\"split-button\" [ngClass]=\"{\n 'split-button--primary': type == 'primary',\n 'split-button--secondary': type == 'secondary',\n 'split-button--default': type == 'default',\n 'split-button--disabled': disabled\n }\">\n <button class=\"button\" (click)=\"onButtonClick()\">\n <span class=\"button__icon\" [ngClass]=\"iconClass\"></span>\n <span class=\"button__label\">{{ label }}</span>\n </button>\n <button class=\"dropdown\" (click)=\"onDropdownClick()\">\n <span class=\"dropdown__icon\" [ngClass]=\"{\n 'far': true,\n 'fa-chevron-down': !open,\n 'fa-chevron-up': open\n }\">\n </span>\n </button>\n</div>\n\n<ul *ngIf=\"this.open\" class=\"options\">\n <li *ngFor=\"let option of options\" (click)=\"onOptionClick(option)\">\n {{ option.title }}\n </li>\n</ul>",
15938
- styles: [".split-button{display:-ms-flexbox;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}.split-button .button{-ms-flex-align:center;align-items:center;border:none;border-radius:4px 0 0 4px;display:-ms-flexbox;display:flex;padding:8px 8px 8px 12px;transition:.3s ease-in-out}.split-button .button__icon{font-size:16px;padding:0 4px}.split-button .button__title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:21px}.split-button .dropdown{-ms-flex-align:center;align-items:center;border:none;border-left:1px solid #608190;border-radius:0 4px 4px 0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:12px 8px;transition:.3s ease-in-out}.split-button--disabled{opacity:.5}.split-button--primary .button,.split-button--primary .dropdown{background-color:#428bca;color:#fff}.split-button--primary:not(.split-button--primary--disabled) .button,.split-button--primary:not(.split-button--primary--disabled) .dropdown{cursor:pointer}.split-button--primary:not(.split-button--primary--disabled) .button:hover,.split-button--primary:not(.split-button--primary--disabled) .dropdown:hover{background-color:#063951}.split-button--secondary .button,.split-button--secondary .dropdown{background-color:#7892a1;color:#fff}.split-button--secondary:not(.split-button--secondary--disabled) .button,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown{cursor:pointer}.split-button--secondary:not(.split-button--secondary--disabled) .button:hover,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown:hover{background-color:#697882}.split-button--default .button,.split-button--default .dropdown{background-color:unset;border:1px solid #d8d8d8;color:#333}.split-button--default:not(.split-button--default--disabled) .button,.split-button--default:not(.split-button--default--disabled) .dropdown{cursor:pointer}.split-button--default:not(.split-button--default--disabled) .button:hover,.split-button--default:not(.split-button--default--disabled) .dropdown:hover{background-color:#d8d8d8}.options{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);display:inline-block;list-style:none;margin:2px 0;padding:8px 0;position:absolute;-webkit-user-select:none;-ms-user-select:none;user-select:none}.options li{color:#333;cursor:pointer;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:14px;line-height:21px;padding:8px 16px}.options li:hover{background-color:#d8d8d8}"]
15939
- })
15940
- ], SplitButtonComponent);
15941
- return SplitButtonComponent;
15942
- }());
15943
-
15944
- var SplitButtonModule = /** @class */ (function () {
15945
- function SplitButtonModule() {
15946
- }
15947
- SplitButtonModule = __decorate([
15948
- NgModule({
15949
- imports: [CommonModule],
15950
- declarations: [SplitButtonComponent],
15951
- exports: [SplitButtonComponent],
16052
+ selector: "s-product-header",
16053
+ template: "<div [id]=\"id\" class=\"box\">\n <div\n #headerContainer\n class=\"sds-container\"\n [class]=\"isHeaderFrame ? 'header-frame' : 'primary-header'\"\n >\n <h1 [class]=\"isHeaderFrame ? 'title' : 'primary-title'\">{{ header }}</h1>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n",
16054
+ styles: [".box{position:relative;width:100%;height:70px}.header-frame{padding-top:15px;padding-bottom:15px;width:100%;top:0;left:0;height:70px;background-color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;position:fixed}.title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{display:-ms-flexbox;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.primary-header{display:-ms-flexbox;display:flex;width:100%;height:70px;padding:15px 20px;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-bottom:1px solid #ddd;background-color:#fff;gap:24px}@media (max-width:768px){.primary-header{width:100%}}.primary-header .primary-title{color:#999;font-weight:400;font-size:16pt;margin-right:15px;min-width:140px;overflow:hidden;text-overflow:ellipsis}"]
15952
16055
  })
15953
- ], SplitButtonModule);
15954
- return SplitButtonModule;
16056
+ ], ProductHeaderComponent);
16057
+ return ProductHeaderComponent;
15955
16058
  }());
15956
-
15957
- var StatsCardComponent = /** @class */ (function () {
15958
- function StatsCardComponent() {
15959
- this.id = "s-stats-card-" + StatsCardComponent_1.nextId++;
15960
- this.alwaysWithBorder = false;
15961
- this.lightVersion = false;
15962
- this.lightMode = true;
15963
- this.iconClass = "fa fa-bar-chart";
15964
- this.color = "#339966";
15965
- this.animateNumbers = true;
15966
- this.clickable = false;
15967
- this.tooltip = "";
15968
- this.onClick = new EventEmitter();
15969
- this.ANIMATION_DURATION_MS = 200;
15970
- this.STEP_DURATION_MS = 20;
15971
- this.previousValue = "0";
15972
- this._value = "0";
15973
- }
15974
- StatsCardComponent_1 = StatsCardComponent;
15975
- Object.defineProperty(StatsCardComponent.prototype, "value", {
15976
- get: function () {
15977
- return this._value;
15978
- },
15979
- set: function (value) {
15980
- this.previousValue = this._value;
15981
- this._value = String(value);
15982
- if (this.animateNumbers)
15983
- this.updateDisplayValue();
15984
- else
15985
- this.displayValue = this.value;
15986
- },
15987
- enumerable: true,
15988
- configurable: true
15989
- });
15990
- StatsCardComponent.prototype.updateDisplayValue = function () {
15991
- var _this = this;
15992
- var animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
15993
- var stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
15994
- var animationCount = animationDuration.dividedBy(stepDuration);
15995
- var previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
15996
- var rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
15997
- var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
15998
- var incremental = previousRawValue.isLessThan(rawValue);
15999
- clearInterval(this.intervalId);
16000
- this.displayValue = this.replaceNumericPositions(this.value);
16001
- var counter = previousRawValue;
16002
- this.intervalId = setInterval(function () {
16003
- if (incremental && counter.isLessThan(rawValue)) {
16004
- _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16005
- counter = counter.plus(incrementValue);
16006
- }
16007
- else if (!incremental && counter.isGreaterThan(rawValue)) {
16008
- _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16009
- counter = counter.minus(incrementValue);
16010
- }
16011
- else {
16012
- _this.displayValue = _this.value;
16013
- clearInterval(_this.intervalId);
16014
- }
16015
- }, this.STEP_DURATION_MS);
16016
- };
16017
- StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
16018
- var rawValue = value.replace(/[^\d]/g, "");
16019
- var newValueString = newValue ? newValue.toString() : "";
16020
- var formattedNewValue = newValueString
16021
- .toString()
16022
- .replace(/\D/g, "")
16023
- .padStart(rawValue.length, "0");
16024
- var newValueIndex = 0;
16025
- return value
16026
- .split("")
16027
- .map(function (char) {
16028
- var number = Number(char);
16029
- if (number || char === "0")
16030
- return formattedNewValue[newValueIndex++];
16031
- return char;
16059
+
16060
+ var ProductHeaderModule = /** @class */ (function () {
16061
+ function ProductHeaderModule() {
16062
+ }
16063
+ ProductHeaderModule = __decorate([
16064
+ NgModule({
16065
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
16066
+ declarations: [ProductHeaderComponent],
16067
+ exports: [ProductHeaderComponent, ThumbnailModule],
16032
16068
  })
16033
- .join("");
16069
+ ], ProductHeaderModule);
16070
+ return ProductHeaderModule;
16071
+ }());
16072
+
16073
+ var ProgressBarColors;
16074
+ (function (ProgressBarColors) {
16075
+ ProgressBarColors["Blue"] = "blue";
16076
+ ProgressBarColors["Green"] = "green";
16077
+ ProgressBarColors["Red"] = "red";
16078
+ ProgressBarColors["Yellow"] = "yellow";
16079
+ })(ProgressBarColors || (ProgressBarColors = {}));
16080
+
16081
+ var ProgressBarMode;
16082
+ (function (ProgressBarMode) {
16083
+ ProgressBarMode["Determinate"] = "determinate";
16084
+ ProgressBarMode["Indeterminate"] = "indeterminate";
16085
+ })(ProgressBarMode || (ProgressBarMode = {}));
16086
+
16087
+ var ProgressBarComponent = /** @class */ (function () {
16088
+ function ProgressBarComponent() {
16089
+ this.numberFormatOptions = {
16090
+ style: "decimal",
16091
+ minimumFractionDigits: 0,
16092
+ maximumFractionDigits: 2,
16093
+ };
16094
+ this.showValue = true;
16095
+ this.mode = ProgressBarMode.Determinate;
16096
+ }
16097
+ ProgressBarComponent.prototype.ngOnInit = function () {
16098
+ this.validateInputs();
16099
+ };
16100
+ ProgressBarComponent.prototype.validateInputs = function () {
16101
+ if (this.value < 0 || this.value > 100) {
16102
+ throw new Error("Invalid value for value");
16103
+ }
16104
+ if (this.targetValue < 0 || this.targetValue > 100) {
16105
+ throw new Error("Invalid value for targetValue");
16106
+ }
16107
+ if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
16108
+ throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
16109
+ }
16034
16110
  };
16035
- var StatsCardComponent_1;
16036
- StatsCardComponent.nextId = 0;
16037
16111
  __decorate([
16038
16112
  Input()
16039
- ], StatsCardComponent.prototype, "id", void 0);
16113
+ ], ProgressBarComponent.prototype, "value", void 0);
16040
16114
  __decorate([
16041
16115
  Input()
16042
- ], StatsCardComponent.prototype, "label", void 0);
16116
+ ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
16043
16117
  __decorate([
16044
16118
  Input()
16045
- ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
16119
+ ], ProgressBarComponent.prototype, "targetValue", void 0);
16046
16120
  __decorate([
16047
16121
  Input()
16048
- ], StatsCardComponent.prototype, "lightVersion", void 0);
16122
+ ], ProgressBarComponent.prototype, "label", void 0);
16049
16123
  __decorate([
16050
16124
  Input()
16051
- ], StatsCardComponent.prototype, "lightMode", void 0);
16125
+ ], ProgressBarComponent.prototype, "targetLabel", void 0);
16052
16126
  __decorate([
16053
16127
  Input()
16054
- ], StatsCardComponent.prototype, "iconClass", void 0);
16128
+ ], ProgressBarComponent.prototype, "activeColor", void 0);
16055
16129
  __decorate([
16056
16130
  Input()
16057
- ], StatsCardComponent.prototype, "color", void 0);
16131
+ ], ProgressBarComponent.prototype, "showValue", void 0);
16058
16132
  __decorate([
16059
16133
  Input()
16060
- ], StatsCardComponent.prototype, "animateNumbers", void 0);
16134
+ ], ProgressBarComponent.prototype, "mode", void 0);
16135
+ ProgressBarComponent = __decorate([
16136
+ Component({
16137
+ selector: "s-progressbar",
16138
+ template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
16139
+ styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
16140
+ })
16141
+ ], ProgressBarComponent);
16142
+ return ProgressBarComponent;
16143
+ }());
16144
+
16145
+ var ProgressBarDeterminateComponent = /** @class */ (function () {
16146
+ function ProgressBarDeterminateComponent(localeService) {
16147
+ this.localeService = localeService;
16148
+ this.showValue = true;
16149
+ }
16150
+ ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
16151
+ this.validateValues();
16152
+ this.onGetLocale();
16153
+ };
16154
+ ProgressBarDeterminateComponent.prototype.onGetLocale = function () {
16155
+ var _this = this;
16156
+ this.localeService.getLocale().subscribe({
16157
+ next: function (locale) {
16158
+ _this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", _this.numberFormatOptions);
16159
+ },
16160
+ error: function () {
16161
+ _this.numberFormat = new Intl.NumberFormat("pt-BR", _this.numberFormatOptions);
16162
+ },
16163
+ });
16164
+ };
16165
+ ProgressBarDeterminateComponent.prototype.validateValues = function () {
16166
+ if (this.value < 0 || this.value > 100) {
16167
+ throw new Error("Invalid value for value");
16168
+ }
16169
+ if (this.targetValue < 0 || this.targetValue > 100) {
16170
+ throw new Error("Invalid value for targetValue");
16171
+ }
16172
+ };
16173
+ ProgressBarDeterminateComponent.ctorParameters = function () { return [
16174
+ { type: LocaleService }
16175
+ ]; };
16061
16176
  __decorate([
16062
16177
  Input()
16063
- ], StatsCardComponent.prototype, "clickable", void 0);
16178
+ ], ProgressBarDeterminateComponent.prototype, "value", void 0);
16064
16179
  __decorate([
16065
16180
  Input()
16066
- ], StatsCardComponent.prototype, "value", null);
16181
+ ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
16067
16182
  __decorate([
16068
16183
  Input()
16069
- ], StatsCardComponent.prototype, "tooltip", void 0);
16184
+ ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
16070
16185
  __decorate([
16071
- Output()
16072
- ], StatsCardComponent.prototype, "onClick", void 0);
16073
- StatsCardComponent = StatsCardComponent_1 = __decorate([
16186
+ Input()
16187
+ ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
16188
+ __decorate([
16189
+ Input()
16190
+ ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
16191
+ __decorate([
16192
+ Input()
16193
+ ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
16194
+ ProgressBarDeterminateComponent = __decorate([
16074
16195
  Component({
16075
- selector: "s-stats-card",
16076
- template: "<div\n [id]=\"id\"\n class=\"s-stats-card\"\n [ngClass]=\"{\n 's-stats-card--always-border': alwaysWithBorder,\n 's-stats-card--light': lightMode,\n 's-stats-card--color': !lightMode,\n 's-stats-card--light-version': lightVersion,\n 's-stats-card--clickable': clickable\n }\"\n (click)=\"clickable && onClick.next($event)\">\n\n <div\n [id]=\"id + '-background'\"\n class=\"s-stats-card-background\"\n [ngStyle]=\"{ 'background-color': !lightMode && color || '' }\">\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"s-stats-card-overlay\">\n </div>\n\n <div\n [id]=\"id + '-info-container'\"\n class=\"s-stats-card-info-container\">\n <div class=\"s-stats-card-info-inner-container\">\n <div\n [id]=\"id + '-icon-container'\"\n class=\"s-stats-card-icon-container\"\n [ngStyle]=\"{ 'background-color': lightMode && color || '' }\">\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n [ngClass]=\"{ 's-stats-card-icon': true }\"\n [ngStyle]=\"{'color': !lightMode && color || ''}\"\n aria-hidden=\"true\"></span>\n </div>\n\n <div\n [id]=\"id + '-text-container'\"\n class=\"s-stats-card-text-container\">\n <h4\n [id]=\"id + '-label'\"\n class=\"s-stats-card-label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ label }}\n </h4>\n <span\n [id]=\"id + '-value'\"\n class=\"s-stats-card-value\"\n [pTooltip]=\"displayValue\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ displayValue }}\n </span>\n </div>\n </div>\n <div class=\"s-stats-card-content-inner-container\">\n <div #content class=\"s-stats-card-content-container\">\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"content.children.length\"\n class=\"s-stats-card-content-separator\">\n </div>\n </div>\n <span\n *ngIf=\"tooltip\"\n class=\"s-status-card-tooltip\"\n [pTooltip]=\"tooltip\"\n tooltipPosition=\"right\">\n <i class=\"fa fa-info-circle s-status-card-tooltip-icon\"></i>\n </span>\n </div>\n</div>\n",
16077
- encapsulation: ViewEncapsulation.None,
16078
- styles: ["s-stats-card{display:block;height:auto;position:relative}s-stats-card .s-stats-card{border:1px solid transparent;min-width:120px;overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-background,s-stats-card .s-stats-card .s-stats-card-overlay{height:calc(100% - 2px);left:1px;position:absolute;top:1px;width:calc(100% - 2px)}s-stats-card .s-stats-card .s-stats-card-background{background-color:#fff}s-stats-card .s-stats-card .s-stats-card-overlay{background-color:#000;opacity:0;transition:opacity .2s ease-out}s-stats-card .s-stats-card .s-stats-card-info-container{overflow:auto;padding:15px;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container{overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{float:left;font-size:24px;height:50px;line-height:50px;text-align:center;transition:width .2s ease-out;width:50px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{-ms-flex-align:start;align-items:flex-start;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;float:left;height:50px;-ms-flex-pack:center;justify-content:center;max-width:calc(100% - 65px);padding-left:15px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label{font-weight:400;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{display:inline-block;font-size:20px;font-weight:700;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-separator{border-top:1px solid #ccc;margin:15px 0;-ms-flex-order:1;order:1}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-container{-ms-flex-order:2;order:2}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip{font-size:1rem;line-height:0;margin:.3rem;position:absolute;right:0;top:0}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip .s-status-card-tooltip-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--color .s-stats-card-icon-container{background-color:#fff}s-stats-card .s-stats-card.s-stats-card--light *{color:#333}s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--light * .s-status-card-tooltip .s-status-card-tooltip-icon,s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-label{color:#999}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card.s-stats-card--clickable{cursor:pointer}s-stats-card .s-stats-card:hover .s-stats-card-overlay{opacity:.2}s-stats-card .s-stats-card.s-stats-card--light:hover .s-stats-card-overlay{opacity:.08}s-stats-card .s-stats-card.s-stats-card--light{border-color:#ccc}.s-sidebar-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),.ui-dialog-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),p-panel .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border){border-color:transparent}@media (max-width:767px){s-stats-card .s-stats-card{height:auto}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:visible;white-space:normal;word-break:break-all}}"]
16196
+ selector: "s-progressbar-determinate",
16197
+ template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
16198
+ styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
16079
16199
  })
16080
- ], StatsCardComponent);
16081
- return StatsCardComponent;
16200
+ ], ProgressBarDeterminateComponent);
16201
+ return ProgressBarDeterminateComponent;
16082
16202
  }());
16083
16203
 
16084
- var StatsCardModule = /** @class */ (function () {
16085
- function StatsCardModule() {
16204
+ var ProgressBarIndeterminateComponent = /** @class */ (function () {
16205
+ function ProgressBarIndeterminateComponent() {
16086
16206
  }
16087
- StatsCardModule = __decorate([
16207
+ __decorate([
16208
+ Input()
16209
+ ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
16210
+ __decorate([
16211
+ Input()
16212
+ ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
16213
+ ProgressBarIndeterminateComponent = __decorate([
16214
+ Component({
16215
+ selector: "s-progressbar-indeterminate",
16216
+ template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
16217
+ styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
16218
+ })
16219
+ ], ProgressBarIndeterminateComponent);
16220
+ return ProgressBarIndeterminateComponent;
16221
+ }());
16222
+
16223
+ var ProgressBarModule = /** @class */ (function () {
16224
+ function ProgressBarModule() {
16225
+ }
16226
+ ProgressBarModule = __decorate([
16088
16227
  NgModule({
16089
- imports: [
16090
- CommonModule,
16091
- TooltipModule$1,
16092
- ],
16228
+ imports: [CommonModule],
16093
16229
  declarations: [
16094
- StatsCardComponent,
16095
- ],
16096
- exports: [
16097
- StatsCardComponent,
16230
+ ProgressBarComponent,
16231
+ ProgressBarDeterminateComponent,
16232
+ ProgressBarIndeterminateComponent,
16098
16233
  ],
16234
+ exports: [ProgressBarComponent],
16099
16235
  })
16100
- ], StatsCardModule);
16101
- return StatsCardModule;
16236
+ ], ProgressBarModule);
16237
+ return ProgressBarModule;
16102
16238
  }());
16103
16239
 
16104
- var StepState;
16105
- (function (StepState) {
16106
- StepState["Default"] = "default";
16107
- StepState["Success"] = "success";
16108
- StepState["Warning"] = "warning";
16109
- })(StepState || (StepState = {}));
16110
- var StepsComponent = /** @class */ (function () {
16111
- function StepsComponent() {
16112
- this.id = "s-steps-" + StepsComponent_1.nextId++;
16113
- this.activeIndex = 0;
16114
- this.stepSelected = new EventEmitter();
16240
+ var PanelComponent = /** @class */ (function () {
16241
+ function PanelComponent() {
16242
+ this.toggleable = true;
16243
+ this.collapsed = false;
16244
+ this.severity = EnumSeverity.Default;
16245
+ this.collapsedChange = new EventEmitter();
16246
+ this.EnumSeverity = EnumSeverity;
16115
16247
  }
16116
- StepsComponent_1 = StepsComponent;
16117
- StepsComponent.prototype.stepClick = function (step, index, event) {
16118
- if (step.disabled || index == this.activeIndex)
16119
- return;
16120
- this.stepSelected.emit({ step: step, index: index, event: event });
16121
- };
16122
- Object.defineProperty(StepsComponent.prototype, "stepState", {
16123
- get: function () {
16124
- return StepState;
16125
- },
16126
- enumerable: true,
16127
- configurable: true
16128
- });
16129
- StepsComponent.prototype.barAnimation = function (index, activeIndex) {
16130
- var visited = index < activeIndex;
16131
- var activated = index === activeIndex;
16132
- return visited || activated;
16133
- };
16134
- StepsComponent.prototype.afterBarAnimation = function (index, activeIndex) {
16135
- var visited = index < activeIndex;
16136
- var activated = index === activeIndex - 1;
16137
- return visited || activated;
16248
+ PanelComponent.prototype.onCollapsedChange = function (collapsed) {
16249
+ this.collapsed = collapsed;
16250
+ this.collapsedChange.emit(this.collapsed);
16138
16251
  };
16139
- Object.defineProperty(StepsComponent.prototype, "visibledStep", {
16140
- get: function () {
16141
- return this.steps.filter(function (step) { return !step.hidden; });
16142
- },
16143
- enumerable: true,
16144
- configurable: true
16145
- });
16146
- var StepsComponent_1;
16147
- StepsComponent.nextId = 0;
16148
16252
  __decorate([
16149
16253
  Input()
16150
- ], StepsComponent.prototype, "id", void 0);
16254
+ ], PanelComponent.prototype, "header", void 0);
16151
16255
  __decorate([
16152
16256
  Input()
16153
- ], StepsComponent.prototype, "steps", void 0);
16257
+ ], PanelComponent.prototype, "toggleable", void 0);
16154
16258
  __decorate([
16155
16259
  Input()
16156
- ], StepsComponent.prototype, "activeIndex", void 0);
16260
+ ], PanelComponent.prototype, "collapsed", void 0);
16261
+ __decorate([
16262
+ Input()
16263
+ ], PanelComponent.prototype, "severity", void 0);
16264
+ __decorate([
16265
+ Input()
16266
+ ], PanelComponent.prototype, "borderButtonOptions", void 0);
16157
16267
  __decorate([
16158
16268
  Output()
16159
- ], StepsComponent.prototype, "stepSelected", void 0);
16160
- StepsComponent = StepsComponent_1 = __decorate([
16269
+ ], PanelComponent.prototype, "collapsedChange", void 0);
16270
+ PanelComponent = __decorate([
16161
16271
  Component({
16162
- selector: "s-steps",
16163
- template: "<div [id]=\"id\" class=\"s-steps-container\">\n <ng-container *ngFor=\"let step of visibledStep; let i = index; let isFirst = first; let isLast = last\">\n <div *ngIf=\"!isFirst\" class=\"s-step-progress-bar\"\n [@activeDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div [id]=\"id + '-step-' + (step.id || i)\" class=\"s-step-header\" (click)=\"stepClick(step, i, $event)\" role=\"tab\"\n tabindex=\"0\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-controls]=\"step.ariaControls\"\n [attr.aria-labelledby]=\"!step.ariaLabel ? 'step-label-' + i : null\" [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"visibledStep.length\" [attr.aria-selected]=\"activeIndex == i\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex),\n 's-step-previous': (i === activeIndex - 1)\n }\">\n <div *ngIf=\"!isFirst\"\n [@beforeActiveDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-before\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div *ngIf=\"!isLast\"\n [@afterActiveDesative]=\"afterBarAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-after\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': visibledStep[i + 1].disabled,\n 's-step-visited': ((i + 1) < activeIndex),\n 's-step-active': (i === (activeIndex - 1))\n }\"></div>\n <div\n class=\"s-step-index\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\"\n [pTooltip]=\"step.tooltip\"\n tooltipPosition=\"top\">\n <div class=\"s-step-index-content\">\n <span\n *ngIf=\"step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)\"\n class=\"fas fa-check\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state == stepState.Warning\"\n class=\"fas fa-exclamation-triangle\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state != stepState.Success && step.state != stepState.Warning && activeIndex <= i\">\n {{i + 1}}\n </span>\n </div>\n </div>\n <div\n [id]=\"'step-label-' + i\"\n class=\"s-step-label\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\n <span>\n {{step.label}}\n </span>\n </div>\n </div>\n </ng-container>\n</div>\n",
16164
- host: {
16165
- "aria-orientation": "horizontal",
16166
- role: "tablist",
16167
- "tab-index": "0",
16168
- },
16272
+ selector: "s-panel",
16273
+ template: "<p-panel\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n [ngClass]=\"{\n 'panel--severity-default': severity === EnumSeverity.Default,\n 'panel--severity-info': severity === EnumSeverity.Info,\n 'panel--severity-warn': severity === EnumSeverity.Warn,\n 'panel--severity-error': severity === EnumSeverity.Error,\n 'panel--severity-success': severity == EnumSeverity.Success\n }\"\n (collapsedChange)=\"onCollapsedChange($event)\"\n>\n <p-header>\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"panel__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n <span>\n {{ header }}\n </span>\n </p-header>\n\n <ng-content></ng-content>\n</p-panel>",
16169
16274
  animations: [
16170
- trigger("beforeActiveDesative", [
16171
- state("active", style$7({
16172
- "background-position": "left bottom",
16173
- })),
16174
- state("desactive", style$7({
16175
- "background-position": "right bottom",
16176
- })),
16177
- transition("active => desactive", [animate("50ms 100ms linear")]),
16178
- transition("desactive => active", [animate("50ms 250ms linear")]),
16179
- ]),
16180
- trigger("activeDesative", [
16181
- state("active", style$7({
16182
- "background-position": "left bottom",
16183
- })),
16184
- state("desactive", style$7({
16185
- "background-position": "right bottom",
16186
- })),
16187
- transition("active => desactive", [animate("100ms 150ms linear")]),
16188
- transition("desactive => active", [animate("100ms 150ms linear")]),
16189
- ]),
16190
- trigger("afterActiveDesative", [
16191
- state("active", style$7({
16192
- "background-position": "left bottom",
16193
- })),
16194
- state("desactive", style$7({
16195
- "background-position": "right bottom",
16196
- })),
16197
- transition("active => desactive", [animate("50ms 250ms linear")]),
16198
- transition("desactive => active", [animate("50ms 100ms linear")]),
16275
+ trigger("BorderButtonAnimation", [
16276
+ transition(":enter", [
16277
+ style$7({ transform: "scaleY(0)", opacity: 0 }),
16278
+ animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
16279
+ ]),
16280
+ transition(":leave", [
16281
+ style$7({ transform: "scaleY(1)", opacity: 1 }),
16282
+ animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
16283
+ ]),
16199
16284
  ]),
16200
16285
  ],
16201
- styles: ["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]
16286
+ styles: [":host{display:block}:host ::ng-deep .ui-panel{position:relative}:host ::ng-deep .panel--severity-default .ui-panel{border-color:#ccc}:host ::ng-deep .panel--severity-info .ui-panel{border-color:#428bca;transition:border-color .5s}:host ::ng-deep .panel--severity-warn .ui-panel{border-color:#f8931f;transition:border-color .5s}:host ::ng-deep .panel--severity-error .ui-panel{border-color:#c13018;transition:border-color .5s}:host ::ng-deep .panel--severity-success .ui-panel{border-color:#0c9348;transition:border-color .5s}.panel__border-button{position:absolute;top:-13px;right:15px;z-index:1}"]
16202
16287
  })
16203
- ], StepsComponent);
16204
- return StepsComponent;
16288
+ ], PanelComponent);
16289
+ return PanelComponent;
16205
16290
  }());
16206
16291
 
16207
- var StepsModule = /** @class */ (function () {
16208
- function StepsModule() {
16292
+ var PanelModule = /** @class */ (function () {
16293
+ function PanelModule() {
16209
16294
  }
16210
- StepsModule = __decorate([
16295
+ PanelModule = __decorate([
16211
16296
  NgModule({
16212
- imports: [CommonModule, TooltipModule$1],
16213
- declarations: [StepsComponent],
16214
- exports: [StepsComponent],
16297
+ imports: [CommonModule, PanelModule$1, BorderButtonModule],
16298
+ declarations: [PanelComponent],
16299
+ exports: [PanelComponent],
16215
16300
  })
16216
- ], StepsModule);
16217
- return StepsModule;
16218
- }());
16219
-
16220
- var TieredMenuEventService = /** @class */ (function () {
16221
- function TieredMenuEventService() {
16222
- this.incrementCurrentItemEvent = new EventEmitter();
16223
- this.decrementCurrentItemEvent = new EventEmitter();
16224
- this.closeAllMenusEvent = new EventEmitter();
16225
- this.selectItemEvent = new EventEmitter();
16226
- this.openItemMenuEvent = new EventEmitter();
16227
- this.closeItemMenuEvent = new EventEmitter();
16228
- this.createMenuEvent = new EventEmitter();
16229
- }
16230
- TieredMenuEventService = __decorate([
16231
- Injectable()
16232
- ], TieredMenuEventService);
16233
- return TieredMenuEventService;
16301
+ ], PanelModule);
16302
+ return PanelModule;
16234
16303
  }());
16235
16304
 
16236
- var TieredMenuService = /** @class */ (function () {
16237
- function TieredMenuService() {
16238
- this.currentItems = [];
16239
- this.items = [];
16305
+ var RatingScaleComponent = /** @class */ (function () {
16306
+ function RatingScaleComponent() {
16307
+ this.disabled = false;
16240
16308
  }
16241
- TieredMenuService.prototype.normalizeData = function (items, parent) {
16242
- var _this = this;
16243
- return items.map(function (i) {
16244
- var item = __assign({ visible: true }, i);
16245
- if (item.submenu) {
16246
- item.submenu = _this.normalizeData(item.submenu, item);
16247
- }
16248
- item.id = _this._generateId();
16249
- item.parent = parent;
16250
- item.isOpen = false;
16251
- return item;
16252
- });
16253
- };
16254
- TieredMenuService.prototype.markAllItemsAsClosed = function (items) {
16255
- var _this = this;
16256
- return items.map(function (i) {
16257
- var item = __assign({}, i);
16258
- if (item.submenu) {
16259
- item.submenu = _this.markAllItemsAsClosed(item.submenu);
16260
- }
16261
- item.isOpen = false;
16262
- return item;
16263
- });
16264
- };
16265
- TieredMenuService.prototype.searchTheHierarchy = function (itemA, itemB) {
16266
- var item = itemB;
16267
- while (item) {
16268
- if (item === itemA) {
16269
- return true;
16270
- }
16271
- item = item.parent;
16309
+ RatingScaleComponent_1 = RatingScaleComponent;
16310
+ RatingScaleComponent.prototype.writeValue = function (value) {
16311
+ if (!this.disabled) {
16312
+ this.value = value;
16272
16313
  }
16273
- return false;
16274
16314
  };
16275
- TieredMenuService.prototype.cloneItems = function (items) {
16276
- return JSON.parse(JSON.stringify(items));
16315
+ RatingScaleComponent.prototype.registerOnChange = function (onChange) {
16316
+ this._onChange = onChange;
16277
16317
  };
16278
- TieredMenuService.prototype._generateId = function () {
16279
- return "id-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9);
16318
+ RatingScaleComponent.prototype.registerOnTouched = function (onTouched) {
16319
+ this._onTouched = onTouched;
16280
16320
  };
16281
- TieredMenuService = __decorate([
16282
- Injectable()
16283
- ], TieredMenuService);
16284
- return TieredMenuService;
16321
+ RatingScaleComponent.prototype.onSelect = function (rating) {
16322
+ this.value = rating;
16323
+ if (this._onChange) {
16324
+ this._onChange(this.value);
16325
+ }
16326
+ };
16327
+ var RatingScaleComponent_1;
16328
+ __decorate([
16329
+ Input()
16330
+ ], RatingScaleComponent.prototype, "nodes", void 0);
16331
+ __decorate([
16332
+ Input()
16333
+ ], RatingScaleComponent.prototype, "startLabel", void 0);
16334
+ __decorate([
16335
+ Input()
16336
+ ], RatingScaleComponent.prototype, "endLabel", void 0);
16337
+ __decorate([
16338
+ Input()
16339
+ ], RatingScaleComponent.prototype, "disabled", void 0);
16340
+ RatingScaleComponent = RatingScaleComponent_1 = __decorate([
16341
+ Component({
16342
+ selector: "s-rating-scale",
16343
+ template: "<div\n class=\"rating-scale\"\n [ngClass]=\"{ 'rating-scale--disabled': disabled }\">\n <div class=\"nodes\">\n <button\n *ngFor=\"let node of nodes; index as i\"\n class=\"node\"\n [ngClass]=\"{ 'node--selected': value?.id === node.id && !disabled }\"\n tabindex=\"0\"\n (click)=\"onSelect(node)\"> \n <span\n *ngIf=\"node.icon\"\n class=\"icon fas\"\n [ngClass]=\"node.icon\">\n </span>\n <span\n *ngIf=\"node.title\"\n class=\"label\">\n {{ node.title }}\n </span>\n </button>\n </div>\n <div class=\"labels\">\n <span>{{ startLabel }}</span>\n <span>{{ endLabel }}</span>\n </div>\n</div>",
16344
+ providers: [{
16345
+ provide: NG_VALUE_ACCESSOR,
16346
+ useExisting: forwardRef(function () { return RatingScaleComponent_1; }),
16347
+ multi: true,
16348
+ }],
16349
+ styles: [".rating-scale{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-scale .nodes{display:-ms-flexbox;display:flex}.rating-scale .nodes .node{-ms-flex-align:center;align-items:center;background-color:#fff;border-radius:6px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:center;justify-content:center;margin:0 2px;padding:8px;border:1px solid #7892a1}.rating-scale .nodes .node .icon{color:#6e7280;font-size:1rem}.rating-scale .nodes .node .label{color:#212533;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale .nodes .node .icon,.rating-scale .nodes .node .label{margin:6px}.rating-scale .nodes .node--selected{background-color:#d5e8ec;border-color:#428bca;color:#428bca}.rating-scale .nodes .node:first-child{margin-left:0}.rating-scale .nodes .node:last-child{margin-right:0}.rating-scale .labels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px 0}.rating-scale .labels span{color:#080808;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale--disabled{opacity:.5}.rating-scale:not(.rating-scale--disabled) .node{cursor:pointer}.rating-scale:not(.rating-scale--disabled) .node:hover{background-color:#dedce5}.rating-scale:not(.rating-scale--disabled) .node:focus{border-width:2px;outline:0}"]
16350
+ })
16351
+ ], RatingScaleComponent);
16352
+ return RatingScaleComponent;
16285
16353
  }());
16286
16354
 
16287
- var TieredMenuNestedComponent = /** @class */ (function () {
16288
- function TieredMenuNestedComponent(tieredMenuService, _tieredMenuEventService) {
16289
- this.tieredMenuService = tieredMenuService;
16290
- this._tieredMenuEventService = _tieredMenuEventService;
16291
- this.top = 0;
16292
- this.left = 0;
16293
- this._unsubscribe$ = new Subject();
16355
+ var RatingScaleModule = /** @class */ (function () {
16356
+ function RatingScaleModule() {
16294
16357
  }
16295
- TieredMenuNestedComponent.prototype.onResize = function () {
16296
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16297
- };
16298
- TieredMenuNestedComponent.prototype.onDocumentClick = function (event) {
16299
- // Closing menu when clicked outside.
16300
- var target = event.target;
16301
- var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
16302
- if (!clickedInside) {
16303
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16304
- }
16305
- };
16306
- TieredMenuNestedComponent.prototype.onKeydownHandler = function (event) {
16307
- switch (event.key) {
16308
- case "Escape":
16309
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16310
- break;
16311
- case " ":
16312
- case "Enter":
16313
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
16314
- break;
16315
- case "ArrowLeft":
16316
- // When nested I need a reference to the current item's parent item, otherwise just the current item.
16317
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
16318
- break;
16319
- case "ArrowRight":
16320
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
16321
- break;
16322
- case "ArrowUp":
16323
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
16324
- break;
16325
- case "ArrowDown":
16326
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
16327
- break;
16328
- }
16329
- };
16330
- TieredMenuNestedComponent.prototype.ngOnInit = function () {
16331
- this.tieredMenuService.currentItems = this.items;
16332
- this._subscribeEvents();
16333
- };
16334
- TieredMenuNestedComponent.prototype.ngOnDestroy = function () {
16335
- this._unsubscribe$.next();
16336
- this._unsubscribe$.complete();
16337
- };
16338
- TieredMenuNestedComponent.prototype._incrementCurItem = function () {
16339
- if (!this.tieredMenuService.currentItem) {
16340
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16341
- return;
16342
- }
16343
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
16344
- if (curIndex < this.tieredMenuService.currentItems.length) {
16345
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16346
- }
16347
- else {
16348
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16349
- }
16350
- if (this.tieredMenuService.currentItem.divider) {
16351
- this._incrementCurItem();
16352
- }
16353
- };
16354
- TieredMenuNestedComponent.prototype._decrementCurItem = function () {
16355
- if (!this.tieredMenuService.currentItem) {
16356
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16358
+ RatingScaleModule = __decorate([
16359
+ NgModule({
16360
+ imports: [
16361
+ CommonModule,
16362
+ ReactiveFormsModule,
16363
+ ],
16364
+ declarations: [RatingScaleComponent],
16365
+ exports: [RatingScaleComponent],
16366
+ })
16367
+ ], RatingScaleModule);
16368
+ return RatingScaleModule;
16369
+ }());
16370
+
16371
+ var SelectButtonComponent = /** @class */ (function () {
16372
+ function SelectButtonComponent() {
16373
+ this.multiple = false;
16374
+ this.itemSelected = new EventEmitter();
16375
+ this.itemClicked = new EventEmitter();
16376
+ this.disabled = false;
16377
+ this.activeItems = new Set();
16378
+ }
16379
+ SelectButtonComponent_1 = SelectButtonComponent;
16380
+ SelectButtonComponent.prototype.writeValue = function (value) {
16381
+ var _this = this;
16382
+ if (!value)
16357
16383
  return;
16358
- }
16359
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
16360
- if (curIndex >= 0) {
16361
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16384
+ this.activeItems.clear();
16385
+ if (Array.isArray(value)) {
16386
+ value.forEach(function (item) {
16387
+ _this.items.forEach(function (iItem) {
16388
+ if (_this._compareItems(item, iItem)) {
16389
+ _this.activeItems.add(iItem);
16390
+ }
16391
+ });
16392
+ });
16362
16393
  }
16363
16394
  else {
16364
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
16365
- }
16366
- if (this.tieredMenuService.currentItem.divider) {
16367
- this._decrementCurItem();
16395
+ this.items.forEach(function (iItem) {
16396
+ if (_this._compareItems(value, iItem)) {
16397
+ _this.activeItems.add(iItem);
16398
+ }
16399
+ });
16368
16400
  }
16369
16401
  };
16370
- TieredMenuNestedComponent.prototype._closeItem = function (item) {
16371
- var _a;
16372
- var itemAux = this._lastOpenItem;
16373
- while (itemAux && itemAux != item) {
16374
- itemAux.isOpen = false;
16375
- itemAux = itemAux.parent;
16376
- }
16377
- item.isOpen = false;
16378
- this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
16379
- this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
16402
+ SelectButtonComponent.prototype.registerOnChange = function (onChange) {
16403
+ this.onChange = onChange;
16380
16404
  };
16381
- TieredMenuNestedComponent.prototype._openItem = function (item) {
16382
- if (item === null || item === void 0 ? void 0 : item.submenu) {
16383
- item.isOpen = true;
16384
- this.tieredMenuService.currentItems = item.submenu;
16385
- // Only has focus if there has already been interaction.
16386
- if (this.tieredMenuService.currentItem) {
16387
- this.tieredMenuService.currentItem = item.submenu[0];
16388
- }
16389
- this._lastOpenItem = item;
16405
+ SelectButtonComponent.prototype.registerOnTouched = function (onTouched) {
16406
+ this.onTouched = onTouched;
16407
+ };
16408
+ SelectButtonComponent.prototype.setDisabledState = function (disabled) {
16409
+ this.disabled = disabled;
16410
+ };
16411
+ SelectButtonComponent.prototype.onItemSelect = function (item) {
16412
+ var _a, _b;
16413
+ if (this.disabled || item.disabled)
16414
+ return;
16415
+ this.itemClicked.emit(item);
16416
+ if (!this.multiple) {
16417
+ this.activeItems.clear();
16390
16418
  }
16419
+ this.activeItems.add(item);
16420
+ this.itemSelected.emit(__spread(this.activeItems));
16421
+ (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, __spread(this.activeItems));
16422
+ (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, __spread(this.activeItems));
16391
16423
  };
16392
- TieredMenuNestedComponent.prototype._subscribeEvents = function () {
16393
- var _this = this;
16394
- this._tieredMenuEventService.incrementCurrentItemEvent
16395
- .pipe(takeUntil(this._unsubscribe$))
16396
- .subscribe(function () {
16397
- _this._incrementCurItem();
16398
- });
16399
- this._tieredMenuEventService.decrementCurrentItemEvent
16400
- .pipe(takeUntil(this._unsubscribe$))
16401
- .subscribe(function () {
16402
- _this._decrementCurItem();
16403
- });
16404
- this._tieredMenuEventService.selectItemEvent
16405
- .pipe(takeUntil(this._unsubscribe$))
16406
- .subscribe(function (item) {
16407
- if (item.command) {
16408
- item.command();
16409
- // Close all menus after the item was selected.
16410
- _this._tieredMenuEventService.closeAllMenusEvent.emit();
16424
+ SelectButtonComponent.prototype._compareItems = function (item1, item2) {
16425
+ var _compare = function (a, b) {
16426
+ var e_1, _a;
16427
+ if (a === b) {
16428
+ return true;
16411
16429
  }
16412
- });
16413
- this._tieredMenuEventService.openItemMenuEvent
16414
- .pipe(takeUntil(this._unsubscribe$))
16415
- .subscribe(function (item) {
16416
- var _a, _b;
16417
- if (!_this.tieredMenuService.currentItems.includes(item)) {
16418
- var itemAux = _this._lastOpenItem;
16419
- while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
16420
- itemAux = itemAux.parent;
16430
+ if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
16431
+ return false;
16432
+ }
16433
+ if (Array.isArray(a) !== Array.isArray(b)) {
16434
+ return false;
16435
+ }
16436
+ var keysA = Object.keys(a);
16437
+ var keysB = Object.keys(b);
16438
+ if (keysA.length !== keysB.length) {
16439
+ return false;
16440
+ }
16441
+ try {
16442
+ for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
16443
+ var key = keysA_1_1.value;
16444
+ if (!keysB.includes(key) || !_compare(a[key], b[key])) {
16445
+ return false;
16446
+ }
16421
16447
  }
16422
- _this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
16423
16448
  }
16424
- _this._lastOpenItem = item;
16425
- _this._openItem(item);
16426
- });
16427
- this._tieredMenuEventService.closeItemMenuEvent
16428
- .pipe(takeUntil(this._unsubscribe$))
16429
- .subscribe(function (item) {
16430
- if (item) {
16431
- _this._closeItem(item);
16449
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
16450
+ finally {
16451
+ try {
16452
+ if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
16453
+ }
16454
+ finally { if (e_1) throw e_1.error; }
16432
16455
  }
16433
- });
16456
+ for (var key in a) {
16457
+ if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
16458
+ return false;
16459
+ }
16460
+ }
16461
+ return true;
16462
+ };
16463
+ return _compare(item1, item2);
16434
16464
  };
16435
- TieredMenuNestedComponent.ctorParameters = function () { return [
16436
- { type: TieredMenuService },
16437
- { type: TieredMenuEventService }
16465
+ var SelectButtonComponent_1;
16466
+ __decorate([
16467
+ Input()
16468
+ ], SelectButtonComponent.prototype, "items", void 0);
16469
+ __decorate([
16470
+ Input()
16471
+ ], SelectButtonComponent.prototype, "multiple", void 0);
16472
+ __decorate([
16473
+ Output()
16474
+ ], SelectButtonComponent.prototype, "itemSelected", void 0);
16475
+ __decorate([
16476
+ Output()
16477
+ ], SelectButtonComponent.prototype, "itemClicked", void 0);
16478
+ SelectButtonComponent = SelectButtonComponent_1 = __decorate([
16479
+ Component({
16480
+ selector: "s-select-button",
16481
+ template: "<div\n class=\"select-button\"\n [ngClass]=\"{ 'select-button--disabled': disabled }\">\n <s-select-button-item\n *ngFor=\"let item of items; index as i\"\n [label]=\"item.label\"\n [active]=\"activeItems?.has(item)\"\n [disabled]=\"disabled || item.disabled\"\n [first]=\"i === 0\"\n [last]=\"i === items.length - 1\"\n (click)=\"onItemSelect(item)\">\n </s-select-button-item>\n</div>",
16482
+ providers: [
16483
+ {
16484
+ provide: NG_VALUE_ACCESSOR,
16485
+ useExisting: forwardRef(function () { return SelectButtonComponent_1; }),
16486
+ multi: true,
16487
+ },
16488
+ ],
16489
+ styles: [".select-button{overflow:hidden}"]
16490
+ })
16491
+ ], SelectButtonComponent);
16492
+ return SelectButtonComponent;
16493
+ }());
16494
+
16495
+ var SelectButtonItemComponent = /** @class */ (function () {
16496
+ function SelectButtonItemComponent() {
16497
+ this.active = false;
16498
+ this.first = false;
16499
+ this.last = false;
16500
+ this.disabled = false;
16501
+ }
16502
+ __decorate([
16503
+ Input()
16504
+ ], SelectButtonItemComponent.prototype, "label", void 0);
16505
+ __decorate([
16506
+ Input()
16507
+ ], SelectButtonItemComponent.prototype, "active", void 0);
16508
+ __decorate([
16509
+ Input()
16510
+ ], SelectButtonItemComponent.prototype, "first", void 0);
16511
+ __decorate([
16512
+ Input()
16513
+ ], SelectButtonItemComponent.prototype, "last", void 0);
16514
+ __decorate([
16515
+ Input()
16516
+ ], SelectButtonItemComponent.prototype, "disabled", void 0);
16517
+ SelectButtonItemComponent = __decorate([
16518
+ Component({
16519
+ selector: "s-select-button-item",
16520
+ template: "<button\n class=\"select-button-item\"\n [ngClass]=\"{\n 'select-button-item--active': active,\n 'select-button-item--disabled': disabled,\n 'select-button-item--first': first,\n 'select-button-item--last': last\n }\">\n <span class=\"select-button-item__label\">{{ label }}</span>\n</button>",
16521
+ styles: [".select-button-item{padding:8px 12px;cursor:pointer;background-color:#fff;border:none;border-left:1px solid #c1c1cc;border-top:1px solid #c1c1cc;border-bottom:1px solid #c1c1cc}.select-button-item__label{font-family:\"Open Sans\" sans-serif;font-size:14px}.select-button-item:not(.select-button-item--disabled):not(.select-button-item--active):hover{background-color:#eeebf2}.select-button-item--active,.select-button-item--active:hover{background-color:#c1c1cc;font-weight:700}.select-button-item--disabled{opacity:.5;cursor:default}.select-button-item--first{border-top-left-radius:2px;border-bottom-left-radius:2px}.select-button-item--last{border-right:1px solid #c1c1cc;border-top-right-radius:2px;border-bottom-right-radius:2px}"]
16522
+ })
16523
+ ], SelectButtonItemComponent);
16524
+ return SelectButtonItemComponent;
16525
+ }());
16526
+
16527
+ var SelectButtonModule = /** @class */ (function () {
16528
+ function SelectButtonModule() {
16529
+ }
16530
+ SelectButtonModule = __decorate([
16531
+ NgModule({
16532
+ imports: [CommonModule],
16533
+ declarations: [
16534
+ SelectButtonComponent,
16535
+ SelectButtonItemComponent,
16536
+ ],
16537
+ exports: [SelectButtonComponent],
16538
+ })
16539
+ ], SelectButtonModule);
16540
+ return SelectButtonModule;
16541
+ }());
16542
+
16543
+ var SidebarComponent = /** @class */ (function () {
16544
+ function SidebarComponent(focusTrapFactory) {
16545
+ this.focusTrapFactory = focusTrapFactory;
16546
+ this.id = "s-sidebar-" + SidebarComponent_1.nextId++;
16547
+ this.visible = false;
16548
+ this.baseZIndex = 0;
16549
+ this.largeSized = false;
16550
+ this.visibleChange = new EventEmitter();
16551
+ }
16552
+ SidebarComponent_1 = SidebarComponent;
16553
+ SidebarComponent.prototype.onShow = function () {
16554
+ DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
16555
+ var focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
16556
+ focusTrap.focusInitialElementWhenReady();
16557
+ };
16558
+ SidebarComponent.prototype.onHide = function () {
16559
+ DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
16560
+ };
16561
+ SidebarComponent.prototype.close = function (event) {
16562
+ DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
16563
+ this.visibleChange.emit(false);
16564
+ event.preventDefault();
16565
+ };
16566
+ var SidebarComponent_1;
16567
+ SidebarComponent.nextId = 0;
16568
+ SidebarComponent.ctorParameters = function () { return [
16569
+ { type: FocusTrapFactory }
16438
16570
  ]; };
16439
16571
  __decorate([
16440
- HostListener("window:resize")
16441
- ], TieredMenuNestedComponent.prototype, "onResize", null);
16572
+ Input()
16573
+ ], SidebarComponent.prototype, "id", void 0);
16574
+ __decorate([
16575
+ Input()
16576
+ ], SidebarComponent.prototype, "visible", void 0);
16577
+ __decorate([
16578
+ Input()
16579
+ ], SidebarComponent.prototype, "header", void 0);
16580
+ __decorate([
16581
+ Input()
16582
+ ], SidebarComponent.prototype, "baseZIndex", void 0);
16442
16583
  __decorate([
16443
- HostListener("document:click", ["$event"])
16444
- ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
16584
+ Input()
16585
+ ], SidebarComponent.prototype, "largeSized", void 0);
16445
16586
  __decorate([
16446
- HostListener("document:keydown", ["$event"])
16447
- ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
16448
- TieredMenuNestedComponent = __decorate([
16587
+ Output()
16588
+ ], SidebarComponent.prototype, "visibleChange", void 0);
16589
+ __decorate([
16590
+ ViewChild(Sidebar, { static: true })
16591
+ ], SidebarComponent.prototype, "innerSidebar", void 0);
16592
+ __decorate([
16593
+ ContentChild(HeaderComponent, { static: true })
16594
+ ], SidebarComponent.prototype, "headerSection", void 0);
16595
+ __decorate([
16596
+ ContentChild(FooterComponent, { static: true })
16597
+ ], SidebarComponent.prototype, "footerSection", void 0);
16598
+ SidebarComponent = SidebarComponent_1 = __decorate([
16449
16599
  Component({
16450
- template: "<div\n class=\"menu menu--nested\"\n [ngStyle]=\"{\n 'top': top + 'px',\n 'left': left + 'px'\n }\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: items }\"></ng-container>\n</div>\n\n<ng-template #itemsTemplate let-items>\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [closeOnClick]=\"true\">\n </s-tiered-menu-item>\n\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n\n <div *ngIf=\"item.submenu && item.isOpen\">\n <div class=\"submenu\">\n <ng-container *ngTemplateOutlet=\"itemsTemplate; context: { $implicit: item.submenu }\"></ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n",
16451
- styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;min-width:176px;padding:4px 0;position:absolute;z-index:9999;overflow:auto;width:calc(100vw - 8px)}.menu .submenu{margin-left:24px}"]
16600
+ selector: "s-sidebar",
16601
+ template: "<p-sidebar\n [id]=\"id\"\n [visible]=\"visible\"\n (visibleChange)=\"visibleChange.emit($event)\"\n [blockScroll]=\"true\"\n [baseZIndex]=\"baseZIndex\"\n [modal]=\"true\"\n [dismissible]=\"false\"\n [showCloseIcon]=\"false\"\n position=\"right\"\n appendTo=\"body\"\n [styleClass]=\"largeSized ? 's-sidebar-panel s-sidebar-panel-lg' : 's-sidebar-panel'\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\">\n <div\n [id]=\"id + '-container'\"\n class=\"s-sidebar-container\">\n <a\n href=\"#\"\n role=\"button\"\n class=\"s-sidebar-close\"\n (click)=\"close($event)\">\n <span\n class=\"fa fa-times\"\n aria-hidden=\"true\">\n </span></a>\n <div\n *ngIf=\"header && !headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <h2 class=\"sds-panel-title s-sidebar-header__title\">{{header}}</h2>\n </div>\n <div\n *ngIf=\"headerSection\" \n [id]=\"id + '-header'\"\n class=\"s-sidebar-header\">\n <ng-content select=\"s-header\"></ng-content>\n </div>\n <p-scrollPanel\n [id]=\"id + '-content-container'\"\n class=\"s-sidebar-content-container\"\n styleClass=\"s-sidebar-content\">\n <ng-content></ng-content>\n </p-scrollPanel>\n <div\n *ngIf=\"footerSection\"\n [id]=\"id + '-footer'\"\n class=\"s-sidebar-footer\">\n <ng-content select=\"s-footer\"></ng-content>\n </div>\n </div>\n</p-sidebar>\n",
16602
+ encapsulation: ViewEncapsulation.None,
16603
+ styles: [".ui-overflow-hidden-sidebar{overflow:hidden}body .ui-sidebar.s-sidebar-panel{width:50%;padding:0}@media (max-width:767px){body .ui-sidebar.s-sidebar-panel{width:100%}}@media (min-width:768px){body .ui-sidebar.s-sidebar-panel{width:75%}}@media (min-width:992px){body .ui-sidebar.s-sidebar-panel{width:50%}body .ui-sidebar.s-sidebar-panel.s-sidebar-panel-lg{width:75%}}body .ui-sidebar.s-sidebar-panel .s-sidebar-container{height:100%;width:100%;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column}body .ui-sidebar.s-sidebar-panel .s-sidebar-close{position:absolute;right:20px;top:20px;color:#333}body .ui-sidebar.s-sidebar-panel .s-sidebar-header{border-bottom:1px solid #ccc;padding-bottom:15px;padding-right:20px;margin-bottom:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel .s-sidebar-content-container{-ms-flex:1;flex:1;overflow:hidden}body .ui-sidebar.s-sidebar-panel .s-sidebar-content{height:100%}body .ui-sidebar.s-sidebar-panel .s-sidebar-footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;-ms-flex-negative:0;flex-shrink:0}body .ui-sidebar.s-sidebar-panel p-scrollpanel{padding-top:30px}body .ui-sidebar.s-sidebar-panel .s-sidebar-header+p-scrollpanel{padding-top:0}p-scrollPanel{display:block}.s-sidebar-header__title{font-weight:400}"]
16452
16604
  })
16453
- ], TieredMenuNestedComponent);
16454
- return TieredMenuNestedComponent;
16605
+ ], SidebarComponent);
16606
+ return SidebarComponent;
16455
16607
  }());
16456
16608
 
16457
- var TieredMenuComponent = /** @class */ (function () {
16458
- function TieredMenuComponent(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
16459
- this._appRef = _appRef;
16460
- this._componentFactoryResolver = _componentFactoryResolver;
16461
- this._injector = _injector;
16462
- this._changeDetectorRef = _changeDetectorRef;
16463
- this.tieredMenuService = tieredMenuService;
16464
- this._tieredMenuEventService = _tieredMenuEventService;
16465
- this.top = 0;
16466
- this.left = 0;
16467
- this.menuTriggerEvent = "hover";
16468
- this._componentRef = null;
16469
- this._unsubscribe$ = new Subject();
16470
- this.destroyRequest = new EventEmitter();
16609
+ var SidebarModule = /** @class */ (function () {
16610
+ function SidebarModule() {
16471
16611
  }
16472
- TieredMenuComponent_1 = TieredMenuComponent;
16473
- TieredMenuComponent.prototype.onResize = function () {
16474
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16475
- };
16476
- TieredMenuComponent.prototype.onDocumentClick = function (event) {
16477
- // Closing menu when clicked outside.
16478
- var target = event.target;
16479
- var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
16480
- if (!clickedInside) {
16481
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16482
- }
16483
- };
16484
- TieredMenuComponent.prototype.onKeydownHandler = function (event) {
16485
- switch (event.key) {
16486
- case "Escape":
16487
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16488
- break;
16489
- case " ":
16490
- case "Enter":
16491
- if (!this.tieredMenuService.currentItem.disabled) {
16492
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
16493
- }
16494
- break;
16495
- case "ArrowLeft":
16496
- if (this.items.includes(this.tieredMenuService.currentItem)) {
16497
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
16498
- this._changeDetectorRef.detectChanges();
16499
- }
16500
- break;
16501
- case "ArrowRight":
16502
- if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
16503
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
16504
- event.stopImmediatePropagation();
16505
- }
16506
- break;
16507
- case "ArrowUp":
16508
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
16509
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
16510
- event.stopImmediatePropagation();
16511
- }
16512
- break;
16513
- case "ArrowDown":
16514
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
16515
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
16516
- event.stopImmediatePropagation();
16517
- }
16518
- break;
16519
- }
16520
- };
16521
- TieredMenuComponent.prototype.ngOnInit = function () {
16522
- this.tieredMenuService.currentItems = this.items;
16523
- this._subscribeEvents();
16612
+ SidebarModule = __decorate([
16613
+ NgModule({
16614
+ imports: [CommonModule, A11yModule, SidebarModule$1, ScrollPanelModule, StructureModule],
16615
+ declarations: [SidebarComponent],
16616
+ exports: [StructureModule, SidebarComponent],
16617
+ })
16618
+ ], SidebarModule);
16619
+ return SidebarModule;
16620
+ }());
16621
+
16622
+ var SlidePanelService = /** @class */ (function () {
16623
+ function SlidePanelService() {
16624
+ this.modalCloseMap = new Map();
16625
+ }
16626
+ SlidePanelService.prototype.createSlidePanel = function (id) {
16627
+ var panelSubject = new Subject();
16628
+ this.modalCloseMap.set(id, panelSubject);
16629
+ return panelSubject.asObservable();
16524
16630
  };
16525
- TieredMenuComponent.prototype.ngOnDestroy = function () {
16526
- this._unsubscribe$.next();
16527
- this._unsubscribe$.complete();
16631
+ SlidePanelService.prototype.getModalCloseObservable = function (id) {
16632
+ return this.modalCloseMap.get(id).asObservable();
16528
16633
  };
16529
- TieredMenuComponent.prototype._incrementCurItem = function () {
16530
- if (!this.tieredMenuService.currentItem) {
16531
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16532
- return;
16533
- }
16534
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
16535
- // Checking if it is the current menu.
16536
- return;
16537
- }
16538
- var currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
16539
- if (currentIndex < this.tieredMenuService.currentItems.length) {
16540
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
16541
- }
16542
- else {
16543
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16544
- }
16545
- if (this.tieredMenuService.currentItem.divider) {
16546
- this._incrementCurItem();
16634
+ SlidePanelService.prototype.closeModal = function (id) {
16635
+ var subject = this.modalCloseMap.get(id);
16636
+ if (subject) {
16637
+ subject.next();
16547
16638
  }
16548
16639
  };
16549
- TieredMenuComponent.prototype._decrementCurItem = function () {
16550
- if (!this.tieredMenuService.currentItem) {
16551
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16552
- return;
16553
- // Checking if it is the current menu.
16554
- }
16555
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
16556
- return;
16557
- }
16558
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
16559
- if (curIndex >= 0) {
16560
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16561
- }
16562
- else {
16563
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
16564
- }
16565
- if (this.tieredMenuService.currentItem.divider) {
16566
- this._decrementCurItem();
16567
- }
16640
+ SlidePanelService = __decorate([
16641
+ Injectable()
16642
+ ], SlidePanelService);
16643
+ return SlidePanelService;
16644
+ }());
16645
+
16646
+ var SMALL_DEVICE_BREAKPOINT = 420;
16647
+ var SlidePanelComponent = /** @class */ (function () {
16648
+ function SlidePanelComponent(slidePanelService) {
16649
+ this.slidePanelService = slidePanelService;
16650
+ this.id = "slide-panel-" + ++SlidePanelComponent_1.nextId;
16651
+ this.openIcon = "fas fa-chevron-right";
16652
+ this.closeIcon = "fas fa-chevron-left";
16653
+ this.cache = false;
16654
+ this.createOpen = false;
16655
+ this.panelOpened = new EventEmitter();
16656
+ this.panelClosed = new EventEmitter();
16657
+ this.isOpen = false;
16658
+ this.isSlideOver = false;
16659
+ this.isAnimating = false;
16660
+ this.isContentAnimationDisabled = true;
16661
+ this.slideHeight = 0;
16662
+ this.sideContentWidth = 0;
16663
+ this._unsubscribe$ = new Subject();
16664
+ }
16665
+ SlidePanelComponent_1 = SlidePanelComponent;
16666
+ SlidePanelComponent.prototype.onResize = function () {
16667
+ this._checkOverBehavior();
16568
16668
  };
16569
- TieredMenuComponent.prototype._createMenu = function (items, position) {
16669
+ SlidePanelComponent.prototype.ngOnInit = function () {
16570
16670
  var _this = this;
16571
- if (!this._componentRef && items) {
16572
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
16573
- this._componentRef = componentFactory.create(this._injector);
16574
- this._appRef.attachView(this._componentRef.hostView);
16575
- var domElem = this._componentRef.hostView.rootNodes[0];
16576
- document.body.appendChild(domElem);
16577
- // Setting the menu items.
16578
- this._componentRef.instance.items = items;
16579
- // Subscribe menu events.
16580
- this._componentRef.instance.destroyRequest.subscribe(function (propagate) {
16581
- _this._destroy(propagate);
16582
- });
16583
- this._menuDivElement = domElem.querySelector(".menu");
16584
- this._setMenuPosition(position);
16585
- }
16586
- };
16587
- TieredMenuComponent.prototype._destroy = function (propagate) {
16588
- if (propagate === void 0) { propagate = true; }
16589
- if (this._componentRef !== null) {
16590
- this._appRef.detachView(this._componentRef.hostView);
16591
- this._componentRef.destroy();
16592
- this._componentRef = null;
16593
- this._menuDivElement = null;
16594
- }
16595
- if (propagate) {
16596
- this.destroyRequest.emit();
16597
- }
16598
- };
16599
- TieredMenuComponent.prototype._setMenuPosition = function (position) {
16600
- var _a, _b;
16601
- var ITEM_HEIGHT = 37;
16602
- var DIVIDER_HEIGHT = 5;
16603
- var PADDING = 8;
16604
- if (this._componentRef !== null) {
16605
- var top_1 = position.top, right = position.right, bottom = position.bottom, left = position.left;
16606
- var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
16607
- return !item.divider ? count + 1 : count;
16608
- }, 0);
16609
- var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
16610
- return item.divider ? count + 1 : count;
16611
- }, 0);
16612
- // I need to calculate the height of the component because the internal elements have not been created yet.
16613
- var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
16614
- var menuWidth = this._menuDivElement.getBoundingClientRect().width;
16615
- var rightFreeSpace = window.innerWidth - right;
16616
- var bottomFreeSpace = window.innerHeight - bottom;
16617
- if (rightFreeSpace > menuWidth) {
16618
- this._componentRef.instance.left = right;
16619
- }
16620
- else {
16621
- this._componentRef.instance.left = left - menuWidth;
16622
- }
16623
- if (bottomFreeSpace <= menuHeight) {
16624
- this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
16625
- }
16626
- else {
16627
- this._componentRef.instance.top = window.scrollY + top_1;
16628
- }
16629
- }
16671
+ this._checkOverBehavior();
16672
+ this.slidePanelService.createSlidePanel(this.id)
16673
+ .pipe(takeUntil(this._unsubscribe$))
16674
+ .subscribe(function () {
16675
+ _this.isOpen = false;
16676
+ });
16630
16677
  };
16631
- TieredMenuComponent.prototype._subscribeEvents = function () {
16678
+ SlidePanelComponent.prototype.ngAfterViewInit = function () {
16632
16679
  var _this = this;
16633
- // Increment current item event.
16634
- this._tieredMenuEventService.incrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
16635
- _this._incrementCurItem();
16636
- });
16637
- // Decrement current item event.
16638
- this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
16639
- _this._decrementCurItem();
16640
- });
16641
- // Select item event.
16642
- this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function (item) {
16643
- if (item.submenu) {
16644
- _this._tieredMenuEventService.openItemMenuEvent.emit(item);
16645
- }
16646
- else if (item.command) {
16647
- _this._tieredMenuEventService.closeAllMenusEvent.emit();
16648
- item.command();
16649
- }
16650
- });
16651
- // Close all menus event.
16652
- this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
16653
- _this._destroy();
16654
- _this.tieredMenuService.currentItem = null;
16655
- _this.tieredMenuService.currentItems = _this.tieredMenuService.items;
16656
- _this.tieredMenuService.markAllItemsAsClosed(_this.tieredMenuService.items);
16657
- });
16658
- // Open item menu event.
16659
- this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function (item) {
16660
- if (_this.tieredMenuService.currentItem) {
16661
- if (_this.tieredMenuService.currentItem.parent === item) {
16662
- return;
16663
- }
16664
- if (!_this.tieredMenuService.searchTheHierarchy(_this.tieredMenuService.currentItem.parent, item)) {
16665
- var current = _this.tieredMenuService.currentItem;
16666
- current.isOpen = false;
16667
- while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
16668
- _this._tieredMenuEventService.closeItemMenuEvent.emit(current);
16669
- _this._changeDetectorRef.detectChanges();
16670
- current = current.parent;
16671
- }
16672
- if (current) {
16673
- current.isOpen = false;
16674
- }
16675
- }
16676
- }
16677
- if (item.submenu && !item.isOpen && _this.items.includes(item)) {
16678
- var _a = document.querySelector("#" + item.id).getBoundingClientRect(), top_2 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
16679
- var position = { top: top_2, right: right, left: left, bottom: bottom };
16680
- _this._createMenu(item.submenu, position);
16681
- _this.tieredMenuService.currentItems = item.submenu;
16682
- _this.tieredMenuService.currentItem = item.submenu[0];
16683
- item.isOpen = true;
16680
+ queueMicrotask(function () {
16681
+ if (_this.createOpen) {
16682
+ _this.isOpen = true;
16684
16683
  }
16685
16684
  });
16686
- // Close item menu event.
16687
- this._tieredMenuEventService.closeItemMenuEvent
16688
- .pipe(takeUntil(this._unsubscribe$))
16689
- .subscribe(function (item) {
16690
- var _a, _b;
16691
- if (_this.items.some(function (i) { return i.id === item.id; })) {
16692
- if (item.parent) {
16693
- item.parent.isOpen = false;
16694
- }
16695
- _this.tieredMenuService.currentItems = ((_b = (_a = item === null || item === void 0 ? void 0 : item.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.submenu) || _this.tieredMenuService.items;
16696
- _this.tieredMenuService.currentItem = item.parent;
16697
- _this.destroyRequest.emit(false);
16698
- }
16685
+ };
16686
+ SlidePanelComponent.prototype.ngAfterViewChecked = function () {
16687
+ var _this = this;
16688
+ // to executed at a safe time prior to control returning to the browser's event loop
16689
+ queueMicrotask(function () {
16690
+ _this._calculateSlideHeight();
16691
+ _this._calculateSideContentWidth();
16692
+ _this.isContentAnimationDisabled = false;
16699
16693
  });
16700
16694
  };
16701
- var TieredMenuComponent_1;
16702
- TieredMenuComponent.ctorParameters = function () { return [
16703
- { type: ApplicationRef },
16704
- { type: ComponentFactoryResolver },
16705
- { type: Injector },
16706
- { type: ChangeDetectorRef },
16707
- { type: TieredMenuService },
16708
- { type: TieredMenuEventService }
16695
+ SlidePanelComponent.prototype.ngOnDestroy = function () {
16696
+ this._unsubscribe$.next();
16697
+ this._unsubscribe$.complete();
16698
+ };
16699
+ SlidePanelComponent.prototype.onClickButton = function () {
16700
+ if (this.isAnimating) {
16701
+ return;
16702
+ }
16703
+ this.isOpen = !this.isOpen;
16704
+ if (this.isOpen) {
16705
+ this.panelOpened.emit();
16706
+ }
16707
+ else {
16708
+ this.panelClosed.emit();
16709
+ }
16710
+ };
16711
+ SlidePanelComponent.prototype.onContentAnimationStart = function () {
16712
+ this.isAnimating = true;
16713
+ };
16714
+ SlidePanelComponent.prototype.onContentAnimationDone = function () {
16715
+ this.isAnimating = false;
16716
+ this._calculateSideContentWidth();
16717
+ };
16718
+ SlidePanelComponent.prototype._checkOverBehavior = function () {
16719
+ this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
16720
+ };
16721
+ SlidePanelComponent.prototype._calculateSlideHeight = function () {
16722
+ this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
16723
+ };
16724
+ SlidePanelComponent.prototype._calculateSideContentWidth = function () {
16725
+ var slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
16726
+ var slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
16727
+ this.sideContentWidth = slidePanelWidth - slideContentWidth;
16728
+ };
16729
+ var SlidePanelComponent_1;
16730
+ SlidePanelComponent.nextId = 0;
16731
+ SlidePanelComponent.ctorParameters = function () { return [
16732
+ { type: SlidePanelService }
16709
16733
  ]; };
16734
+ __decorate([
16735
+ Input()
16736
+ ], SlidePanelComponent.prototype, "id", void 0);
16737
+ __decorate([
16738
+ Input()
16739
+ ], SlidePanelComponent.prototype, "openIcon", void 0);
16740
+ __decorate([
16741
+ Input()
16742
+ ], SlidePanelComponent.prototype, "closeIcon", void 0);
16743
+ __decorate([
16744
+ Input()
16745
+ ], SlidePanelComponent.prototype, "cache", void 0);
16746
+ __decorate([
16747
+ Input()
16748
+ ], SlidePanelComponent.prototype, "createOpen", void 0);
16710
16749
  __decorate([
16711
16750
  Output()
16712
- ], TieredMenuComponent.prototype, "destroyRequest", void 0);
16751
+ ], SlidePanelComponent.prototype, "panelOpened", void 0);
16713
16752
  __decorate([
16714
- HostListener("window:resize")
16715
- ], TieredMenuComponent.prototype, "onResize", null);
16753
+ Output()
16754
+ ], SlidePanelComponent.prototype, "panelClosed", void 0);
16716
16755
  __decorate([
16717
- HostListener("document:click", ["$event"])
16718
- ], TieredMenuComponent.prototype, "onDocumentClick", null);
16756
+ ViewChild("slidePanel")
16757
+ ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
16719
16758
  __decorate([
16720
- HostListener("document:keydown", ["$event"])
16721
- ], TieredMenuComponent.prototype, "onKeydownHandler", null);
16722
- TieredMenuComponent = TieredMenuComponent_1 = __decorate([
16759
+ ViewChild("slideContent")
16760
+ ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
16761
+ __decorate([
16762
+ ViewChild("sideContent")
16763
+ ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
16764
+ __decorate([
16765
+ HostListener("window:resize")
16766
+ ], SlidePanelComponent.prototype, "onResize", null);
16767
+ SlidePanelComponent = SlidePanelComponent_1 = __decorate([
16723
16768
  Component({
16724
- selector: "s-tiered-menu",
16725
- template: "<div\n class=\"menu\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\">\n\n <div *ngFor=\"let item of items\">\n <s-tiered-menu-item\n *ngIf=\"item.visible && !item.divider\"\n [item]=\"item\"\n [focused]=\"item === tieredMenuService.currentItem\"\n [highlight]=\"item.isOpen\"\n triggerEvent=\"hover\"\n [closeOnClick]=\"false\">\n </s-tiered-menu-item>\n <s-tiered-menu-divider *ngIf=\"item.divider\"></s-tiered-menu-divider>\n </div>\n</div>",
16726
- styles: [".menu{background-color:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;max-height:100vh;min-width:176px;padding:4px 0;overflow-y:auto;position:absolute;z-index:9999}"]
16769
+ selector: "s-slide-panel",
16770
+ template: "<div #slidePanel class=\"slide-panel\">\n <div\n #slideContent\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 \n #sideContent\n class=\"side-content\"\n [ngStyle]=\"{ 'width.px': sideContentWidth }\">\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]=\"slideContentTemplate\"></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]=\"slideContentTemplate\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #slideContentTemplate>\n <ng-content select=\"[slide-content]\"></ng-content>\n</ng-template>",
16771
+ animations: [
16772
+ trigger("cachelessAnimation", [
16773
+ transition(":enter", [
16774
+ style$7({ width: "0" }),
16775
+ animate("200ms linear", style$7({ width: "*" })),
16776
+ ]),
16777
+ transition(":leave", [
16778
+ style$7({ width: "*" }),
16779
+ animate("200ms linear", style$7({ width: "0" })),
16780
+ ]),
16781
+ ]),
16782
+ trigger("cacheAnimation", [
16783
+ state("true", style$7({ width: "*", padding: '0 16px' })),
16784
+ state("false", style$7({ width: '0px', padding: '0' })),
16785
+ transition("* => *", animate("200ms")),
16786
+ ]),
16787
+ ],
16788
+ styles: [".slide-panel{display:-ms-flexbox;display:flex;width:100%}.slide-panel .slide-content{display:-ms-flexbox;display:flex;position:relative}.slide-panel .slide-content .main-container{background-color:#eeebf2;display:-ms-flexbox;display:flex;border:1px solid #ccc;overflow:hidden;position:relative}.slide-panel .slide-content .main-container .content-container{overflow-y:auto;overflow-x:hidden;padding:16px}.slide-panel .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-family:\"Font Awesome 5 Pro\";font-size:16px;height:32px;-ms-flex-pack:center;justify-content:center;position:absolute;right:-32px;top:16px;width:32px;z-index:99}.slide-panel .slide-content--closed .main-container{border:none}.slide-panel .slide-content--over{position:absolute}.slide-panel .side-content{display:-ms-flexbox;display:flex;height:-webkit-max-content;height:max-content;overflow:auto;transition:width .1s linear}"]
16727
16789
  })
16728
- ], TieredMenuComponent);
16729
- return TieredMenuComponent;
16790
+ ], SlidePanelComponent);
16791
+ return SlidePanelComponent;
16730
16792
  }());
16731
16793
 
16732
- var TieredMenuGlobalService = /** @class */ (function () {
16733
- function TieredMenuGlobalService() {
16794
+ var SlidePanelModule = /** @class */ (function () {
16795
+ function SlidePanelModule() {
16734
16796
  }
16735
- TieredMenuGlobalService = __decorate([
16736
- Injectable()
16737
- ], TieredMenuGlobalService);
16738
- return TieredMenuGlobalService;
16797
+ SlidePanelModule = __decorate([
16798
+ NgModule({
16799
+ imports: [CommonModule],
16800
+ declarations: [SlidePanelComponent],
16801
+ exports: [SlidePanelComponent],
16802
+ providers: [SlidePanelService],
16803
+ })
16804
+ ], SlidePanelModule);
16805
+ return SlidePanelModule;
16739
16806
  }());
16740
16807
 
16741
- var TieredMenuDirective = /** @class */ (function () {
16742
- function TieredMenuDirective(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
16743
- this._elementRef = _elementRef;
16744
- this._appRef = _appRef;
16745
- this._componentFactoryResolver = _componentFactoryResolver;
16746
- this._injector = _injector;
16747
- this._tieredMenuEventService = _tieredMenuEventService;
16748
- this._tieredMenuService = _tieredMenuService;
16749
- this._tieredMenuGlobalService = _tieredMenuGlobalService;
16750
- this._changeDetectorRef = _changeDetectorRef;
16751
- this.items = [];
16752
- this.triggerEvent = "click";
16753
- this._componentRef = null;
16754
- this._isNested = false;
16755
- this._isOpen = false;
16756
- this._unsubscribe$ = new Subject();
16757
- }
16758
- TieredMenuDirective.prototype.onClick = function (event) {
16759
- if (this.triggerEvent === "click" && !this._isOpen) {
16760
- this._lastActiveElement = document.activeElement;
16761
- this._createMenu();
16762
- event.preventDefault();
16763
- event.stopPropagation();
16764
- }
16765
- };
16766
- TieredMenuDirective.prototype.ngOnInit = function () {
16767
- this._subscribeEvents();
16768
- };
16769
- TieredMenuDirective.prototype.ngDoCheck = function () {
16770
- if (!this.previousItems) {
16771
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
16772
- }
16773
- var hasChanges = false;
16774
- if (this.items.length !== this.previousItems.length) {
16775
- hasChanges = true;
16776
- }
16777
- else {
16778
- for (var i = 0; i < this.items.length; i++) {
16779
- if (!this._compareItems(this.items[i], this.previousItems[i])) {
16780
- hasChanges = true;
16781
- break;
16782
- }
16783
- }
16784
- }
16785
- if (hasChanges) {
16786
- this._updateServiceItems();
16787
- this._changeDetectorRef.detectChanges();
16788
- this._rebuildMenu();
16808
+ var SplitButtonType;
16809
+ (function (SplitButtonType) {
16810
+ SplitButtonType["Primary"] = "primary";
16811
+ SplitButtonType["Secondary"] = "secondary";
16812
+ SplitButtonType["Default"] = "default";
16813
+ })(SplitButtonType || (SplitButtonType = {}));
16814
+
16815
+ var SplitButtonComponent = /** @class */ (function () {
16816
+ function SplitButtonComponent(eRef) {
16817
+ this.eRef = eRef;
16818
+ this.disabled = false;
16819
+ this.type = SplitButtonType.Primary;
16820
+ this.buttonClicked = new EventEmitter();
16821
+ this.open = false;
16822
+ }
16823
+ SplitButtonComponent.prototype.onClickout = function (event) {
16824
+ if (!this.eRef.nativeElement.contains(event.target)) {
16825
+ this.closeDropdown();
16789
16826
  }
16790
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
16791
- };
16792
- TieredMenuDirective.prototype.ngOnDestroy = function () {
16793
- this._unsubscribe$.next();
16794
- this._unsubscribe$.complete();
16795
- this._destroy();
16796
16827
  };
16797
- TieredMenuDirective.prototype._createMenu = function () {
16798
- var _a, _b, _c;
16799
- this._updateServiceItems();
16800
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16801
- (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
16802
- this._tieredMenuGlobalService.lastInstance = this;
16803
- (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
16804
- this._isOpen = true;
16805
- this._isNested = document.body.clientWidth < 600;
16806
- this._isNested ? this._createNestedMenu() : this._createTieredMenu();
16828
+ SplitButtonComponent.prototype.onButtonClick = function () {
16829
+ if (!this.disabled) {
16830
+ this.buttonClicked.emit();
16831
+ this.closeDropdown();
16807
16832
  }
16808
16833
  };
16809
- TieredMenuDirective.prototype._createTieredMenu = function () {
16810
- var _this = this;
16811
- var _a;
16812
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16813
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
16814
- this._componentRef = componentFactory.create(this._injector);
16815
- this._appRef.attachView(this._componentRef.hostView);
16816
- var domElem = this._componentRef.hostView.rootNodes[0];
16817
- document.body.appendChild(domElem);
16818
- this._setMenuComponentProperties();
16819
- this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
16820
- _this._destroy();
16821
- });
16822
- this._setMenuPosition();
16834
+ SplitButtonComponent.prototype.onDropdownClick = function () {
16835
+ if (!this.disabled) {
16836
+ this.open = !this.open;
16823
16837
  }
16824
16838
  };
16825
- TieredMenuDirective.prototype._createNestedMenu = function () {
16826
- var _a;
16827
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16828
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
16829
- this._componentRef = componentFactory.create(this._injector);
16830
- this._appRef.attachView(this._componentRef.hostView);
16831
- var domElem = this._componentRef.hostView.rootNodes[0];
16832
- document.body.appendChild(domElem);
16833
- this._setMenuComponentProperties();
16834
- this._setMenuPosition();
16835
- }
16839
+ SplitButtonComponent.prototype.onOptionClick = function (option) {
16840
+ option.action && option.action();
16841
+ this.closeDropdown();
16836
16842
  };
16837
- TieredMenuDirective.prototype._destroy = function () {
16838
- if (this._componentRef) {
16839
- this._isOpen = false;
16840
- window.clearTimeout(this._showTimeout);
16841
- this._appRef.detachView(this._componentRef.hostView);
16842
- this._componentRef.destroy();
16843
- this._componentRef = null;
16844
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
16845
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
16846
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16847
- }
16843
+ SplitButtonComponent.prototype.closeDropdown = function () {
16844
+ this.open = false;
16848
16845
  };
16849
- TieredMenuDirective.prototype._setMenuPosition = function () {
16850
- var _a, _b;
16851
- var ITEM_HEIGHT = 37;
16852
- var ITEM_WIDTH = 176;
16853
- var DIVIDER_HEIGHT = 5;
16854
- var PADDING = 8;
16855
- var MARGIN = 4;
16856
- if (this._componentRef !== null) {
16857
- this._componentRef.instance.top = 8;
16858
- var _c = this._elementRef.nativeElement.getBoundingClientRect(), bottom = _c.bottom, left = _c.left, right = _c.right;
16859
- var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
16860
- return !item.divider ? count + 1 : count;
16861
- }, 0);
16862
- var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
16863
- return item.divider ? count + 1 : count;
16864
- }, 0);
16865
- var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
16866
- var rightFreeSpace = window.innerWidth - right;
16867
- var bottomFreeSpace = window.innerHeight - bottom;
16868
- this._componentRef.instance.top = bottom;
16869
- this._componentRef.instance.left = left;
16870
- if (bottomFreeSpace <= menuHeight) {
16871
- this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
16872
- }
16873
- else {
16874
- this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
16846
+ SplitButtonComponent.ctorParameters = function () { return [
16847
+ { type: ElementRef }
16848
+ ]; };
16849
+ __decorate([
16850
+ Input()
16851
+ ], SplitButtonComponent.prototype, "disabled", void 0);
16852
+ __decorate([
16853
+ Input()
16854
+ ], SplitButtonComponent.prototype, "iconClass", void 0);
16855
+ __decorate([
16856
+ Input()
16857
+ ], SplitButtonComponent.prototype, "label", void 0);
16858
+ __decorate([
16859
+ Input()
16860
+ ], SplitButtonComponent.prototype, "type", void 0);
16861
+ __decorate([
16862
+ Input()
16863
+ ], SplitButtonComponent.prototype, "options", void 0);
16864
+ __decorate([
16865
+ Output()
16866
+ ], SplitButtonComponent.prototype, "buttonClicked", void 0);
16867
+ __decorate([
16868
+ HostListener("document:click", ["$event"])
16869
+ ], SplitButtonComponent.prototype, "onClickout", null);
16870
+ SplitButtonComponent = __decorate([
16871
+ Component({
16872
+ selector: "s-split-button",
16873
+ template: "<div class=\"split-button\" [ngClass]=\"{\n 'split-button--primary': type == 'primary',\n 'split-button--secondary': type == 'secondary',\n 'split-button--default': type == 'default',\n 'split-button--disabled': disabled\n }\">\n <button class=\"button\" (click)=\"onButtonClick()\">\n <span class=\"button__icon\" [ngClass]=\"iconClass\"></span>\n <span class=\"button__label\">{{ label }}</span>\n </button>\n <button class=\"dropdown\" (click)=\"onDropdownClick()\">\n <span class=\"dropdown__icon\" [ngClass]=\"{\n 'far': true,\n 'fa-chevron-down': !open,\n 'fa-chevron-up': open\n }\">\n </span>\n </button>\n</div>\n\n<ul *ngIf=\"this.open\" class=\"options\">\n <li *ngFor=\"let option of options\" (click)=\"onOptionClick(option)\">\n {{ option.title }}\n </li>\n</ul>",
16874
+ styles: [".split-button{display:-ms-flexbox;display:flex;-webkit-user-select:none;-ms-user-select:none;user-select:none}.split-button .button{-ms-flex-align:center;align-items:center;border:none;border-radius:4px 0 0 4px;display:-ms-flexbox;display:flex;padding:8px 8px 8px 12px;transition:.3s ease-in-out}.split-button .button__icon{font-size:16px;padding:0 4px}.split-button .button__title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:21px}.split-button .dropdown{-ms-flex-align:center;align-items:center;border:none;border-left:1px solid #608190;border-radius:0 4px 4px 0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:12px 8px;transition:.3s ease-in-out}.split-button--disabled{opacity:.5}.split-button--primary .button,.split-button--primary .dropdown{background-color:#428bca;color:#fff}.split-button--primary:not(.split-button--primary--disabled) .button,.split-button--primary:not(.split-button--primary--disabled) .dropdown{cursor:pointer}.split-button--primary:not(.split-button--primary--disabled) .button:hover,.split-button--primary:not(.split-button--primary--disabled) .dropdown:hover{background-color:#063951}.split-button--secondary .button,.split-button--secondary .dropdown{background-color:#7892a1;color:#fff}.split-button--secondary:not(.split-button--secondary--disabled) .button,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown{cursor:pointer}.split-button--secondary:not(.split-button--secondary--disabled) .button:hover,.split-button--secondary:not(.split-button--secondary--disabled) .dropdown:hover{background-color:#697882}.split-button--default .button,.split-button--default .dropdown{background-color:unset;border:1px solid #d8d8d8;color:#333}.split-button--default:not(.split-button--default--disabled) .button,.split-button--default:not(.split-button--default--disabled) .dropdown{cursor:pointer}.split-button--default:not(.split-button--default--disabled) .button:hover,.split-button--default:not(.split-button--default--disabled) .dropdown:hover{background-color:#d8d8d8}.options{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);display:inline-block;list-style:none;margin:2px 0;padding:8px 0;position:absolute;-webkit-user-select:none;-ms-user-select:none;user-select:none}.options li{color:#333;cursor:pointer;font-family:\"Open Sans\",sans-serif;font-weight:400;font-size:14px;line-height:21px;padding:8px 16px}.options li:hover{background-color:#d8d8d8}"]
16875
+ })
16876
+ ], SplitButtonComponent);
16877
+ return SplitButtonComponent;
16878
+ }());
16879
+
16880
+ var SplitButtonModule = /** @class */ (function () {
16881
+ function SplitButtonModule() {
16882
+ }
16883
+ SplitButtonModule = __decorate([
16884
+ NgModule({
16885
+ imports: [CommonModule],
16886
+ declarations: [SplitButtonComponent],
16887
+ exports: [SplitButtonComponent],
16888
+ })
16889
+ ], SplitButtonModule);
16890
+ return SplitButtonModule;
16891
+ }());
16892
+
16893
+ var StatsCardComponent = /** @class */ (function () {
16894
+ function StatsCardComponent() {
16895
+ this.id = "s-stats-card-" + StatsCardComponent_1.nextId++;
16896
+ this.alwaysWithBorder = false;
16897
+ this.lightVersion = false;
16898
+ this.lightMode = true;
16899
+ this.iconClass = "fa fa-bar-chart";
16900
+ this.color = "#339966";
16901
+ this.animateNumbers = true;
16902
+ this.clickable = false;
16903
+ this.tooltip = "";
16904
+ this.onClick = new EventEmitter();
16905
+ this.ANIMATION_DURATION_MS = 200;
16906
+ this.STEP_DURATION_MS = 20;
16907
+ this.previousValue = "0";
16908
+ this._value = "0";
16909
+ }
16910
+ StatsCardComponent_1 = StatsCardComponent;
16911
+ Object.defineProperty(StatsCardComponent.prototype, "value", {
16912
+ get: function () {
16913
+ return this._value;
16914
+ },
16915
+ set: function (value) {
16916
+ this.previousValue = this._value;
16917
+ this._value = String(value);
16918
+ if (this.animateNumbers)
16919
+ this.updateDisplayValue();
16920
+ else
16921
+ this.displayValue = this.value;
16922
+ },
16923
+ enumerable: true,
16924
+ configurable: true
16925
+ });
16926
+ StatsCardComponent.prototype.updateDisplayValue = function () {
16927
+ var _this = this;
16928
+ var animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
16929
+ var stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
16930
+ var animationCount = animationDuration.dividedBy(stepDuration);
16931
+ var previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
16932
+ var rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
16933
+ var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
16934
+ var incremental = previousRawValue.isLessThan(rawValue);
16935
+ clearInterval(this.intervalId);
16936
+ this.displayValue = this.replaceNumericPositions(this.value);
16937
+ var counter = previousRawValue;
16938
+ this.intervalId = setInterval(function () {
16939
+ if (incremental && counter.isLessThan(rawValue)) {
16940
+ _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16941
+ counter = counter.plus(incrementValue);
16875
16942
  }
16876
- if (rightFreeSpace > 176) {
16877
- this._componentRef.instance.left = window.scrollX + left;
16943
+ else if (!incremental && counter.isGreaterThan(rawValue)) {
16944
+ _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16945
+ counter = counter.minus(incrementValue);
16878
16946
  }
16879
16947
  else {
16880
- this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
16881
- }
16882
- if (this._isNested) {
16883
- this._componentRef.instance.left = MARGIN;
16948
+ _this.displayValue = _this.value;
16949
+ clearInterval(_this.intervalId);
16884
16950
  }
16885
- }
16886
- };
16887
- TieredMenuDirective.prototype._setMenuComponentProperties = function () {
16888
- if (this._componentRef != null) {
16889
- this._componentRef.instance.items = this._tieredMenuService.items;
16890
- }
16891
- };
16892
- TieredMenuDirective.prototype._subscribeEvents = function () {
16893
- var _this = this;
16894
- this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(function () {
16895
- _this._tieredMenuService.items = _this._tieredMenuService.markAllItemsAsClosed(_this._tieredMenuService.items);
16896
- _this._destroy();
16897
- });
16898
- };
16899
- TieredMenuDirective.prototype._compareItems = function (item1, item2) {
16900
- return JSON.stringify(item1) === JSON.stringify(item2);
16901
- };
16902
- TieredMenuDirective.prototype._rebuildMenu = function () {
16903
- this._destroy();
16951
+ }, this.STEP_DURATION_MS);
16904
16952
  };
16905
- TieredMenuDirective.prototype._updateServiceItems = function () {
16906
- this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
16907
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
16908
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
16953
+ StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
16954
+ var rawValue = value.replace(/[^\d]/g, "");
16955
+ var newValueString = newValue ? newValue.toString() : "";
16956
+ var formattedNewValue = newValueString
16957
+ .toString()
16958
+ .replace(/\D/g, "")
16959
+ .padStart(rawValue.length, "0");
16960
+ var newValueIndex = 0;
16961
+ return value
16962
+ .split("")
16963
+ .map(function (char) {
16964
+ var number = Number(char);
16965
+ if (number || char === "0")
16966
+ return formattedNewValue[newValueIndex++];
16967
+ return char;
16968
+ })
16969
+ .join("");
16909
16970
  };
16910
- TieredMenuDirective.ctorParameters = function () { return [
16911
- { type: ElementRef },
16912
- { type: ApplicationRef },
16913
- { type: ComponentFactoryResolver },
16914
- { type: Injector },
16915
- { type: TieredMenuEventService },
16916
- { type: TieredMenuService },
16917
- { type: TieredMenuGlobalService },
16918
- { type: ChangeDetectorRef }
16919
- ]; };
16971
+ var StatsCardComponent_1;
16972
+ StatsCardComponent.nextId = 0;
16920
16973
  __decorate([
16921
16974
  Input()
16922
- ], TieredMenuDirective.prototype, "items", void 0);
16975
+ ], StatsCardComponent.prototype, "id", void 0);
16923
16976
  __decorate([
16924
16977
  Input()
16925
- ], TieredMenuDirective.prototype, "triggerEvent", void 0);
16978
+ ], StatsCardComponent.prototype, "label", void 0);
16926
16979
  __decorate([
16927
- HostListener("click", ["$event"])
16928
- ], TieredMenuDirective.prototype, "onClick", null);
16929
- TieredMenuDirective = __decorate([
16930
- Directive({
16931
- selector: "[sTieredMenu]",
16932
- providers: [TieredMenuEventService, TieredMenuService],
16980
+ Input()
16981
+ ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
16982
+ __decorate([
16983
+ Input()
16984
+ ], StatsCardComponent.prototype, "lightVersion", void 0);
16985
+ __decorate([
16986
+ Input()
16987
+ ], StatsCardComponent.prototype, "lightMode", void 0);
16988
+ __decorate([
16989
+ Input()
16990
+ ], StatsCardComponent.prototype, "iconClass", void 0);
16991
+ __decorate([
16992
+ Input()
16993
+ ], StatsCardComponent.prototype, "color", void 0);
16994
+ __decorate([
16995
+ Input()
16996
+ ], StatsCardComponent.prototype, "animateNumbers", void 0);
16997
+ __decorate([
16998
+ Input()
16999
+ ], StatsCardComponent.prototype, "clickable", void 0);
17000
+ __decorate([
17001
+ Input()
17002
+ ], StatsCardComponent.prototype, "value", null);
17003
+ __decorate([
17004
+ Input()
17005
+ ], StatsCardComponent.prototype, "tooltip", void 0);
17006
+ __decorate([
17007
+ Output()
17008
+ ], StatsCardComponent.prototype, "onClick", void 0);
17009
+ StatsCardComponent = StatsCardComponent_1 = __decorate([
17010
+ Component({
17011
+ selector: "s-stats-card",
17012
+ template: "<div\n [id]=\"id\"\n class=\"s-stats-card\"\n [ngClass]=\"{\n 's-stats-card--always-border': alwaysWithBorder,\n 's-stats-card--light': lightMode,\n 's-stats-card--color': !lightMode,\n 's-stats-card--light-version': lightVersion,\n 's-stats-card--clickable': clickable\n }\"\n (click)=\"clickable && onClick.next($event)\">\n\n <div\n [id]=\"id + '-background'\"\n class=\"s-stats-card-background\"\n [ngStyle]=\"{ 'background-color': !lightMode && color || '' }\">\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"s-stats-card-overlay\">\n </div>\n\n <div\n [id]=\"id + '-info-container'\"\n class=\"s-stats-card-info-container\">\n <div class=\"s-stats-card-info-inner-container\">\n <div\n [id]=\"id + '-icon-container'\"\n class=\"s-stats-card-icon-container\"\n [ngStyle]=\"{ 'background-color': lightMode && color || '' }\">\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n [ngClass]=\"{ 's-stats-card-icon': true }\"\n [ngStyle]=\"{'color': !lightMode && color || ''}\"\n aria-hidden=\"true\"></span>\n </div>\n\n <div\n [id]=\"id + '-text-container'\"\n class=\"s-stats-card-text-container\">\n <h4\n [id]=\"id + '-label'\"\n class=\"s-stats-card-label\"\n [pTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ label }}\n </h4>\n <span\n [id]=\"id + '-value'\"\n class=\"s-stats-card-value\"\n [pTooltip]=\"displayValue\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ displayValue }}\n </span>\n </div>\n </div>\n <div class=\"s-stats-card-content-inner-container\">\n <div #content class=\"s-stats-card-content-container\">\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"content.children.length\"\n class=\"s-stats-card-content-separator\">\n </div>\n </div>\n <span\n *ngIf=\"tooltip\"\n class=\"s-status-card-tooltip\"\n [pTooltip]=\"tooltip\"\n tooltipPosition=\"right\">\n <i class=\"fa fa-info-circle s-status-card-tooltip-icon\"></i>\n </span>\n </div>\n</div>\n",
17013
+ encapsulation: ViewEncapsulation.None,
17014
+ styles: ["s-stats-card{display:block;height:auto;position:relative}s-stats-card .s-stats-card{border:1px solid transparent;min-width:120px;overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-background,s-stats-card .s-stats-card .s-stats-card-overlay{height:calc(100% - 2px);left:1px;position:absolute;top:1px;width:calc(100% - 2px)}s-stats-card .s-stats-card .s-stats-card-background{background-color:#fff}s-stats-card .s-stats-card .s-stats-card-overlay{background-color:#000;opacity:0;transition:opacity .2s ease-out}s-stats-card .s-stats-card .s-stats-card-info-container{overflow:auto;padding:15px;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container{overflow:hidden;position:relative}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{float:left;font-size:24px;height:50px;line-height:50px;text-align:center;transition:width .2s ease-out;width:50px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{-ms-flex-align:start;align-items:flex-start;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;float:left;height:50px;-ms-flex-pack:center;justify-content:center;max-width:calc(100% - 65px);padding-left:15px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label{font-weight:400;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{display:inline-block;font-size:20px;font-weight:700;width:100%}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-separator{border-top:1px solid #ccc;margin:15px 0;-ms-flex-order:1;order:1}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-content-inner-container .s-stats-card-content-container{-ms-flex-order:2;order:2}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip{font-size:1rem;line-height:0;margin:.3rem;position:absolute;right:0;top:0}s-stats-card .s-stats-card .s-stats-card-info-container .s-status-card-tooltip .s-status-card-tooltip-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--color .s-stats-card-icon-container{background-color:#fff}s-stats-card .s-stats-card.s-stats-card--light *{color:#333}s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-icon{color:#fff}s-stats-card .s-stats-card.s-stats-card--light * .s-status-card-tooltip .s-status-card-tooltip-icon,s-stats-card .s-stats-card.s-stats-card--light .s-stats-card-label{color:#999}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card.s-stats-card--light-version .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card.s-stats-card--clickable{cursor:pointer}s-stats-card .s-stats-card:hover .s-stats-card-overlay{opacity:.2}s-stats-card .s-stats-card.s-stats-card--light:hover .s-stats-card-overlay{opacity:.08}s-stats-card .s-stats-card.s-stats-card--light{border-color:#ccc}.s-sidebar-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),.ui-dialog-content .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border),p-panel .s-stats-card.s-stats-card--light:not(.s-stats-card--always-border){border-color:transparent}@media (max-width:767px){s-stats-card .s-stats-card{height:auto}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container{height:100%;left:0;position:absolute;right:0;width:10px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-icon-container .s-stats-card-icon{display:none}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container{height:auto;max-width:calc(100% - 25px);padding-left:25px}s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-label,s-stats-card .s-stats-card .s-stats-card-info-container .s-stats-card-info-inner-container .s-stats-card-text-container .s-stats-card-value{overflow:visible;white-space:normal;word-break:break-all}}"]
16933
17015
  })
16934
- ], TieredMenuDirective);
16935
- return TieredMenuDirective;
17016
+ ], StatsCardComponent);
17017
+ return StatsCardComponent;
16936
17018
  }());
16937
17019
 
16938
- var TieredMenuDividerComponent = /** @class */ (function () {
16939
- function TieredMenuDividerComponent() {
17020
+ var StatsCardModule = /** @class */ (function () {
17021
+ function StatsCardModule() {
16940
17022
  }
16941
- TieredMenuDividerComponent = __decorate([
16942
- Component({
16943
- selector: "s-tiered-menu-divider",
16944
- template: "<div class=\"divider\"></div>",
16945
- styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
17023
+ StatsCardModule = __decorate([
17024
+ NgModule({
17025
+ imports: [
17026
+ CommonModule,
17027
+ TooltipModule$1,
17028
+ ],
17029
+ declarations: [
17030
+ StatsCardComponent,
17031
+ ],
17032
+ exports: [
17033
+ StatsCardComponent,
17034
+ ],
16946
17035
  })
16947
- ], TieredMenuDividerComponent);
16948
- return TieredMenuDividerComponent;
17036
+ ], StatsCardModule);
17037
+ return StatsCardModule;
16949
17038
  }());
16950
17039
 
16951
- var TieredMenuItemComponent = /** @class */ (function () {
16952
- function TieredMenuItemComponent(_tieredMenuEventService) {
16953
- this._tieredMenuEventService = _tieredMenuEventService;
16954
- this.focused = false;
16955
- this.highlight = false;
16956
- this.triggerEvent = "click";
16957
- this.closeOnClick = false;
17040
+ var StepState;
17041
+ (function (StepState) {
17042
+ StepState["Default"] = "default";
17043
+ StepState["Success"] = "success";
17044
+ StepState["Warning"] = "warning";
17045
+ })(StepState || (StepState = {}));
17046
+ var StepsComponent = /** @class */ (function () {
17047
+ function StepsComponent() {
17048
+ this.id = "s-steps-" + StepsComponent_1.nextId++;
17049
+ this.activeIndex = 0;
17050
+ this.stepSelected = new EventEmitter();
16958
17051
  }
16959
- TieredMenuItemComponent.prototype.onClick = function () {
16960
- if (this.item.disabled)
17052
+ StepsComponent_1 = StepsComponent;
17053
+ StepsComponent.prototype.stepClick = function (step, index, event) {
17054
+ if (step.disabled || index == this.activeIndex)
16961
17055
  return;
16962
- if (this.item.submenu) {
16963
- if (!this.item.isOpen) {
16964
- this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
16965
- }
16966
- else if (this.closeOnClick) {
16967
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
16968
- }
16969
- }
16970
- else {
16971
- this._tieredMenuEventService.selectItemEvent.emit(this.item);
16972
- }
17056
+ this.stepSelected.emit({ step: step, index: index, event: event });
16973
17057
  };
16974
- TieredMenuItemComponent.prototype.onMouseEnter = function () {
16975
- var _this = this;
16976
- if (this.item.disabled)
16977
- return;
16978
- if (this.triggerEvent === "hover" && !this.item.isOpen) {
16979
- this._showTimeout = window.setTimeout(function () {
16980
- _this._tieredMenuEventService.openItemMenuEvent.emit(_this.item);
16981
- }, 300);
16982
- }
17058
+ Object.defineProperty(StepsComponent.prototype, "stepState", {
17059
+ get: function () {
17060
+ return StepState;
17061
+ },
17062
+ enumerable: true,
17063
+ configurable: true
17064
+ });
17065
+ StepsComponent.prototype.barAnimation = function (index, activeIndex) {
17066
+ var visited = index < activeIndex;
17067
+ var activated = index === activeIndex;
17068
+ return visited || activated;
16983
17069
  };
16984
- TieredMenuItemComponent.prototype.onMouseLeave = function () {
16985
- window.clearTimeout(this._showTimeout);
17070
+ StepsComponent.prototype.afterBarAnimation = function (index, activeIndex) {
17071
+ var visited = index < activeIndex;
17072
+ var activated = index === activeIndex - 1;
17073
+ return visited || activated;
16986
17074
  };
16987
- TieredMenuItemComponent.ctorParameters = function () { return [
16988
- { type: TieredMenuEventService }
16989
- ]; };
16990
- __decorate([
16991
- Input()
16992
- ], TieredMenuItemComponent.prototype, "item", void 0);
16993
- __decorate([
16994
- Input()
16995
- ], TieredMenuItemComponent.prototype, "focused", void 0);
17075
+ Object.defineProperty(StepsComponent.prototype, "visibledStep", {
17076
+ get: function () {
17077
+ return this.steps.filter(function (step) { return !step.hidden; });
17078
+ },
17079
+ enumerable: true,
17080
+ configurable: true
17081
+ });
17082
+ var StepsComponent_1;
17083
+ StepsComponent.nextId = 0;
16996
17084
  __decorate([
16997
17085
  Input()
16998
- ], TieredMenuItemComponent.prototype, "highlight", void 0);
17086
+ ], StepsComponent.prototype, "id", void 0);
16999
17087
  __decorate([
17000
17088
  Input()
17001
- ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
17089
+ ], StepsComponent.prototype, "steps", void 0);
17002
17090
  __decorate([
17003
17091
  Input()
17004
- ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
17005
- __decorate([
17006
- HostListener("click"),
17007
- HostListener("touchend")
17008
- ], TieredMenuItemComponent.prototype, "onClick", null);
17009
- __decorate([
17010
- HostListener("mouseenter")
17011
- ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
17092
+ ], StepsComponent.prototype, "activeIndex", void 0);
17012
17093
  __decorate([
17013
- HostListener("mouseleave")
17014
- ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
17015
- TieredMenuItemComponent = __decorate([
17094
+ Output()
17095
+ ], StepsComponent.prototype, "stepSelected", void 0);
17096
+ StepsComponent = StepsComponent_1 = __decorate([
17016
17097
  Component({
17017
- selector: "s-tiered-menu-item",
17018
- template: "<div\n [id]=\"item.id\"\n class=\"tiered-menu-item\"\n [ngClass]=\"{\n 'tiered-menu-item--open': item.isOpen,\n 'tiered-menu-item--focused': focused,\n 'tiered-menu-item--disabled': item.disabled\n }\">\n <div class=\"tiered-menu-item-content\">\n <span class=\"icon\" [ngClass]=\"item.iconClass\"></span>\n <span class=\"label\">{{ item.label }}</span>\n </div>\n <span\n *ngIf=\"item.submenu\"\n class=\"submenu-icon\"\n [ngClass]=\"{\n 'fas': true,\n 'fa-chevron-left': item.isOpen,\n 'fa-chevron-right': !item.isOpen\n }\">\n </span>\n</div>",
17019
- styles: [".tiered-menu-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:8px 16px;-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.tiered-menu-item .tiered-menu-item-content .label{margin:0 12px}.tiered-menu-item:hover{background-color:#e9e6e6}.tiered-menu-item--focused{background-color:#ccc!important}.tiered-menu-item--open{background-color:#e4e2e2}.tiered-menu-item--disabled{opacity:50%;cursor:default}"]
17098
+ selector: "s-steps",
17099
+ template: "<div [id]=\"id\" class=\"s-steps-container\">\n <ng-container *ngFor=\"let step of visibledStep; let i = index; let isFirst = first; let isLast = last\">\n <div *ngIf=\"!isFirst\" class=\"s-step-progress-bar\"\n [@activeDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div [id]=\"id + '-step-' + (step.id || i)\" class=\"s-step-header\" (click)=\"stepClick(step, i, $event)\" role=\"tab\"\n tabindex=\"0\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-controls]=\"step.ariaControls\"\n [attr.aria-labelledby]=\"!step.ariaLabel ? 'step-label-' + i : null\" [attr.aria-posinset]=\"i + 1\"\n [attr.aria-setsize]=\"visibledStep.length\" [attr.aria-selected]=\"activeIndex == i\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex),\n 's-step-previous': (i === activeIndex - 1)\n }\">\n <div *ngIf=\"!isFirst\"\n [@beforeActiveDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-before\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': step.disabled,\n 's-step-visited': (i < activeIndex),\n 's-step-active': (i === activeIndex)\n }\"></div>\n <div *ngIf=\"!isLast\"\n [@afterActiveDesative]=\"afterBarAnimation(i, activeIndex) ? 'active': 'desactive'\"\n class=\"s-step-progress-bar-after\" [ngClass]=\"{\n 's-step-success': (step.state === stepState.Success),\n 's-step-warning': (step.state === stepState.Warning),\n 's-step-disabled': visibledStep[i + 1].disabled,\n 's-step-visited': ((i + 1) < activeIndex),\n 's-step-active': (i === (activeIndex - 1))\n }\"></div>\n <div\n class=\"s-step-index\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\"\n [pTooltip]=\"step.tooltip\"\n tooltipPosition=\"top\">\n <div class=\"s-step-index-content\">\n <span\n *ngIf=\"step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)\"\n class=\"fas fa-check\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state == stepState.Warning\"\n class=\"fas fa-exclamation-triangle\"\n aria-hidden=\"true\"\n [attr.aria-label]=\"i + 1\"></span>\n <span\n *ngIf=\"step.state != stepState.Success && step.state != stepState.Warning && activeIndex <= i\">\n {{i + 1}}\n </span>\n </div>\n </div>\n <div\n [id]=\"'step-label-' + i\"\n class=\"s-step-label\"\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\n <span>\n {{step.label}}\n </span>\n </div>\n </div>\n </ng-container>\n</div>\n",
17100
+ host: {
17101
+ "aria-orientation": "horizontal",
17102
+ role: "tablist",
17103
+ "tab-index": "0",
17104
+ },
17105
+ animations: [
17106
+ trigger("beforeActiveDesative", [
17107
+ state("active", style$7({
17108
+ "background-position": "left bottom",
17109
+ })),
17110
+ state("desactive", style$7({
17111
+ "background-position": "right bottom",
17112
+ })),
17113
+ transition("active => desactive", [animate("50ms 100ms linear")]),
17114
+ transition("desactive => active", [animate("50ms 250ms linear")]),
17115
+ ]),
17116
+ trigger("activeDesative", [
17117
+ state("active", style$7({
17118
+ "background-position": "left bottom",
17119
+ })),
17120
+ state("desactive", style$7({
17121
+ "background-position": "right bottom",
17122
+ })),
17123
+ transition("active => desactive", [animate("100ms 150ms linear")]),
17124
+ transition("desactive => active", [animate("100ms 150ms linear")]),
17125
+ ]),
17126
+ trigger("afterActiveDesative", [
17127
+ state("active", style$7({
17128
+ "background-position": "left bottom",
17129
+ })),
17130
+ state("desactive", style$7({
17131
+ "background-position": "right bottom",
17132
+ })),
17133
+ transition("active => desactive", [animate("50ms 250ms linear")]),
17134
+ transition("desactive => active", [animate("50ms 100ms linear")]),
17135
+ ]),
17136
+ ],
17137
+ styles: ["@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow:hidden;padding:15px 10px}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:66px}.s-step-header .s-step-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}"]
17020
17138
  })
17021
- ], TieredMenuItemComponent);
17022
- return TieredMenuItemComponent;
17139
+ ], StepsComponent);
17140
+ return StepsComponent;
17023
17141
  }());
17024
17142
 
17025
- var TieredMenuModule = /** @class */ (function () {
17026
- function TieredMenuModule() {
17143
+ var StepsModule = /** @class */ (function () {
17144
+ function StepsModule() {
17027
17145
  }
17028
- TieredMenuModule = __decorate([
17146
+ StepsModule = __decorate([
17029
17147
  NgModule({
17030
- imports: [
17031
- CommonModule,
17032
- ],
17033
- declarations: [
17034
- TieredMenuDirective,
17035
- TieredMenuComponent,
17036
- TieredMenuNestedComponent,
17037
- TieredMenuItemComponent,
17038
- TieredMenuDividerComponent,
17039
- ],
17040
- exports: [TieredMenuDirective],
17041
- providers: [TieredMenuGlobalService],
17148
+ imports: [CommonModule, TooltipModule$1],
17149
+ declarations: [StepsComponent],
17150
+ exports: [StepsComponent],
17042
17151
  })
17043
- ], TieredMenuModule);
17044
- return TieredMenuModule;
17152
+ ], StepsModule);
17153
+ return StepsModule;
17045
17154
  }());
17046
17155
 
17047
17156
  var TileComponent = /** @class */ (function () {
@@ -18006,5 +18115,5 @@ var fallback = {
18006
18115
  * Generated bundle index. Do not edit.
18007
18116
  */
18008
18117
 
18009
- export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, BorderButtonModule as ɵcw, BorderButtonComponent as ɵcx, ProgressBarDeterminateComponent as ɵcy, ProgressBarIndeterminateComponent as ɵcz, TemplateModule as ɵd, SelectButtonItemComponent as ɵda, SlidePanelService as ɵdb, TieredMenuEventService as ɵdc, TieredMenuService as ɵdd, TieredMenuGlobalService as ɵde, TieredMenuComponent as ɵdf, TieredMenuNestedComponent as ɵdg, TieredMenuItemComponent as ɵdh, TieredMenuDividerComponent as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
18118
+ export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationButtonComponent, NavigationButtonModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, TieredMenuEventService as ɵcw, TieredMenuService as ɵcx, TieredMenuGlobalService as ɵcy, TieredMenuComponent as ɵcz, TemplateModule as ɵd, TieredMenuNestedComponent as ɵda, TieredMenuItemComponent as ɵdb, TieredMenuDividerComponent as ɵdc, BorderButtonModule as ɵdd, BorderButtonComponent as ɵde, ProgressBarDeterminateComponent as ɵdf, ProgressBarIndeterminateComponent as ɵdg, SelectButtonItemComponent as ɵdh, SlidePanelService as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
18010
18119
  //# sourceMappingURL=seniorsistemas-angular-components.js.map