@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
@@ -6379,6 +6379,7 @@
6379
6379
  (function (ValidateErrors) {
6380
6380
  ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
6381
6381
  ValidateErrors["MAX_FILE_LIMIT"] = "MAX_FILE_LIMIT";
6382
+ ValidateErrors["MAX_COMBINED_FILE_SIZE"] = "MAX_COMBINED_FILE_SIZE";
6382
6383
  ValidateErrors["UNSUPPORTED_EXTENSION"] = "UNSUPPORTED_EXTENSION";
6383
6384
  })(exports.ValidateErrors || (exports.ValidateErrors = {}));
6384
6385
 
@@ -6466,6 +6467,14 @@
6466
6467
  this.clearFileInput();
6467
6468
  return;
6468
6469
  }
6470
+ if (this.isFileCombinedSizeExceeded(files)) {
6471
+ this.validateErrors.emit({
6472
+ files: files,
6473
+ validation: exports.ValidateErrors.MAX_COMBINED_FILE_SIZE,
6474
+ });
6475
+ this.clearFileInput();
6476
+ return;
6477
+ }
6469
6478
  try {
6470
6479
  for (var files_1 = __values(files), files_1_1 = files_1.next(); !files_1_1.done; files_1_1 = files_1.next()) {
6471
6480
  var file = files_1_1.value;
@@ -6534,6 +6543,14 @@
6534
6543
  }
6535
6544
  return this.files.length + files.length > this.fileLimit;
6536
6545
  };
6546
+ FileUploadComponent.prototype.isFileCombinedSizeExceeded = function (files) {
6547
+ if (!this.maxCombinedFileSize) {
6548
+ return false;
6549
+ }
6550
+ var filesList = __spread(files, this.files);
6551
+ var combinedSize = filesList.reduce(function (combinedSize, file) { return combinedSize + file.size; }, 0);
6552
+ return combinedSize > this.maxCombinedFileSize;
6553
+ };
6537
6554
  FileUploadComponent.prototype.isFileSizeExceeded = function (file) {
6538
6555
  if (!this.maxFileSize) {
6539
6556
  return false;
@@ -6610,6 +6627,9 @@
6610
6627
  __decorate([
6611
6628
  core.Input()
6612
6629
  ], FileUploadComponent.prototype, "maxFileSize", void 0);
6630
+ __decorate([
6631
+ core.Input()
6632
+ ], FileUploadComponent.prototype, "maxCombinedFileSize", void 0);
6613
6633
  __decorate([
6614
6634
  core.Input()
6615
6635
  ], FileUploadComponent.prototype, "fileLimit", void 0);
@@ -14867,2327 +14887,2436 @@
14867
14887
  return KanbanModule;
14868
14888
  }());
14869
14889
 
