@po-ui/ng-components 19.22.0 → 19.24.0
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.
- package/fesm2022/po-ui-ng-components.mjs +1024 -286
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/components.module.d.ts +14 -13
- package/lib/components/index.d.ts +1 -0
- package/lib/components/po-button/enums/po-button-kind.enum.d.ts +2 -2
- package/lib/components/po-context-tabs/index.d.ts +3 -0
- package/lib/components/po-context-tabs/po-context-tab-button/po-context-tab-button.component.d.ts +26 -0
- package/lib/components/po-context-tabs/po-context-tabs.component.d.ts +81 -0
- package/lib/components/po-context-tabs/po-context-tabs.module.d.ts +16 -0
- package/lib/components/po-popup/po-popup-action.interface.d.ts +2 -1
- package/lib/components/po-tabs/index.d.ts +2 -0
- package/lib/components/po-tabs/po-tab/po-tab-base.component.d.ts +28 -2
- package/lib/components/po-tabs/po-tab/po-tab.component.d.ts +3 -1
- package/lib/components/po-tabs/po-tab/po-tab.interface.d.ts +23 -0
- package/lib/components/po-tabs/po-tab-button/po-tab-button.component.d.ts +2 -2
- package/lib/components/po-tabs/po-tabs-base.component.d.ts +1 -16
- package/lib/components/po-tabs/po-tabs.component.d.ts +25 -4
- package/lib/components/po-tabs/po-tabs.module.d.ts +1 -1
- package/lib/components/po-tabs/po-tabs.service.d.ts +2 -2
- package/lib/components/po-tag/po-tag-base.component.d.ts +3 -1
- package/lib/components/po-widget/index.d.ts +1 -0
- package/lib/components/po-widget/literals/po-widget-language.d.ts +7 -0
- package/lib/components/po-widget/literals/po-widget-literals.d.ts +22 -0
- package/lib/components/po-widget/po-widget-base.component.d.ts +185 -37
- package/lib/components/po-widget/po-widget.component.d.ts +29 -7
- package/lib/components/po-widget/po-widget.module.d.ts +5 -1
- package/package.json +4 -4
- package/po-ui-ng-components-19.24.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-19.22.0.tgz +0 -0
|
@@ -1734,7 +1734,7 @@ class PoTagBaseComponent {
|
|
|
1734
1734
|
* @default `false`
|
|
1735
1735
|
*/
|
|
1736
1736
|
set icon(value) {
|
|
1737
|
-
if (this.type) {
|
|
1737
|
+
if (this.type && !this.forceIcon) {
|
|
1738
1738
|
this._icon = convertToBoolean(value);
|
|
1739
1739
|
}
|
|
1740
1740
|
else {
|
|
@@ -1785,6 +1785,8 @@ class PoTagBaseComponent {
|
|
|
1785
1785
|
get type() {
|
|
1786
1786
|
return this._type;
|
|
1787
1787
|
}
|
|
1788
|
+
//propriedade interna para forçar icone mesmo com tipo definido
|
|
1789
|
+
forceIcon = false;
|
|
1788
1790
|
/**
|
|
1789
1791
|
* @optional
|
|
1790
1792
|
*
|
|
@@ -1831,7 +1833,7 @@ class PoTagBaseComponent {
|
|
|
1831
1833
|
this.language = languageService.getShortLanguage();
|
|
1832
1834
|
}
|
|
1833
1835
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTagBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1834
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoTagBaseComponent, isStandalone: true, inputs: { label: ["p-label", "label"], removable: ["p-removable", "removable", convertToBoolean], disabled: ["p-disabled", "disabled", convertToBoolean], value: ["p-value", "value"], appendInBody: ["p-append-in-body", "appendInBody"], color: ["p-color", "color"], textColor: ["p-text-color", "textColor"], icon: ["p-icon", "icon"], orientation: ["p-orientation", "orientation"], type: ["p-type", "type"], literals: ["p-literals", "literals"] }, outputs: { click: "p-click", remove: "p-close" }, ngImport: i0 });
|
|
1836
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoTagBaseComponent, isStandalone: true, inputs: { label: ["p-label", "label"], removable: ["p-removable", "removable", convertToBoolean], disabled: ["p-disabled", "disabled", convertToBoolean], value: ["p-value", "value"], appendInBody: ["p-append-in-body", "appendInBody"], color: ["p-color", "color"], textColor: ["p-text-color", "textColor"], icon: ["p-icon", "icon"], orientation: ["p-orientation", "orientation"], type: ["p-type", "type"], forceIcon: ["p-force-icon", "forceIcon", convertToBoolean], literals: ["p-literals", "literals"] }, outputs: { click: "p-click", remove: "p-close" }, ngImport: i0 });
|
|
1835
1837
|
}
|
|
1836
1838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTagBaseComponent, decorators: [{
|
|
1837
1839
|
type: Directive
|
|
@@ -1871,6 +1873,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
1871
1873
|
}], type: [{
|
|
1872
1874
|
type: Input,
|
|
1873
1875
|
args: ['p-type']
|
|
1876
|
+
}], forceIcon: [{
|
|
1877
|
+
type: Input,
|
|
1878
|
+
args: [{ alias: 'p-force-icon', transform: convertToBoolean }]
|
|
1874
1879
|
}], literals: [{
|
|
1875
1880
|
type: Input,
|
|
1876
1881
|
args: ['p-literals']
|
|
@@ -2746,11 +2751,11 @@ class PoTagComponent extends PoTagBaseComponent {
|
|
|
2746
2751
|
}
|
|
2747
2752
|
}
|
|
2748
2753
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTagComponent, deps: [{ token: i0.ElementRef }, { token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2749
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoTagComponent, isStandalone: false, selector: "po-tag", viewQueries: [{ propertyName: "tagContainer", first: true, predicate: ["tagContainer"], descendants: true, static: true }, { propertyName: "tagClose", first: true, predicate: ["tagClose"], descendants: true, static: true }, { propertyName: "poTag", first: true, predicate: ["poTag"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"po-tag-container\" [class.po-tag-container-horizontal]=\"tagOrientation\">\n <div *ngIf=\"label\" class=\"po-tag-title po-text-nowrap\">\n <span class=\"po-tag-label\">{{ tagOrientation ? label + ':' : label }}</span>\n </div>\n\n <div class=\"po-tag-sub-container\">\n <div\n #poTagWrapper\n class=\"po-tag-wrapper\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [attr.role]=\"isClickable && !disabled && !removable ? 'button' : ''\"\n (keydown.enter)=\"onKeyPressed($event)\"\n (keydown.space)=\"$event.preventDefault()\"\n (keyup.space)=\"onKeyPressed($event)\"\n (click)=\"onClick()\"\n [tabindex]=\"isClickable && !removable ? 0 : -1\"\n >\n <div\n #poTag\n class=\"po-tag\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [class.po-tag-removable]=\"removable\"\n [class.po-tag-disabled]=\"disabled && removable\"\n [ngClass]=\"tagColor\"\n [ngStyle]=\"styleTag()\"\n >\n <po-icon\n *ngIf=\"icon && !removable\"\n class=\"po-tag-icon\"\n [p-icon]=\"!type ? icon : iconFromType\"\n [ngStyle]=\"!type && customTextColor ? { 'color': customTextColor } : ''\"\n >\n </po-icon>\n\n <div\n #tagContainer\n class=\"po-tag-value\"\n [p-append-in-body]=\"appendInBody\"\n [p-tooltip]=\"getWidthTag() ? value : ''\"\n p-tooltip-position=\"top\"\n >\n <span [ngStyle]=\"!type && customTextColor && !removable ? { 'color': customTextColor } : ''\">{{\n value\n }}</span>\n </div>\n\n <po-icon\n #tagClose\n *ngIf=\"removable\"\n p-icon=\"ICON_CLOSE\"\n p-tooltip-position=\"top\"\n [p-tooltip]=\"literals.remove\"\n [p-append-in-body]=\"appendInBody\"\n [attr.aria-label]=\"setAriaLabel()\"\n class=\"po-tag-remove\"\n [class.po-clickable]=\"!disabled\"\n [tabindex]=\"!disabled ? 0 : -1\"\n [attr.role]=\"!disabled ? 'button' : ''\"\n (click)=\"onClose()\"\n (keydown.enter)=\"onClose('enter')\"\n >\n </po-icon>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2754
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoTagComponent, isStandalone: false, selector: "po-tag", viewQueries: [{ propertyName: "tagContainer", first: true, predicate: ["tagContainer"], descendants: true, static: true }, { propertyName: "tagClose", first: true, predicate: ["tagClose"], descendants: true, static: true }, { propertyName: "poTag", first: true, predicate: ["poTag"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"po-tag-container\" [class.po-tag-container-horizontal]=\"tagOrientation\">\n <div *ngIf=\"label\" class=\"po-tag-title po-text-nowrap\">\n <span class=\"po-tag-label\">{{ tagOrientation ? label + ':' : label }}</span>\n </div>\n\n <div class=\"po-tag-sub-container\">\n <div\n #poTagWrapper\n class=\"po-tag-wrapper\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [attr.role]=\"isClickable && !disabled && !removable ? 'button' : ''\"\n (keydown.enter)=\"onKeyPressed($event)\"\n (keydown.space)=\"$event.preventDefault()\"\n (keyup.space)=\"onKeyPressed($event)\"\n (click)=\"onClick()\"\n [tabindex]=\"isClickable && !removable ? 0 : -1\"\n >\n <div\n #poTag\n class=\"po-tag\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [class.po-tag-removable]=\"removable\"\n [class.po-tag-disabled]=\"disabled && removable\"\n [ngClass]=\"tagColor\"\n [ngStyle]=\"styleTag()\"\n >\n <po-icon\n *ngIf=\"icon && !removable\"\n class=\"po-tag-icon\"\n [p-icon]=\"!type || forceIcon ? icon : iconFromType\"\n [ngStyle]=\"!type && customTextColor ? { 'color': customTextColor } : ''\"\n >\n </po-icon>\n\n <div\n #tagContainer\n class=\"po-tag-value\"\n [p-append-in-body]=\"appendInBody\"\n [p-tooltip]=\"getWidthTag() ? value : ''\"\n p-tooltip-position=\"top\"\n >\n <span [ngStyle]=\"!type && customTextColor && !removable ? { 'color': customTextColor } : ''\">{{\n value\n }}</span>\n </div>\n\n <po-icon\n #tagClose\n *ngIf=\"removable\"\n p-icon=\"ICON_CLOSE\"\n p-tooltip-position=\"top\"\n [p-tooltip]=\"literals.remove\"\n [p-append-in-body]=\"appendInBody\"\n [attr.aria-label]=\"setAriaLabel()\"\n class=\"po-tag-remove\"\n [class.po-clickable]=\"!disabled\"\n [tabindex]=\"!disabled ? 0 : -1\"\n [attr.role]=\"!disabled ? 'button' : ''\"\n (click)=\"onClose()\"\n (keydown.enter)=\"onClose('enter')\"\n >\n </po-icon>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2750
2755
|
}
|
|
2751
2756
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTagComponent, decorators: [{
|
|
2752
2757
|
type: Component,
|
|
2753
|
-
args: [{ selector: 'po-tag', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"po-tag-container\" [class.po-tag-container-horizontal]=\"tagOrientation\">\n <div *ngIf=\"label\" class=\"po-tag-title po-text-nowrap\">\n <span class=\"po-tag-label\">{{ tagOrientation ? label + ':' : label }}</span>\n </div>\n\n <div class=\"po-tag-sub-container\">\n <div\n #poTagWrapper\n class=\"po-tag-wrapper\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [attr.role]=\"isClickable && !disabled && !removable ? 'button' : ''\"\n (keydown.enter)=\"onKeyPressed($event)\"\n (keydown.space)=\"$event.preventDefault()\"\n (keyup.space)=\"onKeyPressed($event)\"\n (click)=\"onClick()\"\n [tabindex]=\"isClickable && !removable ? 0 : -1\"\n >\n <div\n #poTag\n class=\"po-tag\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [class.po-tag-removable]=\"removable\"\n [class.po-tag-disabled]=\"disabled && removable\"\n [ngClass]=\"tagColor\"\n [ngStyle]=\"styleTag()\"\n >\n <po-icon\n *ngIf=\"icon && !removable\"\n class=\"po-tag-icon\"\n [p-icon]=\"!type ? icon : iconFromType\"\n [ngStyle]=\"!type && customTextColor ? { 'color': customTextColor } : ''\"\n >\n </po-icon>\n\n <div\n #tagContainer\n class=\"po-tag-value\"\n [p-append-in-body]=\"appendInBody\"\n [p-tooltip]=\"getWidthTag() ? value : ''\"\n p-tooltip-position=\"top\"\n >\n <span [ngStyle]=\"!type && customTextColor && !removable ? { 'color': customTextColor } : ''\">{{\n value\n }}</span>\n </div>\n\n <po-icon\n #tagClose\n *ngIf=\"removable\"\n p-icon=\"ICON_CLOSE\"\n p-tooltip-position=\"top\"\n [p-tooltip]=\"literals.remove\"\n [p-append-in-body]=\"appendInBody\"\n [attr.aria-label]=\"setAriaLabel()\"\n class=\"po-tag-remove\"\n [class.po-clickable]=\"!disabled\"\n [tabindex]=\"!disabled ? 0 : -1\"\n [attr.role]=\"!disabled ? 'button' : ''\"\n (click)=\"onClose()\"\n (keydown.enter)=\"onClose('enter')\"\n >\n </po-icon>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
2758
|
+
args: [{ selector: 'po-tag', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"po-tag-container\" [class.po-tag-container-horizontal]=\"tagOrientation\">\n <div *ngIf=\"label\" class=\"po-tag-title po-text-nowrap\">\n <span class=\"po-tag-label\">{{ tagOrientation ? label + ':' : label }}</span>\n </div>\n\n <div class=\"po-tag-sub-container\">\n <div\n #poTagWrapper\n class=\"po-tag-wrapper\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [attr.role]=\"isClickable && !disabled && !removable ? 'button' : ''\"\n (keydown.enter)=\"onKeyPressed($event)\"\n (keydown.space)=\"$event.preventDefault()\"\n (keyup.space)=\"onKeyPressed($event)\"\n (click)=\"onClick()\"\n [tabindex]=\"isClickable && !removable ? 0 : -1\"\n >\n <div\n #poTag\n class=\"po-tag\"\n [class.po-clickable]=\"isClickable && !disabled && !removable\"\n [class.po-tag-removable]=\"removable\"\n [class.po-tag-disabled]=\"disabled && removable\"\n [ngClass]=\"tagColor\"\n [ngStyle]=\"styleTag()\"\n >\n <po-icon\n *ngIf=\"icon && !removable\"\n class=\"po-tag-icon\"\n [p-icon]=\"!type || forceIcon ? icon : iconFromType\"\n [ngStyle]=\"!type && customTextColor ? { 'color': customTextColor } : ''\"\n >\n </po-icon>\n\n <div\n #tagContainer\n class=\"po-tag-value\"\n [p-append-in-body]=\"appendInBody\"\n [p-tooltip]=\"getWidthTag() ? value : ''\"\n p-tooltip-position=\"top\"\n >\n <span [ngStyle]=\"!type && customTextColor && !removable ? { 'color': customTextColor } : ''\">{{\n value\n }}</span>\n </div>\n\n <po-icon\n #tagClose\n *ngIf=\"removable\"\n p-icon=\"ICON_CLOSE\"\n p-tooltip-position=\"top\"\n [p-tooltip]=\"literals.remove\"\n [p-append-in-body]=\"appendInBody\"\n [attr.aria-label]=\"setAriaLabel()\"\n class=\"po-tag-remove\"\n [class.po-clickable]=\"!disabled\"\n [tabindex]=\"!disabled ? 0 : -1\"\n [attr.role]=\"!disabled ? 'button' : ''\"\n (click)=\"onClose()\"\n (keydown.enter)=\"onClose('enter')\"\n >\n </po-icon>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
2754
2759
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: PoLanguageService }], propDecorators: { tagContainer: [{
|
|
2755
2760
|
type: ViewChild,
|
|
2756
2761
|
args: ['tagContainer', { static: true }]
|
|
@@ -7034,11 +7039,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
7034
7039
|
}] });
|
|
7035
7040
|
|
|
7036
7041
|
/**
|
|
7037
|
-
* @usedBy PoButtonComponent
|
|
7042
|
+
* @usedBy PoButtonComponent, PoWidgetComponent
|
|
7038
7043
|
*
|
|
7039
7044
|
* @description
|
|
7040
7045
|
*
|
|
7041
|
-
* Estilos
|
|
7046
|
+
* Estilos disponíveis do button.
|
|
7042
7047
|
*/
|
|
7043
7048
|
var PoButtonKind;
|
|
7044
7049
|
(function (PoButtonKind) {
|
|
@@ -50125,109 +50130,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50125
50130
|
}]
|
|
50126
50131
|
}] });
|
|
50127
50132
|
|
|
50128
|
-
/**
|
|
50129
|
-
* @docsPrivate
|
|
50130
|
-
*
|
|
50131
|
-
* @description
|
|
50132
|
-
*
|
|
50133
|
-
* Componente responsável por manipular os botões de aba.
|
|
50134
|
-
*/
|
|
50135
|
-
class PoTabButtonComponent {
|
|
50136
|
-
elementRef;
|
|
50137
|
-
changeDetector;
|
|
50138
|
-
tabButtom;
|
|
50139
|
-
// Desabilita o botão
|
|
50140
|
-
disabled;
|
|
50141
|
-
// Identificador do componente
|
|
50142
|
-
id;
|
|
50143
|
-
// Rótulo do botão
|
|
50144
|
-
label;
|
|
50145
|
-
// Função sera emitida quando a tab ficar ativada
|
|
50146
|
-
activated = new EventEmitter();
|
|
50147
|
-
// Função sera emitida quando a tab ficar desabilitada ou escondida
|
|
50148
|
-
changeState = new EventEmitter();
|
|
50149
|
-
// Método recebido do usuário para ser disparado quando clicar na aba
|
|
50150
|
-
click = new EventEmitter();
|
|
50151
|
-
_active;
|
|
50152
|
-
_hide;
|
|
50153
|
-
widthButton;
|
|
50154
|
-
// Ativa o botão
|
|
50155
|
-
set active(value) {
|
|
50156
|
-
this._active = value;
|
|
50157
|
-
this.emitActivated();
|
|
50158
|
-
}
|
|
50159
|
-
get active() {
|
|
50160
|
-
return this._active;
|
|
50161
|
-
}
|
|
50162
|
-
// Oculta o botão
|
|
50163
|
-
set hide(value) {
|
|
50164
|
-
this._hide = convertToBoolean(value);
|
|
50165
|
-
this.setDisplayOnHide();
|
|
50166
|
-
}
|
|
50167
|
-
get hide() {
|
|
50168
|
-
return this._hide;
|
|
50169
|
-
}
|
|
50170
|
-
constructor(elementRef, changeDetector) {
|
|
50171
|
-
this.elementRef = elementRef;
|
|
50172
|
-
this.changeDetector = changeDetector;
|
|
50173
|
-
}
|
|
50174
|
-
ngAfterViewInit() {
|
|
50175
|
-
this.widthButton = this.tabButtom.nativeElement.offsetWidth;
|
|
50176
|
-
this.changeDetector.detectChanges();
|
|
50177
|
-
}
|
|
50178
|
-
ngOnChanges(changes) {
|
|
50179
|
-
if ((changes.hide && changes.hide.currentValue) || (changes.disabled && changes.disabled.currentValue)) {
|
|
50180
|
-
this.changeState.emit(this);
|
|
50181
|
-
}
|
|
50182
|
-
}
|
|
50183
|
-
onClick() {
|
|
50184
|
-
if (!this.disabled) {
|
|
50185
|
-
this.click.emit(this.id);
|
|
50186
|
-
}
|
|
50187
|
-
}
|
|
50188
|
-
emitActivated() {
|
|
50189
|
-
if (this.active) {
|
|
50190
|
-
this.activated.emit(this);
|
|
50191
|
-
}
|
|
50192
|
-
}
|
|
50193
|
-
setDisplayOnHide() {
|
|
50194
|
-
this.elementRef.nativeElement.style.display = this.hide ? 'none' : '';
|
|
50195
|
-
}
|
|
50196
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
50197
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoTabButtonComponent, isStandalone: false, selector: "po-tab-button", inputs: { disabled: ["p-disabled", "disabled"], id: ["p-id", "id"], label: ["p-label", "label"], active: ["p-active", "active"], hide: ["p-hide", "hide"] }, outputs: { activated: "p-activated", changeState: "p-change-state", click: "p-click" }, viewQueries: [{ propertyName: "tabButtom", first: true, predicate: ["tabButtom"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <span class=\"po-tab-button-label po-text-ellipsis\">\n {{ label }}\n </span>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }] });
|
|
50198
|
-
}
|
|
50199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabButtonComponent, decorators: [{
|
|
50200
|
-
type: Component,
|
|
50201
|
-
args: [{ selector: 'po-tab-button', standalone: false, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <span class=\"po-tab-button-label po-text-ellipsis\">\n {{ label }}\n </span>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n" }]
|
|
50202
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { tabButtom: [{
|
|
50203
|
-
type: ViewChild,
|
|
50204
|
-
args: ['tabButtom', { static: true }]
|
|
50205
|
-
}], disabled: [{
|
|
50206
|
-
type: Input,
|
|
50207
|
-
args: ['p-disabled']
|
|
50208
|
-
}], id: [{
|
|
50209
|
-
type: Input,
|
|
50210
|
-
args: ['p-id']
|
|
50211
|
-
}], label: [{
|
|
50212
|
-
type: Input,
|
|
50213
|
-
args: ['p-label']
|
|
50214
|
-
}], activated: [{
|
|
50215
|
-
type: Output,
|
|
50216
|
-
args: ['p-activated']
|
|
50217
|
-
}], changeState: [{
|
|
50218
|
-
type: Output,
|
|
50219
|
-
args: ['p-change-state']
|
|
50220
|
-
}], click: [{
|
|
50221
|
-
type: Output,
|
|
50222
|
-
args: ['p-click']
|
|
50223
|
-
}], active: [{
|
|
50224
|
-
type: Input,
|
|
50225
|
-
args: ['p-active']
|
|
50226
|
-
}], hide: [{
|
|
50227
|
-
type: Input,
|
|
50228
|
-
args: ['p-hide']
|
|
50229
|
-
}] } });
|
|
50230
|
-
|
|
50231
50133
|
/**
|
|
50232
50134
|
* @description
|
|
50233
50135
|
*
|
|
@@ -50236,13 +50138,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50236
50138
|
* Com este componente é possível atribuir um rótulo para auxiliar na identificação do conteúdo, ativar para que o mesmo seja exibido,
|
|
50237
50139
|
* desabilitar para impossibilitar o acesso, bem como ocultar para indisponibilizar a aba.
|
|
50238
50140
|
*
|
|
50239
|
-
* > Para controlar a navegação entre diversas abas, utilizar o componente [`po-tabs`](/documentation/po-tabs).
|
|
50141
|
+
* > Para controlar a navegação entre diversas abas, utilizar o componente [`po-tabs`](/documentation/po-tabs) ou [`po-context-tabs`](/documentation/po-context-tabs).
|
|
50240
50142
|
*/
|
|
50241
50143
|
class PoTabBaseComponent {
|
|
50242
50144
|
/** Rótulo da aba. */
|
|
50243
50145
|
label;
|
|
50146
|
+
/**
|
|
50147
|
+
* @optional
|
|
50148
|
+
*
|
|
50149
|
+
* @description
|
|
50150
|
+
*
|
|
50151
|
+
* Esconde o botão de fechar a aba.
|
|
50152
|
+
*
|
|
50153
|
+
* > Atenção: Propriedade disponível somente no `po-context-tabs`.
|
|
50154
|
+
*
|
|
50155
|
+
* @default `false`
|
|
50156
|
+
*/
|
|
50157
|
+
hideClose = false;
|
|
50244
50158
|
/** Método disparado ao clicar na aba. */
|
|
50245
50159
|
click = new EventEmitter();
|
|
50160
|
+
/**
|
|
50161
|
+
* @optional
|
|
50162
|
+
*
|
|
50163
|
+
* @description
|
|
50164
|
+
*
|
|
50165
|
+
* Evento disparado ao clicar no botão de fechar a aba.
|
|
50166
|
+
*
|
|
50167
|
+
* > Atenção: Propriedade disponível somente no `po-context-tabs`.
|
|
50168
|
+
*
|
|
50169
|
+
*/
|
|
50170
|
+
closeTab = new EventEmitter();
|
|
50246
50171
|
// ID da aba
|
|
50247
50172
|
id = uuid();
|
|
50248
50173
|
_active = false;
|
|
@@ -50289,6 +50214,8 @@ class PoTabBaseComponent {
|
|
|
50289
50214
|
*
|
|
50290
50215
|
* Oculta a aba.
|
|
50291
50216
|
*
|
|
50217
|
+
* > Atenção: Para correto funcionamento do componente, indicamos essa propriedade para esconder e exibir e não *ngIf.
|
|
50218
|
+
*
|
|
50292
50219
|
* @default `false`
|
|
50293
50220
|
*/
|
|
50294
50221
|
set hide(hide) {
|
|
@@ -50298,16 +50225,22 @@ class PoTabBaseComponent {
|
|
|
50298
50225
|
return this._hide;
|
|
50299
50226
|
}
|
|
50300
50227
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
50301
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
50228
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoTabBaseComponent, isStandalone: true, inputs: { label: ["p-label", "label"], hideClose: ["p-hide-close", "hideClose", convertToBoolean], active: ["p-active", "active"], disabled: ["p-disabled", "disabled"], hide: ["p-hide", "hide"] }, outputs: { click: "p-click", closeTab: "p-close-tab" }, ngImport: i0 });
|
|
50302
50229
|
}
|
|
50303
50230
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabBaseComponent, decorators: [{
|
|
50304
50231
|
type: Directive
|
|
50305
50232
|
}], propDecorators: { label: [{
|
|
50306
50233
|
type: Input,
|
|
50307
50234
|
args: ['p-label']
|
|
50235
|
+
}], hideClose: [{
|
|
50236
|
+
type: Input,
|
|
50237
|
+
args: [{ alias: 'p-hide-close', transform: convertToBoolean }]
|
|
50308
50238
|
}], click: [{
|
|
50309
50239
|
type: Output,
|
|
50310
50240
|
args: ['p-click']
|
|
50241
|
+
}], closeTab: [{
|
|
50242
|
+
type: Output,
|
|
50243
|
+
args: ['p-close-tab']
|
|
50311
50244
|
}], active: [{
|
|
50312
50245
|
type: Input,
|
|
50313
50246
|
args: ['p-active']
|
|
@@ -50324,8 +50257,8 @@ class PoTabsService {
|
|
|
50324
50257
|
onChangesTriggeredActiveSource = new Subject();
|
|
50325
50258
|
onChangesTriggered$ = this.onChangesTriggeredSource.asObservable();
|
|
50326
50259
|
triggerActiveOnChanges$ = this.onChangesTriggeredActiveSource.asObservable();
|
|
50327
|
-
triggerOnChanges() {
|
|
50328
|
-
this.onChangesTriggeredSource.next();
|
|
50260
|
+
triggerOnChanges(tab) {
|
|
50261
|
+
this.onChangesTriggeredSource.next(tab);
|
|
50329
50262
|
}
|
|
50330
50263
|
triggerActiveOnChanges(tab) {
|
|
50331
50264
|
this.onChangesTriggeredActiveSource.next(tab);
|
|
@@ -50346,6 +50279,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50346
50279
|
class PoTabComponent extends PoTabBaseComponent {
|
|
50347
50280
|
elementRef;
|
|
50348
50281
|
tabsService;
|
|
50282
|
+
// Propriedade interna utilizada no po-context-tabs
|
|
50283
|
+
removed = false;
|
|
50284
|
+
// Propriedade interna utilizada no po-context-tabs
|
|
50285
|
+
showTooltip = false;
|
|
50349
50286
|
constructor(elementRef, tabsService) {
|
|
50350
50287
|
super();
|
|
50351
50288
|
this.elementRef = elementRef;
|
|
@@ -50356,7 +50293,7 @@ class PoTabComponent extends PoTabBaseComponent {
|
|
|
50356
50293
|
}
|
|
50357
50294
|
ngOnChanges(changes) {
|
|
50358
50295
|
setTimeout(() => {
|
|
50359
|
-
this.tabsService.triggerOnChanges();
|
|
50296
|
+
this.tabsService.triggerOnChanges(this);
|
|
50360
50297
|
if (changes?.active?.currentValue) {
|
|
50361
50298
|
this.tabsService.triggerActiveOnChanges(this);
|
|
50362
50299
|
}
|
|
@@ -50373,6 +50310,183 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50373
50310
|
args: [{ selector: 'po-tab', standalone: false, template: "<ng-content></ng-content>\n" }]
|
|
50374
50311
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: PoTabsService }] });
|
|
50375
50312
|
|
|
50313
|
+
/**
|
|
50314
|
+
* @description
|
|
50315
|
+
*
|
|
50316
|
+
* #### Tokens customizáveis
|
|
50317
|
+
*
|
|
50318
|
+
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
50319
|
+
*
|
|
50320
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
50321
|
+
*
|
|
50322
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
50323
|
+
* |----------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------|
|
|
50324
|
+
* | **Default Values** | | |
|
|
50325
|
+
* | `--background` | Cor de background | `var(--color-transparent)` |
|
|
50326
|
+
* | `--background-item-default` | Cor de background do item padrão | `var(--color-transparent)` |
|
|
50327
|
+
* | `--border-radius` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
|
|
50328
|
+
* | `--color` | Cor da fonte padrão | `var(--color-action-default)` |
|
|
50329
|
+
* | `--color-baseline` | Cor para box-shadow | `var(--color-neutral-light-20)` |
|
|
50330
|
+
* | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
|
|
50331
|
+
* | `--font-size` | Tamanho da fonte | `var(--font-size-default)` |
|
|
50332
|
+
* | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
|
|
50333
|
+
* | `--margin-tabs-container-left` | Margem lateral esquerda do componente quando usado dentro de um `page-default` | `var(--spacing-md)` |
|
|
50334
|
+
* | `--margin-tabs-container-right` | Margem lateral direita do componente quando usado dentro de um `page-default` | `-16px` |
|
|
50335
|
+
* | `--padding-tabs-header` | Padding do valor lateral das abas | `var(--spacing-sm)` |
|
|
50336
|
+
* | `--margin-tabs-first-child` | Margem lateral da primeira aba | `var(--spacing-md)` |
|
|
50337
|
+
* | `--margin-tabs-last-child` | Margem lateral da ultima aba | `var(--spacing-md)` |
|
|
50338
|
+
* | **Disabled** | | |
|
|
50339
|
+
* | `--color-disabled` | Cor da fonte no estado disabilitado | `var(--color-action-disabled)` |
|
|
50340
|
+
* | `--background-item-disabled` | Cor de background do item desabilitado | `var(--color-neutral-light-10)` |
|
|
50341
|
+
* | **Focused** | | |
|
|
50342
|
+
* | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
|
|
50343
|
+
* | **Hover** | | |
|
|
50344
|
+
* | `--color-hover` | Cor principal no estado hover | `var(--color-brand-01-darkest)` |
|
|
50345
|
+
* | `--background-item-hover` | Cor de background no estado de hover | `var(--color-brand-01-lightest)` |
|
|
50346
|
+
* | **Selected** | | |
|
|
50347
|
+
* | `--background-item-selected` | Cor de background do item selecionado | `var(--color-brand-01-lightest)` |
|
|
50348
|
+
*
|
|
50349
|
+
* <br>
|
|
50350
|
+
*/
|
|
50351
|
+
class PoTabsBaseComponent {
|
|
50352
|
+
poThemeService;
|
|
50353
|
+
_size = undefined;
|
|
50354
|
+
/**
|
|
50355
|
+
* @optional
|
|
50356
|
+
*
|
|
50357
|
+
* @description
|
|
50358
|
+
*
|
|
50359
|
+
* Define o tamanho do componente:
|
|
50360
|
+
* - `small`: altura dos tabs como 32px (disponível apenas para acessibilidade AA).
|
|
50361
|
+
* - `medium`: altura dos tabs como 44px.
|
|
50362
|
+
*
|
|
50363
|
+
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
50364
|
+
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
50365
|
+
*
|
|
50366
|
+
* @default `medium`
|
|
50367
|
+
*/
|
|
50368
|
+
set size(value) {
|
|
50369
|
+
this._size = validateSize(value, this.poThemeService, PoFieldSize);
|
|
50370
|
+
}
|
|
50371
|
+
get size() {
|
|
50372
|
+
return this._size ?? getDefaultSize(this.poThemeService, PoFieldSize);
|
|
50373
|
+
}
|
|
50374
|
+
constructor(poThemeService) {
|
|
50375
|
+
this.poThemeService = poThemeService;
|
|
50376
|
+
}
|
|
50377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsBaseComponent, deps: [{ token: PoThemeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
50378
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.7", type: PoTabsBaseComponent, isStandalone: true, inputs: { size: ["p-size", "size"] }, ngImport: i0 });
|
|
50379
|
+
}
|
|
50380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsBaseComponent, decorators: [{
|
|
50381
|
+
type: Directive
|
|
50382
|
+
}], ctorParameters: () => [{ type: PoThemeService }], propDecorators: { size: [{
|
|
50383
|
+
type: Input,
|
|
50384
|
+
args: ['p-size']
|
|
50385
|
+
}] } });
|
|
50386
|
+
|
|
50387
|
+
/**
|
|
50388
|
+
* @docsPrivate
|
|
50389
|
+
*
|
|
50390
|
+
* @description
|
|
50391
|
+
*
|
|
50392
|
+
* Componente responsável por manipular os botões de aba.
|
|
50393
|
+
*/
|
|
50394
|
+
class PoTabButtonComponent {
|
|
50395
|
+
changeDetector;
|
|
50396
|
+
elementRef;
|
|
50397
|
+
tabButtom;
|
|
50398
|
+
// Desabilita o botão
|
|
50399
|
+
disabled;
|
|
50400
|
+
// Identificador do componente
|
|
50401
|
+
id;
|
|
50402
|
+
// Rótulo do botão
|
|
50403
|
+
label;
|
|
50404
|
+
// Função sera emitida quando a tab ficar ativada
|
|
50405
|
+
activated = new EventEmitter();
|
|
50406
|
+
// Função sera emitida quando a tab ficar desabilitada ou escondida
|
|
50407
|
+
changeState = new EventEmitter();
|
|
50408
|
+
// Método recebido do usuário para ser disparado quando clicar na aba
|
|
50409
|
+
click = new EventEmitter();
|
|
50410
|
+
_active;
|
|
50411
|
+
_hide;
|
|
50412
|
+
widthButton;
|
|
50413
|
+
// Ativa o botão
|
|
50414
|
+
set active(value) {
|
|
50415
|
+
this._active = value;
|
|
50416
|
+
this.emitActivated();
|
|
50417
|
+
}
|
|
50418
|
+
get active() {
|
|
50419
|
+
return this._active;
|
|
50420
|
+
}
|
|
50421
|
+
// Oculta o botão
|
|
50422
|
+
set hide(value) {
|
|
50423
|
+
this._hide = convertToBoolean(value);
|
|
50424
|
+
this.setDisplayOnHide();
|
|
50425
|
+
}
|
|
50426
|
+
get hide() {
|
|
50427
|
+
return this._hide;
|
|
50428
|
+
}
|
|
50429
|
+
constructor(changeDetector, elementRef) {
|
|
50430
|
+
this.changeDetector = changeDetector;
|
|
50431
|
+
this.elementRef = elementRef;
|
|
50432
|
+
}
|
|
50433
|
+
ngAfterViewInit() {
|
|
50434
|
+
this.widthButton = this.tabButtom.nativeElement.offsetWidth;
|
|
50435
|
+
this.changeDetector.detectChanges();
|
|
50436
|
+
}
|
|
50437
|
+
ngOnChanges(changes) {
|
|
50438
|
+
if ((changes.hide && changes.hide.currentValue) || (changes.disabled && changes.disabled.currentValue)) {
|
|
50439
|
+
this.changeState.emit(this);
|
|
50440
|
+
}
|
|
50441
|
+
}
|
|
50442
|
+
onClick() {
|
|
50443
|
+
if (!this.disabled) {
|
|
50444
|
+
this.click.emit(this.id);
|
|
50445
|
+
}
|
|
50446
|
+
}
|
|
50447
|
+
emitActivated() {
|
|
50448
|
+
if (this.active) {
|
|
50449
|
+
this.activated.emit(this);
|
|
50450
|
+
}
|
|
50451
|
+
}
|
|
50452
|
+
setDisplayOnHide() {
|
|
50453
|
+
this.elementRef.nativeElement.style.display = this.hide ? 'none' : '';
|
|
50454
|
+
}
|
|
50455
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
50456
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoTabButtonComponent, isStandalone: false, selector: "po-tab-button", inputs: { disabled: ["p-disabled", "disabled"], id: ["p-id", "id"], label: ["p-label", "label"], active: ["p-active", "active"], hide: ["p-hide", "hide"] }, outputs: { activated: "p-activated", changeState: "p-change-state", click: "p-click" }, viewQueries: [{ propertyName: "tabButtom", first: true, predicate: ["tabButtom"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <span class=\"po-tab-button-label po-text-ellipsis\">\n {{ label }}\n </span>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }] });
|
|
50457
|
+
}
|
|
50458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabButtonComponent, decorators: [{
|
|
50459
|
+
type: Component,
|
|
50460
|
+
args: [{ selector: 'po-tab-button', standalone: false, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (keyup.enter)=\"onClick()\"\n>\n <span class=\"po-tab-button-label po-text-ellipsis\">\n {{ label }}\n </span>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n" }]
|
|
50461
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { tabButtom: [{
|
|
50462
|
+
type: ViewChild,
|
|
50463
|
+
args: ['tabButtom', { static: true }]
|
|
50464
|
+
}], disabled: [{
|
|
50465
|
+
type: Input,
|
|
50466
|
+
args: ['p-disabled']
|
|
50467
|
+
}], id: [{
|
|
50468
|
+
type: Input,
|
|
50469
|
+
args: ['p-id']
|
|
50470
|
+
}], label: [{
|
|
50471
|
+
type: Input,
|
|
50472
|
+
args: ['p-label']
|
|
50473
|
+
}], activated: [{
|
|
50474
|
+
type: Output,
|
|
50475
|
+
args: ['p-activated']
|
|
50476
|
+
}], changeState: [{
|
|
50477
|
+
type: Output,
|
|
50478
|
+
args: ['p-change-state']
|
|
50479
|
+
}], click: [{
|
|
50480
|
+
type: Output,
|
|
50481
|
+
args: ['p-click']
|
|
50482
|
+
}], active: [{
|
|
50483
|
+
type: Input,
|
|
50484
|
+
args: ['p-active']
|
|
50485
|
+
}], hide: [{
|
|
50486
|
+
type: Input,
|
|
50487
|
+
args: ['p-hide']
|
|
50488
|
+
}] } });
|
|
50489
|
+
|
|
50376
50490
|
/**
|
|
50377
50491
|
* @docsPrivate
|
|
50378
50492
|
*
|
|
@@ -50483,7 +50597,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50483
50597
|
args: ['document:click', ['$event']]
|
|
50484
50598
|
}] } });
|
|
50485
50599
|
|
|
50600
|
+
const poTabsLiterals = {
|
|
50601
|
+
en: {
|
|
50602
|
+
moreTabs: 'More',
|
|
50603
|
+
close: 'Close Tab'
|
|
50604
|
+
},
|
|
50605
|
+
es: {
|
|
50606
|
+
moreTabs: 'Más',
|
|
50607
|
+
close: 'Cerrar pestaña'
|
|
50608
|
+
},
|
|
50609
|
+
pt: {
|
|
50610
|
+
moreTabs: 'Mais',
|
|
50611
|
+
close: 'Fechar Aba'
|
|
50612
|
+
},
|
|
50613
|
+
ru: {
|
|
50614
|
+
moreTabs: 'Ещё',
|
|
50615
|
+
close: 'Закрыть вкладку'
|
|
50616
|
+
}
|
|
50617
|
+
};
|
|
50618
|
+
const poTabsMaxNumberOfTabs = 5;
|
|
50486
50619
|
/**
|
|
50620
|
+
* @docsExtends PoTabsBaseComponent
|
|
50621
|
+
*
|
|
50487
50622
|
* @description
|
|
50488
50623
|
*
|
|
50489
50624
|
* O componente `po-tabs` é responsável por agrupar [abas](/documentation/po-tab) dispostas numa linha horizontal,
|
|
@@ -50502,93 +50637,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50502
50637
|
* - Evite utilizar uma quantidade excessiva de abas, pois irá gerar um *scroll* muito longo no `dropdown`;
|
|
50503
50638
|
* - Evite `labels` extensos para as `tabs` pois podem quebrar seu *layout*, use `labels` diretas, curtas e intuitivas.
|
|
50504
50639
|
*
|
|
50505
|
-
* #### Tokens customizáveis
|
|
50506
|
-
*
|
|
50507
|
-
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
50508
|
-
*
|
|
50509
|
-
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
50510
|
-
*
|
|
50511
|
-
* | Propriedade | Descrição | Valor Padrão |
|
|
50512
|
-
* |----------------------------------------|---------------------------------------------------------------------------------|---------------------------------------------------|
|
|
50513
|
-
* | **Default Values** | | |
|
|
50514
|
-
* | `--background` | Cor de background | `var(--color-transparent)` |
|
|
50515
|
-
* | `--background-item-default` | Cor de background do item padrão | `var(--color-transparent)` |
|
|
50516
|
-
* | `--border-radius` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
|
|
50517
|
-
* | `--color` | Cor da fonte padrão | `var(--color-action-default)` |
|
|
50518
|
-
* | `--color-baseline` | Cor para box-shadow | `var(--color-neutral-light-20)` |
|
|
50519
|
-
* | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
|
|
50520
|
-
* | `--font-size` | Tamanho da fonte | `var(--font-size-default)` |
|
|
50521
|
-
* | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
|
|
50522
|
-
* | `--margin-tabs-container-left` | Margem lateral esquerda do componente quando usado dentro de um `page-default` | `var(--spacing-md)` |
|
|
50523
|
-
* | `--margin-tabs-container-right` | Margem lateral direita do componente quando usado dentro de um `page-default` | `-16px` |
|
|
50524
|
-
* | `--padding-tabs-header` | Padding do valor lateral das abas | `var(--spacing-sm)` |
|
|
50525
|
-
* | `--margin-tabs-first-child` | Margem lateral da primeira aba | `var(--spacing-md)` |
|
|
50526
|
-
* | `--margin-tabs-last-child` | Margem lateral da ultima aba | `var(--spacing-md)` |
|
|
50527
|
-
* | **Disabled** | | |
|
|
50528
|
-
* | `--color-disabled` | Cor da fonte no estado disabilitado | `var(--color-action-disabled)` |
|
|
50529
|
-
* | `--background-item-disabled` | Cor de background do item desabilitado | `var(--color-neutral-light-10)` |
|
|
50530
|
-
* | **Focused** | | |
|
|
50531
|
-
* | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
|
|
50532
|
-
* | **Hover** | | |
|
|
50533
|
-
* | `--color-hover` | Cor principal no estado hover | `var(--color-brand-01-darkest)` |
|
|
50534
|
-
* | `--background-item-hover` | Cor de background no estado de hover | `var(--color-brand-01-lightest)` |
|
|
50535
|
-
* | **Selected** | | |
|
|
50536
|
-
* | `--background-item-selected` | Cor de background do item selecionado | `var(--color-brand-01-lightest)` |
|
|
50537
|
-
*
|
|
50538
|
-
*/
|
|
50539
|
-
class PoTabsBaseComponent {
|
|
50540
|
-
poThemeService;
|
|
50541
|
-
_size = undefined;
|
|
50542
|
-
/**
|
|
50543
|
-
* @optional
|
|
50544
|
-
*
|
|
50545
|
-
* @description
|
|
50546
|
-
*
|
|
50547
|
-
* Define o tamanho do componente:
|
|
50548
|
-
* - `small`: altura dos tabs como 32px (disponível apenas para acessibilidade AA).
|
|
50549
|
-
* - `medium`: altura dos tabs como 44px.
|
|
50550
|
-
*
|
|
50551
|
-
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
50552
|
-
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
50553
|
-
*
|
|
50554
|
-
* @default `medium`
|
|
50555
|
-
*/
|
|
50556
|
-
set size(value) {
|
|
50557
|
-
this._size = validateSize(value, this.poThemeService, PoFieldSize);
|
|
50558
|
-
}
|
|
50559
|
-
get size() {
|
|
50560
|
-
return this._size ?? getDefaultSize(this.poThemeService, PoFieldSize);
|
|
50561
|
-
}
|
|
50562
|
-
constructor(poThemeService) {
|
|
50563
|
-
this.poThemeService = poThemeService;
|
|
50564
|
-
}
|
|
50565
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsBaseComponent, deps: [{ token: PoThemeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
50566
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.7", type: PoTabsBaseComponent, isStandalone: true, inputs: { size: ["p-size", "size"] }, ngImport: i0 });
|
|
50567
|
-
}
|
|
50568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsBaseComponent, decorators: [{
|
|
50569
|
-
type: Directive
|
|
50570
|
-
}], ctorParameters: () => [{ type: PoThemeService }], propDecorators: { size: [{
|
|
50571
|
-
type: Input,
|
|
50572
|
-
args: ['p-size']
|
|
50573
|
-
}] } });
|
|
50574
|
-
|
|
50575
|
-
const poTabsLiterals = {
|
|
50576
|
-
en: {
|
|
50577
|
-
moreTabs: 'More'
|
|
50578
|
-
},
|
|
50579
|
-
es: {
|
|
50580
|
-
moreTabs: 'Más'
|
|
50581
|
-
},
|
|
50582
|
-
pt: {
|
|
50583
|
-
moreTabs: 'Mais'
|
|
50584
|
-
},
|
|
50585
|
-
ru: {
|
|
50586
|
-
moreTabs: 'Ещё'
|
|
50587
|
-
}
|
|
50588
|
-
};
|
|
50589
|
-
const poTabsMaxNumberOfTabs = 5;
|
|
50590
|
-
/**
|
|
50591
|
-
* @docsExtends PoTabsBaseComponent
|
|
50592
50640
|
*
|
|
50593
50641
|
* @example
|
|
50594
50642
|
*
|
|
@@ -50628,6 +50676,7 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50628
50676
|
tabsDropdown = [];
|
|
50629
50677
|
initializeCalculation = true;
|
|
50630
50678
|
initializeComponent = false;
|
|
50679
|
+
initCheckChangesTab = false;
|
|
50631
50680
|
quantityTabsButton;
|
|
50632
50681
|
defaultLastTabWidth;
|
|
50633
50682
|
previousActiveTab;
|
|
@@ -50646,8 +50695,8 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50646
50695
|
};
|
|
50647
50696
|
}
|
|
50648
50697
|
ngOnInit() {
|
|
50649
|
-
this.subscriptionTabsService = this.tabsService.onChangesTriggered$.subscribe(() => {
|
|
50650
|
-
this.updateTabsState();
|
|
50698
|
+
this.subscriptionTabsService = this.tabsService.onChangesTriggered$.subscribe((tab) => {
|
|
50699
|
+
this.updateTabsState(false, tab);
|
|
50651
50700
|
if (this.initializeComponent) {
|
|
50652
50701
|
this.handleKeyboardNavigationTab();
|
|
50653
50702
|
}
|
|
@@ -50666,6 +50715,9 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50666
50715
|
this.changeDetector.detectChanges();
|
|
50667
50716
|
this.handleKeyboardNavigationTab();
|
|
50668
50717
|
this.initializeComponent = true;
|
|
50718
|
+
setTimeout(() => {
|
|
50719
|
+
this.initCheckChangesTab = true;
|
|
50720
|
+
}, 500);
|
|
50669
50721
|
}
|
|
50670
50722
|
ngAfterContentInit() {
|
|
50671
50723
|
this.updateTabsState(true);
|
|
@@ -50722,12 +50774,19 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50722
50774
|
this.changeDetector.detectChanges();
|
|
50723
50775
|
}
|
|
50724
50776
|
}
|
|
50725
|
-
reorderTabs(tabToReorder) {
|
|
50777
|
+
reorderTabs(tabToReorder, lastTab) {
|
|
50726
50778
|
const tabsArray = this.tabsChildrenArray;
|
|
50727
50779
|
const tabIndex = tabsArray.findIndex(item => item.id === tabToReorder.id);
|
|
50728
50780
|
if (tabIndex !== -1) {
|
|
50729
|
-
|
|
50730
|
-
|
|
50781
|
+
if (lastTab) {
|
|
50782
|
+
const lastTabShowed = tabsArray.findIndex(item => item.id === lastTab.id);
|
|
50783
|
+
const [tab] = tabsArray.splice(tabIndex, 1);
|
|
50784
|
+
tabsArray.splice(lastTabShowed, 0, tab);
|
|
50785
|
+
}
|
|
50786
|
+
else {
|
|
50787
|
+
const [tab] = tabsArray.splice(tabIndex, 1);
|
|
50788
|
+
tabsArray.splice(this.quantityTabsButton - 1, 0, tab);
|
|
50789
|
+
}
|
|
50731
50790
|
}
|
|
50732
50791
|
this.tabsChildren.reset(tabsArray);
|
|
50733
50792
|
this.changeDetector.detectChanges();
|
|
@@ -50766,9 +50825,18 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50766
50825
|
});
|
|
50767
50826
|
}
|
|
50768
50827
|
// Movimenta a tab da visão de tabs para o dropdown, e vice-versa.
|
|
50769
|
-
changeTabPositionByDropdown(tabToActivate) {
|
|
50770
|
-
|
|
50771
|
-
|
|
50828
|
+
changeTabPositionByDropdown(tabToActivate, byContextsTabs = false) {
|
|
50829
|
+
let lastTab;
|
|
50830
|
+
if (byContextsTabs) {
|
|
50831
|
+
const tabsDefault = this.tabButton.filter(tab => !tab.nativeElement.hidden);
|
|
50832
|
+
lastTab = tabsDefault[tabsDefault.length - 1];
|
|
50833
|
+
this.tabsDefault = this.tabsDefault.filter(tab => tab.id !== lastTab.nativeElement.id);
|
|
50834
|
+
lastTab = { id: lastTab.nativeElement.id };
|
|
50835
|
+
}
|
|
50836
|
+
else {
|
|
50837
|
+
lastTab = this.tabsDefault[this.tabsDefault.length - 1];
|
|
50838
|
+
this.tabsDefault = this.tabsDefault.filter(tab => tab.id !== lastTab.id);
|
|
50839
|
+
}
|
|
50772
50840
|
this.tabsDefault.push(tabToActivate);
|
|
50773
50841
|
const _tabsDropdown = this.tabsDropdown.filter(tab => tab.id !== tabToActivate.id);
|
|
50774
50842
|
_tabsDropdown.unshift(lastTab);
|
|
@@ -50783,12 +50851,21 @@ class PoTabsComponent extends PoTabsBaseComponent {
|
|
|
50783
50851
|
this.changeDetector.detectChanges();
|
|
50784
50852
|
}
|
|
50785
50853
|
}
|
|
50786
|
-
updateTabsState(initialState = false) {
|
|
50854
|
+
updateTabsState(initialState = false, tab) {
|
|
50787
50855
|
this.defaultLastTabWidth = this.tabButton?.last?.nativeElement?.getBoundingClientRect().width;
|
|
50788
50856
|
if (this.defaultLastTabWidth <= 0) {
|
|
50789
50857
|
return;
|
|
50790
50858
|
}
|
|
50791
|
-
|
|
50859
|
+
this.executeTabsState(initialState);
|
|
50860
|
+
}
|
|
50861
|
+
executeTabsState(initialState, idByContextTabs) {
|
|
50862
|
+
let lastTabChildren;
|
|
50863
|
+
if (idByContextTabs) {
|
|
50864
|
+
lastTabChildren = this.tabsChildrenArray?.find(tab => tab.id === idByContextTabs);
|
|
50865
|
+
}
|
|
50866
|
+
else {
|
|
50867
|
+
lastTabChildren = this.tabsChildrenArray[this.quantityTabsButton - 1];
|
|
50868
|
+
}
|
|
50792
50869
|
if (lastTabChildren) {
|
|
50793
50870
|
lastTabChildren.widthButton = this.defaultLastTabWidth;
|
|
50794
50871
|
}
|
|
@@ -50969,7 +51046,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50969
51046
|
*/
|
|
50970
51047
|
class PoTabsModule {
|
|
50971
51048
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
50972
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: PoTabsModule, declarations: [PoTabButtonComponent, PoTabComponent, PoTabDropdownComponent, PoTabsComponent], imports: [CommonModule, PoPopoverModule, PoDropdownModule, PoTooltipModule, PoButtonModule, PoListBoxModule], exports: [PoTabComponent, PoTabsComponent] });
|
|
51049
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: PoTabsModule, declarations: [PoTabButtonComponent, PoTabComponent, PoTabDropdownComponent, PoTabsComponent], imports: [CommonModule, PoPopoverModule, PoDropdownModule, PoTooltipModule, PoButtonModule, PoListBoxModule], exports: [PoTabComponent, PoTabsComponent, PoTabButtonComponent, PoTabDropdownComponent] });
|
|
50973
51050
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsModule, providers: [PoTabsService], imports: [CommonModule, PoPopoverModule, PoDropdownModule, PoTooltipModule, PoButtonModule, PoListBoxModule] });
|
|
50974
51051
|
}
|
|
50975
51052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoTabsModule, decorators: [{
|
|
@@ -50977,11 +51054,360 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
50977
51054
|
args: [{
|
|
50978
51055
|
imports: [CommonModule, PoPopoverModule, PoDropdownModule, PoTooltipModule, PoButtonModule, PoListBoxModule],
|
|
50979
51056
|
declarations: [PoTabButtonComponent, PoTabComponent, PoTabDropdownComponent, PoTabsComponent],
|
|
50980
|
-
exports: [PoTabComponent, PoTabsComponent],
|
|
51057
|
+
exports: [PoTabComponent, PoTabsComponent, PoTabButtonComponent, PoTabDropdownComponent],
|
|
50981
51058
|
providers: [PoTabsService]
|
|
50982
51059
|
}]
|
|
50983
51060
|
}] });
|
|
50984
51061
|
|
|
51062
|
+
/**
|
|
51063
|
+
* @docsPrivate
|
|
51064
|
+
*
|
|
51065
|
+
* @description
|
|
51066
|
+
*
|
|
51067
|
+
* Componente responsável por manipular os botões de aba.
|
|
51068
|
+
*/
|
|
51069
|
+
class PoContextTabButtonComponent extends PoTabButtonComponent {
|
|
51070
|
+
hideClose = false;
|
|
51071
|
+
showTooltip = false;
|
|
51072
|
+
literals;
|
|
51073
|
+
close = new EventEmitter();
|
|
51074
|
+
// Função sera emitida quando ocorre mudança da visibilidade da tab
|
|
51075
|
+
changeVisible = new EventEmitter();
|
|
51076
|
+
activeCloseIcon = false;
|
|
51077
|
+
afterViewChecked = false;
|
|
51078
|
+
ngAfterViewInit() {
|
|
51079
|
+
this.afterViewChecked = true;
|
|
51080
|
+
this.widthButton = this.tabButtom.nativeElement.offsetWidth;
|
|
51081
|
+
this.changeDetector.detectChanges();
|
|
51082
|
+
}
|
|
51083
|
+
ngOnChanges(changes) {
|
|
51084
|
+
if (changes.hide?.currentValue || changes.disabled?.currentValue) {
|
|
51085
|
+
this.changeState.emit(this);
|
|
51086
|
+
}
|
|
51087
|
+
if (!changes.hide?.firstChange && changes.hide && this.afterViewChecked) {
|
|
51088
|
+
this.changeVisible.emit(this);
|
|
51089
|
+
}
|
|
51090
|
+
}
|
|
51091
|
+
closeTab(event) {
|
|
51092
|
+
if (event.code === 'ArrowLeft' || event.code === 'ArrowRight') {
|
|
51093
|
+
event.preventDefault();
|
|
51094
|
+
event.stopPropagation();
|
|
51095
|
+
}
|
|
51096
|
+
if ((!event.key || event?.key === 'Enter') && !this.disabled) {
|
|
51097
|
+
event.preventDefault();
|
|
51098
|
+
event.stopPropagation();
|
|
51099
|
+
this.close.emit(this.tabButtom);
|
|
51100
|
+
}
|
|
51101
|
+
}
|
|
51102
|
+
onFocusIn() {
|
|
51103
|
+
if (!this.disabled) {
|
|
51104
|
+
this.activeCloseIcon = true;
|
|
51105
|
+
}
|
|
51106
|
+
}
|
|
51107
|
+
onFocusOut() {
|
|
51108
|
+
this.activeCloseIcon = false;
|
|
51109
|
+
}
|
|
51110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
51111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoContextTabButtonComponent, isStandalone: false, selector: "po-context-tab-button", inputs: { hideClose: ["p-hide-close", "hideClose"], showTooltip: ["p-show-tooltip", "showTooltip"], literals: ["p-literals", "literals"] }, outputs: { close: "p-close", changeVisible: "p-change-visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 || showTooltip ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (keyup.enter)=\"onClick()\"\n>\n <div class=\"po-tab-button-content\">\n <span [ngClass]=\"!hideClose ? 'po-context-tab-button-label' : 'po-tab-button-label'\" class=\"po-text-ellipsis\">\n {{ label }}\n </span>\n <div\n class=\"po-tab-button-content-close-icon\"\n *ngIf=\"!hideClose\"\n (click)=\"closeTab($event)\"\n (keydown)=\"closeTab($event)\"\n >\n <po-icon\n [tabIndex]=\"activeCloseIcon ? 0 : -1\"\n [attr.aria-label]=\"literals.close\"\n p-icon=\"ICON_CLOSE\"\n class=\"po-tab-button-icon-close\"\n ></po-icon>\n </div>\n </div>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }] });
|
|
51112
|
+
}
|
|
51113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabButtonComponent, decorators: [{
|
|
51114
|
+
type: Component,
|
|
51115
|
+
args: [{ selector: 'po-context-tab-button', standalone: false, template: "<div\n #tabButtom\n role=\"tab\"\n [p-tooltip]=\"widthButton > 239 || showTooltip ? label : ''\"\n p-tooltip-position=\"top\"\n class=\"po-tab-button-default\"\n [id]=\"id\"\n [ngClass]=\"{ 'po-tab-focusable': !disabled && !hide }\"\n [attr.tabindex]=\"disabled ? null : 0\"\n [attr.aria-selected]=\"active\"\n [class.po-tab-button-active]=\"active\"\n [class.po-tab-button-disabled]=\"disabled\"\n (click)=\"onClick()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut()\"\n (keyup.enter)=\"onClick()\"\n>\n <div class=\"po-tab-button-content\">\n <span [ngClass]=\"!hideClose ? 'po-context-tab-button-label' : 'po-tab-button-label'\" class=\"po-text-ellipsis\">\n {{ label }}\n </span>\n <div\n class=\"po-tab-button-content-close-icon\"\n *ngIf=\"!hideClose\"\n (click)=\"closeTab($event)\"\n (keydown)=\"closeTab($event)\"\n >\n <po-icon\n [tabIndex]=\"activeCloseIcon ? 0 : -1\"\n [attr.aria-label]=\"literals.close\"\n p-icon=\"ICON_CLOSE\"\n class=\"po-tab-button-icon-close\"\n ></po-icon>\n </div>\n </div>\n</div>\n<div [ngClass]=\"{ 'po-tab-border-active': active, 'po-tab-border-disabled': !active }\"></div>\n" }]
|
|
51116
|
+
}], propDecorators: { hideClose: [{
|
|
51117
|
+
type: Input,
|
|
51118
|
+
args: ['p-hide-close']
|
|
51119
|
+
}], showTooltip: [{
|
|
51120
|
+
type: Input,
|
|
51121
|
+
args: ['p-show-tooltip']
|
|
51122
|
+
}], literals: [{
|
|
51123
|
+
type: Input,
|
|
51124
|
+
args: ['p-literals']
|
|
51125
|
+
}], close: [{
|
|
51126
|
+
type: Output,
|
|
51127
|
+
args: ['p-close']
|
|
51128
|
+
}], changeVisible: [{
|
|
51129
|
+
type: Output,
|
|
51130
|
+
args: ['p-change-visible']
|
|
51131
|
+
}] } });
|
|
51132
|
+
|
|
51133
|
+
/**
|
|
51134
|
+
* @docsExtends PoTabsBaseComponent
|
|
51135
|
+
*
|
|
51136
|
+
* @description
|
|
51137
|
+
*
|
|
51138
|
+
* O componente `po-context-tabs` é responsável por agrupar [abas](/documentation/po-tab) dispostas numa linha horizontal,
|
|
51139
|
+
* ideal para facilitar a organização de conteúdos.
|
|
51140
|
+
*
|
|
51141
|
+
* O componente exibirá as abas enquanto houver espaço na tela, caso a aba ultrapasse o limite da tela a mesma será agrupada em um dropdown.
|
|
51142
|
+
*
|
|
51143
|
+
* > As abas que estiverem agrupadas serão dispostas numa cascata suspensa que será exibida ao clicar no botão.
|
|
51144
|
+
*
|
|
51145
|
+
* É possível realizar a navegação entre as abas através da tecla SETAS(direita e esquerda) do teclado.
|
|
51146
|
+
* Caso uma aba estiver desabilitada, não receberá foco de navegação.
|
|
51147
|
+
*
|
|
51148
|
+
* #### Boas práticas
|
|
51149
|
+
*
|
|
51150
|
+
* - Evite utilizar um `po-context-tabs` dentro de outro `po-context-tabs`;
|
|
51151
|
+
* - Evite utilizar uma quantidade excessiva de abas, pois irá gerar um *scroll* muito longo no `dropdown`;
|
|
51152
|
+
* - Evite `labels` extensos para as `tabs` pois podem quebrar seu *layout*, use `labels` diretas, curtas e intuitivas.
|
|
51153
|
+
*
|
|
51154
|
+
*
|
|
51155
|
+
* @example
|
|
51156
|
+
*
|
|
51157
|
+
* <example name="po-context-tabs-basic" title="PO Context Tabs Basic">
|
|
51158
|
+
* <file name="sample-po-context-tabs-basic/sample-po-context-tabs-basic.component.html"> </file>
|
|
51159
|
+
* <file name="sample-po-context-tabs-basic/sample-po-context-tabs-basic.component.ts"> </file>
|
|
51160
|
+
* </example>
|
|
51161
|
+
*
|
|
51162
|
+
* <example name="po-context-tabs-labs" title="PO Context Tabs Labs">
|
|
51163
|
+
* <file name="sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.html"> </file>
|
|
51164
|
+
* <file name="sample-po-context-tabs-labs/sample-po-context-tabs-labs.component.ts"> </file>
|
|
51165
|
+
* </example>
|
|
51166
|
+
*
|
|
51167
|
+
* <example name="po-context-tabs-travel" title="PO Context Tabs - Travel">
|
|
51168
|
+
* <file name="sample-po-context-tabs-travel/sample-po-context-tabs-travel.component.html"> </file>
|
|
51169
|
+
* <file name="sample-po-context-tabs-travel/sample-po-context-tabs-travel.component.ts"> </file>
|
|
51170
|
+
* </example>
|
|
51171
|
+
*
|
|
51172
|
+
* <example name="po-context-tabs-business-conf" title="PO Context Tabs - Business Conference">
|
|
51173
|
+
* <file name="sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.html"> </file>
|
|
51174
|
+
* <file name="sample-po-context-tabs-business-conf/sample-po-context-tabs-business-conf.component.ts"> </file>
|
|
51175
|
+
* </example>
|
|
51176
|
+
*/
|
|
51177
|
+
class PoContextTabsComponent extends PoTabsComponent {
|
|
51178
|
+
byQuantityFunction;
|
|
51179
|
+
initialTabsWidth = [];
|
|
51180
|
+
sumOfWidth = 0;
|
|
51181
|
+
get isShowTabDropdown() {
|
|
51182
|
+
const tabsShowed = this.tabsChildren['_results'].filter(item => !item.hide);
|
|
51183
|
+
if (tabsShowed.length > this.quantityTabsButton) {
|
|
51184
|
+
return true;
|
|
51185
|
+
}
|
|
51186
|
+
return false;
|
|
51187
|
+
}
|
|
51188
|
+
// tabs que serão apresentadas na aba "Mais"
|
|
51189
|
+
get overflowedTabs() {
|
|
51190
|
+
return this.tabsChildren['_results'].filter(item => !item.hide)?.slice(this.quantityTabsButton);
|
|
51191
|
+
}
|
|
51192
|
+
get tabs() {
|
|
51193
|
+
return this.tabsChildren['_results'];
|
|
51194
|
+
}
|
|
51195
|
+
closeTab(tab) {
|
|
51196
|
+
tab.closeTab.emit(tab);
|
|
51197
|
+
const tabWidth = tab.widthButton || this.initialTabsWidth.find(initialTab => initialTab.id === tab.id)?.width;
|
|
51198
|
+
this.tabsChildren['_results'] = this.tabsChildren['_results'].filter(item => item.id !== tab.id);
|
|
51199
|
+
tab.removed = true;
|
|
51200
|
+
tab.hide = true;
|
|
51201
|
+
this.onTabChangeState(tab);
|
|
51202
|
+
tab.elementRef.nativeElement.remove();
|
|
51203
|
+
this.afterRemoveTab(tabWidth);
|
|
51204
|
+
}
|
|
51205
|
+
onChangeVisibilityTab(tab) {
|
|
51206
|
+
if (this.initialTabsWidth?.length) {
|
|
51207
|
+
const currentInitialTab = this.initialTabsWidth.find(t => t.id === tab.id);
|
|
51208
|
+
let tabWidth = tab.widthButton || currentInitialTab.width;
|
|
51209
|
+
if (!tab.hide) {
|
|
51210
|
+
const currentTabElement = this.tabButton.find(t => t.nativeElement.id === tab.id);
|
|
51211
|
+
tabWidth = currentTabElement.nativeElement.offsetWidth;
|
|
51212
|
+
currentInitialTab.width = tabWidth;
|
|
51213
|
+
tab.widthButton = tabWidth;
|
|
51214
|
+
this.changeDetector.detectChanges();
|
|
51215
|
+
this.calculateTabs(true);
|
|
51216
|
+
this.changeDetector.detectChanges();
|
|
51217
|
+
}
|
|
51218
|
+
else {
|
|
51219
|
+
this.afterRemoveTab(tabWidth);
|
|
51220
|
+
}
|
|
51221
|
+
}
|
|
51222
|
+
}
|
|
51223
|
+
afterRemoveTab(widthTab) {
|
|
51224
|
+
this.quantityTabsButton = this.quantityTabsButton - 1;
|
|
51225
|
+
this.changeDetector.detectChanges();
|
|
51226
|
+
const screenSize = this.containerTabs.nativeElement.offsetWidth;
|
|
51227
|
+
this.sumOfWidth = this.sumOfWidth - widthTab;
|
|
51228
|
+
for (const t of this.overflowedTabs) {
|
|
51229
|
+
if (!t.hide) {
|
|
51230
|
+
const firstItemDropdown = this.tabButton.find(tb => tb.nativeElement.id === t.id);
|
|
51231
|
+
const width = this.initialTabsWidth.find(i => i.id === firstItemDropdown.nativeElement.id)?.width;
|
|
51232
|
+
if (this.sumOfWidth + width <= screenSize ||
|
|
51233
|
+
screenSize < 1 ||
|
|
51234
|
+
this.quantityTabsButton < this.byQuantityFunction) {
|
|
51235
|
+
t.showTooltip = false;
|
|
51236
|
+
t.widthButton = undefined;
|
|
51237
|
+
firstItemDropdown.nativeElement.hidden = false;
|
|
51238
|
+
this.sumOfWidth += width;
|
|
51239
|
+
firstItemDropdown.nativeElement.style.width = '';
|
|
51240
|
+
firstItemDropdown.nativeElement.style.display = 'inline-block';
|
|
51241
|
+
this.quantityTabsButton = this.quantityTabsButton + 1;
|
|
51242
|
+
if (this.byQuantityFunction > 0 && this.byQuantityFunction === this.quantityTabsButton) {
|
|
51243
|
+
break;
|
|
51244
|
+
}
|
|
51245
|
+
}
|
|
51246
|
+
else {
|
|
51247
|
+
break;
|
|
51248
|
+
}
|
|
51249
|
+
}
|
|
51250
|
+
}
|
|
51251
|
+
this.changeDetector.detectChanges();
|
|
51252
|
+
this.handleKeyboardNavigationTab();
|
|
51253
|
+
}
|
|
51254
|
+
calculateTabs(initializeCalculation) {
|
|
51255
|
+
if (initializeCalculation) {
|
|
51256
|
+
this.sumOfWidth = 150;
|
|
51257
|
+
const screenSize = this.containerTabs.nativeElement.offsetWidth;
|
|
51258
|
+
const listTabButton = [];
|
|
51259
|
+
const isFirstCalculation = this.initialTabsWidth.length === 0;
|
|
51260
|
+
if (this.tabButton?.length) {
|
|
51261
|
+
let initDropdown = false;
|
|
51262
|
+
let index = 0;
|
|
51263
|
+
this.tabButton.forEach(element => {
|
|
51264
|
+
const width = element.nativeElement.offsetWidth;
|
|
51265
|
+
if (isFirstCalculation) {
|
|
51266
|
+
this.initialTabsWidth.push({ id: element.nativeElement.id, width });
|
|
51267
|
+
}
|
|
51268
|
+
if (this.byQuantityFunction && index > this.byQuantityFunction - 1) {
|
|
51269
|
+
initDropdown = true;
|
|
51270
|
+
}
|
|
51271
|
+
if (!initDropdown &&
|
|
51272
|
+
(this.sumOfWidth + width <= screenSize || screenSize < 1 || index < this.byQuantityFunction)) {
|
|
51273
|
+
if (!element.nativeElement.hidden) {
|
|
51274
|
+
listTabButton.push(element);
|
|
51275
|
+
this.sumOfWidth += width;
|
|
51276
|
+
}
|
|
51277
|
+
}
|
|
51278
|
+
else {
|
|
51279
|
+
initDropdown = true;
|
|
51280
|
+
element.nativeElement.style.display = 'none';
|
|
51281
|
+
element.nativeElement.hidden = true;
|
|
51282
|
+
}
|
|
51283
|
+
if (element.nativeElement.hidden && index <= this.byQuantityFunction - 1)
|
|
51284
|
+
return;
|
|
51285
|
+
index++;
|
|
51286
|
+
});
|
|
51287
|
+
}
|
|
51288
|
+
this.quantityTabsButton = this.byQuantityFunction || listTabButton.length;
|
|
51289
|
+
}
|
|
51290
|
+
}
|
|
51291
|
+
updateTabsState(initialState = false, tabs) {
|
|
51292
|
+
if (tabs && this.initCheckChangesTab) {
|
|
51293
|
+
this.checkChangesTabs();
|
|
51294
|
+
}
|
|
51295
|
+
const allVisibleItems = this.tabButton?.filter(tab => !tab.nativeElement.hidden);
|
|
51296
|
+
this.defaultLastTabWidth = allVisibleItems?.[allVisibleItems.length - 1]?.nativeElement.offsetWidth;
|
|
51297
|
+
if (!this.defaultLastTabWidth) {
|
|
51298
|
+
return;
|
|
51299
|
+
}
|
|
51300
|
+
this.executeTabsState(initialState, allVisibleItems?.[allVisibleItems.length - 1]?.nativeElement.id);
|
|
51301
|
+
}
|
|
51302
|
+
checkChangesTabs() {
|
|
51303
|
+
let index = 0;
|
|
51304
|
+
this.tabButton.forEach((tab, indexTab) => {
|
|
51305
|
+
const currentTab = this.initialTabsWidth.find(t => t.id === tab.nativeElement.id);
|
|
51306
|
+
const quantityTabs = this.byQuantityFunction || this.quantityTabsButton;
|
|
51307
|
+
if (tab.nativeElement.hidden && !this.tabsChildren['_results'][indexTab]?.hide) {
|
|
51308
|
+
tab.nativeElement.style.display = 'inline-block';
|
|
51309
|
+
tab.nativeElement.hidden = false;
|
|
51310
|
+
}
|
|
51311
|
+
if (!currentTab) {
|
|
51312
|
+
this.initialTabsWidth.push({ id: tab.nativeElement.id, width: tab.nativeElement.offsetWidth });
|
|
51313
|
+
if (index > quantityTabs - 1) {
|
|
51314
|
+
tab.nativeElement.style.display = 'none';
|
|
51315
|
+
tab.nativeElement.hidden = true;
|
|
51316
|
+
}
|
|
51317
|
+
this.tabsChildren['_results'] = this.tabsChildren['_results'].filter(item => !item.removed);
|
|
51318
|
+
}
|
|
51319
|
+
if (tab.nativeElement.hidden && index <= quantityTabs - 1)
|
|
51320
|
+
return;
|
|
51321
|
+
index++;
|
|
51322
|
+
});
|
|
51323
|
+
this.calculateTabs(true);
|
|
51324
|
+
}
|
|
51325
|
+
onTabActiveByDropdown(tab, eventEmitter = true) {
|
|
51326
|
+
if (tab.disabled) {
|
|
51327
|
+
this.onTabChangeState(tab);
|
|
51328
|
+
return;
|
|
51329
|
+
}
|
|
51330
|
+
const initialWidth = this.initialTabsWidth.find(t => t.id === tab.id);
|
|
51331
|
+
this.changeTabPositionByDropdown(tab, true);
|
|
51332
|
+
const showedTabs = this.tabButton.toArray().filter(tab => !tab.nativeElement.hidden);
|
|
51333
|
+
const lastTab = showedTabs[showedTabs.length - 1];
|
|
51334
|
+
const lastTabWidth = lastTab.nativeElement.offsetWidth;
|
|
51335
|
+
lastTab.nativeElement.style.display = 'none';
|
|
51336
|
+
lastTab.nativeElement.hidden = true;
|
|
51337
|
+
const currentTabIndex = this.tabButton.toArray().findIndex(t => t.nativeElement.id === tab.id);
|
|
51338
|
+
const currentTab = this.tabButton.toArray()[currentTabIndex].nativeElement;
|
|
51339
|
+
currentTab.hidden = false;
|
|
51340
|
+
currentTab.style.display = 'inline-block';
|
|
51341
|
+
this.reorderTabs(tab, lastTab.nativeElement);
|
|
51342
|
+
tab.widthButton = lastTabWidth;
|
|
51343
|
+
if (initialWidth.width > lastTabWidth) {
|
|
51344
|
+
tab.showTooltip = true;
|
|
51345
|
+
}
|
|
51346
|
+
currentTab.style.width = `${lastTabWidth}px`;
|
|
51347
|
+
this.handleKeyboardNavigationTab();
|
|
51348
|
+
if (eventEmitter) {
|
|
51349
|
+
tab.click.emit(tab);
|
|
51350
|
+
}
|
|
51351
|
+
}
|
|
51352
|
+
/**
|
|
51353
|
+
* Função que atribui o número de tabs fora do dropdown.
|
|
51354
|
+
*
|
|
51355
|
+
* Para utilizá-la é necessário ter a instância do componente no DOM, podendo ser utilizado o ViewChild da seguinte forma:
|
|
51356
|
+
*
|
|
51357
|
+
* ```
|
|
51358
|
+
* import { PoContextTabsComponent } from '@po-ui/ng-components';
|
|
51359
|
+
*
|
|
51360
|
+
* ...
|
|
51361
|
+
*
|
|
51362
|
+
* @ViewChild('poContextTabs', { static: true }) poContextTabs: PoContextTabsComponent;
|
|
51363
|
+
*
|
|
51364
|
+
* changeQuantityTabs() {
|
|
51365
|
+
* this.poContextTabs.setQuantityTabsButton(1); //Número de context-tabs
|
|
51366
|
+
* }
|
|
51367
|
+
* ```
|
|
51368
|
+
*/
|
|
51369
|
+
setQuantityTabsButton(number) {
|
|
51370
|
+
let callAfterFunction = false;
|
|
51371
|
+
const currentQuantity = this.byQuantityFunction || this.quantityTabsButton;
|
|
51372
|
+
if (number > currentQuantity) {
|
|
51373
|
+
callAfterFunction = true;
|
|
51374
|
+
}
|
|
51375
|
+
this.byQuantityFunction = number;
|
|
51376
|
+
if (!callAfterFunction) {
|
|
51377
|
+
this.quantityTabsButton = number;
|
|
51378
|
+
this.calculateTabs(true);
|
|
51379
|
+
}
|
|
51380
|
+
else {
|
|
51381
|
+
this.afterRemoveTab(0);
|
|
51382
|
+
this.quantityTabsButton = number;
|
|
51383
|
+
}
|
|
51384
|
+
}
|
|
51385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
51386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.7", type: PoContextTabsComponent, isStandalone: false, selector: "po-context-tabs", usesInheritance: true, ngImport: i0, template: "<div class=\"po-tabs-container\">\n <div #containerTabs class=\"po-tabs-header\">\n <div class=\"po-tabs-button-wrapper\" role=\"tablist\">\n <ng-container *ngFor=\"let tab of tabs; trackBy: trackByFn\">\n <po-context-tab-button\n *ngIf=\"!tab.removed\"\n #tabButton\n class=\"po-tab-button\"\n [class.po-tab-button-aa]=\"size === 'small'\"\n [p-active]=\"tab.active\"\n [p-disabled]=\"tab.disabled\"\n [p-show-tooltip]=\"tab.showTooltip\"\n [p-hide]=\"tab.hide\"\n [p-id]=\"tab.id\"\n [hidden]=\"tab.hide\"\n [p-hide-close]=\"tab.hideClose\"\n [attr.disabled]=\"tab.disabled\"\n [p-label]=\"tab.label\"\n [p-literals]=\"literals\"\n [id]=\"tab.id\"\n (keyup.enter)=\"closeListbox()\"\n (p-activated)=\"onTabActive(tab)\"\n (p-change-state)=\"onTabChangeState(tab)\"\n (p-change-visible)=\"onChangeVisibilityTab(tab)\"\n (p-click)=\"selectedTab(tab)\"\n (p-close)=\"closeTab(tab)\"\n >\n </po-context-tab-button>\n </ng-container>\n\n <po-tab-dropdown\n #tabDropdown\n *ngIf=\"isShowTabDropdown\"\n class=\"po-tab-dropdown\"\n [class.po-tab-dropdown-device]=\"!tabsDefault?.length\"\n [p-label]=\"literals.moreTabs\"\n [p-size]=\"size\"\n [p-tabs]=\"overflowedTabs\"\n (p-change-state)=\"onTabChangeState($event)\"\n (p-click)=\"onTabActiveByDropdown($event)\"\n >\n </po-tab-dropdown>\n </div>\n </div>\n</div>\n<div class=\"po-tabs-content\">\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PoTabDropdownComponent, selector: "po-tab-dropdown", inputs: ["p-label", "p-tabs", "p-size"], outputs: ["p-activated", "p-change-state", "p-click"] }, { kind: "component", type: PoContextTabButtonComponent, selector: "po-context-tab-button", inputs: ["p-hide-close", "p-show-tooltip", "p-literals"], outputs: ["p-close", "p-change-visible"] }] });
|
|
51387
|
+
}
|
|
51388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsComponent, decorators: [{
|
|
51389
|
+
type: Component,
|
|
51390
|
+
args: [{ selector: 'po-context-tabs', standalone: false, template: "<div class=\"po-tabs-container\">\n <div #containerTabs class=\"po-tabs-header\">\n <div class=\"po-tabs-button-wrapper\" role=\"tablist\">\n <ng-container *ngFor=\"let tab of tabs; trackBy: trackByFn\">\n <po-context-tab-button\n *ngIf=\"!tab.removed\"\n #tabButton\n class=\"po-tab-button\"\n [class.po-tab-button-aa]=\"size === 'small'\"\n [p-active]=\"tab.active\"\n [p-disabled]=\"tab.disabled\"\n [p-show-tooltip]=\"tab.showTooltip\"\n [p-hide]=\"tab.hide\"\n [p-id]=\"tab.id\"\n [hidden]=\"tab.hide\"\n [p-hide-close]=\"tab.hideClose\"\n [attr.disabled]=\"tab.disabled\"\n [p-label]=\"tab.label\"\n [p-literals]=\"literals\"\n [id]=\"tab.id\"\n (keyup.enter)=\"closeListbox()\"\n (p-activated)=\"onTabActive(tab)\"\n (p-change-state)=\"onTabChangeState(tab)\"\n (p-change-visible)=\"onChangeVisibilityTab(tab)\"\n (p-click)=\"selectedTab(tab)\"\n (p-close)=\"closeTab(tab)\"\n >\n </po-context-tab-button>\n </ng-container>\n\n <po-tab-dropdown\n #tabDropdown\n *ngIf=\"isShowTabDropdown\"\n class=\"po-tab-dropdown\"\n [class.po-tab-dropdown-device]=\"!tabsDefault?.length\"\n [p-label]=\"literals.moreTabs\"\n [p-size]=\"size\"\n [p-tabs]=\"overflowedTabs\"\n (p-change-state)=\"onTabChangeState($event)\"\n (p-click)=\"onTabActiveByDropdown($event)\"\n >\n </po-tab-dropdown>\n </div>\n </div>\n</div>\n<div class=\"po-tabs-content\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
51391
|
+
}] });
|
|
51392
|
+
|
|
51393
|
+
/**
|
|
51394
|
+
* @description
|
|
51395
|
+
* Módulo do componente po-context-tabs
|
|
51396
|
+
*/
|
|
51397
|
+
class PoContextTabsModule {
|
|
51398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
51399
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsModule, declarations: [PoContextTabsComponent, PoContextTabButtonComponent], imports: [CommonModule, PoIconModule, PoTooltipModule, PoTabsModule], exports: [PoContextTabsComponent] });
|
|
51400
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsModule, imports: [CommonModule, PoIconModule, PoTooltipModule, PoTabsModule] });
|
|
51401
|
+
}
|
|
51402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoContextTabsModule, decorators: [{
|
|
51403
|
+
type: NgModule,
|
|
51404
|
+
args: [{
|
|
51405
|
+
imports: [CommonModule, PoIconModule, PoTooltipModule, PoTabsModule],
|
|
51406
|
+
declarations: [PoContextTabsComponent, PoContextTabButtonComponent],
|
|
51407
|
+
exports: [PoContextTabsComponent]
|
|
51408
|
+
}]
|
|
51409
|
+
}] });
|
|
51410
|
+
|
|
50985
51411
|
const poToolbarActionsIconDefault = 'ICON_MORE';
|
|
50986
51412
|
/**
|
|
50987
51413
|
* @docsPrivate
|
|
@@ -51840,6 +52266,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
51840
52266
|
}]
|
|
51841
52267
|
}] });
|
|
51842
52268
|
|
|
52269
|
+
const poWidgetLiteralsDefault = {
|
|
52270
|
+
en: {
|
|
52271
|
+
help: 'Help',
|
|
52272
|
+
configuration: 'Settings'
|
|
52273
|
+
},
|
|
52274
|
+
es: {
|
|
52275
|
+
help: 'Ayuda',
|
|
52276
|
+
configuration: 'Ajustes'
|
|
52277
|
+
},
|
|
52278
|
+
pt: {
|
|
52279
|
+
help: 'Ajuda',
|
|
52280
|
+
configuration: 'Configurações'
|
|
52281
|
+
},
|
|
52282
|
+
ru: {
|
|
52283
|
+
help: 'Помощь',
|
|
52284
|
+
configuration: 'Настройки'
|
|
52285
|
+
}
|
|
52286
|
+
};
|
|
52287
|
+
|
|
51843
52288
|
/**
|
|
51844
52289
|
*
|
|
51845
52290
|
* @description
|
|
@@ -51853,6 +52298,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
51853
52298
|
* Para controlar sua largura, é possível utilizar o [Grid System](/guides/grid-system) para um maior
|
|
51854
52299
|
* controle de seu redimensionamento, assim possibilitando o tratamento para diferentes resoluções.
|
|
51855
52300
|
*
|
|
52301
|
+
* #### Boas práticas
|
|
52302
|
+
*
|
|
52303
|
+
* Utilize um tamanho mínimo de largura de aproximadamente `18.75rem` no componente.
|
|
52304
|
+
*
|
|
51856
52305
|
* #### Acessibilidade tratada no componente
|
|
51857
52306
|
*
|
|
51858
52307
|
* Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas. São elas:
|
|
@@ -51867,35 +52316,178 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
51867
52316
|
*
|
|
51868
52317
|
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
51869
52318
|
*
|
|
51870
|
-
* | Propriedade | Descrição | Valor Padrão
|
|
51871
|
-
*
|
|
51872
|
-
* | **Default Values** | |
|
|
51873
|
-
* | `--
|
|
51874
|
-
* | `--
|
|
51875
|
-
* | `--
|
|
51876
|
-
* | `--
|
|
51877
|
-
* | `--
|
|
51878
|
-
* | `--
|
|
51879
|
-
* |
|
|
51880
|
-
* | `--
|
|
51881
|
-
* | `--border-
|
|
51882
|
-
* |
|
|
51883
|
-
* | `--border-color
|
|
51884
|
-
* | `--
|
|
51885
|
-
* |
|
|
51886
|
-
* |
|
|
51887
|
-
* | `--
|
|
52319
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
52320
|
+
* |----------------------------------------------|------------------------------------------------------------------|-----------------------------------------------------------------------------|
|
|
52321
|
+
* | **Default Values** | | |
|
|
52322
|
+
* | `--font-family` | Família tipográfica usada | `var(--font-family-theme) ` |
|
|
52323
|
+
* | `--font-size` | Tamanho da fonte | `var(--font-size-sm)` |
|
|
52324
|
+
* | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
|
|
52325
|
+
* | `--font-color` | Cor da fonte | `var(--color-neutral-dark-95)` |
|
|
52326
|
+
* | `--padding` - `@deprecated 21.x.x` | Preenchimento do componente | `1rem` |
|
|
52327
|
+
* | `--padding-header` | Preenchimento do header | `var(--spacing-sm) var(--spacing-sm) var(--spacing-xs) var(--spacing-sm)` |
|
|
52328
|
+
* | `--padding-body` | Preenchimento do body | `var(--spacing-xs) var(--spacing-sm) var(--spacing-xs) var(--spacing-sm)` |
|
|
52329
|
+
* | `--padding-footer` | Preenchimento do footer | `var(--spacing-xs) var(--spacing-sm) var(--spacing-sm) var(--spacing-sm)` |
|
|
52330
|
+
* | `--border-radius` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-md)` |
|
|
52331
|
+
* | `--border-width` | Contém o valor da largura dos cantos do elemento | `var(--border-width-sm)` |
|
|
52332
|
+
* | `--border-color` | Cor da borda | `var(--color-neutral-light-20)` |
|
|
52333
|
+
* | `--background` | Cor de background | `var(--color-neutral-light-00)` |
|
|
52334
|
+
* | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-md)` |
|
|
52335
|
+
* | **Hover** | | |
|
|
52336
|
+
* | `--border-color-hover` | Cor da borda no estado hover | `var(--color-brand-01-dark)` |
|
|
52337
|
+
* | **Focused** | | |
|
|
52338
|
+
* | `--color-focused` | Cor principal no estado de focus | `var(--color-action-default)` |
|
|
52339
|
+
* | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
|
|
51888
52340
|
*
|
|
51889
52341
|
*/
|
|
51890
52342
|
class PoWidgetBaseComponent {
|
|
52343
|
+
poThemeService;
|
|
52344
|
+
_size = undefined;
|
|
51891
52345
|
/** Descrição da segunda ação. */
|
|
52346
|
+
/**
|
|
52347
|
+
* @optional
|
|
52348
|
+
*
|
|
52349
|
+
* @description
|
|
52350
|
+
* Define o label e exibe a ação secundária no footer do componente.
|
|
52351
|
+
*
|
|
52352
|
+
* > Exibida apenas quando `p-primary-label` estiver definida.
|
|
52353
|
+
*/
|
|
51892
52354
|
secondaryLabel;
|
|
51893
52355
|
/**
|
|
51894
52356
|
* @optional
|
|
51895
52357
|
*
|
|
51896
52358
|
* @description
|
|
51897
52359
|
*
|
|
51898
|
-
*
|
|
52360
|
+
* Caso verdadeiro o botão da ação `p-primary-label` ativará o modo `danger`.
|
|
52361
|
+
*
|
|
52362
|
+
* > Incompatível com o tipo **tertiary** da propriedade `p-kind-primary-action`.
|
|
52363
|
+
*
|
|
52364
|
+
* @default `false`
|
|
52365
|
+
*/
|
|
52366
|
+
dangerPrimaryAction = false;
|
|
52367
|
+
/**
|
|
52368
|
+
* @optional
|
|
52369
|
+
*
|
|
52370
|
+
* @description
|
|
52371
|
+
*
|
|
52372
|
+
* Caso verdadeiro o botão da ação `p-secondary-label` ativará o modo `danger`.
|
|
52373
|
+
*
|
|
52374
|
+
* > Incompatível com o tipo **tertiary** da propriedade `p-kind-primary-action`.
|
|
52375
|
+
*
|
|
52376
|
+
* @default `false`
|
|
52377
|
+
*/
|
|
52378
|
+
dangerSecondaryAction = false;
|
|
52379
|
+
/**
|
|
52380
|
+
* @optional
|
|
52381
|
+
*
|
|
52382
|
+
* @description
|
|
52383
|
+
*
|
|
52384
|
+
* Define o estilo do botão da ação `p-primary-label`, conforme o enum `PoButtonKind`.
|
|
52385
|
+
*
|
|
52386
|
+
* @default `tertiary`
|
|
52387
|
+
*/
|
|
52388
|
+
kindPrimaryAction;
|
|
52389
|
+
/**
|
|
52390
|
+
* @optional
|
|
52391
|
+
*
|
|
52392
|
+
* @description
|
|
52393
|
+
*
|
|
52394
|
+
* Define o estilo do botão da ação `p-secondary-label`, conforme o enum `PoButtonKind`.
|
|
52395
|
+
*
|
|
52396
|
+
* @default `tertiary`
|
|
52397
|
+
*/
|
|
52398
|
+
kindSecondaryAction;
|
|
52399
|
+
/**
|
|
52400
|
+
* @optional
|
|
52401
|
+
*
|
|
52402
|
+
* @description
|
|
52403
|
+
*
|
|
52404
|
+
* Label da tag exibida no header.
|
|
52405
|
+
*
|
|
52406
|
+
* > Quando a tag atingir uma largura máxima de 15rem (240px), será truncado com reticências.
|
|
52407
|
+
* O conteúdo completo poderá ser visualizado ao passar o mouse sobre a tag, por meio do tooltip.
|
|
52408
|
+
*/
|
|
52409
|
+
tagLabel;
|
|
52410
|
+
/**
|
|
52411
|
+
* @optional
|
|
52412
|
+
*
|
|
52413
|
+
* @description
|
|
52414
|
+
*
|
|
52415
|
+
* Define o tipo da `p-tag`, conforme o enum **PoTagType**.
|
|
52416
|
+
*
|
|
52417
|
+
* Valores válidos:
|
|
52418
|
+
* - `success`: cor verde utilizada para simbolizar sucesso ou êxito.
|
|
52419
|
+
* - `warning`: cor amarela que representa aviso ou advertência.
|
|
52420
|
+
* - `danger`: cor vermelha para erro ou aviso crítico.
|
|
52421
|
+
* - `info`: cor azul claro que caracteriza conteúdo informativo.
|
|
52422
|
+
* - `neutral`: cor cinza claro para uso geral.
|
|
52423
|
+
*
|
|
52424
|
+
* @default `success`
|
|
52425
|
+
*/
|
|
52426
|
+
tagType;
|
|
52427
|
+
/**
|
|
52428
|
+
* @optional
|
|
52429
|
+
*
|
|
52430
|
+
* @description
|
|
52431
|
+
*
|
|
52432
|
+
* Define o ícone exibido ao lado do label da `p-tag`.
|
|
52433
|
+
*
|
|
52434
|
+
* É possível usar qualquer um dos ícones da [Biblioteca de ícones PO UI](https://po-ui.io/icons), conforme exemplo:
|
|
52435
|
+
* ```
|
|
52436
|
+
* <po-widget p-tag-icon="an an-user"></po-widget>
|
|
52437
|
+
* ```
|
|
52438
|
+
* Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
|
|
52439
|
+
* esteja carregada no projeto:
|
|
52440
|
+
* ```
|
|
52441
|
+
* <po-widget p-tag-icon="fa fa-podcast"></po-widget>
|
|
52442
|
+
* ```
|
|
52443
|
+
*
|
|
52444
|
+
* Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
|
|
52445
|
+
* ```
|
|
52446
|
+
* <po-widget [p-tag-icon]="template"></po-widget>
|
|
52447
|
+
*
|
|
52448
|
+
* <ng-template #template>
|
|
52449
|
+
* <i class="fa fa-podcast" style="font-size: inherit;"></i>
|
|
52450
|
+
* </ng-template>
|
|
52451
|
+
* ```
|
|
52452
|
+
* > Para o ícone enquadrar corretamente, deve-se utilizar `font-size: inherit` caso o ícone utilizado não aplique-o.
|
|
52453
|
+
*/
|
|
52454
|
+
tagIcon;
|
|
52455
|
+
/**
|
|
52456
|
+
* @optional
|
|
52457
|
+
*
|
|
52458
|
+
* @description
|
|
52459
|
+
*
|
|
52460
|
+
* Lista de ações exibidas no header do componente.
|
|
52461
|
+
* As propriedades das ações seguem a interface `PoPopupAction`.
|
|
52462
|
+
*/
|
|
52463
|
+
actions = [];
|
|
52464
|
+
/**
|
|
52465
|
+
* @optional
|
|
52466
|
+
*
|
|
52467
|
+
* @description
|
|
52468
|
+
*
|
|
52469
|
+
* Define o tamanho dos botões do componente:
|
|
52470
|
+
* - `small`: altura de 32px (disponível apenas para acessibilidade AA).
|
|
52471
|
+
* - `medium`: altura de 44px.
|
|
52472
|
+
*
|
|
52473
|
+
* > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
|
|
52474
|
+
* Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
|
|
52475
|
+
*
|
|
52476
|
+
* @default `medium`
|
|
52477
|
+
*/
|
|
52478
|
+
set size(value) {
|
|
52479
|
+
this._size = validateSize(value, this.poThemeService, PoFieldSize);
|
|
52480
|
+
}
|
|
52481
|
+
get size() {
|
|
52482
|
+
return this._size ?? getDefaultSize(this.poThemeService, PoFieldSize);
|
|
52483
|
+
}
|
|
52484
|
+
/**
|
|
52485
|
+
* @optional
|
|
52486
|
+
*
|
|
52487
|
+
* @description
|
|
52488
|
+
*
|
|
52489
|
+
* Evento disparado quando o usuário clicar no componente.
|
|
52490
|
+
* > Quando este evento está em uso, uma sombra (shadow) é aplicada automaticamente ao componente.
|
|
51899
52491
|
*/
|
|
51900
52492
|
click = new EventEmitter();
|
|
51901
52493
|
/**
|
|
@@ -51903,7 +52495,7 @@ class PoWidgetBaseComponent {
|
|
|
51903
52495
|
*
|
|
51904
52496
|
* @description
|
|
51905
52497
|
*
|
|
51906
|
-
*
|
|
52498
|
+
* Evento disparado quando a propriedade `p-disabled` for alterada.
|
|
51907
52499
|
*/
|
|
51908
52500
|
onDisabled = new EventEmitter();
|
|
51909
52501
|
/**
|
|
@@ -51911,7 +52503,7 @@ class PoWidgetBaseComponent {
|
|
|
51911
52503
|
*
|
|
51912
52504
|
* @description
|
|
51913
52505
|
*
|
|
51914
|
-
*
|
|
52506
|
+
* Evento disparado ao clicar na ação `p-primary-label`.
|
|
51915
52507
|
*/
|
|
51916
52508
|
primaryAction = new EventEmitter();
|
|
51917
52509
|
/**
|
|
@@ -51919,21 +52511,21 @@ class PoWidgetBaseComponent {
|
|
|
51919
52511
|
*
|
|
51920
52512
|
* @description
|
|
51921
52513
|
*
|
|
51922
|
-
*
|
|
52514
|
+
* Evento disparado ao clicar na ação `p-secondary-label`.
|
|
51923
52515
|
*/
|
|
51924
52516
|
secondaryAction = new EventEmitter();
|
|
51925
52517
|
/**
|
|
51926
52518
|
* @optional
|
|
51927
52519
|
*
|
|
51928
52520
|
* @description
|
|
51929
|
-
*
|
|
52521
|
+
* Evento disparado ao clicar em **Configurações** incluído no menu de ações do header.
|
|
51930
52522
|
*/
|
|
51931
52523
|
setting = new EventEmitter();
|
|
51932
52524
|
/**
|
|
51933
52525
|
* @optional
|
|
51934
52526
|
*
|
|
51935
52527
|
* @description
|
|
51936
|
-
*
|
|
52528
|
+
* Evento disparado ao clicar no título definido em `p-title`.
|
|
51937
52529
|
*/
|
|
51938
52530
|
titleAction = new EventEmitter();
|
|
51939
52531
|
containerHeight = 'auto';
|
|
@@ -51951,7 +52543,7 @@ class PoWidgetBaseComponent {
|
|
|
51951
52543
|
*
|
|
51952
52544
|
* @description
|
|
51953
52545
|
*
|
|
51954
|
-
*
|
|
52546
|
+
* Define uma imagem de fundo.
|
|
51955
52547
|
* > Se a imagem escolhida intervir na legibilidade do texto contido no `p-widget`,
|
|
51956
52548
|
* pode-se utilizar a propriedade `p-primary` em conjunto para que os textos fiquem na cor branca.
|
|
51957
52549
|
*
|
|
@@ -51967,7 +52559,7 @@ class PoWidgetBaseComponent {
|
|
|
51967
52559
|
*
|
|
51968
52560
|
* @description
|
|
51969
52561
|
*
|
|
51970
|
-
* Desabilita
|
|
52562
|
+
* Desabilita o componente.
|
|
51971
52563
|
*
|
|
51972
52564
|
* @default `false`
|
|
51973
52565
|
*/
|
|
@@ -51983,9 +52575,7 @@ class PoWidgetBaseComponent {
|
|
|
51983
52575
|
*
|
|
51984
52576
|
* @description
|
|
51985
52577
|
*
|
|
51986
|
-
* Define a altura do
|
|
51987
|
-
* A altura mínima para o `po-widget` depende do que será exibido através das propriedades `p-primary-label`,
|
|
51988
|
-
* `p-setting`, `p-help` e `p-title`.
|
|
52578
|
+
* Define a altura do componente.
|
|
51989
52579
|
* > Caso não seja informado valor, a propriedade irá assumir o tamanho do conteúdo.
|
|
51990
52580
|
*/
|
|
51991
52581
|
set height(value) {
|
|
@@ -52000,7 +52590,7 @@ class PoWidgetBaseComponent {
|
|
|
52000
52590
|
*
|
|
52001
52591
|
* @description
|
|
52002
52592
|
*
|
|
52003
|
-
* Link de ajuda
|
|
52593
|
+
* Link de ajuda incluído no menu de ações do header.
|
|
52004
52594
|
*/
|
|
52005
52595
|
set help(value) {
|
|
52006
52596
|
this._help = isTypeof(value, 'string') ? value : '';
|
|
@@ -52015,7 +52605,8 @@ class PoWidgetBaseComponent {
|
|
|
52015
52605
|
*
|
|
52016
52606
|
* @description
|
|
52017
52607
|
*
|
|
52018
|
-
* Desabilita a sombra do
|
|
52608
|
+
* Desabilita a sombra do componente quando o mesmo for clicável.
|
|
52609
|
+
* > A sombra é exibida por padrão apenas quando o evento `p-click` está definido.
|
|
52019
52610
|
*
|
|
52020
52611
|
* @default `true`
|
|
52021
52612
|
*/
|
|
@@ -52046,9 +52637,8 @@ class PoWidgetBaseComponent {
|
|
|
52046
52637
|
*
|
|
52047
52638
|
* @description
|
|
52048
52639
|
*
|
|
52049
|
-
*
|
|
52640
|
+
* Define o label e exibe a ação primária no footer do componente.
|
|
52050
52641
|
*
|
|
52051
|
-
* @default `false`
|
|
52052
52642
|
*/
|
|
52053
52643
|
set primaryLabel(value) {
|
|
52054
52644
|
this._primaryLabel = isTypeof(value, 'string') ? value : '';
|
|
@@ -52062,9 +52652,10 @@ class PoWidgetBaseComponent {
|
|
|
52062
52652
|
*
|
|
52063
52653
|
* @description
|
|
52064
52654
|
*
|
|
52065
|
-
* Título do
|
|
52655
|
+
* Título do componente.
|
|
52066
52656
|
*
|
|
52067
|
-
*
|
|
52657
|
+
* > Quando o conteúdo exceder o espaço disponível, o texto será truncado com reticências. O conteúdo completo poderá
|
|
52658
|
+
* ser visualizado ao passar o mouse sobre a tag, por meio do tooltip.
|
|
52068
52659
|
*/
|
|
52069
52660
|
set title(value) {
|
|
52070
52661
|
this._title = isTypeof(value, 'string') ? value : '';
|
|
@@ -52073,14 +52664,44 @@ class PoWidgetBaseComponent {
|
|
|
52073
52664
|
get title() {
|
|
52074
52665
|
return this._title;
|
|
52075
52666
|
}
|
|
52076
|
-
|
|
52077
|
-
|
|
52667
|
+
constructor(poThemeService) {
|
|
52668
|
+
this.poThemeService = poThemeService;
|
|
52669
|
+
}
|
|
52670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetBaseComponent, deps: [{ token: PoThemeService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
52671
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoWidgetBaseComponent, isStandalone: true, inputs: { secondaryLabel: ["p-secondary-label", "secondaryLabel"], dangerPrimaryAction: ["p-danger-primary-action", "dangerPrimaryAction", convertToBoolean], dangerSecondaryAction: ["p-danger-secondary-action", "dangerSecondaryAction", convertToBoolean], kindPrimaryAction: ["p-kind-primary-action", "kindPrimaryAction"], kindSecondaryAction: ["p-kind-secondary-action", "kindSecondaryAction"], tagLabel: ["p-tag", "tagLabel"], tagType: ["p-tag-type", "tagType"], tagIcon: ["p-tag-icon", "tagIcon"], actions: ["p-actions", "actions"], size: ["p-size", "size"], background: ["p-background", "background"], disabled: ["p-disabled", "disabled"], height: ["p-height", "height"], help: ["p-help", "help"], noShadow: ["p-no-shadow", "noShadow"], primary: ["p-primary", "primary"], primaryLabel: ["p-primary-label", "primaryLabel"], title: ["p-title", "title"] }, outputs: { click: "p-click", onDisabled: "p-on-disabled", primaryAction: "p-primary-action", secondaryAction: "p-secondary-action", setting: "p-setting", titleAction: "p-title-action" }, ngImport: i0 });
|
|
52078
52672
|
}
|
|
52079
52673
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetBaseComponent, decorators: [{
|
|
52080
52674
|
type: Directive
|
|
52081
|
-
}], propDecorators: { secondaryLabel: [{
|
|
52675
|
+
}], ctorParameters: () => [{ type: PoThemeService }], propDecorators: { secondaryLabel: [{
|
|
52082
52676
|
type: Input,
|
|
52083
52677
|
args: ['p-secondary-label']
|
|
52678
|
+
}], dangerPrimaryAction: [{
|
|
52679
|
+
type: Input,
|
|
52680
|
+
args: [{ alias: 'p-danger-primary-action', transform: convertToBoolean }]
|
|
52681
|
+
}], dangerSecondaryAction: [{
|
|
52682
|
+
type: Input,
|
|
52683
|
+
args: [{ alias: 'p-danger-secondary-action', transform: convertToBoolean }]
|
|
52684
|
+
}], kindPrimaryAction: [{
|
|
52685
|
+
type: Input,
|
|
52686
|
+
args: ['p-kind-primary-action']
|
|
52687
|
+
}], kindSecondaryAction: [{
|
|
52688
|
+
type: Input,
|
|
52689
|
+
args: ['p-kind-secondary-action']
|
|
52690
|
+
}], tagLabel: [{
|
|
52691
|
+
type: Input,
|
|
52692
|
+
args: ['p-tag']
|
|
52693
|
+
}], tagType: [{
|
|
52694
|
+
type: Input,
|
|
52695
|
+
args: ['p-tag-type']
|
|
52696
|
+
}], tagIcon: [{
|
|
52697
|
+
type: Input,
|
|
52698
|
+
args: ['p-tag-icon']
|
|
52699
|
+
}], actions: [{
|
|
52700
|
+
type: Input,
|
|
52701
|
+
args: ['p-actions']
|
|
52702
|
+
}], size: [{
|
|
52703
|
+
type: Input,
|
|
52704
|
+
args: [{ alias: 'p-size' }]
|
|
52084
52705
|
}], click: [{
|
|
52085
52706
|
type: Output,
|
|
52086
52707
|
args: ['p-click']
|
|
@@ -52152,17 +52773,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
52152
52773
|
*
|
|
52153
52774
|
*/
|
|
52154
52775
|
class PoWidgetComponent extends PoWidgetBaseComponent {
|
|
52776
|
+
cd;
|
|
52777
|
+
poTheme;
|
|
52778
|
+
popupTarget;
|
|
52779
|
+
literals;
|
|
52780
|
+
hasContent = false;
|
|
52781
|
+
poPopupComponent;
|
|
52782
|
+
buttonPopUp;
|
|
52783
|
+
wrapperInfo;
|
|
52784
|
+
wrapperTitle;
|
|
52785
|
+
tagElement;
|
|
52786
|
+
contentContainer;
|
|
52155
52787
|
get showTitleAction() {
|
|
52156
52788
|
return !!this.titleAction.observers[0];
|
|
52157
52789
|
}
|
|
52158
|
-
constructor(viewRef) {
|
|
52159
|
-
super();
|
|
52790
|
+
constructor(viewRef, languageService, cd, poTheme) {
|
|
52791
|
+
super(poTheme);
|
|
52792
|
+
this.cd = cd;
|
|
52793
|
+
this.poTheme = poTheme;
|
|
52794
|
+
const language = languageService.getShortLanguage();
|
|
52795
|
+
this.literals = {
|
|
52796
|
+
...poWidgetLiteralsDefault[poLocaleDefault],
|
|
52797
|
+
...poWidgetLiteralsDefault[language]
|
|
52798
|
+
};
|
|
52799
|
+
}
|
|
52800
|
+
ngAfterViewInit() {
|
|
52801
|
+
this.updateContent();
|
|
52802
|
+
}
|
|
52803
|
+
get a11Level() {
|
|
52804
|
+
return this.poTheme.getA11yLevel();
|
|
52805
|
+
}
|
|
52806
|
+
ngOnChanges(changes) {
|
|
52807
|
+
if (changes['help'] || changes['actions']) {
|
|
52808
|
+
this.checkDefaultActions();
|
|
52809
|
+
}
|
|
52810
|
+
if (changes['title'] || changes['tagLabel']) {
|
|
52811
|
+
this.cd.detectChanges();
|
|
52812
|
+
}
|
|
52813
|
+
this.updateContent();
|
|
52814
|
+
this.setHeight(this.height);
|
|
52160
52815
|
}
|
|
52161
52816
|
ngOnInit() {
|
|
52162
52817
|
this.setHeight(this.height);
|
|
52818
|
+
this.checkDefaultActions();
|
|
52819
|
+
this.showTooltip();
|
|
52820
|
+
this.cd.detectChanges();
|
|
52163
52821
|
}
|
|
52164
52822
|
hasTitleHelpOrSetting() {
|
|
52165
|
-
return !!this.title || !!this.help || !!this.setting.observers[0];
|
|
52823
|
+
return !!this.title || !!this.help || !!this.setting.observers[0] || !!this.tagLabel || !!this?.actions.length;
|
|
52166
52824
|
}
|
|
52167
52825
|
onClick(event) {
|
|
52168
52826
|
if (this.click.observed && !this.disabled) {
|
|
@@ -52177,21 +52835,18 @@ class PoWidgetComponent extends PoWidgetBaseComponent {
|
|
|
52177
52835
|
event.preventDefault();
|
|
52178
52836
|
}
|
|
52179
52837
|
}
|
|
52180
|
-
openHelp(
|
|
52838
|
+
openHelp() {
|
|
52181
52839
|
if (!this.disabled) {
|
|
52182
|
-
event.stopPropagation();
|
|
52183
52840
|
window.open(this.help, '_blank');
|
|
52184
52841
|
}
|
|
52185
52842
|
}
|
|
52186
|
-
runPrimaryAction(
|
|
52843
|
+
runPrimaryAction() {
|
|
52187
52844
|
if (!this.disabled) {
|
|
52188
|
-
event.stopPropagation();
|
|
52189
52845
|
this.primaryAction.emit();
|
|
52190
52846
|
}
|
|
52191
52847
|
}
|
|
52192
|
-
runSecondaryAction(
|
|
52848
|
+
runSecondaryAction() {
|
|
52193
52849
|
if (!this.disabled) {
|
|
52194
|
-
event.stopPropagation();
|
|
52195
52850
|
this.secondaryAction.emit();
|
|
52196
52851
|
}
|
|
52197
52852
|
}
|
|
@@ -52202,25 +52857,24 @@ class PoWidgetComponent extends PoWidgetBaseComponent {
|
|
|
52202
52857
|
}
|
|
52203
52858
|
}
|
|
52204
52859
|
setHeight(height) {
|
|
52860
|
+
this.checkDefaultActions();
|
|
52861
|
+
const actionsHeight = this.a11Level === 'AA' && this.size === 'small' ? 56 : 68;
|
|
52862
|
+
const actionsButton = this.a11Level === 'AA' && this.size === 'small' ? 56 : 68;
|
|
52205
52863
|
if (height) {
|
|
52206
|
-
let bodyHeight = height;
|
|
52207
|
-
|
|
52208
|
-
|
|
52209
|
-
|
|
52210
|
-
|
|
52211
|
-
|
|
52212
|
-
|
|
52213
|
-
|
|
52214
|
-
bodyHeight -= shadowHeight;
|
|
52215
|
-
}
|
|
52216
|
-
if (hasSettingOrHelp && !this.title) {
|
|
52217
|
-
bodyHeight -= settingHeight;
|
|
52864
|
+
let bodyHeight = height - 2;
|
|
52865
|
+
if ((this.title || this.tagLabel) && !this.actions.length) {
|
|
52866
|
+
if (this.tagLabel && this.tagIcon) {
|
|
52867
|
+
bodyHeight -= 50;
|
|
52868
|
+
}
|
|
52869
|
+
else {
|
|
52870
|
+
bodyHeight -= 48;
|
|
52871
|
+
}
|
|
52218
52872
|
}
|
|
52219
|
-
if (this.
|
|
52220
|
-
bodyHeight -=
|
|
52873
|
+
if (this.actions.length) {
|
|
52874
|
+
bodyHeight -= actionsHeight;
|
|
52221
52875
|
}
|
|
52222
|
-
if (this.primaryLabel) {
|
|
52223
|
-
bodyHeight -=
|
|
52876
|
+
if (this.primaryLabel || this.secondaryLabel) {
|
|
52877
|
+
bodyHeight -= actionsButton;
|
|
52224
52878
|
}
|
|
52225
52879
|
this.containerHeight = `${bodyHeight}px`;
|
|
52226
52880
|
}
|
|
@@ -52228,19 +52882,97 @@ class PoWidgetComponent extends PoWidgetBaseComponent {
|
|
|
52228
52882
|
this.containerHeight = `auto`;
|
|
52229
52883
|
}
|
|
52230
52884
|
}
|
|
52231
|
-
settingOutput(
|
|
52885
|
+
settingOutput() {
|
|
52232
52886
|
if (!this.disabled) {
|
|
52233
|
-
event.stopPropagation();
|
|
52234
52887
|
this.setting.emit();
|
|
52235
52888
|
}
|
|
52236
52889
|
}
|
|
52237
|
-
|
|
52238
|
-
|
|
52890
|
+
togglePopup(targetRef, event) {
|
|
52891
|
+
event.stopPropagation();
|
|
52892
|
+
this.popupTarget = targetRef;
|
|
52893
|
+
this.cd.detectChanges();
|
|
52894
|
+
this.poPopupComponent.toggle();
|
|
52895
|
+
}
|
|
52896
|
+
showTooltip() {
|
|
52897
|
+
const sumGap = this.tagLabel ? 12 : 6;
|
|
52898
|
+
return (this.title &&
|
|
52899
|
+
this.wrapperTitle?.nativeElement.offsetWidth + sumGap + (this.tagElement?.nativeElement.offsetWidth || 0) >=
|
|
52900
|
+
this.wrapperInfo?.nativeElement.offsetWidth);
|
|
52901
|
+
}
|
|
52902
|
+
closePopUp() {
|
|
52903
|
+
this.buttonPopUp?.focus();
|
|
52904
|
+
}
|
|
52905
|
+
checkDefaultActions() {
|
|
52906
|
+
if (this.setting.observed && !this.actions.some(action => action.$id === 'widget_configuration')) {
|
|
52907
|
+
this.actions = [
|
|
52908
|
+
...this.actions,
|
|
52909
|
+
{
|
|
52910
|
+
icon: 'ICON_SETTINGS',
|
|
52911
|
+
label: this.literals.configuration,
|
|
52912
|
+
type: 'default',
|
|
52913
|
+
action: this.settingOutput.bind(this),
|
|
52914
|
+
$id: 'widget_configuration'
|
|
52915
|
+
}
|
|
52916
|
+
];
|
|
52917
|
+
}
|
|
52918
|
+
if (this.help && !this.actions.some(action => action.$id === 'widget_help')) {
|
|
52919
|
+
this.actions = [
|
|
52920
|
+
...this.actions,
|
|
52921
|
+
{
|
|
52922
|
+
icon: 'ICON_HELP',
|
|
52923
|
+
label: this.literals.help,
|
|
52924
|
+
type: 'default',
|
|
52925
|
+
action: this.openHelp.bind(this),
|
|
52926
|
+
$id: 'widget_help'
|
|
52927
|
+
}
|
|
52928
|
+
];
|
|
52929
|
+
}
|
|
52930
|
+
if (!this.help) {
|
|
52931
|
+
this.actions = this.actions.filter(action => action.$id !== 'widget_help');
|
|
52932
|
+
}
|
|
52933
|
+
}
|
|
52934
|
+
updateContent() {
|
|
52935
|
+
const el = this.contentContainer?.nativeElement;
|
|
52936
|
+
if (!el) {
|
|
52937
|
+
return;
|
|
52938
|
+
}
|
|
52939
|
+
const existContent = Array.from(el.childNodes).some(node => {
|
|
52940
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
52941
|
+
return (node.textContent || '').trim().length > 0;
|
|
52942
|
+
}
|
|
52943
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
52944
|
+
return true;
|
|
52945
|
+
}
|
|
52946
|
+
return false;
|
|
52947
|
+
});
|
|
52948
|
+
this.hasContent = existContent;
|
|
52949
|
+
this.cd.detectChanges();
|
|
52950
|
+
}
|
|
52951
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetComponent, deps: [{ token: i0.ViewContainerRef }, { token: PoLanguageService }, { token: i0.ChangeDetectorRef }, { token: PoThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
52952
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoWidgetComponent, isStandalone: false, selector: "po-widget", viewQueries: [{ propertyName: "poPopupComponent", first: true, predicate: ["popup"], descendants: true, static: true }, { propertyName: "buttonPopUp", first: true, predicate: ["buttonPopUp"], descendants: true }, { propertyName: "wrapperInfo", first: true, predicate: ["wrapperInfo"], descendants: true }, { propertyName: "wrapperTitle", first: true, predicate: ["wrapperTitle"], descendants: true }, { propertyName: "tagElement", first: true, predicate: ["tagElement"], descendants: true, read: ElementRef }, { propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"po-widget-container\"\n [class.po-clickable]=\"click.observers.length\"\n [class.po-widget]=\"!primary\"\n [class.po-widget-disabled]=\"disabled\"\n [class.po-widget-primary]=\"primary\"\n [class.po-widget-no-shadow]=\"click.observers.length && noShadow\"\n [style.background-image]=\"background ? 'url(' + background + ')' : undefined\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n [tabindex]=\"disabled || !click.observers.length ? -1 : 0\"\n>\n <div *ngIf=\"hasTitleHelpOrSetting()\" class=\"po-widget-header\">\n <div class=\"po-widget-wrapper-info\">\n <div #wrapperInfo class=\"po-widget-wrapper-tag\">\n @if (showTitleAction) {\n <span\n #wrapperTitle\n class=\"po-widget-title-action po-widget-text\"\n (click)=\"runTitleAction($event)\"\n [p-tooltip]=\"title && showTooltip() ? title : ''\"\n >\n {{ title }}\n </span>\n } @else {\n <p #wrapperTitle class=\"po-widget-text\" [p-tooltip]=\"title && showTooltip() ? title : ''\">\n {{ title }}\n </p>\n }\n\n <po-tag\n #tagElement\n *ngIf=\"tagLabel\"\n [p-value]=\"tagLabel\"\n [p-icon]=\"tagIcon\"\n [p-type]=\"disabled ? null : tagType ? tagType : 'success'\"\n [p-color]=\"disabled ? '#ECECEE' : null\"\n [p-text-color]=\"disabled ? '#36364A' : null\"\n p-force-icon\n >\n </po-tag>\n </div>\n\n <div\n *ngIf=\"actions?.length\"\n class=\"po-widget-button-wrapper\"\n #popupTarget\n (click)=\"togglePopup(popupTarget, $event)\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <po-button\n #buttonPopUp\n [p-size]=\"size\"\n p-icon=\"an-fill an-dots-three-outline-vertical\"\n [p-disabled]=\"disabled\"\n p-kind=\"tertiary\"\n >\n </po-button>\n </div>\n </div>\n </div>\n\n <po-container p-no-border [p-height]=\"containerHeight\">\n <div #contentContainer class=\"po-widget-body\">\n <ng-content #refContent></ng-content>\n </div>\n <span *ngIf=\"!hasContent && height\" class=\"po-header-content-fallback\">.</span>\n </po-container>\n\n <div *ngIf=\"primaryLabel\" class=\"po-widget-footer\">\n <ng-container *ngIf=\"!secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"primaryAct-{{ id }}\"\n [p-label]=\"primaryLabel\"\n (p-click)=\"runPrimaryAction()\"\n [p-danger]=\"dangerPrimaryAction\"\n [p-kind]=\"primary ? 'primary' : kindPrimaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"primaryAct-{{ id }}\"\n [p-label]=\"primaryLabel\"\n (p-click)=\"runPrimaryAction()\"\n [p-danger]=\"dangerPrimaryAction\"\n [p-kind]=\"primary ? 'primary' : kindPrimaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"secondaryAct-{{ id }}\"\n [p-label]=\"secondaryLabel\"\n (p-click)=\"runSecondaryAction()\"\n [p-danger]=\"dangerSecondaryAction\"\n [p-kind]=\"primary ? 'primary' : kindSecondaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n </div>\n</div>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"size\" [p-target]=\"popupTarget\" (p-close)=\"closePopUp()\"> </po-popup>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PoContainerComponent, selector: "po-container" }, { kind: "component", type: PoTagComponent, selector: "po-tag" }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }] });
|
|
52239
52953
|
}
|
|
52240
52954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetComponent, decorators: [{
|
|
52241
52955
|
type: Component,
|
|
52242
|
-
args: [{ selector: 'po-widget', standalone: false, template: "<div\n [class.po-clickable]=\"click.observers.length\"\n [class.po-widget]=\"!primary\"\n [class.po-widget-disabled]=\"disabled\"\n [class.po-widget-primary]=\"primary\"\n [class.po-widget-no-shadow]=\"click.observers.length && noShadow\"\n [style.background-image]=\"background ? 'url(' + background + ')' : undefined\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n [tabindex]=\"disabled || !click.observers.length ? -1 : 0\"\n>\n <div *ngIf=\"hasTitleHelpOrSetting()\" class=\"po-widget-header\">\n <
|
|
52243
|
-
}], ctorParameters: () => [{ type: i0.ViewContainerRef }]
|
|
52956
|
+
args: [{ selector: 'po-widget', standalone: false, template: "<div\n class=\"po-widget-container\"\n [class.po-clickable]=\"click.observers.length\"\n [class.po-widget]=\"!primary\"\n [class.po-widget-disabled]=\"disabled\"\n [class.po-widget-primary]=\"primary\"\n [class.po-widget-no-shadow]=\"click.observers.length && noShadow\"\n [style.background-image]=\"background ? 'url(' + background + ')' : undefined\"\n (click)=\"onClick($event)\"\n (keydown)=\"onKeyDown($event)\"\n [tabindex]=\"disabled || !click.observers.length ? -1 : 0\"\n>\n <div *ngIf=\"hasTitleHelpOrSetting()\" class=\"po-widget-header\">\n <div class=\"po-widget-wrapper-info\">\n <div #wrapperInfo class=\"po-widget-wrapper-tag\">\n @if (showTitleAction) {\n <span\n #wrapperTitle\n class=\"po-widget-title-action po-widget-text\"\n (click)=\"runTitleAction($event)\"\n [p-tooltip]=\"title && showTooltip() ? title : ''\"\n >\n {{ title }}\n </span>\n } @else {\n <p #wrapperTitle class=\"po-widget-text\" [p-tooltip]=\"title && showTooltip() ? title : ''\">\n {{ title }}\n </p>\n }\n\n <po-tag\n #tagElement\n *ngIf=\"tagLabel\"\n [p-value]=\"tagLabel\"\n [p-icon]=\"tagIcon\"\n [p-type]=\"disabled ? null : tagType ? tagType : 'success'\"\n [p-color]=\"disabled ? '#ECECEE' : null\"\n [p-text-color]=\"disabled ? '#36364A' : null\"\n p-force-icon\n >\n </po-tag>\n </div>\n\n <div\n *ngIf=\"actions?.length\"\n class=\"po-widget-button-wrapper\"\n #popupTarget\n (click)=\"togglePopup(popupTarget, $event)\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <po-button\n #buttonPopUp\n [p-size]=\"size\"\n p-icon=\"an-fill an-dots-three-outline-vertical\"\n [p-disabled]=\"disabled\"\n p-kind=\"tertiary\"\n >\n </po-button>\n </div>\n </div>\n </div>\n\n <po-container p-no-border [p-height]=\"containerHeight\">\n <div #contentContainer class=\"po-widget-body\">\n <ng-content #refContent></ng-content>\n </div>\n <span *ngIf=\"!hasContent && height\" class=\"po-header-content-fallback\">.</span>\n </po-container>\n\n <div *ngIf=\"primaryLabel\" class=\"po-widget-footer\">\n <ng-container *ngIf=\"!secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"primaryAct-{{ id }}\"\n [p-label]=\"primaryLabel\"\n (p-click)=\"runPrimaryAction()\"\n [p-danger]=\"dangerPrimaryAction\"\n [p-kind]=\"primary ? 'primary' : kindPrimaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"primaryAct-{{ id }}\"\n [p-label]=\"primaryLabel\"\n (p-click)=\"runPrimaryAction()\"\n [p-danger]=\"dangerPrimaryAction\"\n [p-kind]=\"primary ? 'primary' : kindPrimaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"secondaryLabel\">\n <div class=\"po-widget-actions\" (click)=\"$event.stopPropagation()\" (keydown)=\"$event.stopPropagation()\">\n <po-button\n class=\"po-widget-actions\"\n id=\"secondaryAct-{{ id }}\"\n [p-label]=\"secondaryLabel\"\n (p-click)=\"runSecondaryAction()\"\n [p-danger]=\"dangerSecondaryAction\"\n [p-kind]=\"primary ? 'primary' : kindSecondaryAction || 'tertiary'\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-button>\n </div>\n </ng-container>\n </div>\n</div>\n\n<po-popup #popup [p-actions]=\"actions\" [p-size]=\"size\" [p-target]=\"popupTarget\" (p-close)=\"closePopUp()\"> </po-popup>\n" }]
|
|
52957
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: PoLanguageService }, { type: i0.ChangeDetectorRef }, { type: PoThemeService }], propDecorators: { poPopupComponent: [{
|
|
52958
|
+
type: ViewChild,
|
|
52959
|
+
args: ['popup', { static: true }]
|
|
52960
|
+
}], buttonPopUp: [{
|
|
52961
|
+
type: ViewChild,
|
|
52962
|
+
args: ['buttonPopUp']
|
|
52963
|
+
}], wrapperInfo: [{
|
|
52964
|
+
type: ViewChild,
|
|
52965
|
+
args: ['wrapperInfo']
|
|
52966
|
+
}], wrapperTitle: [{
|
|
52967
|
+
type: ViewChild,
|
|
52968
|
+
args: ['wrapperTitle']
|
|
52969
|
+
}], tagElement: [{
|
|
52970
|
+
type: ViewChild,
|
|
52971
|
+
args: ['tagElement', { read: ElementRef }]
|
|
52972
|
+
}], contentContainer: [{
|
|
52973
|
+
type: ViewChild,
|
|
52974
|
+
args: ['contentContainer', { read: ElementRef }]
|
|
52975
|
+
}] } });
|
|
52244
52976
|
|
|
52245
52977
|
/**
|
|
52246
52978
|
* @description
|
|
@@ -52249,13 +52981,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
52249
52981
|
*/
|
|
52250
52982
|
class PoWidgetModule {
|
|
52251
52983
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
52252
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, declarations: [PoWidgetComponent], imports: [CommonModule, PoContainerModule, PoIconModule], exports: [PoWidgetComponent] });
|
|
52253
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, imports: [CommonModule, PoContainerModule, PoIconModule] });
|
|
52984
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, declarations: [PoWidgetComponent], imports: [CommonModule, PoContainerModule, PoIconModule, PoTagModule, PoButtonModule, PoPopupModule, PoTooltipModule], exports: [PoWidgetComponent] });
|
|
52985
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, imports: [CommonModule, PoContainerModule, PoIconModule, PoTagModule, PoButtonModule, PoPopupModule, PoTooltipModule] });
|
|
52254
52986
|
}
|
|
52255
52987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoWidgetModule, decorators: [{
|
|
52256
52988
|
type: NgModule,
|
|
52257
52989
|
args: [{
|
|
52258
|
-
imports: [CommonModule, PoContainerModule, PoIconModule],
|
|
52990
|
+
imports: [CommonModule, PoContainerModule, PoIconModule, PoTagModule, PoButtonModule, PoPopupModule, PoTooltipModule],
|
|
52259
52991
|
exports: [PoWidgetComponent],
|
|
52260
52992
|
declarations: [PoWidgetComponent]
|
|
52261
52993
|
}]
|
|
@@ -52298,6 +53030,7 @@ class PoComponentsModule {
|
|
|
52298
53030
|
PoStepperModule,
|
|
52299
53031
|
PoTableModule,
|
|
52300
53032
|
PoTabsModule,
|
|
53033
|
+
PoContextTabsModule,
|
|
52301
53034
|
PoTagModule,
|
|
52302
53035
|
PoToolbarModule,
|
|
52303
53036
|
PoTreeViewModule,
|
|
@@ -52343,6 +53076,7 @@ class PoComponentsModule {
|
|
|
52343
53076
|
PoSlideModule,
|
|
52344
53077
|
PoStepperModule,
|
|
52345
53078
|
PoTableModule,
|
|
53079
|
+
PoContextTabsModule,
|
|
52346
53080
|
PoTabsModule,
|
|
52347
53081
|
PoTagModule,
|
|
52348
53082
|
PoToolbarModule,
|
|
@@ -52391,6 +53125,7 @@ class PoComponentsModule {
|
|
|
52391
53125
|
PoStepperModule,
|
|
52392
53126
|
PoTableModule,
|
|
52393
53127
|
PoTabsModule,
|
|
53128
|
+
PoContextTabsModule,
|
|
52394
53129
|
PoTagModule,
|
|
52395
53130
|
PoToolbarModule,
|
|
52396
53131
|
PoTreeViewModule,
|
|
@@ -52436,6 +53171,7 @@ class PoComponentsModule {
|
|
|
52436
53171
|
PoSlideModule,
|
|
52437
53172
|
PoStepperModule,
|
|
52438
53173
|
PoTableModule,
|
|
53174
|
+
PoContextTabsModule,
|
|
52439
53175
|
PoTabsModule,
|
|
52440
53176
|
PoTagModule,
|
|
52441
53177
|
PoToolbarModule,
|
|
@@ -52489,6 +53225,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
52489
53225
|
PoStepperModule,
|
|
52490
53226
|
PoTableModule,
|
|
52491
53227
|
PoTabsModule,
|
|
53228
|
+
PoContextTabsModule,
|
|
52492
53229
|
PoTagModule,
|
|
52493
53230
|
PoToolbarModule,
|
|
52494
53231
|
PoTreeViewModule,
|
|
@@ -52537,6 +53274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
52537
53274
|
PoSlideModule,
|
|
52538
53275
|
PoStepperModule,
|
|
52539
53276
|
PoTableModule,
|
|
53277
|
+
PoContextTabsModule,
|
|
52540
53278
|
PoTabsModule,
|
|
52541
53279
|
PoTagModule,
|
|
52542
53280
|
PoToolbarModule,
|
|
@@ -53477,5 +54215,5 @@ function validateProperty(property, target) {
|
|
|
53477
54215
|
* Generated bundle index. Do not edit.
|
|
53478
54216
|
*/
|
|
53479
54217
|
|
|
53480
|
-
export { AnimaliaIconDictionary, ForceBooleanComponentEnum, ForceOptionComponentEnum, I18N_CONFIG, ICONS_DICTIONARY, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBadgeComponent, PoBadgeModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonKind, PoButtonModule, PoButtonSize, PoButtonType, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartLabelFormat, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCheckboxModule, PoCheckboxSize, PoCleanComponent, PoCleanModule, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDividerSize, PoDropdownComponent, PoDropdownModule, PoDynamicContainerComponent, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicSharedBase, PoDynamicViewComponent, PoEmailComponent, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoFieldContainerModule, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconDictionary, PoIconModule, PoImageComponent, PoImageModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoItemListComponent, PoLabelComponent, PoLabelModule, PoLanguageModule, PoLanguageService, PoLinkComponent, PoLinkModule, PoListBoxComponent, PoListBoxModule, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLogoComponent, PoLogoModule, PoLookupComponent, PoLookupModalComponent, PoMask, PoMediaQueryModule, PoMediaQueryService, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalFooterComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoMultiselectOptionTemplateDirective, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoOverlayComponent, PoOverlayModule, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPageSlideFooterComponent, PoPageSlideModule, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressSize, PoProgressStatus, PoRadioComponent, PoRadioGroupComponent, PoRadioGroupModule, PoRadioModule, PoRichTextComponent, PoRichTextToolbarActions, PoSearchComponent, PoSearchFilterMode, PoSearchListComponent, PoSearchModule, PoSelectComponent, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoSwitchModule, PoTabComponent, PoTableCellTemplateDirective, PoTableColumnFrozenDirective, PoTableColumnSortType, PoTableColumnSpacing, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTabsService, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoThemeA11yEnum, PoThemeModule, PoThemeService, PoThemeTypeEnum, PoTimeModule, PoTimePipe, PoToasterComponent, PoToasterMode, PoToasterModule, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUploadFile, PoUploadStatus, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, mergePoI18nConfigs, poBreadcrumbLiterals, poChartLiteralsDefault, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDateSeparatorList, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, poPageSlideLiteralsDefault, poTabsLiterals, poThemeDefault, poThemeDefaultAA, poThemeDefaultAAA, poThemeDefaultActions, poThemeDefaultActionsDark, poThemeDefaultBrands, poThemeDefaultBrandsDark, poThemeDefaultCategoricals, poThemeDefaultCategoricalsAA, poThemeDefaultCategoricalsDark, poThemeDefaultCategoricalsDarkAA, poThemeDefaultCategoricalsOverlayDark, poThemeDefaultCategoricalsOverlayDarkAA, poThemeDefaultDark, poThemeDefaultDarkValues, poThemeDefaultDarkValuesAA, poThemeDefaultFeedback, poThemeDefaultFeedbackDark, poThemeDefaultLight, poThemeDefaultLightValues, poThemeDefaultLightValuesAA, poThemeDefaultNeutrals, poThemeDefaultNeutralsDark, poThemeDefaultOverlayCategoricals, poThemeDefaultOverlayCategoricalsAA, poToasterLiterals, returnPoI18nService };
|
|
54218
|
+
export { AnimaliaIconDictionary, ForceBooleanComponentEnum, ForceOptionComponentEnum, I18N_CONFIG, ICONS_DICTIONARY, InputBoolean, InputRequired, PO_CONTROL_POSITIONS, PoAccordionComponent, PoAccordionItemComponent, PoAccordionModule, PoActiveOverlayModule, PoActiveOverlayService, PoAvatarComponent, PoAvatarModule, PoBadgeComponent, PoBadgeModule, PoBreadcrumbComponent, PoBreadcrumbModule, PoButtonComponent, PoButtonGroupComponent, PoButtonGroupModule, PoButtonGroupToggle, PoButtonKind, PoButtonModule, PoButtonSize, PoButtonType, PoCalendarComponent, PoCalendarMode, PoCalendarModule, PoChartComponent, PoChartLabelFormat, PoChartModule, PoChartType, PoCheckboxComponent, PoCheckboxGroupComponent, PoCheckboxGroupModule, PoCheckboxModule, PoCheckboxSize, PoCleanComponent, PoCleanModule, PoColorPaletteModule, PoColorPaletteService, PoComboComponent, PoComboFilterMode, PoComboOptionTemplateDirective, PoComponentInjectorModule, PoComponentInjectorService, PoComponentsModule, PoContainerComponent, PoContainerModule, PoContextTabButtonComponent, PoContextTabsComponent, PoContextTabsModule, PoControlPositionModule, PoDateService, PoDateTimeModule, PoDatepickerComponent, PoDatepickerIsoFormat, PoDatepickerModule, PoDatepickerRangeComponent, PoDecimalComponent, PoDialogComponent, PoDialogModule, PoDialogService, PoDialogType, PoDirectivesModule, PoDisclaimerComponent, PoDisclaimerGroupComponent, PoDisclaimerGroupModule, PoDisclaimerModule, PoDividerComponent, PoDividerModule, PoDividerSize, PoDropdownComponent, PoDropdownModule, PoDynamicContainerComponent, PoDynamicFieldType, PoDynamicFormComponent, PoDynamicModule, PoDynamicSharedBase, PoDynamicViewComponent, PoEmailComponent, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoFieldContainerModule, PoFieldModule, PoGaugeComponent, PoGaugeModule, PoGridComponent, PoGridModule, PoGuardsModule, PoHttpInterceptorModule, PoHttpInterceptorService, PoHttpRequestInterceptorService, PoHttpRequestModule, PoI18nModule, PoI18nPipe, PoI18nService, PoIconComponent, PoIconDictionary, PoIconModule, PoImageComponent, PoImageModule, PoInfoComponent, PoInfoModule, PoInfoOrientation, PoInputComponent, PoInterceptorsModule, PoItemListComponent, PoLabelComponent, PoLabelModule, PoLanguageModule, PoLanguageService, PoLinkComponent, PoLinkModule, PoListBoxComponent, PoListBoxModule, PoListViewComponent, PoListViewContentTemplateDirective, PoListViewDetailTemplateDirective, PoListViewModule, PoLoadingComponent, PoLoadingIconComponent, PoLoadingModule, PoLoadingOverlayComponent, PoLoginComponent, PoLogoComponent, PoLogoModule, PoLookupComponent, PoLookupModalComponent, PoMask, PoMediaQueryModule, PoMediaQueryService, PoMenuComponent, PoMenuGlobalService, PoMenuHeaderTemplateDirective, PoMenuModule, PoMenuPanelComponent, PoMenuPanelModule, PoModalComponent, PoModalFooterComponent, PoModalModule, PoModule, PoMultiselectComponent, PoMultiselectFilterMode, PoMultiselectOptionTemplateDirective, PoNavbarComponent, PoNavbarModule, PoNotificationModule, PoNotificationService, PoNumberComponent, PoOverlayComponent, PoOverlayModule, PoPageDefaultComponent, PoPageDetailComponent, PoPageEditComponent, PoPageListComponent, PoPageModule, PoPageSlideComponent, PoPageSlideFooterComponent, PoPageSlideModule, PoPasswordComponent, PoPipesModule, PoPopoverComponent, PoPopoverModule, PoPopupComponent, PoPopupModule, PoProgressComponent, PoProgressModule, PoProgressSize, PoProgressStatus, PoRadioComponent, PoRadioGroupComponent, PoRadioGroupModule, PoRadioModule, PoRichTextComponent, PoRichTextToolbarActions, PoSearchComponent, PoSearchFilterMode, PoSearchListComponent, PoSearchModule, PoSelectComponent, PoServicesModule, PoSlideComponent, PoSlideContentTemplateDirective, PoSlideModule, PoStepComponent, PoStepperComponent, PoStepperModule, PoStepperOrientation, PoStepperStatus, PoSwitchComponent, PoSwitchLabelPosition, PoSwitchModule, PoTabButtonComponent, PoTabComponent, PoTabDropdownComponent, PoTableCellTemplateDirective, PoTableColumnFrozenDirective, PoTableColumnSortType, PoTableColumnSpacing, PoTableColumnTemplateDirective, PoTableComponent, PoTableModule, PoTableRowTemplateArrowDirection, PoTableRowTemplateDirective, PoTabsComponent, PoTabsModule, PoTabsService, PoTagComponent, PoTagModule, PoTagOrientation, PoTagType, PoTextareaComponent, PoThemeA11yEnum, PoThemeModule, PoThemeService, PoThemeTypeEnum, PoTimeModule, PoTimePipe, PoToasterComponent, PoToasterMode, PoToasterModule, PoToasterOrientation, PoToasterType, PoToolbarComponent, PoToolbarModule, PoTooltipDirective, PoTooltipModule, PoTreeViewComponent, PoTreeViewModule, PoUploadComponent, PoUploadFile, PoUploadStatus, PoUrlComponent, PoWidgetComponent, PoWidgetModule, initializeLanguageDefault, mergePoI18nConfigs, poBreadcrumbLiterals, poChartLiteralsDefault, poDialogAlertLiteralsDefault, poDialogConfirmLiteralsDefault, poLanguageDefault, poLocaleDateSeparatorList, poLocaleDecimalSeparatorList, poLocaleDefault, poLocaleThousandSeparatorList, poLocales, poPageSlideLiteralsDefault, poTabsLiterals, poThemeDefault, poThemeDefaultAA, poThemeDefaultAAA, poThemeDefaultActions, poThemeDefaultActionsDark, poThemeDefaultBrands, poThemeDefaultBrandsDark, poThemeDefaultCategoricals, poThemeDefaultCategoricalsAA, poThemeDefaultCategoricalsDark, poThemeDefaultCategoricalsDarkAA, poThemeDefaultCategoricalsOverlayDark, poThemeDefaultCategoricalsOverlayDarkAA, poThemeDefaultDark, poThemeDefaultDarkValues, poThemeDefaultDarkValuesAA, poThemeDefaultFeedback, poThemeDefaultFeedbackDark, poThemeDefaultLight, poThemeDefaultLightValues, poThemeDefaultLightValuesAA, poThemeDefaultNeutrals, poThemeDefaultNeutralsDark, poThemeDefaultOverlayCategoricals, poThemeDefaultOverlayCategoricalsAA, poToasterLiterals, returnPoI18nService };
|
|
53481
54219
|
//# sourceMappingURL=po-ui-ng-components.mjs.map
|