@seniorsistemas/angular-components 17.8.9 → 17.8.11

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