@po-ui/ng-components 21.6.0 → 21.7.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.
Files changed (31) hide show
  1. package/fesm2022/po-ui-ng-components.mjs +327 -31
  2. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  3. package/lib/components/po-field/po-rich-text/po-rich-text-base.component.d.ts +27 -3
  4. package/lib/components/po-field/po-rich-text/po-rich-text-body/po-rich-text-body.component.d.ts +15 -2
  5. package/lib/components/po-field/po-rich-text/po-rich-text-toolbar/po-rich-text-toolbar.component.d.ts +1 -0
  6. package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +14 -0
  7. package/lib/components/po-field/po-textarea/po-textarea.component.d.ts +11 -2
  8. package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +14 -0
  9. package/lib/components/po-field/po-upload/po-upload.component.d.ts +2 -0
  10. package/lib/components/po-header/interfaces/po-header-action-tool.interface.d.ts +10 -2
  11. package/lib/components/po-popover/po-popover-base.component.d.ts +2 -0
  12. package/lib/components/po-popover/po-popover.component.d.ts +4 -0
  13. package/lib/services/po-control-position/po-control-position.service.d.ts +1 -1
  14. package/package.json +4 -4
  15. package/po-ui-ng-components-21.7.0.tgz +0 -0
  16. package/schematics/ng-add/index.js +1 -1
  17. package/schematics/ng-update/v14/index.js +1 -1
  18. package/schematics/ng-update/v15/index.js +1 -1
  19. package/schematics/ng-update/v16/index.js +1 -1
  20. package/schematics/ng-update/v17/index.js +1 -1
  21. package/schematics/ng-update/v18/index.js +2 -2
  22. package/schematics/ng-update/v19/index.js +2 -2
  23. package/schematics/ng-update/v2/index.js +1 -1
  24. package/schematics/ng-update/v20/index.js +2 -2
  25. package/schematics/ng-update/v21/index.js +1 -1
  26. package/schematics/ng-update/v3/index.js +1 -1
  27. package/schematics/ng-update/v4/index.js +1 -1
  28. package/schematics/ng-update/v5/index.js +1 -1
  29. package/schematics/ng-update/v6/index.js +1 -1
  30. package/types/po-ui-ng-components.d.ts +108 -13
  31. package/po-ui-ng-components-21.6.0.tgz +0 -0
