@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
@@ -13786,2192 +13786,2293 @@ KanbanModule = __decorate([
13786
13786
  })
13787
13787
  ], KanbanModule);
13788
13788
 
13789
- var ObjectCardFieldComponent_1;
13790
- let ObjectCardFieldComponent = ObjectCardFieldComponent_1 = class ObjectCardFieldComponent {
13789
+ var NavigationButtonComponent_1;
13790
+ let NavigationButtonComponent = NavigationButtonComponent_1 = class NavigationButtonComponent {
13791
13791
  constructor() {
13792
- this.id = `s-object-card-field-${ObjectCardFieldComponent_1.nextId++}`;
13793
- this.buttonClick = new EventEmitter();
13792
+ this.stepChanged = new EventEmitter();
13793
+ this.currentIndex = 0;
13794
+ this.isDisabled = false;
13795
+ this.tieredMenuItems = [];
13796
+ }
13797
+ ngOnInit() {
13798
+ const index = this.steps.findIndex((step) => step.value === this._value);
13799
+ this.currentIndex = index !== -1 ? index : 0;
13800
+ this.stepChanged.emit({
13801
+ previous: undefined,
13802
+ current: this.steps[this.currentIndex],
13803
+ });
13804
+ this._createTieredMenuItems();
13805
+ }
13806
+ writeValue(value) {
13807
+ this._value = value;
13808
+ const index = this.steps.findIndex((step) => step.value === this._value);
13809
+ this.currentIndex = index !== -1 ? index : 0;
13810
+ }
13811
+ registerOnChange(onChange) {
13812
+ this._onChange = onChange;
13813
+ }
13814
+ registerOnTouched(onTouched) {
13815
+ this._onTouched = onTouched;
13816
+ }
13817
+ setDisabledState(isDisabled) {
13818
+ this.isDisabled = isDisabled;
13819
+ }
13820
+ onNext() {
13821
+ if (this.isDisabled)
13822
+ return;
13823
+ const previous = this.steps[this.currentIndex];
13824
+ if (this.currentIndex < this.steps.length - 1) {
13825
+ this.currentIndex++;
13826
+ }
13827
+ const current = this.steps[this.currentIndex];
13828
+ this._onTouched && this._onTouched();
13829
+ this._onChange && this._onChange(current.value);
13830
+ this.stepChanged.emit({ previous, current });
13831
+ }
13832
+ onPrevious() {
13833
+ if (this.isDisabled)
13834
+ return;
13835
+ const previous = this.steps[this.currentIndex];
13836
+ if (this.currentIndex > 0) {
13837
+ this.currentIndex--;
13838
+ }
13839
+ const current = this.steps[this.currentIndex];
13840
+ this._onTouched && this._onTouched();
13841
+ this._onChange && this._onChange(current.value);
13842
+ this.stepChanged.emit({ previous, current });
13843
+ }
13844
+ _createTieredMenuItems() {
13845
+ this.steps.forEach((step) => {
13846
+ this.tieredMenuItems.push({
13847
+ label: step.label,
13848
+ command: () => this.currentIndex = this.steps.findIndex(s => s === step),
13849
+ });
13850
+ });
13794
13851
  }
13795
13852
  };
13796
- ObjectCardFieldComponent.nextId = 0;
13797
- __decorate([
13798
- Input()
13799
- ], ObjectCardFieldComponent.prototype, "id", void 0);
13800
- __decorate([
13801
- Input()
13802
- ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
13803
13853
  __decorate([
13804
13854
  Input()
13805
- ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
13806
- __decorate([
13807
- Input()
13808
- ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
13809
- __decorate([
13810
- Input()
13811
- ], ObjectCardFieldComponent.prototype, "label", void 0);
13812
- __decorate([
13813
- Input()
13814
- ], ObjectCardFieldComponent.prototype, "description", void 0);
13855
+ ], NavigationButtonComponent.prototype, "steps", void 0);
13815
13856
  __decorate([
13816
13857
  Input()
13817
- ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
13858
+ ], NavigationButtonComponent.prototype, "defaultValue", void 0);
13818
13859
  __decorate([
13819
13860
  Input()
13820
- ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
13861
+ ], NavigationButtonComponent.prototype, "tooltip", void 0);
13821
13862
  __decorate([
13822
13863
  Output()
13823
- ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
13824
- __decorate([
13825
- ContentChild(ThumbnailComponent, { static: true })
13826
- ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
13827
- __decorate([
13828
- ViewChild(TemplateRef, { static: true })
13829
- ], ObjectCardFieldComponent.prototype, "content", void 0);
13830
- ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
13864
+ ], NavigationButtonComponent.prototype, "stepChanged", void 0);
13865
+ NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
13831
13866
  Component({
13832
- selector: "s-object-card-field",
13833
- 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",
13834
- 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}"]
13867
+ selector: "s-navigation-button",
13868
+ 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",
13869
+ providers: [
13870
+ {
13871
+ provide: NG_VALUE_ACCESSOR,
13872
+ useExisting: forwardRef(() => NavigationButtonComponent_1),
13873
+ multi: true,
13874
+ },
13875
+ ],
13876
+ 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}"]
13835
13877
  })
13836
- ], ObjectCardFieldComponent);
13878
+ ], NavigationButtonComponent);
13837
13879
 
13838
- var ObjectCardMainComponent_1;
13839
- let ObjectCardMainComponent = ObjectCardMainComponent_1 = class ObjectCardMainComponent {
13880
+ let TieredMenuDividerComponent = class TieredMenuDividerComponent {
13881
+ };
13882
+ TieredMenuDividerComponent = __decorate([
13883
+ Component({
13884
+ selector: "s-tiered-menu-divider",
13885
+ template: "<div class=\"divider\"></div>",
13886
+ styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
13887
+ })
13888
+ ], TieredMenuDividerComponent);
13889
+
13890
+ let TieredMenuEventService = class TieredMenuEventService {
13840
13891
  constructor() {
13841
- this.id = `s-object-card-main-${ObjectCardMainComponent_1.nextId++}`;
13842
- this.iconClass = "fa fa-picture-o";
13843
- this.hasThumbnail = true;
13844
- this.hasDescription = true;
13845
- this.isBrand = false;
13846
- this.buttonClick = new EventEmitter();
13847
- this._thumbnailSize = ThumbnailSize.Medium;
13848
- }
13849
- set thumbnailSize(value) {
13850
- this._thumbnailSize = value;
13851
- if (this.thumbnailComponent)
13852
- this.thumbnailComponent.size = value;
13892
+ this.incrementCurrentItemEvent = new EventEmitter();
13893
+ this.decrementCurrentItemEvent = new EventEmitter();
13894
+ this.closeAllMenusEvent = new EventEmitter();
13895
+ this.selectItemEvent = new EventEmitter();
13896
+ this.openItemMenuEvent = new EventEmitter();
13897
+ this.closeItemMenuEvent = new EventEmitter();
13898
+ this.createMenuEvent = new EventEmitter();
13853
13899
  }
13854
- get thumbnailSize() {
13855
- return this._thumbnailSize;
13900
+ };
13901
+ TieredMenuEventService = __decorate([
13902
+ Injectable()
13903
+ ], TieredMenuEventService);
13904
+
13905
+ let TieredMenuItemComponent = class TieredMenuItemComponent {
13906
+ constructor(_tieredMenuEventService) {
13907
+ this._tieredMenuEventService = _tieredMenuEventService;
13908
+ this.focused = false;
13909
+ this.highlight = false;
13910
+ this.triggerEvent = "click";
13911
+ this.closeOnClick = false;
13856
13912
  }
13857
- onResize() {
13858
- this.update();
13913
+ onClick() {
13914
+ if (this.item.disabled)
13915
+ return;
13916
+ if (this.item.submenu) {
13917
+ if (!this.item.isOpen) {
13918
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
13919
+ }
13920
+ else if (this.closeOnClick) {
13921
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
13922
+ }
13923
+ }
13924
+ else {
13925
+ this._tieredMenuEventService.selectItemEvent.emit(this.item);
13926
+ }
13859
13927
  }
13860
- ngAfterContentInit() {
13861
- this.update();
13928
+ onMouseEnter() {
13929
+ if (this.item.disabled)
13930
+ return;
13931
+ if (this.triggerEvent === "hover" && !this.item.isOpen) {
13932
+ this._showTimeout = window.setTimeout(() => {
13933
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
13934
+ }, 300);
13935
+ }
13862
13936
  }
13863
- update() {
13864
- const windowWidth = window.innerWidth;
13865
- if (windowWidth <= Breakpoints.SM_MAX)
13866
- this.thumbnailSize = ThumbnailSize.Small;
13867
- else
13868
- this.thumbnailSize = ThumbnailSize.Medium;
13937
+ onMouseLeave() {
13938
+ window.clearTimeout(this._showTimeout);
13869
13939
  }
13870
13940
  };
13871
- ObjectCardMainComponent.nextId = 0;
13872
- __decorate([
13873
- Input()
13874
- ], ObjectCardMainComponent.prototype, "id", void 0);
13875
- __decorate([
13876
- Input()
13877
- ], ObjectCardMainComponent.prototype, "imageSource", void 0);
13878
- __decorate([
13879
- Input()
13880
- ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
13881
- __decorate([
13882
- Input()
13883
- ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
13884
- __decorate([
13885
- Input()
13886
- ], ObjectCardMainComponent.prototype, "iconClass", void 0);
13887
- __decorate([
13888
- Input()
13889
- ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
13890
- __decorate([
13891
- Input()
13892
- ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
13941
+ TieredMenuItemComponent.ctorParameters = () => [
13942
+ { type: TieredMenuEventService }
13943
+ ];
13893
13944
  __decorate([
13894
13945
  Input()
13895
- ], ObjectCardMainComponent.prototype, "isBrand", void 0);
13946
+ ], TieredMenuItemComponent.prototype, "item", void 0);
13896
13947
  __decorate([
13897
13948
  Input()
13898
- ], ObjectCardMainComponent.prototype, "label", void 0);
13949
+ ], TieredMenuItemComponent.prototype, "focused", void 0);
13899
13950
  __decorate([
13900
13951
  Input()
13901
- ], ObjectCardMainComponent.prototype, "description", void 0);
13952
+ ], TieredMenuItemComponent.prototype, "highlight", void 0);
13902
13953
  __decorate([
13903
13954
  Input()
13904
- ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
13955
+ ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
13905
13956
  __decorate([
13906
13957
  Input()
13907
- ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
13958
+ ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
13908
13959
  __decorate([
13909
- Output()
13910
- ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
13960
+ HostListener("click"),
13961
+ HostListener("touchend")
13962
+ ], TieredMenuItemComponent.prototype, "onClick", null);
13911
13963
  __decorate([
13912
- ContentChild(ThumbnailComponent, { static: true })
13913
- ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
13964
+ HostListener("mouseenter")
13965
+ ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
13914
13966
  __decorate([
13915
- HostListener("window:resize")
13916
- ], ObjectCardMainComponent.prototype, "onResize", null);
13917
- ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
13967
+ HostListener("mouseleave")
13968
+ ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
13969
+ TieredMenuItemComponent = __decorate([
13918
13970
  Component({
13919
- selector: "s-object-card-main",
13920
- 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",
13921
- 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}}"]
13971
+ selector: "s-tiered-menu-item",
13972
+ 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>",
13973
+ 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}"]
13922
13974
  })
13923
- ], ObjectCardMainComponent);
13924
-
13925
- var EnumSeverity;
13926
- (function (EnumSeverity) {
13927
- EnumSeverity["Default"] = "Default";
13928
- EnumSeverity["Info"] = "Info";
13929
- EnumSeverity["Warn"] = "Warn";
13930
- EnumSeverity["Error"] = "Error";
13931
- EnumSeverity["Success"] = "Success";
13932
- })(EnumSeverity || (EnumSeverity = {}));
13975
+ ], TieredMenuItemComponent);
13933
13976
 
13934
- var ObjectCardComponent_1;
13935
- const elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
13936
- let ObjectCardComponent = ObjectCardComponent_1 = class ObjectCardComponent {
13937
- constructor(cdr, elementRef) {
13938
- this.cdr = cdr;
13939
- this.elementRef = elementRef;
13940
- this.id = `s-object-card-${ObjectCardComponent_1.nextId++}`;
13941
- this.expanded = false;
13942
- this.expandTooltip = "Abrir painel";
13943
- this.collapseTooltip = "Fechar painel";
13944
- this.fieldsMinWidth = 200;
13945
- this.expandedChange = new EventEmitter();
13946
- this.maxVisibleFields = 0;
13947
- this.severity = EnumSeverity.Default;
13948
- this.EnumSeverity = EnumSeverity;
13977
+ let TieredMenuService = class TieredMenuService {
13978
+ constructor() {
13979
+ this.currentItems = [];
13980
+ this.items = [];
13949
13981
  }
13950
- ngAfterViewInit() {
13951
- this.update();
13952
- this.cdr.detectChanges();
13953
- this.fields.changes.subscribe(() => {
13954
- this.update();
13982
+ normalizeData(items, parent) {
13983
+ return items.map((i) => {
13984
+ const item = Object.assign({ visible: true }, i);
13985
+ if (item.submenu) {
13986
+ item.submenu = this.normalizeData(item.submenu, item);
13987
+ }
13988
+ item.id = this._generateId();
13989
+ item.parent = parent;
13990
+ item.isOpen = false;
13991
+ return item;
13955
13992
  });
13956
- const erd = elementResizeDetectorMaker({
13957
- strategy: "scroll",
13993
+ }
13994
+ markAllItemsAsClosed(items) {
13995
+ return items.map((i) => {
13996
+ const item = Object.assign({}, i);
13997
+ if (item.submenu) {
13998
+ item.submenu = this.markAllItemsAsClosed(item.submenu);
13999
+ }
14000
+ item.isOpen = false;
14001
+ return item;
13958
14002
  });
13959
- erd.listenTo(this.elementRef.nativeElement, () => this.update());
13960
14003
  }
13961
- update() {
13962
- const windowWidth = window.innerWidth;
13963
- const containerWidth = this.elementRef.nativeElement.offsetWidth;
13964
- const mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
13965
- const fieldsMinWidth = this.fieldsMinWidth;
13966
- const expandIconWidth = 50;
13967
- const fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
13968
- for (const element of fieldElementList) {
13969
- element.style.minWidth = `${this.fieldsMinWidth}px`;
14004
+ searchTheHierarchy(itemA, itemB) {
14005
+ let item = itemB;
14006
+ while (item) {
14007
+ if (item === itemA) {
14008
+ return true;
14009
+ }
14010
+ item = item.parent;
13970
14011
  }
13971
- let maxFieldQtd;
13972
- if (windowWidth <= Breakpoints.SM_MAX)
13973
- maxFieldQtd = 0;
13974
- else
13975
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
13976
- if (maxFieldQtd && maxFieldQtd < this.fields.length) {
13977
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
14012
+ return false;
14013
+ }
14014
+ cloneItems(items) {
14015
+ return JSON.parse(JSON.stringify(items));
14016
+ }
14017
+ _generateId() {
14018
+ return `id-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}`;
14019
+ }
14020
+ };
14021
+ TieredMenuService = __decorate([
14022
+ Injectable()
14023
+ ], TieredMenuService);
14024
+
14025
+ let TieredMenuNestedComponent = class TieredMenuNestedComponent {
14026
+ constructor(tieredMenuService, _tieredMenuEventService) {
14027
+ this.tieredMenuService = tieredMenuService;
14028
+ this._tieredMenuEventService = _tieredMenuEventService;
14029
+ this.top = 0;
14030
+ this.left = 0;
14031
+ this._unsubscribe$ = new Subject();
14032
+ }
14033
+ onResize() {
14034
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14035
+ }
14036
+ onDocumentClick(event) {
14037
+ // Closing menu when clicked outside.
14038
+ const target = event.target;
14039
+ const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
14040
+ if (!clickedInside) {
14041
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
13978
14042
  }
13979
- this.maxVisibleFields = maxFieldQtd;
13980
- if (maxFieldQtd >= this.fields.length && this.expanded)
13981
- this.collapse();
13982
14043
  }
13983
- toggle() {
13984
- this.expanded ? this.collapse() : this.expand();
14044
+ onKeydownHandler(event) {
14045
+ switch (event.key) {
14046
+ case "Escape":
14047
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14048
+ break;
14049
+ case " ":
14050
+ case "Enter":
14051
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
14052
+ break;
14053
+ case "ArrowLeft":
14054
+ // When nested I need a reference to the current item's parent item, otherwise just the current item.
14055
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
14056
+ break;
14057
+ case "ArrowRight":
14058
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
14059
+ break;
14060
+ case "ArrowUp":
14061
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
14062
+ break;
14063
+ case "ArrowDown":
14064
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
14065
+ break;
14066
+ }
13985
14067
  }
13986
- expand() {
13987
- this.expanded = true;
13988
- this.expandedChange.emit(this.expanded);
14068
+ ngOnInit() {
14069
+ this.tieredMenuService.currentItems = this.items;
14070
+ this._subscribeEvents();
13989
14071
  }
13990
- collapse() {
13991
- this.expanded = false;
13992
- this.expandedChange.emit(this.expanded);
14072
+ ngOnDestroy() {
14073
+ this._unsubscribe$.next();
14074
+ this._unsubscribe$.complete();
13993
14075
  }
13994
- getExpandedFieldWidth() {
13995
- const containerWidth = this.elementRef.nativeElement.offsetWidth;
13996
- let fieldsPerRow;
13997
- if (containerWidth <= Breakpoints.SM_MAX)
13998
- fieldsPerRow = 1;
13999
- else if (containerWidth <= Breakpoints.MD_MAX)
14000
- fieldsPerRow = 2;
14001
- else if (containerWidth <= Breakpoints.LG_MAX)
14002
- fieldsPerRow = 4;
14003
- else
14004
- fieldsPerRow = 6;
14005
- return 12 / fieldsPerRow;
14076
+ _incrementCurItem() {
14077
+ if (!this.tieredMenuService.currentItem) {
14078
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14079
+ return;
14080
+ }
14081
+ const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
14082
+ if (curIndex < this.tieredMenuService.currentItems.length) {
14083
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
14084
+ }
14085
+ else {
14086
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14087
+ }
14088
+ if (this.tieredMenuService.currentItem.divider) {
14089
+ this._incrementCurItem();
14090
+ }
14091
+ }
14092
+ _decrementCurItem() {
14093
+ if (!this.tieredMenuService.currentItem) {
14094
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14095
+ return;
14096
+ }
14097
+ const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
14098
+ if (curIndex >= 0) {
14099
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
14100
+ }
14101
+ else {
14102
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
14103
+ }
14104
+ if (this.tieredMenuService.currentItem.divider) {
14105
+ this._decrementCurItem();
14106
+ }
14107
+ }
14108
+ _closeItem(item) {
14109
+ var _a;
14110
+ let itemAux = this._lastOpenItem;
14111
+ while (itemAux && itemAux != item) {
14112
+ itemAux.isOpen = false;
14113
+ itemAux = itemAux.parent;
14114
+ }
14115
+ item.isOpen = false;
14116
+ this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
14117
+ this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
14118
+ }
14119
+ _openItem(item) {
14120
+ if (item === null || item === void 0 ? void 0 : item.submenu) {
14121
+ item.isOpen = true;
14122
+ this.tieredMenuService.currentItems = item.submenu;
14123
+ // Only has focus if there has already been interaction.
14124
+ if (this.tieredMenuService.currentItem) {
14125
+ this.tieredMenuService.currentItem = item.submenu[0];
14126
+ }
14127
+ this._lastOpenItem = item;
14128
+ }
14129
+ }
14130
+ _subscribeEvents() {
14131
+ this._tieredMenuEventService.incrementCurrentItemEvent
14132
+ .pipe(takeUntil(this._unsubscribe$))
14133
+ .subscribe(() => {
14134
+ this._incrementCurItem();
14135
+ });
14136
+ this._tieredMenuEventService.decrementCurrentItemEvent
14137
+ .pipe(takeUntil(this._unsubscribe$))
14138
+ .subscribe(() => {
14139
+ this._decrementCurItem();
14140
+ });
14141
+ this._tieredMenuEventService.selectItemEvent
14142
+ .pipe(takeUntil(this._unsubscribe$))
14143
+ .subscribe((item) => {
14144
+ if (item.command) {
14145
+ item.command();
14146
+ // Close all menus after the item was selected.
14147
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14148
+ }
14149
+ });
14150
+ this._tieredMenuEventService.openItemMenuEvent
14151
+ .pipe(takeUntil(this._unsubscribe$))
14152
+ .subscribe((item) => {
14153
+ var _a, _b;
14154
+ if (!this.tieredMenuService.currentItems.includes(item)) {
14155
+ let itemAux = this._lastOpenItem;
14156
+ while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
14157
+ itemAux = itemAux.parent;
14158
+ }
14159
+ this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
14160
+ }
14161
+ this._lastOpenItem = item;
14162
+ this._openItem(item);
14163
+ });
14164
+ this._tieredMenuEventService.closeItemMenuEvent
14165
+ .pipe(takeUntil(this._unsubscribe$))
14166
+ .subscribe((item) => {
14167
+ if (item) {
14168
+ this._closeItem(item);
14169
+ }
14170
+ });
14006
14171
  }
14007
14172
  };
14008
- ObjectCardComponent.nextId = 0;
14009
- ObjectCardComponent.ctorParameters = () => [
14010
- { type: ChangeDetectorRef },
14011
- { type: ElementRef }
14173
+ TieredMenuNestedComponent.ctorParameters = () => [
14174
+ { type: TieredMenuService },
14175
+ { type: TieredMenuEventService }
14012
14176
  ];
14013
14177
  __decorate([
14014
- Input()
14015
- ], ObjectCardComponent.prototype, "id", void 0);
14016
- __decorate([
14017
- Input()
14018
- ], ObjectCardComponent.prototype, "expanded", void 0);
14019
- __decorate([
14020
- Input()
14021
- ], ObjectCardComponent.prototype, "expandTooltip", void 0);
14022
- __decorate([
14023
- Input()
14024
- ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
14025
- __decorate([
14026
- Input()
14027
- ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
14028
- __decorate([
14029
- Output()
14030
- ], ObjectCardComponent.prototype, "expandedChange", void 0);
14031
- __decorate([
14032
- ContentChild(ObjectCardMainComponent, { static: true })
14033
- ], ObjectCardComponent.prototype, "main", void 0);
14034
- __decorate([
14035
- ContentChildren(ObjectCardFieldComponent, { descendants: true })
14036
- ], ObjectCardComponent.prototype, "fields", void 0);
14178
+ HostListener("window:resize")
14179
+ ], TieredMenuNestedComponent.prototype, "onResize", null);
14037
14180
  __decorate([
14038
- Input()
14039
- ], ObjectCardComponent.prototype, "severity", void 0);
14181
+ HostListener("document:click", ["$event"])
14182
+ ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
14040
14183
  __decorate([
14041
- Input()
14042
- ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
14043
- ObjectCardComponent = ObjectCardComponent_1 = __decorate([
14184
+ HostListener("document:keydown", ["$event"])
14185
+ ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
14186
+ TieredMenuNestedComponent = __decorate([
14044
14187
  Component({
14045
- selector: "s-object-card",
14046
- 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",
14047
- animations: [
14048
- trigger("expandableContent", [
14049
- state("*", style$7({
14050
- height: "0",
14051
- })),
14052
- state("false", style$7({
14053
- height: "0",
14054
- })),
14055
- state("true", style$7({
14056
- height: "*",
14057
- })),
14058
- transition("* => true", animate("200ms ease-out")),
14059
- transition("false <=> true", animate("200ms ease-out")),
14060
- ]),
14061
- trigger("BorderButtonAnimation", [
14062
- transition(":enter", [
14063
- style$7({ transform: "scaleY(0)", opacity: 0 }),
14064
- animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
14065
- ]),
14066
- transition(":leave", [
14067
- style$7({ transform: "scaleY(1)", opacity: 1 }),
14068
- animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
14069
- ]),
14070
- ]),
14071
- ],
14072
- 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)}}"]
14188
+ 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",
14189
+ 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}"]
14073
14190
  })
14074
- ], ObjectCardComponent);
14191
+ ], TieredMenuNestedComponent);
14075
14192
 
14076
- let BorderButtonComponent = class BorderButtonComponent {
14077
- constructor() {
14078
- this.severity = EnumSeverity.Default;
14079
- this.EnumSeverity = EnumSeverity;
14080
- this.TooltipPosition = TooltipPosition;
14193
+ var TieredMenuComponent_1;
14194
+ let TieredMenuComponent = TieredMenuComponent_1 = class TieredMenuComponent {
14195
+ constructor(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
14196
+ this._appRef = _appRef;
14197
+ this._componentFactoryResolver = _componentFactoryResolver;
14198
+ this._injector = _injector;
14199
+ this._changeDetectorRef = _changeDetectorRef;
14200
+ this.tieredMenuService = tieredMenuService;
14201
+ this._tieredMenuEventService = _tieredMenuEventService;
14202
+ this.top = 0;
14203
+ this.left = 0;
14204
+ this.menuTriggerEvent = "hover";
14205
+ this._componentRef = null;
14206
+ this._unsubscribe$ = new Subject();
14207
+ this.destroyRequest = new EventEmitter();
14081
14208
  }
14082
- };
14083
- __decorate([
14084
- Input()
14085
- ], BorderButtonComponent.prototype, "severity", void 0);
14086
- __decorate([
14087
- Input()
14088
- ], BorderButtonComponent.prototype, "options", void 0);
14089
- BorderButtonComponent = __decorate([
14090
- Component({
14091
- selector: "s-border-button",
14092
- 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>",
14093
- 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}"]
14094
- })
14095
- ], BorderButtonComponent);
14096
-
14097
- let BorderButtonModule = class BorderButtonModule {
14098
- };
14099
- BorderButtonModule = __decorate([
14100
- NgModule({
14101
- imports: [CommonModule, TooltipModule],
14102
- declarations: [BorderButtonComponent],
14103
- exports: [BorderButtonComponent]
14104
- })
14105
- ], BorderButtonModule);
14106
-
14107
- let ObjectCardModule = class ObjectCardModule {
14108
- };
14109
- ObjectCardModule = __decorate([
14110
- NgModule({
14111
- imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
14112
- declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
14113
- exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
14114
- })
14115
- ], ObjectCardModule);
14116
-
14117
- var ProductHeaderComponent_1;
14118
- let ProductHeaderComponent = ProductHeaderComponent_1 = class ProductHeaderComponent {
14119
- constructor() {
14120
- this.id = `s-product-header-${ProductHeaderComponent_1.nextId++}`;
14121
- this.baseZIndex = 0;
14122
- this.isHeaderFrame = true;
14209
+ onResize() {
14210
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14123
14211
  }
14124
- ngAfterViewInit() {
14125
- this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++DomHandler.zindex);
14126
- if (this.isHeaderFrame) {
14127
- this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
14128
- }
14129
- else {
14130
- this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
14212
+ onDocumentClick(event) {
14213
+ // Closing menu when clicked outside.
14214
+ const target = event.target;
14215
+ const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
14216
+ if (!clickedInside) {
14217
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14131
14218
  }
14132
14219
  }
14133
- };
14134
- ProductHeaderComponent.nextId = 0;
14135
- __decorate([
14136
- Input()
14137
- ], ProductHeaderComponent.prototype, "id", void 0);
14138
- __decorate([
14139
- Input()
14140
- ], ProductHeaderComponent.prototype, "header", void 0);
14141
- __decorate([
14142
- Input()
14143
- ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
14144
- __decorate([
14145
- Input()
14146
- ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
14147
- __decorate([
14148
- ViewChild("headerContainer", { static: false })
14149
- ], ProductHeaderComponent.prototype, "container", void 0);
14150
- ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
14151
- Component({
14152
- selector: "s-product-header",
14153
- 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",
14154
- 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}"]
14155
- })
14156
- ], ProductHeaderComponent);
14157
-
14158
- let ProductHeaderModule = class ProductHeaderModule {
14159
- };
14160
- ProductHeaderModule = __decorate([
14161
- NgModule({
14162
- imports: [CommonModule, TooltipModule$1, ThumbnailModule],
14163
- declarations: [ProductHeaderComponent],
14164
- exports: [ProductHeaderComponent, ThumbnailModule],
14165
- })
14166
- ], ProductHeaderModule);
14167
-
14168
- var ProgressBarColors;
14169
- (function (ProgressBarColors) {
14170
- ProgressBarColors["Blue"] = "blue";
14171
- ProgressBarColors["Green"] = "green";
14172
- ProgressBarColors["Red"] = "red";
14173
- ProgressBarColors["Yellow"] = "yellow";
14174
- })(ProgressBarColors || (ProgressBarColors = {}));
14175
-
14176
- var ProgressBarMode;
14177
- (function (ProgressBarMode) {
14178
- ProgressBarMode["Determinate"] = "determinate";
14179
- ProgressBarMode["Indeterminate"] = "indeterminate";
14180
- })(ProgressBarMode || (ProgressBarMode = {}));
14181
-
14182
- let ProgressBarComponent = class ProgressBarComponent {
14183
- constructor() {
14184
- this.numberFormatOptions = {
14185
- style: "decimal",
14186
- minimumFractionDigits: 0,
14187
- maximumFractionDigits: 2,
14188
- };
14189
- this.showValue = true;
14190
- this.mode = ProgressBarMode.Determinate;
14220
+ onKeydownHandler(event) {
14221
+ switch (event.key) {
14222
+ case "Escape":
14223
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14224
+ break;
14225
+ case " ":
14226
+ case "Enter":
14227
+ if (!this.tieredMenuService.currentItem.disabled) {
14228
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
14229
+ }
14230
+ break;
14231
+ case "ArrowLeft":
14232
+ if (this.items.includes(this.tieredMenuService.currentItem)) {
14233
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
14234
+ this._changeDetectorRef.detectChanges();
14235
+ }
14236
+ break;
14237
+ case "ArrowRight":
14238
+ if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
14239
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
14240
+ event.stopImmediatePropagation();
14241
+ }
14242
+ break;
14243
+ case "ArrowUp":
14244
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
14245
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
14246
+ event.stopImmediatePropagation();
14247
+ }
14248
+ break;
14249
+ case "ArrowDown":
14250
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
14251
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
14252
+ event.stopImmediatePropagation();
14253
+ }
14254
+ break;
14255
+ }
14191
14256
  }
14192
14257
  ngOnInit() {
14193
- this.validateInputs();
14258
+ this.tieredMenuService.currentItems = this.items;
14259
+ this._subscribeEvents();
14194
14260
  }
14195
- validateInputs() {
14196
- if (this.value < 0 || this.value > 100) {
14197
- throw new Error("Invalid value for value");
14261
+ ngOnDestroy() {
14262
+ this._unsubscribe$.next();
14263
+ this._unsubscribe$.complete();
14264
+ }
14265
+ _incrementCurItem() {
14266
+ if (!this.tieredMenuService.currentItem) {
14267
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14268
+ return;
14198
14269
  }
14199
- if (this.targetValue < 0 || this.targetValue > 100) {
14200
- throw new Error("Invalid value for targetValue");
14270
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
14271
+ // Checking if it is the current menu.
14272
+ return;
14201
14273
  }
14202
- if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
14203
- throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
14274
+ const currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
14275
+ if (currentIndex < this.tieredMenuService.currentItems.length) {
14276
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
14277
+ }
14278
+ else {
14279
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14280
+ }
14281
+ if (this.tieredMenuService.currentItem.divider) {
14282
+ this._incrementCurItem();
14204
14283
  }
14205
14284
  }
14206
- };
14207
- __decorate([
14208
- Input()
14209
- ], ProgressBarComponent.prototype, "value", void 0);
14210
- __decorate([
14211
- Input()
14212
- ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
14213
- __decorate([
14214
- Input()
14215
- ], ProgressBarComponent.prototype, "targetValue", void 0);
14216
- __decorate([
14217
- Input()
14218
- ], ProgressBarComponent.prototype, "label", void 0);
14219
- __decorate([
14220
- Input()
14221
- ], ProgressBarComponent.prototype, "targetLabel", void 0);
14222
- __decorate([
14223
- Input()
14224
- ], ProgressBarComponent.prototype, "activeColor", void 0);
14225
- __decorate([
14226
- Input()
14227
- ], ProgressBarComponent.prototype, "showValue", void 0);
14228
- __decorate([
14229
- Input()
14230
- ], ProgressBarComponent.prototype, "mode", void 0);
14231
- ProgressBarComponent = __decorate([
14232
- Component({
14233
- selector: "s-progressbar",
14234
- 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>",
14235
- 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}"]
14236
- })
14237
- ], ProgressBarComponent);
14238
-
14239
- let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
14240
- constructor(localeService) {
14241
- this.localeService = localeService;
14242
- this.showValue = true;
14243
- }
14244
- ngOnInit() {
14245
- this.validateValues();
14246
- this.onGetLocale();
14285
+ _decrementCurItem() {
14286
+ if (!this.tieredMenuService.currentItem) {
14287
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
14288
+ return;
14289
+ // Checking if it is the current menu.
14290
+ }
14291
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
14292
+ return;
14293
+ }
14294
+ const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
14295
+ if (curIndex >= 0) {
14296
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
14297
+ }
14298
+ else {
14299
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
14300
+ }
14301
+ if (this.tieredMenuService.currentItem.divider) {
14302
+ this._decrementCurItem();
14303
+ }
14247
14304
  }
14248
- onGetLocale() {
14249
- this.localeService.getLocale().subscribe({
14250
- next: (locale) => {
14251
- this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", this.numberFormatOptions);
14252
- },
14253
- error: () => {
14254
- this.numberFormat = new Intl.NumberFormat("pt-BR", this.numberFormatOptions);
14255
- },
14256
- });
14305
+ _createMenu(items, position) {
14306
+ if (!this._componentRef && items) {
14307
+ const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
14308
+ this._componentRef = componentFactory.create(this._injector);
14309
+ this._appRef.attachView(this._componentRef.hostView);
14310
+ const domElem = this._componentRef.hostView.rootNodes[0];
14311
+ document.body.appendChild(domElem);
14312
+ // Setting the menu items.
14313
+ this._componentRef.instance.items = items;
14314
+ // Subscribe menu events.
14315
+ this._componentRef.instance.destroyRequest.subscribe((propagate) => {
14316
+ this._destroy(propagate);
14317
+ });
14318
+ this._menuDivElement = domElem.querySelector(".menu");
14319
+ this._setMenuPosition(position);
14320
+ }
14257
14321
  }
14258
- validateValues() {
14259
- if (this.value < 0 || this.value > 100) {
14260
- throw new Error("Invalid value for value");
14322
+ _destroy(propagate = true) {
14323
+ if (this._componentRef !== null) {
14324
+ this._appRef.detachView(this._componentRef.hostView);
14325
+ this._componentRef.destroy();
14326
+ this._componentRef = null;
14327
+ this._menuDivElement = null;
14261
14328
  }
14262
- if (this.targetValue < 0 || this.targetValue > 100) {
14263
- throw new Error("Invalid value for targetValue");
14329
+ if (propagate) {
14330
+ this.destroyRequest.emit();
14331
+ }
14332
+ }
14333
+ _setMenuPosition(position) {
14334
+ var _a, _b;
14335
+ const ITEM_HEIGHT = 37;
14336
+ const DIVIDER_HEIGHT = 5;
14337
+ const PADDING = 8;
14338
+ if (this._componentRef !== null) {
14339
+ const { top, right, bottom, left } = position;
14340
+ const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
14341
+ return !item.divider ? count + 1 : count;
14342
+ }, 0);
14343
+ const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
14344
+ return item.divider ? count + 1 : count;
14345
+ }, 0);
14346
+ // I need to calculate the height of the component because the internal elements have not been created yet.
14347
+ const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
14348
+ const menuWidth = this._menuDivElement.getBoundingClientRect().width;
14349
+ const rightFreeSpace = window.innerWidth - right;
14350
+ const bottomFreeSpace = window.innerHeight - bottom;
14351
+ if (rightFreeSpace > menuWidth) {
14352
+ this._componentRef.instance.left = right;
14353
+ }
14354
+ else {
14355
+ this._componentRef.instance.left = left - menuWidth;
14356
+ }
14357
+ if (bottomFreeSpace <= menuHeight) {
14358
+ this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
14359
+ }
14360
+ else {
14361
+ this._componentRef.instance.top = window.scrollY + top;
14362
+ }
14264
14363
  }
14265
14364
  }
14365
+ _subscribeEvents() {
14366
+ // Increment current item event.
14367
+ this._tieredMenuEventService.incrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
14368
+ this._incrementCurItem();
14369
+ });
14370
+ // Decrement current item event.
14371
+ this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
14372
+ this._decrementCurItem();
14373
+ });
14374
+ // Select item event.
14375
+ this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
14376
+ if (item.submenu) {
14377
+ this._tieredMenuEventService.openItemMenuEvent.emit(item);
14378
+ }
14379
+ else if (item.command) {
14380
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14381
+ item.command();
14382
+ }
14383
+ });
14384
+ // Close all menus event.
14385
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
14386
+ this._destroy();
14387
+ this.tieredMenuService.currentItem = null;
14388
+ this.tieredMenuService.currentItems = this.tieredMenuService.items;
14389
+ this.tieredMenuService.markAllItemsAsClosed(this.tieredMenuService.items);
14390
+ });
14391
+ // Open item menu event.
14392
+ this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
14393
+ if (this.tieredMenuService.currentItem) {
14394
+ if (this.tieredMenuService.currentItem.parent === item) {
14395
+ return;
14396
+ }
14397
+ if (!this.tieredMenuService.searchTheHierarchy(this.tieredMenuService.currentItem.parent, item)) {
14398
+ let current = this.tieredMenuService.currentItem;
14399
+ current.isOpen = false;
14400
+ while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
14401
+ this._tieredMenuEventService.closeItemMenuEvent.emit(current);
14402
+ this._changeDetectorRef.detectChanges();
14403
+ current = current.parent;
14404
+ }
14405
+ if (current) {
14406
+ current.isOpen = false;
14407
+ }
14408
+ }
14409
+ }
14410
+ if (item.submenu && !item.isOpen && this.items.includes(item)) {
14411
+ const { top, right, left, bottom } = document.querySelector(`#${item.id}`).getBoundingClientRect();
14412
+ const position = { top, right, left, bottom };
14413
+ this._createMenu(item.submenu, position);
14414
+ this.tieredMenuService.currentItems = item.submenu;
14415
+ this.tieredMenuService.currentItem = item.submenu[0];
14416
+ item.isOpen = true;
14417
+ }
14418
+ });
14419
+ // Close item menu event.
14420
+ this._tieredMenuEventService.closeItemMenuEvent
14421
+ .pipe(takeUntil(this._unsubscribe$))
14422
+ .subscribe((item) => {
14423
+ var _a, _b;
14424
+ if (this.items.some((i) => i.id === item.id)) {
14425
+ if (item.parent) {
14426
+ item.parent.isOpen = false;
14427
+ }
14428
+ 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;
14429
+ this.tieredMenuService.currentItem = item.parent;
14430
+ this.destroyRequest.emit(false);
14431
+ }
14432
+ });
14433
+ }
14266
14434
  };
14267
- ProgressBarDeterminateComponent.ctorParameters = () => [
14268
- { type: LocaleService }
14435
+ TieredMenuComponent.ctorParameters = () => [
14436
+ { type: ApplicationRef },
14437
+ { type: ComponentFactoryResolver },
14438
+ { type: Injector },
14439
+ { type: ChangeDetectorRef },
14440
+ { type: TieredMenuService },
14441
+ { type: TieredMenuEventService }
14269
14442
  ];
14270
14443
  __decorate([
14271
- Input()
14272
- ], ProgressBarDeterminateComponent.prototype, "value", void 0);
14273
- __decorate([
14274
- Input()
14275
- ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
14276
- __decorate([
14277
- Input()
14278
- ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
14279
- __decorate([
14280
- Input()
14281
- ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
14282
- __decorate([
14283
- Input()
14284
- ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
14444
+ Output()
14445
+ ], TieredMenuComponent.prototype, "destroyRequest", void 0);
14285
14446
  __decorate([
14286
- Input()
14287
- ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
14288
- ProgressBarDeterminateComponent = __decorate([
14289
- Component({
14290
- selector: "s-progressbar-determinate",
14291
- 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",
14292
- 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}"]
14293
- })
14294
- ], ProgressBarDeterminateComponent);
14295
-
14296
- let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
14297
- };
14447
+ HostListener("window:resize")
14448
+ ], TieredMenuComponent.prototype, "onResize", null);
14298
14449
  __decorate([
14299
- Input()
14300
- ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
14450
+ HostListener("document:click", ["$event"])
14451
+ ], TieredMenuComponent.prototype, "onDocumentClick", null);
14301
14452
  __decorate([
14302
- Input()
14303
- ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
14304
- ProgressBarIndeterminateComponent = __decorate([
14453
+ HostListener("document:keydown", ["$event"])
14454
+ ], TieredMenuComponent.prototype, "onKeydownHandler", null);
14455
+ TieredMenuComponent = TieredMenuComponent_1 = __decorate([
14305
14456
  Component({
14306
- selector: "s-progressbar-indeterminate",
14307
- 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",
14308
- 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%)}}"]
14457
+ selector: "s-tiered-menu",
14458
+ 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>",
14459
+ 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}"]
14309
14460
  })
14310
- ], ProgressBarIndeterminateComponent);
14461
+ ], TieredMenuComponent);
14311
14462
 
14312
- let ProgressBarModule = class ProgressBarModule {
14463
+ let TieredMenuGlobalService = class TieredMenuGlobalService {
14313
14464
  };
14314
- ProgressBarModule = __decorate([
14315
- NgModule({
14316
- imports: [CommonModule],
14317
- declarations: [
14318
- ProgressBarComponent,
14319
- ProgressBarDeterminateComponent,
14320
- ProgressBarIndeterminateComponent,
14321
- ],
14322
- exports: [ProgressBarComponent],
14323
- })
14324
- ], ProgressBarModule);
14465
+ TieredMenuGlobalService = __decorate([
14466
+ Injectable()
14467
+ ], TieredMenuGlobalService);
14325
14468
 
14326
- let PanelComponent = class PanelComponent {
14327
- constructor() {
14328
- this.toggleable = true;
14329
- this.collapsed = false;
14330
- this.severity = EnumSeverity.Default;
14331
- this.collapsedChange = new EventEmitter();
14332
- this.EnumSeverity = EnumSeverity;
14469
+ let TieredMenuDirective = class TieredMenuDirective {
14470
+ constructor(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
14471
+ this._elementRef = _elementRef;
14472
+ this._appRef = _appRef;
14473
+ this._componentFactoryResolver = _componentFactoryResolver;
14474
+ this._injector = _injector;
14475
+ this._tieredMenuEventService = _tieredMenuEventService;
14476
+ this._tieredMenuService = _tieredMenuService;
14477
+ this._tieredMenuGlobalService = _tieredMenuGlobalService;
14478
+ this._changeDetectorRef = _changeDetectorRef;
14479
+ this.items = [];
14480
+ this.triggerEvent = "click";
14481
+ this._componentRef = null;
14482
+ this._isNested = false;
14483
+ this._isOpen = false;
14484
+ this._unsubscribe$ = new Subject();
14333
14485
  }
14334
- onCollapsedChange(collapsed) {
14335
- this.collapsed = collapsed;
14336
- this.collapsedChange.emit(this.collapsed);
14486
+ onClick(event) {
14487
+ if (this.triggerEvent === "click" && !this._isOpen) {
14488
+ this._lastActiveElement = document.activeElement;
14489
+ this._createMenu();
14490
+ event.preventDefault();
14491
+ event.stopPropagation();
14492
+ }
14493
+ }
14494
+ ngOnInit() {
14495
+ this._subscribeEvents();
14496
+ }
14497
+ ngDoCheck() {
14498
+ if (!this.previousItems) {
14499
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
14500
+ }
14501
+ let hasChanges = false;
14502
+ if (this.items.length !== this.previousItems.length) {
14503
+ hasChanges = true;
14504
+ }
14505
+ else {
14506
+ for (let i = 0; i < this.items.length; i++) {
14507
+ if (!this._compareItems(this.items[i], this.previousItems[i])) {
14508
+ hasChanges = true;
14509
+ break;
14510
+ }
14511
+ }
14512
+ }
14513
+ if (hasChanges) {
14514
+ this._updateServiceItems();
14515
+ this._changeDetectorRef.detectChanges();
14516
+ this._rebuildMenu();
14517
+ }
14518
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
14519
+ }
14520
+ ngOnDestroy() {
14521
+ this._unsubscribe$.next();
14522
+ this._unsubscribe$.complete();
14523
+ this._destroy();
14524
+ }
14525
+ _createMenu() {
14526
+ var _a, _b, _c;
14527
+ this._updateServiceItems();
14528
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
14529
+ (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
14530
+ this._tieredMenuGlobalService.lastInstance = this;
14531
+ (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
14532
+ this._isOpen = true;
14533
+ this._isNested = document.body.clientWidth < 600;
14534
+ this._isNested ? this._createNestedMenu() : this._createTieredMenu();
14535
+ }
14536
+ }
14537
+ _createTieredMenu() {
14538
+ var _a;
14539
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
14540
+ const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
14541
+ this._componentRef = componentFactory.create(this._injector);
14542
+ this._appRef.attachView(this._componentRef.hostView);
14543
+ const domElem = this._componentRef.hostView.rootNodes[0];
14544
+ document.body.appendChild(domElem);
14545
+ this._setMenuComponentProperties();
14546
+ this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
14547
+ this._destroy();
14548
+ });
14549
+ this._setMenuPosition();
14550
+ }
14551
+ }
14552
+ _createNestedMenu() {
14553
+ var _a;
14554
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
14555
+ const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
14556
+ this._componentRef = componentFactory.create(this._injector);
14557
+ this._appRef.attachView(this._componentRef.hostView);
14558
+ const domElem = this._componentRef.hostView.rootNodes[0];
14559
+ document.body.appendChild(domElem);
14560
+ this._setMenuComponentProperties();
14561
+ this._setMenuPosition();
14562
+ }
14563
+ }
14564
+ _destroy() {
14565
+ if (this._componentRef) {
14566
+ this._isOpen = false;
14567
+ window.clearTimeout(this._showTimeout);
14568
+ this._appRef.detachView(this._componentRef.hostView);
14569
+ this._componentRef.destroy();
14570
+ this._componentRef = null;
14571
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
14572
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
14573
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
14574
+ }
14575
+ }
14576
+ _setMenuPosition() {
14577
+ var _a, _b;
14578
+ const ITEM_HEIGHT = 37;
14579
+ const ITEM_WIDTH = 176;
14580
+ const DIVIDER_HEIGHT = 5;
14581
+ const PADDING = 8;
14582
+ const MARGIN = 4;
14583
+ if (this._componentRef !== null) {
14584
+ this._componentRef.instance.top = 8;
14585
+ let { bottom, left, right } = this._elementRef.nativeElement.getBoundingClientRect();
14586
+ const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
14587
+ return !item.divider ? count + 1 : count;
14588
+ }, 0);
14589
+ const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
14590
+ return item.divider ? count + 1 : count;
14591
+ }, 0);
14592
+ const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
14593
+ const rightFreeSpace = window.innerWidth - right;
14594
+ const bottomFreeSpace = window.innerHeight - bottom;
14595
+ this._componentRef.instance.top = bottom;
14596
+ this._componentRef.instance.left = left;
14597
+ if (bottomFreeSpace <= menuHeight) {
14598
+ this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
14599
+ }
14600
+ else {
14601
+ this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
14602
+ }
14603
+ if (rightFreeSpace > 176) {
14604
+ this._componentRef.instance.left = window.scrollX + left;
14605
+ }
14606
+ else {
14607
+ this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
14608
+ }
14609
+ if (this._isNested) {
14610
+ this._componentRef.instance.left = MARGIN;
14611
+ }
14612
+ }
14613
+ }
14614
+ _setMenuComponentProperties() {
14615
+ if (this._componentRef != null) {
14616
+ this._componentRef.instance.items = this._tieredMenuService.items;
14617
+ }
14618
+ }
14619
+ _subscribeEvents() {
14620
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
14621
+ this._tieredMenuService.items = this._tieredMenuService.markAllItemsAsClosed(this._tieredMenuService.items);
14622
+ this._destroy();
14623
+ });
14624
+ }
14625
+ _compareItems(item1, item2) {
14626
+ return JSON.stringify(item1) === JSON.stringify(item2);
14627
+ }
14628
+ _rebuildMenu() {
14629
+ this._destroy();
14630
+ }
14631
+ _updateServiceItems() {
14632
+ this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
14633
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
14634
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
14337
14635
  }
14338
14636
  };
14637
+ TieredMenuDirective.ctorParameters = () => [
14638
+ { type: ElementRef },
14639
+ { type: ApplicationRef },
14640
+ { type: ComponentFactoryResolver },
14641
+ { type: Injector },
14642
+ { type: TieredMenuEventService },
14643
+ { type: TieredMenuService },
14644
+ { type: TieredMenuGlobalService },
14645
+ { type: ChangeDetectorRef }
14646
+ ];
14339
14647
  __decorate([
14340
14648
  Input()
14341
- ], PanelComponent.prototype, "header", void 0);
14342
- __decorate([
14343
- Input()
14344
- ], PanelComponent.prototype, "toggleable", void 0);
14345
- __decorate([
14346
- Input()
14347
- ], PanelComponent.prototype, "collapsed", void 0);
14348
- __decorate([
14349
- Input()
14350
- ], PanelComponent.prototype, "severity", void 0);
14649
+ ], TieredMenuDirective.prototype, "items", void 0);
14351
14650
  __decorate([
14352
14651
  Input()
14353
- ], PanelComponent.prototype, "borderButtonOptions", void 0);
14652
+ ], TieredMenuDirective.prototype, "triggerEvent", void 0);
14354
14653
  __decorate([
14355
- Output()
14356
- ], PanelComponent.prototype, "collapsedChange", void 0);
14357
- PanelComponent = __decorate([
14358
- Component({
14359
- selector: "s-panel",
14360
- 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>",
14361
- animations: [
14362
- trigger("BorderButtonAnimation", [
14363
- transition(":enter", [
14364
- style$7({ transform: "scaleY(0)", opacity: 0 }),
14365
- animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
14366
- ]),
14367
- transition(":leave", [
14368
- style$7({ transform: "scaleY(1)", opacity: 1 }),
14369
- animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
14370
- ]),
14371
- ]),
14654
+ HostListener("click", ["$event"])
14655
+ ], TieredMenuDirective.prototype, "onClick", null);
14656
+ TieredMenuDirective = __decorate([
14657
+ Directive({
14658
+ selector: "[sTieredMenu]",
14659
+ providers: [TieredMenuEventService, TieredMenuService],
14660
+ })
14661
+ ], TieredMenuDirective);
14662
+
14663
+ let TieredMenuModule = class TieredMenuModule {
14664
+ };
14665
+ TieredMenuModule = __decorate([
14666
+ NgModule({
14667
+ imports: [
14668
+ CommonModule,
14372
14669
  ],
14373
- 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}"]
14670
+ declarations: [
14671
+ TieredMenuDirective,
14672
+ TieredMenuComponent,
14673
+ TieredMenuNestedComponent,
14674
+ TieredMenuItemComponent,
14675
+ TieredMenuDividerComponent,
14676
+ ],
14677
+ exports: [TieredMenuDirective],
14678
+ providers: [TieredMenuGlobalService],
14374
14679
  })
14375
- ], PanelComponent);
14680
+ ], TieredMenuModule);
14376
14681
 
14377
- let PanelModule = class PanelModule {
14682
+ let NavigationButtonModule = class NavigationButtonModule {
14378
14683
  };
14379
- PanelModule = __decorate([
14684
+ NavigationButtonModule = __decorate([
14380
14685
  NgModule({
14381
- imports: [CommonModule, PanelModule$1, BorderButtonModule],
14382
- declarations: [PanelComponent],
14383
- exports: [PanelComponent],
14686
+ imports: [CommonModule, TieredMenuModule, TooltipModule],
14687
+ declarations: [NavigationButtonComponent],
14688
+ exports: [NavigationButtonComponent],
14384
14689
  })
14385
- ], PanelModule);
14690
+ ], NavigationButtonModule);
14386
14691
 
14387
- var RatingScaleComponent_1;
14388
- let RatingScaleComponent = RatingScaleComponent_1 = class RatingScaleComponent {
14692
+ var ObjectCardFieldComponent_1;
14693
+ let ObjectCardFieldComponent = ObjectCardFieldComponent_1 = class ObjectCardFieldComponent {
14389
14694
  constructor() {
14390
- this.disabled = false;
14391
- }
14392
- writeValue(value) {
14393
- if (!this.disabled) {
14394
- this.value = value;
14395
- }
14396
- }
14397
- registerOnChange(onChange) {
14398
- this._onChange = onChange;
14399
- }
14400
- registerOnTouched(onTouched) {
14401
- this._onTouched = onTouched;
14402
- }
14403
- onSelect(rating) {
14404
- this.value = rating;
14405
- if (this._onChange) {
14406
- this._onChange(this.value);
14407
- }
14695
+ this.id = `s-object-card-field-${ObjectCardFieldComponent_1.nextId++}`;
14696
+ this.buttonClick = new EventEmitter();
14408
14697
  }
14409
14698
  };
14699
+ ObjectCardFieldComponent.nextId = 0;
14410
14700
  __decorate([
14411
14701
  Input()
14412
- ], RatingScaleComponent.prototype, "nodes", void 0);
14702
+ ], ObjectCardFieldComponent.prototype, "id", void 0);
14413
14703
  __decorate([
14414
14704
  Input()
14415
- ], RatingScaleComponent.prototype, "startLabel", void 0);
14705
+ ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
14416
14706
  __decorate([
14417
14707
  Input()
14418
- ], RatingScaleComponent.prototype, "endLabel", void 0);
14708
+ ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
14419
14709
  __decorate([
14420
14710
  Input()
14421
- ], RatingScaleComponent.prototype, "disabled", void 0);
14422
- RatingScaleComponent = RatingScaleComponent_1 = __decorate([
14711
+ ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
14712
+ __decorate([
14713
+ Input()
14714
+ ], ObjectCardFieldComponent.prototype, "label", void 0);
14715
+ __decorate([
14716
+ Input()
14717
+ ], ObjectCardFieldComponent.prototype, "description", void 0);
14718
+ __decorate([
14719
+ Input()
14720
+ ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
14721
+ __decorate([
14722
+ Input()
14723
+ ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
14724
+ __decorate([
14725
+ Output()
14726
+ ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
14727
+ __decorate([
14728
+ ContentChild(ThumbnailComponent, { static: true })
14729
+ ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
14730
+ __decorate([
14731
+ ViewChild(TemplateRef, { static: true })
14732
+ ], ObjectCardFieldComponent.prototype, "content", void 0);
14733
+ ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
14423
14734
  Component({
14424
- selector: "s-rating-scale",
14425
- 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>",
14426
- providers: [{
14427
- provide: NG_VALUE_ACCESSOR,
14428
- useExisting: forwardRef(() => RatingScaleComponent_1),
14429
- multi: true,
14430
- }],
14431
- 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}"]
14432
- })
14433
- ], RatingScaleComponent);
14434
-
14435
- let RatingScaleModule = class RatingScaleModule {
14436
- };
14437
- RatingScaleModule = __decorate([
14438
- NgModule({
14439
- imports: [
14440
- CommonModule,
14441
- ReactiveFormsModule,
14442
- ],
14443
- declarations: [RatingScaleComponent],
14444
- exports: [RatingScaleComponent],
14735
+ selector: "s-object-card-field",
14736
+ 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",
14737
+ 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}"]
14445
14738
  })
14446
- ], RatingScaleModule);
14739
+ ], ObjectCardFieldComponent);
14447
14740
 
14448
- var SelectButtonComponent_1;
14449
- let SelectButtonComponent = SelectButtonComponent_1 = class SelectButtonComponent {
14741
+ var ObjectCardMainComponent_1;
14742
+ let ObjectCardMainComponent = ObjectCardMainComponent_1 = class ObjectCardMainComponent {
14450
14743
  constructor() {
14451
- this.multiple = false;
14452
- this.itemSelected = new EventEmitter();
14453
- this.itemClicked = new EventEmitter();
14454
- this.disabled = false;
14455
- this.activeItems = new Set();
14456
- }
14457
- writeValue(value) {
14458
- if (!value)
14459
- return;
14460
- this.activeItems.clear();
14461
- if (Array.isArray(value)) {
14462
- value.forEach((item) => {
14463
- this.items.forEach((iItem) => {
14464
- if (this._compareItems(item, iItem)) {
14465
- this.activeItems.add(iItem);
14466
- }
14467
- });
14468
- });
14469
- }
14470
- else {
14471
- this.items.forEach((iItem) => {
14472
- if (this._compareItems(value, iItem)) {
14473
- this.activeItems.add(iItem);
14474
- }
14475
- });
14476
- }
14744
+ this.id = `s-object-card-main-${ObjectCardMainComponent_1.nextId++}`;
14745
+ this.iconClass = "fa fa-picture-o";
14746
+ this.hasThumbnail = true;
14747
+ this.hasDescription = true;
14748
+ this.isBrand = false;
14749
+ this.buttonClick = new EventEmitter();
14750
+ this._thumbnailSize = ThumbnailSize.Medium;
14477
14751
  }
14478
- registerOnChange(onChange) {
14479
- this.onChange = onChange;
14752
+ set thumbnailSize(value) {
14753
+ this._thumbnailSize = value;
14754
+ if (this.thumbnailComponent)
14755
+ this.thumbnailComponent.size = value;
14480
14756
  }
14481
- registerOnTouched(onTouched) {
14482
- this.onTouched = onTouched;
14757
+ get thumbnailSize() {
14758
+ return this._thumbnailSize;
14483
14759
  }
14484
- setDisabledState(disabled) {
14485
- this.disabled = disabled;
14760
+ onResize() {
14761
+ this.update();
14486
14762
  }
14487
- onItemSelect(item) {
14488
- var _a, _b;
14489
- if (this.disabled || item.disabled)
14490
- return;
14491
- this.itemClicked.emit(item);
14492
- if (!this.multiple) {
14493
- this.activeItems.clear();
14494
- }
14495
- this.activeItems.add(item);
14496
- this.itemSelected.emit([...this.activeItems]);
14497
- (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, [...this.activeItems]);
14498
- (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, [...this.activeItems]);
14763
+ ngAfterContentInit() {
14764
+ this.update();
14499
14765
  }
14500
- _compareItems(item1, item2) {
14501
- const _compare = (a, b) => {
14502
- if (a === b) {
14503
- return true;
14504
- }
14505
- if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
14506
- return false;
14507
- }
14508
- if (Array.isArray(a) !== Array.isArray(b)) {
14509
- return false;
14510
- }
14511
- let keysA = Object.keys(a);
14512
- let keysB = Object.keys(b);
14513
- if (keysA.length !== keysB.length) {
14514
- return false;
14515
- }
14516
- for (let key of keysA) {
14517
- if (!keysB.includes(key) || !_compare(a[key], b[key])) {
14518
- return false;
14519
- }
14520
- }
14521
- for (let key in a) {
14522
- if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
14523
- return false;
14524
- }
14525
- }
14526
- return true;
14527
- };
14528
- return _compare(item1, item2);
14766
+ update() {
14767
+ const windowWidth = window.innerWidth;
14768
+ if (windowWidth <= Breakpoints.SM_MAX)
14769
+ this.thumbnailSize = ThumbnailSize.Small;
14770
+ else
14771
+ this.thumbnailSize = ThumbnailSize.Medium;
14529
14772
  }
14530
14773
  };
14774
+ ObjectCardMainComponent.nextId = 0;
14531
14775
  __decorate([
14532
14776
  Input()
14533
- ], SelectButtonComponent.prototype, "items", void 0);
14777
+ ], ObjectCardMainComponent.prototype, "id", void 0);
14534
14778
  __decorate([
14535
14779
  Input()
14536
- ], SelectButtonComponent.prototype, "multiple", void 0);
14537
- __decorate([
14538
- Output()
14539
- ], SelectButtonComponent.prototype, "itemSelected", void 0);
14540
- __decorate([
14541
- Output()
14542
- ], SelectButtonComponent.prototype, "itemClicked", void 0);
14543
- SelectButtonComponent = SelectButtonComponent_1 = __decorate([
14544
- Component({
14545
- selector: "s-select-button",
14546
- 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>",
14547
- providers: [
14548
- {
14549
- provide: NG_VALUE_ACCESSOR,
14550
- useExisting: forwardRef(() => SelectButtonComponent_1),
14551
- multi: true,
14552
- },
14553
- ],
14554
- styles: [".select-button{overflow:hidden}"]
14555
- })
14556
- ], SelectButtonComponent);
14557
-
14558
- let SelectButtonItemComponent = class SelectButtonItemComponent {
14559
- constructor() {
14560
- this.active = false;
14561
- this.first = false;
14562
- this.last = false;
14563
- this.disabled = false;
14564
- }
14565
- };
14780
+ ], ObjectCardMainComponent.prototype, "imageSource", void 0);
14566
14781
  __decorate([
14567
14782
  Input()
14568
- ], SelectButtonItemComponent.prototype, "label", void 0);
14783
+ ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
14569
14784
  __decorate([
14570
14785
  Input()
14571
- ], SelectButtonItemComponent.prototype, "active", void 0);
14786
+ ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
14572
14787
  __decorate([
14573
14788
  Input()
14574
- ], SelectButtonItemComponent.prototype, "first", void 0);
14789
+ ], ObjectCardMainComponent.prototype, "iconClass", void 0);
14575
14790
  __decorate([
14576
14791
  Input()
14577
- ], SelectButtonItemComponent.prototype, "last", void 0);
14792
+ ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
14578
14793
  __decorate([
14579
14794
  Input()
14580
- ], SelectButtonItemComponent.prototype, "disabled", void 0);
14581
- SelectButtonItemComponent = __decorate([
14582
- Component({
14583
- selector: "s-select-button-item",
14584
- 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>",
14585
- 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}"]
14586
- })
14587
- ], SelectButtonItemComponent);
14588
-
14589
- let SelectButtonModule = class SelectButtonModule {
14590
- };
14591
- SelectButtonModule = __decorate([
14592
- NgModule({
14593
- imports: [CommonModule],
14594
- declarations: [
14595
- SelectButtonComponent,
14596
- SelectButtonItemComponent,
14597
- ],
14598
- exports: [SelectButtonComponent],
14599
- })
14600
- ], SelectButtonModule);
14601
-
14602
- var SidebarComponent_1;
14603
- let SidebarComponent = SidebarComponent_1 = class SidebarComponent {
14604
- constructor(focusTrapFactory) {
14605
- this.focusTrapFactory = focusTrapFactory;
14606
- this.id = `s-sidebar-${SidebarComponent_1.nextId++}`;
14607
- this.visible = false;
14608
- this.baseZIndex = 0;
14609
- this.largeSized = false;
14610
- this.visibleChange = new EventEmitter();
14611
- }
14612
- onShow() {
14613
- DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
14614
- const focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
14615
- focusTrap.focusInitialElementWhenReady();
14616
- }
14617
- onHide() {
14618
- DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
14619
- }
14620
- close(event) {
14621
- DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
14622
- this.visibleChange.emit(false);
14623
- event.preventDefault();
14624
- }
14625
- };
14626
- SidebarComponent.nextId = 0;
14627
- SidebarComponent.ctorParameters = () => [
14628
- { type: FocusTrapFactory }
14629
- ];
14795
+ ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
14630
14796
  __decorate([
14631
14797
  Input()
14632
- ], SidebarComponent.prototype, "id", void 0);
14798
+ ], ObjectCardMainComponent.prototype, "isBrand", void 0);
14633
14799
  __decorate([
14634
14800
  Input()
14635
- ], SidebarComponent.prototype, "visible", void 0);
14801
+ ], ObjectCardMainComponent.prototype, "label", void 0);
14636
14802
  __decorate([
14637
14803
  Input()
14638
- ], SidebarComponent.prototype, "header", void 0);
14804
+ ], ObjectCardMainComponent.prototype, "description", void 0);
14639
14805
  __decorate([
14640
14806
  Input()
14641
- ], SidebarComponent.prototype, "baseZIndex", void 0);
14807
+ ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
14642
14808
  __decorate([
14643
14809
  Input()
14644
- ], SidebarComponent.prototype, "largeSized", void 0);
14810
+ ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
14645
14811
  __decorate([
14646
14812
  Output()
14647
- ], SidebarComponent.prototype, "visibleChange", void 0);
14813
+ ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
14648
14814
  __decorate([
14649
- ViewChild(Sidebar, { static: true })
14650
- ], SidebarComponent.prototype, "innerSidebar", void 0);
14651
- __decorate([
14652
- ContentChild(HeaderComponent, { static: true })
14653
- ], SidebarComponent.prototype, "headerSection", void 0);
14815
+ ContentChild(ThumbnailComponent, { static: true })
14816
+ ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
14654
14817
  __decorate([
14655
- ContentChild(FooterComponent, { static: true })
14656
- ], SidebarComponent.prototype, "footerSection", void 0);
14657
- SidebarComponent = SidebarComponent_1 = __decorate([
14818
+ HostListener("window:resize")
14819
+ ], ObjectCardMainComponent.prototype, "onResize", null);
14820
+ ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
14658
14821
  Component({
14659
- selector: "s-sidebar",
14660
- 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",
14661
- encapsulation: ViewEncapsulation.None,
14662
- 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}"]
14663
- })
14664
- ], SidebarComponent);
14665
-
14666
- let SidebarModule = class SidebarModule {
14667
- };
14668
- SidebarModule = __decorate([
14669
- NgModule({
14670
- imports: [CommonModule, A11yModule, SidebarModule$1, ScrollPanelModule, StructureModule],
14671
- declarations: [SidebarComponent],
14672
- exports: [StructureModule, SidebarComponent],
14822
+ selector: "s-object-card-main",
14823
+ 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",
14824
+ 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}}"]
14673
14825
  })
