@seniorsistemas/angular-components 17.8.10 → 17.8.12

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