14870
- var ObjectCardFieldComponent = /** @class */ (function () {
14871
- function ObjectCardFieldComponent() {
14872
- this.id = "s-object-card-field-" + ObjectCardFieldComponent_1.nextId++;
14873
- this.buttonClick = new core.EventEmitter();
14890
+ var NavigationButtonComponent = /** @class */ (function () {
14891
+ function NavigationButtonComponent() {
14892
+ this.stepChanged = new core.EventEmitter();
14893
+ this.currentIndex = 0;
14894
+ this.isDisabled = false;
14895
+ this.tieredMenuItems = [];
14874
14896
  }
14875
- ObjectCardFieldComponent_1 = ObjectCardFieldComponent;
14876
- var ObjectCardFieldComponent_1;
14877
- ObjectCardFieldComponent.nextId = 0;
14878
- __decorate([
14879
- core.Input()
14880
- ], ObjectCardFieldComponent.prototype, "id", void 0);
14881
- __decorate([
14882
- core.Input()
14883
- ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
14884
- __decorate([
14885
- core.Input()
14886
- ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
14887
- __decorate([
14888
- core.Input()
14889
- ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
14890
- __decorate([
14891
- core.Input()
14892
- ], ObjectCardFieldComponent.prototype, "label", void 0);
14897
+ NavigationButtonComponent_1 = NavigationButtonComponent;
14898
+ NavigationButtonComponent.prototype.ngOnInit = function () {
14899
+ var _this = this;
14900
+ var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14901
+ this.currentIndex = index !== -1 ? index : 0;
14902
+ this.stepChanged.emit({
14903
+ previous: undefined,
14904
+ current: this.steps[this.currentIndex],
14905
+ });
14906
+ this._createTieredMenuItems();
14907
+ };
14908
+ NavigationButtonComponent.prototype.writeValue = function (value) {
14909
+ var _this = this;
14910
+ this._value = value;
14911
+ var index = this.steps.findIndex(function (step) { return step.value === _this._value; });
14912
+ this.currentIndex = index !== -1 ? index : 0;
14913
+ };
14914
+ NavigationButtonComponent.prototype.registerOnChange = function (onChange) {
14915
+ this._onChange = onChange;
14916
+ };
14917
+ NavigationButtonComponent.prototype.registerOnTouched = function (onTouched) {
14918
+ this._onTouched = onTouched;
14919
+ };
14920
+ NavigationButtonComponent.prototype.setDisabledState = function (isDisabled) {
14921
+ this.isDisabled = isDisabled;
14922
+ };
14923
+ NavigationButtonComponent.prototype.onNext = function () {
14924
+ if (this.isDisabled)
14925
+ return;
14926
+ var previous = this.steps[this.currentIndex];
14927
+ if (this.currentIndex < this.steps.length - 1) {
14928
+ this.currentIndex++;
14929
+ }
14930
+ var current = this.steps[this.currentIndex];
14931
+ this._onTouched && this._onTouched();
14932
+ this._onChange && this._onChange(current.value);
14933
+ this.stepChanged.emit({ previous: previous, current: current });
14934
+ };
14935
+ NavigationButtonComponent.prototype.onPrevious = function () {
14936
+ if (this.isDisabled)
14937
+ return;
14938
+ var previous = this.steps[this.currentIndex];
14939
+ if (this.currentIndex > 0) {
14940
+ this.currentIndex--;
14941
+ }
14942
+ var current = this.steps[this.currentIndex];
14943
+ this._onTouched && this._onTouched();
14944
+ this._onChange && this._onChange(current.value);
14945
+ this.stepChanged.emit({ previous: previous, current: current });
14946
+ };
14947
+ NavigationButtonComponent.prototype._createTieredMenuItems = function () {
14948
+ var _this = this;
14949
+ this.steps.forEach(function (step) {
14950
+ _this.tieredMenuItems.push({
14951
+ label: step.label,
14952
+ command: function () { return _this.currentIndex = _this.steps.findIndex(function (s) { return s === step; }); },
14953
+ });
14954
+ });
14955
+ };
14956
+ var NavigationButtonComponent_1;
14893
14957
  __decorate([
14894
14958
  core.Input()
14895
- ], ObjectCardFieldComponent.prototype, "description", void 0);
14959
+ ], NavigationButtonComponent.prototype, "steps", void 0);
14896
14960
  __decorate([
14897
14961
  core.Input()
14898
- ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
14962
+ ], NavigationButtonComponent.prototype, "defaultValue", void 0);
14899
14963
  __decorate([
14900
14964
  core.Input()
14901
- ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
14965
+ ], NavigationButtonComponent.prototype, "tooltip", void 0);
14902
14966
  __decorate([
14903
14967
  core.Output()
14904
- ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
14905
- __decorate([
14906
- core.ContentChild(ThumbnailComponent, { static: true })
14907
- ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
14908
- __decorate([
14909
- core.ViewChild(core.TemplateRef, { static: true })
14910
- ], ObjectCardFieldComponent.prototype, "content", void 0);
14911
- ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
14968
+ ], NavigationButtonComponent.prototype, "stepChanged", void 0);
14969
+ NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
14912
14970
  core.Component({
14913
- selector: "s-object-card-field",
14914
- 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",
14915
- 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}"]
14971
+ selector: "s-navigation-button",
14972
+ 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",
14973
+ providers: [
14974
+ {
14975
+ provide: forms.NG_VALUE_ACCESSOR,
14976
+ useExisting: core.forwardRef(function () { return NavigationButtonComponent_1; }),
14977
+ multi: true,
14978
+ },
14979
+ ],
14980
+ 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}"]
14916
14981
  })
14917
- ], ObjectCardFieldComponent);
14918
- return ObjectCardFieldComponent;
14982
+ ], NavigationButtonComponent);
14983
+ return NavigationButtonComponent;
14919
14984
  }());
14920
14985
 
14921
- var ObjectCardMainComponent = /** @class */ (function () {
14922
- function ObjectCardMainComponent() {
14923
- this.id = "s-object-card-main-" + ObjectCardMainComponent_1.nextId++;
14924
- this.iconClass = "fa fa-picture-o";
14925
- this.hasThumbnail = true;
14926
- this.hasDescription = true;
14927
- this.isBrand = false;
14928
- this.buttonClick = new core.EventEmitter();
14929
- this._thumbnailSize = exports.ThumbnailSize.Medium;
14986
+ var TieredMenuDividerComponent = /** @class */ (function () {
14987
+ function TieredMenuDividerComponent() {
14930
14988
  }
14931
- ObjectCardMainComponent_1 = ObjectCardMainComponent;
14932
- Object.defineProperty(ObjectCardMainComponent.prototype, "thumbnailSize", {
14933
- get: function () {
14934
- return this._thumbnailSize;
14935
- },
14936
- set: function (value) {
14937
- this._thumbnailSize = value;
14938
- if (this.thumbnailComponent)
14939
- this.thumbnailComponent.size = value;
14940
- },
14941
- enumerable: true,
14942
- configurable: true
14943
- });
14944
- ObjectCardMainComponent.prototype.onResize = function () {
14945
- this.update();
14989
+ TieredMenuDividerComponent = __decorate([
14990
+ core.Component({
14991
+ selector: "s-tiered-menu-divider",
14992
+ template: "<div class=\"divider\"></div>",
14993
+ styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
14994
+ })
14995
+ ], TieredMenuDividerComponent);
14996
+ return TieredMenuDividerComponent;
14997
+ }());
14998
+
14999
+ var TieredMenuEventService = /** @class */ (function () {
15000
+ function TieredMenuEventService() {
15001
+ this.incrementCurrentItemEvent = new core.EventEmitter();
15002
+ this.decrementCurrentItemEvent = new core.EventEmitter();
15003
+ this.closeAllMenusEvent = new core.EventEmitter();
15004
+ this.selectItemEvent = new core.EventEmitter();
15005
+ this.openItemMenuEvent = new core.EventEmitter();
15006
+ this.closeItemMenuEvent = new core.EventEmitter();
15007
+ this.createMenuEvent = new core.EventEmitter();
15008
+ }
15009
+ TieredMenuEventService = __decorate([
15010
+ core.Injectable()
15011
+ ], TieredMenuEventService);
15012
+ return TieredMenuEventService;
15013
+ }());
15014
+
15015
+ var TieredMenuItemComponent = /** @class */ (function () {
15016
+ function TieredMenuItemComponent(_tieredMenuEventService) {
15017
+ this._tieredMenuEventService = _tieredMenuEventService;
15018
+ this.focused = false;
15019
+ this.highlight = false;
15020
+ this.triggerEvent = "click";
15021
+ this.closeOnClick = false;
15022
+ }
15023
+ TieredMenuItemComponent.prototype.onClick = function () {
15024
+ if (this.item.disabled)
15025
+ return;
15026
+ if (this.item.submenu) {
15027
+ if (!this.item.isOpen) {
15028
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
15029
+ }
15030
+ else if (this.closeOnClick) {
15031
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
15032
+ }
15033
+ }
15034
+ else {
15035
+ this._tieredMenuEventService.selectItemEvent.emit(this.item);
15036
+ }
14946
15037
  };
14947
- ObjectCardMainComponent.prototype.ngAfterContentInit = function () {
14948
- this.update();
15038
+ TieredMenuItemComponent.prototype.onMouseEnter = function () {
15039
+ var _this = this;
15040
+ if (this.item.disabled)
15041
+ return;
15042
+ if (this.triggerEvent === "hover" && !this.item.isOpen) {
15043
+ this._showTimeout = window.setTimeout(function () {
15044
+ _this._tieredMenuEventService.openItemMenuEvent.emit(_this.item);
15045
+ }, 300);
15046
+ }
14949
15047
  };
14950
- ObjectCardMainComponent.prototype.update = function () {
14951
- var windowWidth = window.innerWidth;
14952
- if (windowWidth <= Breakpoints.SM_MAX)
14953
- this.thumbnailSize = exports.ThumbnailSize.Small;
14954
- else
14955
- this.thumbnailSize = exports.ThumbnailSize.Medium;
15048
+ TieredMenuItemComponent.prototype.onMouseLeave = function () {
15049
+ window.clearTimeout(this._showTimeout);
14956
15050
  };
14957
- var ObjectCardMainComponent_1;
14958
- ObjectCardMainComponent.nextId = 0;
14959
- __decorate([
14960
- core.Input()
14961
- ], ObjectCardMainComponent.prototype, "id", void 0);
14962
- __decorate([
14963
- core.Input()
14964
- ], ObjectCardMainComponent.prototype, "imageSource", void 0);
14965
- __decorate([
14966
- core.Input()
14967
- ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
14968
- __decorate([
14969
- core.Input()
14970
- ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
14971
- __decorate([
14972
- core.Input()
14973
- ], ObjectCardMainComponent.prototype, "iconClass", void 0);
14974
- __decorate([
14975
- core.Input()
14976
- ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
14977
- __decorate([
14978
- core.Input()
14979
- ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
15051
+ TieredMenuItemComponent.ctorParameters = function () { return [
15052
+ { type: TieredMenuEventService }
15053
+ ]; };
14980
15054
  __decorate([
14981
15055
  core.Input()
14982
- ], ObjectCardMainComponent.prototype, "isBrand", void 0);
15056
+ ], TieredMenuItemComponent.prototype, "item", void 0);
14983
15057
  __decorate([
14984
15058
  core.Input()
14985
- ], ObjectCardMainComponent.prototype, "label", void 0);
15059
+ ], TieredMenuItemComponent.prototype, "focused", void 0);
14986
15060
  __decorate([
14987
15061
  core.Input()
14988
- ], ObjectCardMainComponent.prototype, "description", void 0);
15062
+ ], TieredMenuItemComponent.prototype, "highlight", void 0);
14989
15063
  __decorate([
14990
15064
  core.Input()
14991
- ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
15065
+ ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
14992
15066
  __decorate([
14993
15067
  core.Input()
14994
- ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
15068
+ ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
14995
15069
  __decorate([
14996
- core.Output()
14997
- ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
15070
+ core.HostListener("click"),
15071
+ core.HostListener("touchend")
15072
+ ], TieredMenuItemComponent.prototype, "onClick", null);
14998
15073
  __decorate([
14999
- core.ContentChild(ThumbnailComponent, { static: true })
15000
- ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
15074
+ core.HostListener("mouseenter")
15075
+ ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
15001
15076
  __decorate([
15002
- core.HostListener("window:resize")
15003
- ], ObjectCardMainComponent.prototype, "onResize", null);
15004
- ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
15077
+ core.HostListener("mouseleave")
15078
+ ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
15079
+ TieredMenuItemComponent = __decorate([
15005
15080
  core.Component({
15006
- selector: "s-object-card-main",
15007
- 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",
15008
- 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}}"]
15081
+ selector: "s-tiered-menu-item",
15082
+ 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>",
15083
+ 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}"]
15009
15084
  })
15010
- ], ObjectCardMainComponent);
15011
- return ObjectCardMainComponent;
15085
+ ], TieredMenuItemComponent);
15086
+ return TieredMenuItemComponent;
15012
15087
  }());
15013
15088
 
15014
-
15015
- (function (EnumSeverity) {
15016
- EnumSeverity["Default"] = "Default";
15017
- EnumSeverity["Info"] = "Info";
15018
- EnumSeverity["Warn"] = "Warn";
15019
- EnumSeverity["Error"] = "Error";
15020
- EnumSeverity["Success"] = "Success";
15021
- })(exports.EnumSeverity || (exports.EnumSeverity = {}));
15022
-
15023
- var elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
15024
- var ObjectCardComponent = /** @class */ (function () {
15025
- function ObjectCardComponent(cdr, elementRef) {
15026
- this.cdr = cdr;
15027
- this.elementRef = elementRef;
15028
- this.id = "s-object-card-" + ObjectCardComponent_1.nextId++;
15029
- this.expanded = false;
15030
- this.expandTooltip = "Abrir painel";
15031
- this.collapseTooltip = "Fechar painel";
15032
- this.fieldsMinWidth = 200;
15033
- this.expandedChange = new core.EventEmitter();
15034
- this.maxVisibleFields = 0;
15035
- this.severity = exports.EnumSeverity.Default;
15036
- this.EnumSeverity = exports.EnumSeverity;
15089
+ var TieredMenuService = /** @class */ (function () {
15090
+ function TieredMenuService() {
15091
+ this.currentItems = [];
15092
+ this.items = [];
15037
15093
  }
15038
- ObjectCardComponent_1 = ObjectCardComponent;
15039
- ObjectCardComponent.prototype.ngAfterViewInit = function () {
15094
+ TieredMenuService.prototype.normalizeData = function (items, parent) {
15040
15095
  var _this = this;
15041
- this.update();
15042
- this.cdr.detectChanges();
15043
- this.fields.changes.subscribe(function () {
15044
- _this.update();
15096
+ return items.map(function (i) {
15097
+ var item = __assign({ visible: true }, i);
15098
+ if (item.submenu) {
15099
+ item.submenu = _this.normalizeData(item.submenu, item);
15100
+ }
15101
+ item.id = _this._generateId();
15102
+ item.parent = parent;
15103
+ item.isOpen = false;
15104
+ return item;
15045
15105
  });
15046
- var erd = elementResizeDetectorMaker({
15047
- strategy: "scroll",
15106
+ };
15107
+ TieredMenuService.prototype.markAllItemsAsClosed = function (items) {
15108
+ var _this = this;
15109
+ return items.map(function (i) {
15110
+ var item = __assign({}, i);
15111
+ if (item.submenu) {
15112
+ item.submenu = _this.markAllItemsAsClosed(item.submenu);
15113
+ }
15114
+ item.isOpen = false;
15115
+ return item;
15048
15116
  });
15049
- erd.listenTo(this.elementRef.nativeElement, function () { return _this.update(); });
15050
15117
  };
15051
- ObjectCardComponent.prototype.update = function () {
15052
- var e_1, _a;
15053
- var windowWidth = window.innerWidth;
15054
- var containerWidth = this.elementRef.nativeElement.offsetWidth;
15055
- var mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
15056
- var fieldsMinWidth = this.fieldsMinWidth;
15057
- var expandIconWidth = 50;
15058
- var fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
15059
- try {
15060
- for (var fieldElementList_1 = __values(fieldElementList), fieldElementList_1_1 = fieldElementList_1.next(); !fieldElementList_1_1.done; fieldElementList_1_1 = fieldElementList_1.next()) {
15061
- var element = fieldElementList_1_1.value;
15062
- element.style.minWidth = this.fieldsMinWidth + "px";
15118
+ TieredMenuService.prototype.searchTheHierarchy = function (itemA, itemB) {
15119
+ var item = itemB;
15120
+ while (item) {
15121
+ if (item === itemA) {
15122
+ return true;
15063
15123
  }
15124
+ item = item.parent;
15064
15125
  }
15065
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
15066
- finally {
15067
- try {
15068
- if (fieldElementList_1_1 && !fieldElementList_1_1.done && (_a = fieldElementList_1.return)) _a.call(fieldElementList_1);
15069
- }
15070
- finally { if (e_1) throw e_1.error; }
15126
+ return false;
15127
+ };
15128
+ TieredMenuService.prototype.cloneItems = function (items) {
15129
+ return JSON.parse(JSON.stringify(items));
15130
+ };
15131
+ TieredMenuService.prototype._generateId = function () {
15132
+ return "id-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9);
15133
+ };
15134
+ TieredMenuService = __decorate([
15135
+ core.Injectable()
15136
+ ], TieredMenuService);
15137
+ return TieredMenuService;
15138
+ }());
15139
+
15140
+ var TieredMenuNestedComponent = /** @class */ (function () {
15141
+ function TieredMenuNestedComponent(tieredMenuService, _tieredMenuEventService) {
15142
+ this.tieredMenuService = tieredMenuService;
15143
+ this._tieredMenuEventService = _tieredMenuEventService;
15144
+ this.top = 0;
15145
+ this.left = 0;
15146
+ this._unsubscribe$ = new rxjs.Subject();
15147
+ }
15148
+ TieredMenuNestedComponent.prototype.onResize = function () {
15149
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15150
+ };
15151
+ TieredMenuNestedComponent.prototype.onDocumentClick = function (event) {
15152
+ // Closing menu when clicked outside.
15153
+ var target = event.target;
15154
+ var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
15155
+ if (!clickedInside) {
15156
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15071
15157
  }
15072
- var maxFieldQtd;
15073
- if (windowWidth <= Breakpoints.SM_MAX)
15074
- maxFieldQtd = 0;
15075
- else
15076
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
15077
- if (maxFieldQtd && maxFieldQtd < this.fields.length) {
15078
- maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
15158
+ };
15159
+ TieredMenuNestedComponent.prototype.onKeydownHandler = function (event) {
15160
+ switch (event.key) {
15161
+ case "Escape":
15162
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15163
+ break;
15164
+ case " ":
15165
+ case "Enter":
15166
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15167
+ break;
15168
+ case "ArrowLeft":
15169
+ // When nested I need a reference to the current item's parent item, otherwise just the current item.
15170
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
15171
+ break;
15172
+ case "ArrowRight":
15173
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15174
+ break;
15175
+ case "ArrowUp":
15176
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15177
+ break;
15178
+ case "ArrowDown":
15179
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15180
+ break;
15079
15181
  }
15080
- this.maxVisibleFields = maxFieldQtd;
15081
- if (maxFieldQtd >= this.fields.length && this.expanded)
15082
- this.collapse();
15083
15182
  };
15084
- ObjectCardComponent.prototype.toggle = function () {
15085
- this.expanded ? this.collapse() : this.expand();
15183
+ TieredMenuNestedComponent.prototype.ngOnInit = function () {
15184
+ this.tieredMenuService.currentItems = this.items;
15185
+ this._subscribeEvents();
15086
15186
  };
15087
- ObjectCardComponent.prototype.expand = function () {
15088
- this.expanded = true;
15089
- this.expandedChange.emit(this.expanded);
15187
+ TieredMenuNestedComponent.prototype.ngOnDestroy = function () {
15188
+ this._unsubscribe$.next();
15189
+ this._unsubscribe$.complete();
15090
15190
  };
15091
- ObjectCardComponent.prototype.collapse = function () {
15092
- this.expanded = false;
15093
- this.expandedChange.emit(this.expanded);
15191
+ TieredMenuNestedComponent.prototype._incrementCurItem = function () {
15192
+ if (!this.tieredMenuService.currentItem) {
15193
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15194
+ return;
15195
+ }
15196
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15197
+ if (curIndex < this.tieredMenuService.currentItems.length) {
15198
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15199
+ }
15200
+ else {
15201
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15202
+ }
15203
+ if (this.tieredMenuService.currentItem.divider) {
15204
+ this._incrementCurItem();
15205
+ }
15094
15206
  };
15095
- ObjectCardComponent.prototype.getExpandedFieldWidth = function () {
15096
- var containerWidth = this.elementRef.nativeElement.offsetWidth;
15097
- var fieldsPerRow;
15098
- if (containerWidth <= Breakpoints.SM_MAX)
15099
- fieldsPerRow = 1;
15100
- else if (containerWidth <= Breakpoints.MD_MAX)
15101
- fieldsPerRow = 2;
15102
- else if (containerWidth <= Breakpoints.LG_MAX)
15103
- fieldsPerRow = 4;
15104
- else
15105
- fieldsPerRow = 6;
15106
- return 12 / fieldsPerRow;
15207
+ TieredMenuNestedComponent.prototype._decrementCurItem = function () {
15208
+ if (!this.tieredMenuService.currentItem) {
15209
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15210
+ return;
15211
+ }
15212
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15213
+ if (curIndex >= 0) {
15214
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15215
+ }
15216
+ else {
15217
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15218
+ }
15219
+ if (this.tieredMenuService.currentItem.divider) {
15220
+ this._decrementCurItem();
15221
+ }
15107
15222
  };
15108
- var ObjectCardComponent_1;
15109
- ObjectCardComponent.nextId = 0;
15110
- ObjectCardComponent.ctorParameters = function () { return [
15111
- { type: core.ChangeDetectorRef },
15112
- { type: core.ElementRef }
15223
+ TieredMenuNestedComponent.prototype._closeItem = function (item) {
15224
+ var _a;
15225
+ var itemAux = this._lastOpenItem;
15226
+ while (itemAux && itemAux != item) {
15227
+ itemAux.isOpen = false;
15228
+ itemAux = itemAux.parent;
15229
+ }
15230
+ item.isOpen = false;
15231
+ this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
15232
+ this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
15233
+ };
15234
+ TieredMenuNestedComponent.prototype._openItem = function (item) {
15235
+ if (item === null || item === void 0 ? void 0 : item.submenu) {
15236
+ item.isOpen = true;
15237
+ this.tieredMenuService.currentItems = item.submenu;
15238
+ // Only has focus if there has already been interaction.
15239
+ if (this.tieredMenuService.currentItem) {
15240
+ this.tieredMenuService.currentItem = item.submenu[0];
15241
+ }
15242
+ this._lastOpenItem = item;
15243
+ }
15244
+ };
15245
+ TieredMenuNestedComponent.prototype._subscribeEvents = function () {
15246
+ var _this = this;
15247
+ this._tieredMenuEventService.incrementCurrentItemEvent
15248
+ .pipe(operators.takeUntil(this._unsubscribe$))
15249
+ .subscribe(function () {
15250
+ _this._incrementCurItem();
15251
+ });
15252
+ this._tieredMenuEventService.decrementCurrentItemEvent
15253
+ .pipe(operators.takeUntil(this._unsubscribe$))
15254
+ .subscribe(function () {
15255
+ _this._decrementCurItem();
15256
+ });
15257
+ this._tieredMenuEventService.selectItemEvent
15258
+ .pipe(operators.takeUntil(this._unsubscribe$))
15259
+ .subscribe(function (item) {
15260
+ if (item.command) {
15261
+ item.command();
15262
+ // Close all menus after the item was selected.
15263
+ _this._tieredMenuEventService.closeAllMenusEvent.emit();
15264
+ }
15265
+ });
15266
+ this._tieredMenuEventService.openItemMenuEvent
15267
+ .pipe(operators.takeUntil(this._unsubscribe$))
15268
+ .subscribe(function (item) {
15269
+ var _a, _b;
15270
+ if (!_this.tieredMenuService.currentItems.includes(item)) {
15271
+ var itemAux = _this._lastOpenItem;
15272
+ while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
15273
+ itemAux = itemAux.parent;
15274
+ }
15275
+ _this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
15276
+ }
15277
+ _this._lastOpenItem = item;
15278
+ _this._openItem(item);
15279
+ });
15280
+ this._tieredMenuEventService.closeItemMenuEvent
15281
+ .pipe(operators.takeUntil(this._unsubscribe$))
15282
+ .subscribe(function (item) {
15283
+ if (item) {
15284
+ _this._closeItem(item);
15285
+ }
15286
+ });
15287
+ };
15288
+ TieredMenuNestedComponent.ctorParameters = function () { return [
15289
+ { type: TieredMenuService },
15290
+ { type: TieredMenuEventService }
15113
15291
  ]; };
15114
15292
  __decorate([
15115
- core.Input()
15116
- ], ObjectCardComponent.prototype, "id", void 0);
15293
+ core.HostListener("window:resize")
15294
+ ], TieredMenuNestedComponent.prototype, "onResize", null);
15117
15295
  __decorate([
15118
- core.Input()
15119
- ], ObjectCardComponent.prototype, "expanded", void 0);
15296
+ core.HostListener("document:click", ["$event"])
15297
+ ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
15120
15298
  __decorate([
15121
- core.Input()
15122
- ], ObjectCardComponent.prototype, "expandTooltip", void 0);
15123
- __decorate([
15124
- core.Input()
15125
- ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
15126
- __decorate([
15127
- core.Input()
15128
- ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
15129
- __decorate([
15130
- core.Output()
15131
- ], ObjectCardComponent.prototype, "expandedChange", void 0);
15132
- __decorate([
15133
- core.ContentChild(ObjectCardMainComponent, { static: true })
15134
- ], ObjectCardComponent.prototype, "main", void 0);
15135
- __decorate([
15136
- core.ContentChildren(ObjectCardFieldComponent, { descendants: true })
15137
- ], ObjectCardComponent.prototype, "fields", void 0);
15138
- __decorate([
15139
- core.Input()
15140
- ], ObjectCardComponent.prototype, "severity", void 0);
15141
- __decorate([
15142
- core.Input()
15143
- ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
15144
- ObjectCardComponent = ObjectCardComponent_1 = __decorate([
15145
- core.Component({
15146
- selector: "s-object-card",
15147
- 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",
15148
- animations: [
15149
- animations.trigger("expandableContent", [
15150
- animations.state("*", animations.style({
15151
- height: "0",
15152
- })),
15153
- animations.state("false", animations.style({
15154
- height: "0",
15155
- })),
15156
- animations.state("true", animations.style({
15157
- height: "*",
15158
- })),
15159
- animations.transition("* => true", animations.animate("200ms ease-out")),
15160
- animations.transition("false <=> true", animations.animate("200ms ease-out")),
15161
- ]),
15162
- animations.trigger("BorderButtonAnimation", [
15163
- animations.transition(":enter", [
15164
- animations.style({ transform: "scaleY(0)", opacity: 0 }),
15165
- animations.animate("300ms ease", animations.style({ transform: "scaleY(1)", opacity: 1 })),
15166
- ]),
15167
- animations.transition(":leave", [
15168
- animations.style({ transform: "scaleY(1)", opacity: 1 }),
15169
- animations.animate("300ms ease", animations.style({ transform: "scaleY(0)", opacity: 0 })),
15170
- ]),
15171
- ]),
15172
- ],
15173
- 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)}}"]
15174
- })
15175
- ], ObjectCardComponent);
15176
- return ObjectCardComponent;
15177
- }());
15178
-
15179
- var BorderButtonComponent = /** @class */ (function () {
15180
- function BorderButtonComponent() {
15181
- this.severity = exports.EnumSeverity.Default;
15182
- this.EnumSeverity = exports.EnumSeverity;
15183
- this.TooltipPosition = exports.TooltipPosition;
15184
- }
15185
- __decorate([
15186
- core.Input()
15187
- ], BorderButtonComponent.prototype, "severity", void 0);
15188
- __decorate([
15189
- core.Input()
15190
- ], BorderButtonComponent.prototype, "options", void 0);
15191
- BorderButtonComponent = __decorate([
15192
- core.Component({
15193
- selector: "s-border-button",
15194
- 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>",
15195
- 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}"]
15196
- })
15197
- ], BorderButtonComponent);
15198
- return BorderButtonComponent;
15199
- }());
15200
-
15201
- var BorderButtonModule = /** @class */ (function () {
15202
- function BorderButtonModule() {
15203
- }
15204
- BorderButtonModule = __decorate([
15205
- core.NgModule({
15206
- imports: [common.CommonModule, TooltipModule],
15207
- declarations: [BorderButtonComponent],
15208
- exports: [BorderButtonComponent]
15209
- })
15210
- ], BorderButtonModule);
15211
- return BorderButtonModule;
15212
- }());
15213
-
15214
- var ObjectCardModule = /** @class */ (function () {
15215
- function ObjectCardModule() {
15216
- }
15217
- ObjectCardModule = __decorate([
15218
- core.NgModule({
15219
- imports: [common.CommonModule, tooltip.TooltipModule, ThumbnailModule, ButtonModule, BorderButtonModule],
15220
- declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15221
- exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
15222
- })
15223
- ], ObjectCardModule);
15224
- return ObjectCardModule;
15225
- }());
15226
-
15227
- var ProductHeaderComponent = /** @class */ (function () {
15228
- function ProductHeaderComponent() {
15229
- this.id = "s-product-header-" + ProductHeaderComponent_1.nextId++;
15230
- this.baseZIndex = 0;
15231
- this.isHeaderFrame = true;
15232
- }
15233
- ProductHeaderComponent_1 = ProductHeaderComponent;
15234
- ProductHeaderComponent.prototype.ngAfterViewInit = function () {
15235
- this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++dom.DomHandler.zindex);
15236
- if (this.isHeaderFrame) {
15237
- this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
15238
- }
15239
- else {
15240
- this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
15241
- }
15242
- };
15243
- var ProductHeaderComponent_1;
15244
- ProductHeaderComponent.nextId = 0;
15245
- __decorate([
15246
- core.Input()
15247
- ], ProductHeaderComponent.prototype, "id", void 0);
15248
- __decorate([
15249
- core.Input()
15250
- ], ProductHeaderComponent.prototype, "header", void 0);
15251
- __decorate([
15252
- core.Input()
15253
- ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
15254
- __decorate([
15255
- core.Input()
15256
- ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
15257
- __decorate([
15258
- core.ViewChild("headerContainer", { static: false })
15259
- ], ProductHeaderComponent.prototype, "container", void 0);
15260
- ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
15261
- core.Component({
15262
- selector: "s-product-header",
15263
- 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",
15264
- 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}"]
15265
- })
15266
- ], ProductHeaderComponent);
15267
- return ProductHeaderComponent;
15268
- }());
15269
-
15270
- var ProductHeaderModule = /** @class */ (function () {
15271
- function ProductHeaderModule() {
15272
- }
15273
- ProductHeaderModule = __decorate([
15274
- core.NgModule({
15275
- imports: [common.CommonModule, tooltip.TooltipModule, ThumbnailModule],
15276
- declarations: [ProductHeaderComponent],
15277
- exports: [ProductHeaderComponent, ThumbnailModule],
15278
- })
15279
- ], ProductHeaderModule);
15280
- return ProductHeaderModule;
15281
- }());
15282
-
15283
-
15284
- (function (ProgressBarColors) {
15285
- ProgressBarColors["Blue"] = "blue";
15286
- ProgressBarColors["Green"] = "green";
15287
- ProgressBarColors["Red"] = "red";
15288
- ProgressBarColors["Yellow"] = "yellow";
15289
- })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
15290
-
15291
- var ProgressBarMode;
15292
- (function (ProgressBarMode) {
15293
- ProgressBarMode["Determinate"] = "determinate";
15294
- ProgressBarMode["Indeterminate"] = "indeterminate";
15295
- })(ProgressBarMode || (ProgressBarMode = {}));
15296
-
15297
- var ProgressBarComponent = /** @class */ (function () {
15298
- function ProgressBarComponent() {
15299
- this.numberFormatOptions = {
15300
- style: "decimal",
15301
- minimumFractionDigits: 0,
15302
- maximumFractionDigits: 2,
15303
- };
15304
- this.showValue = true;
15305
- this.mode = ProgressBarMode.Determinate;
15306
- }
15307
- ProgressBarComponent.prototype.ngOnInit = function () {
15308
- this.validateInputs();
15309
- };
15310
- ProgressBarComponent.prototype.validateInputs = function () {
15311
- if (this.value < 0 || this.value > 100) {
15312
- throw new Error("Invalid value for value");
15313
- }
15314
- if (this.targetValue < 0 || this.targetValue > 100) {
15315
- throw new Error("Invalid value for targetValue");
15316
- }
15317
- if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
15318
- throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
15319
- }
15320
- };
15321
- __decorate([
15322
- core.Input()
15323
- ], ProgressBarComponent.prototype, "value", void 0);
15324
- __decorate([
15325
- core.Input()
15326
- ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
15327
- __decorate([
15328
- core.Input()
15329
- ], ProgressBarComponent.prototype, "targetValue", void 0);
15330
- __decorate([
15331
- core.Input()
15332
- ], ProgressBarComponent.prototype, "label", void 0);
15333
- __decorate([
15334
- core.Input()
15335
- ], ProgressBarComponent.prototype, "targetLabel", void 0);
15336
- __decorate([
15337
- core.Input()
15338
- ], ProgressBarComponent.prototype, "activeColor", void 0);
15339
- __decorate([
15340
- core.Input()
15341
- ], ProgressBarComponent.prototype, "showValue", void 0);
15342
- __decorate([
15343
- core.Input()
15344
- ], ProgressBarComponent.prototype, "mode", void 0);
15345
- ProgressBarComponent = __decorate([
15346
- core.Component({
15347
- selector: "s-progressbar",
15348
- 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>",
15349
- 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}"]
15350
- })
15351
- ], ProgressBarComponent);
15352
- return ProgressBarComponent;
15353
- }());
15354
-
15355
- var ProgressBarDeterminateComponent = /** @class */ (function () {
15356
- function ProgressBarDeterminateComponent(localeService) {
15357
- this.localeService = localeService;
15358
- this.showValue = true;
15359
- }
15360
- ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
15361
- this.validateValues();
15362
- this.onGetLocale();
15363
- };
15364
- ProgressBarDeterminateComponent.prototype.onGetLocale = function () {
15365
- var _this = this;
15366
- this.localeService.getLocale().subscribe({
15367
- next: function (locale) {
15368
- _this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", _this.numberFormatOptions);
15369
- },
15370
- error: function () {
15371
- _this.numberFormat = new Intl.NumberFormat("pt-BR", _this.numberFormatOptions);
15372
- },
15373
- });
15374
- };
15375
- ProgressBarDeterminateComponent.prototype.validateValues = function () {
15376
- if (this.value < 0 || this.value > 100) {
15377
- throw new Error("Invalid value for value");
15378
- }
15379
- if (this.targetValue < 0 || this.targetValue > 100) {
15380
- throw new Error("Invalid value for targetValue");
15381
- }
15382
- };
15383
- ProgressBarDeterminateComponent.ctorParameters = function () { return [
15384
- { type: LocaleService }
15385
- ]; };
15386
- __decorate([
15387
- core.Input()
15388
- ], ProgressBarDeterminateComponent.prototype, "value", void 0);
15389
- __decorate([
15390
- core.Input()
15391
- ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
15392
- __decorate([
15393
- core.Input()
15394
- ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
15395
- __decorate([
15396
- core.Input()
15397
- ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
15398
- __decorate([
15399
- core.Input()
15400
- ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
15401
- __decorate([
15402
- core.Input()
15403
- ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
15404
- ProgressBarDeterminateComponent = __decorate([
15405
- core.Component({
15406
- selector: "s-progressbar-determinate",
15407
- 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",
15408
- 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}"]
15409
- })
15410
- ], ProgressBarDeterminateComponent);
15411
- return ProgressBarDeterminateComponent;
15412
- }());
15413
-
15414
- var ProgressBarIndeterminateComponent = /** @class */ (function () {
15415
- function ProgressBarIndeterminateComponent() {
15416
- }
15417
- __decorate([
15418
- core.Input()
15419
- ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
15420
- __decorate([
15421
- core.Input()
15422
- ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
15423
- ProgressBarIndeterminateComponent = __decorate([
15424
- core.Component({
15425
- selector: "s-progressbar-indeterminate",
15426
- 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",
15427
- 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%)}}"]
15428
- })
15429
- ], ProgressBarIndeterminateComponent);
15430
- return ProgressBarIndeterminateComponent;
15431
- }());
15432
-
15433
- var ProgressBarModule = /** @class */ (function () {
15434
- function ProgressBarModule() {
15435
- }
15436
- ProgressBarModule = __decorate([
15437
- core.NgModule({
15438
- imports: [common.CommonModule],
15439
- declarations: [
15440
- ProgressBarComponent,
15441
- ProgressBarDeterminateComponent,
15442
- ProgressBarIndeterminateComponent,
15443
- ],
15444
- exports: [ProgressBarComponent],
15445
- })
15446
- ], ProgressBarModule);
15447
- return ProgressBarModule;
15448
- }());
15449
-
15450
- var PanelComponent = /** @class */ (function () {
15451
- function PanelComponent() {
15452
- this.toggleable = true;
15453
- this.collapsed = false;
15454
- this.severity = exports.EnumSeverity.Default;
15455
- this.collapsedChange = new core.EventEmitter();
15456
- this.EnumSeverity = exports.EnumSeverity;
15457
- }
15458
- PanelComponent.prototype.onCollapsedChange = function (collapsed) {
15459
- this.collapsed = collapsed;
15460
- this.collapsedChange.emit(this.collapsed);
15461
- };
15462
- __decorate([
15463
- core.Input()
15464
- ], PanelComponent.prototype, "header", void 0);
15465
- __decorate([
15466
- core.Input()
15467
- ], PanelComponent.prototype, "toggleable", void 0);
15468
- __decorate([
15469
- core.Input()
15470
- ], PanelComponent.prototype, "collapsed", void 0);
15471
- __decorate([
15472
- core.Input()
15473
- ], PanelComponent.prototype, "severity", void 0);
15474
- __decorate([
15475
- core.Input()
15476
- ], PanelComponent.prototype, "borderButtonOptions", void 0);
15477
- __decorate([
15478
- core.Output()
15479
- ], PanelComponent.prototype, "collapsedChange", void 0);
15480
- PanelComponent = __decorate([
15299
+ core.HostListener("document:keydown", ["$event"])
15300
+ ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
15301
+ TieredMenuNestedComponent = __decorate([
15481
15302
  core.Component({
15482
- selector: "s-panel",
15483
- 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>",
15484
- animations: [
15485
- animations.trigger("BorderButtonAnimation", [
15486
- animations.transition(":enter", [
15487
- animations.style({ transform: "scaleY(0)", opacity: 0 }),
15488
- animations.animate("300ms ease", animations.style({ transform: "scaleY(1)", opacity: 1 })),
15489
- ]),
15490
- animations.transition(":leave", [
15491
- animations.style({ transform: "scaleY(1)", opacity: 1 }),
15492
- animations.animate("300ms ease", animations.style({ transform: "scaleY(0)", opacity: 0 })),
15493
- ]),
15494
- ]),
15495
- ],
15496
- 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}"]
15497
- })
15498
- ], PanelComponent);
15499
- return PanelComponent;
15500
- }());
15501
-
15502
- var PanelModule = /** @class */ (function () {
15503
- function PanelModule() {
15504
- }
15505
- PanelModule = __decorate([
15506
- core.NgModule({
15507
- imports: [common.CommonModule, panel.PanelModule, BorderButtonModule],
15508
- declarations: [PanelComponent],
15509
- exports: [PanelComponent],
15303
+ 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",
15304
+ 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}"]
15510
15305
  })
15511
- ], PanelModule);
15512
- return PanelModule;
15306
+ ], TieredMenuNestedComponent);
15307
+ return TieredMenuNestedComponent;
15513
15308
  }());
15514
15309
 
15515
- var RatingScaleComponent = /** @class */ (function () {
15516
- function RatingScaleComponent() {
15517
- this.disabled = false;
15310
+ var TieredMenuComponent = /** @class */ (function () {
15311
+ function TieredMenuComponent(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
15312
+ this._appRef = _appRef;
15313
+ this._componentFactoryResolver = _componentFactoryResolver;
15314
+ this._injector = _injector;
15315
+ this._changeDetectorRef = _changeDetectorRef;
15316
+ this.tieredMenuService = tieredMenuService;
15317
+ this._tieredMenuEventService = _tieredMenuEventService;
15318
+ this.top = 0;
15319
+ this.left = 0;
15320
+ this.menuTriggerEvent = "hover";
15321
+ this._componentRef = null;
15322
+ this._unsubscribe$ = new rxjs.Subject();
15323
+ this.destroyRequest = new core.EventEmitter();
15518
15324
  }
15519
- RatingScaleComponent_1 = RatingScaleComponent;
15520
- RatingScaleComponent.prototype.writeValue = function (value) {
15521
- if (!this.disabled) {
15522
- this.value = value;
15325
+ TieredMenuComponent_1 = TieredMenuComponent;
15326
+ TieredMenuComponent.prototype.onResize = function () {
15327
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15328
+ };
15329
+ TieredMenuComponent.prototype.onDocumentClick = function (event) {
15330
+ // Closing menu when clicked outside.
15331
+ var target = event.target;
15332
+ var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
15333
+ if (!clickedInside) {
15334
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15523
15335
  }
15524
15336
  };
15525
- RatingScaleComponent.prototype.registerOnChange = function (onChange) {
15526
- this._onChange = onChange;
15337
+ TieredMenuComponent.prototype.onKeydownHandler = function (event) {
15338
+ switch (event.key) {
15339
+ case "Escape":
15340
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15341
+ break;
15342
+ case " ":
15343
+ case "Enter":
15344
+ if (!this.tieredMenuService.currentItem.disabled) {
15345
+ this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
15346
+ }
15347
+ break;
15348
+ case "ArrowLeft":
15349
+ if (this.items.includes(this.tieredMenuService.currentItem)) {
15350
+ this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
15351
+ this._changeDetectorRef.detectChanges();
15352
+ }
15353
+ break;
15354
+ case "ArrowRight":
15355
+ if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
15356
+ this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
15357
+ event.stopImmediatePropagation();
15358
+ }
15359
+ break;
15360
+ case "ArrowUp":
15361
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15362
+ this._tieredMenuEventService.decrementCurrentItemEvent.emit();
15363
+ event.stopImmediatePropagation();
15364
+ }
15365
+ break;
15366
+ case "ArrowDown":
15367
+ if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
15368
+ this._tieredMenuEventService.incrementCurrentItemEvent.emit();
15369
+ event.stopImmediatePropagation();
15370
+ }
15371
+ break;
15372
+ }
15527
15373
  };
15528
- RatingScaleComponent.prototype.registerOnTouched = function (onTouched) {
15529
- this._onTouched = onTouched;
15374
+ TieredMenuComponent.prototype.ngOnInit = function () {
15375
+ this.tieredMenuService.currentItems = this.items;
15376
+ this._subscribeEvents();
15530
15377
  };
15531
- RatingScaleComponent.prototype.onSelect = function (rating) {
15532
- this.value = rating;
15533
- if (this._onChange) {
15534
- this._onChange(this.value);
15378
+ TieredMenuComponent.prototype.ngOnDestroy = function () {
15379
+ this._unsubscribe$.next();
15380
+ this._unsubscribe$.complete();
15381
+ };
15382
+ TieredMenuComponent.prototype._incrementCurItem = function () {
15383
+ if (!this.tieredMenuService.currentItem) {
15384
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15385
+ return;
15386
+ }
15387
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15388
+ // Checking if it is the current menu.
15389
+ return;
15390
+ }
15391
+ var currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
15392
+ if (currentIndex < this.tieredMenuService.currentItems.length) {
15393
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
15394
+ }
15395
+ else {
15396
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15397
+ }
15398
+ if (this.tieredMenuService.currentItem.divider) {
15399
+ this._incrementCurItem();
15535
15400
  }
15536
15401
  };
15537
- var RatingScaleComponent_1;
15402
+ TieredMenuComponent.prototype._decrementCurItem = function () {
15403
+ if (!this.tieredMenuService.currentItem) {
15404
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
15405
+ return;
15406
+ // Checking if it is the current menu.
15407
+ }
15408
+ else if (!this.items.includes(this.tieredMenuService.currentItem)) {
15409
+ return;
15410
+ }
15411
+ var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
15412
+ if (curIndex >= 0) {
15413
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
15414
+ }
15415
+ else {
15416
+ this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
15417
+ }
15418
+ if (this.tieredMenuService.currentItem.divider) {
15419
+ this._decrementCurItem();
15420
+ }
15421
+ };
15422
+ TieredMenuComponent.prototype._createMenu = function (items, position) {
15423
+ var _this = this;
15424
+ if (!this._componentRef && items) {
15425
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
15426
+ this._componentRef = componentFactory.create(this._injector);
15427
+ this._appRef.attachView(this._componentRef.hostView);
15428
+ var domElem = this._componentRef.hostView.rootNodes[0];
15429
+ document.body.appendChild(domElem);
15430
+ // Setting the menu items.
15431
+ this._componentRef.instance.items = items;
15432
+ // Subscribe menu events.
15433
+ this._componentRef.instance.destroyRequest.subscribe(function (propagate) {
15434
+ _this._destroy(propagate);
15435
+ });
15436
+ this._menuDivElement = domElem.querySelector(".menu");
15437
+ this._setMenuPosition(position);
15438
+ }
15439
+ };
15440
+ TieredMenuComponent.prototype._destroy = function (propagate) {
15441
+ if (propagate === void 0) { propagate = true; }
15442
+ if (this._componentRef !== null) {
15443
+ this._appRef.detachView(this._componentRef.hostView);
15444
+ this._componentRef.destroy();
15445
+ this._componentRef = null;
15446
+ this._menuDivElement = null;
15447
+ }
15448
+ if (propagate) {
15449
+ this.destroyRequest.emit();
15450
+ }
15451
+ };
15452
+ TieredMenuComponent.prototype._setMenuPosition = function (position) {
15453
+ var _a, _b;
15454
+ var ITEM_HEIGHT = 37;
15455
+ var DIVIDER_HEIGHT = 5;
15456
+ var PADDING = 8;
15457
+ if (this._componentRef !== null) {
15458
+ var top_1 = position.top, right = position.right, bottom = position.bottom, left = position.left;
15459
+ var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
15460
+ return !item.divider ? count + 1 : count;
15461
+ }, 0);
15462
+ var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
15463
+ return item.divider ? count + 1 : count;
15464
+ }, 0);
15465
+ // I need to calculate the height of the component because the internal elements have not been created yet.
15466
+ var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
15467
+ var menuWidth = this._menuDivElement.getBoundingClientRect().width;
15468
+ var rightFreeSpace = window.innerWidth - right;
15469
+ var bottomFreeSpace = window.innerHeight - bottom;
15470
+ if (rightFreeSpace > menuWidth) {
15471
+ this._componentRef.instance.left = right;
15472
+ }
15473
+ else {
15474
+ this._componentRef.instance.left = left - menuWidth;
15475
+ }
15476
+ if (bottomFreeSpace <= menuHeight) {
15477
+ this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
15478
+ }
15479
+ else {
15480
+ this._componentRef.instance.top = window.scrollY + top_1;
15481
+ }
15482
+ }
15483
+ };
15484
+ TieredMenuComponent.prototype._subscribeEvents = function () {
15485
+ var _this = this;
15486
+ // Increment current item event.
15487
+ this._tieredMenuEventService.incrementCurrentItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
15488
+ _this._incrementCurItem();
15489
+ });
15490
+ // Decrement current item event.
15491
+ this._tieredMenuEventService.decrementCurrentItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
15492
+ _this._decrementCurItem();
15493
+ });
15494
+ // Select item event.
15495
+ this._tieredMenuEventService.selectItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function (item) {
15496
+ if (item.submenu) {
15497
+ _this._tieredMenuEventService.openItemMenuEvent.emit(item);
15498
+ }
15499
+ else if (item.command) {
15500
+ _this._tieredMenuEventService.closeAllMenusEvent.emit();
15501
+ item.command();
15502
+ }
15503
+ });
15504
+ // Close all menus event.
15505
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
15506
+ _this._destroy();
15507
+ _this.tieredMenuService.currentItem = null;
15508
+ _this.tieredMenuService.currentItems = _this.tieredMenuService.items;
15509
+ _this.tieredMenuService.markAllItemsAsClosed(_this.tieredMenuService.items);
15510
+ });
15511
+ // Open item menu event.
15512
+ this._tieredMenuEventService.openItemMenuEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function (item) {
15513
+ if (_this.tieredMenuService.currentItem) {
15514
+ if (_this.tieredMenuService.currentItem.parent === item) {
15515
+ return;
15516
+ }
15517
+ if (!_this.tieredMenuService.searchTheHierarchy(_this.tieredMenuService.currentItem.parent, item)) {
15518
+ var current = _this.tieredMenuService.currentItem;
15519
+ current.isOpen = false;
15520
+ while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
15521
+ _this._tieredMenuEventService.closeItemMenuEvent.emit(current);
15522
+ _this._changeDetectorRef.detectChanges();
15523
+ current = current.parent;
15524
+ }
15525
+ if (current) {
15526
+ current.isOpen = false;
15527
+ }
15528
+ }
15529
+ }
15530
+ if (item.submenu && !item.isOpen && _this.items.includes(item)) {
15531
+ var _a = document.querySelector("#" + item.id).getBoundingClientRect(), top_2 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
15532
+ var position = { top: top_2, right: right, left: left, bottom: bottom };
15533
+ _this._createMenu(item.submenu, position);
15534
+ _this.tieredMenuService.currentItems = item.submenu;
15535
+ _this.tieredMenuService.currentItem = item.submenu[0];
15536
+ item.isOpen = true;
15537
+ }
15538
+ });
15539
+ // Close item menu event.
15540
+ this._tieredMenuEventService.closeItemMenuEvent
15541
+ .pipe(operators.takeUntil(this._unsubscribe$))
15542
+ .subscribe(function (item) {
15543
+ var _a, _b;
15544
+ if (_this.items.some(function (i) { return i.id === item.id; })) {
15545
+ if (item.parent) {
15546
+ item.parent.isOpen = false;
15547
+ }
15548
+ _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;
15549
+ _this.tieredMenuService.currentItem = item.parent;
15550
+ _this.destroyRequest.emit(false);
15551
+ }
15552
+ });
15553
+ };
15554
+ var TieredMenuComponent_1;
15555
+ TieredMenuComponent.ctorParameters = function () { return [
15556
+ { type: core.ApplicationRef },
15557
+ { type: core.ComponentFactoryResolver },
15558
+ { type: core.Injector },
15559
+ { type: core.ChangeDetectorRef },
15560
+ { type: TieredMenuService },
15561
+ { type: TieredMenuEventService }
15562
+ ]; };
15538
15563
  __decorate([
15539
- core.Input()
15540
- ], RatingScaleComponent.prototype, "nodes", void 0);
15564
+ core.Output()
15565
+ ], TieredMenuComponent.prototype, "destroyRequest", void 0);
15541
15566
  __decorate([
15542
- core.Input()
15543
- ], RatingScaleComponent.prototype, "startLabel", void 0);
15567
+ core.HostListener("window:resize")
15568
+ ], TieredMenuComponent.prototype, "onResize", null);
15544
15569
  __decorate([
15545
- core.Input()
15546
- ], RatingScaleComponent.prototype, "endLabel", void 0);
15570
+ core.HostListener("document:click", ["$event"])
15571
+ ], TieredMenuComponent.prototype, "onDocumentClick", null);
15547
15572
  __decorate([
15548
- core.Input()
15549
- ], RatingScaleComponent.prototype, "disabled", void 0);
15550
- RatingScaleComponent = RatingScaleComponent_1 = __decorate([
15573
+ core.HostListener("document:keydown", ["$event"])
15574
+ ], TieredMenuComponent.prototype, "onKeydownHandler", null);
15575
+ TieredMenuComponent = TieredMenuComponent_1 = __decorate([
15551
15576
  core.Component({
15552
- selector: "s-rating-scale",
15553
- 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>",
15554
- providers: [{
15555
- provide: forms.NG_VALUE_ACCESSOR,
15556
- useExisting: core.forwardRef(function () { return RatingScaleComponent_1; }),
15557
- multi: true,
15558
- }],
15559
- 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}"]
15577
+ selector: "s-tiered-menu",
15578
+ 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>",
15579
+ 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}"]
15560
15580
  })
15561
- ], RatingScaleComponent);
15562
- return RatingScaleComponent;
15581
+ ], TieredMenuComponent);
15582
+ return TieredMenuComponent;
15563
15583
  }());
15564
15584
 
15565
- var RatingScaleModule = /** @class */ (function () {
15566
- function RatingScaleModule() {
15585
+ var TieredMenuGlobalService = /** @class */ (function () {
15586
+ function TieredMenuGlobalService() {
15567
15587
  }
15568
- RatingScaleModule = __decorate([
15569
- core.NgModule({
15570
- imports: [
15571
- common.CommonModule,
15572
- forms.ReactiveFormsModule,
15573
- ],
15574
- declarations: [RatingScaleComponent],
15575
- exports: [RatingScaleComponent],
15576
- })
15577
- ], RatingScaleModule);
15578
- return RatingScaleModule;
15588
+ TieredMenuGlobalService = __decorate([
15589
+ core.Injectable()
15590
+ ], TieredMenuGlobalService);
15591
+ return TieredMenuGlobalService;
15579
15592
  }());
15580
15593
 
15581
- var SelectButtonComponent = /** @class */ (function () {
15582
- function SelectButtonComponent() {
15583
- this.multiple = false;
15584
- this.itemSelected = new core.EventEmitter();
15585
- this.itemClicked = new core.EventEmitter();
15586
- this.disabled = false;
15587
- this.activeItems = new Set();
15594
+ var TieredMenuDirective = /** @class */ (function () {
15595
+ function TieredMenuDirective(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
15596
+ this._elementRef = _elementRef;
15597
+ this._appRef = _appRef;
15598
+ this._componentFactoryResolver = _componentFactoryResolver;
15599
+ this._injector = _injector;
15600
+ this._tieredMenuEventService = _tieredMenuEventService;
15601
+ this._tieredMenuService = _tieredMenuService;
15602
+ this._tieredMenuGlobalService = _tieredMenuGlobalService;
15603
+ this._changeDetectorRef = _changeDetectorRef;
15604
+ this.items = [];
15605
+ this.triggerEvent = "click";
15606
+ this._componentRef = null;
15607
+ this._isNested = false;
15608
+ this._isOpen = false;
15609
+ this._unsubscribe$ = new rxjs.Subject();
15588
15610
  }
15589
- SelectButtonComponent_1 = SelectButtonComponent;
15590
- SelectButtonComponent.prototype.writeValue = function (value) {
15591
- var _this = this;
15592
- if (!value)
15593
- return;
15594
- this.activeItems.clear();
15595
- if (Array.isArray(value)) {
15596
- value.forEach(function (item) {
15597
- _this.items.forEach(function (iItem) {
15598
- if (_this._compareItems(item, iItem)) {
15599
- _this.activeItems.add(iItem);
15600
- }
15601
- });
15602
- });
15611
+ TieredMenuDirective.prototype.onClick = function (event) {
15612
+ if (this.triggerEvent === "click" && !this._isOpen) {
15613
+ this._lastActiveElement = document.activeElement;
15614
+ this._createMenu();
15615
+ event.preventDefault();
15616
+ event.stopPropagation();
15617
+ }
15618
+ };
15619
+ TieredMenuDirective.prototype.ngOnInit = function () {
15620
+ this._subscribeEvents();
15621
+ };
15622
+ TieredMenuDirective.prototype.ngDoCheck = function () {
15623
+ if (!this.previousItems) {
15624
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
15625
+ }
15626
+ var hasChanges = false;
15627
+ if (this.items.length !== this.previousItems.length) {
15628
+ hasChanges = true;
15603
15629
  }
15604
15630
  else {
15605
- this.items.forEach(function (iItem) {
15606
- if (_this._compareItems(value, iItem)) {
15607
- _this.activeItems.add(iItem);
15631
+ for (var i = 0; i < this.items.length; i++) {
15632
+ if (!this._compareItems(this.items[i], this.previousItems[i])) {
15633
+ hasChanges = true;
15634
+ break;
15608
15635
  }
15609
- });
15636
+ }
15637
+ }
15638
+ if (hasChanges) {
15639
+ this._updateServiceItems();
15640
+ this._changeDetectorRef.detectChanges();
15641
+ this._rebuildMenu();
15610
15642
  }
15643
+ this.previousItems = this._tieredMenuService.cloneItems(this.items);
15611
15644
  };
15612
- SelectButtonComponent.prototype.registerOnChange = function (onChange) {
15613
- this.onChange = onChange;
15645
+ TieredMenuDirective.prototype.ngOnDestroy = function () {
15646
+ this._unsubscribe$.next();
15647
+ this._unsubscribe$.complete();
15648
+ this._destroy();
15614
15649
  };
15615
- SelectButtonComponent.prototype.registerOnTouched = function (onTouched) {
15616
- this.onTouched = onTouched;
15650
+ TieredMenuDirective.prototype._createMenu = function () {
15651
+ var _a, _b, _c;
15652
+ this._updateServiceItems();
15653
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15654
+ (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
15655
+ this._tieredMenuGlobalService.lastInstance = this;
15656
+ (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
15657
+ this._isOpen = true;
15658
+ this._isNested = document.body.clientWidth < 600;
15659
+ this._isNested ? this._createNestedMenu() : this._createTieredMenu();
15660
+ }
15617
15661
  };
15618
- SelectButtonComponent.prototype.setDisabledState = function (disabled) {
15619
- this.disabled = disabled;
15662
+ TieredMenuDirective.prototype._createTieredMenu = function () {
15663
+ var _this = this;
15664
+ var _a;
15665
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15666
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
15667
+ this._componentRef = componentFactory.create(this._injector);
15668
+ this._appRef.attachView(this._componentRef.hostView);
15669
+ var domElem = this._componentRef.hostView.rootNodes[0];
15670
+ document.body.appendChild(domElem);
15671
+ this._setMenuComponentProperties();
15672
+ this._componentRef.instance.destroyRequest.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
15673
+ _this._destroy();
15674
+ });
15675
+ this._setMenuPosition();
15676
+ }
15620
15677
  };
15621
- SelectButtonComponent.prototype.onItemSelect = function (item) {
15622
- var _a, _b;
15623
- if (this.disabled || item.disabled)
15624
- return;
15625
- this.itemClicked.emit(item);
15626
- if (!this.multiple) {
15627
- this.activeItems.clear();
15678
+ TieredMenuDirective.prototype._createNestedMenu = function () {
15679
+ var _a;
15680
+ if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
15681
+ var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
15682
+ this._componentRef = componentFactory.create(this._injector);
15683
+ this._appRef.attachView(this._componentRef.hostView);
15684
+ var domElem = this._componentRef.hostView.rootNodes[0];
15685
+ document.body.appendChild(domElem);
15686
+ this._setMenuComponentProperties();
15687
+ this._setMenuPosition();
15628
15688
  }
15629
- this.activeItems.add(item);
15630
- this.itemSelected.emit(__spread(this.activeItems));
15631
- (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, __spread(this.activeItems));
15632
- (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, __spread(this.activeItems));
15633
15689
  };
15634
- SelectButtonComponent.prototype._compareItems = function (item1, item2) {
15635
- var _compare = function (a, b) {
15636
- var e_1, _a;
15637
- if (a === b) {
15638
- return true;
15639
- }
15640
- if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
15641
- return false;
15642
- }
15643
- if (Array.isArray(a) !== Array.isArray(b)) {
15644
- return false;
15690
+ TieredMenuDirective.prototype._destroy = function () {
15691
+ if (this._componentRef) {
15692
+ this._isOpen = false;
15693
+ window.clearTimeout(this._showTimeout);
15694
+ this._appRef.detachView(this._componentRef.hostView);
15695
+ this._componentRef.destroy();
15696
+ this._componentRef = null;
15697
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
15698
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15699
+ this._tieredMenuEventService.closeAllMenusEvent.emit();
15700
+ }
15701
+ };
15702
+ TieredMenuDirective.prototype._setMenuPosition = function () {
15703
+ var _a, _b;
15704
+ var ITEM_HEIGHT = 37;
15705
+ var ITEM_WIDTH = 176;
15706
+ var DIVIDER_HEIGHT = 5;
15707
+ var PADDING = 8;
15708
+ var MARGIN = 4;
15709
+ if (this._componentRef !== null) {
15710
+ this._componentRef.instance.top = 8;
15711
+ var _c = this._elementRef.nativeElement.getBoundingClientRect(), bottom = _c.bottom, left = _c.left, right = _c.right;
15712
+ var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
15713
+ return !item.divider ? count + 1 : count;
15714
+ }, 0);
15715
+ var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
15716
+ return item.divider ? count + 1 : count;
15717
+ }, 0);
15718
+ var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
15719
+ var rightFreeSpace = window.innerWidth - right;
15720
+ var bottomFreeSpace = window.innerHeight - bottom;
15721
+ this._componentRef.instance.top = bottom;
15722
+ this._componentRef.instance.left = left;
15723
+ if (bottomFreeSpace <= menuHeight) {
15724
+ this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
15645
15725
  }
15646
- var keysA = Object.keys(a);
15647
- var keysB = Object.keys(b);
15648
- if (keysA.length !== keysB.length) {
15649
- return false;
15726
+ else {
15727
+ this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
15650
15728
  }
15651
- try {
15652
- for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
15653
- var key = keysA_1_1.value;
15654
- if (!keysB.includes(key) || !_compare(a[key], b[key])) {
15655
- return false;
15656
- }
15657
- }
15729
+ if (rightFreeSpace > 176) {
15730
+ this._componentRef.instance.left = window.scrollX + left;
15658
15731
  }
15659
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
15660
- finally {
15661
- try {
15662
- if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
15663
- }
15664
- finally { if (e_1) throw e_1.error; }
15732
+ else {
15733
+ this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
15665
15734
  }
15666
- for (var key in a) {
15667
- if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
15668
- return false;
15669
- }
15735
+ if (this._isNested) {
15736
+ this._componentRef.instance.left = MARGIN;
15670
15737
  }
15671
- return true;
15672
- };
15673
- return _compare(item1, item2);
15738
+ }
15674
15739
  };
15675
- var SelectButtonComponent_1;
15740
+ TieredMenuDirective.prototype._setMenuComponentProperties = function () {
15741
+ if (this._componentRef != null) {
15742
+ this._componentRef.instance.items = this._tieredMenuService.items;
15743
+ }
15744
+ };
15745
+ TieredMenuDirective.prototype._subscribeEvents = function () {
15746
+ var _this = this;
15747
+ this._tieredMenuEventService.closeAllMenusEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
15748
+ _this._tieredMenuService.items = _this._tieredMenuService.markAllItemsAsClosed(_this._tieredMenuService.items);
15749
+ _this._destroy();
15750
+ });
15751
+ };
15752
+ TieredMenuDirective.prototype._compareItems = function (item1, item2) {
15753
+ return JSON.stringify(item1) === JSON.stringify(item2);
15754
+ };
15755
+ TieredMenuDirective.prototype._rebuildMenu = function () {
15756
+ this._destroy();
15757
+ };
15758
+ TieredMenuDirective.prototype._updateServiceItems = function () {
15759
+ this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
15760
+ this._tieredMenuService.currentItems = this._tieredMenuService.items;
15761
+ this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
15762
+ };
15763
+ TieredMenuDirective.ctorParameters = function () { return [
15764
+ { type: core.ElementRef },
15765
+ { type: core.ApplicationRef },
15766
+ { type: core.ComponentFactoryResolver },
15767
+ { type: core.Injector },
15768
+ { type: TieredMenuEventService },
15769
+ { type: TieredMenuService },
15770
+ { type: TieredMenuGlobalService },
15771
+ { type: core.ChangeDetectorRef }
15772
+ ]; };
15676
15773
  __decorate([
15677
15774
  core.Input()
15678
- ], SelectButtonComponent.prototype, "items", void 0);
15775
+ ], TieredMenuDirective.prototype, "items", void 0);
15679
15776
  __decorate([
15680
15777
  core.Input()
15681
- ], SelectButtonComponent.prototype, "multiple", void 0);
15682
- __decorate([
15683
- core.Output()
15684
- ], SelectButtonComponent.prototype, "itemSelected", void 0);
15778
+ ], TieredMenuDirective.prototype, "triggerEvent", void 0);
15685
15779
  __decorate([
15686
- core.Output()
15687
- ], SelectButtonComponent.prototype, "itemClicked", void 0);
15688
- SelectButtonComponent = SelectButtonComponent_1 = __decorate([
15689
- core.Component({
15690
- selector: "s-select-button",
15691
- 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>",
15692
- providers: [
15693
- {
15694
- provide: forms.NG_VALUE_ACCESSOR,
15695
- useExisting: core.forwardRef(function () { return SelectButtonComponent_1; }),
15696
- multi: true,
15697
- },
15780
+ core.HostListener("click", ["$event"])
15781
+ ], TieredMenuDirective.prototype, "onClick", null);
15782
+ TieredMenuDirective = __decorate([
15783
+ core.Directive({
15784
+ selector: "[sTieredMenu]",
15785
+ providers: [TieredMenuEventService, TieredMenuService],
15786
+ })
15787
+ ], TieredMenuDirective);
15788
+ return TieredMenuDirective;
15789
+ }());
15790
+
15791
+ var TieredMenuModule = /** @class */ (function () {
15792
+ function TieredMenuModule() {
15793
+ }
15794
+ TieredMenuModule = __decorate([
15795
+ core.NgModule({
15796
+ imports: [
15797
+ common.CommonModule,
15698
15798
  ],
15699
- styles: [".select-button{overflow:hidden}"]
15799
+ declarations: [
15800
+ TieredMenuDirective,
15801
+ TieredMenuComponent,
15802
+ TieredMenuNestedComponent,
15803
+ TieredMenuItemComponent,
15804
+ TieredMenuDividerComponent,
15805
+ ],
15806
+ exports: [TieredMenuDirective],
15807
+ providers: [TieredMenuGlobalService],
15700
15808
  })
15701
- ], SelectButtonComponent);
15702
- return SelectButtonComponent;
15809
+ ], TieredMenuModule);
15810
+ return TieredMenuModule;
15703
15811
  }());
15704
15812
 
15705
- var SelectButtonItemComponent = /** @class */ (function () {
15706
- function SelectButtonItemComponent() {
15707
- this.active = false;
15708
- this.first = false;
15709
- this.last = false;
15710
- this.disabled = false;
15813
+ var NavigationButtonModule = /** @class */ (function () {
15814
+ function NavigationButtonModule() {
15815
+ }
15816
+ NavigationButtonModule = __decorate([
15817
+ core.NgModule({
15818
+ imports: [common.CommonModule, TieredMenuModule, TooltipModule],
15819
+ declarations: [NavigationButtonComponent],
15820
+ exports: [NavigationButtonComponent],
15821
+ })
15822
+ ], NavigationButtonModule);
15823
+ return NavigationButtonModule;
15824
+ }());
15825
+
15826
+ var ObjectCardFieldComponent = /** @class */ (function () {
15827
+ function ObjectCardFieldComponent() {
15828
+ this.id = "s-object-card-field-" + ObjectCardFieldComponent_1.nextId++;
15829
+ this.buttonClick = new core.EventEmitter();
15711
15830
  }
15831
+ ObjectCardFieldComponent_1 = ObjectCardFieldComponent;
15832
+ var ObjectCardFieldComponent_1;
15833
+ ObjectCardFieldComponent.nextId = 0;
15712
15834
  __decorate([
15713
15835
  core.Input()
15714
- ], SelectButtonItemComponent.prototype, "label", void 0);
15836
+ ], ObjectCardFieldComponent.prototype, "id", void 0);
15715
15837
  __decorate([
15716
15838
  core.Input()
15717
- ], SelectButtonItemComponent.prototype, "active", void 0);
15839
+ ], ObjectCardFieldComponent.prototype, "imageSource", void 0);
15718
15840
  __decorate([
15719
15841
  core.Input()
15720
- ], SelectButtonItemComponent.prototype, "first", void 0);
15842
+ ], ObjectCardFieldComponent.prototype, "imageAlt", void 0);
15721
15843
  __decorate([
15722
15844
  core.Input()
15723
- ], SelectButtonItemComponent.prototype, "last", void 0);
15845
+ ], ObjectCardFieldComponent.prototype, "iconClass", void 0);
15724
15846
  __decorate([
15725
15847
  core.Input()
15726
- ], SelectButtonItemComponent.prototype, "disabled", void 0);
15727
- SelectButtonItemComponent = __decorate([
15848
+ ], ObjectCardFieldComponent.prototype, "label", void 0);
15849
+ __decorate([
15850
+ core.Input()
15851
+ ], ObjectCardFieldComponent.prototype, "description", void 0);
15852
+ __decorate([
15853
+ core.Input()
15854
+ ], ObjectCardFieldComponent.prototype, "buttonLabel", void 0);
15855
+ __decorate([
15856
+ core.Input()
15857
+ ], ObjectCardFieldComponent.prototype, "buttonModel", void 0);
15858
+ __decorate([
15859
+ core.Output()
15860
+ ], ObjectCardFieldComponent.prototype, "buttonClick", void 0);
15861
+ __decorate([
15862
+ core.ContentChild(ThumbnailComponent, { static: true })
15863
+ ], ObjectCardFieldComponent.prototype, "thumbnailComponent", void 0);
15864
+ __decorate([
15865
+ core.ViewChild(core.TemplateRef, { static: true })
15866
+ ], ObjectCardFieldComponent.prototype, "content", void 0);
15867
+ ObjectCardFieldComponent = ObjectCardFieldComponent_1 = __decorate([
15728
15868
  core.Component({
15729
- selector: "s-select-button-item",
15730
- 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>",
15731
- 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}"]
15732
- })
15733
- ], SelectButtonItemComponent);
15734
- return SelectButtonItemComponent;
15735
- }());
15736
-
15737
- var SelectButtonModule = /** @class */ (function () {
15738
- function SelectButtonModule() {
15739
- }
15740
- SelectButtonModule = __decorate([
15741
- core.NgModule({
15742
- imports: [common.CommonModule],
15743
- declarations: [
15744
- SelectButtonComponent,
15745
- SelectButtonItemComponent,
15746
- ],
15747
- exports: [SelectButtonComponent],
15869
+ selector: "s-object-card-field",
15870
+ 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",
15871
+ 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}"]
15748
15872
  })
15749
- ], SelectButtonModule);
15750
- return SelectButtonModule;
15873
+ ], ObjectCardFieldComponent);
15874
+ return ObjectCardFieldComponent;
15751
15875
  }());
15752
15876
 
15753
- var SidebarComponent = /** @class */ (function () {
15754
- function SidebarComponent(focusTrapFactory) {
15755
- this.focusTrapFactory = focusTrapFactory;
15756
- this.id = "s-sidebar-" + SidebarComponent_1.nextId++;
15757
- this.visible = false;
15758
- this.baseZIndex = 0;
15759
- this.largeSized = false;
15760
- this.visibleChange = new core.EventEmitter();
15877
+ var ObjectCardMainComponent = /** @class */ (function () {
15878
+ function ObjectCardMainComponent() {
15879
+ this.id = "s-object-card-main-" + ObjectCardMainComponent_1.nextId++;
15880
+ this.iconClass = "fa fa-picture-o";
15881
+ this.hasThumbnail = true;
15882
+ this.hasDescription = true;
15883
+ this.isBrand = false;
15884
+ this.buttonClick = new core.EventEmitter();
15885
+ this._thumbnailSize = exports.ThumbnailSize.Medium;
15761
15886
  }
15762
- SidebarComponent_1 = SidebarComponent;
15763
- SidebarComponent.prototype.onShow = function () {
15764
- dom.DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
15765
- var focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
15766
- focusTrap.focusInitialElementWhenReady();
15887
+ ObjectCardMainComponent_1 = ObjectCardMainComponent;
15888
+ Object.defineProperty(ObjectCardMainComponent.prototype, "thumbnailSize", {
15889
+ get: function () {
15890
+ return this._thumbnailSize;
15891
+ },
15892
+ set: function (value) {
15893
+ this._thumbnailSize = value;
15894
+ if (this.thumbnailComponent)
15895
+ this.thumbnailComponent.size = value;
15896
+ },
15897
+ enumerable: true,
15898
+ configurable: true
15899
+ });
15900
+ ObjectCardMainComponent.prototype.onResize = function () {
15901
+ this.update();
15767
15902
  };
15768
- SidebarComponent.prototype.onHide = function () {
15769
- dom.DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15903
+ ObjectCardMainComponent.prototype.ngAfterContentInit = function () {
15904
+ this.update();
15770
15905
  };
15771
- SidebarComponent.prototype.close = function (event) {
15772
- dom.DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
15773
- this.visibleChange.emit(false);
15774
- event.preventDefault();
15906
+ ObjectCardMainComponent.prototype.update = function () {
15907
+ var windowWidth = window.innerWidth;
15908
+ if (windowWidth <= Breakpoints.SM_MAX)
15909
+ this.thumbnailSize = exports.ThumbnailSize.Small;
15910
+ else
15911
+ this.thumbnailSize = exports.ThumbnailSize.Medium;
15775
15912
  };
15776
- var SidebarComponent_1;
15777
- SidebarComponent.nextId = 0;
15778
- SidebarComponent.ctorParameters = function () { return [
15779
- { type: a11y.FocusTrapFactory }
15780
- ]; };
15913
+ var ObjectCardMainComponent_1;
15914
+ ObjectCardMainComponent.nextId = 0;
15781
15915
  __decorate([
15782
15916
  core.Input()
15783
- ], SidebarComponent.prototype, "id", void 0);
15917
+ ], ObjectCardMainComponent.prototype, "id", void 0);
15784
15918
  __decorate([
15785
15919
  core.Input()
15786
- ], SidebarComponent.prototype, "visible", void 0);
15920
+ ], ObjectCardMainComponent.prototype, "imageSource", void 0);
15787
15921
  __decorate([
15788
15922
  core.Input()
15789
- ], SidebarComponent.prototype, "header", void 0);
15923
+ ], ObjectCardMainComponent.prototype, "imageFallback", void 0);
15790
15924
  __decorate([
15791
15925
  core.Input()
15792
- ], SidebarComponent.prototype, "baseZIndex", void 0);
15926
+ ], ObjectCardMainComponent.prototype, "imageAlt", void 0);
15927
+ __decorate([
15928
+ core.Input()
15929
+ ], ObjectCardMainComponent.prototype, "iconClass", void 0);
15930
+ __decorate([
15931
+ core.Input()
15932
+ ], ObjectCardMainComponent.prototype, "hasThumbnail", void 0);
15933
+ __decorate([
15934
+ core.Input()
15935
+ ], ObjectCardMainComponent.prototype, "hasDescription", void 0);
15936
+ __decorate([
15937
+ core.Input()
15938
+ ], ObjectCardMainComponent.prototype, "isBrand", void 0);
15939
+ __decorate([
15940
+ core.Input()
15941
+ ], ObjectCardMainComponent.prototype, "label", void 0);
15942
+ __decorate([
15943
+ core.Input()
15944
+ ], ObjectCardMainComponent.prototype, "description", void 0);
15945
+ __decorate([
15946
+ core.Input()
15947
+ ], ObjectCardMainComponent.prototype, "buttonLabel", void 0);
15793
15948
  __decorate([
15794
15949
  core.Input()
15795
- ], SidebarComponent.prototype, "largeSized", void 0);
15950
+ ], ObjectCardMainComponent.prototype, "buttonModel", void 0);
15796
15951
  __decorate([
15797
15952
  core.Output()
15798
- ], SidebarComponent.prototype, "visibleChange", void 0);
15799
- __decorate([
15800
- core.ViewChild(sidebar.Sidebar, { static: true })
15801
- ], SidebarComponent.prototype, "innerSidebar", void 0);
15953
+ ], ObjectCardMainComponent.prototype, "buttonClick", void 0);
15802
15954
  __decorate([
15803
- core.ContentChild(HeaderComponent, { static: true })
15804
- ], SidebarComponent.prototype, "headerSection", void 0);
15955
+ core.ContentChild(ThumbnailComponent, { static: true })
15956
+ ], ObjectCardMainComponent.prototype, "thumbnailComponent", void 0);
15805
15957
  __decorate([
15806
- core.ContentChild(FooterComponent, { static: true })
15807
- ], SidebarComponent.prototype, "footerSection", void 0);
15808
- SidebarComponent = SidebarComponent_1 = __decorate([
15958
+ core.HostListener("window:resize")
15959
+ ], ObjectCardMainComponent.prototype, "onResize", null);
15960
+ ObjectCardMainComponent = ObjectCardMainComponent_1 = __decorate([
15809
15961
  core.Component({
15810
- selector: "s-sidebar",
15811
- 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",
15812
- encapsulation: core.ViewEncapsulation.None,
15813
- 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}"]
15962
+ selector: "s-object-card-main",
15963
+ 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",
15964
+ 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}}"]
15814
15965
  })
15815
- ], SidebarComponent);
15816
- return SidebarComponent;
15966
+ ], ObjectCardMainComponent);
15967
+ return ObjectCardMainComponent;
15817
15968
  }());
15818
15969
 
15819
- var SidebarModule = /** @class */ (function () {
15820
- function SidebarModule() {
15821
- }
15822
- SidebarModule = __decorate([
15823
- core.NgModule({
15824
- imports: [common.CommonModule, a11y.A11yModule, sidebar.SidebarModule, scrollpanel.ScrollPanelModule, StructureModule],
15825
- declarations: [SidebarComponent],
15826
- exports: [StructureModule, SidebarComponent],
15827
- })
15828
- ], SidebarModule);
15829
- return SidebarModule;
15830
- }());
15831
15970
 
15832
- var SlidePanelService = /** @class */ (function () {
15833
- function SlidePanelService() {
15834
- this.modalCloseMap = new Map();
15835
- }
15836
- SlidePanelService.prototype.createSlidePanel = function (id) {
15837
- var panelSubject = new rxjs.Subject();
15838
- this.modalCloseMap.set(id, panelSubject);
15839
- return panelSubject.asObservable();
15840
- };
15841
- SlidePanelService.prototype.getModalCloseObservable = function (id) {
15842
- return this.modalCloseMap.get(id).asObservable();
15843
- };
15844
- SlidePanelService.prototype.closeModal = function (id) {
15845
- var subject = this.modalCloseMap.get(id);
15846
- if (subject) {
15847
- subject.next();
15848
- }
15849
- };
15850
- SlidePanelService = __decorate([
15851
- core.Injectable()
15852
- ], SlidePanelService);
15853
- return SlidePanelService;
15854
- }());
15971
+ (function (EnumSeverity) {
15972
+ EnumSeverity["Default"] = "Default";
15973
+ EnumSeverity["Info"] = "Info";
15974
+ EnumSeverity["Warn"] = "Warn";
15975
+ EnumSeverity["Error"] = "Error";
15976
+ EnumSeverity["Success"] = "Success";
15977
+ })(exports.EnumSeverity || (exports.EnumSeverity = {}));
15855
15978
 
15856
- var SMALL_DEVICE_BREAKPOINT = 420;
15857
- var SlidePanelComponent = /** @class */ (function () {
15858
- function SlidePanelComponent(slidePanelService) {
15859
- this.slidePanelService = slidePanelService;
15860
- this.id = "slide-panel-" + ++SlidePanelComponent_1.nextId;
15861
- this.openIcon = "fas fa-chevron-right";
15862
- this.closeIcon = "fas fa-chevron-left";
15863
- this.cache = false;
15864
- this.createOpen = false;
15865
- this.panelOpened = new core.EventEmitter();
15866
- this.panelClosed = new core.EventEmitter();
15867
- this.isOpen = false;
15868
- this.isSlideOver = false;
15869
- this.isAnimating = false;
15870
- this.isContentAnimationDisabled = true;
15871
- this.slideHeight = 0;
15872
- this.sideContentWidth = 0;
15873
- this._unsubscribe$ = new rxjs.Subject();
15979
+ var elementResizeDetectorMaker = elementResizeDetectorMaker_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
15980
+ var ObjectCardComponent = /** @class */ (function () {
15981
+ function ObjectCardComponent(cdr, elementRef) {
15982
+ this.cdr = cdr;
15983
+ this.elementRef = elementRef;
15984
+ this.id = "s-object-card-" + ObjectCardComponent_1.nextId++;
15985
+ this.expanded = false;
15986
+ this.expandTooltip = "Abrir painel";
15987
+ this.collapseTooltip = "Fechar painel";
15988
+ this.fieldsMinWidth = 200;
15989
+ this.expandedChange = new core.EventEmitter();
15990
+ this.maxVisibleFields = 0;
15991
+ this.severity = exports.EnumSeverity.Default;
15992
+ this.EnumSeverity = exports.EnumSeverity;
15874
15993
  }
15875
- SlidePanelComponent_1 = SlidePanelComponent;
15876
- SlidePanelComponent.prototype.onResize = function () {
15877
- this._checkOverBehavior();
15878
- };
15879
- SlidePanelComponent.prototype.ngOnInit = function () {
15880
- var _this = this;
15881
- this._checkOverBehavior();
15882
- this.slidePanelService.createSlidePanel(this.id)
15883
- .pipe(operators.takeUntil(this._unsubscribe$))
15884
- .subscribe(function () {
15885
- _this.isOpen = false;
15886
- });
15887
- };
15888
- SlidePanelComponent.prototype.ngAfterViewInit = function () {
15994
+ ObjectCardComponent_1 = ObjectCardComponent;
15995
+ ObjectCardComponent.prototype.ngAfterViewInit = function () {
15889
15996
  var _this = this;
15890
- queueMicrotask(function () {
15891
- if (_this.createOpen) {
15892
- _this.isOpen = true;
15893
- }
15997
+ this.update();
15998
+ this.cdr.detectChanges();
15999
+ this.fields.changes.subscribe(function () {
16000
+ _this.update();
15894
16001
  });
15895
- };
15896
- SlidePanelComponent.prototype.ngAfterViewChecked = function () {
15897
- var _this = this;
15898
- // to executed at a safe time prior to control returning to the browser's event loop
15899
- queueMicrotask(function () {
15900
- _this._calculateSlideHeight();
15901
- _this._calculateSideContentWidth();
15902
- _this.isContentAnimationDisabled = false;
16002
+ var erd = elementResizeDetectorMaker({
16003
+ strategy: "scroll",
15903
16004
  });
16005
+ erd.listenTo(this.elementRef.nativeElement, function () { return _this.update(); });
15904
16006
  };
15905
- SlidePanelComponent.prototype.ngOnDestroy = function () {
15906
- this._unsubscribe$.next();
15907
- this._unsubscribe$.complete();
15908
- };
15909
- SlidePanelComponent.prototype.onClickButton = function () {
15910
- if (this.isAnimating) {
15911
- return;
16007
+ ObjectCardComponent.prototype.update = function () {
16008
+ var e_1, _a;
16009
+ var windowWidth = window.innerWidth;
16010
+ var containerWidth = this.elementRef.nativeElement.offsetWidth;
16011
+ var mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
16012
+ var fieldsMinWidth = this.fieldsMinWidth;
16013
+ var expandIconWidth = 50;
16014
+ var fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
16015
+ try {
16016
+ for (var fieldElementList_1 = __values(fieldElementList), fieldElementList_1_1 = fieldElementList_1.next(); !fieldElementList_1_1.done; fieldElementList_1_1 = fieldElementList_1.next()) {
16017
+ var element = fieldElementList_1_1.value;
16018
+ element.style.minWidth = this.fieldsMinWidth + "px";
16019
+ }
15912
16020
  }
15913
- this.isOpen = !this.isOpen;
15914
- if (this.isOpen) {
15915
- this.panelOpened.emit();
16021
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
16022
+ finally {
16023
+ try {
16024
+ if (fieldElementList_1_1 && !fieldElementList_1_1.done && (_a = fieldElementList_1.return)) _a.call(fieldElementList_1);
16025
+ }
16026
+ finally { if (e_1) throw e_1.error; }
15916
16027
  }
15917
- else {
15918
- this.panelClosed.emit();
16028
+ var maxFieldQtd;
16029
+ if (windowWidth <= Breakpoints.SM_MAX)
16030
+ maxFieldQtd = 0;
16031
+ else
16032
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
16033
+ if (maxFieldQtd && maxFieldQtd < this.fields.length) {
16034
+ maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
15919
16035
  }
16036
+ this.maxVisibleFields = maxFieldQtd;
16037
+ if (maxFieldQtd >= this.fields.length && this.expanded)
16038
+ this.collapse();
15920
16039
  };
15921
- SlidePanelComponent.prototype.onContentAnimationStart = function () {
15922
- this.isAnimating = true;
15923
- };
15924
- SlidePanelComponent.prototype.onContentAnimationDone = function () {
15925
- this.isAnimating = false;
15926
- this._calculateSideContentWidth();
16040
+ ObjectCardComponent.prototype.toggle = function () {
16041
+ this.expanded ? this.collapse() : this.expand();
15927
16042
  };
15928
- SlidePanelComponent.prototype._checkOverBehavior = function () {
15929
- this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
16043
+ ObjectCardComponent.prototype.expand = function () {
16044
+ this.expanded = true;
16045
+ this.expandedChange.emit(this.expanded);
15930
16046
  };
15931
- SlidePanelComponent.prototype._calculateSlideHeight = function () {
15932
- this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
16047
+ ObjectCardComponent.prototype.collapse = function () {
16048
+ this.expanded = false;
16049
+ this.expandedChange.emit(this.expanded);
15933
16050
  };
15934
- SlidePanelComponent.prototype._calculateSideContentWidth = function () {
15935
- var slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
15936
- var slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
15937
- this.sideContentWidth = slidePanelWidth - slideContentWidth;
16051
+ ObjectCardComponent.prototype.getExpandedFieldWidth = function () {
16052
+ var containerWidth = this.elementRef.nativeElement.offsetWidth;
16053
+ var fieldsPerRow;
16054
+ if (containerWidth <= Breakpoints.SM_MAX)
16055
+ fieldsPerRow = 1;
16056
+ else if (containerWidth <= Breakpoints.MD_MAX)
16057
+ fieldsPerRow = 2;
16058
+ else if (containerWidth <= Breakpoints.LG_MAX)
16059
+ fieldsPerRow = 4;
16060
+ else
16061
+ fieldsPerRow = 6;
16062
+ return 12 / fieldsPerRow;
15938
16063
  };
15939
- var SlidePanelComponent_1;
15940
- SlidePanelComponent.nextId = 0;
15941
- SlidePanelComponent.ctorParameters = function () { return [
15942
- { type: SlidePanelService }
16064
+ var ObjectCardComponent_1;
16065
+ ObjectCardComponent.nextId = 0;
16066
+ ObjectCardComponent.ctorParameters = function () { return [
16067
+ { type: core.ChangeDetectorRef },
16068
+ { type: core.ElementRef }
15943
16069
  ]; };
15944
16070
  __decorate([
15945
16071
  core.Input()
15946
- ], SlidePanelComponent.prototype, "id", void 0);
16072
+ ], ObjectCardComponent.prototype, "id", void 0);
15947
16073
  __decorate([
15948
16074
  core.Input()
15949
- ], SlidePanelComponent.prototype, "openIcon", void 0);
16075
+ ], ObjectCardComponent.prototype, "expanded", void 0);
15950
16076
  __decorate([
15951
16077
  core.Input()
15952
- ], SlidePanelComponent.prototype, "closeIcon", void 0);
16078
+ ], ObjectCardComponent.prototype, "expandTooltip", void 0);
15953
16079
  __decorate([
15954
16080
  core.Input()
15955
- ], SlidePanelComponent.prototype, "cache", void 0);
16081
+ ], ObjectCardComponent.prototype, "collapseTooltip", void 0);
15956
16082
  __decorate([
15957
16083
  core.Input()
15958
- ], SlidePanelComponent.prototype, "createOpen", void 0);
15959
- __decorate([
15960
- core.Output()
15961
- ], SlidePanelComponent.prototype, "panelOpened", void 0);
16084
+ ], ObjectCardComponent.prototype, "fieldsMinWidth", void 0);
15962
16085
  __decorate([
15963
16086
  core.Output()
15964
- ], SlidePanelComponent.prototype, "panelClosed", void 0);
16087
+ ], ObjectCardComponent.prototype, "expandedChange", void 0);
15965
16088
  __decorate([
15966
- core.ViewChild("slidePanel")
15967
- ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
16089
+ core.ContentChild(ObjectCardMainComponent, { static: true })
16090
+ ], ObjectCardComponent.prototype, "main", void 0);
15968
16091
  __decorate([
15969
- core.ViewChild("slideContent")
15970
- ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
16092
+ core.ContentChildren(ObjectCardFieldComponent, { descendants: true })
16093
+ ], ObjectCardComponent.prototype, "fields", void 0);
15971
16094
  __decorate([
15972
- core.ViewChild("sideContent")
15973
- ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
16095
+ core.Input()
16096
+ ], ObjectCardComponent.prototype, "severity", void 0);
15974
16097
  __decorate([
15975
- core.HostListener("window:resize")
15976
- ], SlidePanelComponent.prototype, "onResize", null);
15977
- SlidePanelComponent = SlidePanelComponent_1 = __decorate([
16098
+ core.Input()
16099
+ ], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
16100
+ ObjectCardComponent = ObjectCardComponent_1 = __decorate([
15978
16101
  core.Component({
15979
- selector: "s-slide-panel",
15980
- 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>",
16102
+ selector: "s-object-card",
16103
+ 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",
15981
16104
  animations: [
15982
- animations.trigger("cachelessAnimation", [
16105
+ animations.trigger("expandableContent", [
16106
+ animations.state("*", animations.style({
16107
+ height: "0",
16108
+ })),
16109
+ animations.state("false", animations.style({
16110
+ height: "0",
16111
+ })),
16112
+ animations.state("true", animations.style({
16113
+ height: "*",
16114
+ })),
16115
+ animations.transition("* => true", animations.animate("200ms ease-out")),
16116
+ animations.transition("false <=> true", animations.animate("200ms ease-out")),
16117
+ ]),
16118
+ animations.trigger("BorderButtonAnimation", [
15983
16119
  animations.transition(":enter", [
15984
- animations.style({ width: "0" }),
15985
- animations.animate("200ms linear", animations.style({ width: "*" })),
16120
+ animations.style({ transform: "scaleY(0)", opacity: 0 }),
16121
+ animations.animate("300ms ease", animations.style({ transform: "scaleY(1)", opacity: 1 })),
15986
16122
  ]),
15987
16123
  animations.transition(":leave", [
15988
- animations.style({ width: "*" }),
15989
- animations.animate("200ms linear", animations.style({ width: "0" })),
16124
+ animations.style({ transform: "scaleY(1)", opacity: 1 }),
16125
+ animations.animate("300ms ease", animations.style({ transform: "scaleY(0)", opacity: 0 })),
15990
16126
  ]),
15991
16127
  ]),
15992
- animations.trigger("cacheAnimation", [
15993
- animations.state("true", animations.style({ width: "*", padding: '0 16px' })),
15994
- animations.state("false", animations.style({ width: '0px', padding: '0' })),
15995
- animations.transition("* => *", animations.animate("200ms")),
15996
- ]),
15997
16128
  ],
15998
- 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}"]
16129
+ 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)}}"]
15999
16130
  })
16000
- ], SlidePanelComponent);
16001
- return SlidePanelComponent;
16131
+ ], ObjectCardComponent);
16132
+ return ObjectCardComponent;
16002
16133
  }());
16003
16134
 
16004
- var SlidePanelModule = /** @class */ (function () {
16005
- function SlidePanelModule() {
16135
+ var BorderButtonComponent = /** @class */ (function () {
16136
+ function BorderButtonComponent() {
16137
+ this.severity = exports.EnumSeverity.Default;
16138
+ this.EnumSeverity = exports.EnumSeverity;
16139
+ this.TooltipPosition = exports.TooltipPosition;
16006
16140
  }
16007
- SlidePanelModule = __decorate([
16008
- core.NgModule({
16009
- imports: [common.CommonModule],
16010
- declarations: [SlidePanelComponent],
16011
- exports: [SlidePanelComponent],
16012
- providers: [SlidePanelService],
16141
+ __decorate([
16142
+ core.Input()
16143
+ ], BorderButtonComponent.prototype, "severity", void 0);
16144
+ __decorate([
16145
+ core.Input()
16146
+ ], BorderButtonComponent.prototype, "options", void 0);
16147
+ BorderButtonComponent = __decorate([
16148
+ core.Component({
16149
+ selector: "s-border-button",
16150
+ 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>",
16151
+ 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}"]
16013
16152
  })
16014
- ], SlidePanelModule);
16015
- return SlidePanelModule;
16153
+ ], BorderButtonComponent);
16154
+ return BorderButtonComponent;
16016
16155
  }());
16017
16156
 
16157
+ var BorderButtonModule = /** @class */ (function () {
16158
+ function BorderButtonModule() {
16159
+ }
16160
+ BorderButtonModule = __decorate([
16161
+ core.NgModule({
16162
+ imports: [common.CommonModule, TooltipModule],
16163
+ declarations: [BorderButtonComponent],
16164
+ exports: [BorderButtonComponent]
16165
+ })
16166
+ ], BorderButtonModule);
16167
+ return BorderButtonModule;
16168
+ }());
16018
16169
 
16019
- (function (SplitButtonType) {
16020
- SplitButtonType["Primary"] = "primary";
16021
- SplitButtonType["Secondary"] = "secondary";
16022
- SplitButtonType["Default"] = "default";
16023
- })(exports.SplitButtonType || (exports.SplitButtonType = {}));
16170
+ var ObjectCardModule = /** @class */ (function () {
16171
+ function ObjectCardModule() {
16172
+ }
16173
+ ObjectCardModule = __decorate([
16174
+ core.NgModule({
16175
+ imports: [common.CommonModule, tooltip.TooltipModule, ThumbnailModule, ButtonModule, BorderButtonModule],
16176
+ declarations: [ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
16177
+ exports: [ThumbnailModule, ObjectCardComponent, ObjectCardMainComponent, ObjectCardFieldComponent],
16178
+ })
16179
+ ], ObjectCardModule);
16180
+ return ObjectCardModule;
16181
+ }());
16024
16182
 
16025
- var SplitButtonComponent = /** @class */ (function () {
16026
- function SplitButtonComponent(eRef) {
16027
- this.eRef = eRef;
16028
- this.disabled = false;
16029
- this.type = exports.SplitButtonType.Primary;
16030
- this.buttonClicked = new core.EventEmitter();
16031
- this.open = false;
16183
+ var ProductHeaderComponent = /** @class */ (function () {
16184
+ function ProductHeaderComponent() {
16185
+ this.id = "s-product-header-" + ProductHeaderComponent_1.nextId++;
16186
+ this.baseZIndex = 0;
16187
+ this.isHeaderFrame = true;
16032
16188
  }
16033
- SplitButtonComponent.prototype.onClickout = function (event) {
16034
- if (!this.eRef.nativeElement.contains(event.target)) {
16035
- this.closeDropdown();
16036
- }
16037
- };
16038
- SplitButtonComponent.prototype.onButtonClick = function () {
16039
- if (!this.disabled) {
16040
- this.buttonClicked.emit();
16041
- this.closeDropdown();
16189
+ ProductHeaderComponent_1 = ProductHeaderComponent;
16190
+ ProductHeaderComponent.prototype.ngAfterViewInit = function () {
16191
+ this.container.nativeElement.style.zIndex = String(this.baseZIndex + ++dom.DomHandler.zindex);
16192
+ if (this.isHeaderFrame) {
16193
+ this.container.nativeElement.style.borderBottom = "1px solid $default-secondary-color";
16042
16194
  }
16043
- };
16044
- SplitButtonComponent.prototype.onDropdownClick = function () {
16045
- if (!this.disabled) {
16046
- this.open = !this.open;
16195
+ else {
16196
+ this.container.nativeElement.style.borderTop = "1px solid $default-secondary-color";
16047
16197
  }
16048
16198
  };
16049
- SplitButtonComponent.prototype.onOptionClick = function (option) {
16050
- option.action && option.action();
16051
- this.closeDropdown();
16052
- };
16053
- SplitButtonComponent.prototype.closeDropdown = function () {
16054
- this.open = false;
16055
- };
16056
- SplitButtonComponent.ctorParameters = function () { return [
16057
- { type: core.ElementRef }
16058
- ]; };
16059
- __decorate([
16060
- core.Input()
16061
- ], SplitButtonComponent.prototype, "disabled", void 0);
16199
+ var ProductHeaderComponent_1;
16200
+ ProductHeaderComponent.nextId = 0;
16062
16201
  __decorate([
16063
16202
  core.Input()
16064
- ], SplitButtonComponent.prototype, "iconClass", void 0);
16203
+ ], ProductHeaderComponent.prototype, "id", void 0);
16065
16204
  __decorate([
16066
16205
  core.Input()
16067
- ], SplitButtonComponent.prototype, "label", void 0);
16206
+ ], ProductHeaderComponent.prototype, "header", void 0);
16068
16207
  __decorate([
16069
16208
  core.Input()
16070
- ], SplitButtonComponent.prototype, "type", void 0);
16209
+ ], ProductHeaderComponent.prototype, "baseZIndex", void 0);
16071
16210
  __decorate([
16072
16211
  core.Input()
16073
- ], SplitButtonComponent.prototype, "options", void 0);
16074
- __decorate([
16075
- core.Output()
16076
- ], SplitButtonComponent.prototype, "buttonClicked", void 0);
16212
+ ], ProductHeaderComponent.prototype, "isHeaderFrame", void 0);
16077
16213
  __decorate([
16078
- core.HostListener("document:click", ["$event"])
16079
- ], SplitButtonComponent.prototype, "onClickout", null);
16080
- SplitButtonComponent = __decorate([
16214
+ core.ViewChild("headerContainer", { static: false })
16215
+ ], ProductHeaderComponent.prototype, "container", void 0);
16216
+ ProductHeaderComponent = ProductHeaderComponent_1 = __decorate([
16081
16217
  core.Component({
16082
- selector: "s-split-button",
16083
- 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>",
16084
- 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}"]
16085
- })
16086
- ], SplitButtonComponent);
16087
- return SplitButtonComponent;
16088
- }());
16089
-
16090
- var SplitButtonModule = /** @class */ (function () {
16091
- function SplitButtonModule() {
16092
- }
16093
- SplitButtonModule = __decorate([
16094
- core.NgModule({
16095
- imports: [common.CommonModule],
16096
- declarations: [SplitButtonComponent],
16097
- exports: [SplitButtonComponent],
16218
+ selector: "s-product-header",
16219
+ 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",
16220
+ 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}"]
16098
16221
  })
16099
- ], SplitButtonModule);
16100
- return SplitButtonModule;
16222
+ ], ProductHeaderComponent);
16223
+ return ProductHeaderComponent;
16101
16224
  }());
16102
-
16103
- var StatsCardComponent = /** @class */ (function () {
16104
- function StatsCardComponent() {
16105
- this.id = "s-stats-card-" + StatsCardComponent_1.nextId++;
16106
- this.alwaysWithBorder = false;
16107
- this.lightVersion = false;
16108
- this.lightMode = true;
16109
- this.iconClass = "fa fa-bar-chart";
16110
- this.color = "#339966";
16111
- this.animateNumbers = true;
16112
- this.clickable = false;
16113
- this.tooltip = "";
16114
- this.onClick = new core.EventEmitter();
16115
- this.ANIMATION_DURATION_MS = 200;
16116
- this.STEP_DURATION_MS = 20;
16117
- this.previousValue = "0";
16118
- this._value = "0";
16119
- }
16120
- StatsCardComponent_1 = StatsCardComponent;
16121
- Object.defineProperty(StatsCardComponent.prototype, "value", {
16122
- get: function () {
16123
- return this._value;
16124
- },
16125
- set: function (value) {
16126
- this.previousValue = this._value;
16127
- this._value = String(value);
16128
- if (this.animateNumbers)
16129
- this.updateDisplayValue();
16130
- else
16131
- this.displayValue = this.value;
16132
- },
16133
- enumerable: true,
16134
- configurable: true
16135
- });
16136
- StatsCardComponent.prototype.updateDisplayValue = function () {
16137
- var _this = this;
16138
- var animationDuration = new BigNumber.BigNumber(this.ANIMATION_DURATION_MS);
16139
- var stepDuration = new BigNumber.BigNumber(this.STEP_DURATION_MS);
16140
- var animationCount = animationDuration.dividedBy(stepDuration);
16141
- var previousRawValue = new BigNumber.BigNumber(this.previousValue.replace(/\D/g, ""));
16142
- var rawValue = new BigNumber.BigNumber(this.value.replace(/\D/g, ""));
16143
- var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
16144
- var incremental = previousRawValue.isLessThan(rawValue);
16145
- clearInterval(this.intervalId);
16146
- this.displayValue = this.replaceNumericPositions(this.value);
16147
- var counter = previousRawValue;
16148
- this.intervalId = setInterval(function () {
16149
- if (incremental && counter.isLessThan(rawValue)) {
16150
- _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16151
- counter = counter.plus(incrementValue);
16152
- }
16153
- else if (!incremental && counter.isGreaterThan(rawValue)) {
16154
- _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
16155
- counter = counter.minus(incrementValue);
16156
- }
16157
- else {
16158
- _this.displayValue = _this.value;
16159
- clearInterval(_this.intervalId);
16160
- }
16161
- }, this.STEP_DURATION_MS);
16162
- };
16163
- StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
16164
- var rawValue = value.replace(/[^\d]/g, "");
16165
- var newValueString = newValue ? newValue.toString() : "";
16166
- var formattedNewValue = newValueString
16167
- .toString()
16168
- .replace(/\D/g, "")
16169
- .padStart(rawValue.length, "0");
16170
- var newValueIndex = 0;
16171
- return value
16172
- .split("")
16173
- .map(function (char) {
16174
- var number = Number(char);
16175
- if (number || char === "0")
16176
- return formattedNewValue[newValueIndex++];
16177
- return char;
16225
+
16226
+ var ProductHeaderModule = /** @class */ (function () {
16227
+ function ProductHeaderModule() {
16228
+ }
16229
+ ProductHeaderModule = __decorate([
16230
+ core.NgModule({
16231
+ imports: [common.CommonModule, tooltip.TooltipModule, ThumbnailModule],
16232
+ declarations: [ProductHeaderComponent],
16233
+ exports: [ProductHeaderComponent, ThumbnailModule],
16178
16234
  })
16179
- .join("");
16235
+ ], ProductHeaderModule);
16236
+ return ProductHeaderModule;
16237
+ }());
16238
+
16239
+
16240
+ (function (ProgressBarColors) {
16241
+ ProgressBarColors["Blue"] = "blue";
16242
+ ProgressBarColors["Green"] = "green";
16243
+ ProgressBarColors["Red"] = "red";
16244
+ ProgressBarColors["Yellow"] = "yellow";
16245
+ })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
16246
+
16247
+ var ProgressBarMode;
16248
+ (function (ProgressBarMode) {
16249
+ ProgressBarMode["Determinate"] = "determinate";
16250
+ ProgressBarMode["Indeterminate"] = "indeterminate";
16251
+ })(ProgressBarMode || (ProgressBarMode = {}));
16252
+
16253
+ var ProgressBarComponent = /** @class */ (function () {
16254
+ function ProgressBarComponent() {
16255
+ this.numberFormatOptions = {
16256
+ style: "decimal",
16257
+ minimumFractionDigits: 0,
16258
+ maximumFractionDigits: 2,
16259
+ };
16260
+ this.showValue = true;
16261
+ this.mode = ProgressBarMode.Determinate;
16262
+ }
16263
+ ProgressBarComponent.prototype.ngOnInit = function () {
16264
+ this.validateInputs();
16265
+ };
16266
+ ProgressBarComponent.prototype.validateInputs = function () {
16267
+ if (this.value < 0 || this.value > 100) {
16268
+ throw new Error("Invalid value for value");
16269
+ }
16270
+ if (this.targetValue < 0 || this.targetValue > 100) {
16271
+ throw new Error("Invalid value for targetValue");
16272
+ }
16273
+ if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
16274
+ throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
16275
+ }
16180
16276
  };
16181
- var StatsCardComponent_1;
16182
- StatsCardComponent.nextId = 0;
16183
16277
  __decorate([
16184
16278
  core.Input()
16185
- ], StatsCardComponent.prototype, "id", void 0);
16279
+ ], ProgressBarComponent.prototype, "value", void 0);
16186
16280
  __decorate([
16187
16281
  core.Input()
16188
- ], StatsCardComponent.prototype, "label", void 0);
16282
+ ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
16189
16283
  __decorate([
16190
16284
  core.Input()
16191
- ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
16285
+ ], ProgressBarComponent.prototype, "targetValue", void 0);
16192
16286
  __decorate([
16193
16287
  core.Input()
16194
- ], StatsCardComponent.prototype, "lightVersion", void 0);
16288
+ ], ProgressBarComponent.prototype, "label", void 0);
16195
16289
  __decorate([
16196
16290
  core.Input()
16197
- ], StatsCardComponent.prototype, "lightMode", void 0);
16291
+ ], ProgressBarComponent.prototype, "targetLabel", void 0);
16198
16292
  __decorate([
16199
16293
  core.Input()
16200
- ], StatsCardComponent.prototype, "iconClass", void 0);
16294
+ ], ProgressBarComponent.prototype, "activeColor", void 0);
16201
16295
  __decorate([
16202
16296
  core.Input()
16203
- ], StatsCardComponent.prototype, "color", void 0);
16297
+ ], ProgressBarComponent.prototype, "showValue", void 0);
16204
16298
  __decorate([
16205
16299
  core.Input()
16206
- ], StatsCardComponent.prototype, "animateNumbers", void 0);
16300
+ ], ProgressBarComponent.prototype, "mode", void 0);
16301
+ ProgressBarComponent = __decorate([
16302
+ core.Component({
16303
+ selector: "s-progressbar",
16304
+ 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>",
16305
+ 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}"]
16306
+ })
16307
+ ], ProgressBarComponent);
16308
+ return ProgressBarComponent;
16309
+ }());
16310
+
16311
+ var ProgressBarDeterminateComponent = /** @class */ (function () {
16312
+ function ProgressBarDeterminateComponent(localeService) {
16313
+ this.localeService = localeService;
16314
+ this.showValue = true;
16315
+ }
16316
+ ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
16317
+ this.validateValues();
16318
+ this.onGetLocale();
16319
+ };
16320
+ ProgressBarDeterminateComponent.prototype.onGetLocale = function () {
16321
+ var _this = this;
16322
+ this.localeService.getLocale().subscribe({
16323
+ next: function (locale) {
16324
+ _this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", _this.numberFormatOptions);
16325
+ },
16326
+ error: function () {
16327
+ _this.numberFormat = new Intl.NumberFormat("pt-BR", _this.numberFormatOptions);
16328
+ },
16329
+ });
16330
+ };
16331
+ ProgressBarDeterminateComponent.prototype.validateValues = function () {
16332
+ if (this.value < 0 || this.value > 100) {
16333
+ throw new Error("Invalid value for value");
16334
+ }
16335
+ if (this.targetValue < 0 || this.targetValue > 100) {
16336
+ throw new Error("Invalid value for targetValue");
16337
+ }
16338
+ };
16339
+ ProgressBarDeterminateComponent.ctorParameters = function () { return [
16340
+ { type: LocaleService }
16341
+ ]; };
16207
16342
  __decorate([
16208
16343
  core.Input()
16209
- ], StatsCardComponent.prototype, "clickable", void 0);
16344
+ ], ProgressBarDeterminateComponent.prototype, "value", void 0);
16210
16345
  __decorate([
16211
16346
  core.Input()
16212
- ], StatsCardComponent.prototype, "value", null);
16347
+ ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
16213
16348
  __decorate([
16214
16349
  core.Input()
16215
- ], StatsCardComponent.prototype, "tooltip", void 0);
16350
+ ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
16216
16351
  __decorate([
16217
- core.Output()
16218
- ], StatsCardComponent.prototype, "onClick", void 0);
16219
- StatsCardComponent = StatsCardComponent_1 = __decorate([
16352
+ core.Input()
16353
+ ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
16354
+ __decorate([
16355
+ core.Input()
16356
+ ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
16357
+ __decorate([
16358
+ core.Input()
16359
+ ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
16360
+ ProgressBarDeterminateComponent = __decorate([
16220
16361
  core.Component({
16221
- selector: "s-stats-card",
16222
- 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",
16223
- encapsulation: core.ViewEncapsulation.None,
16224
- 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}}"]
16362
+ selector: "s-progressbar-determinate",
16363
+ 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",
16364
+ 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}"]
16225
16365
  })
16226
- ], StatsCardComponent);
16227
- return StatsCardComponent;
16366
+ ], ProgressBarDeterminateComponent);
16367
+ return ProgressBarDeterminateComponent;
16228
16368
  }());