14674
- ], SidebarModule);
14826
+ ], ObjectCardMainComponent);
14675
14827
 
14676
- let SlidePanelService = class SlidePanelService {
14677
- constructor() {
14678
- this.modalCloseMap = new Map();
14679
- }
14680
- createSlidePanel(id) {
14681
- const panelSubject = new Subject();
14682
- this.modalCloseMap.set(id, panelSubject);
14683
- return panelSubject.asObservable();
14684
- }
14685
- getModalCloseObservable(id) {
14686
- return this.modalCloseMap.get(id).asObservable();
14687
- }
14688
- closeModal(id) {
14689
- const subject = this.modalCloseMap.get(id);
14690
- if (subject) {
14691
- subject.next();
14692
- }
14693
- }
14694
- };
14695
- SlidePanelService = __decorate([
14696
- Injectable()
14697
- ], SlidePanelService);
14828
+ var EnumSeverity;
14829
+ (function (EnumSeverity) {
14830
+ EnumSeverity["Default"] = "Default";
14831
+ EnumSeverity["Info"] = "Info";
14832
+ EnumSeverity["Warn"] = "Warn";
14833
+ EnumSeverity["Error"] = "Error";
14834
+ EnumSeverity["Success"] = "Success";
14835
+ })(EnumSeverity || (EnumSeverity = {}));
14698
14836
 
