@po-ui/ng-components 17.26.4 → 17.26.6

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 (29) hide show
  1. package/esm2022/lib/components/po-accordion/po-accordion-item-header/po-accordion-item-header.component.mjs +31 -13
  2. package/esm2022/lib/components/po-accordion/po-accordion-manager/po-accordion-manager.component.mjs +47 -12
  3. package/esm2022/lib/components/po-accordion/po-accordion.module.mjs +5 -4
  4. package/esm2022/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-base.component.mjs +2 -2
  5. package/esm2022/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields.component.mjs +114 -3
  6. package/esm2022/lib/components/po-page/po-page-default/po-page-default-base.component.mjs +2 -2
  7. package/esm2022/lib/components/po-page/po-page-default/po-page-default.component.mjs +9 -1
  8. package/fesm2022/po-ui-ng-components.mjs +211 -41
  9. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  10. package/lib/components/po-accordion/po-accordion-item-header/po-accordion-item-header.component.d.ts +2 -0
  11. package/lib/components/po-accordion/po-accordion-manager/po-accordion-manager.component.d.ts +8 -2
  12. package/lib/components/po-accordion/po-accordion.module.d.ts +2 -1
  13. package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-base.component.d.ts +1 -1
  14. package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields.component.d.ts +7 -2
  15. package/lib/components/po-page/po-page-default/po-page-default-base.component.d.ts +1 -0
  16. package/lib/components/po-page/po-page-default/po-page-default.component.d.ts +2 -0
  17. package/package.json +4 -4
  18. package/po-ui-ng-components-17.26.6.tgz +0 -0
  19. package/schematics/ng-add/index.js +1 -1
  20. package/schematics/ng-update/v14/index.js +1 -1
  21. package/schematics/ng-update/v15/index.js +1 -1
  22. package/schematics/ng-update/v16/index.js +1 -1
  23. package/schematics/ng-update/v17/index.js +1 -1
  24. package/schematics/ng-update/v2/index.js +1 -1
  25. package/schematics/ng-update/v3/index.js +1 -1
  26. package/schematics/ng-update/v4/index.js +1 -1
  27. package/schematics/ng-update/v5/index.js +1 -1
  28. package/schematics/ng-update/v6/index.js +1 -1
  29. package/po-ui-ng-components-17.26.4.tgz +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Component, ChangeDetectionStrategy, NgModule, InjectionToken, TemplateRef, Optional, Inject, Injectable, EventEmitter, Output, ElementRef, HostListener, ViewChild, ViewChildren, ContentChildren, HostBinding, inject, forwardRef, ViewContainerRef, ContentChild, Pipe, Injector, APP_INITIALIZER } from '@angular/core';
2
+ import { Directive, Input, Component, ChangeDetectionStrategy, NgModule, InjectionToken, TemplateRef, Optional, Inject, Injectable, EventEmitter, Output, ElementRef, HostListener, ViewChild, ChangeDetectorRef, inject, ViewChildren, ContentChildren, HostBinding, forwardRef, ViewContainerRef, ContentChild, Pipe, Injector, APP_INITIALIZER } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, DOCUMENT, DecimalPipe, NgOptimizedImage, CurrencyPipe, DatePipe, TitleCasePipe } from '@angular/common';
5
5
  import * as i2$3 from '@angular/animations';
@@ -435,7 +435,7 @@ function PoIconComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
435
435
  const ctx_r1 = i0.ɵɵnextContext();
436
436
  i0.ɵɵclassMap(ctx_r1.class);
437
437
  } }
