@gipisistemas/ng-core 1.1.4 → 1.1.5

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 (30) hide show
  1. package/bundles/gipisistemas-ng-core.umd.js +297 -7
  2. package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
  3. package/bundles/gipisistemas-ng-core.umd.min.js +7 -7
  4. package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
  5. package/core/utils/string.util.d.ts +4 -0
  6. package/esm2015/core/utils/string.util.js +27 -1
  7. package/esm2015/gipi-components.js +2 -1
  8. package/esm2015/shared/components/select-entity-paged/shared/select-search/select-search.component.js +2 -2
  9. package/esm2015/shared/gipi-components/button/button.component.js +18 -2
  10. package/esm2015/shared/gipi-components/input-select-paged/input-search/input-search.component.js +2 -2
  11. package/esm2015/shared/gipi-components/popover/shared/popover-trigger.js +4 -4
  12. package/esm2015/shared/gipi-components/split-button/split-button.component.js +243 -0
  13. package/esm2015/shared/shared.module.js +3 -1
  14. package/esm5/core/utils/string.util.js +27 -1
  15. package/esm5/gipi-components.js +2 -1
  16. package/esm5/shared/components/select-entity-paged/shared/select-search/select-search.component.js +2 -2
  17. package/esm5/shared/gipi-components/button/button.component.js +22 -2
  18. package/esm5/shared/gipi-components/input-select-paged/input-search/input-search.component.js +2 -2
  19. package/esm5/shared/gipi-components/popover/shared/popover-trigger.js +4 -4
  20. package/esm5/shared/gipi-components/split-button/split-button.component.js +249 -0
  21. package/esm5/shared/shared.module.js +3 -1
  22. package/fesm2015/gipisistemas-ng-core.js +288 -9
  23. package/fesm2015/gipisistemas-ng-core.js.map +1 -1
  24. package/fesm5/gipisistemas-ng-core.js +297 -8
  25. package/fesm5/gipisistemas-ng-core.js.map +1 -1
  26. package/gipi-components.d.ts +1 -0
  27. package/gipisistemas-ng-core.metadata.json +1 -1
  28. package/package.json +1 -1
  29. package/shared/gipi-components/button/button.component.d.ts +14 -0
  30. package/shared/gipi-components/split-button/split-button.component.d.ts +60 -0
@@ -720,6 +720,32 @@
720
720
  StringUtil.truncateWithEllipses = function (text, max) {
721
721
  return text.trim().substring(0, max - 1) + (text.trim().length > max) ? '...' : '';
722
722
  };
723
+ /** Codifica a string em Base64 */
724
+ StringUtil.encodeBase64 = function (input) {
725
+ if (this.isEmpty(input)) {
726
+ return '';
727
+ }
728
+ var utf8Encoder = new TextEncoder();
729
+ var utf8Bytes = utf8Encoder.encode(input);
730
+ var binary = '';
731
+ utf8Bytes.forEach(function (byte) {
732
+ binary += String.fromCharCode(byte);
733
+ });
734
+ return btoa(binary);
735
+ };
736
+ /** Decodifica a string Base64 */
737
+ StringUtil.decodeBase64 = function (input) {
738
+ if (this.isEmpty(input)) {
739
+ return '';
740
+ }
741
+ var binary = atob(input);
742
+ var utf8Decoder = new TextDecoder();
743
+ var utf8Bytes = new Uint8Array(binary.length);
744
+ for (var i = 0; i < binary.length; i++) {
745
+ utf8Bytes[i] = binary.charCodeAt(i);
746
+ }
747
+ return utf8Decoder.decode(utf8Bytes);
748
+ };
723
749
  StringUtil.EMPTY = '';
724
750
  return StringUtil;
725
751
  }());