14699
- var SlidePanelComponent_1;
14700
- const SMALL_DEVICE_BREAKPOINT = 420;
14701
- let SlidePanelComponent = SlidePanelComponent_1 = class SlidePanelComponent {
14702
- constructor(slidePanelService) {
14703
- this.slidePanelService = slidePanelService;
14704
- this.id = `slide-panel-${++SlidePanelComponent_1.nextId}`;
14705
- this.openIcon = "fas fa-chevron-right";
14706
- this.closeIcon = "fas fa-chevron-left";
14707
- this.cache = false;
14708
- this.createOpen = false;
14709
- this.panelOpened = new EventEmitter();
14710
- this.panelClosed = new EventEmitter();
14711
- this.isOpen = false;
14712
- this.isSlideOver = false;
14713
- this.isAnimating = false;
14714
- this.isContentAnimationDisabled = true;
14715
- this.slideHeight = 0;
14716
- this.sideContentWidth = 0;
14717
- this._unsubscribe$ = new Subject();
14718
- }
14719
- onResize() {
14720
- this._checkOverBehavior();
14721
- }
14722
- ngOnInit() {
14723
- this._checkOverBehavior();
14724
- this.slidePanelService.createSlidePanel(this.id)
14725
- .pipe(takeUntil(this._unsubscribe$))
14726
- .subscribe(() => {
14727
- this.isOpen = false;
14728
- });
14837
+ var ObjectCardComponent_1;
14838
+ const elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
14839
+ let ObjectCardComponent = ObjectCardComponent_1 = class ObjectCardComponent {
14840
+ constructor(cdr, elementRef) {
14841
+ this.cdr = cdr;
14842
+ this.elementRef = elementRef;
14843
+ this.id = `s-object-card-${ObjectCardComponent_1.nextId++}`;
14844
+ this.expanded = false;
14845
+ this.expandTooltip = "Abrir painel";
14846
+ this.collapseTooltip = "Fechar painel";
14847
+ this.fieldsMinWidth = 200;
14848
+ this.expandedChange = new EventEmitter();
14849
+ this.maxVisibleFields = 0;
14850
+ this.severity = EnumSeverity.Default;
14851
+ this.EnumSeverity = EnumSeverity;
14729
14852
  }
14730
14853
  ngAfterViewInit() {
14731
- queueMicrotask(() => {
14732
- if (this.createOpen) {
14733
- this.isOpen = true;
14734
- }
14854
+ this.update();
14855
+ this.cdr.detectChanges();
14856
+ this.fields.changes.subscribe(() => {
14857
+ this.update();
14735
14858
  });
14736
- }
14737
- ngAfterViewChecked() {
14738
- // to executed at a safe time prior to control returning to the browser's event loop
14739
- queueMicrotask(() => {
14740
- this._calculateSlideHeight();
14741
- this._calculateSideContentWidth();
14742
- this.isContentAnimationDisabled = false;
14859
+ const erd = elementResizeDetectorMaker({
14860
+ strategy: "scroll",
14743
14861
  });
14862
+ erd.listenTo(this.elementRef.nativeElement, () => this.update());
14744
14863
  }
14745
- ngOnDestroy() {
14746
- this._unsubscribe$.next();
14747
- this._unsubscribe$.complete();
14748
- }
14749
- onClickButton() {
14750
- if (this.isAnimating) {
14751
- return;
14752
- }
14753
- this.isOpen = !this.isOpen;
14754
- if (this.isOpen) {
14755
- this.panelOpened.emit();
14864
+ update() {
14865
+ const windowWidth = window.innerWidth;
14866
+ const containerWidth = this.elementRef.nativeElement.offsetWidth;
14867
+ const mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
14868
+ const fieldsMinWidth = this.fieldsMinWidth;
14869
+ const expandIconWidth = 50;
14870
+ const fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
14871
+ for (const element of fieldElementList) {
14872
+ element.style.minWidth = `${this.fieldsMinWidth}px`;
14756
14873
  }
14757
- else {
14758
- this.panelClosed.emit();
14874
+ let maxFieldQtd;
14875
+ if (windowWidth <= Breakpoints.SM_MAX)
14876
+ maxFieldQtd = 0;
14877
+ else
14878
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
14879
+ if (maxFieldQtd && maxFieldQtd < this.fields.length) {
14880
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
14759
14881
  }
14882
+ this.maxVisibleFields = maxFieldQtd;
14883
+ if (maxFieldQtd >= this.fields.length && this.expanded)
14884
+ this.collapse();
14760
14885
  }
14761
- onContentAnimationStart() {
14762
- this.isAnimating = true;
14763
- }
14764
- onContentAnimationDone() {
14765
- this.isAnimating = false;
14766
- this._calculateSideContentWidth();
14886
+ toggle() {
14887
+ this.expanded ? this.collapse() : this.expand();
14767
14888
  }
14768
- _checkOverBehavior() {
14769
- this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
14889
+ expand() {
14890
+ this.expanded = true;
14891
+ this.expandedChange.emit(this.expanded);
14770
14892
  }
14771
- _calculateSlideHeight() {
14772
- this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
14893
+ collapse() {
14894
+ this.expanded = false;
14895
+ this.expandedChange.emit(this.expanded);
14773
14896
  }
14774
- _calculateSideContentWidth() {
14775
- const slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
14776
- const slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
14777
- this.sideContentWidth = slidePanelWidth - slideContentWidth;
14897
+ getExpandedFieldWidth() {
14898
+ const containerWidth = this.elementRef.nativeElement.offsetWidth;
14899
+ let fieldsPerRow;
14900
+ if (containerWidth <= Breakpoints.SM_MAX)
14901
+ fieldsPerRow = 1;
14902
+ else if (containerWidth <= Breakpoints.MD_MAX)
14903
+ fieldsPerRow = 2;
14904
+ else if (containerWidth <= Breakpoints.LG_MAX)
14905
+ fieldsPerRow = 4;
14906
+ else
14907
+ fieldsPerRow = 6;
14908
+ return 12 / fieldsPerRow;
14778
14909
  }
14779
14910
  };
14780
- SlidePanelComponent.nextId = 0;
14781
- SlidePanelComponent.ctorParameters = () => [
14782
- { type: SlidePanelService }
14911
+ ObjectCardComponent.nextId = 0;
14912
+ ObjectCardComponent.ctorParameters = () => [
14913
+ { type: ChangeDetectorRef },
14914
+ { type: ElementRef }
14783
14915
  ];
14784
14916
  __decorate([
14785
14917
  Input()
14786
- ], SlidePanelComponent.prototype, "id", void 0);
14918
+ ], ObjectCardComponent.prototype, "id", void 0);
14787
14919
  __decorate([
14788
14920
  Input()
14789
- ], SlidePanelComponent.prototype, "openIcon", void 0);
14921
+ ], ObjectCardComponent.prototype, "expanded", void 0);
14790
14922
  __decorate([
14791
14923
  Input()
14792
- ], SlidePanelComponent.prototype, "closeIcon", void 0);
14924
+ ], ObjectCardComponent.prototype, "expandTooltip", void 0);
14793
14925
  __decorate([
14794
14926
  Input()
14795
- ], SlidePanelComponent.prototype, "cache", void 0);
14927
+ ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
14796
14928
  __decorate([
14797
14929
  Input()
14798
- ], SlidePanelComponent.prototype, "createOpen", void 0);
14799
- __decorate([
14800
- Output()
14801
- ], SlidePanelComponent.prototype, "panelOpened", void 0);
14930
+ ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
14802
14931
  __decorate([
14803
14932
  Output()
14804
- ], SlidePanelComponent.prototype, "panelClosed", void 0);
14933
+ ], ObjectCardComponent.prototype, "expandedChange", void 0);
14805
14934
  __decorate([
14806
- ViewChild("slidePanel")
14807
- ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
14935
+ ContentChild(ObjectCardMainComponent, { static: true })
14936
+ ], ObjectCardComponent.prototype, "main", void 0);
14808
14937
  __decorate([
14809
- ViewChild("slideContent")
14810
- ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
14938
+ ContentChildren(ObjectCardFieldComponent, { descendants: true })
14939
+ ], ObjectCardComponent.prototype, "fields", void 0);
14811
14940
  __decorate([
14812
- ViewChild("sideContent")
14813
- ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
14941
+ Input()
14942
+ ], ObjectCardComponent.prototype, "severity", void 0);
14814
14943
  __decorate([
14815
- HostListener("window:resize")
14816
- ], SlidePanelComponent.prototype, "onResize", null);
14817
- SlidePanelComponent = SlidePanelComponent_1 = __decorate([
14944
+ Input()
14945
+ ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
14946
+ ObjectCardComponent = ObjectCardComponent_1 = __decorate([
14818
14947
  Component({
14819
- selector: "s-slide-panel",
14820
- 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>",
14948
+ selector: "s-object-card",
14949
+ 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",
14821
14950
  animations: [
14822
- trigger("cachelessAnimation", [
14951
+ trigger("expandableContent", [
14952
+ state("*", style$7({
14953
+ height: "0",
14954
+ })),
14955
+ state("false", style$7({
14956
+ height: "0",
14957
+ })),
14958
+ state("true", style$7({
14959
+ height: "*",
14960
+ })),
14961
+ transition("* => true", animate("200ms ease-out")),
14962
+ transition("false <=> true", animate("200ms ease-out")),
14963
+ ]),
14964
+ trigger("BorderButtonAnimation", [
14823
14965
  transition(":enter", [
14824
- style$7({ width: "0" }),
14825
- animate("200ms linear", style$7({ width: "*" })),
14966
+ style$7({ transform: "scaleY(0)", opacity: 0 }),
14967
+ animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
14826
14968
  ]),
14827
14969
  transition(":leave", [
14828
- style$7({ width: "*" }),
14829
- animate("200ms linear", style$7({ width: "0" })),
14970
+ style$7({ transform: "scaleY(1)", opacity: 1 }),
14971
+ animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
14830
14972
  ]),
14831
14973
  ]),
14832
- trigger("cacheAnimation", [
14833
- state("true", style$7({ width: "*", padding: '0 16px' })),
14834
- state("false", style$7({ width: '0px', padding: '0' })),
14835
- transition("* => *", animate("200ms")),
14836
- ]),
14837
14974
  ],
14838
- 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}"]
14975
+ 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)}}"]
14839
14976
  })
14840
- ], SlidePanelComponent);
14977
+ ], ObjectCardComponent);
14841
14978
 
14842
- let SlidePanelModule = class SlidePanelModule {
14979
+ let BorderButtonComponent = class BorderButtonComponent {
14980
+ constructor() {
14981
+ this.severity = EnumSeverity.Default;
14982
+ this.EnumSeverity = EnumSeverity;
14983
+ this.TooltipPosition = TooltipPosition;
14984
+ }
14843
14985
  };
14844
- SlidePanelModule = __decorate([
14986
+ __decorate([
14987
+ Input()
14988
+ ], BorderButtonComponent.prototype, "severity", void 0);
14989
+ __decorate([
14990
+ Input()
14991
+ ], BorderButtonComponent.prototype, "options", void 0);
14992
+ BorderButtonComponent = __decorate([
14993
+ Component({
14994
+ selector: "s-border-button",
14995
+ 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>",
14996
+ 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}"]
14997
+ })
14998
+ ], BorderButtonComponent);
14999
+
15000
+ let BorderButtonModule = class BorderButtonModule {
15001
+ };
15002
+ BorderButtonModule = __decorate([
14845
15003
  NgModule({
14846
- imports: [CommonModule],
14847
- declarations: [SlidePanelComponent],
14848
- exports: [SlidePanelComponent],
14849
- providers: [SlidePanelService],
15004
+ imports: [CommonModule, TooltipModule],
15005
+ declarations: [BorderButtonComponent],
15006
+ exports: [BorderButtonComponent]
14850
15007
  })
14851
- ], SlidePanelModule);
15008
+ ], BorderButtonModule);
14852
15009
 
14853
- var SplitButtonType;
14854
- (function (SplitButtonType) {
14855
- SplitButtonType["Primary"] = "primary";
14856
- SplitButtonType["Secondary"] = "secondary";
14857
- SplitButtonType["Default"] = "default";
14858
- })(SplitButtonType || (SplitButtonType = {}));
15010
+ let ObjectCardModule = class ObjectCardModule {
15011
+ };
15012
+ ObjectCardModule = __decorate([
15013
+ NgModule({
15014
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule, ButtonModule, BorderButtonModule],
15015
+ declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15016
+ exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15017
+ })
15018
+ ], ObjectCardModule);
14859
15019
 
14860
- let SplitButtonComponent = class SplitButtonComponent {
14861
- constructor(eRef) {
14862
- this.eRef = eRef;
14863
- this.disabled = false;
14864
- this.type = SplitButtonType.Primary;
14865
- this.buttonClicked = new EventEmitter();
14866
- this.open = false;
14867
- }
14868
- onClickout(event) {
14869
- if (!this.eRef.nativeElement.contains(event.target)) {
14870
- this.closeDropdown();
14871
- }
15020
+ var ProductHeaderComponent_1;
15021
+ let ProductHeaderComponent = ProductHeaderComponent_1 = class ProductHeaderComponent {
15022
+ constructor() {
15023
+ this.id = `s-product-header-${ProductHeaderComponent_1.nextId++}`;
15024
+ this.baseZIndex = 0;
15025
+ this.isHeaderFrame = true;
14872
15026
  }
14873
- onButtonClick() {
14874
- if (!this.disabled) {
14875
- this.buttonClicked.emit();
14876
- this.closeDropdown();
15027
+ ngAfterViewInit() {
15028
+ this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++DomHandler.zindex);
15029
+ if (this.isHeaderFrame) {
15030
+ this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
14877
15031
  }
14878
- }
14879
- onDropdownClick() {
14880
- if (!this.disabled) {
14881
- this.open = !this.open;
15032
+ else {
15033
+ this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
14882
15034
  }
14883
15035
  }
14884
- onOptionClick(option) {
14885
- option.action && option.action();
14886
- this.closeDropdown();
14887
- }
14888
- closeDropdown() {
14889
- this.open = false;
14890
- }
14891
15036
  };
14892
- SplitButtonComponent.ctorParameters = () => [
14893
- { type: ElementRef }
14894
- ];
14895
- __decorate([
14896
- Input()
14897
- ], SplitButtonComponent.prototype, "disabled", void 0);
15037
+ ProductHeaderComponent.nextId = 0;
14898
15038
  __decorate([
14899
15039
  Input()
14900
- ], SplitButtonComponent.prototype, "iconClass", void 0);
15040
+ ], ProductHeaderComponent.prototype, "id", void 0);
14901
15041
  __decorate([
14902
15042
  Input()
14903
- ], SplitButtonComponent.prototype, "label", void 0);
15043
+ ], ProductHeaderComponent.prototype, "header", void 0);
14904
15044
  __decorate([
14905
15045
  Input()
14906
- ], SplitButtonComponent.prototype, "type", void 0);
15046
+ ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
14907
15047
  __decorate([
14908
15048
  Input()
14909
- ], SplitButtonComponent.prototype, "options", void 0);
14910
- __decorate([
14911
- Output()
14912
- ], SplitButtonComponent.prototype, "buttonClicked", void 0);
15049
+ ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
14913
15050
  __decorate([
14914
- HostListener("document:click", ["$event"])
14915
- ], SplitButtonComponent.prototype, "onClickout", null);
14916
- SplitButtonComponent = __decorate([
15051
+ ViewChild("headerContainer", { static: false })
15052
+ ], ProductHeaderComponent.prototype, "container", void 0);
15053
+ ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
14917
15054
  Component({
14918
- selector: "s-split-button",
14919
- 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>",
14920
- 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}"]
15055
+ selector: "s-product-header",
15056
+ 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",
15057
+ 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}"]
14921
15058
  })
14922
- ], SplitButtonComponent);
15059
+ ], ProductHeaderComponent);
14923
15060
 