438
- const _c0$1K = ["*"];
438
+ const _c0$1L = ["*"];
439
439
  /**
440
440
  * @docsPrivate
441
441
  *
@@ -524,7 +524,7 @@ class PoIconComponent {
524
524
  return iconName.includes(' ') ? iconName.split(' ') : iconName;
525
525
  }
526
526
  static ɵfac = function PoIconComponent_Factory(t) { return new (t || PoIconComponent)(i0.ɵɵdirectiveInject(ICONS_DICTIONARY, 8)); };
527
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoIconComponent, selectors: [["po-icon"]], inputs: { icon: [i0.ɵɵInputFlags.None, "p-icon", "icon"] }, ngContentSelectors: _c0$1K, decls: 3, vars: 3, consts: [[4, "ngIf", "ngIfThen", "ngIfElse"], ["fontTemplate", ""], ["aria-hidden", "true"]], template: function PoIconComponent_Template(rf, ctx) { if (rf & 1) {
527
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoIconComponent, selectors: [["po-icon"]], inputs: { icon: [i0.ɵɵInputFlags.None, "p-icon", "icon"] }, ngContentSelectors: _c0$1L, decls: 3, vars: 3, consts: [[4, "ngIf", "ngIfThen", "ngIfElse"], ["fontTemplate", ""], ["aria-hidden", "true"]], template: function PoIconComponent_Template(rf, ctx) { if (rf & 1) {
528
528
  i0.ɵɵprojectionDef();
529
529
  i0.ɵɵtemplate(0, PoIconComponent_ng_container_0_Template, 1, 0, "ng-container", 0)(1, PoIconComponent_ng_template_1_Template, 2, 2, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
530
530
  } if (rf & 2) {
@@ -2589,8 +2589,8 @@ class PoTooltipDirective extends PoTooltipBaseDirective {
2589
2589
  args: ['keydown', ['$event']]
2590
2590
  }] }); })();
2591
2591
 
2592
- const _c0$1J = ["tagContainer"];
2593
- const _c1$I = ["tagClose"];
2592
+ const _c0$1K = ["tagContainer"];
2593
+ const _c1$K = ["tagClose"];
2594
2594
  const _c2$l = ["poTag"];
2595
2595
  function PoTagComponent_div_1_Template(rf, ctx) { if (rf & 1) {
2596
2596
  i0.ɵɵelementStart(0, "div", 12)(1, "span", 13);
@@ -2726,8 +2726,8 @@ class PoTagComponent extends PoTagBaseComponent {
2726
2726
  }
2727
2727
  static ɵfac = function PoTagComponent_Factory(t) { return new (t || PoTagComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(PoLanguageService)); };
2728
2728
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoTagComponent, selectors: [["po-tag"]], viewQuery: function PoTagComponent_Query(rf, ctx) { if (rf & 1) {
2729
- i0.ɵɵviewQuery(_c0$1J, 7);
2730
- i0.ɵɵviewQuery(_c1$I, 7);
2729
+ i0.ɵɵviewQuery(_c0$1K, 7);
2730
+ i0.ɵɵviewQuery(_c1$K, 7);
2731
2731
  i0.ɵɵviewQuery(_c2$l, 7);
2732
2732
  } if (rf & 2) {
2733
2733
  let _t;
@@ -2833,11 +2833,11 @@ function PoAccordionItemBodyComponent_div_0_Template(rf, ctx) { if (rf & 1) {
2833
2833
  } if (rf & 2) {
2834
2834
  i0.ɵɵproperty("@toggleBody", undefined);
2835
2835
  } }
2836
- const _c0$1I = ["*"];
2836
+ const _c0$1J = ["*"];
2837
2837
  class PoAccordionItemBodyComponent {
2838
2838
  expanded = false;
2839
2839
  static ɵfac = function PoAccordionItemBodyComponent_Factory(t) { return new (t || PoAccordionItemBodyComponent)(); };
2840
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoAccordionItemBodyComponent, selectors: [["po-accordion-item-body"]], inputs: { expanded: [i0.ɵɵInputFlags.None, "p-expanded", "expanded"] }, ngContentSelectors: _c0$1I, decls: 1, vars: 1, consts: [["class", "po-accordion-item-body", 4, "ngIf"], [1, "po-accordion-item-body"], [1, "po-accordion-item-body-content"]], template: function PoAccordionItemBodyComponent_Template(rf, ctx) { if (rf & 1) {
2840
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoAccordionItemBodyComponent, selectors: [["po-accordion-item-body"]], inputs: { expanded: [i0.ɵɵInputFlags.None, "p-expanded", "expanded"] }, ngContentSelectors: _c0$1J, decls: 1, vars: 1, consts: [["class", "po-accordion-item-body", 4, "ngIf"], [1, "po-accordion-item-body"], [1, "po-accordion-item-body-content"]], template: function PoAccordionItemBodyComponent_Template(rf, ctx) { if (rf & 1) {
2841
2841
  i0.ɵɵprojectionDef();
2842
2842
  i0.ɵɵtemplate(0, PoAccordionItemBodyComponent_div_0_Template, 3, 1, "div", 0);
2843
2843
  } if (rf & 2) {
@@ -2880,16 +2880,18 @@ class PoLanguageModule {
2880
2880
  }]
2881
2881
  }], null, null); })();
2882
2882
 
2883
- const _c0$1H = ["accordionElement"];
2884
- function PoAccordionItemHeaderComponent_po_tag_6_Template(rf, ctx) { if (rf & 1) {
2885
- i0.ɵɵelement(0, "po-tag", 7);
2883
+ const _c0$1I = ["accordionElement"];
2884
+ const _c1$J = ["accordionHeaderElement"];
2885
+ function PoAccordionItemHeaderComponent_po_tag_7_Template(rf, ctx) { if (rf & 1) {
2886
+ i0.ɵɵelement(0, "po-tag", 8);
2886
2887
  } if (rf & 2) {
2887
- const ctx_r1 = i0.ɵɵnextContext();
2888
- i0.ɵɵproperty("p-value", ctx_r1.labelTag)("p-type", ctx_r1.typeTag);
2888
+ const ctx_r2 = i0.ɵɵnextContext();
2889
+ i0.ɵɵproperty("p-value", ctx_r2.labelTag)("p-type", ctx_r2.typeTag);
2889
2890
  } }
2890
2891
  class PoAccordionItemHeaderComponent {
2891
2892
  language = poLocaleDefault;
2892
2893
  accordionElement;
2894
+ accordionHeaderElement;
2893
2895
  expanded = false;
2894
2896
  label;
2895
2897
  labelTag;
@@ -2903,38 +2905,53 @@ class PoAccordionItemHeaderComponent {
2903
2905
  this.expanded = !this.expanded;
2904
2906
  this.toggle.emit(this.expanded);
2905
2907
  }
2908
+ getTooltip() {
2909
+ const widthContainer = this.accordionElement.nativeElement.offsetWidth - 56;
2910
+ const widthHeaderElement = this.accordionHeaderElement.nativeElement.offsetWidth;
2911
+ if (widthHeaderElement >= widthContainer) {
2912
+ return this.label;
2913
+ }
2914
+ return null;
2915
+ }
2906
2916
  static ɵfac = function PoAccordionItemHeaderComponent_Factory(t) { return new (t || PoAccordionItemHeaderComponent)(i0.ɵɵdirectiveInject(PoLanguageService)); };
2907
2917
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoAccordionItemHeaderComponent, selectors: [["po-accordion-item-header"]], viewQuery: function PoAccordionItemHeaderComponent_Query(rf, ctx) { if (rf & 1) {
2908
- i0.ɵɵviewQuery(_c0$1H, 7, ElementRef);
2918
+ i0.ɵɵviewQuery(_c0$1I, 7, ElementRef);
2919
+ i0.ɵɵviewQuery(_c1$J, 7, ElementRef);
2909
2920
  } if (rf & 2) {
2910
2921
  let _t;
2911
2922
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accordionElement = _t.first);
2912
- } }, inputs: { expanded: [i0.ɵɵInputFlags.None, "p-expanded", "expanded"], label: [i0.ɵɵInputFlags.None, "p-label", "label"], labelTag: [i0.ɵɵInputFlags.None, "p-label-tag", "labelTag"], typeTag: [i0.ɵɵInputFlags.None, "p-type-tag", "typeTag"], disabledItem: [i0.ɵɵInputFlags.None, "p-disabled", "disabledItem"] }, outputs: { toggle: "p-toggle" }, decls: 8, vars: 5, consts: [[1, "po-accordion-item-header"], [1, "po-accordion-item-header-button", "po-clickable", 3, "disabled", "click"], ["accordionElement", ""], [1, "po-accordion-item-header-button-content"], [1, "po-text-ellipsis", "po-accordion-item-header-title"], ["class", "po-accordion-item-header-tag", 3, "p-value", "p-type", 4, "ngIf"], ["p-icon", "ICON_ARROW_DOWN", 1, "po-icon", "po-accordion-item-header-icon"], [1, "po-accordion-item-header-tag", 3, "p-value", "p-type"]], template: function PoAccordionItemHeaderComponent_Template(rf, ctx) { if (rf & 1) {
2923
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accordionHeaderElement = _t.first);
2924
+ } }, inputs: { expanded: [i0.ɵɵInputFlags.None, "p-expanded", "expanded"], label: [i0.ɵɵInputFlags.None, "p-label", "label"], labelTag: [i0.ɵɵInputFlags.None, "p-label-tag", "labelTag"], typeTag: [i0.ɵɵInputFlags.None, "p-type-tag", "typeTag"], disabledItem: [i0.ɵɵInputFlags.None, "p-disabled", "disabledItem"] }, outputs: { toggle: "p-toggle" }, decls: 9, vars: 6, consts: [[1, "po-accordion-item-header"], [1, "po-accordion-item-header-button", "po-clickable", 3, "disabled", "click"], ["accordionElement", ""], [1, "po-accordion-item-header-button-content", 3, "p-tooltip"], [1, "po-text-ellipsis", "po-accordion-item-header-title"], ["accordionHeaderElement", ""], ["class", "po-accordion-item-header-tag", 3, "p-value", "p-type", 4, "ngIf"], ["p-icon", "ICON_ARROW_DOWN", 1, "po-icon", "po-accordion-item-header-icon"], [1, "po-accordion-item-header-tag", 3, "p-value", "p-type"]], template: function PoAccordionItemHeaderComponent_Template(rf, ctx) { if (rf & 1) {
2913
2925
  i0.ɵɵelementStart(0, "div", 0)(1, "button", 1, 2);
2914
2926
  i0.ɵɵlistener("click", function PoAccordionItemHeaderComponent_Template_button_click_1_listener() { return ctx.onClick(); });
2915
- i0.ɵɵelementStart(3, "div", 3)(4, "div", 4);
2916
- i0.ɵɵtext(5);
2927
+ i0.ɵɵelementStart(3, "div", 3)(4, "div", 4, 5);
2928
+ i0.ɵɵtext(6);
2917
2929
  i0.ɵɵelementEnd();
2918
- i0.ɵɵtemplate(6, PoAccordionItemHeaderComponent_po_tag_6_Template, 1, 2, "po-tag", 5);
2930
+ i0.ɵɵtemplate(7, PoAccordionItemHeaderComponent_po_tag_7_Template, 1, 2, "po-tag", 6);
2919
2931
  i0.ɵɵelementEnd();
2920
- i0.ɵɵelement(7, "po-icon", 6);
2932
+ i0.ɵɵelement(8, "po-icon", 7);
2921
2933
  i0.ɵɵelementEnd()();
2922
2934
  } if (rf & 2) {
2923
2935
  i0.ɵɵadvance();
2924
2936
  i0.ɵɵproperty("disabled", ctx.disabledItem);
2925
2937
  i0.ɵɵattribute("aria-label", ctx.label)("aria-expanded", ctx.expanded || false);
2926
- i0.ɵɵadvance(4);
2938
+ i0.ɵɵadvance(2);
2939
+ i0.ɵɵproperty("p-tooltip", ctx.getTooltip());
2940
+ i0.ɵɵadvance(3);
2927
2941
  i0.ɵɵtextInterpolate(ctx.label);
2928
2942
  i0.ɵɵadvance();
2929
2943
  i0.ɵɵproperty("ngIf", ctx.labelTag);
2930
- } }, dependencies: [i1.NgIf, PoTagComponent, PoIconComponent], encapsulation: 2, changeDetection: 0 });
2944
+ } }, dependencies: [i1.NgIf, PoTagComponent, PoIconComponent, PoTooltipDirective], encapsulation: 2, changeDetection: 0 });
2931
2945
  }
2932
2946
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoAccordionItemHeaderComponent, [{
2933
2947
  type: Component,
2934
- args: [{ selector: 'po-accordion-item-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"po-accordion-item-header\">\n <button\n #accordionElement\n [disabled]=\"disabledItem\"\n [attr.aria-label]=\"label\"\n [attr.aria-expanded]=\"expanded || false\"\n class=\"po-accordion-item-header-button po-clickable\"\n (click)=\"onClick()\"\n >\n <div class=\"po-accordion-item-header-button-content\">\n <div class=\"po-text-ellipsis po-accordion-item-header-title\">{{ label }}</div>\n <po-tag *ngIf=\"labelTag\" class=\"po-accordion-item-header-tag\" [p-value]=\"labelTag\" [p-type]=\"typeTag\"> </po-tag>\n </div>\n <po-icon p-icon=\"ICON_ARROW_DOWN\" class=\"po-icon po-accordion-item-header-icon\"></po-icon>\n </button>\n</div>\n" }]
2948
+ args: [{ selector: 'po-accordion-item-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"po-accordion-item-header\">\n <button\n #accordionElement\n [disabled]=\"disabledItem\"\n [attr.aria-label]=\"label\"\n [attr.aria-expanded]=\"expanded || false\"\n class=\"po-accordion-item-header-button po-clickable\"\n (click)=\"onClick()\"\n >\n <div class=\"po-accordion-item-header-button-content\" [p-tooltip]=\"getTooltip()\">\n <div #accordionHeaderElement class=\"po-text-ellipsis po-accordion-item-header-title\">{{ label }}</div>\n <po-tag *ngIf=\"labelTag\" class=\"po-accordion-item-header-tag\" [p-value]=\"labelTag\" [p-type]=\"typeTag\"> </po-tag>\n </div>\n <po-icon p-icon=\"ICON_ARROW_DOWN\" class=\"po-icon po-accordion-item-header-icon\"></po-icon>\n </button>\n</div>\n" }]
2935
2949
  }], () => [{ type: PoLanguageService }], { accordionElement: [{
2936
2950
  type: ViewChild,
2937
2951
  args: ['accordionElement', { read: ElementRef, static: true }]
2952
+ }], accordionHeaderElement: [{
2953
+ type: ViewChild,
2954
+ args: ['accordionHeaderElement', { read: ElementRef, static: true }]
2938
2955
  }], expanded: [{
2939
2956
  type: Input,
2940
2957
  args: ['p-expanded']
@@ -2984,7 +3001,7 @@ class PoAccordionService {
2984
3001
  function PoAccordionItemComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
2985
3002
  i0.ɵɵprojection(0);
2986
3003
  } }
2987
- const _c0$1G = ["*"];
3004
+ const _c0$1H = ["*"];
2988
3005
  /**
2989
3006
  * @description
2990
3007
  *
@@ -3113,7 +3130,7 @@ class PoAccordionItemComponent {
3113
3130
  } if (rf & 2) {
3114
3131
  let _t;
3115
3132
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateRef = _t.first);
3116
- } }, inputs: { label: [i0.ɵɵInputFlags.None, "p-label", "label"], labelTag: [i0.ɵɵInputFlags.None, "p-label-tag", "labelTag"], disabledItem: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-disabled", "disabledItem", convertToBoolean], typeTag: [i0.ɵɵInputFlags.None, "p-type-tag", "typeTag"] }, outputs: { expandEvent: "p-expand", collapseEvent: "p-collapse" }, features: [i0.ɵɵInputTransformsFeature], ngContentSelectors: _c0$1G, decls: 1, vars: 0, template: function PoAccordionItemComponent_Template(rf, ctx) { if (rf & 1) {
3133
+ } }, inputs: { label: [i0.ɵɵInputFlags.None, "p-label", "label"], labelTag: [i0.ɵɵInputFlags.None, "p-label-tag", "labelTag"], disabledItem: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "p-disabled", "disabledItem", convertToBoolean], typeTag: [i0.ɵɵInputFlags.None, "p-type-tag", "typeTag"] }, outputs: { expandEvent: "p-expand", collapseEvent: "p-collapse" }, features: [i0.ɵɵInputTransformsFeature], ngContentSelectors: _c0$1H, decls: 1, vars: 0, template: function PoAccordionItemComponent_Template(rf, ctx) { if (rf & 1) {
3117
3134
  i0.ɵɵprojectionDef();
3118
3135
  i0.ɵɵtemplate(0, PoAccordionItemComponent_ng_template_0_Template, 1, 0, "ng-template");
3119
3136
  } }, encapsulation: 2 });
@@ -3145,35 +3162,69 @@ class PoAccordionItemComponent {
3145
3162
  }] }); })();
3146
3163
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PoAccordionItemComponent, { className: "PoAccordionItemComponent", filePath: "lib/components/po-accordion/po-accordion-item/po-accordion-item.component.ts", lineNumber: 43 }); })();
3147
3164
 
3165
+ const _c0$1G = ["accordionHeaderButtonManagerElement"];
3166
+ const _c1$I = ["accordionHeaderManagerElement"];
3148
3167
  class PoAccordionManagerComponent {
3168
+ labelValue = '';
3169
+ changeDetector = inject(ChangeDetectorRef);
3170
+ accordionElement;
3171
+ accordionHeaderElement;
3149
3172
  expandedAllItems = false;
3150
3173
  literals;
3151
3174
  clickManager = new EventEmitter();
3175
+ ngOnChanges(changes) {
3176
+ this.labelValue = changes.expandedAllItems.currentValue
3177
+ ? this.literals.closeAllItems
3178
+ : this.literals.expandAllItems;
3179
+ this.changeDetector.detectChanges();
3180
+ }
3152
3181
  onClick() {
3153
3182
  this.clickManager.emit();
3154
3183
  }
3184
+ getTooltip() {
3185
+ const widthContainer = this.accordionElement.nativeElement.offsetWidth - 69;
3186
+ const widthHeaderElement = this.accordionHeaderElement.nativeElement.offsetWidth;
3187
+ if (widthHeaderElement >= widthContainer) {
3188
+ return this.labelValue;
3189
+ }
3190
+ return null;
3191
+ }
3155
3192
  static ɵfac = function PoAccordionManagerComponent_Factory(t) { return new (t || PoAccordionManagerComponent)(); };
3156
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoAccordionManagerComponent, selectors: [["po-accordion-manager"]], inputs: { expandedAllItems: [i0.ɵɵInputFlags.None, "p-expanded-all-items", "expandedAllItems"], literals: [i0.ɵɵInputFlags.None, "p-literals", "literals"] }, outputs: { clickManager: "p-click" }, decls: 5, vars: 3, consts: [[1, "po-accordion-manager-header"], [1, "po-accordion-manager-button", "po-clickable", 3, "click"], [1, "po-text-ellipsis", "po-accordion-manager-button-content"], ["p-icon", "ICON_LAST_PAGE", 1, "po-icon", "po-accordion-manager-icon", 3, "ngClass"]], template: function PoAccordionManagerComponent_Template(rf, ctx) { if (rf & 1) {
3157
- i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
3193
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoAccordionManagerComponent, selectors: [["po-accordion-manager"]], viewQuery: function PoAccordionManagerComponent_Query(rf, ctx) { if (rf & 1) {
3194
+ i0.ɵɵviewQuery(_c0$1G, 7, ElementRef);
3195
+ i0.ɵɵviewQuery(_c1$I, 7, ElementRef);
3196
+ } if (rf & 2) {
3197
+ let _t;
3198
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accordionElement = _t.first);
3199
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accordionHeaderElement = _t.first);
3200
+ } }, inputs: { expandedAllItems: [i0.ɵɵInputFlags.None, "p-expanded-all-items", "expandedAllItems"], literals: [i0.ɵɵInputFlags.None, "p-literals", "literals"] }, outputs: { clickManager: "p-click" }, features: [i0.ɵɵNgOnChangesFeature], decls: 7, vars: 4, consts: [[1, "po-accordion-manager-header"], [1, "po-accordion-manager-button", "po-clickable", 3, "p-tooltip", "click"], ["accordionHeaderButtonManagerElement", ""], [1, "po-text-ellipsis", "po-accordion-manager-button-content"], ["accordionHeaderManagerElement", ""], ["p-icon", "ICON_LAST_PAGE", 1, "po-icon", "po-accordion-manager-icon", 3, "ngClass"]], template: function PoAccordionManagerComponent_Template(rf, ctx) { if (rf & 1) {
3201
+ i0.ɵɵelementStart(0, "div", 0)(1, "button", 1, 2);
3158
3202
  i0.ɵɵlistener("click", function PoAccordionManagerComponent_Template_button_click_1_listener() { return ctx.onClick(); });
3159
- i0.ɵɵelementStart(2, "div", 2);
3160
- i0.ɵɵtext(3);
3203
+ i0.ɵɵelementStart(3, "div", 3, 4);
3204
+ i0.ɵɵtext(5);
3161
3205
  i0.ɵɵelementEnd();
3162
- i0.ɵɵelement(4, "po-icon", 3);
3206
+ i0.ɵɵelement(6, "po-icon", 5);
3163
3207
  i0.ɵɵelementEnd()();
3164
3208
  } if (rf & 2) {
3165
3209
  i0.ɵɵadvance();
3210
+ i0.ɵɵproperty("p-tooltip", ctx.getTooltip());
3166
3211
  i0.ɵɵattribute("aria-expanded", ctx.expandedAllItems);
3167
- i0.ɵɵadvance(2);
3212
+ i0.ɵɵadvance(4);
3168
3213
  i0.ɵɵtextInterpolate1(" ", ctx.expandedAllItems ? ctx.literals.closeAllItems : ctx.literals.expandAllItems, " ");
3169
3214
  i0.ɵɵadvance();
3170
3215
  i0.ɵɵproperty("ngClass", ctx.expandedAllItems ? "icon-down" : "icon-up");
3171
- } }, dependencies: [i1.NgClass, PoIconComponent], encapsulation: 2 });
3216
+ } }, dependencies: [i1.NgClass, PoIconComponent, PoTooltipDirective], encapsulation: 2 });
3172
3217
  }
3173
3218
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoAccordionManagerComponent, [{
3174
3219
  type: Component,
3175
- args: [{ selector: 'po-accordion-manager', template: "<div class=\"po-accordion-manager-header\">\n <button class=\"po-accordion-manager-button po-clickable\" (click)=\"onClick()\" [attr.aria-expanded]=\"expandedAllItems\">\n <div class=\"po-text-ellipsis po-accordion-manager-button-content\">\n {{ expandedAllItems ? literals.closeAllItems : literals.expandAllItems }}\n </div>\n <po-icon\n p-icon=\"ICON_LAST_PAGE\"\n [ngClass]=\"expandedAllItems ? 'icon-down' : 'icon-up'\"\n class=\"po-icon po-accordion-manager-icon\"\n >\n </po-icon>\n </button>\n</div>\n" }]
3176
- }], null, { expandedAllItems: [{
3220
+ args: [{ selector: 'po-accordion-manager', template: "<div class=\"po-accordion-manager-header\">\n <button\n #accordionHeaderButtonManagerElement\n class=\"po-accordion-manager-button po-clickable\"\n (click)=\"onClick()\"\n [attr.aria-expanded]=\"expandedAllItems\"\n [p-tooltip]=\"getTooltip()\"\n >\n <div #accordionHeaderManagerElement class=\"po-text-ellipsis po-accordion-manager-button-content\">\n {{ expandedAllItems ? literals.closeAllItems : literals.expandAllItems }}\n </div>\n <po-icon\n p-icon=\"ICON_LAST_PAGE\"\n [ngClass]=\"expandedAllItems ? 'icon-down' : 'icon-up'\"\n class=\"po-icon po-accordion-manager-icon\"\n >\n </po-icon>\n </button>\n</div>\n" }]
3221
+ }], null, { accordionElement: [{
3222
+ type: ViewChild,
3223
+ args: ['accordionHeaderButtonManagerElement', { read: ElementRef, static: true }]
3224
+ }], accordionHeaderElement: [{
3225
+ type: ViewChild,
3226
+ args: ['accordionHeaderManagerElement', { read: ElementRef, static: true }]
3227
+ }], expandedAllItems: [{
3177
3228
  type: Input,
3178
3229
  args: ['p-expanded-all-items']
3179
3230
  }], literals: [{
@@ -3183,7 +3234,7 @@ class PoAccordionManagerComponent {
3183
3234
  type: Output,
3184
3235
  args: ['p-click']
3185
3236
  }] }); })();
3186
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PoAccordionManagerComponent, { className: "PoAccordionManagerComponent", filePath: "lib/components/po-accordion/po-accordion-manager/po-accordion-manager.component.ts", lineNumber: 8 }); })();
3237
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PoAccordionManagerComponent, { className: "PoAccordionManagerComponent", filePath: "lib/components/po-accordion/po-accordion-manager/po-accordion-manager.component.ts", lineNumber: 19 }); })();
3187
3238
 
3188
3239
  const poAccordionLiteralsDefault = {
3189
3240
  en: {
@@ -3598,12 +3649,12 @@ class PoAccordionComponent extends PoAccordionBaseComponent {
3598
3649
  class PoAccordionModule {
3599
3650
  static ɵfac = function PoAccordionModule_Factory(t) { return new (t || PoAccordionModule)(); };
3600
3651
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PoAccordionModule });
3601
- static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule] });
3652
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule, PoTooltipModule] });
3602
3653
  }
3603
3654
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoAccordionModule, [{
3604
3655
  type: NgModule,
3605
3656
  args: [{
3606
- imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule],
3657
+ imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule, PoTooltipModule],
3607
3658
  declarations: [
3608
3659
  PoAccordionComponent,
3609
3660
  PoAccordionItemBodyComponent,
@@ -3618,7 +3669,7 @@ class PoAccordionModule {
3618
3669
  PoAccordionItemBodyComponent,
3619
3670
  PoAccordionItemComponent,
3620
3671
  PoAccordionItemHeaderComponent,
3621
- PoAccordionManagerComponent], imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule], exports: [PoAccordionComponent, PoAccordionItemComponent] }); })();
3672
+ PoAccordionManagerComponent], imports: [CommonModule, PoTagModule, PoIconModule, PoDividerModule, PoTooltipModule], exports: [PoAccordionComponent, PoAccordionItemComponent] }); })();
3622
3673
 
3623
3674
  const PO_AVATAR_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'];
3624
3675
  const PO_AVATAR_SIZE_DEFAULT = 'md';
@@ -32067,7 +32118,7 @@ class PoDynamicFormBaseComponent {
32067
32118
  * o `po-textarea`, caso o valor da propriedade `rows` seja menor que 3 o componente criado será o `po-input`.
32068
32119
  * - Caso seja informada a propriedade `secret` o componente criado será o `po-password`.
32069
32120
  * - Caso o *type* informado seja *string* o componente criado será o `po-input`.
32070
- *
32121
+ * > Ao alterar o valor das `properties` e/ou agrupamentos via container, os `fields` que utilizam serviço podem refazer as chamadas para as API's.
32071
32122
  * @default `[]`
32072
32123
  */