16229
16369
 
16230
- var StatsCardModule = /** @class */ (function () {
16231
- function StatsCardModule() {
16370
+ var ProgressBarIndeterminateComponent = /** @class */ (function () {
16371
+ function ProgressBarIndeterminateComponent() {
16232
16372
  }
16233
- StatsCardModule = __decorate([
16373
+ __decorate([
16374
+ core.Input()
16375
+ ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
16376
+ __decorate([
16377
+ core.Input()
16378
+ ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
16379
+ ProgressBarIndeterminateComponent = __decorate([
16380
+ core.Component({
16381
+ selector: "s-progressbar-indeterminate",
16382
+ 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",
16383
+ 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%)}}"]
16384
+ })
16385
+ ], ProgressBarIndeterminateComponent);
16386
+ return ProgressBarIndeterminateComponent;
16387
+ }());
16388
+
16389
+ var ProgressBarModule = /** @class */ (function () {
16390
+ function ProgressBarModule() {
16391
+ }
16392
+ ProgressBarModule = __decorate([
16234
16393
  core.NgModule({
16235
- imports: [
16236
- common.CommonModule,
16237
- tooltip.TooltipModule,
16238
- ],
16394
+ imports: [common.CommonModule],
16239
16395
  declarations: [
16240
- StatsCardComponent,
16241
- ],
16242
- exports: [
16243
- StatsCardComponent,
16396
+ ProgressBarComponent,
16397
+ ProgressBarDeterminateComponent,
16398
+ ProgressBarIndeterminateComponent,
16244
16399
  ],
16400
+ exports: [ProgressBarComponent],
16245
16401
  })
16246
- ], StatsCardModule);
16247
- return StatsCardModule;
16402
+ ], ProgressBarModule);
16403
+ return ProgressBarModule;
16248
16404
  }());
16249
16405
 
16250
-
16251
- (function (StepState) {
16252
- StepState["Default"] = "default";
16253
- StepState["Success"] = "success";
16254
- StepState["Warning"] = "warning";
16255
- })(exports.StepState || (exports.StepState = {}));
16256
- var StepsComponent = /** @class */ (function () {
16257
- function StepsComponent() {
16258
- this.id = "s-steps-" + StepsComponent_1.nextId++;
16259
- this.activeIndex = 0;
16260
- this.stepSelected = new core.EventEmitter();
16406
+ var PanelComponent = /** @class */ (function () {
16407
+ function PanelComponent() {
16408
+ this.toggleable = true;
16409
+ this.collapsed = false;
16410
+ this.severity = exports.EnumSeverity.Default;
16411
+ this.collapsedChange = new core.EventEmitter();
16412
+ this.EnumSeverity = exports.EnumSeverity;
16261
16413
  }
16262
- StepsComponent_1 = StepsComponent;
16263
- StepsComponent.prototype.stepClick = function (step, index, event) {
16264
- if (step.disabled || index == this.activeIndex)
16265
- return;
16266
- this.stepSelected.emit({ step: step, index: index, event: event });
16267
- };
16268
- Object.defineProperty(StepsComponent.prototype, "stepState", {
16269
- get: function () {
16270
- return exports.StepState;
16271
- },
16272
- enumerable: true,
16273
- configurable: true
16274
- });
16275
- StepsComponent.prototype.barAnimation = function (index, activeIndex) {
16276
- var visited = index < activeIndex;
16277
- var activated = index === activeIndex;
16278
- return visited || activated;
16279
- };
16280
- StepsComponent.prototype.afterBarAnimation = function (index, activeIndex) {
16281
- var visited = index < activeIndex;
16282
- var activated = index === activeIndex - 1;
16283
- return visited || activated;
16414
+ PanelComponent.prototype.onCollapsedChange = function (collapsed) {
16415
+ this.collapsed = collapsed;
16416
+ this.collapsedChange.emit(this.collapsed);
16284
16417
  };
16285
- Object.defineProperty(StepsComponent.prototype, "visibledStep", {
16286
- get: function () {
16287
- return this.steps.filter(function (step) { return !step.hidden; });
16288
- },
16289
- enumerable: true,
16290
- configurable: true
16291
- });
16292
- var StepsComponent_1;
16293
- StepsComponent.nextId = 0;
16294
16418
  __decorate([
16295
16419
  core.Input()
16296
- ], StepsComponent.prototype, "id", void 0);
16420
+ ], PanelComponent.prototype, "header", void 0);
16297
16421
  __decorate([
16298
16422
  core.Input()
16299
- ], StepsComponent.prototype, "steps", void 0);
16423
+ ], PanelComponent.prototype, "toggleable", void 0);
16300
16424
  __decorate([
16301
16425
  core.Input()
16302
- ], StepsComponent.prototype, "activeIndex", void 0);
16426
+ ], PanelComponent.prototype, "collapsed", void 0);
16427
+ __decorate([
16428
+ core.Input()
16429
+ ], PanelComponent.prototype, "severity", void 0);
16430
+ __decorate([
16431
+ core.Input()
16432
+ ], PanelComponent.prototype, "borderButtonOptions", void 0);
16303
16433
  __decorate([
16304
16434
  core.Output()
16305
- ], StepsComponent.prototype, "stepSelected", void 0);
16306
- StepsComponent = StepsComponent_1 = __decorate([
16435
+ ], PanelComponent.prototype, "collapsedChange", void 0);
16436
+ PanelComponent = __decorate([
16307
16437
  core.Component({
16308
- selector: "s-steps",
16309
- 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",
16310
- host: {
16311
- "aria-orientation": "horizontal",
16312
- role: "tablist",
16313
- "tab-index": "0",
16314
- },
16438
+ selector: "s-panel",
16439
+ 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>",
16315
16440
  animations: [
16316
- animations.trigger("beforeActiveDesative", [
16317
- animations.state("active", animations.style({
16318
- "background-position": "left bottom",
16319
- })),
16320
- animations.state("desactive", animations.style({
16321
- "background-position": "right bottom",
16322
- })),
16323
- animations.transition("active => desactive", [animations.animate("50ms 100ms linear")]),
16324
- animations.transition("desactive => active", [animations.animate("50ms 250ms linear")]),
16325
- ]),
16326
- animations.trigger("activeDesative", [
16327
- animations.state("active", animations.style({
16328
- "background-position": "left bottom",
16329
- })),
16330
- animations.state("desactive", animations.style({
16331
- "background-position": "right bottom",
16332
- })),
16333
- animations.transition("active => desactive", [animations.animate("100ms 150ms linear")]),
16334
- animations.transition("desactive => active", [animations.animate("100ms 150ms linear")]),
16335
- ]),
16336
- animations.trigger("afterActiveDesative", [
16337
- animations.state("active", animations.style({
16338
- "background-position": "left bottom",
16339
- })),
16340
- animations.state("desactive", animations.style({
16341
- "background-position": "right bottom",
16342
- })),
16343
- animations.transition("active => desactive", [animations.animate("50ms 250ms linear")]),
16344
- animations.transition("desactive => active", [animations.animate("50ms 100ms linear")]),
16441
+ animations.trigger("BorderButtonAnimation", [
16442
+ animations.transition(":enter", [
16443
+ animations.style({ transform: "scaleY(0)", opacity: 0 }),
16444
+ animations.animate("300ms ease", animations.style({ transform: "scaleY(1)", opacity: 1 })),
16445
+ ]),
16446
+ animations.transition(":leave", [
16447
+ animations.style({ transform: "scaleY(1)", opacity: 1 }),
16448
+ animations.animate("300ms ease", animations.style({ transform: "scaleY(0)", opacity: 0 })),
16449
+ ]),
16345
16450
  ]),
16346
16451
  ],
16347
- 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}}"]
16452
+ 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}"]
16348
16453
  })
16349
- ], StepsComponent);
16350
- return StepsComponent;
16454
+ ], PanelComponent);
16455
+ return PanelComponent;
16351
16456
  }());