14924
- let SplitButtonModule = class SplitButtonModule {
15061
+ let ProductHeaderModule = class ProductHeaderModule {
14925
15062
  };
14926
- SplitButtonModule = __decorate([
15063
+ ProductHeaderModule = __decorate([
14927
15064
  NgModule({
14928
- imports: [CommonModule],
14929
- declarations: [SplitButtonComponent],
14930
- exports: [SplitButtonComponent],
15065
+ imports: [CommonModule, TooltipModule$1, ThumbnailModule],
15066
+ declarations: [ProductHeaderComponent],
15067
+ exports: [ProductHeaderComponent, ThumbnailModule],
14931
15068
  })
14932
- ], SplitButtonModule);
15069
+ ], ProductHeaderModule);
14933
15070
 
14934
- var StatsCardComponent_1;
14935
- let StatsCardComponent = StatsCardComponent_1 = class StatsCardComponent {
15071
+ var ProgressBarColors;
15072
+ (function (ProgressBarColors) {
15073
+ ProgressBarColors["Blue"] = "blue";
15074
+ ProgressBarColors["Green"] = "green";
15075
+ ProgressBarColors["Red"] = "red";
15076
+ ProgressBarColors["Yellow"] = "yellow";
15077
+ })(ProgressBarColors || (ProgressBarColors = {}));
15078
+
15079
+ var ProgressBarMode;
15080
+ (function (ProgressBarMode) {
15081
+ ProgressBarMode["Determinate"] = "determinate";
15082
+ ProgressBarMode["Indeterminate"] = "indeterminate";
15083
+ })(ProgressBarMode || (ProgressBarMode = {}));
15084
+
15085
+ let ProgressBarComponent = class ProgressBarComponent {
14936
15086
  constructor() {
14937
- this.id = `s-stats-card-${StatsCardComponent_1.nextId++}`;
14938
- this.alwaysWithBorder = false;
14939
- this.lightVersion = false;
14940
- this.lightMode = true;
14941
- this.iconClass = "fa fa-bar-chart";
14942
- this.color = "#339966";
14943
- this.animateNumbers = true;
14944
- this.clickable = false;
14945
- this.tooltip = "";
14946
- this.onClick = new EventEmitter();
14947
- this.ANIMATION_DURATION_MS = 200;
14948
- this.STEP_DURATION_MS = 20;
14949
- this.previousValue = "0";
14950
- this._value = "0";
14951
- }
14952
- set value(value) {
14953
- this.previousValue = this._value;
14954
- this._value = String(value);
14955
- if (this.animateNumbers)
14956
- this.updateDisplayValue();
14957
- else
14958
- this.displayValue = this.value;
14959
- }
14960
- get value() {
14961
- return this._value;
15087
+ this.numberFormatOptions = {
15088
+ style: "decimal",
15089
+ minimumFractionDigits: 0,
15090
+ maximumFractionDigits: 2,
15091
+ };
15092
+ this.showValue = true;
15093
+ this.mode = ProgressBarMode.Determinate;
14962
15094
  }
14963
- updateDisplayValue() {
14964
- const animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
14965
- const stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
14966
- const animationCount = animationDuration.dividedBy(stepDuration);
14967
- const previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
14968
- const rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
14969
- const incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
14970
- const incremental = previousRawValue.isLessThan(rawValue);
14971
- clearInterval(this.intervalId);
14972
- this.displayValue = this.replaceNumericPositions(this.value);
14973
- let counter = previousRawValue;
14974
- this.intervalId = setInterval(() => {
14975
- if (incremental && counter.isLessThan(rawValue)) {
14976
- this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
14977
- counter = counter.plus(incrementValue);
14978
- }
14979
- else if (!incremental && counter.isGreaterThan(rawValue)) {
14980
- this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
14981
- counter = counter.minus(incrementValue);
14982
- }
14983
- else {
14984
- this.displayValue = this.value;
14985
- clearInterval(this.intervalId);
14986
- }
14987
- }, this.STEP_DURATION_MS);
15095
+ ngOnInit() {
15096
+ this.validateInputs();
14988
15097
  }
14989
- replaceNumericPositions(value, newValue) {
14990
- const rawValue = value.replace(/[^\d]/g, "");
14991
- const newValueString = newValue ? newValue.toString() : "";
14992
- const formattedNewValue = newValueString
14993
- .toString()
14994
- .replace(/\D/g, "")
14995
- .padStart(rawValue.length, "0");
14996
- let newValueIndex = 0;
14997
- return value
14998
- .split("")
14999
- .map(char => {
15000
- const number = Number(char);
15001
- if (number || char === "0")
15002
- return formattedNewValue[newValueIndex++];
15003
- return char;
15004
- })
15005
- .join("");
15098
+ validateInputs() {
15099
+ if (this.value < 0 || this.value > 100) {
15100
+ throw new Error("Invalid value for value");
15101
+ }
15102
+ if (this.targetValue < 0 || this.targetValue > 100) {
15103
+ throw new Error("Invalid value for targetValue");
15104
+ }
15105
+ if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
15106
+ throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
15107
+ }
15006
15108
  }
15007
15109
  };
15008
- StatsCardComponent.nextId = 0;
15009
15110
  __decorate([
15010
15111
  Input()
15011
- ], StatsCardComponent.prototype, "id", void 0);
15112
+ ], ProgressBarComponent.prototype, "value", void 0);
15012
15113
  __decorate([
15013
15114
  Input()
15014
- ], StatsCardComponent.prototype, "label", void 0);
15115
+ ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
15015
15116
  __decorate([
15016
15117
  Input()
15017
- ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
15118
+ ], ProgressBarComponent.prototype, "targetValue", void 0);
15018
15119
  __decorate([
15019
15120
  Input()
15020
- ], StatsCardComponent.prototype, "lightVersion", void 0);
15121
+ ], ProgressBarComponent.prototype, "label", void 0);
15021
15122
  __decorate([
15022
15123
  Input()
15023
- ], StatsCardComponent.prototype, "lightMode", void 0);
15124
+ ], ProgressBarComponent.prototype, "targetLabel", void 0);
15024
15125
  __decorate([
15025
15126
  Input()
15026
- ], StatsCardComponent.prototype, "iconClass", void 0);
15127
+ ], ProgressBarComponent.prototype, "activeColor", void 0);
15027
15128
  __decorate([
15028
15129
  Input()
15029
- ], StatsCardComponent.prototype, "color", void 0);
15130
+ ], ProgressBarComponent.prototype, "showValue", void 0);
15030
15131
  __decorate([
15031
15132
  Input()
15032
- ], StatsCardComponent.prototype, "animateNumbers", void 0);
15133
+ ], ProgressBarComponent.prototype, "mode", void 0);
15134
+ ProgressBarComponent = __decorate([
15135
+ Component({
15136
+ selector: "s-progressbar",
15137
+ 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>",
15138
+ 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}"]
15139
+ })
15140
+ ], ProgressBarComponent);
15141
+
15142
+ let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
15143
+ constructor(localeService) {
15144
+ this.localeService = localeService;
15145
+ this.showValue = true;
15146
+ }
15147
+ ngOnInit() {
15148
+ this.validateValues();
15149
+ this.onGetLocale();
15150
+ }
15151
+ onGetLocale() {
15152
+ this.localeService.getLocale().subscribe({
15153
+ next: (locale) => {
15154
+ this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", this.numberFormatOptions);
15155
+ },
15156
+ error: () => {
15157
+ this.numberFormat = new Intl.NumberFormat("pt-BR", this.numberFormatOptions);
15158
+ },
15159
+ });
15160
+ }
15161
+ validateValues() {
15162
+ if (this.value < 0 || this.value > 100) {
15163
+ throw new Error("Invalid value for value");
15164
+ }
15165
+ if (this.targetValue < 0 || this.targetValue > 100) {
15166
+ throw new Error("Invalid value for targetValue");
15167
+ }
15168
+ }
15169
+ };
15170
+ ProgressBarDeterminateComponent.ctorParameters = () => [
15171
+ { type: LocaleService }
15172
+ ];
15033
15173
  __decorate([
15034
15174
  Input()
15035
- ], StatsCardComponent.prototype, "clickable", void 0);
15175
+ ], ProgressBarDeterminateComponent.prototype, "value", void 0);
15036
15176
  __decorate([
15037
15177
  Input()
15038
- ], StatsCardComponent.prototype, "value", null);
15178
+ ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
15039
15179
  __decorate([
15040
15180
  Input()
15041
- ], StatsCardComponent.prototype, "tooltip", void 0);
15181
+ ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
15042
15182
  __decorate([
15043
- Output()
15044
- ], StatsCardComponent.prototype, "onClick", void 0);
15045
- StatsCardComponent = StatsCardComponent_1 = __decorate([
15183
+ Input()
15184
+ ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
15185
+ __decorate([
15186
+ Input()
15187
+ ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
15188
+ __decorate([
15189
+ Input()
15190
+ ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
15191
+ ProgressBarDeterminateComponent = __decorate([
15046
15192
  Component({
15047
- selector: "s-stats-card",
15048
- 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",
15049
- encapsulation: ViewEncapsulation.None,
15050
- 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}}"]
15193
+ selector: "s-progressbar-determinate",
15194
+ 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",
15195
+ 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}"]
15051
15196
  })
15052
- ], StatsCardComponent);
15197
+ ], ProgressBarDeterminateComponent);
15053
15198
 
15054
- let StatsCardModule = class StatsCardModule {
15199
+ let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
15055
15200
  };
15056
- StatsCardModule = __decorate([
15201
+ __decorate([
15202
+ Input()
15203
+ ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
15204
+ __decorate([
15205
+ Input()
15206
+ ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
15207
+ ProgressBarIndeterminateComponent = __decorate([
15208
+ Component({
15209
+ selector: "s-progressbar-indeterminate",
15210
+ 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",
15211
+ 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%)}}"]
15212
+ })
15213
+ ], ProgressBarIndeterminateComponent);
15214
+
15215
+ let ProgressBarModule = class ProgressBarModule {
15216
+ };
15217
+ ProgressBarModule = __decorate([
15057
15218
  NgModule({
15058
- imports: [
15059
- CommonModule,
15060
- TooltipModule$1,
15061
- ],
15219
+ imports: [CommonModule],
15062
15220
  declarations: [
15063
- StatsCardComponent,
15064
- ],
15065
- exports: [
15066
- StatsCardComponent,
15221
+ ProgressBarComponent,
15222
+ ProgressBarDeterminateComponent,
15223
+ ProgressBarIndeterminateComponent,
15067
15224
  ],
15225
+ exports: [ProgressBarComponent],
15068
15226
  })
15069
- ], StatsCardModule);
15227
+ ], ProgressBarModule);
15070
15228
 
15071
- var StepsComponent_1;
15072
- var StepState;
15073
- (function (StepState) {
15074
- StepState["Default"] = "default";
15075
- StepState["Success"] = "success";
15076
- StepState["Warning"] = "warning";
15077
- })(StepState || (StepState = {}));
15078
- let StepsComponent = StepsComponent_1 = class StepsComponent {
15229
+ let PanelComponent = class PanelComponent {
15079
15230
  constructor() {
15080
- this.id = `s-steps-${StepsComponent_1.nextId++}`;
15081
- this.activeIndex = 0;
15082
- this.stepSelected = new EventEmitter();
15083
- }
15084
- stepClick(step, index, event) {
15085
- if (step.disabled || index == this.activeIndex)
15086
- return;
15087
- this.stepSelected.emit({ step, index, event });
15088
- }
15089
- get stepState() {
15090
- return StepState;
15091
- }
15092
- barAnimation(index, activeIndex) {
15093
- const visited = index < activeIndex;
15094
- const activated = index === activeIndex;
15095
- return visited || activated;
15096
- }
15097
- afterBarAnimation(index, activeIndex) {
15098
- const visited = index < activeIndex;
15099
- const activated = index === activeIndex - 1;
15100
- return visited || activated;
15231
+ this.toggleable = true;
15232
+ this.collapsed = false;
15233
+ this.severity = EnumSeverity.Default;
15234
+ this.collapsedChange = new EventEmitter();
15235
+ this.EnumSeverity = EnumSeverity;
15101
15236
  }
15102
- get visibledStep() {
15103
- return this.steps.filter((step) => !step.hidden);
15237
+ onCollapsedChange(collapsed) {
15238
+ this.collapsed = collapsed;
15239
+ this.collapsedChange.emit(this.collapsed);
15104
15240
  }
15105
15241
  };
15106
- StepsComponent.nextId = 0;
15107
15242
  __decorate([
15108
15243
  Input()
15109
- ], StepsComponent.prototype, "id", void 0);
15244
+ ], PanelComponent.prototype, "header", void 0);
15110
15245
  __decorate([
15111
15246
  Input()
15112
- ], StepsComponent.prototype, "steps", void 0);
15247
+ ], PanelComponent.prototype, "toggleable", void 0);
15113
15248
  __decorate([
15114
15249
  Input()
15115
- ], StepsComponent.prototype, "activeIndex", void 0);
15250
+ ], PanelComponent.prototype, "collapsed", void 0);
15251
+ __decorate([
15252
+ Input()
15253
+ ], PanelComponent.prototype, "severity", void 0);
15254
+ __decorate([
15255
+ Input()
15256
+ ], PanelComponent.prototype, "borderButtonOptions", void 0);
15116
15257
  __decorate([
15117
15258
  Output()
15118
- ], StepsComponent.prototype, "stepSelected", void 0);
15119
- StepsComponent = StepsComponent_1 = __decorate([
15259
+ ], PanelComponent.prototype, "collapsedChange", void 0);
15260
+ PanelComponent = __decorate([
15120
15261
  Component({
15121
- selector: "s-steps",
15122
- 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",
15123
- host: {
15124
- "aria-orientation": "horizontal",
15125
- role: "tablist",
15126
- "tab-index": "0",
15127
- },
15262
+ selector: "s-panel",
15263
+ 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>",
15128
15264
  animations: [
15129
- trigger("beforeActiveDesative", [
15130
- state("active", style$7({
15131
- "background-position": "left bottom",
15132
- })),
15133
- state("desactive", style$7({
15134
- "background-position": "right bottom",
15135
- })),
15136
- transition("active => desactive", [animate("50ms 100ms linear")]),
15137
- transition("desactive => active", [animate("50ms 250ms linear")]),
15138
- ]),
15139
- trigger("activeDesative", [
15140
- state("active", style$7({
15141
- "background-position": "left bottom",
15142
- })),
15143
- state("desactive", style$7({
15144
- "background-position": "right bottom",
15145
- })),
15146
- transition("active => desactive", [animate("100ms 150ms linear")]),
15147
- transition("desactive => active", [animate("100ms 150ms linear")]),
15148
- ]),
15149
- trigger("afterActiveDesative", [
15150
- state("active", style$7({
15151
- "background-position": "left bottom",
15152
- })),
15153
- state("desactive", style$7({
15154
- "background-position": "right bottom",
15155
- })),
15156
- transition("active => desactive", [animate("50ms 250ms linear")]),
15157
- transition("desactive => active", [animate("50ms 100ms linear")]),
15265
+ trigger("BorderButtonAnimation", [
15266
+ transition(":enter", [
15267
+ style$7({ transform: "scaleY(0)", opacity: 0 }),
15268
+ animate("300ms ease", style$7({ transform: "scaleY(1)", opacity: 1 })),
15269
+ ]),
15270
+ transition(":leave", [
15271
+ style$7({ transform: "scaleY(1)", opacity: 1 }),
15272
+ animate("300ms ease", style$7({ transform: "scaleY(0)", opacity: 0 })),
15273
+ ]),
15158
15274
  ]),
15159
15275
  ],
15160
- 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}}"]
15276
+ 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}"]
15161
15277
  })
15162
- ], StepsComponent);
15278
+ ], PanelComponent);
15163
15279
 