32073
32124
  fields;
@@ -42983,7 +43034,12 @@ class PoDynamicFormFieldsComponent extends PoDynamicFormFieldsBaseComponent {
42983
43034
  ngOnChanges(changes) {
42984
43035
  if (changes.fields) {
42985
43036
  this.visibleFields = this.getVisibleFields();
42986
- this.setContainerFields();
43037
+ if (changes.fields.previousValue && this.hasContainer()) {
43038
+ this.hasChangeContainer(changes.fields.previousValue, changes.fields.currentValue);
43039
+ }
43040
+ if (!changes.fields.previousValue || !changes.fields.currentValue) {
43041
+ this.setContainerFields();
43042
+ }
42987
43043
  }
42988
43044
  }
42989
43045
  focus(property) {
@@ -43074,6 +43130,112 @@ class PoDynamicFormFieldsComponent extends PoDynamicFormFieldsBaseComponent {
43074
43130
  visibleField.disabled = previousDisabled;
43075
43131
  }
43076
43132
  }
43133
+ hasChangeContainer(previous, current) {
43134
+ const prevArray = previous.map((item, index) => ({
43135
+ container: item.container || null,
43136
+ property: item.property,
43137
+ index,
43138
+ order: item.order
43139
+ }));
43140
+ const currArray = current.map((item, index) => ({
43141
+ container: item.container || null,
43142
+ property: item.property,
43143
+ index,
43144
+ order: item.order
43145
+ }));
43146
+ const prevContainers = prevArray.filter(item => item.container);
43147
+ const currContainers = currArray.filter(item => item.container);
43148
+ const prevOrder = prevArray.filter(item => item.order);
43149
+ const currOrder = currArray.filter(item => item.order);
43150
+ // Verifica mudança na quantidade de containers
43151
+ if (prevContainers.length !== currContainers.length) {
43152
+ this.setContainerFields();
43153
+ return;
43154
+ }
43155
+ // Verifica mudança na quantidade de order
43156
+ if (prevOrder.length !== currOrder.length) {
43157
+ this.setContainerFields();
43158
+ return;
43159
+ }
43160
+ if (currContainers.length) {
43161
+ this.handleChangesContainer(prevContainers, currContainers, 'container');
43162
+ }
43163
+ if (currOrder.length) {
43164
+ this.handleChangesContainer(prevOrder, currOrder, 'order');
43165
+ }
43166
+ //atualiza container sem mudança na estrutura da interface
43167
+ const result = this.diffObjectsArray(previous, this.getVisibleFields());
43168
+ this.containerFields = this.updateFieldContainer(result, this.containerFields);
43169
+ }
43170
+ updateFieldContainer(changes, containerFields) {
43171
+ const mapchanges = new Map(changes.map(obj => [obj.property, obj]));
43172
+ containerFields.forEach(subArray => {
43173
+ subArray.forEach((subItem, index) => {
43174
+ const item = mapchanges.get(subItem.property);
43175
+ if (item) {
43176
+ subArray[index] = { ...subItem, ...item };
43177
+ }
43178
+ });
43179
+ });
43180
+ return containerFields;
43181
+ }
43182
+ diffObjectsArray(oldArray, newArray) {
43183
+ const differences = [];
43184
+ newArray.forEach(newObj => {
43185
+ const oldObj = oldArray.find(o => o.property === newObj.property);
43186
+ if (!oldObj) {
43187
+ // Se o objeto é novo, adiciona todo o objeto com a propriedade "property"
43188
+ differences.push({ ...newObj });
43189
+ }
43190
+ else {
43191
+ // Verificar se há diferenças nas propriedades
43192
+ const diff = { property: newObj.property };
43193
+ let hasDifferences = false;
43194
+ for (const key in newObj) {
43195
+ if (newObj[key] !== oldObj[key]) {
43196
+ diff[key] = newObj[key];
43197
+ hasDifferences = true;
43198
+ }
43199
+ }
43200
+ if (hasDifferences) {
43201
+ differences.push(diff);
43202
+ }
43203
+ }
43204
+ });
43205
+ //retorna mudanças nos fields para atualização do containerFields
43206
+ return differences;
43207
+ }
43208
+ hasContainer() {
43209
+ return this.visibleFields && this.visibleFields.some(field => field.container);
43210
+ }
43211
+ handleChangesContainer(prevContainers, currContainers, key) {
43212
+ for (let i = 0; i < prevContainers.length; i++) {
43213
+ const prev = prevContainers[i];
43214
+ const curr = currContainers[i];
43215
+ //Verifica se container mudou de posição
43216
+ if (prev[key] === curr[key] && prev.index !== curr.index) {
43217
+ this.setContainerFields();
43218
+ return;
43219
+ }
43220
+ //Verifica se foi apenas mudança da string em caso do container ou valor no order
43221
+ if (prev[key] !== curr[key] && prev.index === curr.index) {
43222
+ if (key === 'order') {
43223
+ this.setContainerFields();
43224
+ return;
43225
+ }
43226
+ this.containerFields.forEach(subItem => subItem.forEach(item => {
43227
+ if (item.property === curr.property) {
43228
+ item[key] = curr[key];
43229
+ }
43230
+ }));
43231
+ }
43232
+ //verifica se manteve o mesmo número de container, mas alterou property do container
43233
+ if (prev[key] !== curr[key] && prev.property !== curr.property) {
43234
+ this.setContainerFields();
43235
+ return;
43236
+ }
43237
+ }
43238
+ }
43077
43239
  static ɵfac = function PoDynamicFormFieldsComponent_Factory(t) { return new (t || PoDynamicFormFieldsComponent)(i0.ɵɵdirectiveInject(i1.TitleCasePipe), i0.ɵɵdirectiveInject(PoDynamicFormValidationService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2$1.NgForm)); };
43078
43240
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoDynamicFormFieldsComponent, selectors: [["po-dynamic-form-fields"]], viewQuery: function PoDynamicFormFieldsComponent_Query(rf, ctx) { if (rf & 1) {
43079
43241
  i0.ɵɵviewQuery(_c0$y, 5);
@@ -49920,7 +50082,7 @@ class PoPageDefaultBaseComponent {
49920
50082
  */
49921
50083
  set actions(actions) {
49922
50084
  this._actions = Array.isArray(actions) ? actions : [];
49923
- this.visibleActions = this.actions.filter(action => action.visible !== false);
50085
+ this.visibleActions = this.getVisibleActions();
49924
50086
  this.setDropdownActions();
49925
50087
  }
49926
50088
  get actions() {
@@ -50266,6 +50428,9 @@ class PoPageDefaultComponent extends PoPageDefaultBaseComponent {
50266
50428
  actionIsDisabled(action) {
50267
50429
  return isTypeof(action.disabled, 'function') ? action.disabled(action) : action.disabled;
50268
50430
  }
50431
+ actionIsVisible(action) {
50432
+ return isTypeof(action.visible, 'function') ? action.visible(action) : action.visible;
50433
+ }
50269
50434
  callAction(item) {
50270
50435
  if (item.url) {
50271
50436
  isExternalLink(item.url) ? openExternalLink(item.url) : this.router.navigate([item.url]);
@@ -50275,6 +50440,8 @@ class PoPageDefaultComponent extends PoPageDefaultBaseComponent {
50275
50440
  }
50276
50441
  }
50277
50442
  hasPageHeader() {
50443
+ this.visibleActions = this.getVisibleActions();
50444
+ this.setDropdownActions();
50278
50445
  return !!(this.title ||
50279
50446
  (this.visibleActions && this.visibleActions.length) ||
50280
50447
  (this.breadcrumb && this.breadcrumb.items.length));
@@ -50284,6 +50451,9 @@ class PoPageDefaultComponent extends PoPageDefaultBaseComponent {
50284
50451
  this.dropdownActions = this.visibleActions.slice(this.limitPrimaryActions - 1);
50285
50452
  }
50286
50453
  }
50454
+ getVisibleActions() {
50455
+ return this.actions.filter(action => this.actionIsVisible(action) !== false);
50456
+ }
50287
50457
  onResize(event) {
50288
50458
  const width = event.target.innerWidth;
50289
50459
  if (width < this.maxWidthMobile) {