16352
16457
 
16353
- var StepsModule = /** @class */ (function () {
16354
- function StepsModule() {
16458
+ var PanelModule = /** @class */ (function () {
16459
+ function PanelModule() {
16355
16460
  }
16356
- StepsModule = __decorate([
16461
+ PanelModule = __decorate([
16357
16462
  core.NgModule({
16358
- imports: [common.CommonModule, tooltip.TooltipModule],
16359
- declarations: [StepsComponent],
16360
- exports: [StepsComponent],
16463
+ imports: [common.CommonModule, panel.PanelModule, BorderButtonModule],
16464
+ declarations: [PanelComponent],
16465
+ exports: [PanelComponent],
16361
16466
  })
16362
- ], StepsModule);
16363
- return StepsModule;
16364
- }());
16365
-
16366
- var TieredMenuEventService = /** @class */ (function () {
16367
- function TieredMenuEventService() {
16368
- this.incrementCurrentItemEvent = new core.EventEmitter();
16369
- this.decrementCurrentItemEvent = new core.EventEmitter();
16370
- this.closeAllMenusEvent = new core.EventEmitter();
16371
- this.selectItemEvent = new core.EventEmitter();
16372
- this.openItemMenuEvent = new core.EventEmitter();
16373
- this.closeItemMenuEvent = new core.EventEmitter();
16374
- this.createMenuEvent = new core.EventEmitter();
16375
- }
16376
- TieredMenuEventService = __decorate([
16377
- core.Injectable()
16378
- ], TieredMenuEventService);
16379
- return TieredMenuEventService;
16467
+ ], PanelModule);
16468
+ return PanelModule;
16380
16469
  }());
16381
16470
 
16382
- var TieredMenuService = /** @class */ (function () {
16383
- function TieredMenuService() {
16384
- this.currentItems = [];
16385
- this.items = [];
16471
+ var RatingScaleComponent = /** @class */ (function () {
16472
+ function RatingScaleComponent() {
16473
+ this.disabled = false;
16386
16474
  }
16387
- TieredMenuService.prototype.normalizeData = function (items, parent) {
16388
- var _this = this;
16389
- return items.map(function (i) {
16390
- var item = __assign({ visible: true }, i);
16391
- if (item.submenu) {
16392
- item.submenu = _this.normalizeData(item.submenu, item);
16393
- }
16394
- item.id = _this._generateId();
16395
- item.parent = parent;
16396
- item.isOpen = false;
16397
- return item;
16398
- });
16399
- };
16400
- TieredMenuService.prototype.markAllItemsAsClosed = function (items) {
16401
- var _this = this;
16402
- return items.map(function (i) {
16403
- var item = __assign({}, i);
16404
- if (item.submenu) {
16405
- item.submenu = _this.markAllItemsAsClosed(item.submenu);
16406
- }
16407
- item.isOpen = false;
16408
- return item;
16409
- });
16410
- };
16411
- TieredMenuService.prototype.searchTheHierarchy = function (itemA, itemB) {
16412
- var item = itemB;
16413
- while (item) {
16414
- if (item === itemA) {
16415
- return true;
16416
- }
16417
- item = item.parent;
16475
+ RatingScaleComponent_1 = RatingScaleComponent;
16476
+ RatingScaleComponent.prototype.writeValue = function (value) {
16477
+ if (!this.disabled) {
16478
+ this.value = value;
16418
16479
  }
16419
- return false;
16420
16480
  };
16421
- TieredMenuService.prototype.cloneItems = function (items) {
16422
- return JSON.parse(JSON.stringify(items));
16481
+ RatingScaleComponent.prototype.registerOnChange = function (onChange) {
16482
+ this._onChange = onChange;
16423
16483
  };
16424
- TieredMenuService.prototype._generateId = function () {
16425
- return "id-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9) + "-" + Math.random().toString(36).substring(2, 9);
16484
+ RatingScaleComponent.prototype.registerOnTouched = function (onTouched) {
16485
+ this._onTouched = onTouched;
16426
16486
  };
16427
- TieredMenuService = __decorate([
16428
- core.Injectable()
16429
- ], TieredMenuService);
16430
- return TieredMenuService;
16487
+ RatingScaleComponent.prototype.onSelect = function (rating) {
16488
+ this.value = rating;
16489
+ if (this._onChange) {
16490
+ this._onChange(this.value);
16491
+ }
16492
+ };
16493
+ var RatingScaleComponent_1;
16494
+ __decorate([
16495
+ core.Input()
16496
+ ], RatingScaleComponent.prototype, "nodes", void 0);
16497
+ __decorate([
16498
+ core.Input()
16499
+ ], RatingScaleComponent.prototype, "startLabel", void 0);
16500
+ __decorate([
16501
+ core.Input()
16502
+ ], RatingScaleComponent.prototype, "endLabel", void 0);
16503
+ __decorate([
16504
+ core.Input()
16505
+ ], RatingScaleComponent.prototype, "disabled", void 0);
16506
+ RatingScaleComponent = RatingScaleComponent_1 = __decorate([
16507
+ core.Component({
16508
+ selector: "s-rating-scale",
16509
+ 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>",
16510
+ providers: [{
16511
+ provide: forms.NG_VALUE_ACCESSOR,
16512
+ useExisting: core.forwardRef(function () { return RatingScaleComponent_1; }),
16513
+ multi: true,
16514
+ }],
16515
+ 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}"]
16516
+ })
16517
+ ], RatingScaleComponent);
16518
+ return RatingScaleComponent;
16431
16519
  }());
16432
16520
 
16433
- var TieredMenuNestedComponent = /** @class */ (function () {
16434
- function TieredMenuNestedComponent(tieredMenuService, _tieredMenuEventService) {
16435
- this.tieredMenuService = tieredMenuService;
16436
- this._tieredMenuEventService = _tieredMenuEventService;
16437
- this.top = 0;
16438
- this.left = 0;
16439
- this._unsubscribe$ = new rxjs.Subject();
16521
+ var RatingScaleModule = /** @class */ (function () {
16522
+ function RatingScaleModule() {
16440
16523
  }
16441
- TieredMenuNestedComponent.prototype.onResize = function () {
16442
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16443
- };
16444
- TieredMenuNestedComponent.prototype.onDocumentClick = function (event) {
16445
- // Closing menu when clicked outside.
16446
- var target = event.target;
16447
- var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
16448
- if (!clickedInside) {
16449
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16450
- }
16451
- };
16452
- TieredMenuNestedComponent.prototype.onKeydownHandler = function (event) {
16453
- switch (event.key) {
16454
- case "Escape":
16455
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16456
- break;
16457
- case " ":
16458
- case "Enter":
16459
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
16460
- break;
16461
- case "ArrowLeft":
16462
- // When nested I need a reference to the current item's parent item, otherwise just the current item.
16463
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem.parent);
16464
- break;
16465
- case "ArrowRight":
16466
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
16467
- break;
16468
- case "ArrowUp":
16469
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
16470
- break;
16471
- case "ArrowDown":
16472
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
16473
- break;
16474
- }
16475
- };
16476
- TieredMenuNestedComponent.prototype.ngOnInit = function () {
16477
- this.tieredMenuService.currentItems = this.items;
16478
- this._subscribeEvents();
16479
- };
16480
- TieredMenuNestedComponent.prototype.ngOnDestroy = function () {
16481
- this._unsubscribe$.next();
16482
- this._unsubscribe$.complete();
16483
- };
16484
- TieredMenuNestedComponent.prototype._incrementCurItem = function () {
16485
- if (!this.tieredMenuService.currentItem) {
16486
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16487
- return;
16488
- }
16489
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
16490
- if (curIndex < this.tieredMenuService.currentItems.length) {
16491
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16492
- }
16493
- else {
16494
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16495
- }
16496
- if (this.tieredMenuService.currentItem.divider) {
16497
- this._incrementCurItem();
16498
- }
16499
- };
16500
- TieredMenuNestedComponent.prototype._decrementCurItem = function () {
16501
- if (!this.tieredMenuService.currentItem) {
16502
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16524
+ RatingScaleModule = __decorate([
16525
+ core.NgModule({
16526
+ imports: [
16527
+ common.CommonModule,
16528
+ forms.ReactiveFormsModule,
16529
+ ],
16530
+ declarations: [RatingScaleComponent],
16531
+ exports: [RatingScaleComponent],
16532
+ })
16533
+ ], RatingScaleModule);
16534
+ return RatingScaleModule;
16535
+ }());
16536
+
16537
+ var SelectButtonComponent = /** @class */ (function () {
16538
+ function SelectButtonComponent() {
16539
+ this.multiple = false;
16540
+ this.itemSelected = new core.EventEmitter();
16541
+ this.itemClicked = new core.EventEmitter();
16542
+ this.disabled = false;
16543
+ this.activeItems = new Set();
16544
+ }
16545
+ SelectButtonComponent_1 = SelectButtonComponent;
16546
+ SelectButtonComponent.prototype.writeValue = function (value) {
16547
+ var _this = this;
16548
+ if (!value)
16503
16549
  return;
16504
- }
16505
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
16506
- if (curIndex >= 0) {
16507
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16550
+ this.activeItems.clear();
16551
+ if (Array.isArray(value)) {
16552
+ value.forEach(function (item) {
16553
+ _this.items.forEach(function (iItem) {
16554
+ if (_this._compareItems(item, iItem)) {
16555
+ _this.activeItems.add(iItem);
16556
+ }
16557
+ });
16558
+ });
16508
16559
  }
16509
16560
  else {
16510
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
16511
- }
16512
- if (this.tieredMenuService.currentItem.divider) {
16513
- this._decrementCurItem();
16561
+ this.items.forEach(function (iItem) {
16562
+ if (_this._compareItems(value, iItem)) {
16563
+ _this.activeItems.add(iItem);
16564
+ }
16565
+ });
16514
16566
  }
16515
16567
  };
16516
- TieredMenuNestedComponent.prototype._closeItem = function (item) {
16517
- var _a;
16518
- var itemAux = this._lastOpenItem;
16519
- while (itemAux && itemAux != item) {
16520
- itemAux.isOpen = false;
16521
- itemAux = itemAux.parent;
16522
- }
16523
- item.isOpen = false;
16524
- this.tieredMenuService.currentItem = itemAux !== null && itemAux !== void 0 ? itemAux : this.tieredMenuService.items[0];
16525
- this.tieredMenuService.currentItems = ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.submenu) || this.tieredMenuService.items;
16568
+ SelectButtonComponent.prototype.registerOnChange = function (onChange) {
16569
+ this.onChange = onChange;
16526
16570
  };
16527
- TieredMenuNestedComponent.prototype._openItem = function (item) {
16528
- if (item === null || item === void 0 ? void 0 : item.submenu) {
16529
- item.isOpen = true;
16530
- this.tieredMenuService.currentItems = item.submenu;
16531
- // Only has focus if there has already been interaction.
16532
- if (this.tieredMenuService.currentItem) {
16533
- this.tieredMenuService.currentItem = item.submenu[0];
16534
- }
16535
- this._lastOpenItem = item;
16571
+ SelectButtonComponent.prototype.registerOnTouched = function (onTouched) {
16572
+ this.onTouched = onTouched;
16573
+ };
16574
+ SelectButtonComponent.prototype.setDisabledState = function (disabled) {
16575
+ this.disabled = disabled;
16576
+ };
16577
+ SelectButtonComponent.prototype.onItemSelect = function (item) {
16578
+ var _a, _b;
16579
+ if (this.disabled || item.disabled)
16580
+ return;
16581
+ this.itemClicked.emit(item);
16582
+ if (!this.multiple) {
16583
+ this.activeItems.clear();
16536
16584
  }
16585
+ this.activeItems.add(item);
16586
+ this.itemSelected.emit(__spread(this.activeItems));
16587
+ (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, __spread(this.activeItems));
16588
+ (_b = this.onTouched) === null || _b === void 0 ? void 0 : _b.call(this, __spread(this.activeItems));
16537
16589
  };
16538
- TieredMenuNestedComponent.prototype._subscribeEvents = function () {
16539
- var _this = this;
16540
- this._tieredMenuEventService.incrementCurrentItemEvent
16541
- .pipe(operators.takeUntil(this._unsubscribe$))
16542
- .subscribe(function () {
16543
- _this._incrementCurItem();
16544
- });
16545
- this._tieredMenuEventService.decrementCurrentItemEvent
16546
- .pipe(operators.takeUntil(this._unsubscribe$))
16547
- .subscribe(function () {
16548
- _this._decrementCurItem();
16549
- });
16550
- this._tieredMenuEventService.selectItemEvent
16551
- .pipe(operators.takeUntil(this._unsubscribe$))
16552
- .subscribe(function (item) {
16553
- if (item.command) {
16554
- item.command();
16555
- // Close all menus after the item was selected.
16556
- _this._tieredMenuEventService.closeAllMenusEvent.emit();
16590
+ SelectButtonComponent.prototype._compareItems = function (item1, item2) {
16591
+ var _compare = function (a, b) {
16592
+ var e_1, _a;
16593
+ if (a === b) {
16594
+ return true;
16557
16595
  }
16558
- });
16559
- this._tieredMenuEventService.openItemMenuEvent
16560
- .pipe(operators.takeUntil(this._unsubscribe$))
16561
- .subscribe(function (item) {
16562
- var _a, _b;
16563
- if (!_this.tieredMenuService.currentItems.includes(item)) {
16564
- var itemAux = _this._lastOpenItem;
16565
- while ((_a = itemAux === null || itemAux === void 0 ? void 0 : itemAux.parent) === null || _a === void 0 ? void 0 : _a.parent) {
16566
- itemAux = itemAux.parent;
16596
+ if (a === undefined || b === undefined || typeof a !== "object" || a === null || typeof b !== "object" || b === null) {
16597
+ return false;
16598
+ }
16599
+ if (Array.isArray(a) !== Array.isArray(b)) {
16600
+ return false;
16601
+ }
16602
+ var keysA = Object.keys(a);
16603
+ var keysB = Object.keys(b);
16604
+ if (keysA.length !== keysB.length) {
16605
+ return false;
16606
+ }
16607
+ try {
16608
+ for (var keysA_1 = __values(keysA), keysA_1_1 = keysA_1.next(); !keysA_1_1.done; keysA_1_1 = keysA_1.next()) {
16609
+ var key = keysA_1_1.value;
16610
+ if (!keysB.includes(key) || !_compare(a[key], b[key])) {
16611
+ return false;
16612
+ }
16567
16613
  }
16568
- _this._tieredMenuEventService.closeItemMenuEvent.emit((_b = itemAux.parent) !== null && _b !== void 0 ? _b : itemAux);
16569
16614
  }
16570
- _this._lastOpenItem = item;
16571
- _this._openItem(item);
16572
- });
16573
- this._tieredMenuEventService.closeItemMenuEvent
16574
- .pipe(operators.takeUntil(this._unsubscribe$))
16575
- .subscribe(function (item) {
16576
- if (item) {
16577
- _this._closeItem(item);
16615
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
16616
+ finally {
16617
+ try {
16618
+ if (keysA_1_1 && !keysA_1_1.done && (_a = keysA_1.return)) _a.call(keysA_1);
16619
+ }
16620
+ finally { if (e_1) throw e_1.error; }
16578
16621
  }
16579
- });
16622
+ for (var key in a) {
16623
+ if (a.hasOwnProperty(key) !== b.hasOwnProperty(key)) {
16624
+ return false;
16625
+ }
16626
+ }
16627
+ return true;
16628
+ };
16629
+ return _compare(item1, item2);
16580
16630
  };
16581
- TieredMenuNestedComponent.ctorParameters = function () { return [
16582
- { type: TieredMenuService },
16583
- { type: TieredMenuEventService }
16631
+ var SelectButtonComponent_1;
16632
+ __decorate([
16633
+ core.Input()
16634
+ ], SelectButtonComponent.prototype, "items", void 0);
16635
+ __decorate([
16636
+ core.Input()
16637
+ ], SelectButtonComponent.prototype, "multiple", void 0);
16638
+ __decorate([
16639
+ core.Output()
16640
+ ], SelectButtonComponent.prototype, "itemSelected", void 0);
16641
+ __decorate([
16642
+ core.Output()
16643
+ ], SelectButtonComponent.prototype, "itemClicked", void 0);
16644
+ SelectButtonComponent = SelectButtonComponent_1 = __decorate([
16645
+ core.Component({
16646
+ selector: "s-select-button",
16647
+ 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>",
16648
+ providers: [
16649
+ {
16650
+ provide: forms.NG_VALUE_ACCESSOR,
16651
+ useExisting: core.forwardRef(function () { return SelectButtonComponent_1; }),
16652
+ multi: true,
16653
+ },
16654
+ ],
16655
+ styles: [".select-button{overflow:hidden}"]
16656
+ })
16657
+ ], SelectButtonComponent);
16658
+ return SelectButtonComponent;
16659
+ }());
16660
+
16661
+ var SelectButtonItemComponent = /** @class */ (function () {
16662
+ function SelectButtonItemComponent() {
16663
+ this.active = false;
16664
+ this.first = false;
16665
+ this.last = false;
16666
+ this.disabled = false;
16667
+ }
16668
+ __decorate([
16669
+ core.Input()
16670
+ ], SelectButtonItemComponent.prototype, "label", void 0);
16671
+ __decorate([
16672
+ core.Input()
16673
+ ], SelectButtonItemComponent.prototype, "active", void 0);
16674
+ __decorate([
16675
+ core.Input()
16676
+ ], SelectButtonItemComponent.prototype, "first", void 0);
16677
+ __decorate([
16678
+ core.Input()
16679
+ ], SelectButtonItemComponent.prototype, "last", void 0);
16680
+ __decorate([
16681
+ core.Input()
16682
+ ], SelectButtonItemComponent.prototype, "disabled", void 0);
16683
+ SelectButtonItemComponent = __decorate([
16684
+ core.Component({
16685
+ selector: "s-select-button-item",
16686
+ 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>",
16687
+ 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}"]
16688
+ })
16689
+ ], SelectButtonItemComponent);
16690
+ return SelectButtonItemComponent;
16691
+ }());
16692
+
16693
+ var SelectButtonModule = /** @class */ (function () {
16694
+ function SelectButtonModule() {
16695
+ }
16696
+ SelectButtonModule = __decorate([
16697
+ core.NgModule({
16698
+ imports: [common.CommonModule],
16699
+ declarations: [
16700
+ SelectButtonComponent,
16701
+ SelectButtonItemComponent,
16702
+ ],
16703
+ exports: [SelectButtonComponent],
16704
+ })
16705
+ ], SelectButtonModule);
16706
+ return SelectButtonModule;
16707
+ }());
16708
+
16709
+ var SidebarComponent = /** @class */ (function () {
16710
+ function SidebarComponent(focusTrapFactory) {
16711
+ this.focusTrapFactory = focusTrapFactory;
16712
+ this.id = "s-sidebar-" + SidebarComponent_1.nextId++;
16713
+ this.visible = false;
16714
+ this.baseZIndex = 0;
16715
+ this.largeSized = false;
16716
+ this.visibleChange = new core.EventEmitter();
16717
+ }
16718
+ SidebarComponent_1 = SidebarComponent;
16719
+ SidebarComponent.prototype.onShow = function () {
16720
+ dom.DomHandler.addClass(document.body, "ui-overflow-hidden-sidebar");
16721
+ var focusTrap = this.focusTrapFactory.create(this.innerSidebar.containerViewChild.nativeElement, false);
16722
+ focusTrap.focusInitialElementWhenReady();
16723
+ };
16724
+ SidebarComponent.prototype.onHide = function () {
16725
+ dom.DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
16726
+ };
16727
+ SidebarComponent.prototype.close = function (event) {
16728
+ dom.DomHandler.removeClass(document.body, "ui-overflow-hidden-sidebar");
16729
+ this.visibleChange.emit(false);
16730
+ event.preventDefault();
16731
+ };
16732
+ var SidebarComponent_1;
16733
+ SidebarComponent.nextId = 0;
16734
+ SidebarComponent.ctorParameters = function () { return [
16735
+ { type: a11y.FocusTrapFactory }
16584
16736
  ]; };
16585
16737
  __decorate([
16586
- core.HostListener("window:resize")
16587
- ], TieredMenuNestedComponent.prototype, "onResize", null);
16738
+ core.Input()
16739
+ ], SidebarComponent.prototype, "id", void 0);
16740
+ __decorate([
16741
+ core.Input()
16742
+ ], SidebarComponent.prototype, "visible", void 0);
16743
+ __decorate([
16744
+ core.Input()
16745
+ ], SidebarComponent.prototype, "header", void 0);
16746
+ __decorate([
16747
+ core.Input()
16748
+ ], SidebarComponent.prototype, "baseZIndex", void 0);
16588
16749
  __decorate([
16589
- core.HostListener("document:click", ["$event"])
16590
- ], TieredMenuNestedComponent.prototype, "onDocumentClick", null);
16750
+ core.Input()
16751
+ ], SidebarComponent.prototype, "largeSized", void 0);
16591
16752
  __decorate([
16592
- core.HostListener("document:keydown", ["$event"])
16593
- ], TieredMenuNestedComponent.prototype, "onKeydownHandler", null);
16594
- TieredMenuNestedComponent = __decorate([
16753
+ core.Output()
16754
+ ], SidebarComponent.prototype, "visibleChange", void 0);
16755
+ __decorate([
16756
+ core.ViewChild(sidebar.Sidebar, { static: true })
16757
+ ], SidebarComponent.prototype, "innerSidebar", void 0);
16758
+ __decorate([
16759
+ core.ContentChild(HeaderComponent, { static: true })
16760
+ ], SidebarComponent.prototype, "headerSection", void 0);
16761
+ __decorate([
16762
+ core.ContentChild(FooterComponent, { static: true })
16763
+ ], SidebarComponent.prototype, "footerSection", void 0);
16764
+ SidebarComponent = SidebarComponent_1 = __decorate([
16595
16765
  core.Component({
16596
- 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",
16597
- 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}"]
16766
+ selector: "s-sidebar",
16767
+ 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",
16768
+ encapsulation: core.ViewEncapsulation.None,
16769
+ 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}"]
16598
16770
  })
16599
- ], TieredMenuNestedComponent);
16600
- return TieredMenuNestedComponent;
16771
+ ], SidebarComponent);
16772
+ return SidebarComponent;
16601
16773
  }());
16602
16774
 
16603
- var TieredMenuComponent = /** @class */ (function () {
16604
- function TieredMenuComponent(_appRef, _componentFactoryResolver, _injector, _changeDetectorRef, tieredMenuService, _tieredMenuEventService) {
16605
- this._appRef = _appRef;
16606
- this._componentFactoryResolver = _componentFactoryResolver;
16607
- this._injector = _injector;
16608
- this._changeDetectorRef = _changeDetectorRef;
16609
- this.tieredMenuService = tieredMenuService;
16610
- this._tieredMenuEventService = _tieredMenuEventService;
16611
- this.top = 0;
16612
- this.left = 0;
16613
- this.menuTriggerEvent = "hover";
16614
- this._componentRef = null;
16615
- this._unsubscribe$ = new rxjs.Subject();
16616
- this.destroyRequest = new core.EventEmitter();
16775
+ var SidebarModule = /** @class */ (function () {
16776
+ function SidebarModule() {
16617
16777
  }
16618
- TieredMenuComponent_1 = TieredMenuComponent;
16619
- TieredMenuComponent.prototype.onResize = function () {
16620
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16621
- };
16622
- TieredMenuComponent.prototype.onDocumentClick = function (event) {
16623
- // Closing menu when clicked outside.
16624
- var target = event.target;
16625
- var clickedInside = target.closest("s-tiered-menu-item") || target.closest("s-tiered-menu-divider");
16626
- if (!clickedInside) {
16627
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16628
- }
16629
- };
16630
- TieredMenuComponent.prototype.onKeydownHandler = function (event) {
16631
- switch (event.key) {
16632
- case "Escape":
16633
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16634
- break;
16635
- case " ":
16636
- case "Enter":
16637
- if (!this.tieredMenuService.currentItem.disabled) {
16638
- this._tieredMenuEventService.selectItemEvent.emit(this.tieredMenuService.currentItem);
16639
- }
16640
- break;
16641
- case "ArrowLeft":
16642
- if (this.items.includes(this.tieredMenuService.currentItem)) {
16643
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.tieredMenuService.currentItem);
16644
- this._changeDetectorRef.detectChanges();
16645
- }
16646
- break;
16647
- case "ArrowRight":
16648
- if (!this.tieredMenuService.currentItem.disabled && this.items.includes(this.tieredMenuService.currentItem)) {
16649
- this._tieredMenuEventService.openItemMenuEvent.emit(this.tieredMenuService.currentItem);
16650
- event.stopImmediatePropagation();
16651
- }
16652
- break;
16653
- case "ArrowUp":
16654
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
16655
- this._tieredMenuEventService.decrementCurrentItemEvent.emit();
16656
- event.stopImmediatePropagation();
16657
- }
16658
- break;
16659
- case "ArrowDown":
16660
- if (!this.tieredMenuService.currentItem || this.items.includes(this.tieredMenuService.currentItem)) {
16661
- this._tieredMenuEventService.incrementCurrentItemEvent.emit();
16662
- event.stopImmediatePropagation();
16663
- }
16664
- break;
16665
- }
16666
- };
16667
- TieredMenuComponent.prototype.ngOnInit = function () {
16668
- this.tieredMenuService.currentItems = this.items;
16669
- this._subscribeEvents();
16778
+ SidebarModule = __decorate([
16779
+ core.NgModule({
16780
+ imports: [common.CommonModule, a11y.A11yModule, sidebar.SidebarModule, scrollpanel.ScrollPanelModule, StructureModule],
16781
+ declarations: [SidebarComponent],
16782
+ exports: [StructureModule, SidebarComponent],
16783
+ })
16784
+ ], SidebarModule);
16785
+ return SidebarModule;
16786
+ }());
16787
+
16788
+ var SlidePanelService = /** @class */ (function () {
16789
+ function SlidePanelService() {
16790
+ this.modalCloseMap = new Map();
16791
+ }
16792
+ SlidePanelService.prototype.createSlidePanel = function (id) {
16793
+ var panelSubject = new rxjs.Subject();
16794
+ this.modalCloseMap.set(id, panelSubject);
16795
+ return panelSubject.asObservable();
16670
16796
  };
16671
- TieredMenuComponent.prototype.ngOnDestroy = function () {
16672
- this._unsubscribe$.next();
16673
- this._unsubscribe$.complete();
16797
+ SlidePanelService.prototype.getModalCloseObservable = function (id) {
16798
+ return this.modalCloseMap.get(id).asObservable();
16674
16799
  };
16675
- TieredMenuComponent.prototype._incrementCurItem = function () {
16676
- if (!this.tieredMenuService.currentItem) {
16677
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16678
- return;
16679
- }
16680
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
16681
- // Checking if it is the current menu.
16682
- return;
16683
- }
16684
- var currentIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) + 1;
16685
- if (currentIndex < this.tieredMenuService.currentItems.length) {
16686
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[currentIndex];
16687
- }
16688
- else {
16689
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16690
- }
16691
- if (this.tieredMenuService.currentItem.divider) {
16692
- this._incrementCurItem();
16800
+ SlidePanelService.prototype.closeModal = function (id) {
16801
+ var subject = this.modalCloseMap.get(id);
16802
+ if (subject) {
16803
+ subject.next();
16693
16804
  }
16694
16805
  };
16695
- TieredMenuComponent.prototype._decrementCurItem = function () {
16696
- if (!this.tieredMenuService.currentItem) {
16697
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[0];
16698
- return;
16699
- // Checking if it is the current menu.
16700
- }
16701
- else if (!this.items.includes(this.tieredMenuService.currentItem)) {
16702
- return;
16703
- }
16704
- var curIndex = this.tieredMenuService.currentItems.indexOf(this.tieredMenuService.currentItem) - 1;
16705
- if (curIndex >= 0) {
16706
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[curIndex];
16707
- }
16708
- else {
16709
- this.tieredMenuService.currentItem = this.tieredMenuService.currentItems[this.tieredMenuService.currentItems.length - 1];
16710
- }
16711
- if (this.tieredMenuService.currentItem.divider) {
16712
- this._decrementCurItem();
16713
- }
16806
+ SlidePanelService = __decorate([
16807
+ core.Injectable()
16808
+ ], SlidePanelService);
16809
+ return SlidePanelService;
16810
+ }());
16811
+
16812
+ var SMALL_DEVICE_BREAKPOINT = 420;
16813
+ var SlidePanelComponent = /** @class */ (function () {
16814
+ function SlidePanelComponent(slidePanelService) {
16815
+ this.slidePanelService = slidePanelService;
16816
+ this.id = "slide-panel-" + ++SlidePanelComponent_1.nextId;
16817
+ this.openIcon = "fas fa-chevron-right";
16818
+ this.closeIcon = "fas fa-chevron-left";
16819
+ this.cache = false;
16820
+ this.createOpen = false;
16821
+ this.panelOpened = new core.EventEmitter();
16822
+ this.panelClosed = new core.EventEmitter();
16823
+ this.isOpen = false;
16824
+ this.isSlideOver = false;
16825
+ this.isAnimating = false;
16826
+ this.isContentAnimationDisabled = true;
16827
+ this.slideHeight = 0;
16828
+ this.sideContentWidth = 0;
16829
+ this._unsubscribe$ = new rxjs.Subject();
16830
+ }
16831
+ SlidePanelComponent_1 = SlidePanelComponent;
16832
+ SlidePanelComponent.prototype.onResize = function () {
16833
+ this._checkOverBehavior();
16714
16834
  };
16715
- TieredMenuComponent.prototype._createMenu = function (items, position) {
16835
+ SlidePanelComponent.prototype.ngOnInit = function () {
16716
16836
  var _this = this;
16717
- if (!this._componentRef && items) {
16718
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent_1);
16719
- this._componentRef = componentFactory.create(this._injector);
16720
- this._appRef.attachView(this._componentRef.hostView);
16721
- var domElem = this._componentRef.hostView.rootNodes[0];
16722
- document.body.appendChild(domElem);
16723
- // Setting the menu items.
16724
- this._componentRef.instance.items = items;
16725
- // Subscribe menu events.
16726
- this._componentRef.instance.destroyRequest.subscribe(function (propagate) {
16727
- _this._destroy(propagate);
16728
- });
16729
- this._menuDivElement = domElem.querySelector(".menu");
16730
- this._setMenuPosition(position);
16731
- }
16732
- };
16733
- TieredMenuComponent.prototype._destroy = function (propagate) {
16734
- if (propagate === void 0) { propagate = true; }
16735
- if (this._componentRef !== null) {
16736
- this._appRef.detachView(this._componentRef.hostView);
16737
- this._componentRef.destroy();
16738
- this._componentRef = null;
16739
- this._menuDivElement = null;
16740
- }
16741
- if (propagate) {
16742
- this.destroyRequest.emit();
16743
- }
16744
- };
16745
- TieredMenuComponent.prototype._setMenuPosition = function (position) {
16746
- var _a, _b;
16747
- var ITEM_HEIGHT = 37;
16748
- var DIVIDER_HEIGHT = 5;
16749
- var PADDING = 8;
16750
- if (this._componentRef !== null) {
16751
- var top_1 = position.top, right = position.right, bottom = position.bottom, left = position.left;
16752
- var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
16753
- return !item.divider ? count + 1 : count;
16754
- }, 0);
16755
- var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
16756
- return item.divider ? count + 1 : count;
16757
- }, 0);
16758
- // I need to calculate the height of the component because the internal elements have not been created yet.
16759
- var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + 8;
16760
- var menuWidth = this._menuDivElement.getBoundingClientRect().width;
16761
- var rightFreeSpace = window.innerWidth - right;
16762
- var bottomFreeSpace = window.innerHeight - bottom;
16763
- if (rightFreeSpace > menuWidth) {
16764
- this._componentRef.instance.left = right;
16765
- }
16766
- else {
16767
- this._componentRef.instance.left = left - menuWidth;
16768
- }
16769
- if (bottomFreeSpace <= menuHeight) {
16770
- this._componentRef.instance.top = Math.max(window.innerHeight - menuHeight, window.scrollY);
16771
- }
16772
- else {
16773
- this._componentRef.instance.top = window.scrollY + top_1;
16774
- }
16775
- }
16837
+ this._checkOverBehavior();
16838
+ this.slidePanelService.createSlidePanel(this.id)
16839
+ .pipe(operators.takeUntil(this._unsubscribe$))
16840
+ .subscribe(function () {
16841
+ _this.isOpen = false;
16842
+ });
16776
16843
  };
16777
- TieredMenuComponent.prototype._subscribeEvents = function () {
16844
+ SlidePanelComponent.prototype.ngAfterViewInit = function () {
16778
16845
  var _this = this;
16779
- // Increment current item event.
16780
- this._tieredMenuEventService.incrementCurrentItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
16781
- _this._incrementCurItem();
16782
- });
16783
- // Decrement current item event.
16784
- this._tieredMenuEventService.decrementCurrentItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
16785
- _this._decrementCurItem();
16786
- });
16787
- // Select item event.
16788
- this._tieredMenuEventService.selectItemEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function (item) {
16789
- if (item.submenu) {
16790
- _this._tieredMenuEventService.openItemMenuEvent.emit(item);
16791
- }
16792
- else if (item.command) {
16793
- _this._tieredMenuEventService.closeAllMenusEvent.emit();
16794
- item.command();
16795
- }
16796
- });
16797
- // Close all menus event.
16798
- this._tieredMenuEventService.closeAllMenusEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
16799
- _this._destroy();
16800
- _this.tieredMenuService.currentItem = null;
16801
- _this.tieredMenuService.currentItems = _this.tieredMenuService.items;
16802
- _this.tieredMenuService.markAllItemsAsClosed(_this.tieredMenuService.items);
16803
- });
16804
- // Open item menu event.
16805
- this._tieredMenuEventService.openItemMenuEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function (item) {
16806
- if (_this.tieredMenuService.currentItem) {
16807
- if (_this.tieredMenuService.currentItem.parent === item) {
16808
- return;
16809
- }
16810
- if (!_this.tieredMenuService.searchTheHierarchy(_this.tieredMenuService.currentItem.parent, item)) {
16811
- var current = _this.tieredMenuService.currentItem;
16812
- current.isOpen = false;
16813
- while ((current === null || current === void 0 ? void 0 : current.parent) !== item.parent) {
16814
- _this._tieredMenuEventService.closeItemMenuEvent.emit(current);
16815
- _this._changeDetectorRef.detectChanges();
16816
- current = current.parent;
16817
- }
16818
- if (current) {
16819
- current.isOpen = false;
16820
- }
16821
- }
16822
- }
16823
- if (item.submenu && !item.isOpen && _this.items.includes(item)) {
16824
- var _a = document.querySelector("#" + item.id).getBoundingClientRect(), top_2 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
16825
- var position = { top: top_2, right: right, left: left, bottom: bottom };
16826
- _this._createMenu(item.submenu, position);
16827
- _this.tieredMenuService.currentItems = item.submenu;
16828
- _this.tieredMenuService.currentItem = item.submenu[0];
16829
- item.isOpen = true;
16846
+ queueMicrotask(function () {
16847
+ if (_this.createOpen) {
16848
+ _this.isOpen = true;
16830
16849
  }
16831
16850
  });
16832
- // Close item menu event.
16833
- this._tieredMenuEventService.closeItemMenuEvent
16834
- .pipe(operators.takeUntil(this._unsubscribe$))
16835
- .subscribe(function (item) {
16836
- var _a, _b;
16837
- if (_this.items.some(function (i) { return i.id === item.id; })) {
16838
- if (item.parent) {
16839
- item.parent.isOpen = false;
16840
- }
16841
- _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;
16842
- _this.tieredMenuService.currentItem = item.parent;
16843
- _this.destroyRequest.emit(false);
16844
- }
16851
+ };
16852
+ SlidePanelComponent.prototype.ngAfterViewChecked = function () {
16853
+ var _this = this;
16854
+ // to executed at a safe time prior to control returning to the browser's event loop
16855
+ queueMicrotask(function () {
16856
+ _this._calculateSlideHeight();
16857
+ _this._calculateSideContentWidth();
16858
+ _this.isContentAnimationDisabled = false;
16845
16859
  });
16846
16860
  };
16847
- var TieredMenuComponent_1;
16848
- TieredMenuComponent.ctorParameters = function () { return [
16849
- { type: core.ApplicationRef },
16850
- { type: core.ComponentFactoryResolver },
16851
- { type: core.Injector },
16852
- { type: core.ChangeDetectorRef },
16853
- { type: TieredMenuService },
16854
- { type: TieredMenuEventService }
16861
+ SlidePanelComponent.prototype.ngOnDestroy = function () {
16862
+ this._unsubscribe$.next();
16863
+ this._unsubscribe$.complete();
16864
+ };
16865
+ SlidePanelComponent.prototype.onClickButton = function () {
16866
+ if (this.isAnimating) {
16867
+ return;
16868
+ }
16869
+ this.isOpen = !this.isOpen;
16870
+ if (this.isOpen) {
16871
+ this.panelOpened.emit();
16872
+ }
16873
+ else {
16874
+ this.panelClosed.emit();
16875
+ }
16876
+ };
16877
+ SlidePanelComponent.prototype.onContentAnimationStart = function () {
16878
+ this.isAnimating = true;
16879
+ };
16880
+ SlidePanelComponent.prototype.onContentAnimationDone = function () {
16881
+ this.isAnimating = false;
16882
+ this._calculateSideContentWidth();
16883
+ };
16884
+ SlidePanelComponent.prototype._checkOverBehavior = function () {
16885
+ this.isSlideOver = window.innerWidth <= SMALL_DEVICE_BREAKPOINT;
16886
+ };
16887
+ SlidePanelComponent.prototype._calculateSlideHeight = function () {
16888
+ this.slideHeight = this._sideContentRef.nativeElement.clientHeight;
16889
+ };
16890
+ SlidePanelComponent.prototype._calculateSideContentWidth = function () {
16891
+ var slidePanelWidth = this._slidePanelRef.nativeElement.getBoundingClientRect().width;
16892
+ var slideContentWidth = this._slideContentRef.nativeElement.getBoundingClientRect().width;
16893
+ this.sideContentWidth = slidePanelWidth - slideContentWidth;
16894
+ };
16895
+ var SlidePanelComponent_1;
16896
+ SlidePanelComponent.nextId = 0;
16897
+ SlidePanelComponent.ctorParameters = function () { return [
16898
+ { type: SlidePanelService }
16855
16899
  ]; };
16900
+ __decorate([
16901
+ core.Input()
16902
+ ], SlidePanelComponent.prototype, "id", void 0);
16903
+ __decorate([
16904
+ core.Input()
16905
+ ], SlidePanelComponent.prototype, "openIcon", void 0);
16906
+ __decorate([
16907
+ core.Input()
16908
+ ], SlidePanelComponent.prototype, "closeIcon", void 0);
16909
+ __decorate([
16910
+ core.Input()
16911
+ ], SlidePanelComponent.prototype, "cache", void 0);
16912
+ __decorate([
16913
+ core.Input()
16914
+ ], SlidePanelComponent.prototype, "createOpen", void 0);
16856
16915
  __decorate([
16857
16916
  core.Output()
16858
- ], TieredMenuComponent.prototype, "destroyRequest", void 0);
16917
+ ], SlidePanelComponent.prototype, "panelOpened", void 0);
16859
16918
  __decorate([
16860
- core.HostListener("window:resize")
16861
- ], TieredMenuComponent.prototype, "onResize", null);
16919
+ core.Output()
16920
+ ], SlidePanelComponent.prototype, "panelClosed", void 0);
16862
16921
  __decorate([
16863
- core.HostListener("document:click", ["$event"])
16864
- ], TieredMenuComponent.prototype, "onDocumentClick", null);
16922
+ core.ViewChild("slidePanel")
16923
+ ], SlidePanelComponent.prototype, "_slidePanelRef", void 0);
16865
16924
  __decorate([
16866
- core.HostListener("document:keydown", ["$event"])
16867
- ], TieredMenuComponent.prototype, "onKeydownHandler", null);
16868
- TieredMenuComponent = TieredMenuComponent_1 = __decorate([
16925
+ core.ViewChild("slideContent")
16926
+ ], SlidePanelComponent.prototype, "_slideContentRef", void 0);
16927
+ __decorate([
16928
+ core.ViewChild("sideContent")
16929
+ ], SlidePanelComponent.prototype, "_sideContentRef", void 0);
16930
+ __decorate([
16931
+ core.HostListener("window:resize")
16932
+ ], SlidePanelComponent.prototype, "onResize", null);
16933
+ SlidePanelComponent = SlidePanelComponent_1 = __decorate([
16869
16934
  core.Component({
16870
- selector: "s-tiered-menu",
16871
- 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>",
16872
- 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}"]
16935
+ selector: "s-slide-panel",
16936
+ 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>",
16937
+ animations: [
16938
+ animations.trigger("cachelessAnimation", [
16939
+ animations.transition(":enter", [
16940
+ animations.style({ width: "0" }),
16941
+ animations.animate("200ms linear", animations.style({ width: "*" })),
16942
+ ]),
16943
+ animations.transition(":leave", [
16944
+ animations.style({ width: "*" }),
16945
+ animations.animate("200ms linear", animations.style({ width: "0" })),
16946
+ ]),
16947
+ ]),
16948
+ animations.trigger("cacheAnimation", [
16949
+ animations.state("true", animations.style({ width: "*", padding: '0 16px' })),
16950
+ animations.state("false", animations.style({ width: '0px', padding: '0' })),
16951
+ animations.transition("* => *", animations.animate("200ms")),
16952
+ ]),
16953
+ ],
16954
+ 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}"]
16873
16955
  })
16874
- ], TieredMenuComponent);
16875
- return TieredMenuComponent;
16956
+ ], SlidePanelComponent);
16957
+ return SlidePanelComponent;
16876
16958
  }());
16877
16959
 
16878
- var TieredMenuGlobalService = /** @class */ (function () {
16879
- function TieredMenuGlobalService() {
16960
+ var SlidePanelModule = /** @class */ (function () {
16961
+ function SlidePanelModule() {
16880
16962
  }
16881
- TieredMenuGlobalService = __decorate([
16882
- core.Injectable()
16883
- ], TieredMenuGlobalService);
16884
- return TieredMenuGlobalService;
16963
+ SlidePanelModule = __decorate([
16964
+ core.NgModule({
16965
+ imports: [common.CommonModule],
16966
+ declarations: [SlidePanelComponent],
16967
+ exports: [SlidePanelComponent],
16968
+ providers: [SlidePanelService],
16969
+ })
16970
+ ], SlidePanelModule);
16971
+ return SlidePanelModule;
16885
16972
  }());
16886
16973
 
16887
- var TieredMenuDirective = /** @class */ (function () {
16888
- function TieredMenuDirective(_elementRef, _appRef, _componentFactoryResolver, _injector, _tieredMenuEventService, _tieredMenuService, _tieredMenuGlobalService, _changeDetectorRef) {
16889
- this._elementRef = _elementRef;
16890
- this._appRef = _appRef;
16891
- this._componentFactoryResolver = _componentFactoryResolver;
16892
- this._injector = _injector;
16893
- this._tieredMenuEventService = _tieredMenuEventService;
16894
- this._tieredMenuService = _tieredMenuService;
16895
- this._tieredMenuGlobalService = _tieredMenuGlobalService;
16896
- this._changeDetectorRef = _changeDetectorRef;
16897
- this.items = [];
16898
- this.triggerEvent = "click";
16899
- this._componentRef = null;
16900
- this._isNested = false;
16901
- this._isOpen = false;
16902
- this._unsubscribe$ = new rxjs.Subject();
16903
- }
16904
- TieredMenuDirective.prototype.onClick = function (event) {
16905
- if (this.triggerEvent === "click" && !this._isOpen) {
16906
- this._lastActiveElement = document.activeElement;
16907
- this._createMenu();
16908
- event.preventDefault();
16909
- event.stopPropagation();
16910
- }
16911
- };
16912
- TieredMenuDirective.prototype.ngOnInit = function () {
16913
- this._subscribeEvents();
16914
- };
16915
- TieredMenuDirective.prototype.ngDoCheck = function () {
16916
- if (!this.previousItems) {
16917
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
16918
- }
16919
- var hasChanges = false;
16920
- if (this.items.length !== this.previousItems.length) {
16921
- hasChanges = true;
16922
- }
16923
- else {
16924
- for (var i = 0; i < this.items.length; i++) {
16925
- if (!this._compareItems(this.items[i], this.previousItems[i])) {
16926
- hasChanges = true;
16927
- break;
16928
- }
16929
- }
16930
- }
16931
- if (hasChanges) {
16932
- this._updateServiceItems();
16933
- this._changeDetectorRef.detectChanges();
16934
- this._rebuildMenu();
16974
+
16975
+ (function (SplitButtonType) {
16976
+ SplitButtonType["Primary"] = "primary";
16977
+ SplitButtonType["Secondary"] = "secondary";
16978
+ SplitButtonType["Default"] = "default";
16979
+ })(exports.SplitButtonType || (exports.SplitButtonType = {}));
16980
+
16981
+ var SplitButtonComponent = /** @class */ (function () {
16982
+ function SplitButtonComponent(eRef) {
16983
+ this.eRef = eRef;
16984
+ this.disabled = false;
16985
+ this.type = exports.SplitButtonType.Primary;
16986
+ this.buttonClicked = new core.EventEmitter();
16987
+ this.open = false;
16988
+ }
16989
+ SplitButtonComponent.prototype.onClickout = function (event) {
16990
+ if (!this.eRef.nativeElement.contains(event.target)) {
16991
+ this.closeDropdown();
16935
16992
  }
16936
- this.previousItems = this._tieredMenuService.cloneItems(this.items);
16937
- };
16938
- TieredMenuDirective.prototype.ngOnDestroy = function () {
16939
- this._unsubscribe$.next();
16940
- this._unsubscribe$.complete();
16941
- this._destroy();
16942
16993
  };
16943
- TieredMenuDirective.prototype._createMenu = function () {
16944
- var _a, _b, _c;
16945
- this._updateServiceItems();
16946
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16947
- (_b = this._tieredMenuGlobalService.lastInstance) === null || _b === void 0 ? void 0 : _b._destroy();
16948
- this._tieredMenuGlobalService.lastInstance = this;
16949
- (_c = this._lastActiveElement) === null || _c === void 0 ? void 0 : _c.blur();
16950
- this._isOpen = true;
16951
- this._isNested = document.body.clientWidth < 600;
16952
- this._isNested ? this._createNestedMenu() : this._createTieredMenu();
16994
+ SplitButtonComponent.prototype.onButtonClick = function () {
16995
+ if (!this.disabled) {
16996
+ this.buttonClicked.emit();
16997
+ this.closeDropdown();
16953
16998
  }
16954
16999
  };
16955
- TieredMenuDirective.prototype._createTieredMenu = function () {
16956
- var _this = this;
16957
- var _a;
16958
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16959
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuComponent);
16960
- this._componentRef = componentFactory.create(this._injector);
16961
- this._appRef.attachView(this._componentRef.hostView);
16962
- var domElem = this._componentRef.hostView.rootNodes[0];
16963
- document.body.appendChild(domElem);
16964
- this._setMenuComponentProperties();
16965
- this._componentRef.instance.destroyRequest.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
16966
- _this._destroy();
16967
- });
16968
- this._setMenuPosition();
17000
+ SplitButtonComponent.prototype.onDropdownClick = function () {
17001
+ if (!this.disabled) {
17002
+ this.open = !this.open;
16969
17003
  }
16970
17004
  };
16971
- TieredMenuDirective.prototype._createNestedMenu = function () {
16972
- var _a;
16973
- if (!this._componentRef && ((_a = this._tieredMenuService.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
16974
- var componentFactory = this._componentFactoryResolver.resolveComponentFactory(TieredMenuNestedComponent);
16975
- this._componentRef = componentFactory.create(this._injector);
16976
- this._appRef.attachView(this._componentRef.hostView);
16977
- var domElem = this._componentRef.hostView.rootNodes[0];
16978
- document.body.appendChild(domElem);
16979
- this._setMenuComponentProperties();
16980
- this._setMenuPosition();
16981
- }
17005
+ SplitButtonComponent.prototype.onOptionClick = function (option) {
17006
+ option.action && option.action();
17007
+ this.closeDropdown();
16982
17008
  };
16983
- TieredMenuDirective.prototype._destroy = function () {
16984
- if (this._componentRef) {
16985
- this._isOpen = false;
16986
- window.clearTimeout(this._showTimeout);
16987
- this._appRef.detachView(this._componentRef.hostView);
16988
- this._componentRef.destroy();
16989
- this._componentRef = null;
16990
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
16991
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
16992
- this._tieredMenuEventService.closeAllMenusEvent.emit();
16993
- }
17009
+ SplitButtonComponent.prototype.closeDropdown = function () {
17010
+ this.open = false;
16994
17011
  };
16995
- TieredMenuDirective.prototype._setMenuPosition = function () {
16996
- var _a, _b;
16997
- var ITEM_HEIGHT = 37;
16998
- var ITEM_WIDTH = 176;
16999
- var DIVIDER_HEIGHT = 5;
17000
- var PADDING = 8;
17001
- var MARGIN = 4;
17002
- if (this._componentRef !== null) {
17003
- this._componentRef.instance.top = 8;
17004
- var _c = this._elementRef.nativeElement.getBoundingClientRect(), bottom = _c.bottom, left = _c.left, right = _c.right;
17005
- var itemsCount = (_a = this._componentRef.instance.items) === null || _a === void 0 ? void 0 : _a.reduce(function (count, item) {
17006
- return !item.divider ? count + 1 : count;
17007
- }, 0);
17008
- var dividersCount = (_b = this._componentRef.instance.items) === null || _b === void 0 ? void 0 : _b.reduce(function (count, item) {
17009
- return item.divider ? count + 1 : count;
17010
- }, 0);
17011
- var menuHeight = itemsCount * ITEM_HEIGHT + dividersCount * DIVIDER_HEIGHT + PADDING + MARGIN;
17012
- var rightFreeSpace = window.innerWidth - right;
17013
- var bottomFreeSpace = window.innerHeight - bottom;
17014
- this._componentRef.instance.top = bottom;
17015
- this._componentRef.instance.left = left;
17016
- if (bottomFreeSpace <= menuHeight) {
17017
- this._componentRef.instance.top = Math.max(scrollY + bottom - menuHeight, 0);
17018
- }
17019
- else {
17020
- this._componentRef.instance.top = window.scrollY + bottom + MARGIN;
17012
+ SplitButtonComponent.ctorParameters = function () { return [
17013
+ { type: core.ElementRef }
17014
+ ]; };
17015
+ __decorate([
17016
+ core.Input()
17017
+ ], SplitButtonComponent.prototype, "disabled", void 0);
17018
+ __decorate([
17019
+ core.Input()
17020
+ ], SplitButtonComponent.prototype, "iconClass", void 0);
17021
+ __decorate([
17022
+ core.Input()
17023
+ ], SplitButtonComponent.prototype, "label", void 0);
17024
+ __decorate([
17025
+ core.Input()
17026
+ ], SplitButtonComponent.prototype, "type", void 0);
17027
+ __decorate([
17028
+ core.Input()
17029
+ ], SplitButtonComponent.prototype, "options", void 0);
17030
+ __decorate([
17031
+ core.Output()
17032
+ ], SplitButtonComponent.prototype, "buttonClicked", void 0);
17033
+ __decorate([
17034
+ core.HostListener("document:click", ["$event"])
17035
+ ], SplitButtonComponent.prototype, "onClickout", null);
17036
+ SplitButtonComponent = __decorate([
17037
+ core.Component({
17038
+ selector: "s-split-button",
17039
+ 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>",
17040
+ 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}"]
17041
+ })
17042
+ ], SplitButtonComponent);
17043
+ return SplitButtonComponent;
17044
+ }());
17045
+
17046
+ var SplitButtonModule = /** @class */ (function () {
17047
+ function SplitButtonModule() {
17048
+ }
17049
+ SplitButtonModule = __decorate([
17050
+ core.NgModule({
17051
+ imports: [common.CommonModule],
17052
+ declarations: [SplitButtonComponent],
17053
+ exports: [SplitButtonComponent],
17054
+ })
17055
+ ], SplitButtonModule);
17056
+ return SplitButtonModule;
17057
+ }());
17058
+
17059
+ var StatsCardComponent = /** @class */ (function () {
17060
+ function StatsCardComponent() {
17061
+ this.id = "s-stats-card-" + StatsCardComponent_1.nextId++;
17062
+ this.alwaysWithBorder = false;
17063
+ this.lightVersion = false;
17064
+ this.lightMode = true;
17065
+ this.iconClass = "fa fa-bar-chart";
17066
+ this.color = "#339966";
17067
+ this.animateNumbers = true;
17068
+ this.clickable = false;
17069
+ this.tooltip = "";
17070
+ this.onClick = new core.EventEmitter();
17071
+ this.ANIMATION_DURATION_MS = 200;
17072
+ this.STEP_DURATION_MS = 20;
17073
+ this.previousValue = "0";
17074
+ this._value = "0";
17075
+ }
17076
+ StatsCardComponent_1 = StatsCardComponent;
17077
+ Object.defineProperty(StatsCardComponent.prototype, "value", {
17078
+ get: function () {
17079
+ return this._value;
17080
+ },
17081
+ set: function (value) {
17082
+ this.previousValue = this._value;
17083
+ this._value = String(value);
17084
+ if (this.animateNumbers)
17085
+ this.updateDisplayValue();
17086
+ else
17087
+ this.displayValue = this.value;
17088
+ },
17089
+ enumerable: true,
17090
+ configurable: true
17091
+ });
17092
+ StatsCardComponent.prototype.updateDisplayValue = function () {
17093
+ var _this = this;
17094
+ var animationDuration = new BigNumber.BigNumber(this.ANIMATION_DURATION_MS);
17095
+ var stepDuration = new BigNumber.BigNumber(this.STEP_DURATION_MS);
17096
+ var animationCount = animationDuration.dividedBy(stepDuration);
17097
+ var previousRawValue = new BigNumber.BigNumber(this.previousValue.replace(/\D/g, ""));
17098
+ var rawValue = new BigNumber.BigNumber(this.value.replace(/\D/g, ""));
17099
+ var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(animationCount);
17100
+ var incremental = previousRawValue.isLessThan(rawValue);
17101
+ clearInterval(this.intervalId);
17102
+ this.displayValue = this.replaceNumericPositions(this.value);
17103
+ var counter = previousRawValue;
17104
+ this.intervalId = setInterval(function () {
17105
+ if (incremental && counter.isLessThan(rawValue)) {
17106
+ _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
17107
+ counter = counter.plus(incrementValue);
17021
17108
  }
17022
- if (rightFreeSpace > 176) {
17023
- this._componentRef.instance.left = window.scrollX + left;
17109
+ else if (!incremental && counter.isGreaterThan(rawValue)) {
17110
+ _this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
17111
+ counter = counter.minus(incrementValue);
17024
17112
  }
17025
17113
  else {
17026
- this._componentRef.instance.left = window.scrollX + right - ITEM_WIDTH;
17027
- }
17028
- if (this._isNested) {
17029
- this._componentRef.instance.left = MARGIN;
17114
+ _this.displayValue = _this.value;
17115
+ clearInterval(_this.intervalId);
17030
17116
  }
17031
- }
17032
- };
17033
- TieredMenuDirective.prototype._setMenuComponentProperties = function () {
17034
- if (this._componentRef != null) {
17035
- this._componentRef.instance.items = this._tieredMenuService.items;
17036
- }
17037
- };
17038
- TieredMenuDirective.prototype._subscribeEvents = function () {
17039
- var _this = this;
17040
- this._tieredMenuEventService.closeAllMenusEvent.pipe(operators.takeUntil(this._unsubscribe$)).subscribe(function () {
17041
- _this._tieredMenuService.items = _this._tieredMenuService.markAllItemsAsClosed(_this._tieredMenuService.items);
17042
- _this._destroy();
17043
- });
17044
- };
17045
- TieredMenuDirective.prototype._compareItems = function (item1, item2) {
17046
- return JSON.stringify(item1) === JSON.stringify(item2);
17047
- };
17048
- TieredMenuDirective.prototype._rebuildMenu = function () {
17049
- this._destroy();
17117
+ }, this.STEP_DURATION_MS);
17050
17118
  };
17051
- TieredMenuDirective.prototype._updateServiceItems = function () {
17052
- this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
17053
- this._tieredMenuService.currentItems = this._tieredMenuService.items;
17054
- this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
17119
+ StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
17120
+ var rawValue = value.replace(/[^\d]/g, "");
17121
+ var newValueString = newValue ? newValue.toString() : "";
17122
+ var formattedNewValue = newValueString
17123
+ .toString()
17124
+ .replace(/\D/g, "")
17125
+ .padStart(rawValue.length, "0");
17126
+ var newValueIndex = 0;
17127
+ return value
17128
+ .split("")
17129
+ .map(function (char) {
17130
+ var number = Number(char);
17131
+ if (number || char === "0")
17132
+ return formattedNewValue[newValueIndex++];
17133
+ return char;
17134
+ })
17135
+ .join("");
17055
17136
  };
17056
- TieredMenuDirective.ctorParameters = function () { return [
17057
- { type: core.ElementRef },
17058
- { type: core.ApplicationRef },
17059
- { type: core.ComponentFactoryResolver },
17060
- { type: core.Injector },
17061
- { type: TieredMenuEventService },
17062
- { type: TieredMenuService },
17063
- { type: TieredMenuGlobalService },
17064
- { type: core.ChangeDetectorRef }
17065
- ]; };
17137
+ var StatsCardComponent_1;
17138
+ StatsCardComponent.nextId = 0;
17066
17139
  __decorate([
17067
17140
  core.Input()
17068
- ], TieredMenuDirective.prototype, "items", void 0);
17141
+ ], StatsCardComponent.prototype, "id", void 0);
17069
17142
  __decorate([
17070
17143
  core.Input()
17071
- ], TieredMenuDirective.prototype, "triggerEvent", void 0);
17144
+ ], StatsCardComponent.prototype, "label", void 0);
17072
17145
  __decorate([
17073
- core.HostListener("click", ["$event"])
17074
- ], TieredMenuDirective.prototype, "onClick", null);
17075
- TieredMenuDirective = __decorate([
17076
- core.Directive({
17077
- selector: "[sTieredMenu]",
17078
- providers: [TieredMenuEventService, TieredMenuService],
17146
+ core.Input()
17147
+ ], StatsCardComponent.prototype, "alwaysWithBorder", void 0);
17148
+ __decorate([
17149
+ core.Input()
17150
+ ], StatsCardComponent.prototype, "lightVersion", void 0);
17151
+ __decorate([
17152
+ core.Input()
17153
+ ], StatsCardComponent.prototype, "lightMode", void 0);
17154
+ __decorate([
17155
+ core.Input()
17156
+ ], StatsCardComponent.prototype, "iconClass", void 0);
17157
+ __decorate([
17158
+ core.Input()
17159
+ ], StatsCardComponent.prototype, "color", void 0);
17160
+ __decorate([
17161
+ core.Input()
17162
+ ], StatsCardComponent.prototype, "animateNumbers", void 0);
17163
+ __decorate([
17164
+ core.Input()
17165
+ ], StatsCardComponent.prototype, "clickable", void 0);
17166
+ __decorate([
17167
+ core.Input()
17168
+ ], StatsCardComponent.prototype, "value", null);
17169
+ __decorate([
17170
+ core.Input()
17171
+ ], StatsCardComponent.prototype, "tooltip", void 0);
17172
+ __decorate([
17173
+ core.Output()
17174
+ ], StatsCardComponent.prototype, "onClick", void 0);
17175
+ StatsCardComponent = StatsCardComponent_1 = __decorate([
17176
+ core.Component({
17177
+ selector: "s-stats-card",
17178
+ 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",
17179
+ encapsulation: core.ViewEncapsulation.None,
17180
+ 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}}"]
17079
17181
  })
17080
- ], TieredMenuDirective);
17081
- return TieredMenuDirective;
17182
+ ], StatsCardComponent);
17183
+ return StatsCardComponent;
17082
17184
  }());
17083
17185
 
17084
- var TieredMenuDividerComponent = /** @class */ (function () {
17085
- function TieredMenuDividerComponent() {
17186
+ var StatsCardModule = /** @class */ (function () {
17187
+ function StatsCardModule() {
17086
17188
  }
17087
- TieredMenuDividerComponent = __decorate([
17088
- core.Component({
17089
- selector: "s-tiered-menu-divider",
17090
- template: "<div class=\"divider\"></div>",
17091
- styles: [".divider{margin:2px 0;height:1px;background-color:#ccc}"]
17189
+ StatsCardModule = __decorate([
17190
+ core.NgModule({
17191
+ imports: [
17192
+ common.CommonModule,
17193
+ tooltip.TooltipModule,
17194
+ ],
17195
+ declarations: [
17196
+ StatsCardComponent,
17197
+ ],
17198
+ exports: [
17199
+ StatsCardComponent,
17200
+ ],
17092
17201
  })
17093
- ], TieredMenuDividerComponent);
17094
- return TieredMenuDividerComponent;
17202
+ ], StatsCardModule);
17203
+ return StatsCardModule;
17095
17204
  }());
17096
17205
 
17097
- var TieredMenuItemComponent = /** @class */ (function () {
17098
- function TieredMenuItemComponent(_tieredMenuEventService) {
17099
- this._tieredMenuEventService = _tieredMenuEventService;
17100
- this.focused = false;
17101
- this.highlight = false;
17102
- this.triggerEvent = "click";
17103
- this.closeOnClick = false;
17206
+
17207
+ (function (StepState) {
17208
+ StepState["Default"] = "default";
17209
+ StepState["Success"] = "success";
17210
+ StepState["Warning"] = "warning";
17211
+ })(exports.StepState || (exports.StepState = {}));
17212
+ var StepsComponent = /** @class */ (function () {
17213
+ function StepsComponent() {
17214
+ this.id = "s-steps-" + StepsComponent_1.nextId++;
17215
+ this.activeIndex = 0;
17216
+ this.stepSelected = new core.EventEmitter();
17104
17217
  }
17105
- TieredMenuItemComponent.prototype.onClick = function () {
17106
- if (this.item.disabled)
17218
+ StepsComponent_1 = StepsComponent;
17219
+ StepsComponent.prototype.stepClick = function (step, index, event) {
17220
+ if (step.disabled || index == this.activeIndex)
17107
17221
  return;
17108
- if (this.item.submenu) {
17109
- if (!this.item.isOpen) {
17110
- this._tieredMenuEventService.openItemMenuEvent.emit(this.item);
17111
- }
17112
- else if (this.closeOnClick) {
17113
- this._tieredMenuEventService.closeItemMenuEvent.emit(this.item);
17114
- }
17115
- }
17116
- else {
17117
- this._tieredMenuEventService.selectItemEvent.emit(this.item);
17118
- }
17222
+ this.stepSelected.emit({ step: step, index: index, event: event });
17119
17223
  };
17120
- TieredMenuItemComponent.prototype.onMouseEnter = function () {
17121
- var _this = this;
17122
- if (this.item.disabled)
17123
- return;
17124
- if (this.triggerEvent === "hover" && !this.item.isOpen) {
17125
- this._showTimeout = window.setTimeout(function () {
17126
- _this._tieredMenuEventService.openItemMenuEvent.emit(_this.item);
17127
- }, 300);
17128
- }
17224
+ Object.defineProperty(StepsComponent.prototype, "stepState", {
17225
+ get: function () {
17226
+ return exports.StepState;
17227
+ },
17228
+ enumerable: true,
17229
+ configurable: true
17230
+ });
17231
+ StepsComponent.prototype.barAnimation = function (index, activeIndex) {
17232
+ var visited = index < activeIndex;
17233
+ var activated = index === activeIndex;
17234
+ return visited || activated;
17129
17235
  };
17130
- TieredMenuItemComponent.prototype.onMouseLeave = function () {
17131
- window.clearTimeout(this._showTimeout);
17236
+ StepsComponent.prototype.afterBarAnimation = function (index, activeIndex) {
17237
+ var visited = index < activeIndex;
17238
+ var activated = index === activeIndex - 1;
17239
+ return visited || activated;
17132
17240
  };
17133
- TieredMenuItemComponent.ctorParameters = function () { return [
17134
- { type: TieredMenuEventService }
17135
- ]; };
17136
- __decorate([
17137
- core.Input()
17138
- ], TieredMenuItemComponent.prototype, "item", void 0);
17139
- __decorate([
17140
- core.Input()
17141
- ], TieredMenuItemComponent.prototype, "focused", void 0);
17241
+ Object.defineProperty(StepsComponent.prototype, "visibledStep", {
17242
+ get: function () {
17243
+ return this.steps.filter(function (step) { return !step.hidden; });
17244
+ },
17245
+ enumerable: true,
17246
+ configurable: true
17247
+ });
17248
+ var StepsComponent_1;
17249
+ StepsComponent.nextId = 0;
17142
17250
  __decorate([
17143
17251
  core.Input()
17144
- ], TieredMenuItemComponent.prototype, "highlight", void 0);
17252
+ ], StepsComponent.prototype, "id", void 0);
17145
17253
  __decorate([
17146
17254
  core.Input()
17147
- ], TieredMenuItemComponent.prototype, "triggerEvent", void 0);
17255
+ ], StepsComponent.prototype, "steps", void 0);
17148
17256
  __decorate([
17149
17257
  core.Input()
17150
- ], TieredMenuItemComponent.prototype, "closeOnClick", void 0);
17151
- __decorate([
17152
- core.HostListener("click"),
17153
- core.HostListener("touchend")
17154
- ], TieredMenuItemComponent.prototype, "onClick", null);
17155
- __decorate([
17156
- core.HostListener("mouseenter")
17157
- ], TieredMenuItemComponent.prototype, "onMouseEnter", null);
17258
+ ], StepsComponent.prototype, "activeIndex", void 0);
17158
17259
  __decorate([
17159
- core.HostListener("mouseleave")
17160
- ], TieredMenuItemComponent.prototype, "onMouseLeave", null);
17161
- TieredMenuItemComponent = __decorate([
17260
+ core.Output()
17261
+ ], StepsComponent.prototype, "stepSelected", void 0);
17262
+ StepsComponent = StepsComponent_1 = __decorate([
17162
17263
  core.Component({
17163
- selector: "s-tiered-menu-item",
17164
- 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>",
17165
- 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}"]
17264
+ selector: "s-steps",
17265
+ 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",
17266
+ host: {
17267
+ "aria-orientation": "horizontal",
17268
+ role: "tablist",
17269
+ "tab-index": "0",
17270
+ },
17271
+ animations: [
17272
+ animations.trigger("beforeActiveDesative", [
17273
+ animations.state("active", animations.style({
17274
+ "background-position": "left bottom",
17275
+ })),
17276
+ animations.state("desactive", animations.style({
17277
+ "background-position": "right bottom",
17278
+ })),
17279
+ animations.transition("active => desactive", [animations.animate("50ms 100ms linear")]),
17280
+ animations.transition("desactive => active", [animations.animate("50ms 250ms linear")]),
17281
+ ]),
17282
+ animations.trigger("activeDesative", [
17283
+ animations.state("active", animations.style({
17284
+ "background-position": "left bottom",
17285
+ })),
17286
+ animations.state("desactive", animations.style({
17287
+ "background-position": "right bottom",
17288
+ })),
17289
+ animations.transition("active => desactive", [animations.animate("100ms 150ms linear")]),
17290
+ animations.transition("desactive => active", [animations.animate("100ms 150ms linear")]),
17291
+ ]),
17292
+ animations.trigger("afterActiveDesative", [
17293
+ animations.state("active", animations.style({
17294
+ "background-position": "left bottom",
17295
+ })),
17296
+ animations.state("desactive", animations.style({
17297
+ "background-position": "right bottom",
17298
+ })),
17299
+ animations.transition("active => desactive", [animations.animate("50ms 250ms linear")]),
17300
+ animations.transition("desactive => active", [animations.animate("50ms 100ms linear")]),
17301
+ ]),
17302
+ ],
17303
+ 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}}"]
17166
17304
  })
17167
- ], TieredMenuItemComponent);
17168
- return TieredMenuItemComponent;
17305
+ ], StepsComponent);
17306
+ return StepsComponent;
17169
17307
  }());
17170
17308
 
17171
- var TieredMenuModule = /** @class */ (function () {
17172
- function TieredMenuModule() {
17309
+ var StepsModule = /** @class */ (function () {
17310
+ function StepsModule() {
17173
17311
  }
17174
- TieredMenuModule = __decorate([
17312
+ StepsModule = __decorate([
17175
17313
  core.NgModule({
17176
- imports: [
17177
- common.CommonModule,
17178
- ],
17179
- declarations: [
17180
- TieredMenuDirective,
17181
- TieredMenuComponent,
17182
- TieredMenuNestedComponent,
17183
- TieredMenuItemComponent,
17184
- TieredMenuDividerComponent,
17185
- ],
17186
- exports: [TieredMenuDirective],
17187
- providers: [TieredMenuGlobalService],
17314
+ imports: [common.CommonModule, tooltip.TooltipModule],
17315
+ declarations: [StepsComponent],
17316
+ exports: [StepsComponent],
17188
17317
  })
17189
- ], TieredMenuModule);
17190
- return TieredMenuModule;
17318
+ ], StepsModule);
17319
+ return StepsModule;
17191
17320
  }());
17192
17321
 
17193
17322
  var TileComponent = /** @class */ (function () {
@@ -18240,6 +18369,8 @@
18240
18369
  exports.MaskFormatterModule = MaskFormatterModule;
18241
18370
  exports.MaskFormatterPipe = MaskFormatterPipe;
18242
18371
  exports.MouseEventsModule = MouseEventsModule;
18372
+ exports.NavigationButtonComponent = NavigationButtonComponent;
18373
+ exports.NavigationButtonModule = NavigationButtonModule;
18243
18374
  exports.NavigationDirective = NavigationDirective;
18244
18375
  exports.NumberField = NumberField;
18245
18376
  exports.NumberInputDirective = NumberInputDirective;
@@ -18361,20 +18492,20 @@
18361
18492
  exports.ɵct = KanbanColumnComponent;
18362
18493
  exports.ɵcu = KanbanItemDraggingComponent;
18363
18494
  exports.ɵcv = NumberLocaleOptions;
18364
- exports.ɵcw = BorderButtonModule;
18365
- exports.ɵcx = BorderButtonComponent;
18366
- exports.ɵcy = ProgressBarDeterminateComponent;
18367
- exports.ɵcz = ProgressBarIndeterminateComponent;
18495
+ exports.ɵcw = TieredMenuEventService;
18496
+ exports.ɵcx = TieredMenuService;
18497
+ exports.ɵcy = TieredMenuGlobalService;
18498
+ exports.ɵcz = TieredMenuComponent;
18368
18499
  exports.ɵd = TemplateModule;
18369
- exports.ɵda = SelectButtonItemComponent;
18370
- exports.ɵdb = SlidePanelService;
18371
- exports.ɵdc = TieredMenuEventService;
18372
- exports.ɵdd = TieredMenuService;
18373
- exports.ɵde = TieredMenuGlobalService;
18374
- exports.ɵdf = TieredMenuComponent;
18375
- exports.ɵdg = TieredMenuNestedComponent;
18376
- exports.ɵdh = TieredMenuItemComponent;
18377
- exports.ɵdi = TieredMenuDividerComponent;
18500
+ exports.ɵda = TieredMenuNestedComponent;
18501
+ exports.ɵdb = TieredMenuItemComponent;
18502
+ exports.ɵdc = TieredMenuDividerComponent;
18503
+ exports.ɵdd = BorderButtonModule;
18504
+ exports.ɵde = BorderButtonComponent;
18505
+ exports.ɵdf = ProgressBarDeterminateComponent;
18506
+ exports.ɵdg = ProgressBarIndeterminateComponent;
18507
+ exports.ɵdh = SelectButtonItemComponent;
18508
+ exports.ɵdi = SlidePanelService;
18378
18509
  exports.ɵdj = TimelineItemModule;
18379
18510
  exports.ɵdk = TimelineIconItemComponent;
18380
18511
  exports.ɵdl = HorizontalTimelineModule;