15164
- let StepsModule = class StepsModule {
15280
+ let PanelModule = class PanelModule {
15165
15281
  };
15166
- StepsModule = __decorate([
15282
+ PanelModule = __decorate([
15167
15283
  NgModule({
15168
- imports: [CommonModule, TooltipModule$1],
15169
- declarations: [StepsComponent],
15170
- exports: [StepsComponent],
15284
+ imports: [CommonModule, PanelModule$1, BorderButtonModule],
15285
+ declarations: [PanelComponent],
15286
+ exports: [PanelComponent],
15171
15287
  })
15172
- ], StepsModule);
15288
+ ], PanelModule);
15173
15289
 
15174
- let TieredMenuEventService = class TieredMenuEventService {
15290
+ var RatingScaleComponent_1;
15291
+ let RatingScaleComponent = RatingScaleComponent_1 = class RatingScaleComponent {
15175
15292
  constructor() {
15176
- this.incrementCurrentItemEvent = new EventEmitter();
15177
- this.decrementCurrentItemEvent = new EventEmitter();
15178
- this.closeAllMenusEvent = new EventEmitter();
15179
- this.selectItemEvent = new EventEmitter();
15180
- this.openItemMenuEvent = new EventEmitter();
15181
- this.closeItemMenuEvent = new EventEmitter();
15182
- this.createMenuEvent = new EventEmitter();
15293
+ this.disabled = false;
15183
15294
  }
15184
- };
15185
- TieredMenuEventService = __decorate([
15186
- Injectable()
15187
- ], TieredMenuEventService);
15188
-
15189
- let TieredMenuService = class TieredMenuService {
15190
- constructor() {
15191
- this.currentItems = [];
15192
- this.items = [];
15295
+ writeValue(value) {
15296
+ if (!this.disabled) {
15297
+ this.value = value;
15298
+ }
15193
15299
  }
15194
- normalizeData(items, parent) {
15195
- return items.map((i) => {
15196
- const item = Object.assign({ visible: true }, i);
15197
- if (item.submenu) {
15198
- item.submenu = this.normalizeData(item.submenu, item);
15199
- }
15200
- item.id = this._generateId();
15201
- item.parent = parent;
15202
- item.isOpen = false;
15203
- return item;
15204
- });
15300
+ registerOnChange(onChange) {
15301
+ this._onChange = onChange;
15205
15302
  }
15206
- markAllItemsAsClosed(items) {
15207
- return items.map((i) => {
15208
- const item = Object.assign({}, i);
15209
- if (item.submenu) {
15210
- item.submenu = this.markAllItemsAsClosed(item.submenu);
15211
- }
15212
- item.isOpen = false;
15213
- return item;
15214
- });
15303
+ registerOnTouched(onTouched) {
15304
+ this._onTouched = onTouched;
15215
15305
  }
15216
- searchTheHierarchy(itemA, itemB) {
15217
- let item = itemB;
15218
- while (item) {
15219
- if (item === itemA) {
15220
- return true;
15221
- }
15222
- item = item.parent;
15306
+ onSelect(rating) {
15307
+ this.value = rating;
15308
+ if (this._onChange) {
15309
+ this._onChange(this.value);
15223
15310
  }
15224
- return false;
15225
- }
15226
- cloneItems(items) {
15227
- return JSON.parse(JSON.stringify(items));
15228
- }
15229
- _generateId() {
15230
- return `id-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}-${Math.random().toString(36).substring(2, 9)}`;
15231
15311
  }
15232
15312
  };
15233
- TieredMenuService = __decorate([
15234
- Injectable()
15235
- ], TieredMenuService);
15313
+ __decorate([
15314
+ Input()
15315
+ ], RatingScaleComponent.prototype, "nodes", void 0);
15316
+ __decorate([
15317
+ Input()
15318
+ ], RatingScaleComponent.prototype, "startLabel", void 0);
15319
+ __decorate([
15320
+ Input()
15321
+ ], RatingScaleComponent.prototype, "endLabel", void 0);
15322
+ __decorate([
15323
+ Input()
15324
+ ], RatingScaleComponent.prototype, "disabled", void 0);
15325
+ RatingScaleComponent = RatingScaleComponent_1 = __decorate([
15326
+ Component({
15327
+ selector: "s-rating-scale",
15328
+ 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>",
15329
+ providers: [{
15330
+ provide: NG_VALUE_ACCESSOR,
15331
+ useExisting: forwardRef(() => RatingScaleComponent_1),
15332
+ multi: true,
15333
+ }],
15334
+ 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}"]
15335
+ })
15336
+ ], RatingScaleComponent);
15236
15337
 
15237
- let TieredMenuNestedComponent = class TieredMenuNestedComponent {
15238
- constructor(tieredMenuService, _tieredMenuEventService) {
15239
- this.tieredMenuService = tieredMenuService;
15240
- this._tieredMenuEventService = _tieredMenuEventService;
15241
- this.top = 0;
15242
- this.left = 0;
15243
- this._unsubscribe$ = new Subject();
15244
- }
15245
- onResize() {
15246
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15338
+ let RatingScaleModule = class RatingScaleModule {
15339
+ };
15340
+ RatingScaleModule = __decorate([
15341
+ NgModule({
15342
+ imports: [
15343
+ CommonModule,
15344
+ ReactiveFormsModule,
15345
+ ],
15346
+ declarations: [RatingScaleComponent],
15347
+ exports: [RatingScaleComponent],
15348
+ })
15349
+ ], RatingScaleModule);
15350
+
15351
+ var SelectButtonComponent_1;
15352
+ let SelectButtonComponent = SelectButtonComponent_1 = class SelectButtonComponent {
15353
+ constructor() {
15354
+ this.multiple = false;
15355
+ this.itemSelected = new EventEmitter();
15356
+ this.itemClicked = new EventEmitter();
15357
+ this.disabled = false;
15358
+ this.activeItems = new Set();
15247
15359
  }
15248
- onDocumentClick(event) {
15249
- // Closing menu when clicked outside.
15250
- const target = event.target;
15251
- const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
15252
- if (!clickedInside) {
15253
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15360
+ writeValue(value) {
15361
+ if (!value)
15362
+ return;
15363
+ this.activeItems.clear();
15364
+ if (Array.isArray(value)) {
15365
+ value.forEach((item) => {
15366
+ this.items.forEach((iItem) => {
15367
+ if (this._compareItems(item, iItem)) {
15368
+ this.activeItems.add(iItem);
15369
+ }
15370
+ });
15371
+ });
15254
15372
  }
15255
- }
15256
- onKeydownHandler(event) {
15257
- switch (event.key) {
15258
- case "Escape":
15259
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15260
- break;
15261
- case " ":
15262
- case "Enter":
15263
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15264
- break;
15265
- case "ArrowLeft":
15266
- // When nested I need a reference to the current item's parent item, otherwise just the current item.
15267
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
15268
- break;
15269
- case "ArrowRight":
15270
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15271
- break;
15272
- case "ArrowUp":
15273
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15274
- break;
15275
- case "ArrowDown":
15276
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15277
- break;
15373
+ else {
15374
+ this.items.forEach((iItem) => {
15375
+ if (this._compareItems(value, iItem)) {
15376
+ this.activeItems.add(iItem);
15377
+ }
15378
+ });
15278
15379
  }
15279
15380
  }
15280
- ngOnInit() {
15281
- this.tieredMenuService.currentItems = this.items;
15282
- this._subscribeEvents();
15381
+ registerOnChange(onChange) {
15382
+ this.onChange = onChange;
15283
15383
  }
15284
- ngOnDestroy() {
15285
- this._unsubscribe$.next();
15286
- this._unsubscribe$.complete();
15384
+ registerOnTouched(onTouched) {
15385
+ this.onTouched = onTouched;
15287
15386
  }
15288
- _incrementCurItem() {
15289
- if (!this.tieredMenuService.currentItem) {
15290
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15291
- return;
15292
- }
15293
- const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15294
- if (curIndex < this.tieredMenuService.currentItems.length) {
15295
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15296
- }
15297
- else {
15298
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15299
- }
15300
- if (this.tieredMenuService.currentItem.divider) {
15301
- this._incrementCurItem();
15302
- }
15387
+ setDisabledState(disabled) {
15388
+ this.disabled = disabled;
15303
15389
  }
15304
- _decrementCurItem() {
15305
- if (!this.tieredMenuService.currentItem) {
15306
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15390
+ onItemSelect(item) {
15391
+ var _a, _b;
15392
+ if (this.disabled || item.disabled)
15307
15393
  return;
15394
+ this.itemClicked.emit(item);
15395
+ if (!this.multiple) {
15396
+ this.activeItems.clear();
15308
15397
  }
15309
- const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15310
- if (curIndex >= 0) {
15311
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15312
- }
15313
- else {
15314
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15315
- }
15316
- if (this.tieredMenuService.currentItem.divider) {
15317
- this._decrementCurItem();
15318
- }
15319
- }
15320
- _closeItem(item) {
15321
- var _a;
15322
- let itemAux = this._lastOpenItem;
15323
- while (itemAux && itemAux != item) {
15324
- itemAux.isOpen = false;
15325
- itemAux = itemAux.parent;
15326
- }
15327
- item.isOpen = false;
15328
- this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
15329
- this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
15398
+ this.activeItems.add(item);
15399
+ this.itemSelected.emit([...this.activeItems]);
15400
+ (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, [...this.activeItems]);
15401
+ (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, [...this.activeItems]);
15330
15402
  }
15331
- _openItem(item) {
15332
- if (item === null || item === void 0 ? void 0 : item.submenu) {
15333
- item.isOpen = true;
15334
- this.tieredMenuService.currentItems = item.submenu;
15335
- // Only has focus if there has already been interaction.
15336
- if (this.tieredMenuService.currentItem) {
15337
- this.tieredMenuService.currentItem = item.submenu[0];
15403
+ _compareItems(item1, item2) {
15404
+ const _compare = (a, b) => {
15405
+ if (a === b) {
15406
+ return true;
15338
15407
  }
15339
- this._lastOpenItem = item;
15340
- }
15341
- }
15342
- _subscribeEvents() {
15343
- this._tieredMenuEventService.incrementCurrentItemEvent
15344
- .pipe(takeUntil(this._unsubscribe$))
15345
- .subscribe(() => {
15346
- this._incrementCurItem();
15347
- });
15348
- this._tieredMenuEventService.decrementCurrentItemEvent
15349
- .pipe(takeUntil(this._unsubscribe$))
15350
- .subscribe(() => {
15351
- this._decrementCurItem();
15352
- });
15353
- this._tieredMenuEventService.selectItemEvent
15354
- .pipe(takeUntil(this._unsubscribe$))
15355
- .subscribe((item) => {
15356
- if (item.command) {
15357
- item.command();
15358
- // Close all menus after the item was selected.
15359
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15408
+ if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
15409
+ return false;
15360
15410
  }
15361
- });
15362
- this._tieredMenuEventService.openItemMenuEvent
15363
- .pipe(takeUntil(this._unsubscribe$))
15364
- .subscribe((item) => {
15365
- var _a, _b;
15366
- if (!this.tieredMenuService.currentItems.includes(item)) {
15367
- let itemAux = this._lastOpenItem;
15368
- while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
15369
- itemAux = itemAux.parent;
15370
- }
15371
- this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
15411
+ if (Array.isArray(a) !== Array.isArray(b)) {
15412
+ return false;
15372
15413
  }
15373
- this._lastOpenItem = item;
15374
- this._openItem(item);
15375
- });
15376
- this._tieredMenuEventService.closeItemMenuEvent
15377
- .pipe(takeUntil(this._unsubscribe$))
15378
- .subscribe((item) => {
15379
- if (item) {
15380
- this._closeItem(item);
15414
+ let keysA = Object.keys(a);
15415
+ let keysB = Object.keys(b);
15416
+ if (keysA.length !== keysB.length) {
15417
+ return false;
15381
15418
  }
15382
- });
15419
+ for (let key of keysA) {
15420
+ if (!keysB.includes(key) || !_compare(a[key], b[key])) {
15421
+ return false;
15422
+ }
15423
+ }
15424
+ for (let key in a) {
15425
+ if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
15426
+ return false;
15427
+ }
15428
+ }
15429
+ return true;
15430
+ };
15431
+ return _compare(item1, item2);
15383
15432
  }
15384
15433
  };
15385
- TieredMenuNestedComponent.ctorParameters = () => [
15386
- { type: TieredMenuService },
15387
- { type: TieredMenuEventService }
15388
- ];
15389
15434
  __decorate([
15390
- HostListener("window:resize")
15391
- ], TieredMenuNestedComponent.prototype, "onResize", null);
15435
+ Input()
15436
+ ], SelectButtonComponent.prototype, "items", void 0);
15392
15437
  __decorate([
15393
- HostListener("document:click", ["$event"])
15394
- ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
15438
+ Input()
15439
+ ], SelectButtonComponent.prototype, "multiple", void 0);
15395
15440
  __decorate([
15396
- HostListener("document:keydown", ["$event"])
15397
- ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
15398
- TieredMenuNestedComponent = __decorate([
15441
+ Output()
15442
+ ], SelectButtonComponent.prototype, "itemSelected", void 0);
15443
+ __decorate([
15444
+ Output()
15445
+ ], SelectButtonComponent.prototype, "itemClicked", void 0);
15446
+ SelectButtonComponent = SelectButtonComponent_1 = __decorate([
15399
15447
  Component({
15400
- 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",
15401
- 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}"]
15448
+ selector: "s-select-button",
15449
+ 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>",
15450
+ providers: [
15451
+ {
15452
+ provide: NG_VALUE_ACCESSOR,
15453
+ useExisting: forwardRef(() => SelectButtonComponent_1),
15454
+ multi: true,
15455
+ },
15456
+ ],
15457
+ styles: [".select-button{overflow:hidden}"]
15402
15458
  })
15403
- ], TieredMenuNestedComponent);
15459
+ ], SelectButtonComponent);
15404
15460
 
15405
- var TieredMenuComponent_1;
15406
- let TieredMenuComponent = TieredMenuComponent_1 = class TieredMenuComponent {
15407
- constructor(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
15408
- this._appRef = _appRef;
15409
- this._componentFactoryResolver = _componentFactoryResolver;
15410
- this._injector = _injector;
15411
- this._changeDetectorRef = _changeDetectorRef;
15412
- this.tieredMenuService = tieredMenuService;
15413
- this._tieredMenuEventService = _tieredMenuEventService;
15414
- this.top = 0;
15415
- this.left = 0;
15416
- this.menuTriggerEvent = "hover";
15417
- this._componentRef = null;
15418
- this._unsubscribe$ = new Subject();
15419
- this.destroyRequest = new EventEmitter();
15461
+ let SelectButtonItemComponent = class SelectButtonItemComponent {
15462
+ constructor() {
15463
+ this.active = false;
15464
+ this.first = false;
15465
+ this.last = false;
15466
+ this.disabled = false;
15420
15467
  }
15421
- onResize() {
15422
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15468
+ };
15469
+ __decorate([
15470
+ Input()
15471
+ ], SelectButtonItemComponent.prototype, "label", void 0);
15472
+ __decorate([
15473
+ Input()
15474
+ ], SelectButtonItemComponent.prototype, "active", void 0);
15475
+ __decorate([
15476
+ Input()
15477
+ ], SelectButtonItemComponent.prototype, "first", void 0);
15478
+ __decorate([
15479
+ Input()
15480
+ ], SelectButtonItemComponent.prototype, "last", void 0);
15481
+ __decorate([
15482
+ Input()
15483
+ ], SelectButtonItemComponent.prototype, "disabled", void 0);
15484
+ SelectButtonItemComponent = __decorate([
15485
+ Component({
15486
+ selector: "s-select-button-item",
15487
+ 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>",
15488
+ 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}"]
15489
+ })
15490
+ ], SelectButtonItemComponent);
15491
+
15492
+ let SelectButtonModule = class SelectButtonModule {
15493
+ };
15494
+ SelectButtonModule = __decorate([
15495
+ NgModule({
15496
+ imports: [CommonModule],
15497
+ declarations: [
15498
+ SelectButtonComponent,
15499
+ SelectButtonItemComponent,
15500
+ ],
15501
+ exports: [SelectButtonComponent],
15502
+ })
15503
+ ], SelectButtonModule);
15504
+
15505
+ var SidebarComponent_1;
15506
+ let SidebarComponent = SidebarComponent_1 = class SidebarComponent {
15507
+ constructor(focusTrapFactory) {
15508
+ this.focusTrapFactory = focusTrapFactory;
15509
+ this.id = `s-sidebar-${SidebarComponent_1.nextId++}`;
15510
+ this.visible = false;
15511
+ this.baseZIndex = 0;
15512
+ this.largeSized = false;
15513
+ this.visibleChange = new EventEmitter();
15423
15514
  }
15424
- onDocumentClick(event) {
15425
- // Closing menu when clicked outside.
15426
- const target = event.target;
15427
- const clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
15428
- if (!clickedInside) {
15429
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15430
- }
15515
+ onShow() {
15516
+ DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
15517
+ const focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
15518
+ focusTrap.focusInitialElementWhenReady();
15431
15519
  }
15432
- onKeydownHandler(event) {
15433
- switch (event.key) {
15434
- case "Escape":
15435
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15436
- break;
15437
- case " ":
15438
- case "Enter":
15439
- if (!this.tieredMenuService.currentItem.disabled) {
15440
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15441
- }
15442
- break;
15443
- case "ArrowLeft":
15444
- if (this.items.includes(this.tieredMenuService.currentItem)) {
15445
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
15446
- this._changeDetectorRef.detectChanges();
15447
- }
15448
- break;
15449
- case "ArrowRight":
15450
- if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
15451
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15452
- event.stopImmediatePropagation();
15453
- }
15454
- break;
15455
- case "ArrowUp":
15456
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15457
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15458
- event.stopImmediatePropagation();
15459
- }
15460
- break;
15461
- case "ArrowDown":
15462
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15463
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15464
- event.stopImmediatePropagation();
15465
- }
15466
- break;
15467
- }
15520
+ onHide() {
15521
+ DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15468
15522
  }
15469
- ngOnInit() {
15470
- this.tieredMenuService.currentItems = this.items;
15471
- this._subscribeEvents();
15523
+ close(event) {
15524
+ DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15525
+ this.visibleChange.emit(false);
15526
+ event.preventDefault();
15472
15527
  }
15473
- ngOnDestroy() {
15474
- this._unsubscribe$.next();
15475
- this._unsubscribe$.complete();
15528
+ };
15529
+ SidebarComponent.nextId = 0;
15530
+ SidebarComponent.ctorParameters = () => [
15531
+ { type: FocusTrapFactory }
15532
+ ];
15533
+ __decorate([
15534
+ Input()
15535
+ ], SidebarComponent.prototype, "id", void 0);
15536
+ __decorate([
15537
+ Input()
15538
+ ], SidebarComponent.prototype, "visible", void 0);
15539
+ __decorate([
15540
+ Input()
15541
+ ], SidebarComponent.prototype, "header", void 0);
15542
+ __decorate([
15543
+ Input()
15544
+ ], SidebarComponent.prototype, "baseZIndex", void 0);
15545
+ __decorate([
15546
+ Input()
15547
+ ], SidebarComponent.prototype, "largeSized", void 0);
15548
+ __decorate([
15549
+ Output()
15550
+ ], SidebarComponent.prototype, "visibleChange", void 0);
15551
+ __decorate([
15552
+ ViewChild(Sidebar, { static: true })
15553
+ ], SidebarComponent.prototype, "innerSidebar", void 0);
15554
+ __decorate([
15555
+ ContentChild(HeaderComponent, { static: true })
15556
+ ], SidebarComponent.prototype, "headerSection", void 0);
15557
+ __decorate([
15558
+ ContentChild(FooterComponent, { static: true })
15559
+ ], SidebarComponent.prototype, "footerSection", void 0);
15560
+ SidebarComponent = SidebarComponent_1 = __decorate([
15561
+ Component({
15562
+ selector: "s-sidebar",
15563
+ 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",
15564
+ encapsulation: ViewEncapsulation.None,
15565
+ 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}"]
15566
+ })
15567
+ ], SidebarComponent);
15568
+
15569
+ let SidebarModule = class SidebarModule {
15570
+ };
15571
+ SidebarModule = __decorate([
15572
+ NgModule({
15573
+ imports: [CommonModule, A11yModule, SidebarModule$1, ScrollPanelModule, StructureModule],
15574
+ declarations: [SidebarComponent],
15575
+ exports: [StructureModule, SidebarComponent],
15576
+ })
15577
+ ], SidebarModule);
15578
+
15579
+ let SlidePanelService = class SlidePanelService {
15580
+ constructor() {
15581
+ this.modalCloseMap = new Map();
15476
15582
  }
15477
- _incrementCurItem() {
15478
- if (!this.tieredMenuService.currentItem) {
15479
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15480
- return;
15481
- }
15482
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15483
- // Checking if it is the current menu.
15484
- return;
15485
- }
15486
- const currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15487
- if (currentIndex < this.tieredMenuService.currentItems.length) {
15488
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
15489
- }
15490
- else {
15491
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15492
- }
15493
- if (this.tieredMenuService.currentItem.divider) {
15494
- this._incrementCurItem();
15583
+ createSlidePanel(id) {
15584
+ const panelSubject = new Subject();
15585
+ this.modalCloseMap.set(id, panelSubject);
15586
+ return panelSubject.asObservable();
15587
+ }
15588
+ getModalCloseObservable(id) {
15589
+ return this.modalCloseMap.get(id).asObservable();
15590
+ }
15591
+ closeModal(id) {
15592
+ const subject = this.modalCloseMap.get(id);
15593
+ if (subject) {
15594
+ subject.next();
15495
15595
  }
15496
15596
  }
15497
- _decrementCurItem() {
15498
- if (!this.tieredMenuService.currentItem) {
15499
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15500
- return;
15501
- // Checking if it is the current menu.
15502
- }
15503
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15597
+ };
15598
+ SlidePanelService = __decorate([
15599
+ Injectable()
15600
+ ], SlidePanelService);
15601
+
15602
+ var SlidePanelComponent_1;
15603
+ const SMALL_DEVICE_BREAKPOINT = 420;
15604
+ let SlidePanelComponent = SlidePanelComponent_1 = class SlidePanelComponent {
15605
+ constructor(slidePanelService) {
15606
+ this.slidePanelService = slidePanelService;
15607
+ this.id = `slide-panel-${++SlidePanelComponent_1.nextId}`;
15608
+ this.openIcon = "fas fa-chevron-right";
15609
+ this.closeIcon = "fas fa-chevron-left";
15610
+ this.cache = false;
15611
+ this.createOpen = false;
15612
+ this.panelOpened = new EventEmitter();
15613
+ this.panelClosed = new EventEmitter();
15614
+ this.isOpen = false;
15615
+ this.isSlideOver = false;
15616
+ this.isAnimating = false;
15617
+ this.isContentAnimationDisabled = true;
15618
+ this.slideHeight = 0;
15619
+ this.sideContentWidth = 0;
15620
+ this._unsubscribe$ = new Subject();
15621
+ }
15622
+ onResize() {
15623
+ this._checkOverBehavior();
15624
+ }
15625
+ ngOnInit() {
15626
+ this._checkOverBehavior();
15627
+ this.slidePanelService.createSlidePanel(this.id)
15628
+ .pipe(takeUntil(this._unsubscribe$))
15629
+ .subscribe(() => {
15630
+ this.isOpen = false;
15631
+ });
15632
+ }
15633
+ ngAfterViewInit() {
15634
+ queueMicrotask(() => {
15635
+ if (this.createOpen) {
15636
+ this.isOpen = true;
15637
+ }
15638
+ });
15639
+ }
15640
+ ngAfterViewChecked() {
15641
+ // to executed at a safe time prior to control returning to the browser's event loop
15642
+ queueMicrotask(() => {
15643
+ this._calculateSlideHeight();
15644
+ this._calculateSideContentWidth();
15645
+ this.isContentAnimationDisabled = false;
15646
+ });
15647
+ }
15648
+ ngOnDestroy() {
15649
+ this._unsubscribe$.next();
15650
+ this._unsubscribe$.complete();
15651
+ }
15652
+ onClickButton() {
15653
+ if (this.isAnimating) {
15504
15654
  return;
15505
15655
  }
15506
- const curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15507
- if (curIndex >= 0) {
15508
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15656
+ this.isOpen = !this.isOpen;
15657
+ if (this.isOpen) {
15658
+ this.panelOpened.emit();
15509
15659
  }
15510
15660
  else {
15511
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15512
- }
15513
- if (this.tieredMenuService.currentItem.divider) {
15514
- this._decrementCurItem();
15661
+ this.panelClosed.emit();
15515
15662
  }
15516
15663
  }
15517
- _createMenu(items, position) {
15518
- if (!this._componentRef && items) {
15519
- const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
15520
- this._componentRef = componentFactory.create(this._injector);
15521
- this._appRef.attachView(this._componentRef.hostView);
15522
- const domElem = this._componentRef.hostView.rootNodes[0];
15523
- document.body.appendChild(domElem);
15524
- // Setting the menu items.
15525
- this._componentRef.instance.items = items;
15526
- // Subscribe menu events.
15527
- this._componentRef.instance.destroyRequest.subscribe((propagate) => {
15528
- this._destroy(propagate);
15529
- });
15530
- this._menuDivElement = domElem.querySelector(".menu");
15531
- this._setMenuPosition(position);
15532
- }
15664
+ onContentAnimationStart() {
15665
+ this.isAnimating = true;
15533
15666
  }
15534
- _destroy(propagate = true) {
15535
- if (this._componentRef !== null) {
15536
- this._appRef.detachView(this._componentRef.hostView);
15537
- this._componentRef.destroy();
15538
- this._componentRef = null;
15539
- this._menuDivElement = null;
15540
- }
15541
- if (propagate) {
15542
- this.destroyRequest.emit();
15667
+ onContentAnimationDone() {
15668
+ this.isAnimating = false;
15669
+ this._calculateSideContentWidth();
15670
+ }
15671
+ _checkOverBehavior() {
15672
+ this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
15673
+ }
15674
+ _calculateSlideHeight() {
15675
+ this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
15676
+ }
15677
+ _calculateSideContentWidth() {
15678
+ const slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
15679
+ const slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
15680
+ this.sideContentWidth = slidePanelWidth - slideContentWidth;
15681
+ }
15682
+ };
15683
+ SlidePanelComponent.nextId = 0;
15684
+ SlidePanelComponent.ctorParameters = () => [
15685
+ { type: SlidePanelService }
15686
+ ];
15687
+ __decorate([
15688
+ Input()
15689
+ ], SlidePanelComponent.prototype, "id", void 0);
15690
+ __decorate([
15691
+ Input()
15692
+ ], SlidePanelComponent.prototype, "openIcon", void 0);
15693
+ __decorate([
15694
+ Input()
15695
+ ], SlidePanelComponent.prototype, "closeIcon", void 0);
15696
+ __decorate([
15697
+ Input()
15698
+ ], SlidePanelComponent.prototype, "cache", void 0);
15699
+ __decorate([
15700
+ Input()
15701
+ ], SlidePanelComponent.prototype, "createOpen", void 0);
15702
+ __decorate([
15703
+ Output()
15704
+ ], SlidePanelComponent.prototype, "panelOpened", void 0);
15705
+ __decorate([
15706
+ Output()
15707
+ ], SlidePanelComponent.prototype, "panelClosed", void 0);
15708
+ __decorate([
15709
+ ViewChild("slidePanel")
15710
+ ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
15711
+ __decorate([
15712
+ ViewChild("slideContent")
15713
+ ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
15714
+ __decorate([
15715
+ ViewChild("sideContent")
15716
+ ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
15717
+ __decorate([
15718
+ HostListener("window:resize")
15719
+ ], SlidePanelComponent.prototype, "onResize", null);
15720
+ SlidePanelComponent = SlidePanelComponent_1 = __decorate([
15721
+ Component({
15722
+ selector: "s-slide-panel",
15723
+ 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>",
15724
+ animations: [
15725
+ trigger("cachelessAnimation", [
15726
+ transition(":enter", [
15727
+ style$7({ width: "0" }),
15728
+ animate("200ms linear", style$7({ width: "*" })),
15729
+ ]),
15730
+ transition(":leave", [
15731
+ style$7({ width: "*" }),
15732
+ animate("200ms linear", style$7({ width: "0" })),
15733
+ ]),
15734
+ ]),
15735
+ trigger("cacheAnimation", [
15736
+ state("true", style$7({ width: "*", padding: '0 16px' })),
15737
+ state("false", style$7({ width: '0px', padding: '0' })),
15738
+ transition("* => *", animate("200ms")),
15739
+ ]),
15740
+ ],
15741
+ 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}"]
15742
+ })
15743
+ ], SlidePanelComponent);
15744
+
15745
+ let SlidePanelModule = class SlidePanelModule {
15746
+ };
15747
+ SlidePanelModule = __decorate([
15748
+ NgModule({
15749
+ imports: [CommonModule],
15750
+ declarations: [SlidePanelComponent],
15751
+ exports: [SlidePanelComponent],
15752
+ providers: [SlidePanelService],
15753
+ })
15754
+ ], SlidePanelModule);
15755
+
15756
+ var SplitButtonType;
15757
+ (function (SplitButtonType) {
15758
+ SplitButtonType["Primary"] = "primary";
15759
+ SplitButtonType["Secondary"] = "secondary";
15760
+ SplitButtonType["Default"] = "default";
15761
+ })(SplitButtonType || (SplitButtonType = {}));
15762
+
15763
+ let SplitButtonComponent = class SplitButtonComponent {
15764
+ constructor(eRef) {
15765
+ this.eRef = eRef;
15766
+ this.disabled = false;
15767
+ this.type = SplitButtonType.Primary;
15768
+ this.buttonClicked = new EventEmitter();
15769
+ this.open = false;
15770
+ }
15771
+ onClickout(event) {
15772
+ if (!this.eRef.nativeElement.contains(event.target)) {
15773
+ this.closeDropdown();
15543
15774
  }
15544
15775
  }
15545
- _setMenuPosition(position) {
15546
- var _a, _b;
15547
- const ITEM_HEIGHT = 37;
15548
- const DIVIDER_HEIGHT = 5;
15549
- const PADDING = 8;
15550
- if (this._componentRef !== null) {
15551
- const { top, right, bottom, left } = position;
15552
- const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
15553
- return !item.divider ? count + 1 : count;
15554
- }, 0);
15555
- const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
15556
- return item.divider ? count + 1 : count;
15557
- }, 0);
15558
- // I need to calculate the height of the component because the internal elements have not been created yet.
15559
- const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
15560
- const menuWidth = this._menuDivElement.getBoundingClientRect().width;
15561
- const rightFreeSpace = window.innerWidth - right;
15562
- const bottomFreeSpace = window.innerHeight - bottom;
15563
- if (rightFreeSpace > menuWidth) {
15564
- this._componentRef.instance.left = right;
15565
- }
15566
- else {
15567
- this._componentRef.instance.left = left - menuWidth;
15568
- }
15569
- if (bottomFreeSpace <= menuHeight) {
15570
- this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
15571
- }
15572
- else {
15573
- this._componentRef.instance.top = window.scrollY + top;
15574
- }
15776
+ onButtonClick() {
15777
+ if (!this.disabled) {
15778
+ this.buttonClicked.emit();
15779
+ this.closeDropdown();
15575
15780
  }
15576
15781
  }
15577
- _subscribeEvents() {
15578
- // Increment current item event.
15579
- this._tieredMenuEventService.incrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
15580
- this._incrementCurItem();
15581
- });
15582
- // Decrement current item event.
15583
- this._tieredMenuEventService.decrementCurrentItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
15584
- this._decrementCurItem();
15585
- });
15586
- // Select item event.
15587
- this._tieredMenuEventService.selectItemEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
15588
- if (item.submenu) {
15589
- this._tieredMenuEventService.openItemMenuEvent.emit(item);
15590
- }
15591
- else if (item.command) {
15592
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15593
- item.command();
15594
- }
15595
- });
15596
- // Close all menus event.
15597
- this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
15598
- this._destroy();
15599
- this.tieredMenuService.currentItem = null;
15600
- this.tieredMenuService.currentItems = this.tieredMenuService.items;
15601
- this.tieredMenuService.markAllItemsAsClosed(this.tieredMenuService.items);
15602
- });
15603
- // Open item menu event.
15604
- this._tieredMenuEventService.openItemMenuEvent.pipe(takeUntil(this._unsubscribe$)).subscribe((item) => {
15605
- if (this.tieredMenuService.currentItem) {
15606
- if (this.tieredMenuService.currentItem.parent === item) {
15607
- return;
15608
- }
15609
- if (!this.tieredMenuService.searchTheHierarchy(this.tieredMenuService.currentItem.parent, item)) {
15610
- let current = this.tieredMenuService.currentItem;
15611
- current.isOpen = false;
15612
- while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
15613
- this._tieredMenuEventService.closeItemMenuEvent.emit(current);
15614
- this._changeDetectorRef.detectChanges();
15615
- current = current.parent;
15616
- }
15617
- if (current) {
15618
- current.isOpen = false;
15619
- }
15620
- }
15621
- }
15622
- if (item.submenu && !item.isOpen && this.items.includes(item)) {
15623
- const { top, right, left, bottom } = document.querySelector(`#${item.id}`).getBoundingClientRect();
15624
- const position = { top, right, left, bottom };
15625
- this._createMenu(item.submenu, position);
15626
- this.tieredMenuService.currentItems = item.submenu;
15627
- this.tieredMenuService.currentItem = item.submenu[0];
15628
- item.isOpen = true;
15629
- }
15630
- });
15631
- // Close item menu event.
15632
- this._tieredMenuEventService.closeItemMenuEvent
15633
- .pipe(takeUntil(this._unsubscribe$))
15634
- .subscribe((item) => {
15635
- var _a, _b;
15636
- if (this.items.some((i) => i.id === item.id)) {
15637
- if (item.parent) {
15638
- item.parent.isOpen = false;
15639
- }
15640
- 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;
15641
- this.tieredMenuService.currentItem = item.parent;
15642
- this.destroyRequest.emit(false);
15643
- }
15644
- });
15782
+ onDropdownClick() {
15783
+ if (!this.disabled) {
15784
+ this.open = !this.open;
15785
+ }
15645
15786
  }
15646
- };
15647
- TieredMenuComponent.ctorParameters = () => [
15648
- { type: ApplicationRef },
15649
- { type: ComponentFactoryResolver },
15650
- { type: Injector },
15651
- { type: ChangeDetectorRef },
15652
- { type: TieredMenuService },
15653
- { type: TieredMenuEventService }
15787
+ onOptionClick(option) {
15788
+ option.action && option.action();
15789
+ this.closeDropdown();
15790
+ }
15791
+ closeDropdown() {
15792
+ this.open = false;
15793
+ }
15794
+ };
15795
+ SplitButtonComponent.ctorParameters = () => [
15796
+ { type: ElementRef }
15654
15797
  ];
15655
15798
  __decorate([
15656
- Output()
15657
- ], TieredMenuComponent.prototype, "destroyRequest", void 0);
15799
+ Input()
15800
+ ], SplitButtonComponent.prototype, "disabled", void 0);
15658
15801
  __decorate([
15659
- HostListener("window:resize")
15660
- ], TieredMenuComponent.prototype, "onResize", null);
15802
+ Input()
15803
+ ], SplitButtonComponent.prototype, "iconClass", void 0);
15661
15804
  __decorate([
15662
- HostListener("document:click", ["$event"])
15663
- ], TieredMenuComponent.prototype, "onDocumentClick", null);
15805
+ Input()
15806
+ ], SplitButtonComponent.prototype, "label", void 0);
15664
15807
  __decorate([
15665
- HostListener("document:keydown", ["$event"])
15666
- ], TieredMenuComponent.prototype, "onKeydownHandler", null);
15667
- TieredMenuComponent = TieredMenuComponent_1 = __decorate([
15808
+ Input()
15809
+ ], SplitButtonComponent.prototype, "type", void 0);
15810
+ __decorate([
15811
+ Input()
15812
+ ], SplitButtonComponent.prototype, "options", void 0);
15813
+ __decorate([
15814
+ Output()
15815
+ ], SplitButtonComponent.prototype, "buttonClicked", void 0);
15816
+ __decorate([
15817
+ HostListener("document:click", ["$event"])
15818
+ ], SplitButtonComponent.prototype, "onClickout", null);
15819
+ SplitButtonComponent = __decorate([
15668
15820
  Component({
15669
- selector: "s-tiered-menu",
15670
- 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>",
15671
- 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}"]
15821
+ selector: "s-split-button",
15822
+ 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>",
15823
+ 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}"]
15672
15824
  })
15673
- ], TieredMenuComponent);
15825
+ ], SplitButtonComponent);
15674
15826
 
15675
- let TieredMenuGlobalService = class TieredMenuGlobalService {
15827
+ let SplitButtonModule = class SplitButtonModule {
15676
15828
  };
15677
- TieredMenuGlobalService = __decorate([
15678
- Injectable()
15679
- ], TieredMenuGlobalService);
15829
+ SplitButtonModule = __decorate([
15830
+ NgModule({
15831
+ imports: [CommonModule],
15832
+ declarations: [SplitButtonComponent],
15833
+ exports: [SplitButtonComponent],
15834
+ })
15835
+ ], SplitButtonModule);
15680
15836
 
15681
- let TieredMenuDirective = class TieredMenuDirective {
15682
- constructor(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
15683
- this._elementRef = _elementRef;
15684
- this._appRef = _appRef;
15685
- this._componentFactoryResolver = _componentFactoryResolver;
15686
- this._injector = _injector;
15687
- this._tieredMenuEventService = _tieredMenuEventService;
15688
- this._tieredMenuService = _tieredMenuService;
15689
- this._tieredMenuGlobalService = _tieredMenuGlobalService;
15690
- this._changeDetectorRef = _changeDetectorRef;
15691
- this.items = [];
15692
- this.triggerEvent = "click";
15693
- this._componentRef = null;
15694
- this._isNested = false;
15695
- this._isOpen = false;
15696
- this._unsubscribe$ = new Subject();
15697
- }
15698
- onClick(event) {
15699
- if (this.triggerEvent === "click" && !this._isOpen) {
15700
- this._lastActiveElement = document.activeElement;
15701
- this._createMenu();
15702
- event.preventDefault();
15703
- event.stopPropagation();
15704
- }
15705
- }
15706
- ngOnInit() {
15707
- this._subscribeEvents();
15708
- }
15709
- ngDoCheck() {
15710
- if (!this.previousItems) {
15711
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
15712
- }
15713
- let hasChanges = false;
15714
- if (this.items.length !== this.previousItems.length) {
15715
- hasChanges = true;
15716
- }
15717
- else {
15718
- for (let i = 0; i < this.items.length; i++) {
15719
- if (!this._compareItems(this.items[i], this.previousItems[i])) {
15720
- hasChanges = true;
15721
- break;
15722
- }
15723
- }
15724
- }
15725
- if (hasChanges) {
15726
- this._updateServiceItems();
15727
- this._changeDetectorRef.detectChanges();
15728
- this._rebuildMenu();
15729
- }
15730
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
15731
- }
15732
- ngOnDestroy() {
15733
- this._unsubscribe$.next();
15734
- this._unsubscribe$.complete();
15735
- this._destroy();
15736
- }
15737
- _createMenu() {
15738
- var _a, _b, _c;
15739
- this._updateServiceItems();
15740
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15741
- (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
15742
- this._tieredMenuGlobalService.lastInstance = this;
15743
- (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
15744
- this._isOpen = true;
15745
- this._isNested = document.body.clientWidth < 600;
15746
- this._isNested ? this._createNestedMenu() : this._createTieredMenu();
15747
- }
15748
- }
15749
- _createTieredMenu() {
15750
- var _a;
15751
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15752
- const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
15753
- this._componentRef = componentFactory.create(this._injector);
15754
- this._appRef.attachView(this._componentRef.hostView);
15755
- const domElem = this._componentRef.hostView.rootNodes[0];
15756
- document.body.appendChild(domElem);
15757
- this._setMenuComponentProperties();
15758
- this._componentRef.instance.destroyRequest.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
15759
- this._destroy();
15760
- });
15761
- this._setMenuPosition();
15762
- }
15837
+ var StatsCardComponent_1;
15838
+ let StatsCardComponent = StatsCardComponent_1 = class StatsCardComponent {
15839
+ constructor() {
15840
+ this.id = `s-stats-card-${StatsCardComponent_1.nextId++}`;
15841
+ this.alwaysWithBorder = false;
15842
+ this.lightVersion = false;
15843
+ this.lightMode = true;
15844
+ this.iconClass = "fa fa-bar-chart";
15845
+ this.color = "#339966";
15846
+ this.animateNumbers = true;
15847
+ this.clickable = false;
15848
+ this.tooltip = "";
15849
+ this.onClick = new EventEmitter();
15850
+ this.ANIMATION_DURATION_MS = 200;
15851
+ this.STEP_DURATION_MS = 20;
15852
+ this.previousValue = "0";
15853
+ this._value = "0";
15763
15854
  }
15764
- _createNestedMenu() {
15765
- var _a;
15766
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15767
- const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
15768
- this._componentRef = componentFactory.create(this._injector);
15769
- this._appRef.attachView(this._componentRef.hostView);
15770
- const domElem = this._componentRef.hostView.rootNodes[0];
15771
- document.body.appendChild(domElem);
15772
- this._setMenuComponentProperties();
15773
- this._setMenuPosition();
15774
- }
15855
+ set value(value) {
15856
+ this.previousValue = this._value;
15857
+ this._value = String(value);
15858
+ if (this.animateNumbers)
15859
+ this.updateDisplayValue();
15860
+ else
15861
+ this.displayValue = this.value;
15775
15862
  }
15776
- _destroy() {
15777
- if (this._componentRef) {
15778
- this._isOpen = false;
15779
- window.clearTimeout(this._showTimeout);
15780
- this._appRef.detachView(this._componentRef.hostView);
15781
- this._componentRef.destroy();
15782
- this._componentRef = null;
15783
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
15784
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15785
- this._tieredMenuEventService.closeAllMenusEvent.emit();
15786
- }
15863
+ get value() {
15864
+ return this._value;
15787
15865
  }
15788
- _setMenuPosition() {
15789
- var _a, _b;
15790
- const ITEM_HEIGHT = 37;
15791
- const ITEM_WIDTH = 176;
15792
- const DIVIDER_HEIGHT = 5;
15793
- const PADDING = 8;
15794
- const MARGIN = 4;
15795
- if (this._componentRef !== null) {
15796
- this._componentRef.instance.top = 8;
15797
- let { bottom, left, right } = this._elementRef.nativeElement.getBoundingClientRect();
15798
- const itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce((count, item) => {
15799
- return !item.divider ? count + 1 : count;
15800
- }, 0);
15801
- const dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce((count, item) => {
15802
- return item.divider ? count + 1 : count;
15803
- }, 0);
15804
- const menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
15805
- const rightFreeSpace = window.innerWidth - right;
15806
- const bottomFreeSpace = window.innerHeight - bottom;
15807
- this._componentRef.instance.top = bottom;
15808
- this._componentRef.instance.left = left;
15809
- if (bottomFreeSpace <= menuHeight) {
15810
- this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
15811
- }
15812
- else {
15813
- this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
15866
+ updateDisplayValue() {
15867
+ const animationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS);
15868
+ const stepDuration = new BigNumber$1(this.STEP_DURATION_MS);
15869
+ const animationCount = animationDuration.dividedBy(stepDuration);
15870
+ const previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
15871
+ const rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
15872
+ const incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
15873
+ const incremental = previousRawValue.isLessThan(rawValue);
15874
+ clearInterval(this.intervalId);
15875
+ this.displayValue = this.replaceNumericPositions(this.value);
15876
+ let counter = previousRawValue;
15877
+ this.intervalId = setInterval(() => {
15878
+ if (incremental && counter.isLessThan(rawValue)) {
15879
+ this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
15880
+ counter = counter.plus(incrementValue);
15814
15881
  }
15815
- if (rightFreeSpace > 176) {
15816
- this._componentRef.instance.left = window.scrollX + left;
15882
+ else if (!incremental && counter.isGreaterThan(rawValue)) {
15883
+ this.displayValue = this.replaceNumericPositions(this.displayValue, counter);
15884
+ counter = counter.minus(incrementValue);
15817
15885
  }
15818
15886
  else {
15819
- this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
15820
- }
15821
- if (this._isNested) {
15822
- this._componentRef.instance.left = MARGIN;
15823
- }
15824
- }
15825
- }
15826
- _setMenuComponentProperties() {
15827
- if (this._componentRef != null) {
15828
- this._componentRef.instance.items = this._tieredMenuService.items;
15829
- }
15830
- }
15831
- _subscribeEvents() {
15832
- this._tieredMenuEventService.closeAllMenusEvent.pipe(takeUntil(this._unsubscribe$)).subscribe(() => {
15833
- this._tieredMenuService.items = this._tieredMenuService.markAllItemsAsClosed(this._tieredMenuService.items);
15834
- this._destroy();
15835
- });
15836
- }
15837
- _compareItems(item1, item2) {
15838
- return JSON.stringify(item1) === JSON.stringify(item2);
15839
- }
15840
- _rebuildMenu() {
15841
- this._destroy();
15887
+ this.displayValue = this.value;
15888
+ clearInterval(this.intervalId);
15889
+ }
15890
+ }, this.STEP_DURATION_MS);
15842
15891
  }
15843
- _updateServiceItems() {
15844
- this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
15845
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
15846
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15892
+ replaceNumericPositions(value, newValue) {
15893
+ const rawValue = value.replace(/[^\d]/g, "");
15894
+ const newValueString = newValue ? newValue.toString() : "";
15895
+ const formattedNewValue = newValueString
15896
+ .toString()
15897
+ .replace(/\D/g, "")
15898
+ .padStart(rawValue.length, "0");
15899
+ let newValueIndex = 0;
15900
+ return value
15901
+ .split("")
15902
+ .map(char => {
15903
+ const number = Number(char);
15904
+ if (number || char === "0")
15905
+ return formattedNewValue[newValueIndex++];
15906
+ return char;
15907
+ })
15908
+ .join("");
15847
15909
  }
15848
15910
  };
15849
- TieredMenuDirective.ctorParameters = () => [
15850
- { type: ElementRef },
15851
- { type: ApplicationRef },
15852
- { type: ComponentFactoryResolver },
15853
- { type: Injector },
15854
- { type: TieredMenuEventService },
15855
- { type: TieredMenuService },
15856
- { type: TieredMenuGlobalService },
15857
- { type: ChangeDetectorRef }
15858
- ];
15911
+ StatsCardComponent.nextId = 0;
15859
15912
  __decorate([
15860
15913
  Input()
15861
- ], TieredMenuDirective.prototype, "items", void 0);
15914
+ ], StatsCardComponent.prototype, "id", void 0);
15862
15915
  __decorate([
15863
15916
  Input()
15864
- ], TieredMenuDirective.prototype, "triggerEvent", void 0);
15917
+ ], StatsCardComponent.prototype, "label", void 0);
15865
15918
  __decorate([
15866
- HostListener("click", ["$event"])
15867
- ], TieredMenuDirective.prototype, "onClick", null);
15868
- TieredMenuDirective = __decorate([
15869
- Directive({
15870
- selector: "[sTieredMenu]",
15871
- providers: [TieredMenuEventService, TieredMenuService],
15872
- })
15873
- ], TieredMenuDirective);
15874
-
15875
- let TieredMenuDividerComponent = class TieredMenuDividerComponent {
15876
- };
15877
- TieredMenuDividerComponent = __decorate([
15878
- Component({
15879
- selector: "s-tiered-menu-divider",
15880
- template: "<div class=\"divider\"></div>",
15881
- styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
15882
- })
15883
- ], TieredMenuDividerComponent);
15884
-
15885
- let TieredMenuItemComponent = class TieredMenuItemComponent {
15886
- constructor(_tieredMenuEventService) {
15887
- this._tieredMenuEventService = _tieredMenuEventService;
15888
- this.focused = false;
15889
- this.highlight = false;
15890
- this.triggerEvent = "click";
15891
- this.closeOnClick = false;
15892
- }
15893
- onClick() {
15894
- if (this.item.disabled)
15895
- return;
15896
- if (this.item.submenu) {
15897
- if (!this.item.isOpen) {
15898
- this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
15899
- }
15900
- else if (this.closeOnClick) {
15901
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
15902
- }
15903
- }
15904
- else {
15905
- this._tieredMenuEventService.selectItemEvent.emit(this.item);
15906
- }
15907
- }
15908
- onMouseEnter() {
15909
- if (this.item.disabled)
15910
- return;
15911
- if (this.triggerEvent === "hover" && !this.item.isOpen) {
15912
- this._showTimeout = window.setTimeout(() => {
15913
- this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
15914
- }, 300);
15915
- }
15916
- }
15917
- onMouseLeave() {
15918
- window.clearTimeout(this._showTimeout);
15919
- }
15920
- };
15921
- TieredMenuItemComponent.ctorParameters = () => [
15922
- { type: TieredMenuEventService }
15923
- ];
15919
+ Input()
15920
+ ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
15924
15921
  __decorate([
15925
15922
  Input()
15926
- ], TieredMenuItemComponent.prototype, "item", void 0);
15923
+ ], StatsCardComponent.prototype, "lightVersion", void 0);
15927
15924
  __decorate([
15928
15925
  Input()
15929
- ], TieredMenuItemComponent.prototype, "focused", void 0);
15926
+ ], StatsCardComponent.prototype, "lightMode", void 0);
15930
15927
  __decorate([
15931
15928
  Input()
15932
- ], TieredMenuItemComponent.prototype, "highlight", void 0);
15929
+ ], StatsCardComponent.prototype, "iconClass", void 0);
15933
15930
  __decorate([
15934
15931
  Input()
15935
- ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
15932
+ ], StatsCardComponent.prototype, "color", void 0);
15936
15933
  __decorate([
15937
15934
  Input()
15938
- ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
15935
+ ], StatsCardComponent.prototype, "animateNumbers", void 0);
15939
15936
  __decorate([
15940
- HostListener("click"),
15941
- HostListener("touchend")
15942
- ], TieredMenuItemComponent.prototype, "onClick", null);
15937
+ Input()
15938
+ ], StatsCardComponent.prototype, "clickable", void 0);
15943
15939
  __decorate([
15944
- HostListener("mouseenter")
15945
- ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
15940
+ Input()
15941
+ ], StatsCardComponent.prototype, "value", null);
15946
15942
  __decorate([
15947
- HostListener("mouseleave")
15948
- ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
15949
- TieredMenuItemComponent = __decorate([
15943
+ Input()
15944
+ ], StatsCardComponent.prototype, "tooltip", void 0);
15945
+ __decorate([
15946
+ Output()
15947
+ ], StatsCardComponent.prototype, "onClick", void 0);
15948
+ StatsCardComponent = StatsCardComponent_1 = __decorate([
15950
15949
  Component({
15951
- selector: "s-tiered-menu-item",
15952
- 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>",
15953
- 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}"]
15950
+ selector: "s-stats-card",
15951
+ 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",
15952
+ encapsulation: ViewEncapsulation.None,
15953
+ 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}}"]
15954
15954
  })
15955
- ], TieredMenuItemComponent);
15955
+ ], StatsCardComponent);
15956
15956
 