@@ -2248,7 +2248,7 @@ class PoControlPositionService {
2248
2248
  * @param targetElement elemento de onde deve partir a exibição
2249
2249
  * @param customPositions posições que sobrescreve as posições padrões
2250
2250
  * @param isSetElementWidth indica se deve definir o tamanho do elemento a ser exibido, caso for verdadeiro será igual do targetElement
2251
- * @param isCornerAligned indica se o elemento filho será alinhado nos cantos do elemneto pai.
2251
+ * @param isCornerAligned indica se o elemento filho será alinhado nos cantos do elemento pai.
2252
2252
  */
2253
2253
  setElements(element, elementOffset, targetElement, customPositions, isSetElementWidth = false, isCornerAligned = false) {
2254
2254
  this.element = element instanceof ElementRef ? element.nativeElement : element;
@@ -6751,11 +6751,11 @@ class PoButtonComponent extends PoButtonBaseComponent {
6751
6751
  this.click.emit(null);
6752
6752
  }
6753
6753
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6754
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoButtonComponent, isStandalone: false, selector: "po-button", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon p-neutral-color [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n", dependencies: [{ kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6754
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoButtonComponent, isStandalone: false, selector: "po-button", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n", dependencies: [{ kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6755
6755
  }
6756
6756
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoButtonComponent, decorators: [{
6757
6757
  type: Component,
6758
- args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon p-neutral-color [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n" }]
6758
+ args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n" }]
6759
6759
  }], propDecorators: { buttonElement: [{
6760
6760
  type: ViewChild,
6761
6761
  args: ['button', { static: true }]
@@ -6849,6 +6849,8 @@ class PoPopoverBaseComponent {
6849
6849
  * @default `false`
6850
6850
  */
6851
6851
  appendBox = false;
6852
+ // Indica se o elemento filho será alinhado nos cantos do elemento pai.
6853
+ cornerAligned = false;
6852
6854
  /**
6853
6855
  * @description
6854
6856
  *
@@ -6895,6 +6897,8 @@ class PoPopoverBaseComponent {
6895
6897
  target;
6896
6898
  /** Título do popover. */
6897
6899
  title;
6900
+ // Define o width do popover.
6901
+ width;
6898
6902
  /** Evento disparado ao fechar o popover. */
6899
6903
  closePopover = new EventEmitter();
6900
6904
  /** Evento disparado ao abrir o popover. */
@@ -6987,7 +6991,7 @@ class PoPopoverBaseComponent {
6987
6991
  */
6988
6992
  customClasses = input(undefined, { ...(ngDevMode ? { debugName: "customClasses" } : {}), alias: 'p-custom-classes' });
6989
6993
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoPopoverBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6990
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: PoPopoverBaseComponent, isStandalone: false, selector: "po-popover-base", inputs: { appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, target: { classPropertyName: "target", publicName: "p-target", isSignal: false, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "p-title", isSignal: false, isRequired: false, transformFunction: null }, hideArrow: { classPropertyName: "hideArrow", publicName: "p-hide-arrow", isSignal: false, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "p-position", isSignal: false, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "p-trigger", isSignal: false, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "p-custom-classes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closePopover: "p-close", openPopover: "p-open" }, ngImport: i0, template: '', isInline: true });
6994
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: PoPopoverBaseComponent, isStandalone: false, selector: "po-popover-base", inputs: { appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, cornerAligned: { classPropertyName: "cornerAligned", publicName: "p-corner-aligned", isSignal: false, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "p-target", isSignal: false, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "p-title", isSignal: false, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "p-width", isSignal: false, isRequired: false, transformFunction: null }, hideArrow: { classPropertyName: "hideArrow", publicName: "p-hide-arrow", isSignal: false, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "p-position", isSignal: false, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "p-trigger", isSignal: false, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "p-custom-classes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closePopover: "p-close", openPopover: "p-open" }, ngImport: i0, template: '', isInline: true });
6991
6995
  }
6992
6996
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoPopoverBaseComponent, decorators: [{
6993
6997
  type: Component,
@@ -6999,12 +7003,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
6999
7003
  }], propDecorators: { appendBox: [{
7000
7004
  type: Input,
7001
7005
  args: [{ alias: 'p-append-in-body', transform: convertToBoolean }]
7006
+ }], cornerAligned: [{
7007
+ type: Input,
7008
+ args: ['p-corner-aligned']
7002
7009
  }], target: [{
7003
7010
  type: Input,
7004
7011
  args: ['p-target']
7005
7012
  }], title: [{
7006
7013
  type: Input,
7007
7014
  args: ['p-title']
7015
+ }], width: [{
7016
+ type: Input,
7017
+ args: ['p-width']
7008
7018
  }], closePopover: [{
7009
7019
  type: Output,
7010
7020
  args: ['p-close']
@@ -7052,8 +7062,10 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
7052
7062
  timeoutResize;
7053
7063
  targetElement;
7054
7064
  afterViewInitWasCalled = false;
7065
+ widthPopover = undefined;
7055
7066
  keydownTargetListener;
7056
7067
  keydownPopoverListener;
7068
+ resizeObserver;
7057
7069
  eventListenerFunction;
7058
7070
  tabbableSelector = [
7059
7071
  'a[href]:not([tabindex="-1"])',
@@ -7093,10 +7105,12 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
7093
7105
  this.setRendererListenInit();
7094
7106
  }
7095
7107
  ngOnDestroy() {
7108
+ this.disconnectResizeObserver();
7096
7109
  this.removeListeners();
7097
7110
  }
7098
7111
  close() {
7099
7112
  this.isHidden = true;
7113
+ this.disconnectResizeObserver();
7100
7114
  this.closePopover.emit();
7101
7115
  if (this.trigger === 'function' && this.clickoutListener) {
7102
7116
  this.clickoutListener();
@@ -7118,6 +7132,16 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
7118
7132
  this.setPopoverPosition();
7119
7133
  this.setOpacity(1);
7120
7134
  this.openPopover.emit();
7135
+ this.observeContentResize();
7136
+ if (this.cornerAligned && !this.width) {
7137
+ const el = this.popoverElement.nativeElement;
7138
+ el.style.width = 'auto';
7139
+ const width = el.scrollWidth;
7140
+ this.widthPopover = width;
7141
+ requestAnimationFrame(() => {
7142
+ this.setPopoverPosition();
7143
+ });
7144
+ }
7121
7145
  this.cd.detectChanges();
7122
7146
  });
7123
7147
  if (this.trigger === 'function') {
@@ -7212,7 +7236,7 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
7212
7236
  }
7213
7237
  setElementsControlPosition() {
7214
7238
  const popoverOffset = 8;
7215
- this.poControlPosition.setElements(this.popoverElement.nativeElement, popoverOffset, this.target);
7239
+ this.poControlPosition.setElements(this.popoverElement.nativeElement, popoverOffset, this.target, undefined, false, this.cornerAligned);
7216
7240
  }
7217
7241
  focusOnTarget() {
7218
7242
  const el = this.targetElement;
@@ -7317,12 +7341,32 @@ class PoPopoverComponent extends PoPopoverBaseComponent {
7317
7341
  const prev = docTabs[idx - 1] || docTabs[docTabs.length - 1];
7318
7342
  prev?.focus?.();
7319
7343
  }
7344
+ observeContentResize() {
7345
+ this.disconnectResizeObserver();
7346
+ if (!this.popoverElement?.nativeElement)
7347
+ return;
7348
+ let initialCall = true;
7349
+ this.resizeObserver = new ResizeObserver(() => {
7350
+ if (initialCall) {
7351
+ initialCall = false;
7352
+ return;
7353
+ }
7354
+ this.setElementsControlPosition();
7355
+ this.setPopoverPosition();
7356
+ this.cd.detectChanges();
7357
+ });
7358
+ this.resizeObserver.observe(this.popoverElement.nativeElement);
7359
+ }
7360
+ disconnectResizeObserver() {
7361
+ this.resizeObserver?.disconnect();
7362
+ this.resizeObserver = null;
7363
+ }
7320
7364
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoPopoverComponent, deps: [{ token: i0.Renderer2 }, { token: PoControlPositionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
7321
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoPopoverComponent, isStandalone: false, selector: "po-popover", providers: [PoControlPositionService], viewQueries: [{ propertyName: "popoverElement", first: true, predicate: ["popoverElement"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"target\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n}\n\n<ng-template #sharedPopoverContent>\n <div #popoverElement [hidden]=\"isHidden\" class=\"po-popover\" [ngClass]=\"customClasses()\">\n @if (!hideArrow) {\n <div class=\"po-popover-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n\n <div class=\"po-popover-content\">\n @if (title) {\n <span class=\"po-popover-title\">{{ title }}</span>\n }\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }] });
7365
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoPopoverComponent, isStandalone: false, selector: "po-popover", providers: [PoControlPositionService], viewQueries: [{ propertyName: "popoverElement", first: true, predicate: ["popoverElement"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"target\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n}\n\n<ng-template #sharedPopoverContent>\n <div\n #popoverElement\n [hidden]=\"isHidden\"\n class=\"po-popover\"\n [style.width.px]=\"width ?? widthPopover\"\n [ngClass]=\"customClasses()\"\n >\n @if (!hideArrow) {\n <div class=\"po-popover-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n\n <div class=\"po-popover-content\">\n @if (title) {\n <span class=\"po-popover-title\">{{ title }}</span>\n }\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }] });
7322
7366
  }
7323
7367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoPopoverComponent, decorators: [{
7324
7368
  type: Component,
7325
- args: [{ selector: 'po-popover', providers: [PoControlPositionService], standalone: false, template: "@if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"target\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n}\n\n<ng-template #sharedPopoverContent>\n <div #popoverElement [hidden]=\"isHidden\" class=\"po-popover\" [ngClass]=\"customClasses()\">\n @if (!hideArrow) {\n <div class=\"po-popover-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n\n <div class=\"po-popover-content\">\n @if (title) {\n <span class=\"po-popover-title\">{{ title }}</span>\n }\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n" }]
7369
+ args: [{ selector: 'po-popover', providers: [PoControlPositionService], standalone: false, template: "@if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"target\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n </ng-template>\n} @else {\n <ng-container *ngTemplateOutlet=\"sharedPopoverContent\"></ng-container>\n}\n\n<ng-template #sharedPopoverContent>\n <div\n #popoverElement\n [hidden]=\"isHidden\"\n class=\"po-popover\"\n [style.width.px]=\"width ?? widthPopover\"\n [ngClass]=\"customClasses()\"\n >\n @if (!hideArrow) {\n <div class=\"po-popover-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n\n <div class=\"po-popover-content\">\n @if (title) {\n <span class=\"po-popover-title\">{{ title }}</span>\n }\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n" }]
7326
7370
  }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: PoControlPositionService }, { type: i0.ChangeDetectorRef }], propDecorators: { popoverElement: [{
7327
7371
  type: ViewChild,
7328
7372
  args: ['popoverElement', { read: ElementRef, static: false }]
@@ -23745,7 +23789,7 @@ class PoThemeService {
23745
23789
  const a11yLevel = this.getA11yLevel();
23746
23790
  if (!this.isValidA11yLevel(a11yLevel))
23747
23791
  return false;
23748
- const defaultSize = 'small';
23792
+ const defaultSize = enable ? 'small' : 'medium';
23749
23793
  document.documentElement.setAttribute('data-default-size', defaultSize);
23750
23794
  if (a11yLevel === PoThemeA11yEnum.AA && enable) {
23751
23795
  if (localStorage.getItem('po-default-size') !== defaultSize) {
@@ -39855,6 +39899,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
39855
39899
  */
39856
39900
  class PoRichTextBaseComponent {
39857
39901
  richTextService;
39902
+ cd;
39858
39903
  /**
39859
39904
  *
39860
39905
  * @deprecated v23.x.x use `p-helper`
@@ -39905,6 +39950,34 @@ class PoRichTextBaseComponent {
39905
39950
  * @default `false`
39906
39951
  */
39907
39952
  disabledTextAlign;
39953
+ /**
39954
+ * @optional
39955
+ *
39956
+ * @description
39957
+ *
39958
+ * Indica que o campo será desabilitado.
39959
+ *
39960
+ * @default `false`
39961
+ */
39962
+ disabled;
39963
+ /**
39964
+ * @optional
39965
+ *
39966
+ * @description
39967
+ * Exibe um ícone de carregamento no lado direito do campo para sinalizar que uma operação está em andamento.
39968
+ *
39969
+ * @default `false`
39970
+ */
39971
+ set loading(value) {
39972
+ this._loading = value;
39973
+ this.cd?.markForCheck();
39974
+ }
39975
+ get loading() {
39976
+ return this._loading;
39977
+ }
39978
+ get isDisabled() {
39979
+ return this.disabled || this.loading;
39980
+ }
39908
39981
  /**
39909
39982
  * @description
39910
39983
  *
@@ -40090,6 +40163,7 @@ class PoRichTextBaseComponent {
40090
40163
  invalid = false;
40091
40164
  onChangeModel = null;
40092
40165
  value;
40166
+ _loading = false;
40093
40167
  _height;
40094
40168
  _placeholder;
40095
40169
  _readonly;
@@ -40188,8 +40262,15 @@ class PoRichTextBaseComponent {
40188
40262
  * - Não possuir `p-help` e/ou `p-label`.
40189
40263
  */
40190
40264
  showRequired = false;
40191
- constructor(richTextService) {
40265
+ constructor(richTextService, cd) {
40192
40266
  this.richTextService = richTextService;
40267
+ this.cd = cd;
40268
+ }
40269
+ // Função implementada do ControlValueAccessor
40270
+ // Usada para interceptar os estados de habilitado via forms api
40271
+ setDisabledState(isDisabled) {
40272
+ this.disabled = isDisabled;
40273
+ this.cd.markForCheck();
40193
40274
  }
40194
40275
  onThemeChange() {
40195
40276
  this.applySizeBasedOnA11y();
@@ -40208,7 +40289,7 @@ class PoRichTextBaseComponent {
40208
40289
  this.validatorChange = fn;
40209
40290
  }
40210
40291
  validate(abstractControl) {
40211
- if (PoValidators.requiredFailed(this.required, false, abstractControl.value)) {
40292
+ if (PoValidators.requiredFailed(this.required, this.disabled, abstractControl.value)) {
40212
40293
  return {
40213
40294
  required: {
40214
40295
  valid: false
@@ -40236,12 +40317,12 @@ class PoRichTextBaseComponent {
40236
40317
  const size = validateSizeFn(this._initialSize, PoFieldSize);
40237
40318
  this._size = size;
40238
40319
  }
40239
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextBaseComponent, deps: [{ token: PoRichTextService }], target: i0.ɵɵFactoryTarget.Directive });
40240
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoRichTextBaseComponent, isStandalone: true, inputs: { additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabledTextAlign: { classPropertyName: "disabledTextAlign", publicName: "p-disabled-text-align", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, errorMessage: { classPropertyName: "errorMessage", publicName: "p-error-message", isSignal: false, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, hideToolbarActions: { classPropertyName: "hideToolbarActions", publicName: "p-hide-toolbar-actions", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "p-height", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
40320
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextBaseComponent, deps: [{ token: PoRichTextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
40321
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoRichTextBaseComponent, isStandalone: true, inputs: { additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabledTextAlign: { classPropertyName: "disabledTextAlign", publicName: "p-disabled-text-align", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, errorMessage: { classPropertyName: "errorMessage", publicName: "p-error-message", isSignal: false, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, hideToolbarActions: { classPropertyName: "hideToolbarActions", publicName: "p-hide-toolbar-actions", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "p-height", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
40241
40322
  }
40242
40323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextBaseComponent, decorators: [{
40243
40324
  type: Directive
40244
- }], ctorParameters: () => [{ type: PoRichTextService }], propDecorators: { additionalHelpTooltip: [{
40325
+ }], ctorParameters: () => [{ type: PoRichTextService }, { type: i0.ChangeDetectorRef }], propDecorators: { additionalHelpTooltip: [{
40245
40326
  type: Input,
40246
40327
  args: ['p-additional-help-tooltip']
40247
40328
  }], appendBox: [{
@@ -40253,6 +40334,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
40253
40334
  }], disabledTextAlign: [{
40254
40335
  type: Input,
40255
40336
  args: [{ alias: 'p-disabled-text-align', transform: convertToBoolean }]
40337
+ }], disabled: [{
40338
+ type: Input,
40339
+ args: [{ alias: 'p-disabled', transform: convertToBoolean }]
40340
+ }], loading: [{
40341
+ type: Input,
40342
+ args: [{ alias: 'p-loading', transform: convertToBoolean }]
40256
40343
  }], errorMessage: [{
40257
40344
  type: Input,
40258
40345
  args: ['p-error-message']
@@ -40325,12 +40412,15 @@ const poRichTextBodyCommands = [
40325
40412
  ];
40326
40413
  class PoRichTextBodyComponent {
40327
40414
  richTextService = inject(PoRichTextService);
40415
+ cd = inject(ChangeDetectorRef);
40328
40416
  bodyElement;
40329
40417
  height;
40330
40418
  label;
40331
40419
  modelValue;
40332
40420
  placeholder;
40333
40421
  readonly;
40422
+ disabled = false;
40423
+ loading = false;
40334
40424
  change = new EventEmitter();
40335
40425
  commands = new EventEmitter();
40336
40426
  keydown = new EventEmitter();
@@ -40344,6 +40434,12 @@ class PoRichTextBodyComponent {
40344
40434
  timeoutChange;
40345
40435
  valueBeforeChange;
40346
40436
  modelSubscription;
40437
+ resizeObserver;
40438
+ hasScroll = false;
40439
+ hasValue = false;
40440
+ onWindowResize() {
40441
+ this.checkScrollState();
40442
+ }
40347
40443
  ngOnInit() {
40348
40444
  this.bodyElement.nativeElement.designMode = 'on';
40349
40445
  this.modelSubscription = this.richTextService.getModel().subscribe(modelValue => {
@@ -40351,10 +40447,19 @@ class PoRichTextBodyComponent {
40351
40447
  this.bodyElement.nativeElement.innerHTML = '';
40352
40448
  this.updateValueWithModelValue();
40353
40449
  this.addClickListenerOnAnchorElements();
40450
+ this.updateHasValue();
40451
+ this.checkScrollState();
40354
40452
  });
40453
+ this.initResizeObserver();
40454
+ }
40455
+ ngOnChanges(changes) {
40456
+ if (changes['loading']) {
40457
+ setTimeout(() => this.checkScrollState());
40458
+ }
40355
40459
  }
40356
40460
  ngOnDestroy() {
40357
40461
  this.modelSubscription?.unsubscribe();
40462
+ this.resizeObserver?.disconnect();
40358
40463
  }
40359
40464
  executeCommand(command) {
40360
40465
  this.bodyElement.nativeElement.focus();
@@ -40412,10 +40517,16 @@ class PoRichTextBodyComponent {
40412
40517
  this.removeBrElement();
40413
40518
  this.updateModel();
40414
40519
  this.emitSelectionCommands();
40520
+ this.updateHasValue();
40521
+ this.checkScrollState();
40415
40522
  }
40416
40523
  onPaste() {
40417
40524
  this.update();
40418
- setTimeout(() => this.addClickListenerOnAnchorElements());
40525
+ setTimeout(() => {
40526
+ this.addClickListenerOnAnchorElements();
40527
+ this.updateHasValue();
40528
+ this.checkScrollState();
40529
+ });
40419
40530
  }
40420
40531
  update() {
40421
40532
  setTimeout(() => this.updateModel());
@@ -40423,8 +40534,14 @@ class PoRichTextBodyComponent {
40423
40534
  this.removeBrElement();
40424
40535
  this.updateModel();
40425
40536
  this.emitSelectionCommands();
40537
+ this.updateHasValue();
40538
+ this.checkScrollState();
40426
40539
  });
40427
40540
  }
40541
+ //Transforma o tamanho do input para o tamanho do ícone de loading correspondente
40542
+ mapSizeToIcon(size) {
40543
+ return mapInputSizeToLoadingIcon(size);
40544
+ }
40428
40545
  addClickListenerOnAnchorElements() {
40429
40546
  this.bodyElement.nativeElement.querySelectorAll('a').forEach(element => {
40430
40547
  element.addEventListener('click', this.onAnchorClick);
@@ -40610,12 +40727,36 @@ class PoRichTextBodyComponent {
40610
40727
  }
40611
40728
  return isLink;
40612
40729
  }
40730
+ get bodyEl() {
40731
+ return this.bodyElement?.nativeElement;
40732
+ }
40733
+ updateHasValue() {
40734
+ const text = this.bodyEl?.innerText?.trim();
40735
+ this.hasValue = !!text;
40736
+ }
40737
+ checkScrollState() {
40738
+ const el = this.bodyEl;
40739
+ if (!el)
40740
+ return;
40741
+ this.hasScroll = el.scrollHeight > el.clientHeight;
40742
+ this.cd.markForCheck();
40743
+ }
40744
+ initResizeObserver() {
40745
+ const el = this.bodyEl;
40746
+ if (!el || typeof ResizeObserver === 'undefined') {
40747
+ return;
40748
+ }
40749
+ this.resizeObserver = new ResizeObserver(() => {
40750
+ this.checkScrollState();
40751
+ });
40752
+ this.resizeObserver.observe(el);
40753
+ }
40613
40754
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
40614
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: PoRichTextBodyComponent, isStandalone: false, selector: "po-rich-text-body", inputs: { height: ["p-height", "height"], label: ["p-label", "label"], modelValue: ["p-model-value", "modelValue"], placeholder: ["p-placeholder", "placeholder"], readonly: ["p-readonly", "readonly"], size: ["p-size", "size"] }, outputs: { change: "p-change", commands: "p-commands", keydown: "p-keydown", selectedLink: "p-selected-link", shortcutCommand: "p-shortcut-command", value: "p-value", blur: "p-blur" }, host: { properties: { "attr.p-size": "this.size" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["bodyElement"], descendants: true, static: true }], ngImport: i0, template: "<div\n #bodyElement\n class=\"po-rich-text-body\"\n tabindex=\"0\"\n [attr.aria-label]=\"label\"\n [attr.contenteditable]=\"!readonly\"\n [attr.data-placeholder]=\"placeholder\"\n [style.height.px]=\"height\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n (cut)=\"update()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp($event)\"\n (paste)=\"onPaste()\"\n></div>\n" });
40755
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoRichTextBodyComponent, isStandalone: false, selector: "po-rich-text-body", inputs: { height: ["p-height", "height"], label: ["p-label", "label"], modelValue: ["p-model-value", "modelValue"], placeholder: ["p-placeholder", "placeholder"], readonly: ["p-readonly", "readonly"], disabled: ["p-disabled", "disabled"], loading: ["p-loading", "loading"], size: ["p-size", "size"] }, outputs: { change: "p-change", commands: "p-commands", keydown: "p-keydown", selectedLink: "p-selected-link", shortcutCommand: "p-shortcut-command", value: "p-value", blur: "p-blur" }, host: { listeners: { "window:resize": "onWindowResize()" }, properties: { "attr.p-size": "this.size" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["bodyElement"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"po-field-container-rich-text-body\">\n <div\n #bodyElement\n class=\"po-rich-text-body\"\n [class.has-value]=\"hasValue\"\n [class.has-scroll]=\"hasScroll\"\n [class.has-loading]=\"loading\"\n [class.po-rich-text-disabled]=\"disabled\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-label]=\"label\"\n [attr.contenteditable]=\"!readonly && !disabled\"\n [attr.data-placeholder]=\"placeholder\"\n [style.height.px]=\"height\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n (cut)=\"update()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp($event)\"\n (paste)=\"onPaste()\"\n ></div>\n @if (loading) {\n <div class=\"po-field-icon-container-right po-rich-text-loading-container\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }] });
40615
40756
  }
40616
40757
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextBodyComponent, decorators: [{
40617
40758
  type: Component,
40618
- args: [{ selector: 'po-rich-text-body', standalone: false, template: "<div\n #bodyElement\n class=\"po-rich-text-body\"\n tabindex=\"0\"\n [attr.aria-label]=\"label\"\n [attr.contenteditable]=\"!readonly\"\n [attr.data-placeholder]=\"placeholder\"\n [style.height.px]=\"height\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n (cut)=\"update()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp($event)\"\n (paste)=\"onPaste()\"\n></div>\n" }]
40759
+ args: [{ selector: 'po-rich-text-body', standalone: false, template: "<div class=\"po-field-container-rich-text-body\">\n <div\n #bodyElement\n class=\"po-rich-text-body\"\n [class.has-value]=\"hasValue\"\n [class.has-scroll]=\"hasScroll\"\n [class.has-loading]=\"loading\"\n [class.po-rich-text-disabled]=\"disabled\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-label]=\"label\"\n [attr.contenteditable]=\"!readonly && !disabled\"\n [attr.data-placeholder]=\"placeholder\"\n [style.height.px]=\"height\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n (cut)=\"update()\"\n (focus)=\"onFocus()\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp($event)\"\n (paste)=\"onPaste()\"\n ></div>\n @if (loading) {\n <div class=\"po-field-icon-container-right po-rich-text-loading-container\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n</div>\n" }]
40619
40760
  }], propDecorators: { bodyElement: [{
40620
40761
  type: ViewChild,
40621
40762
  args: ['bodyElement', { static: true }]
@@ -40634,6 +40775,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
40634
40775
  }], readonly: [{
40635
40776
  type: Input,
40636
40777
  args: ['p-readonly']
40778
+ }], disabled: [{
40779
+ type: Input,
40780
+ args: ['p-disabled']
40781
+ }], loading: [{
40782
+ type: Input,
40783
+ args: ['p-loading']
40637
40784
  }], change: [{
40638
40785
  type: Output,
40639
40786
  args: ['p-change']
@@ -40661,6 +40808,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
40661
40808
  }], blur: [{
40662
40809
  type: Output,
40663
40810
  args: ['p-blur']
40811
+ }], onWindowResize: [{
40812
+ type: HostListener,
40813
+ args: ['window:resize']
40664
40814
  }] } });
40665
40815
 
40666
40816
  const poRichTextLiteralsDefault = {
@@ -41553,6 +41703,7 @@ class PoUploadBaseComponent {
41553
41703
  _hideSendButton;
41554
41704
  _isMultiple;
41555
41705
  _literals;
41706
+ _loading = false;
41556
41707
  _required;
41557
41708
  _size = undefined;
41558
41709
  _initialSize = undefined;
@@ -41737,6 +41888,26 @@ class PoUploadBaseComponent {
41737
41888
  get disabled() {
41738
41889
  return this._disabled;
41739
41890
  }
41891
+ /**
41892
+ * @optional
41893
+ *
41894
+ * @description
41895
+ * Exibe um ícone de carregamento no botão `Selecionar arquivo`, à esquerda do texto, sinalizando que uma operação está em andamento.
41896
+ *
41897
+ * > Incompatível com `p-drag-drop` e `p-hide-select-button`, pois o estado de loading depende da exibição do botão `Selecionar arquivo`.
41898
+ *
41899
+ * @default `false`
41900
+ */
41901
+ set loading(value) {
41902
+ this._loading = value;
41903
+ this.cd?.markForCheck();
41904
+ }
41905
+ get loading() {
41906
+ return this._loading;
41907
+ }
41908
+ get isDisabled() {
41909
+ return this.disabled || this.loading;
41910
+ }
41740
41911
  /**
41741
41912
  * @optional
41742
41913
  *
@@ -41958,7 +42129,7 @@ class PoUploadBaseComponent {
41958
42129
  this._size = size;
41959
42130
  }
41960
42131
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoUploadBaseComponent, deps: [{ token: PoUploadService }, { token: PoLanguageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
41961
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoUploadBaseComponent, isStandalone: true, inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, dragDropHeight: { classPropertyName: "dragDropHeight", publicName: "p-drag-drop-height", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "p-url", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, autoUpload: { classPropertyName: "autoUpload", publicName: "p-auto-upload", isSignal: false, isRequired: false, transformFunction: null }, disabledRemoveFile: { classPropertyName: "disabledRemoveFile", publicName: "p-disabled-remove-file", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, showThumbnail: { classPropertyName: "showThumbnail", publicName: "p-show-thumbnail", isSignal: false, isRequired: false, transformFunction: null }, headers: { classPropertyName: "headers", publicName: "p-headers", isSignal: false, isRequired: false, transformFunction: null }, requiredUrl: { classPropertyName: "requiredUrl", publicName: "p-required-url", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, customAction: { classPropertyName: "customAction", publicName: "p-custom-action", isSignal: false, isRequired: false, transformFunction: null }, customModalActions: { classPropertyName: "customModalActions", publicName: "p-custom-modal-actions", isSignal: false, isRequired: false, transformFunction: null }, directory: { classPropertyName: "directory", publicName: "p-directory", isSignal: false, isRequired: false, transformFunction: null }, dragDrop: { classPropertyName: "dragDrop", publicName: "p-drag-drop", isSignal: false, isRequired: false, transformFunction: null }, hideRestrictionsInfo: { classPropertyName: "hideRestrictionsInfo", publicName: "p-hide-restrictions-info", isSignal: false, isRequired: false, transformFunction: null }, hideSelectButton: { classPropertyName: "hideSelectButton", publicName: "p-hide-select-button", isSignal: false, isRequired: false, transformFunction: null }, hideSendButton: { classPropertyName: "hideSendButton", publicName: "p-hide-send-button", isSignal: false, isRequired: false, transformFunction: null }, literals: { classPropertyName: "literals", publicName: "p-literals", isSignal: false, isRequired: false, transformFunction: null }, fileRestrictions: { classPropertyName: "fileRestrictions", publicName: "p-restrictions", isSignal: false, isRequired: false, transformFunction: null }, formField: { classPropertyName: "formField", publicName: "p-form-field", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, isMultiple: { classPropertyName: "isMultiple", publicName: "p-multiple", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", customActionClick: "p-custom-action-click", keydown: "p-keydown", onUpload: "p-upload", onCancel: "p-cancel", onOpenModalPreview: "p-open-modal-preview", onRemove: "p-remove", onError: "p-error", onSuccess: "p-success", ngModelChange: "ngModelChange" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-required-url": "this.requiredUrl", "attr.p-size": "this.size" } }, ngImport: i0 });
42132
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoUploadBaseComponent, isStandalone: true, inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, dragDropHeight: { classPropertyName: "dragDropHeight", publicName: "p-drag-drop-height", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "p-url", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, autoUpload: { classPropertyName: "autoUpload", publicName: "p-auto-upload", isSignal: false, isRequired: false, transformFunction: null }, disabledRemoveFile: { classPropertyName: "disabledRemoveFile", publicName: "p-disabled-remove-file", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, showThumbnail: { classPropertyName: "showThumbnail", publicName: "p-show-thumbnail", isSignal: false, isRequired: false, transformFunction: null }, headers: { classPropertyName: "headers", publicName: "p-headers", isSignal: false, isRequired: false, transformFunction: null }, requiredUrl: { classPropertyName: "requiredUrl", publicName: "p-required-url", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, customAction: { classPropertyName: "customAction", publicName: "p-custom-action", isSignal: false, isRequired: false, transformFunction: null }, customModalActions: { classPropertyName: "customModalActions", publicName: "p-custom-modal-actions", isSignal: false, isRequired: false, transformFunction: null }, directory: { classPropertyName: "directory", publicName: "p-directory", isSignal: false, isRequired: false, transformFunction: null }, dragDrop: { classPropertyName: "dragDrop", publicName: "p-drag-drop", isSignal: false, isRequired: false, transformFunction: null }, hideRestrictionsInfo: { classPropertyName: "hideRestrictionsInfo", publicName: "p-hide-restrictions-info", isSignal: false, isRequired: false, transformFunction: null }, hideSelectButton: { classPropertyName: "hideSelectButton", publicName: "p-hide-select-button", isSignal: false, isRequired: false, transformFunction: null }, hideSendButton: { classPropertyName: "hideSendButton", publicName: "p-hide-send-button", isSignal: false, isRequired: false, transformFunction: null }, literals: { classPropertyName: "literals", publicName: "p-literals", isSignal: false, isRequired: false, transformFunction: null }, fileRestrictions: { classPropertyName: "fileRestrictions", publicName: "p-restrictions", isSignal: false, isRequired: false, transformFunction: null }, formField: { classPropertyName: "formField", publicName: "p-form-field", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, isMultiple: { classPropertyName: "isMultiple", publicName: "p-multiple", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", customActionClick: "p-custom-action-click", keydown: "p-keydown", onUpload: "p-upload", onCancel: "p-cancel", onOpenModalPreview: "p-open-modal-preview", onRemove: "p-remove", onError: "p-error", onSuccess: "p-success", ngModelChange: "ngModelChange" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-required-url": "this.requiredUrl", "attr.p-size": "this.size" } }, ngImport: i0 });
41962
42133
  }
41963
42134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoUploadBaseComponent, decorators: [{
41964
42135
  type: Directive
@@ -42072,6 +42243,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
42072
42243
  }], disabled: [{
42073
42244
  type: Input,
42074
42245
  args: ['p-disabled']
42246
+ }], loading: [{
42247
+ type: Input,
42248
+ args: [{ alias: 'p-loading', transform: convertToBoolean }]
42075
42249
  }], isMultiple: [{
42076
42250
  type: Input,
42077
42251
  args: ['p-multiple']
@@ -42615,6 +42789,13 @@ class PoUploadComponent extends PoUploadBaseComponent {
42615
42789
  this.disabled ||
42616
42790
  this.isExceededFileLimit(currentFiles.length));
42617
42791
  }
42792
+ get isSelectButtonDisabled() {
42793
+ return this.loading || this.isDisabled;
42794
+ }
42795
+ get isFieldDisabled() {
42796
+ const isSelectButtonVisible = !this.hideSelectButton && !this.displayDragDrop;
42797
+ return (isSelectButtonVisible && this.loading) || this.disabled;
42798
+ }
42618
42799
  get maxFiles() {
42619
42800
  return this.isMultiple && this.fileRestrictions && this.fileRestrictions.maxFiles;
42620
42801
  }
@@ -42997,7 +43178,7 @@ class PoUploadComponent extends PoUploadBaseComponent {
42997
43178
  useExisting: forwardRef(() => PoUploadComponent),
42998
43179
  multi: true
42999
43180
  }
43000
- ], viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true, read: ElementRef, static: true }, { propertyName: "poUploadDragDropComponent", first: true, predicate: PoUploadDragDropComponent, descendants: true }, { propertyName: "uploadButton", first: true, predicate: ["uploadButton"], descendants: true }, { propertyName: "modalComponent", first: true, predicate: ["modal"], descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-upload\">\n <input\n #inputFile\n class=\"po-upload-input\"\n type=\"file\"\n [accept]=\"allowedExtensions\"\n [attr.name]=\"name\"\n [id]=\"id\"\n [disabled]=\"isDisabled\"\n [multiple]=\"isMultiple\"\n [required]=\"required\"\n (change)=\"onFileChange($event)\"\n />\n\n @if (displayDragDrop) {\n <po-upload-drag-drop\n [p-directory-compatible]=\"canHandleDirectory\"\n [p-disabled]=\"isDisabled\"\n [p-drag-drop-height]=\"dragDropHeight\"\n [p-literals]=\"literals\"\n (p-file-change)=\"onFileChangeDragDrop($event)\"\n (p-select-files)=\"selectFiles()\"\n >\n </po-upload-drag-drop>\n }\n\n @if (fileRestrictions && !hideRestrictionsInfo) {\n <po-upload-file-restrictions\n class=\"po-upload-file-restrictions\"\n [ngClass]=\"{ 'po-upload-file-restrictions-drag-drop': displayDragDrop }\"\n [class.po-pb-1]=\"!displayDragDrop\"\n [p-allowed-extensions]=\"fileRestrictions?.allowedExtensions\"\n [p-max-files]=\"maxFiles\"\n [p-max-file-size]=\"fileRestrictions?.maxFileSize\"\n [p-min-file-size]=\"fileRestrictions?.minFileSize\"\n >\n </po-upload-file-restrictions>\n }\n\n @if (!hideSelectButton && !displayDragDrop) {\n <po-button\n #uploadButton\n class=\"po-upload-button\"\n for=\"file\"\n [p-disabled]=\"isDisabled\"\n [p-label]=\"selectFileButtonLabel\"\n [p-size]=\"size\"\n (p-click)=\"selectFiles()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </po-button>\n }\n\n @if (currentFiles && currentFiles.length) {\n <div class=\"po-upload-files-content\">\n @for (file of currentFiles; track trackByFn($index, file)) {\n <div\n class=\"po-upload-progress-container\"\n [class.po-upload-container-error]=\"file.status === 2\"\n [class.po-upload-status-uploaded]=\"file.hideDoneContent\"\n >\n <po-container>\n <div\n [ngClass]=\"showThumbnail && file.thumbnailUrl ? 'po-upload-content-thumbnail' : 'po-upload-content'\"\n class=\"po-upload-content\"\n >\n <div class=\"po-upload-file-name\">\n <div class=\"po-upload-file-name-display\">\n @if (showThumbnail && file.thumbnailUrl) {\n <div class=\"po-upload-thumbnail\" (click)=\"openModal(file)\" (keydown)=\"openModal(file, $event)\">\n @if (!file.imageError) {\n <div class=\"po-upload-thumbnail-icon\">\n <po-icon p-icon=\"ICON_PICTURE\"></po-icon>\n </div>\n <img\n class=\"po-upload-thumbnail-img\"\n [src]=\"file.thumbnailUrl\"\n [alt]=\"literals.thumbnail\"\n (error)=\"onImageError(file)\"\n />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n </div>\n }\n <span\n class=\"po-upload-display-name\"\n [class.po-upload-name-interactive]=\"showThumbnail && file.thumbnailUrl\"\n [p-tooltip]=\"tooltipTitle\"\n (keydown)=\"openModal(file, $event)\"\n (click)=\"openModal(file)\"\n (mouseover)=\"showTooltipText($event, file?.displayName)\"\n (focus)=\"showTooltipText($event, file?.displayName)\"\n >{{ file.displayName }}</span\n >\n </div>\n <div class=\"po-upload-buttons-content\">\n @if (isActionVisible(customAction)) {\n <po-button\n class=\"po-upload-custom-action-button\"\n [p-danger]=\"customAction.type === 'danger'\"\n [p-disabled]=\"actionIsDisabled(customAction)\"\n [p-label]=\"customAction.label || ''\"\n [p-icon]=\"customAction.icon\"\n [p-size]=\"size\"\n (p-click)=\"customClick(file)\"\n >\n </po-button>\n }\n @if (file.status !== 0 || onRemove?.observers?.length > 0) {\n <div\n class=\"po-upload-icon-focus\"\n [class.po-upload-cancel-disabled]=\"disabledRemoveFile\"\n [attr.aria-label]=\"literals.close\"\n [tabindex]=\"disabledRemoveFile ? -1 : 0\"\n (keydown)=\"cancel(file, $event)\"\n (click)=\"cancel(file)\"\n >\n <po-icon\n class=\"po-upload-icon-close\"\n [class.po-upload-icon-remove]=\"file.status === 0\"\n [p-icon]=\"file.status === 0 ? 'ICON_DELETE' : 'ICON_CLOSE'\"\n >\n </po-icon>\n </div>\n }\n </div>\n </div>\n @if (!file.hideDoneContent) {\n <div class=\"po-upload-info-bar\" [class.fade-out]=\"file.status === 0\">\n @if (file.status === 0) {\n <span> {{ literals.doneText }} </span>\n } @else if (file.status === 2) {\n <div class=\"po-upload-content-error\">\n <po-icon class=\"po-upload-icon-error\" p-icon=\"ICON_EXCLAMATION\"></po-icon\n ><span class=\"po-upload-content-error-text\">\n {{ file?.errorMessage || literals?.errorOccurred }}\n </span>\n @if (!file.errorMessage) {\n <po-link\n class=\"po-upload-retry-link\"\n [p-label]=\"literals.tryAgain\"\n (p-action)=\"uploadFiles([file])\"\n ></po-link>\n }\n </div>\n } @else if (file.status === 1) {\n <span>{{ literals.uploadingText }}</span>\n } @else if (file.status === 3) {\n <span>{{ literals.startSending }}</span>\n }\n @if (file.status !== 2) {\n <span class=\"po-upload-value-percent\">{{ file.percent || 0 }}%</span>\n }\n </div>\n }\n </div>\n @if (file.status !== 2 && !file.hideDoneContent) {\n <po-progress\n [class.fade-out]=\"file.status === 0\"\n class=\"po-upload-progress\"\n p-size=\"medium\"\n [p-disabled-cancel]=\"disabledRemoveFile\"\n [p-value]=\"file.percent\"\n [p-status]=\"progressStatusByFileStatus[file.status]\"\n [p-size-actions]=\"size\"\n >\n </po-progress>\n }\n </po-container>\n </div>\n }\n </div>\n }\n\n @if (displaySendButton) {\n <po-button\n class=\"po-upload-send-button\"\n [class.po-mt-3]=\"hasMoreThanFourItems\"\n p-kind=\"primary\"\n [p-disabled]=\"hasAnyFileUploading(currentFiles)\"\n [p-label]=\"literals.startSending\"\n [p-size]=\"size\"\n (p-click)=\"uploadFiles(currentFiles)\"\n ></po-button>\n }\n </div>\n </div>\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n</po-field-container>\n\n<po-modal\n #modal\n [p-components-size]=\"size\"\n [p-primary-action]=\"modalPrimaryAction\"\n [p-secondary-action]=\"modalSecondaryAction\"\n [p-title]=\"literals.preview\"\n [p-click-out]=\"true\"\n (p-close)=\"closeModal.bind(this)\"\n>\n @if (!errorModalImage) {\n <img [src]=\"modalImageUrl\" [alt]=\"literals.thumbnail\" (error)=\"errorModalImage = true\" />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n</po-modal>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoContainerComponent, selector: "po-container" }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoModalComponent, selector: "po-modal" }, { kind: "component", type: PoProgressComponent, selector: "po-progress" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoLinkComponent, selector: "po-link" }, { kind: "component", type: PoUploadDragDropComponent, selector: "po-upload-drag-drop", inputs: ["p-directory-compatible", "p-disabled", "p-literals", "p-drag-drop-height"], outputs: ["p-file-change", "p-select-files"] }, { kind: "component", type: PoUploadFileRestrictionsComponent, selector: "po-upload-file-restrictions", inputs: ["p-max-files", "p-allowed-extensions", "p-max-file-size", "p-min-file-size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
43181
+ ], viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFile"], descendants: true, read: ElementRef, static: true }, { propertyName: "poUploadDragDropComponent", first: true, predicate: PoUploadDragDropComponent, descendants: true }, { propertyName: "uploadButton", first: true, predicate: ["uploadButton"], descendants: true }, { propertyName: "modalComponent", first: true, predicate: ["modal"], descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled || isFieldDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-upload\">\n <input\n #inputFile\n class=\"po-upload-input\"\n type=\"file\"\n [accept]=\"allowedExtensions\"\n [attr.name]=\"name\"\n [id]=\"id\"\n [disabled]=\"isDisabled\"\n [multiple]=\"isMultiple\"\n [required]=\"required\"\n (change)=\"onFileChange($event)\"\n />\n\n @if (displayDragDrop) {\n <po-upload-drag-drop\n [p-directory-compatible]=\"canHandleDirectory\"\n [p-disabled]=\"isDisabled\"\n [p-drag-drop-height]=\"dragDropHeight\"\n [p-literals]=\"literals\"\n (p-file-change)=\"onFileChangeDragDrop($event)\"\n (p-select-files)=\"selectFiles()\"\n >\n </po-upload-drag-drop>\n }\n\n @if (fileRestrictions && !hideRestrictionsInfo) {\n <po-upload-file-restrictions\n class=\"po-upload-file-restrictions\"\n [ngClass]=\"{ 'po-upload-file-restrictions-drag-drop': displayDragDrop }\"\n [class.po-pb-1]=\"!displayDragDrop\"\n [p-allowed-extensions]=\"fileRestrictions?.allowedExtensions\"\n [p-max-files]=\"maxFiles\"\n [p-max-file-size]=\"fileRestrictions?.maxFileSize\"\n [p-min-file-size]=\"fileRestrictions?.minFileSize\"\n >\n </po-upload-file-restrictions>\n }\n\n @if (!hideSelectButton && !displayDragDrop) {\n <po-button\n #uploadButton\n class=\"po-upload-button\"\n for=\"file\"\n [p-disabled]=\"isSelectButtonDisabled\"\n [p-loading]=\"loading\"\n [p-label]=\"selectFileButtonLabel\"\n [p-size]=\"size\"\n (p-click)=\"selectFiles()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </po-button>\n }\n\n @if (currentFiles && currentFiles.length) {\n <div class=\"po-upload-files-content\">\n @for (file of currentFiles; track trackByFn($index, file)) {\n <div\n class=\"po-upload-progress-container\"\n [class.po-upload-container-error]=\"file.status === 2\"\n [class.po-upload-status-uploaded]=\"file.hideDoneContent\"\n >\n <po-container>\n <div\n [ngClass]=\"showThumbnail && file.thumbnailUrl ? 'po-upload-content-thumbnail' : 'po-upload-content'\"\n class=\"po-upload-content\"\n >\n <div class=\"po-upload-file-name\">\n <div class=\"po-upload-file-name-display\">\n @if (showThumbnail && file.thumbnailUrl) {\n <div class=\"po-upload-thumbnail\" (click)=\"openModal(file)\" (keydown)=\"openModal(file, $event)\">\n @if (!file.imageError) {\n <div class=\"po-upload-thumbnail-icon\">\n <po-icon p-icon=\"ICON_PICTURE\"></po-icon>\n </div>\n <img\n class=\"po-upload-thumbnail-img\"\n [src]=\"file.thumbnailUrl\"\n [alt]=\"literals.thumbnail\"\n (error)=\"onImageError(file)\"\n />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n </div>\n }\n <span\n class=\"po-upload-display-name\"\n [class.po-upload-name-interactive]=\"showThumbnail && file.thumbnailUrl\"\n [p-tooltip]=\"tooltipTitle\"\n (keydown)=\"openModal(file, $event)\"\n (click)=\"openModal(file)\"\n (mouseover)=\"showTooltipText($event, file?.displayName)\"\n (focus)=\"showTooltipText($event, file?.displayName)\"\n >{{ file.displayName }}</span\n >\n </div>\n <div class=\"po-upload-buttons-content\">\n @if (isActionVisible(customAction)) {\n <po-button\n class=\"po-upload-custom-action-button\"\n [p-danger]=\"customAction.type === 'danger'\"\n [p-disabled]=\"actionIsDisabled(customAction)\"\n [p-label]=\"customAction.label || ''\"\n [p-icon]=\"customAction.icon\"\n [p-size]=\"size\"\n (p-click)=\"customClick(file)\"\n >\n </po-button>\n }\n @if (file.status !== 0 || onRemove?.observers?.length > 0) {\n <div\n class=\"po-upload-icon-focus\"\n [class.po-upload-cancel-disabled]=\"disabledRemoveFile\"\n [attr.aria-label]=\"literals.close\"\n [tabindex]=\"disabledRemoveFile ? -1 : 0\"\n (keydown)=\"cancel(file, $event)\"\n (click)=\"cancel(file)\"\n >\n <po-icon\n class=\"po-upload-icon-close\"\n [class.po-upload-icon-remove]=\"file.status === 0\"\n [p-icon]=\"file.status === 0 ? 'ICON_DELETE' : 'ICON_CLOSE'\"\n >\n </po-icon>\n </div>\n }\n </div>\n </div>\n @if (!file.hideDoneContent) {\n <div class=\"po-upload-info-bar\" [class.fade-out]=\"file.status === 0\">\n @if (file.status === 0) {\n <span> {{ literals.doneText }} </span>\n } @else if (file.status === 2) {\n <div class=\"po-upload-content-error\">\n <po-icon class=\"po-upload-icon-error\" p-icon=\"ICON_EXCLAMATION\"></po-icon\n ><span class=\"po-upload-content-error-text\">\n {{ file?.errorMessage || literals?.errorOccurred }}\n </span>\n @if (!file.errorMessage) {\n <po-link\n class=\"po-upload-retry-link\"\n [p-label]=\"literals.tryAgain\"\n (p-action)=\"uploadFiles([file])\"\n ></po-link>\n }\n </div>\n } @else if (file.status === 1) {\n <span>{{ literals.uploadingText }}</span>\n } @else if (file.status === 3) {\n <span>{{ literals.startSending }}</span>\n }\n @if (file.status !== 2) {\n <span class=\"po-upload-value-percent\">{{ file.percent || 0 }}%</span>\n }\n </div>\n }\n </div>\n @if (file.status !== 2 && !file.hideDoneContent) {\n <po-progress\n [class.fade-out]=\"file.status === 0\"\n class=\"po-upload-progress\"\n p-size=\"medium\"\n [p-disabled-cancel]=\"disabledRemoveFile\"\n [p-value]=\"file.percent\"\n [p-status]=\"progressStatusByFileStatus[file.status]\"\n [p-size-actions]=\"size\"\n >\n </po-progress>\n }\n </po-container>\n </div>\n }\n </div>\n }\n\n @if (displaySendButton) {\n <po-button\n class=\"po-upload-send-button\"\n [class.po-mt-3]=\"hasMoreThanFourItems\"\n p-kind=\"primary\"\n [p-disabled]=\"hasAnyFileUploading(currentFiles)\"\n [p-label]=\"literals.startSending\"\n [p-size]=\"size\"\n (p-click)=\"uploadFiles(currentFiles)\"\n ></po-button>\n }\n </div>\n </div>\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isFieldDisabled\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n</po-field-container>\n\n<po-modal\n #modal\n [p-components-size]=\"size\"\n [p-primary-action]=\"modalPrimaryAction\"\n [p-secondary-action]=\"modalSecondaryAction\"\n [p-title]=\"literals.preview\"\n [p-click-out]=\"true\"\n (p-close)=\"closeModal.bind(this)\"\n>\n @if (!errorModalImage) {\n <img [src]=\"modalImageUrl\" [alt]=\"literals.thumbnail\" (error)=\"errorModalImage = true\" />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n</po-modal>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoContainerComponent, selector: "po-container" }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoModalComponent, selector: "po-modal" }, { kind: "component", type: PoProgressComponent, selector: "po-progress" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoLinkComponent, selector: "po-link" }, { kind: "component", type: PoUploadDragDropComponent, selector: "po-upload-drag-drop", inputs: ["p-directory-compatible", "p-disabled", "p-literals", "p-drag-drop-height"], outputs: ["p-file-change", "p-select-files"] }, { kind: "component", type: PoUploadFileRestrictionsComponent, selector: "po-upload-file-restrictions", inputs: ["p-max-files", "p-allowed-extensions", "p-max-file-size", "p-min-file-size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
43001
43182
  }
43002
43183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoUploadComponent, decorators: [{
43003
43184
  type: Component,
@@ -43014,7 +43195,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
43014
43195
  useExisting: forwardRef(() => PoUploadComponent),
43015
43196
  multi: true
43016
43197
  }
43017
- ], standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-upload\">\n <input\n #inputFile\n class=\"po-upload-input\"\n type=\"file\"\n [accept]=\"allowedExtensions\"\n [attr.name]=\"name\"\n [id]=\"id\"\n [disabled]=\"isDisabled\"\n [multiple]=\"isMultiple\"\n [required]=\"required\"\n (change)=\"onFileChange($event)\"\n />\n\n @if (displayDragDrop) {\n <po-upload-drag-drop\n [p-directory-compatible]=\"canHandleDirectory\"\n [p-disabled]=\"isDisabled\"\n [p-drag-drop-height]=\"dragDropHeight\"\n [p-literals]=\"literals\"\n (p-file-change)=\"onFileChangeDragDrop($event)\"\n (p-select-files)=\"selectFiles()\"\n >\n </po-upload-drag-drop>\n }\n\n @if (fileRestrictions && !hideRestrictionsInfo) {\n <po-upload-file-restrictions\n class=\"po-upload-file-restrictions\"\n [ngClass]=\"{ 'po-upload-file-restrictions-drag-drop': displayDragDrop }\"\n [class.po-pb-1]=\"!displayDragDrop\"\n [p-allowed-extensions]=\"fileRestrictions?.allowedExtensions\"\n [p-max-files]=\"maxFiles\"\n [p-max-file-size]=\"fileRestrictions?.maxFileSize\"\n [p-min-file-size]=\"fileRestrictions?.minFileSize\"\n >\n </po-upload-file-restrictions>\n }\n\n @if (!hideSelectButton && !displayDragDrop) {\n <po-button\n #uploadButton\n class=\"po-upload-button\"\n for=\"file\"\n [p-disabled]=\"isDisabled\"\n [p-label]=\"selectFileButtonLabel\"\n [p-size]=\"size\"\n (p-click)=\"selectFiles()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </po-button>\n }\n\n @if (currentFiles && currentFiles.length) {\n <div class=\"po-upload-files-content\">\n @for (file of currentFiles; track trackByFn($index, file)) {\n <div\n class=\"po-upload-progress-container\"\n [class.po-upload-container-error]=\"file.status === 2\"\n [class.po-upload-status-uploaded]=\"file.hideDoneContent\"\n >\n <po-container>\n <div\n [ngClass]=\"showThumbnail && file.thumbnailUrl ? 'po-upload-content-thumbnail' : 'po-upload-content'\"\n class=\"po-upload-content\"\n >\n <div class=\"po-upload-file-name\">\n <div class=\"po-upload-file-name-display\">\n @if (showThumbnail && file.thumbnailUrl) {\n <div class=\"po-upload-thumbnail\" (click)=\"openModal(file)\" (keydown)=\"openModal(file, $event)\">\n @if (!file.imageError) {\n <div class=\"po-upload-thumbnail-icon\">\n <po-icon p-icon=\"ICON_PICTURE\"></po-icon>\n </div>\n <img\n class=\"po-upload-thumbnail-img\"\n [src]=\"file.thumbnailUrl\"\n [alt]=\"literals.thumbnail\"\n (error)=\"onImageError(file)\"\n />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n </div>\n }\n <span\n class=\"po-upload-display-name\"\n [class.po-upload-name-interactive]=\"showThumbnail && file.thumbnailUrl\"\n [p-tooltip]=\"tooltipTitle\"\n (keydown)=\"openModal(file, $event)\"\n (click)=\"openModal(file)\"\n (mouseover)=\"showTooltipText($event, file?.displayName)\"\n (focus)=\"showTooltipText($event, file?.displayName)\"\n >{{ file.displayName }}</span\n >\n </div>\n <div class=\"po-upload-buttons-content\">\n @if (isActionVisible(customAction)) {\n <po-button\n class=\"po-upload-custom-action-button\"\n [p-danger]=\"customAction.type === 'danger'\"\n [p-disabled]=\"actionIsDisabled(customAction)\"\n [p-label]=\"customAction.label || ''\"\n [p-icon]=\"customAction.icon\"\n [p-size]=\"size\"\n (p-click)=\"customClick(file)\"\n >\n </po-button>\n }\n @if (file.status !== 0 || onRemove?.observers?.length > 0) {\n <div\n class=\"po-upload-icon-focus\"\n [class.po-upload-cancel-disabled]=\"disabledRemoveFile\"\n [attr.aria-label]=\"literals.close\"\n [tabindex]=\"disabledRemoveFile ? -1 : 0\"\n (keydown)=\"cancel(file, $event)\"\n (click)=\"cancel(file)\"\n >\n <po-icon\n class=\"po-upload-icon-close\"\n [class.po-upload-icon-remove]=\"file.status === 0\"\n [p-icon]=\"file.status === 0 ? 'ICON_DELETE' : 'ICON_CLOSE'\"\n >\n </po-icon>\n </div>\n }\n </div>\n </div>\n @if (!file.hideDoneContent) {\n <div class=\"po-upload-info-bar\" [class.fade-out]=\"file.status === 0\">\n @if (file.status === 0) {\n <span> {{ literals.doneText }} </span>\n } @else if (file.status === 2) {\n <div class=\"po-upload-content-error\">\n <po-icon class=\"po-upload-icon-error\" p-icon=\"ICON_EXCLAMATION\"></po-icon\n ><span class=\"po-upload-content-error-text\">\n {{ file?.errorMessage || literals?.errorOccurred }}\n </span>\n @if (!file.errorMessage) {\n <po-link\n class=\"po-upload-retry-link\"\n [p-label]=\"literals.tryAgain\"\n (p-action)=\"uploadFiles([file])\"\n ></po-link>\n }\n </div>\n } @else if (file.status === 1) {\n <span>{{ literals.uploadingText }}</span>\n } @else if (file.status === 3) {\n <span>{{ literals.startSending }}</span>\n }\n @if (file.status !== 2) {\n <span class=\"po-upload-value-percent\">{{ file.percent || 0 }}%</span>\n }\n </div>\n }\n </div>\n @if (file.status !== 2 && !file.hideDoneContent) {\n <po-progress\n [class.fade-out]=\"file.status === 0\"\n class=\"po-upload-progress\"\n p-size=\"medium\"\n [p-disabled-cancel]=\"disabledRemoveFile\"\n [p-value]=\"file.percent\"\n [p-status]=\"progressStatusByFileStatus[file.status]\"\n [p-size-actions]=\"size\"\n >\n </po-progress>\n }\n </po-container>\n </div>\n }\n </div>\n }\n\n @if (displaySendButton) {\n <po-button\n class=\"po-upload-send-button\"\n [class.po-mt-3]=\"hasMoreThanFourItems\"\n p-kind=\"primary\"\n [p-disabled]=\"hasAnyFileUploading(currentFiles)\"\n [p-label]=\"literals.startSending\"\n [p-size]=\"size\"\n (p-click)=\"uploadFiles(currentFiles)\"\n ></po-button>\n }\n </div>\n </div>\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n</po-field-container>\n\n<po-modal\n #modal\n [p-components-size]=\"size\"\n [p-primary-action]=\"modalPrimaryAction\"\n [p-secondary-action]=\"modalSecondaryAction\"\n [p-title]=\"literals.preview\"\n [p-click-out]=\"true\"\n (p-close)=\"closeModal.bind(this)\"\n>\n @if (!errorModalImage) {\n <img [src]=\"modalImageUrl\" [alt]=\"literals.thumbnail\" (error)=\"errorModalImage = true\" />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n</po-modal>\n" }]
43198
+ ], standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled || isFieldDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-upload\">\n <input\n #inputFile\n class=\"po-upload-input\"\n type=\"file\"\n [accept]=\"allowedExtensions\"\n [attr.name]=\"name\"\n [id]=\"id\"\n [disabled]=\"isDisabled\"\n [multiple]=\"isMultiple\"\n [required]=\"required\"\n (change)=\"onFileChange($event)\"\n />\n\n @if (displayDragDrop) {\n <po-upload-drag-drop\n [p-directory-compatible]=\"canHandleDirectory\"\n [p-disabled]=\"isDisabled\"\n [p-drag-drop-height]=\"dragDropHeight\"\n [p-literals]=\"literals\"\n (p-file-change)=\"onFileChangeDragDrop($event)\"\n (p-select-files)=\"selectFiles()\"\n >\n </po-upload-drag-drop>\n }\n\n @if (fileRestrictions && !hideRestrictionsInfo) {\n <po-upload-file-restrictions\n class=\"po-upload-file-restrictions\"\n [ngClass]=\"{ 'po-upload-file-restrictions-drag-drop': displayDragDrop }\"\n [class.po-pb-1]=\"!displayDragDrop\"\n [p-allowed-extensions]=\"fileRestrictions?.allowedExtensions\"\n [p-max-files]=\"maxFiles\"\n [p-max-file-size]=\"fileRestrictions?.maxFileSize\"\n [p-min-file-size]=\"fileRestrictions?.minFileSize\"\n >\n </po-upload-file-restrictions>\n }\n\n @if (!hideSelectButton && !displayDragDrop) {\n <po-button\n #uploadButton\n class=\"po-upload-button\"\n for=\"file\"\n [p-disabled]=\"isSelectButtonDisabled\"\n [p-loading]=\"loading\"\n [p-label]=\"selectFileButtonLabel\"\n [p-size]=\"size\"\n (p-click)=\"selectFiles()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </po-button>\n }\n\n @if (currentFiles && currentFiles.length) {\n <div class=\"po-upload-files-content\">\n @for (file of currentFiles; track trackByFn($index, file)) {\n <div\n class=\"po-upload-progress-container\"\n [class.po-upload-container-error]=\"file.status === 2\"\n [class.po-upload-status-uploaded]=\"file.hideDoneContent\"\n >\n <po-container>\n <div\n [ngClass]=\"showThumbnail && file.thumbnailUrl ? 'po-upload-content-thumbnail' : 'po-upload-content'\"\n class=\"po-upload-content\"\n >\n <div class=\"po-upload-file-name\">\n <div class=\"po-upload-file-name-display\">\n @if (showThumbnail && file.thumbnailUrl) {\n <div class=\"po-upload-thumbnail\" (click)=\"openModal(file)\" (keydown)=\"openModal(file, $event)\">\n @if (!file.imageError) {\n <div class=\"po-upload-thumbnail-icon\">\n <po-icon p-icon=\"ICON_PICTURE\"></po-icon>\n </div>\n <img\n class=\"po-upload-thumbnail-img\"\n [src]=\"file.thumbnailUrl\"\n [alt]=\"literals.thumbnail\"\n (error)=\"onImageError(file)\"\n />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n </div>\n }\n <span\n class=\"po-upload-display-name\"\n [class.po-upload-name-interactive]=\"showThumbnail && file.thumbnailUrl\"\n [p-tooltip]=\"tooltipTitle\"\n (keydown)=\"openModal(file, $event)\"\n (click)=\"openModal(file)\"\n (mouseover)=\"showTooltipText($event, file?.displayName)\"\n (focus)=\"showTooltipText($event, file?.displayName)\"\n >{{ file.displayName }}</span\n >\n </div>\n <div class=\"po-upload-buttons-content\">\n @if (isActionVisible(customAction)) {\n <po-button\n class=\"po-upload-custom-action-button\"\n [p-danger]=\"customAction.type === 'danger'\"\n [p-disabled]=\"actionIsDisabled(customAction)\"\n [p-label]=\"customAction.label || ''\"\n [p-icon]=\"customAction.icon\"\n [p-size]=\"size\"\n (p-click)=\"customClick(file)\"\n >\n </po-button>\n }\n @if (file.status !== 0 || onRemove?.observers?.length > 0) {\n <div\n class=\"po-upload-icon-focus\"\n [class.po-upload-cancel-disabled]=\"disabledRemoveFile\"\n [attr.aria-label]=\"literals.close\"\n [tabindex]=\"disabledRemoveFile ? -1 : 0\"\n (keydown)=\"cancel(file, $event)\"\n (click)=\"cancel(file)\"\n >\n <po-icon\n class=\"po-upload-icon-close\"\n [class.po-upload-icon-remove]=\"file.status === 0\"\n [p-icon]=\"file.status === 0 ? 'ICON_DELETE' : 'ICON_CLOSE'\"\n >\n </po-icon>\n </div>\n }\n </div>\n </div>\n @if (!file.hideDoneContent) {\n <div class=\"po-upload-info-bar\" [class.fade-out]=\"file.status === 0\">\n @if (file.status === 0) {\n <span> {{ literals.doneText }} </span>\n } @else if (file.status === 2) {\n <div class=\"po-upload-content-error\">\n <po-icon class=\"po-upload-icon-error\" p-icon=\"ICON_EXCLAMATION\"></po-icon\n ><span class=\"po-upload-content-error-text\">\n {{ file?.errorMessage || literals?.errorOccurred }}\n </span>\n @if (!file.errorMessage) {\n <po-link\n class=\"po-upload-retry-link\"\n [p-label]=\"literals.tryAgain\"\n (p-action)=\"uploadFiles([file])\"\n ></po-link>\n }\n </div>\n } @else if (file.status === 1) {\n <span>{{ literals.uploadingText }}</span>\n } @else if (file.status === 3) {\n <span>{{ literals.startSending }}</span>\n }\n @if (file.status !== 2) {\n <span class=\"po-upload-value-percent\">{{ file.percent || 0 }}%</span>\n }\n </div>\n }\n </div>\n @if (file.status !== 2 && !file.hideDoneContent) {\n <po-progress\n [class.fade-out]=\"file.status === 0\"\n class=\"po-upload-progress\"\n p-size=\"medium\"\n [p-disabled-cancel]=\"disabledRemoveFile\"\n [p-value]=\"file.percent\"\n [p-status]=\"progressStatusByFileStatus[file.status]\"\n [p-size-actions]=\"size\"\n >\n </po-progress>\n }\n </po-container>\n </div>\n }\n </div>\n }\n\n @if (displaySendButton) {\n <po-button\n class=\"po-upload-send-button\"\n [class.po-mt-3]=\"hasMoreThanFourItems\"\n p-kind=\"primary\"\n [p-disabled]=\"hasAnyFileUploading(currentFiles)\"\n [p-label]=\"literals.startSending\"\n [p-size]=\"size\"\n (p-click)=\"uploadFiles(currentFiles)\"\n ></po-button>\n }\n </div>\n </div>\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isFieldDisabled\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n</po-field-container>\n\n<po-modal\n #modal\n [p-components-size]=\"size\"\n [p-primary-action]=\"modalPrimaryAction\"\n [p-secondary-action]=\"modalSecondaryAction\"\n [p-title]=\"literals.preview\"\n [p-click-out]=\"true\"\n (p-close)=\"closeModal.bind(this)\"\n>\n @if (!errorModalImage) {\n <img [src]=\"modalImageUrl\" [alt]=\"literals.thumbnail\" (error)=\"errorModalImage = true\" />\n } @else {\n <div class=\"po-upload-thumbnail-broken\">\n <po-icon p-icon=\"ICON_PICTURE_BROKEN\"></po-icon>\n </div>\n }\n</po-modal>\n" }]
43018
43199
  }], ctorParameters: () => [], propDecorators: { inputFile: [{
43019
43200
  type: ViewChild,
43020
43201
  args: ['inputFile', { read: ElementRef, static: true }]
@@ -43465,6 +43646,7 @@ class PoRichTextToolbarComponent {
43465
43646
  get isInternetExplorer() {
43466
43647
  return PoUtils.isIE();
43467
43648
  }
43649
+ disabled;
43468
43650
  size;
43469
43651
  constructor() {
43470
43652
  this.literals = {
@@ -43601,11 +43783,11 @@ class PoRichTextToolbarComponent {
43601
43783
  this.mediaButtons[0].disabled = state;
43602
43784
  }
43603
43785
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
43604
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoRichTextToolbarComponent, isStandalone: false, selector: "po-rich-text-toolbar", inputs: { hideToolbarActions: ["p-hide-toolbar-actions", "hideToolbarActions"], readonly: ["p-readonly", "readonly"], size: ["p-size", "size"] }, outputs: { command: "p-command", modal: "p-modal", linkEditing: "p-link-editing" }, host: { properties: { "attr.p-size": "this.size" } }, viewQueries: [{ propertyName: "colorPickerInput", first: true, predicate: ["colorPickerInput"], descendants: true, read: ElementRef }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, static: true }, { propertyName: "richTextImageModal", first: true, predicate: PoRichTextImageModalComponent, descendants: true, static: true }, { propertyName: "richTextLinkModal", first: true, predicate: PoRichTextLinkModalComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"po-rich-text-toolbar\" #toolbarElement>\n @if (!isActionHidden(formatToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"format\">\n <po-button-group p-toggle=\"multiple\" [p-buttons]=\"formatButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (showColor()) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"color\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n type=\"button\"\n class=\"po-button po-button-default po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (input)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n }\n\n @if (!isActionHidden(alignToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"alignButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(listToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"list\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"listButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(linkToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"link\">\n <po-button-group [p-buttons]=\"linkButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(mediaToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"media\">\n <po-button-group [p-buttons]=\"mediaButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n</div>\n\n<po-rich-text-image-modal #richTextImageModal [p-size]=\"size\" (p-command)=\"emitCommand($event)\">\n</po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n [p-size]=\"size\"\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n", dependencies: [{ kind: "component", type: PoButtonGroupComponent, selector: "po-button-group" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoRichTextImageModalComponent, selector: "po-rich-text-image-modal", inputs: ["p-size"], outputs: ["p-command"] }, { kind: "component", type: PoRichTextLinkModalComponent, selector: "po-rich-text-link-modal", inputs: ["p-size"], outputs: ["p-command", "p-link-editing"] }] });
43786
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoRichTextToolbarComponent, isStandalone: false, selector: "po-rich-text-toolbar", inputs: { hideToolbarActions: ["p-hide-toolbar-actions", "hideToolbarActions"], readonly: ["p-readonly", "readonly"], disabled: ["p-disabled", "disabled"], size: ["p-size", "size"] }, outputs: { command: "p-command", modal: "p-modal", linkEditing: "p-link-editing" }, host: { properties: { "attr.p-size": "this.size" } }, viewQueries: [{ propertyName: "colorPickerInput", first: true, predicate: ["colorPickerInput"], descendants: true, read: ElementRef }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, static: true }, { propertyName: "richTextImageModal", first: true, predicate: PoRichTextImageModalComponent, descendants: true, static: true }, { propertyName: "richTextLinkModal", first: true, predicate: PoRichTextLinkModalComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"po-rich-text-toolbar\" #toolbarElement [class.po-rich-text-disabled]=\"disabled\">\n @if (!isActionHidden(formatToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"format\">\n <po-button-group p-toggle=\"multiple\" [p-buttons]=\"formatButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (showColor()) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"color\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n type=\"button\"\n class=\"po-button po-button-default po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (input)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n }\n\n @if (!isActionHidden(alignToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"alignButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(listToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"list\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"listButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(linkToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"link\">\n <po-button-group [p-buttons]=\"linkButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(mediaToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"media\">\n <po-button-group [p-buttons]=\"mediaButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n</div>\n\n<po-rich-text-image-modal #richTextImageModal [p-size]=\"size\" (p-command)=\"emitCommand($event)\">\n</po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n [p-size]=\"size\"\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n", dependencies: [{ kind: "component", type: PoButtonGroupComponent, selector: "po-button-group" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoRichTextImageModalComponent, selector: "po-rich-text-image-modal", inputs: ["p-size"], outputs: ["p-command"] }, { kind: "component", type: PoRichTextLinkModalComponent, selector: "po-rich-text-link-modal", inputs: ["p-size"], outputs: ["p-command", "p-link-editing"] }] });
43605
43787
  }
43606
43788
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextToolbarComponent, decorators: [{
43607
43789
  type: Component,
43608
- args: [{ selector: 'po-rich-text-toolbar', standalone: false, template: "<div class=\"po-rich-text-toolbar\" #toolbarElement>\n @if (!isActionHidden(formatToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"format\">\n <po-button-group p-toggle=\"multiple\" [p-buttons]=\"formatButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (showColor()) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"color\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n type=\"button\"\n class=\"po-button po-button-default po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (input)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n }\n\n @if (!isActionHidden(alignToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"alignButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(listToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"list\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"listButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(linkToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"link\">\n <po-button-group [p-buttons]=\"linkButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(mediaToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"media\">\n <po-button-group [p-buttons]=\"mediaButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n</div>\n\n<po-rich-text-image-modal #richTextImageModal [p-size]=\"size\" (p-command)=\"emitCommand($event)\">\n</po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n [p-size]=\"size\"\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n" }]
43790
+ args: [{ selector: 'po-rich-text-toolbar', standalone: false, template: "<div class=\"po-rich-text-toolbar\" #toolbarElement [class.po-rich-text-disabled]=\"disabled\">\n @if (!isActionHidden(formatToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"format\">\n <po-button-group p-toggle=\"multiple\" [p-buttons]=\"formatButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (showColor()) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"color\">\n <div class=\"po-rich-text-toolbar-color-picker-container\">\n <button\n type=\"button\"\n class=\"po-button po-button-default po-rich-text-toolbar-color-picker-button\"\n [disabled]=\"readonly\"\n [p-tooltip]=\"literals.textColor\"\n [attr.aria-label]=\"literals.textColor\"\n >\n <input\n #colorPickerInput\n class=\"po-rich-text-toolbar-color-picker-input\"\n type=\"color\"\n [disabled]=\"readonly\"\n (input)=\"changeTextColor($event.target.value)\"\n [attr.aria-label]=\"literals.textColor\"\n />\n </button>\n </div>\n </div>\n }\n\n @if (!isActionHidden(alignToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"align\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"alignButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(listToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"list\">\n <po-button-group p-toggle=\"single\" [p-buttons]=\"listButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(linkToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"link\">\n <po-button-group [p-buttons]=\"linkButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n\n @if (!isActionHidden(mediaToolbarAction)) {\n <div class=\"po-rich-text-toolbar-button-align\" data-rich-text-toolbar=\"media\">\n <po-button-group [p-buttons]=\"mediaButtons\" [p-size]=\"size\"> </po-button-group>\n </div>\n }\n</div>\n\n<po-rich-text-image-modal #richTextImageModal [p-size]=\"size\" (p-command)=\"emitCommand($event)\">\n</po-rich-text-image-modal>\n\n<po-rich-text-link-modal\n #richTextLinkModal\n [p-size]=\"size\"\n (p-command)=\"emitCommand($event)\"\n (p-link-editing)=\"emitLinkEditing($event)\"\n>\n</po-rich-text-link-modal>\n" }]
43609
43791
  }], ctorParameters: () => [], propDecorators: { colorPickerInput: [{
43610
43792
  type: ViewChild,
43611
43793
  args: ['colorPickerInput', { read: ElementRef }]
@@ -43633,6 +43815,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
43633
43815
  }], readonly: [{
43634
43816
  type: Input,
43635
43817
  args: ['p-readonly']
43818
+ }], disabled: [{
43819
+ type: Input,
43820
+ args: ['p-disabled']
43636
43821
  }], size: [{
43637
43822
  type: HostBinding,
43638
43823
  args: ['attr.p-size']
@@ -43693,7 +43878,8 @@ class PoRichTextComponent extends PoRichTextBaseComponent {
43693
43878
  }
43694
43879
  constructor() {
43695
43880
  const richTextService = inject(PoRichTextService);
43696
- super(richTextService);
43881
+ const cd = inject(ChangeDetectorRef);
43882
+ super(richTextService, cd);
43697
43883
  }
43698
43884
  ngOnInit() {
43699
43885
  this.toolbarActions = [...this.hideToolbarActions];
@@ -43846,11 +44032,11 @@ class PoRichTextComponent extends PoRichTextBaseComponent {
43846
44032
  return setHelperSettings(label, additionalHelpTooltip, this.poHelperComponent(), this.size, this.additionalHelp.observed ? this.additionalHelp : undefined);
43847
44033
  }
43848
44034
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
43849
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoRichTextComponent, isStandalone: false, selector: "po-rich-text", providers: providers, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: PoRichTextBodyComponent, descendants: true, static: true }, { propertyName: "richTextToolbar", first: true, predicate: PoRichTextToolbarComponent, descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <po-rich-text-body\n #richTextBody\n [p-height]=\"height\"\n [p-label]=\"label\"\n [p-model-value]=\"value\"\n [p-placeholder]=\"placeholder\"\n [p-readonly]=\"readonly\"\n [p-size]=\"size\"\n (p-change)=\"onChangeValue($event)\"\n (p-commands)=\"richTextToolbar?.setButtonsStates($event)\"\n (p-selected-link)=\"richTextToolbar?.selectedLink($event)\"\n (p-shortcut-command)=\"richTextToolbar?.shortcutTrigger()\"\n (p-value)=\"updateValue($event)\"\n (p-blur)=\"onBlur()\"\n (p-keydown)=\"onKeyDown($event)\"\n >\n </po-rich-text-body>\n\n @if (!isAllActionsHidden()) {\n <po-rich-text-toolbar\n #richTextToolbar\n [p-readonly]=\"readonly\"\n [p-hide-toolbar-actions]=\"toolbarActions\"\n [p-size]=\"size\"\n (p-link-editing)=\"richTextBody.linkEditing($event)\"\n (p-command)=\"richTextBody.executeCommand($event)\"\n >\n </po-rich-text-toolbar>\n }\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-error-limit]=\"errorLimit\"\n [p-error-pattern]=\"errorMsg\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n", dependencies: [{ kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoRichTextBodyComponent, selector: "po-rich-text-body", inputs: ["p-height", "p-label", "p-model-value", "p-placeholder", "p-readonly", "p-size"], outputs: ["p-change", "p-commands", "p-keydown", "p-selected-link", "p-shortcut-command", "p-value", "p-blur"] }, { kind: "component", type: PoRichTextToolbarComponent, selector: "po-rich-text-toolbar", inputs: ["p-hide-toolbar-actions", "p-readonly", "p-size"], outputs: ["p-command", "p-modal", "p-link-editing"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
44035
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoRichTextComponent, isStandalone: false, selector: "po-rich-text", providers: providers, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: PoRichTextBodyComponent, descendants: true, static: true }, { propertyName: "richTextToolbar", first: true, predicate: PoRichTextToolbarComponent, descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <po-rich-text-body\n #richTextBody\n [p-height]=\"height\"\n [p-label]=\"label\"\n [p-model-value]=\"value\"\n [p-placeholder]=\"placeholder\"\n [p-readonly]=\"readonly\"\n [p-disabled]=\"isDisabled\"\n [p-loading]=\"loading\"\n [p-size]=\"size\"\n (p-change)=\"onChangeValue($event)\"\n (p-commands)=\"richTextToolbar?.setButtonsStates($event)\"\n (p-selected-link)=\"richTextToolbar?.selectedLink($event)\"\n (p-shortcut-command)=\"richTextToolbar?.shortcutTrigger()\"\n (p-value)=\"updateValue($event)\"\n (p-blur)=\"onBlur()\"\n (p-keydown)=\"onKeyDown($event)\"\n >\n </po-rich-text-body>\n @if (!isAllActionsHidden()) {\n <po-rich-text-toolbar\n #richTextToolbar\n [p-readonly]=\"readonly || isDisabled\"\n [p-disabled]=\"isDisabled\"\n [p-hide-toolbar-actions]=\"toolbarActions\"\n [p-size]=\"size\"\n (p-link-editing)=\"richTextBody.linkEditing($event)\"\n (p-command)=\"richTextBody.executeCommand($event)\"\n >\n </po-rich-text-toolbar>\n }\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-limit]=\"errorLimit\"\n [p-error-pattern]=\"errorMsg\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n", dependencies: [{ kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoRichTextBodyComponent, selector: "po-rich-text-body", inputs: ["p-height", "p-label", "p-model-value", "p-placeholder", "p-readonly", "p-disabled", "p-loading", "p-size"], outputs: ["p-change", "p-commands", "p-keydown", "p-selected-link", "p-shortcut-command", "p-value", "p-blur"] }, { kind: "component", type: PoRichTextToolbarComponent, selector: "po-rich-text-toolbar", inputs: ["p-hide-toolbar-actions", "p-readonly", "p-disabled", "p-size"], outputs: ["p-command", "p-modal", "p-link-editing"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
43850
44036
  }
43851
44037
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoRichTextComponent, decorators: [{
43852
44038
  type: Component,
43853
- args: [{ selector: 'po-rich-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: providers, standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <po-rich-text-body\n #richTextBody\n [p-height]=\"height\"\n [p-label]=\"label\"\n [p-model-value]=\"value\"\n [p-placeholder]=\"placeholder\"\n [p-readonly]=\"readonly\"\n [p-size]=\"size\"\n (p-change)=\"onChangeValue($event)\"\n (p-commands)=\"richTextToolbar?.setButtonsStates($event)\"\n (p-selected-link)=\"richTextToolbar?.selectedLink($event)\"\n (p-shortcut-command)=\"richTextToolbar?.shortcutTrigger()\"\n (p-value)=\"updateValue($event)\"\n (p-blur)=\"onBlur()\"\n (p-keydown)=\"onKeyDown($event)\"\n >\n </po-rich-text-body>\n\n @if (!isAllActionsHidden()) {\n <po-rich-text-toolbar\n #richTextToolbar\n [p-readonly]=\"readonly\"\n [p-hide-toolbar-actions]=\"toolbarActions\"\n [p-size]=\"size\"\n (p-link-editing)=\"richTextBody.linkEditing($event)\"\n (p-command)=\"richTextBody.executeCommand($event)\"\n >\n </po-rich-text-toolbar>\n }\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-error-limit]=\"errorLimit\"\n [p-error-pattern]=\"errorMsg\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n" }]
44039
+ args: [{ selector: 'po-rich-text', changeDetection: ChangeDetectionStrategy.OnPush, providers: providers, standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <po-rich-text-body\n #richTextBody\n [p-height]=\"height\"\n [p-label]=\"label\"\n [p-model-value]=\"value\"\n [p-placeholder]=\"placeholder\"\n [p-readonly]=\"readonly\"\n [p-disabled]=\"isDisabled\"\n [p-loading]=\"loading\"\n [p-size]=\"size\"\n (p-change)=\"onChangeValue($event)\"\n (p-commands)=\"richTextToolbar?.setButtonsStates($event)\"\n (p-selected-link)=\"richTextToolbar?.selectedLink($event)\"\n (p-shortcut-command)=\"richTextToolbar?.shortcutTrigger()\"\n (p-value)=\"updateValue($event)\"\n (p-blur)=\"onBlur()\"\n (p-keydown)=\"onKeyDown($event)\"\n >\n </po-rich-text-body>\n @if (!isAllActionsHidden()) {\n <po-rich-text-toolbar\n #richTextToolbar\n [p-readonly]=\"readonly || isDisabled\"\n [p-disabled]=\"isDisabled\"\n [p-hide-toolbar-actions]=\"toolbarActions\"\n [p-size]=\"size\"\n (p-link-editing)=\"richTextBody.linkEditing($event)\"\n (p-command)=\"richTextBody.executeCommand($event)\"\n >\n </po-rich-text-toolbar>\n }\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-limit]=\"errorLimit\"\n [p-error-pattern]=\"errorMsg\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n" }]
43854
44040
  }], ctorParameters: () => [], propDecorators: { bodyElement: [{
43855
44041
  type: ViewChild,
43856
44042
  args: [PoRichTextBodyComponent, { static: true }]
@@ -44845,6 +45031,7 @@ class PoTextareaBaseComponent {
44845
45031
  keydown = new EventEmitter();
44846
45032
  displayAdditionalHelp = false;
44847
45033
  _disabled = false;
45034
+ _loading = false;
44848
45035
  _maxlength;
44849
45036
  _minlength;
44850
45037
  _placeholder = '';
@@ -44881,6 +45068,24 @@ class PoTextareaBaseComponent {
44881
45068
  get disabled() {
44882
45069
  return this._disabled;
44883
45070
  }
45071
+ /**
45072
+ * @optional
45073
+ *
45074
+ * @description
45075
+ * Exibe um ícone de carregamento no lado direito do campo para sinalizar que uma operação está em andamento.
45076
+ *
45077
+ * @default `false`
45078
+ */
45079
+ set loading(value) {
45080
+ this._loading = value;
45081
+ this.cd?.markForCheck();
45082
+ }
45083
+ get loading() {
45084
+ return this._loading;
45085
+ }
45086
+ get isDisabled() {
45087
+ return this.disabled || this.loading;
45088
+ }
44884
45089
  /**
44885
45090
  * @optional
44886
45091
  *
@@ -44989,7 +45194,9 @@ class PoTextareaBaseComponent {
44989
45194
  }
44990
45195
  onThemeChange() {
44991
45196
  this.applySizeBasedOnA11y();
45197
+ this.onAfterThemeChange();
44992
45198
  }
45199
+ onAfterThemeChange() { }
44993
45200
  callOnChange(value) {
44994
45201
  // Quando o input não possui um formulário, então esta função não é registrada
44995
45202
  if (this.onChangePropagate) {
@@ -45051,6 +45258,10 @@ class PoTextareaBaseComponent {
45051
45258
  this.writeValueModel(value);
45052
45259
  this.cd.markForCheck();
45053
45260
  }
45261
+ //Transforma o tamanho do input para o tamanho do ícone de loading correspondente
45262
+ mapSizeToIcon(size) {
45263
+ return mapInputSizeToLoadingIcon(size);
45264
+ }
45054
45265
  validateModel() {
45055
45266
  if (this.validatorChange) {
45056
45267
  this.validatorChange();
@@ -45061,7 +45272,7 @@ class PoTextareaBaseComponent {
45061
45272
  this._size = size;
45062
45273
  }
45063
45274
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoTextareaBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
45064
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoTextareaBaseComponent, isStandalone: true, inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, fieldErrorMessage: { classPropertyName: "fieldErrorMessage", publicName: "p-field-error-message", isSignal: false, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "p-minlength", isSignal: false, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "p-maxlength", isSignal: false, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "p-rows", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", blur: "p-blur", enter: "p-enter", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
45275
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: PoTextareaBaseComponent, isStandalone: true, inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "p-optional", isSignal: false, isRequired: false, transformFunction: null }, fieldErrorMessage: { classPropertyName: "fieldErrorMessage", publicName: "p-field-error-message", isSignal: false, isRequired: false, transformFunction: null }, errorLimit: { classPropertyName: "errorLimit", publicName: "p-error-limit", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "p-placeholder", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, readonly: { classPropertyName: "readonly", publicName: "p-readonly", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "p-show-required", isSignal: false, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "p-minlength", isSignal: false, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "p-maxlength", isSignal: false, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "p-rows", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", blur: "p-blur", enter: "p-enter", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
45065
45276
  }
45066
45277
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoTextareaBaseComponent, decorators: [{
45067
45278
  type: Directive
@@ -45118,6 +45329,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
45118
45329
  }], disabled: [{
45119
45330
  type: Input,
45120
45331
  args: ['p-disabled']
45332
+ }], loading: [{
45333
+ type: Input,
45334
+ args: [{ alias: 'p-loading', transform: convertToBoolean }]
45121
45335
  }], readonly: [{
45122
45336
  type: Input,
45123
45337
  args: ['p-readonly']
@@ -45180,6 +45394,9 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45180
45394
  id = `po-textarea[${uuid()}]`;
45181
45395
  valueBeforeChange;
45182
45396
  fireChange = false;
45397
+ hasScroll = false;
45398
+ hasValue = false;
45399
+ resizeObserver;
45183
45400
  constructor() {
45184
45401
  const cd = inject(ChangeDetectorRef);
45185
45402
  super(cd);
@@ -45215,11 +45432,43 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45215
45432
  if (this.autoFocus) {
45216
45433
  this.focus();
45217
45434
  }
45435
+ this.initResizeObserver();
45436
+ window.addEventListener('resize', this.onWindowResize);
45437
+ }
45438
+ onAfterThemeChange() {
45439
+ requestAnimationFrame(() => {
45440
+ this.calculateTextareaHeight();
45441
+ this.checkScrollState();
45442
+ });
45218
45443
  }
45219
45444
  ngOnChanges(changes) {
45220
45445
  if (changes.label) {
45221
45446
  this.displayAdditionalHelp = false;
45222
45447
  }
45448
+ if (changes.loading) {
45449
+ if (changes.loading.isFirstChange() && this.loading) {
45450
+ requestAnimationFrame(() => {
45451
+ this.calculateTextareaHeight();
45452
+ this.checkScrollState();
45453
+ });
45454
+ }
45455
+ else {
45456
+ this.calculateTextareaHeight();
45457
+ requestAnimationFrame(() => {
45458
+ this.checkScrollState();
45459
+ });
45460
+ }
45461
+ }
45462
+ if (!changes.loading && this.loading && (changes.rows || changes.size)) {
45463
+ requestAnimationFrame(() => {
45464
+ this.calculateTextareaHeight();
45465
+ this.checkScrollState();
45466
+ });
45467
+ }
45468
+ }
45469
+ ngOnDestroy() {
45470
+ this.resizeObserver?.disconnect();
45471
+ window.removeEventListener('resize', this.onWindowResize);
45223
45472
  }
45224
45473
  getAdditionalHelpTooltip() {
45225
45474
  return this.isAdditionalHelpEventTriggered() ? null : this.additionalHelpTooltip;
@@ -45242,6 +45491,8 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45242
45491
  else {
45243
45492
  this.inputEl.nativeElement.value = value;
45244
45493
  }
45494
+ this.hasValue = !!value;
45495
+ this.checkScrollState();
45245
45496
  }
45246
45497
  // Emite evento quando o model é atualizado, inclusive a primeira vez
45247
45498
  if (value) {
@@ -45255,6 +45506,8 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45255
45506
  const value = this.validMaxLength(this.maxlength, event.target.value);
45256
45507
  this.callOnChange(value);
45257
45508
  this.inputEl.nativeElement.value = value;
45509
+ this.hasValue = !!value;
45510
+ this.checkScrollState();
45258
45511
  }
45259
45512
  eventOnFocus() {
45260
45513
  // Atualiza valor da variável que será usada para verificar se o campo teve alteração
@@ -45333,6 +45586,49 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45333
45586
  setHelper(label, additionalHelpTooltip) {
45334
45587
  return setHelperSettings(label, additionalHelpTooltip, this.poHelperComponent(), this.size, this.isAdditionalHelpEventTriggered() ? this.additionalHelp : undefined);
45335
45588
  }
45589
+ onWindowResize = () => {
45590
+ this.checkScrollState();
45591
+ if (this.loading) {
45592
+ this.calculateTextareaHeight();
45593
+ }
45594
+ };
45595
+ checkScrollState() {
45596
+ const el = this.inputEl?.nativeElement;
45597
+ if (!el)
45598
+ return;
45599
+ this.hasScroll = el.scrollHeight > el.clientHeight;
45600
+ this.cd.markForCheck();
45601
+ }
45602
+ calculateTextareaHeight() {
45603
+ const textarea = this.inputEl?.nativeElement;
45604
+ if (!textarea)
45605
+ return;
45606
+ if (this.loading) {
45607
+ textarea.style.height = '';
45608
+ const style = getComputedStyle(textarea);
45609
+ const lineHeight = Number.parseFloat(style.lineHeight);
45610
+ const paddingTop = Number.parseFloat(style.paddingTop);
45611
+ const paddingBottom = Number.parseFloat(style.paddingBottom);
45612
+ const borderTop = Number.parseFloat(style.borderTopWidth);
45613
+ const borderBottom = Number.parseFloat(style.borderBottomWidth);
45614
+ const calculatedHeight = this.rows * lineHeight + paddingTop + paddingBottom + borderTop + borderBottom;
45615
+ textarea.style.height = `${calculatedHeight}px`;
45616
+ }
45617
+ else {
45618
+ textarea.style.height = '';
45619
+ }
45620
+ }
45621
+ initResizeObserver() {
45622
+ const el = this.inputEl?.nativeElement;
45623
+ if (!el || typeof ResizeObserver === 'undefined')
45624
+ return;
45625
+ this.resizeObserver = new ResizeObserver(() => {
45626
+ requestAnimationFrame(() => {
45627
+ this.checkScrollState();
45628
+ });
45629
+ });
45630
+ this.resizeObserver.observe(el);
45631
+ }
45336
45632
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
45337
45633
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoTextareaComponent, isStandalone: false, selector: "po-textarea", providers: [
45338
45634
  {
@@ -45345,7 +45641,7 @@ class PoTextareaComponent extends PoTextareaBaseComponent {
45345
45641
  useExisting: forwardRef(() => PoTextareaComponent),
45346
45642
  multi: true
45347
45643
  }
45348
- ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <textarea\n #inp\n class=\"po-textarea\"\n (blur)=\"eventOnBlur()\"\n (focus)=\"eventOnFocus()\"\n (input)=\"eventOnInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [rows]=\"rows\"\n ></textarea>\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n", dependencies: [{ kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
45644
+ ], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-field-container-textarea-body\">\n <textarea\n #inp\n class=\"po-textarea\"\n [class.has-scroll]=\"hasScroll\"\n [class.has-value]=\"hasValue\"\n [class.has-loading]=\"loading\"\n (blur)=\"eventOnBlur()\"\n (focus)=\"eventOnFocus()\"\n (input)=\"eventOnInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n [attr.name]=\"name\"\n [disabled]=\"isDisabled\"\n [id]=\"id\"\n [placeholder]=\"isDisabled ? '' : placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [rows]=\"rows\"\n ></textarea>\n @if (loading) {\n <div class=\"po-field-icon-container-right po-textarea-loading-container\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n </div>\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n", dependencies: [{ kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
45349
45645
  }
45350
45646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoTextareaComponent, decorators: [{
45351
45647
  type: Component,
@@ -45360,7 +45656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
45360
45656
  useExisting: forwardRef(() => PoTextareaComponent),
45361
45657
  multi: true
45362
45658
  }
45363
- ], standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n<po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <textarea\n #inp\n class=\"po-textarea\"\n (blur)=\"eventOnBlur()\"\n (focus)=\"eventOnFocus()\"\n (input)=\"eventOnInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [rows]=\"rows\"\n ></textarea>\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"disabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n" }]
45659
+ ], standalone: false, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n\n<po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n>\n <div class=\"po-field-container-content\">\n <div class=\"po-field-container-textarea-body\">\n <textarea\n #inp\n class=\"po-textarea\"\n [class.has-scroll]=\"hasScroll\"\n [class.has-value]=\"hasValue\"\n [class.has-loading]=\"loading\"\n (blur)=\"eventOnBlur()\"\n (focus)=\"eventOnFocus()\"\n (input)=\"eventOnInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n [attr.name]=\"name\"\n [disabled]=\"isDisabled\"\n [id]=\"id\"\n [placeholder]=\"isDisabled ? '' : placeholder\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [rows]=\"rows\"\n ></textarea>\n @if (loading) {\n <div class=\"po-field-icon-container-right po-textarea-loading-container\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n </div>\n </div>\n @if (!readonly) {\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n [p-helper]=\"!label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"!label ? displayAdditionalHelp : undefined\"\n ></po-field-container-bottom>\n }\n</po-field-container>\n" }]
45364
45660
  }], ctorParameters: () => [], propDecorators: { inputEl: [{
45365
45661
  type: ViewChild,
45366
45662
  args: ['inp', { read: ElementRef, static: true }]
@@ -59677,11 +59973,11 @@ class PoHeaderToolsComponent {
59677
59973
  }
59678
59974
  }
59679
59975
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoHeaderToolsComponent, deps: [{ token: i1$1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
59680
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoHeaderToolsComponent, isStandalone: false, selector: "po-header-tools", inputs: { forceActionTools: ["p-force-actions-tools", "forceActionTools"], actionTools: ["p-actions-tools", "actionTools"], literals: ["p-literals", "literals"], headerTemplate: ["p-header-template", "headerTemplate"] }, viewQueries: [{ propertyName: "buttonActionElements", predicate: ["buttonActionElement"], descendants: true, read: ElementRef }, { propertyName: "buttonActionComponents", predicate: ["buttonActionElement"], descendants: true }, { propertyName: "poPopupActions", predicate: ["poPopupAction"], descendants: true }, { propertyName: "poPopoverActions", predicate: ["poPopoverAction"], descendants: true }], ngImport: i0, template: "<div class=\"po-header-nav-tools\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n @for (action of actionTools; track action?.label; let i = $index) {\n <li [class.po-header-nav-item-small]=\"i !== actionTools.length - 1\">\n <po-button\n #buttonActionElement\n [p-tooltip]=\"action?.tooltip\"\n [p-icon]=\"action?.badge ? badge : action?.icon || 'an an-dots-nine'\"\n p-kind=\"tertiary\"\n (p-click)=\"onClickAction(i)\"\n [class.po-header-selected-tool]=\"checkSelected(i)\"\n [p-aria-expanded]=\"checkSelected(i)\"\n [p-aria-label]=\"getAriaLabel(action)\"\n p-size=\"medium\"\n >\n </po-button>\n\n <ng-template #badge>\n <i class=\"po-header-badge\" [class]=\"action?.icon || 'an an-bell'\">\n <po-badge class=\"po-header-status\" [p-value]=\"action?.badge\"></po-badge>\n </i>\n </ng-template>\n\n <po-popup\n #poPopupAction\n [p-actions]=\"action?.items\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n (p-close)=\"onClosePopup(i)\"\n p-size=\"medium\"\n >\n </po-popup>\n\n @if (action?.popover) {\n <po-popover\n #poPopoverAction\n [p-target]=\"buttonActionElements?.get(i)\"\n p-position=\"bottom-left\"\n [p-hide-arrow]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"action.popover?.content\"></ng-container>\n </po-popover>\n }\n </li>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoBadgeComponent, selector: "po-badge" }, { kind: "component", type: PoPopoverComponent, selector: "po-popover" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }] });
59976
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoHeaderToolsComponent, isStandalone: false, selector: "po-header-tools", inputs: { forceActionTools: ["p-force-actions-tools", "forceActionTools"], actionTools: ["p-actions-tools", "actionTools"], literals: ["p-literals", "literals"], headerTemplate: ["p-header-template", "headerTemplate"] }, viewQueries: [{ propertyName: "buttonActionElements", predicate: ["buttonActionElement"], descendants: true, read: ElementRef }, { propertyName: "buttonActionComponents", predicate: ["buttonActionElement"], descendants: true }, { propertyName: "poPopupActions", predicate: ["poPopupAction"], descendants: true }, { propertyName: "poPopoverActions", predicate: ["poPopoverAction"], descendants: true }], ngImport: i0, template: "<div class=\"po-header-nav-tools\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n @for (action of actionTools; track action?.label; let i = $index) {\n <li [class.po-header-nav-item-small]=\"i !== actionTools.length - 1\">\n <po-button\n #buttonActionElement\n [p-tooltip]=\"action?.tooltip\"\n [p-icon]=\"action?.badge ? badge : action?.icon || 'an an-dots-nine'\"\n p-kind=\"tertiary\"\n (p-click)=\"onClickAction(i)\"\n [class.po-header-selected-tool]=\"checkSelected(i)\"\n [p-aria-expanded]=\"checkSelected(i)\"\n [p-aria-label]=\"getAriaLabel(action)\"\n p-size=\"medium\"\n >\n </po-button>\n\n <ng-template #badge>\n <i class=\"po-header-badge\" [class]=\"action?.icon || 'an an-bell'\">\n <po-badge class=\"po-header-status\" [p-value]=\"action?.badge\"></po-badge>\n </i>\n </ng-template>\n\n <po-popup\n #poPopupAction\n [p-actions]=\"action?.items\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n (p-close)=\"onClosePopup(i)\"\n p-size=\"medium\"\n >\n </po-popup>\n\n @if (action?.popover) {\n <po-popover\n #poPopoverAction\n p-position=\"bottom-right\"\n [p-width]=\"action.popover.width\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n [p-corner-aligned]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"action.popover?.content\"></ng-container>\n </po-popover>\n }\n </li>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoBadgeComponent, selector: "po-badge" }, { kind: "component", type: PoPopoverComponent, selector: "po-popover" }, { kind: "directive", type: PoTooltipDirective, selector: "[p-tooltip]" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }] });
59681
59977
  }
59682
59978
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoHeaderToolsComponent, decorators: [{
59683
59979
  type: Component,
59684
- args: [{ selector: 'po-header-tools', standalone: false, template: "<div class=\"po-header-nav-tools\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n @for (action of actionTools; track action?.label; let i = $index) {\n <li [class.po-header-nav-item-small]=\"i !== actionTools.length - 1\">\n <po-button\n #buttonActionElement\n [p-tooltip]=\"action?.tooltip\"\n [p-icon]=\"action?.badge ? badge : action?.icon || 'an an-dots-nine'\"\n p-kind=\"tertiary\"\n (p-click)=\"onClickAction(i)\"\n [class.po-header-selected-tool]=\"checkSelected(i)\"\n [p-aria-expanded]=\"checkSelected(i)\"\n [p-aria-label]=\"getAriaLabel(action)\"\n p-size=\"medium\"\n >\n </po-button>\n\n <ng-template #badge>\n <i class=\"po-header-badge\" [class]=\"action?.icon || 'an an-bell'\">\n <po-badge class=\"po-header-status\" [p-value]=\"action?.badge\"></po-badge>\n </i>\n </ng-template>\n\n <po-popup\n #poPopupAction\n [p-actions]=\"action?.items\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n (p-close)=\"onClosePopup(i)\"\n p-size=\"medium\"\n >\n </po-popup>\n\n @if (action?.popover) {\n <po-popover\n #poPopoverAction\n [p-target]=\"buttonActionElements?.get(i)\"\n p-position=\"bottom-left\"\n [p-hide-arrow]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"action.popover?.content\"></ng-container>\n </po-popover>\n }\n </li>\n }\n</div>\n" }]
59980
+ args: [{ selector: 'po-header-tools', standalone: false, template: "<div class=\"po-header-nav-tools\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n @for (action of actionTools; track action?.label; let i = $index) {\n <li [class.po-header-nav-item-small]=\"i !== actionTools.length - 1\">\n <po-button\n #buttonActionElement\n [p-tooltip]=\"action?.tooltip\"\n [p-icon]=\"action?.badge ? badge : action?.icon || 'an an-dots-nine'\"\n p-kind=\"tertiary\"\n (p-click)=\"onClickAction(i)\"\n [class.po-header-selected-tool]=\"checkSelected(i)\"\n [p-aria-expanded]=\"checkSelected(i)\"\n [p-aria-label]=\"getAriaLabel(action)\"\n p-size=\"medium\"\n >\n </po-button>\n\n <ng-template #badge>\n <i class=\"po-header-badge\" [class]=\"action?.icon || 'an an-bell'\">\n <po-badge class=\"po-header-status\" [p-value]=\"action?.badge\"></po-badge>\n </i>\n </ng-template>\n\n <po-popup\n #poPopupAction\n [p-actions]=\"action?.items\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n (p-close)=\"onClosePopup(i)\"\n p-size=\"medium\"\n >\n </po-popup>\n\n @if (action?.popover) {\n <po-popover\n #poPopoverAction\n p-position=\"bottom-right\"\n [p-width]=\"action.popover.width\"\n [p-target]=\"buttonActionElements?.get(i)\"\n [p-hide-arrow]=\"true\"\n [p-corner-aligned]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"action.popover?.content\"></ng-container>\n </po-popover>\n }\n </li>\n }\n</div>\n" }]
59685
59981
  }], ctorParameters: () => [{ type: i1$1.Router }, { type: i0.ChangeDetectorRef }], propDecorators: { buttonActionElements: [{
59686
59982
  type: ViewChildren,
59687
59983
  args: ['buttonActionElement', { read: ElementRef }]
@@ -59760,11 +60056,11 @@ class PoHeaderCustomerComponent {
59760
60056
  }
59761
60057
  }
59762
60058
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoHeaderCustomerComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Component });
59763
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoHeaderCustomerComponent, isStandalone: false, selector: "po-header-customer", inputs: { headerUser: ["p-header-user", "headerUser"] }, viewQueries: [{ propertyName: "poPopupAction", first: true, predicate: ["poPopupAction"], descendants: true }, { propertyName: "poPopoverAction", first: true, predicate: ["poPopoverAction"], descendants: true }], ngImport: i0, template: "<div class=\"po-header-nav-tools\" (click)=\"onClickUserSection()\" (keydown)=\"onKeyDownCustomer($event)\">\n <li\n #targetRef\n tabindex=\"0\"\n class=\"po-header-nav-customer-container\"\n (click)=\"onClickPopup()\"\n role=\"menu\"\n [attr.aria-label]=\"literals.labelUser\"\n >\n <div class=\"po-header-nav-customer-brand\">\n <img [src]=\"headerUser?.customerBrand\" alt=\"User\" />\n </div>\n\n <div class=\"po-header-nav-customer-divider\"></div>\n\n <div class=\"po-header-nav-customer-avatar-wrapper\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </div>\n </li>\n\n <li class=\"po-header-nav-customer-avatar-wrapper po-header-icon-small\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </li>\n</div>\n\n@if (headerUser?.items?.length) {\n <po-popup\n #poPopupAction\n [p-actions]=\"headerUser.items\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n p-position=\"bottom-left\"\n p-size=\"medium\"\n >\n </po-popup>\n}\n\n@if (headerUser?.popover) {\n <po-popover #poPopoverAction [p-target]=\"targetRef\" p-position=\"bottom-left\" [p-hide-arrow]=\"true\">\n <ng-container *ngTemplateOutlet=\"headerUser.popover.content\"></ng-container>\n </po-popover>\n}\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoBadgeComponent, selector: "po-badge" }, { kind: "component", type: PoPopoverComponent, selector: "po-popover" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }] });
60059
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: PoHeaderCustomerComponent, isStandalone: false, selector: "po-header-customer", inputs: { headerUser: ["p-header-user", "headerUser"] }, viewQueries: [{ propertyName: "poPopupAction", first: true, predicate: ["poPopupAction"], descendants: true }, { propertyName: "poPopoverAction", first: true, predicate: ["poPopoverAction"], descendants: true }], ngImport: i0, template: "<div class=\"po-header-nav-tools\" (click)=\"onClickUserSection()\" (keydown)=\"onKeyDownCustomer($event)\">\n <li\n #targetRef\n tabindex=\"0\"\n class=\"po-header-nav-customer-container\"\n (click)=\"onClickPopup()\"\n role=\"menu\"\n [attr.aria-label]=\"literals.labelUser\"\n >\n <div class=\"po-header-nav-customer-brand\">\n <img [src]=\"headerUser?.customerBrand\" alt=\"User\" />\n </div>\n\n <div class=\"po-header-nav-customer-divider\"></div>\n\n <div class=\"po-header-nav-customer-avatar-wrapper\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </div>\n </li>\n\n <li class=\"po-header-nav-customer-avatar-wrapper po-header-icon-small\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </li>\n</div>\n\n@if (headerUser?.items?.length) {\n <po-popup\n #poPopupAction\n [p-actions]=\"headerUser.items\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n p-position=\"bottom-left\"\n p-size=\"medium\"\n >\n </po-popup>\n}\n\n@if (headerUser?.popover) {\n <po-popover\n #poPopoverAction\n p-position=\"bottom-right\"\n [p-width]=\"headerUser.popover.width\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n [p-corner-aligned]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"headerUser.popover.content\"></ng-container>\n </po-popover>\n}\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoBadgeComponent, selector: "po-badge" }, { kind: "component", type: PoPopoverComponent, selector: "po-popover" }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }] });
59764
60060
  }
59765
60061
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PoHeaderCustomerComponent, decorators: [{
59766
60062
  type: Component,
59767
- args: [{ selector: 'po-header-customer', standalone: false, template: "<div class=\"po-header-nav-tools\" (click)=\"onClickUserSection()\" (keydown)=\"onKeyDownCustomer($event)\">\n <li\n #targetRef\n tabindex=\"0\"\n class=\"po-header-nav-customer-container\"\n (click)=\"onClickPopup()\"\n role=\"menu\"\n [attr.aria-label]=\"literals.labelUser\"\n >\n <div class=\"po-header-nav-customer-brand\">\n <img [src]=\"headerUser?.customerBrand\" alt=\"User\" />\n </div>\n\n <div class=\"po-header-nav-customer-divider\"></div>\n\n <div class=\"po-header-nav-customer-avatar-wrapper\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </div>\n </li>\n\n <li class=\"po-header-nav-customer-avatar-wrapper po-header-icon-small\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </li>\n</div>\n\n@if (headerUser?.items?.length) {\n <po-popup\n #poPopupAction\n [p-actions]=\"headerUser.items\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n p-position=\"bottom-left\"\n p-size=\"medium\"\n >\n </po-popup>\n}\n\n@if (headerUser?.popover) {\n <po-popover #poPopoverAction [p-target]=\"targetRef\" p-position=\"bottom-left\" [p-hide-arrow]=\"true\">\n <ng-container *ngTemplateOutlet=\"headerUser.popover.content\"></ng-container>\n </po-popover>\n}\n" }]
60063
+ args: [{ selector: 'po-header-customer', standalone: false, template: "<div class=\"po-header-nav-tools\" (click)=\"onClickUserSection()\" (keydown)=\"onKeyDownCustomer($event)\">\n <li\n #targetRef\n tabindex=\"0\"\n class=\"po-header-nav-customer-container\"\n (click)=\"onClickPopup()\"\n role=\"menu\"\n [attr.aria-label]=\"literals.labelUser\"\n >\n <div class=\"po-header-nav-customer-brand\">\n <img [src]=\"headerUser?.customerBrand\" alt=\"User\" />\n </div>\n\n <div class=\"po-header-nav-customer-divider\"></div>\n\n <div class=\"po-header-nav-customer-avatar-wrapper\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </div>\n </li>\n\n <li class=\"po-header-nav-customer-avatar-wrapper po-header-icon-small\">\n <div class=\"po-header-nav-customer-avatar\">\n <img [src]=\"headerUser?.avatar\" alt=\"Avatar\" />\n </div>\n @if (headerUser?.status) {\n <po-badge class=\"po-header-nav-avatar-status\" p-size=\"small\" [p-status]=\"headerUser.status\"></po-badge>\n }\n </li>\n</div>\n\n@if (headerUser?.items?.length) {\n <po-popup\n #poPopupAction\n [p-actions]=\"headerUser.items\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n p-position=\"bottom-left\"\n p-size=\"medium\"\n >\n </po-popup>\n}\n\n@if (headerUser?.popover) {\n <po-popover\n #poPopoverAction\n p-position=\"bottom-right\"\n [p-width]=\"headerUser.popover.width\"\n [p-target]=\"targetRef\"\n [p-hide-arrow]=\"true\"\n [p-corner-aligned]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"headerUser.popover.content\"></ng-container>\n </po-popover>\n}\n" }]
59768
60064
  }], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { poPopupAction: [{
59769
60065
  type: ViewChild,
59770
60066
  args: ['poPopupAction']