@@ -4303,7 +4329,7 @@
4303
4329
  SelectSearchComponent = SelectSearchComponent_1 = __decorate([
4304
4330
  core.Component({
4305
4331
  selector: 'itss-input-search',
4306
- template: "<!-- Espa\u00E7o reservado para ajustar o deslocamento vertical dos elementos mat-option -->\n<input matInput\n class=\"mat-select-search-input mat-select-search-hidden\" />\n\n<!-- Note: o mat-datepicker-content mat-tab-header \u00E9 necess\u00E1rio para herdar as cores do tema do material, consulte PR n\u00BA 22 -->\n<div #innerSelectSearch\n class=\"mat-select-search-inner mat-typography mat-datepicker-content mat-tab-header\"\n [ngClass]=\"{'mat-select-search-inner-multiple': matSelect.multiple, 'mat-select-search-inner-toggle-all': _isToggleAllCheckboxVisible() }\">\n\n <mat-checkbox *ngIf=\"_isToggleAllCheckboxVisible()\"\n class=\"mat-select-search-toggle-all-checkbox\"\n color=\"primary\"\n [color]=\"matFormField?.color\"\n [disabled]=\"searching\"\n [matTooltip]=\"toggleAllCheckboxTooltipMessage\"\n matTooltipClass=\"ngx-mat-select-search-toggle-all-tooltip\"\n [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition\"\n [(ngModel)]=\"toggleAllCheckboxChecked\"\n [(indeterminate)]=\"toggleAllCheckboxIndeterminate\">\n </mat-checkbox>\n\n <input class=\"mat-select-search-input mat-input-element\"\n autocomplete=\"off\"\n [type]=\"type\"\n [formControl]=\"_formControl\"\n #searchSelectInput\n (keydown)=\"_handleKeydown($event)\"\n (keyup)=\"_handleKeyup($event)\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholderLabel\"\n [attr.aria-label]=\"ariaLabel\">\n\n <mat-spinner *ngIf=\"searching\"\n class=\"mat-select-search-spinner\"\n diameter=\"16\">\n </mat-spinner>\n\n <button *ngIf=\"!hideClearSearchButton && value && !searching\"\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"_reset(true)\"\n class=\"mat-select-search-clear\">\n <ng-content *ngIf=\"clearIcon; else defaultIcon\"\n select=\"[itssSelectSearchClear]\">\n </ng-content>\n\n <ng-template #defaultIcon>\n <mat-icon [svgIcon]=\"closeSvgIcon\">\n {{ !closeSvgIcon ? closeIcon : null }}\n </mat-icon>\n </ng-template>\n </button>\n\n <ng-content select=\".mat-select-search-custom-header-content\"> </ng-content>\n\n <mat-divider> </mat-divider>\n</div>\n\n<div *ngIf=\"(_showNoEntriesFound$ | async) && !searching\"\n class=\"mat-select-search-no-entries-found\">\n <ng-content *ngIf=\"noEntriesFound; else defaultNoEntriesFound\"\n select=\"[itssSelectNoEntriesFound]\">\n </ng-content>\n\n <ng-template #defaultNoEntriesFound>\n {{ noEntriesFoundLabel }}\n </ng-template>\n</div>\n",
4332
+ template: "<!-- Espa\u00E7o reservado para ajustar o deslocamento vertical dos elementos mat-option -->\n<input matInput\n class=\"mat-select-search-input mat-select-search-hidden\" />\n\n<!-- Note: o mat-datepicker-content mat-tab-header \u00E9 necess\u00E1rio para herdar as cores do tema do material, consulte PR n\u00BA 22 -->\n<div #innerSelectSearch\n class=\"mat-select-search-inner mat-typography mat-datepicker-content mat-tab-header\"\n [ngClass]=\"{'mat-select-search-inner-multiple': matSelect.multiple, 'mat-select-search-inner-toggle-all': _isToggleAllCheckboxVisible() }\">\n\n <mat-checkbox *ngIf=\"_isToggleAllCheckboxVisible()\"\n class=\"mat-select-search-toggle-all-checkbox\"\n color=\"primary\"\n [color]=\"matFormField?.color\"\n [disabled]=\"searching\"\n [matTooltip]=\"toggleAllCheckboxTooltipMessage\"\n matTooltipClass=\"ngx-mat-select-search-toggle-all-tooltip\"\n [matTooltipPosition]=\"toggleAllCheckboxTooltipPosition\"\n [(ngModel)]=\"toggleAllCheckboxChecked\"\n [(indeterminate)]=\"toggleAllCheckboxIndeterminate\">\n </mat-checkbox>\n\n <input class=\"mat-select-search-input mat-input-element\"\n autocomplete=\"off\"\n [type]=\"type\"\n [formControl]=\"_formControl\"\n #searchSelectInput\n (keydown)=\"_handleKeydown($event)\"\n (keyup)=\"_handleKeyup($event)\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholderLabel\"\n [attr.aria-label]=\"ariaLabel\"\n aria-hidden=\"false\">\n\n <mat-spinner *ngIf=\"searching\"\n class=\"mat-select-search-spinner\"\n diameter=\"16\">\n </mat-spinner>\n\n <button *ngIf=\"!hideClearSearchButton && value && !searching\"\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"_reset(true)\"\n class=\"mat-select-search-clear\">\n <ng-content *ngIf=\"clearIcon; else defaultIcon\"\n select=\"[itssSelectSearchClear]\">\n </ng-content>\n\n <ng-template #defaultIcon>\n <mat-icon [svgIcon]=\"closeSvgIcon\">\n {{ !closeSvgIcon ? closeIcon : null }}\n </mat-icon>\n </ng-template>\n </button>\n\n <ng-content select=\".mat-select-search-custom-header-content\"> </ng-content>\n\n <mat-divider> </mat-divider>\n</div>\n\n<div *ngIf=\"(_showNoEntriesFound$ | async) && !searching\"\n class=\"mat-select-search-no-entries-found\">\n <ng-content *ngIf=\"noEntriesFound; else defaultNoEntriesFound\"\n select=\"[itssSelectNoEntriesFound]\">\n </ng-content>\n\n <ng-template #defaultNoEntriesFound>\n {{ noEntriesFoundLabel }}\n </ng-template>\n</div>",
4307
4333
  providers: [
4308
4334
  {
4309
4335
  provide: forms.NG_VALUE_ACCESSOR,
@@ -8553,7 +8579,7 @@
8553
8579
  var _this = this;
8554
8580
  if (this._overlayRef) {
8555
8581
  /** Only subscribe to backdrop if trigger event is click */
8556
- if (this.triggerEvent === 'click' && this.backdropCloseOnClick === true) {
8582
+ if (this.triggerEvent !== 'hover' && this.backdropCloseOnClick) {
8557
8583
  this._overlayRef.backdropClick()
8558
8584
  .pipe(operators.takeUntil(this.popoverClosed), operators.takeUntil(this._onDestroy))
8559
8585
  .subscribe(function () {
@@ -8637,8 +8663,8 @@
8637
8663
  GIPIPopoverTrigger.prototype._getOverlayConfig = function () {
8638
8664
  var overlayState = new overlay.OverlayConfig();
8639
8665
  overlayState.positionStrategy = this._getPosition();
8640
- /** Display overlay backdrop if trigger event is click */
8641
- if (this.triggerEvent === 'click') {
8666
+ /** Display overlay backdrop if trigger event is different of hover */
8667
+ if (this.triggerEvent !== 'hover') {
8642
8668
  overlayState.hasBackdrop = true;
8643
8669
  overlayState.backdropClass = 'cdk-overlay-transparent-backdrop';
8644
8670
  }
@@ -8927,6 +8953,26 @@
8927
8953
  this.onBlur = new core.EventEmitter(true);
8928
8954
  }
8929
8955
  GIPIButtonComponent_1 = GIPIButtonComponent;
8956
+ Object.defineProperty(GIPIButtonComponent.prototype, "internalButtonClass", {
8957
+ get: function () {
8958
+ return {
8959
+ 'button-base': true,
8960
+ 'button-primary': (this.isButtonPrimary || this.isButtonPrimaryIcon),
8961
+ 'button-primary-icon': this.isButtonPrimaryIcon,
8962
+ 'button-secondary': (this.isButtonSecondary || this.isButtonSecondaryIcon),
8963
+ 'button-secondary-icon': this.isButtonSecondaryIcon,
8964
+ 'button-tertiary': (this.isButtonTertiary || this.isButtonTertiaryIcon),
8965
+ 'button-tertiary-icon': this.isButtonTertiaryIcon,
8966
+ 'button-link': this.isButtonLink,
8967
+ 'button-only-icon': this.isButtonIcon,
8968
+ 'button-for-input': this.isForInput,
8969
+ 'button-notification': this.notification,
8970
+ 'button-action': this.isButtonAction
8971
+ };
8972
+ },
8973
+ enumerable: false,
8974
+ configurable: true
8975
+ });
8930
8976
  GIPIButtonComponent.prototype.ngOnInit = function () { };
8931
8977
  GIPIButtonComponent.prototype.ngOnDestroy = function () {
8932
8978
  if (this.popoverTrigger) {
@@ -9126,7 +9172,7 @@
9126
9172
  core.Component({
9127
9173
  selector: "gipi-button[gipi-primary], gipi-button[gipi-primary-icon], gipi-button[gipi-secondary], gipi-button[gipi-secondary-icon],\n gipi-button[gipi-tertiary], gipi-button[gipi-link], gipi-button[gipi-icon], gipi-button[gipi-action]",
9128
9174
  exportAs: 'gipiButton',
9129
- template: "<button [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [matTooltip]=\"tooltip\"\n role=\"button\"\n [class]=\"buttonClass\"\n [ngClass]=\"{'button-base': true,\n 'button-primary': (isButtonPrimary || isButtonPrimaryIcon),\n 'button-primary-icon': isButtonPrimaryIcon,\n 'button-secondary': (isButtonSecondary || isButtonSecondaryIcon),\n 'button-secondary-icon': isButtonSecondaryIcon,\n 'button-tertiary': (isButtonTertiary || isButtonTertiaryIcon),\n 'button-tertiary-icon': isButtonTertiaryIcon,\n 'button-link': isButtonLink,\n 'button-only-icon': isButtonIcon,\n 'button-for-input': isForInput,\n 'button-notification': notification,\n 'button-action': isButtonAction}\"\n [style.padding.px]=\"buttonPadding\"\n #popoverTrigger=\"popoverTrigger\"\n [popoverTriggerFor]=\"btnPopover\"\n [popoverTriggerOn]=\"popover ? 'click' : 'none'\"\n [popoverBackdropCloseOnClick]=\"true\"\n (opened)=\"onOpenPopover.emit()\"\n (closed)=\"onClosePopover.emit()\"\n (click)=\"handleClick($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\">\n\n <span [ngClass]=\"{'button-content': true,\n 'button-disabled': disabled,\n 'button-icon-left': ((iconPos === 'left') && label),\n 'button-icon-right': ((iconPos === 'right') && label),\n 'button-icon-top': ((iconPos === 'top') && label),\n 'button-icon-bottom': ((iconPos === 'bottom') && label),\n 'button-icon-center': (iconPos === 'center')}\">\n\n <mat-icon *ngIf=\"svgIcon || icon\"\n [svgIcon]=\"svgIcon\"\n [style.width.px]=\"iconWidth\"\n [style.height.px]=\"iconHeight\"\n [style.font-size.px]=\"iconWidth || iconHeight\">\n {{ (!svgIcon && icon) ? icon : '' }}\n </mat-icon>\n\n <span class=\"button-label\"\n [attr.aria-hidden]=\"(icon || svgIcon) && !label\"\n *ngIf=\"!isButtonIcon && label\">\n {{ label }}\n </span>\n </span>\n\n</button>\n<gipi-overlay *ngIf=\"overlay && !popover\"\n [(visible)]=\"_overlayVisible\"\n [appendTo]=\"'body'\"\n (onShow)=\"onShowOverlay.emit()\">\n <ng-content> </ng-content>\n</gipi-overlay>\n\n<gipi-popover #btnPopover=\"gipiPopover\"\n [popoverOverlapTrigger]=\"false\"\n [popoverCloseOnClick]=\"false\"\n [popoverArrowWidth]=\"0\"\n [popoverOffsetY]=\"3\"\n [fxHide]=\"!popover\">\n <div class=\"btn-popover-content\">\n <ng-content> </ng-content>\n </div>\n</gipi-popover>",
9175
+ template: "<button [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [matTooltip]=\"tooltip\"\n role=\"button\"\n [class]=\"buttonClass\"\n [ngClass]=\"internalButtonClass\"\n [style.padding.px]=\"buttonPadding\"\n #popoverTrigger=\"popoverTrigger\"\n [popoverTriggerFor]=\"btnPopover\"\n [popoverTriggerOn]=\"popover ? 'click' : 'none'\"\n [popoverBackdropCloseOnClick]=\"true\"\n (opened)=\"onOpenPopover.emit()\"\n (closed)=\"onClosePopover.emit()\"\n (click)=\"handleClick($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\">\n <span [ngClass]=\"{'button-content': true,\n 'button-disabled': disabled,\n 'button-icon-left': ((iconPos === 'left') && label),\n 'button-icon-right': ((iconPos === 'right') && label),\n 'button-icon-top': ((iconPos === 'top') && label),\n 'button-icon-bottom': ((iconPos === 'bottom') && label),\n 'button-icon-center': (iconPos === 'center')}\">\n <mat-icon *ngIf=\"svgIcon || icon\"\n [svgIcon]=\"svgIcon\"\n [style.width.px]=\"iconWidth\"\n [style.height.px]=\"iconHeight\"\n [style.font-size.px]=\"iconWidth || iconHeight\">\n {{ (!svgIcon && icon) ? icon : '' }}\n </mat-icon>\n\n <span class=\"button-label\"\n [attr.aria-hidden]=\"(icon || svgIcon) && !label\"\n *ngIf=\"!isButtonIcon && label\">\n {{ label }}\n </span>\n </span>\n</button>\n\n<gipi-overlay *ngIf=\"overlay && !popover\"\n [(visible)]=\"_overlayVisible\"\n [appendTo]=\"'body'\"\n (onShow)=\"onShowOverlay.emit()\">\n <ng-content> </ng-content>\n</gipi-overlay>\n\n<gipi-popover #btnPopover=\"gipiPopover\"\n [popoverOverlapTrigger]=\"false\"\n [popoverCloseOnClick]=\"false\"\n [popoverArrowWidth]=\"0\"\n [popoverOffsetY]=\"3\"\n [fxHide]=\"!popover\">\n <div class=\"btn-popover-content\">\n <ng-content> </ng-content>\n </div>\n</gipi-popover>",
9130
9176
  providers: [
9131
9177
  {
9132
9178
  provide: forms.NG_VALUE_ACCESSOR,
@@ -13685,7 +13731,7 @@
13685
13731
  core.Component({
13686
13732
  selector: "gipi-input-search",
13687
13733
  exportAs: 'gipiInputSearch',
13688
- template: "<!-- Espa\u00E7o reservado para ajustar o deslocamento vertical dos elementos mat-option -->\n<input matInput\n class=\"mat-select-search-input mat-select-search-hidden\" />\n\n<!-- Note: o mat-datepicker-content mat-tab-header \u00E9 necess\u00E1rio para herdar as cores do tema do material, consulte PR n\u00BA 22 -->\n<div #innerSelectSearch\n class=\"mat-select-search-inner mat-typography mat-datepicker-content mat-tab-header\">\n\n <input class=\"mat-select-search-input mat-input-element\"\n aria-label=\"Pesquisa suspensa\"\n autocomplete=\"off\"\n type=\"text\"\n #searchSelectInput\n [placeholder]=\"placeholderLabel\"\n [formControl]=\"_formControl\"\n (keydown)=\"_handleKeydown($event)\"\n (keyup)=\"_handleKeyup($event)\"\n (blur)=\"onBlur()\">\n\n <mat-spinner *ngIf=\"searching\"\n class=\"mat-select-search-spinner\"\n diameter=\"16\">\n </mat-spinner>\n\n <button *ngIf=\"!hideClearSearchButton && value && !searching\"\n class=\"mat-select-search-clear\"\n aria-label=\"Limpar\"\n mat-icon-button\n (click)=\"_reset(true)\">\n <mat-icon> close </mat-icon>\n </button>\n\n <mat-divider> </mat-divider>\n</div>\n\n<div *ngIf=\"(_showNoEntriesFound$ | async) && !searching\"\n class=\"mat-select-search-no-entries-found\">\n <mat-icon>sentiment_very_dissatisfied</mat-icon>\n Nenhum registro foi encontrado\n</div>",
13734
+ template: "<!-- Espa\u00E7o reservado para ajustar o deslocamento vertical dos elementos mat-option -->\n<input matInput\n class=\"mat-select-search-input mat-select-search-hidden\" />\n\n<!-- Note: o mat-datepicker-content mat-tab-header \u00E9 necess\u00E1rio para herdar as cores do tema do material, consulte PR n\u00BA 22 -->\n<div #innerSelectSearch\n class=\"mat-select-search-inner mat-typography mat-datepicker-content mat-tab-header\">\n\n <input class=\"mat-select-search-input mat-input-element\"\n aria-label=\"Pesquisa suspensa\"\n aria-hidden=\"false\"\n autocomplete=\"off\"\n type=\"text\"\n #searchSelectInput\n [placeholder]=\"placeholderLabel\"\n [formControl]=\"_formControl\"\n (keydown)=\"_handleKeydown($event)\"\n (keyup)=\"_handleKeyup($event)\"\n (blur)=\"onBlur()\">\n\n <mat-spinner *ngIf=\"searching\"\n class=\"mat-select-search-spinner\"\n diameter=\"16\">\n </mat-spinner>\n\n <button *ngIf=\"!hideClearSearchButton && value && !searching\"\n class=\"mat-select-search-clear\"\n aria-label=\"Limpar\"\n mat-icon-button\n (click)=\"_reset(true)\">\n <mat-icon> close </mat-icon>\n </button>\n\n <mat-divider> </mat-divider>\n</div>\n\n<div *ngIf=\"(_showNoEntriesFound$ | async) && !searching\"\n class=\"mat-select-search-no-entries-found\">\n <mat-icon>sentiment_very_dissatisfied</mat-icon>\n Nenhum registro foi encontrado\n</div>",
13689
13735
  providers: [
13690
13736
  {
13691
13737
  provide: forms.NG_VALUE_ACCESSOR,
@@ -24763,11 +24809,253 @@
24763
24809
  }());
24764
24810
 
24765
24811
  var nextUniqueId$m = 0;
24812
+ var GIPISplitButtonComponent = /** @class */ (function () {
24813
+ function GIPISplitButtonComponent(elementRef) {
24814
+ this.elementRef = elementRef;
24815
+ this._uniqueId = nextUniqueId$m++;
24816
+ this._name = "gipi-split-button-" + this._uniqueId;
24817
+ this.idBtnDefault = "gipi-split-button-default-" + this._uniqueId;
24818
+ this.idBtnMenu = "gipi-split-button-menu-" + this._uniqueId;
24819
+ this.isSplitButtonPrimary = this._hasHostAttributes('gipi-primary');
24820
+ this.isSplitButtonSecondary = this._hasHostAttributes('gipi-secondary');
24821
+ this.isSplitButtonTertiary = this._hasHostAttributes('gipi-tertiary');
24822
+ this.isSplitButtonAction = this._hasHostAttributes('gipi-action');
24823
+ this.id = this._name;
24824
+ this.name = this._name;
24825
+ this.type = 'button';
24826
+ this.ariaLabel = '';
24827
+ this.title = '';
24828
+ this.label = '';
24829
+ this.disabled = false;
24830
+ this.loading = false;
24831
+ this.tooltip = '';
24832
+ this.splitOptions = [];
24833
+ this.onOpenPopover = new core.EventEmitter();
24834
+ this.onClosePopover = new core.EventEmitter();
24835
+ this.onClick = new core.EventEmitter(true);
24836
+ this.onFocus = new core.EventEmitter(true);
24837
+ this.onBlur = new core.EventEmitter(true);
24838
+ }
24839
+ GIPISplitButtonComponent_1 = GIPISplitButtonComponent;
24840
+ GIPISplitButtonComponent.prototype.ngOnInit = function () { };
24841
+ GIPISplitButtonComponent.prototype.ngOnDestroy = function () {
24842
+ if (this.popoverTrigger) {
24843
+ this.popoverTrigger.destroyPopover();
24844
+ }
24845
+ };
24846
+ GIPISplitButtonComponent.prototype.getHostElement = function () {
24847
+ return this.elementRef.nativeElement;
24848
+ };
24849
+ GIPISplitButtonComponent.prototype._hasHostAttributes = function () {
24850
+ var _this = this;
24851
+ var attributes = [];
24852
+ for (var _i = 0; _i < arguments.length; _i++) {
24853
+ attributes[_i] = arguments[_i];
24854
+ }
24855
+ return attributes.some(function (attribute) { return _this.getHostElement().hasAttribute(attribute); });
24856
+ };
24857
+ GIPISplitButtonComponent.prototype.btnIdAndName = function () {
24858
+ var uniqueId = nextUniqueId$m++;
24859
+ return {
24860
+ btnDefault: "gipi-split-button-default-" + uniqueId,
24861
+ btnMenu: "gipi-split-button-menu-" + uniqueId,
24862
+ };
24863
+ };
24864
+ GIPISplitButtonComponent.prototype.getInternalButtonClass = function (isBtnDefault) {
24865
+ return {
24866
+ 'button-default': isBtnDefault,
24867
+ 'button-menu': !isBtnDefault,
24868
+ 'button-primary': this.isSplitButtonPrimary,
24869
+ 'button-secondary': this.isSplitButtonSecondary,
24870
+ 'button-tertiary': this.isSplitButtonTertiary,
24871
+ 'button-action': this.isSplitButtonAction,
24872
+ };
24873
+ };
24874
+ GIPISplitButtonComponent.prototype.showPopover = function () {
24875
+ if (this.disabled || this.loading) {
24876
+ return;
24877
+ }
24878
+ else {
24879
+ this.popoverTrigger.openPopover();
24880
+ }
24881
+ };
24882
+ GIPISplitButtonComponent.prototype.closePopover = function () {
24883
+ if (this.disabled || this.loading) {
24884
+ return;
24885
+ }
24886
+ else {
24887
+ this.popoverTrigger.closePopover();
24888
+ }
24889
+ };
24890
+ GIPISplitButtonComponent.prototype.handleClick = function (event) {
24891
+ if (this.disabled || this.loading) {
24892
+ return;
24893
+ }
24894
+ else {
24895
+ this.onClick.emit(event);
24896
+ this.closePopover();
24897
+ event.stopPropagation();
24898
+ }
24899
+ };
24900
+ GIPISplitButtonComponent.prototype.handleFocus = function (event) {
24901
+ if (this.disabled || this.loading) {
24902
+ return;
24903
+ }
24904
+ else {
24905
+ this.onFocus.emit(event);
24906
+ event.stopPropagation();
24907
+ }
24908
+ };
24909
+ GIPISplitButtonComponent.prototype.handleBlur = function (event) {
24910
+ if (this.disabled || this.loading) {
24911
+ return;
24912
+ }
24913
+ else {
24914
+ this.onBlur.emit(event);
24915
+ event.stopPropagation();
24916
+ }
24917
+ };
24918
+ GIPISplitButtonComponent.prototype.handleClickBtnMenu = function (event) {
24919
+ if (this.disabled || this.loading) {
24920
+ return;
24921
+ }
24922
+ else {
24923
+ if (!ObjectUtil.isNull(this.popoverTrigger)) {
24924
+ this.popoverTrigger.togglePopover();
24925
+ }
24926
+ event.stopPropagation();
24927
+ }
24928
+ };
24929
+ GIPISplitButtonComponent.prototype.handleClickBtnSplitOption = function (option) {
24930
+ if (this.disabled || this.loading || !option || option.disabled || !option.clickFn) {
24931
+ return;
24932
+ }
24933
+ else {
24934
+ option.clickFn();
24935
+ this.closePopover();
24936
+ }
24937
+ };
24938
+ GIPISplitButtonComponent.prototype.onResize = function (event) {
24939
+ if (this.popoverTrigger) {
24940
+ this.popoverTrigger.closePopover();
24941
+ event.stopPropagation();
24942
+ }
24943
+ };
24944
+ var GIPISplitButtonComponent_1;
24945
+ GIPISplitButtonComponent.ctorParameters = function () { return [
24946
+ { type: core.ElementRef }
24947
+ ]; };
24948
+ __decorate([
24949
+ core.ViewChild(GIPIPopoverTrigger, { static: false }),
24950
+ __metadata("design:type", GIPIPopoverTrigger)
24951
+ ], GIPISplitButtonComponent.prototype, "popoverTrigger", void 0);
24952
+ __decorate([
24953
+ core.Input(),
24954
+ __metadata("design:type", String)
24955
+ ], GIPISplitButtonComponent.prototype, "id", void 0);
24956
+ __decorate([
24957
+ core.Input(),
24958
+ __metadata("design:type", String)
24959
+ ], GIPISplitButtonComponent.prototype, "name", void 0);
24960
+ __decorate([
24961
+ core.Input(),
24962
+ __metadata("design:type", String)
24963
+ ], GIPISplitButtonComponent.prototype, "type", void 0);
24964
+ __decorate([
24965
+ core.Input(),
24966
+ __metadata("design:type", String)
24967
+ ], GIPISplitButtonComponent.prototype, "ariaLabel", void 0);
24968
+ __decorate([
24969
+ core.Input(),
24970
+ __metadata("design:type", String)
24971
+ ], GIPISplitButtonComponent.prototype, "title", void 0);
24972
+ __decorate([
24973
+ core.Input(),
24974
+ __metadata("design:type", String)
24975
+ ], GIPISplitButtonComponent.prototype, "label", void 0);
24976
+ __decorate([
24977
+ core.Input(),
24978
+ __metadata("design:type", String)
24979
+ ], GIPISplitButtonComponent.prototype, "buttonClass", void 0);
24980
+ __decorate([
24981
+ core.Input(),
24982
+ __metadata("design:type", Boolean)
24983
+ ], GIPISplitButtonComponent.prototype, "disabled", void 0);
24984
+ __decorate([
24985
+ core.Input(),
24986
+ __metadata("design:type", Boolean)
24987
+ ], GIPISplitButtonComponent.prototype, "loading", void 0);
24988
+ __decorate([
24989
+ core.Input(),
24990
+ __metadata("design:type", String)
24991
+ ], GIPISplitButtonComponent.prototype, "tooltip", void 0);
24992
+ __decorate([
24993
+ core.Input('options'),
24994
+ __metadata("design:type", Array)
24995
+ ], GIPISplitButtonComponent.prototype, "splitOptions", void 0);
24996
+ __decorate([
24997
+ core.Output(),
24998
+ __metadata("design:type", core.EventEmitter)
24999
+ ], GIPISplitButtonComponent.prototype, "onOpenPopover", void 0);
25000
+ __decorate([
25001
+ core.Output(),
25002
+ __metadata("design:type", core.EventEmitter)
25003
+ ], GIPISplitButtonComponent.prototype, "onClosePopover", void 0);
25004
+ __decorate([
25005
+ core.Output('click'),
25006
+ __metadata("design:type", core.EventEmitter)
25007
+ ], GIPISplitButtonComponent.prototype, "onClick", void 0);
25008
+ __decorate([
25009
+ core.Output('focus'),
25010
+ __metadata("design:type", core.EventEmitter)
25011
+ ], GIPISplitButtonComponent.prototype, "onFocus", void 0);
25012
+ __decorate([
25013
+ core.Output('blur'),
25014
+ __metadata("design:type", core.EventEmitter)
25015
+ ], GIPISplitButtonComponent.prototype, "onBlur", void 0);
25016
+ __decorate([
25017
+ core.HostListener('window:resize', ['$event']),
25018
+ __metadata("design:type", Function),
25019
+ __metadata("design:paramtypes", [UIEvent]),
25020
+ __metadata("design:returntype", void 0)
25021
+ ], GIPISplitButtonComponent.prototype, "onResize", null);
25022
+ GIPISplitButtonComponent = GIPISplitButtonComponent_1 = __decorate([
25023
+ core.Component({
25024
+ selector: "gipi-split-button[gipi-primary], gipi-split-button[gipi-secondary],\n gipi-split-button[gipi-tertiary], gipi-split-button[gipi-action]",
25025
+ exportAs: 'gipiSplitButton',
25026
+ template: "<div [matTooltip]=\"tooltip\"\n [class]=\"buttonClass || ''\"\n [class.button-base]=\"true\"\n [class.disabled]=\"disabled || loading\"\n #popoverTrigger=\"popoverTrigger\"\n [popoverTriggerFor]=\"btnPopover\"\n [popoverTriggerOn]=\"'none'\"\n [popoverBackdropCloseOnClick]=\"true\"\n (opened)=\"onOpenPopover.emit()\"\n (closed)=\"onClosePopover.emit()\">\n <button [attr.id]=\"idBtnDefault\"\n [attr.name]=\"idBtnDefault\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [ngClass]=\"getInternalButtonClass(true)\"\n role=\"button\"\n (click)=\"handleClick($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\">\n {{ label ? label : '' }}\n </button>\n <button [attr.id]=\"idBtnMenu\"\n [attr.name]=\"idBtnMenu\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [ngClass]=\"getInternalButtonClass(false)\"\n role=\"button\"\n (click)=\"handleClickBtnMenu($event)\">\n <mat-icon [@indicatorRotate]=\"popoverTrigger?.popoverOpen ? 'opened': 'closed'\"> expand_more </mat-icon>\n </button>\n</div>\n\n<gipi-popover #btnPopover=\"gipiPopover\"\n [popoverOverlapTrigger]=\"false\"\n [popoverCloseOnClick]=\"false\"\n [popoverArrowWidth]=\"0\"\n [popoverOffsetY]=\"3\">\n <div class=\"btn-popover-content\">\n <button class=\"btn-split-option\"\n *ngFor=\"let option of splitOptions\"\n [disabled]=\"option?.disabled\"\n (click)=\"handleClickBtnSplitOption(option)\">\n {{ option.label }}\n </button>\n </div>\n</gipi-popover>",
25027
+ providers: [
25028
+ {
25029
+ provide: forms.NG_VALUE_ACCESSOR,
25030
+ useExisting: core.forwardRef(function () { return GIPISplitButtonComponent_1; }),
25031
+ multi: true
25032
+ }
25033
+ ],
25034
+ host: {
25035
+ 'class': 'gipi-split-button',
25036
+ '[attr.id]': 'id',
25037
+ '[attr.name]': 'name',
25038
+ },
25039
+ animations: [
25040
+ animations.trigger('indicatorRotate', [
25041
+ animations.state('closed', animations.style({ transform: 'rotate(0deg)' })),
25042
+ animations.state('opened', animations.style({ transform: 'rotate(-180deg)' })),
25043
+ animations.transition('opened <=> closed', animations.animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
25044
+ ])
25045
+ ],
25046
+ styles: [".button-base{display:flex;flex-direction:row;justify-content:center;border-radius:4px;font-weight:600;font-size:1.4rem;line-height:1.6rem;cursor:pointer;outline:0;white-space:nowrap;text-decoration:none;vertical-align:middle;text-align:center;box-shadow:1px 1px 5px 0 rgba(0,0,0,.1);transition:.2s;width:100%;max-height:4rem;border:1px solid transparent;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.button-base.disabled{cursor:not-allowed!important;box-shadow:none}.button-base>button{display:flex;align-items:center;justify-content:center;border:none;outline:0;box-shadow:none;width:100%;height:40px;padding:12px 16px;overflow:hidden;border-radius:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;white-space:nowrap;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}.button-base>button:not(.disabled):active{opacity:.8}.button-base .button-default{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.button-base .button-menu{max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.button-primary:not(:disabled),.button-primary:not(:disabled)>mat-icon{background-color:#e0313e;color:#fff;fill:#fff}.button-primary:not(:disabled).button-default,.button-primary:not(:disabled)>mat-icon.button-default{border-right:1px solid #9f232c}.button-primary:not(:disabled) svg,.button-primary:not(:disabled) svg g path,.button-primary:not(:disabled) svg path,.button-primary:not(:disabled)>mat-icon svg,.button-primary:not(:disabled)>mat-icon svg g path,.button-primary:not(:disabled)>mat-icon svg path{color:#fff;fill:#fff}.button-primary:disabled,.button-primary:disabled>mat-icon{background-color:#d1d2d4;color:#9a9da2;fill:#9a9da2}.button-primary:disabled.button-default,.button-primary:disabled>mat-icon.button-default{border-right:1px solid #9a9da2}.button-primary:disabled svg,.button-primary:disabled svg g path,.button-primary:disabled svg path,.button-primary:disabled>mat-icon svg,.button-primary:disabled>mat-icon svg g path,.button-primary:disabled>mat-icon svg path{color:#9a9da2;fill:#9a9da2}.button-primary:not(:disabled):hover,.button-primary:not(:disabled):hover>mat-icon{background-color:#cc2d38;color:#fff;fill:#fff}.button-primary:not(:disabled):hover svg,.button-primary:not(:disabled):hover svg g path,.button-primary:not(:disabled):hover svg path,.button-primary:not(:disabled):hover>mat-icon svg,.button-primary:not(:disabled):hover>mat-icon svg g path,.button-primary:not(:disabled):hover>mat-icon svg path{color:#fff;fill:#fff}.button-secondary{background-color:transparent}.button-secondary:not(:disabled),.button-secondary:not(:disabled)>mat-icon{border-color:#595959;color:#595959;fill:#595959}.button-secondary:not(:disabled).button-default,.button-secondary:not(:disabled)>mat-icon.button-default{border-right:1px solid #595959}.button-secondary:not(:disabled) svg,.button-secondary:not(:disabled) svg g path,.button-secondary:not(:disabled) svg path,.button-secondary:not(:disabled)>mat-icon svg,.button-secondary:not(:disabled)>mat-icon svg g path,.button-secondary:not(:disabled)>mat-icon svg path{color:#595959;fill:#595959}.button-secondary:disabled,.button-secondary:disabled>mat-icon{border-color:#d1d2d4;background-color:#d1d2d4;color:#9a9da2;fill:#9a9da2}.button-secondary:disabled.button-default,.button-secondary:disabled>mat-icon.button-default{border-right:1px solid #9a9da2}.button-secondary:disabled svg,.button-secondary:disabled svg g path,.button-secondary:disabled svg path,.button-secondary:disabled>mat-icon svg,.button-secondary:disabled>mat-icon svg g path,.button-secondary:disabled>mat-icon svg path{color:#9a9da2;fill:#9a9da2}.button-secondary:not(:disabled):hover,.button-secondary:not(:disabled):hover>mat-icon{border-color:#595959;background-color:#e0e1e2;color:#595959;fill:#595959}.button-secondary:not(:disabled):hover svg,.button-secondary:not(:disabled):hover svg g path,.button-secondary:not(:disabled):hover svg path,.button-secondary:not(:disabled):hover>mat-icon svg,.button-secondary:not(:disabled):hover>mat-icon svg g path,.button-secondary:not(:disabled):hover>mat-icon svg path{color:#595959;fill:#595959}.button-tertiary{background-color:#e7ebee;box-shadow:none}.button-tertiary:not(:disabled),.button-tertiary:not(:disabled)>mat-icon{color:#595959;fill:#595959}.button-tertiary:not(:disabled).button-default,.button-tertiary:not(:disabled)>mat-icon.button-default{border-right:1px solid #595959}.button-tertiary:not(:disabled) svg,.button-tertiary:not(:disabled) svg g path,.button-tertiary:not(:disabled) svg path,.button-tertiary:not(:disabled)>mat-icon svg,.button-tertiary:not(:disabled)>mat-icon svg g path,.button-tertiary:not(:disabled)>mat-icon svg path{color:#595959;fill:#595959}.button-tertiary:disabled,.button-tertiary:disabled>mat-icon{background-color:#d1d2d4;color:#9a9da2;fill:#9a9da2}.button-tertiary:disabled.button-default,.button-tertiary:disabled>mat-icon.button-default{border-right:1px solid #9a9da2}.button-tertiary:disabled svg,.button-tertiary:disabled svg g path,.button-tertiary:disabled svg path,.button-tertiary:disabled>mat-icon svg,.button-tertiary:disabled>mat-icon svg g path,.button-tertiary:disabled>mat-icon svg path{color:#9a9da2;fill:#9a9da2}.button-tertiary:not(:disabled):hover,.button-tertiary:not(:disabled):hover>mat-icon{background-color:#e0e1e2;color:#595959;fill:#595959}.button-tertiary:not(:disabled):hover svg,.button-tertiary:not(:disabled):hover svg g path,.button-tertiary:not(:disabled):hover svg path,.button-tertiary:not(:disabled):hover>mat-icon svg,.button-tertiary:not(:disabled):hover>mat-icon svg g path,.button-tertiary:not(:disabled):hover>mat-icon svg path{color:#595959;fill:#595959}.button-action{background-color:transparent;box-shadow:none;display:flex;justify-content:flex-start!important}.button-action:not(:disabled),.button-action:not(:disabled)>mat-icon{color:#262626;fill:#262626}.button-action:not(:disabled).button-default,.button-action:not(:disabled)>mat-icon.button-default{border-right:1px solid #262626}.button-action:not(:disabled) svg,.button-action:not(:disabled) svg g path,.button-action:not(:disabled) svg path,.button-action:not(:disabled)>mat-icon svg,.button-action:not(:disabled)>mat-icon svg g path,.button-action:not(:disabled)>mat-icon svg path{color:#262626;fill:#262626}.button-action:disabled,.button-action:disabled>mat-icon{color:#9a9da2;fill:#9a9da2}.button-action:disabled.button-default,.button-action:disabled>mat-icon.button-default{border-right:1px solid #9a9da2}.button-action:disabled svg,.button-action:disabled svg g path,.button-action:disabled svg path,.button-action:disabled>mat-icon svg,.button-action:disabled>mat-icon svg g path,.button-action:disabled>mat-icon svg path{color:#9a9da2;fill:#9a9da2}.button-action:not(:disabled):hover,.button-action:not(:disabled):hover>mat-icon{background-color:#f5f5f6;color:#262626;fill:#262626}.button-action:not(:disabled):hover svg,.button-action:not(:disabled):hover svg g path,.button-action:not(:disabled):hover svg path,.button-action:not(:disabled):hover>mat-icon svg,.button-action:not(:disabled):hover>mat-icon svg g path,.button-action:not(:disabled):hover>mat-icon svg path{color:#262626;fill:#262626}.disabled,:disabled{pointer-events:none!important}.btn-popover-content{display:flex;flex-direction:column;gap:.8rem;background-color:#fff;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);padding:8px}.btn-split-option{width:100%;padding:.8rem;border-radius:.4rem;border:1px solid transparent;text-align:left;outline:0;background-color:transparent;cursor:pointer}.btn-split-option:not(:disabled){color:#595959}.btn-split-option:disabled{border-color:#d1d2d4;background-color:#d1d2d4;color:#9a9da2;cursor:not-allowed}.btn-split-option:not(:disabled):hover{border-color:#595959;background-color:#e0e1e2;color:#595959}"]
25047
+ }),
25048
+ __metadata("design:paramtypes", [core.ElementRef])
25049
+ ], GIPISplitButtonComponent);
25050
+ return GIPISplitButtonComponent;
25051
+ }());
25052
+
25053
+ var nextUniqueId$n = 0;
24766
25054
  var GIPITextareaComponent = /** @class */ (function () {
24767
25055
  function GIPITextareaComponent(elementRef, _changeDetectorRef) {
24768
25056
  this.elementRef = elementRef;
24769
25057
  this._changeDetectorRef = _changeDetectorRef;
24770
- this._name = "gipi-textarea-" + nextUniqueId$m++;
25058
+ this._name = "gipi-textarea-" + nextUniqueId$n++;
24771
25059
  this.id = this._name;
24772
25060
  this.name = this._name;
24773
25061
  this.label = '';
@@ -25154,6 +25442,7 @@
25154
25442
  GIPIEmptyStateComponent,
25155
25443
  GIPICardComponent,
25156
25444
  GIPITextareaComponent,
25445
+ GIPISplitButtonComponent,
25157
25446
  // Tabs
25158
25447
  GIPITabGroupComponent,
25159
25448
  GIPITabComponent,
@@ -28742,6 +29031,7 @@
28742
29031
  exports.GIPISidenavContainerComponent = GIPISidenavContainerComponent;
28743
29032
  exports.GIPISlideToggleComponent = GIPISlideToggleComponent;
28744
29033
  exports.GIPISortModel = GIPISortModel;
29034
+ exports.GIPISplitButtonComponent = GIPISplitButtonComponent;
28745
29035
  exports.GIPIStepperComponent = GIPIStepperComponent;
28746
29036
  exports.GIPITabComponent = GIPITabComponent;
28747
29037
  exports.GIPITabGroupComponent = GIPITabGroupComponent;