15957
- let TieredMenuModule = class TieredMenuModule {
15957
+ let StatsCardModule = class StatsCardModule {
15958
15958
  };
15959
- TieredMenuModule = __decorate([
15959
+ StatsCardModule = __decorate([
15960
15960
  NgModule({
15961
15961
  imports: [
15962
15962
  CommonModule,
15963
+ TooltipModule$1,
15963
15964
  ],
15964
15965
  declarations: [
15965
- TieredMenuDirective,
15966
- TieredMenuComponent,
15967
- TieredMenuNestedComponent,
15968
- TieredMenuItemComponent,
15969
- TieredMenuDividerComponent,
15966
+ StatsCardComponent,
15967
+ ],
15968
+ exports: [
15969
+ StatsCardComponent,
15970
15970
  ],
15971
- exports: [TieredMenuDirective],
15972
- providers: [TieredMenuGlobalService],
15973
15971
  })
15974
- ], TieredMenuModule);
15972
+ ], StatsCardModule);
15973
+
15974
+ var StepsComponent_1;
15975
+ var StepState;
15976
+ (function (StepState) {
15977
+ StepState["Default"] = "default";
15978
+ StepState["Success"] = "success";
15979
+ StepState["Warning"] = "warning";
15980
+ })(StepState || (StepState = {}));
15981
+ let StepsComponent = StepsComponent_1 = class StepsComponent {
15982
+ constructor() {
15983
+ this.id = `s-steps-${StepsComponent_1.nextId++}`;
15984
+ this.activeIndex = 0;
15985
+ this.stepSelected = new EventEmitter();
15986
+ }
15987
+ stepClick(step, index, event) {
15988
+ if (step.disabled || index == this.activeIndex)
15989
+ return;
15990
+ this.stepSelected.emit({ step, index, event });
15991
+ }
15992
+ get stepState() {
15993
+ return StepState;
15994
+ }
15995
+ barAnimation(index, activeIndex) {
15996
+ const visited = index < activeIndex;
15997
+ const activated = index === activeIndex;
15998
+ return visited || activated;
15999
+ }
16000
+ afterBarAnimation(index, activeIndex) {
16001
+ const visited = index < activeIndex;
16002
+ const activated = index === activeIndex - 1;
16003
+ return visited || activated;
16004
+ }
16005
+ get visibledStep() {
16006
+ return this.steps.filter((step) => !step.hidden);
16007
+ }
16008
+ };
16009
+ StepsComponent.nextId = 0;
16010
+ __decorate([
16011
+ Input()
16012
+ ], StepsComponent.prototype, "id", void 0);
16013
+ __decorate([
16014
+ Input()
16015
+ ], StepsComponent.prototype, "steps", void 0);
16016
+ __decorate([
16017
+ Input()
16018
+ ], StepsComponent.prototype, "activeIndex", void 0);
16019
+ __decorate([
16020
+ Output()
16021
+ ], StepsComponent.prototype, "stepSelected", void 0);
16022
+ StepsComponent = StepsComponent_1 = __decorate([
16023
+ Component({
16024
+ selector: "s-steps",
16025
+ 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",
16026
+ host: {
16027
+ "aria-orientation": "horizontal",
16028
+ role: "tablist",
16029
+ "tab-index": "0",
16030
+ },
16031
+ animations: [
16032
+ trigger("beforeActiveDesative", [
16033
+ state("active", style$7({
16034
+ "background-position": "left bottom",
16035
+ })),
16036
+ state("desactive", style$7({
16037
+ "background-position": "right bottom",
16038
+ })),
16039
+ transition("active => desactive", [animate("50ms 100ms linear")]),
16040
+ transition("desactive => active", [animate("50ms 250ms linear")]),
16041
+ ]),
16042
+ trigger("activeDesative", [
16043
+ state("active", style$7({
16044
+ "background-position": "left bottom",
16045
+ })),
16046
+ state("desactive", style$7({
16047
+ "background-position": "right bottom",
16048
+ })),
16049
+ transition("active => desactive", [animate("100ms 150ms linear")]),
16050
+ transition("desactive => active", [animate("100ms 150ms linear")]),
16051
+ ]),
16052
+ trigger("afterActiveDesative", [
16053
+ state("active", style$7({
16054
+ "background-position": "left bottom",
16055
+ })),
16056
+ state("desactive", style$7({
16057
+ "background-position": "right bottom",
16058
+ })),
16059
+ transition("active => desactive", [animate("50ms 250ms linear")]),
16060
+ transition("desactive => active", [animate("50ms 100ms linear")]),
16061
+ ]),
16062
+ ],
16063
+ 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}}"]
16064
+ })
16065
+ ], StepsComponent);
16066
+
16067
+ let StepsModule = class StepsModule {
16068
+ };
16069
+ StepsModule = __decorate([
16070
+ NgModule({
16071
+ imports: [CommonModule, TooltipModule$1],
16072
+ declarations: [StepsComponent],
16073
+ exports: [StepsComponent],
16074
+ })
16075
+ ], StepsModule);
15975
16076
 
15976
16077
  var TileComponent_1;
15977
16078
  let TileComponent = TileComponent_1 = class TileComponent {
@@ -16883,5 +16984,5 @@ const fallback = {
16883
16984
  * Generated bundle index. Do not edit.
16884
16985
  */
16885
16986
 
16886
- 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 };
16987
+ 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 };
16887
16988
  //# sourceMappingURL=seniorsistemas-angular-components.js.map