primeng 19.0.2 → 19.0.4

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.
@@ -721,94 +721,108 @@ const _c1 = ["loading"];
721
721
  const _c2 = ["icon"];
722
722
  const _c3 = ["*"];
723
723
  const _c4 = a0 => ({ class: a0 });
724
- function Button_ng_container_2_Template(rf, ctx) { if (rf & 1) {
724
+ function Button_ProjectionFallback_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
725
725
  i0.ɵɵelementContainer(0);
726
726
  } }
727
- function Button_ng_container_3_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
727
+ function Button_ProjectionFallback_1_ng_container_1_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
728
728
  i0.ɵɵelement(0, "span", 8);
729
729
  } if (rf & 2) {
730
- const ctx_r0 = i0.ɵɵnextContext(3);
730
+ const ctx_r0 = i0.ɵɵnextContext(4);
731
731
  i0.ɵɵproperty("ngClass", ctx_r0.iconClass());
732
732
  i0.ɵɵattribute("aria-hidden", true)("data-pc-section", "loadingicon");
733
733
  } }
734
- function Button_ng_container_3_ng_container_1_SpinnerIcon_2_Template(rf, ctx) { if (rf & 1) {
734
+ function Button_ProjectionFallback_1_ng_container_1_ng_container_1_SpinnerIcon_2_Template(rf, ctx) { if (rf & 1) {
735
735
  i0.ɵɵelement(0, "SpinnerIcon", 9);
736
736
  } if (rf & 2) {
737
- const ctx_r0 = i0.ɵɵnextContext(3);
737
+ const ctx_r0 = i0.ɵɵnextContext(4);
738
738
  i0.ɵɵproperty("styleClass", ctx_r0.spinnerIconClass())("spin", true);
739
739
  i0.ɵɵattribute("aria-hidden", true)("data-pc-section", "loadingicon");
740
740
  } }
741
- function Button_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
741
+ function Button_ProjectionFallback_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
742
742
  i0.ɵɵelementContainerStart(0);
743
- i0.ɵɵtemplate(1, Button_ng_container_3_ng_container_1_span_1_Template, 1, 3, "span", 6)(2, Button_ng_container_3_ng_container_1_SpinnerIcon_2_Template, 1, 4, "SpinnerIcon", 7);
743
+ i0.ɵɵtemplate(1, Button_ProjectionFallback_1_ng_container_1_ng_container_1_span_1_Template, 1, 3, "span", 6)(2, Button_ProjectionFallback_1_ng_container_1_ng_container_1_SpinnerIcon_2_Template, 1, 4, "SpinnerIcon", 7);
744
744
  i0.ɵɵelementContainerEnd();
745
745
  } if (rf & 2) {
746
- const ctx_r0 = i0.ɵɵnextContext(2);
746
+ const ctx_r0 = i0.ɵɵnextContext(3);
747
747
  i0.ɵɵadvance();
748
748
  i0.ɵɵproperty("ngIf", ctx_r0.loadingIcon);
749
749
  i0.ɵɵadvance();
750
750
  i0.ɵɵproperty("ngIf", !ctx_r0.loadingIcon);
751
751
  } }
752
- function Button_ng_container_3_2_ng_template_0_Template(rf, ctx) { }
753
- function Button_ng_container_3_2_Template(rf, ctx) { if (rf & 1) {
754
- i0.ɵɵtemplate(0, Button_ng_container_3_2_ng_template_0_Template, 0, 0, "ng-template", 10);
752
+ function Button_ProjectionFallback_1_ng_container_1_2_ng_template_0_Template(rf, ctx) { }
753
+ function Button_ProjectionFallback_1_ng_container_1_2_Template(rf, ctx) { if (rf & 1) {
754
+ i0.ɵɵtemplate(0, Button_ProjectionFallback_1_ng_container_1_2_ng_template_0_Template, 0, 0, "ng-template", 10);
755
755
  } if (rf & 2) {
756
- const ctx_r0 = i0.ɵɵnextContext(2);
756
+ const ctx_r0 = i0.ɵɵnextContext(3);
757
757
  i0.ɵɵproperty("ngIf", ctx_r0.loadingIconTemplate || ctx_r0._loadingIconTemplate);
758
758
  } }
759
- function Button_ng_container_3_Template(rf, ctx) { if (rf & 1) {
759
+ function Button_ProjectionFallback_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
760
760
  i0.ɵɵelementContainerStart(0);
761
- i0.ɵɵtemplate(1, Button_ng_container_3_ng_container_1_Template, 3, 2, "ng-container", 2)(2, Button_ng_container_3_2_Template, 1, 1, null, 5);
761
+ i0.ɵɵtemplate(1, Button_ProjectionFallback_1_ng_container_1_ng_container_1_Template, 3, 2, "ng-container", 2)(2, Button_ProjectionFallback_1_ng_container_1_2_Template, 1, 1, null, 5);
762
762
  i0.ɵɵelementContainerEnd();
763
763
  } if (rf & 2) {
764
- const ctx_r0 = i0.ɵɵnextContext();
764
+ const ctx_r0 = i0.ɵɵnextContext(2);
765
765
  i0.ɵɵadvance();
766
766
  i0.ɵɵproperty("ngIf", !ctx_r0.loadingIconTemplate && !ctx_r0._loadingIconTemplate);
767
767
  i0.ɵɵadvance();
768
768
  i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.loadingIconTemplate || ctx_r0._loadingIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c4, ctx_r0.iconClass()));
769
769
  } }
770
- function Button_ng_container_4_span_1_Template(rf, ctx) { if (rf & 1) {
770
+ function Button_ProjectionFallback_1_ng_container_2_span_1_Template(rf, ctx) { if (rf & 1) {
771
771
  i0.ɵɵelement(0, "span", 8);
772
772
  } if (rf & 2) {
773
- const ctx_r0 = i0.ɵɵnextContext(2);
773
+ const ctx_r0 = i0.ɵɵnextContext(3);
774
774
  i0.ɵɵclassMap(ctx_r0.icon);
775
775
  i0.ɵɵproperty("ngClass", ctx_r0.iconClass());
776
776
  i0.ɵɵattribute("data-pc-section", "icon");
777
777
  } }
778
- function Button_ng_container_4_2_ng_template_0_Template(rf, ctx) { }
779
- function Button_ng_container_4_2_Template(rf, ctx) { if (rf & 1) {
780
- i0.ɵɵtemplate(0, Button_ng_container_4_2_ng_template_0_Template, 0, 0, "ng-template", 10);
778
+ function Button_ProjectionFallback_1_ng_container_2_2_ng_template_0_Template(rf, ctx) { }
779
+ function Button_ProjectionFallback_1_ng_container_2_2_Template(rf, ctx) { if (rf & 1) {
780
+ i0.ɵɵtemplate(0, Button_ProjectionFallback_1_ng_container_2_2_ng_template_0_Template, 0, 0, "ng-template", 10);
781
781
  } if (rf & 2) {
782
- const ctx_r0 = i0.ɵɵnextContext(2);
782
+ const ctx_r0 = i0.ɵɵnextContext(3);
783
783
  i0.ɵɵproperty("ngIf", !ctx_r0.icon && (ctx_r0.iconTemplate || ctx_r0._iconTemplate));
784
784
  } }
785
- function Button_ng_container_4_Template(rf, ctx) { if (rf & 1) {
785
+ function Button_ProjectionFallback_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
786
786
  i0.ɵɵelementContainerStart(0);
787
- i0.ɵɵtemplate(1, Button_ng_container_4_span_1_Template, 1, 4, "span", 11)(2, Button_ng_container_4_2_Template, 1, 1, null, 5);
787
+ i0.ɵɵtemplate(1, Button_ProjectionFallback_1_ng_container_2_span_1_Template, 1, 4, "span", 11)(2, Button_ProjectionFallback_1_ng_container_2_2_Template, 1, 1, null, 5);
788
788
  i0.ɵɵelementContainerEnd();
789
789
  } if (rf & 2) {
790
- const ctx_r0 = i0.ɵɵnextContext();
790
+ const ctx_r0 = i0.ɵɵnextContext(2);
791
791
  i0.ɵɵadvance();
792
792
  i0.ɵɵproperty("ngIf", ctx_r0.icon && !ctx_r0.iconTemplate && !ctx_r0._iconTemplate);
793
793
  i0.ɵɵadvance();
794
794
  i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.iconTemplate || ctx_r0._iconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c4, ctx_r0.iconClass()));
795
795
  } }
796
- function Button_span_5_Template(rf, ctx) { if (rf & 1) {
796
+ function Button_ProjectionFallback_1_span_3_Template(rf, ctx) { if (rf & 1) {
797
797
  i0.ɵɵelementStart(0, "span", 12);
798
798
  i0.ɵɵtext(1);
799
799
  i0.ɵɵelementEnd();
800
800
  } if (rf & 2) {
801
- const ctx_r0 = i0.ɵɵnextContext();
801
+ const ctx_r0 = i0.ɵɵnextContext(2);
802
802
  i0.ɵɵattribute("aria-hidden", ctx_r0.icon && !ctx_r0.label)("data-pc-section", "label");
803
803
  i0.ɵɵadvance();
804
- i0.ɵɵtextInterpolate(ctx_r0.label);
804
+ i0.ɵɵtextInterpolate(ctx_r0.label || "\u00A0");
805
805
  } }
806
- function Button_p_badge_6_Template(rf, ctx) { if (rf & 1) {
806
+ function Button_ProjectionFallback_1_p_badge_4_Template(rf, ctx) { if (rf & 1) {
807
807
  i0.ɵɵelement(0, "p-badge", 13);
808
808
  } if (rf & 2) {
809
- const ctx_r0 = i0.ɵɵnextContext();
809
+ const ctx_r0 = i0.ɵɵnextContext(2);
810
810
  i0.ɵɵproperty("value", ctx_r0.badge)("severity", ctx_r0.badgeSeverity);
811
811
  } }
812
+ function Button_ProjectionFallback_1_Template(rf, ctx) { if (rf & 1) {
813
+ i0.ɵɵtemplate(0, Button_ProjectionFallback_1_ng_container_0_Template, 1, 0, "ng-container", 1)(1, Button_ProjectionFallback_1_ng_container_1_Template, 3, 5, "ng-container", 2)(2, Button_ProjectionFallback_1_ng_container_2_Template, 3, 5, "ng-container", 2)(3, Button_ProjectionFallback_1_span_3_Template, 2, 3, "span", 3)(4, Button_ProjectionFallback_1_p_badge_4_Template, 1, 2, "p-badge", 4);
814
+ } if (rf & 2) {
815
+ const ctx_r0 = i0.ɵɵnextContext();
816
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.contentTemplate || ctx_r0._contentTemplate);
817
+ i0.ɵɵadvance();
818
+ i0.ɵɵproperty("ngIf", ctx_r0.loading);
819
+ i0.ɵɵadvance();
820
+ i0.ɵɵproperty("ngIf", !ctx_r0.loading);
821
+ i0.ɵɵadvance();
822
+ i0.ɵɵproperty("ngIf", !ctx_r0.contentTemplate && !ctx_r0._contentTemplate);
823
+ i0.ɵɵadvance();
824
+ i0.ɵɵproperty("ngIf", !ctx_r0.contentTemplate && !ctx_r0._contentTemplate && ctx_r0.badge);
825
+ } }
812
826
  const INTERNAL_BUTTON_CLASSES = {
813
827
  button: 'p-button',
814
828
  component: 'p-component',
@@ -1464,26 +1478,15 @@ class Button extends BaseComponent {
1464
1478
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.loadingIconTemplate = _t.first);
1465
1479
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.iconTemplate = _t.first);
1466
1480
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templates = _t);
1467
- } }, inputs: { type: "type", iconPos: "iconPos", icon: "icon", badge: "badge", label: "label", disabled: [2, "disabled", "disabled", booleanAttribute], loading: [2, "loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", raised: [2, "raised", "raised", booleanAttribute], rounded: [2, "rounded", "rounded", booleanAttribute], text: [2, "text", "text", booleanAttribute], plain: [2, "plain", "plain", booleanAttribute], severity: "severity", outlined: [2, "outlined", "outlined", booleanAttribute], link: [2, "link", "link", booleanAttribute], tabindex: [2, "tabindex", "tabindex", numberAttribute], size: "size", variant: "variant", style: "style", styleClass: "styleClass", badgeClass: "badgeClass", badgeSeverity: "badgeSeverity", ariaLabel: "ariaLabel", autofocus: [2, "autofocus", "autofocus", booleanAttribute], fluid: [2, "fluid", "fluid", booleanAttribute], buttonProps: "buttonProps" }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, features: [i0.ɵɵProvidersFeature([ButtonStyle]), i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c3, decls: 7, vars: 14, consts: [["pRipple", "", 3, "click", "focus", "blur", "ngStyle", "disabled", "ngClass", "pAutoFocus"], [4, "ngTemplateOutlet"], [4, "ngIf"], ["class", "p-button-label", 4, "ngIf"], [3, "value", "severity", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "ngClass", 4, "ngIf"], [3, "styleClass", "spin", 4, "ngIf"], [3, "ngClass"], [3, "styleClass", "spin"], [3, "ngIf"], [3, "class", "ngClass", 4, "ngIf"], [1, "p-button-label"], [3, "value", "severity"]], template: function Button_Template(rf, ctx) { if (rf & 1) {
1481
+ } }, inputs: { type: "type", iconPos: "iconPos", icon: "icon", badge: "badge", label: "label", disabled: [2, "disabled", "disabled", booleanAttribute], loading: [2, "loading", "loading", booleanAttribute], loadingIcon: "loadingIcon", raised: [2, "raised", "raised", booleanAttribute], rounded: [2, "rounded", "rounded", booleanAttribute], text: [2, "text", "text", booleanAttribute], plain: [2, "plain", "plain", booleanAttribute], severity: "severity", outlined: [2, "outlined", "outlined", booleanAttribute], link: [2, "link", "link", booleanAttribute], tabindex: [2, "tabindex", "tabindex", numberAttribute], size: "size", variant: "variant", style: "style", styleClass: "styleClass", badgeClass: "badgeClass", badgeSeverity: "badgeSeverity", ariaLabel: "ariaLabel", autofocus: [2, "autofocus", "autofocus", booleanAttribute], fluid: [2, "fluid", "fluid", booleanAttribute], buttonProps: "buttonProps" }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, features: [i0.ɵɵProvidersFeature([ButtonStyle]), i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c3, decls: 3, vars: 9, consts: [["pRipple", "", 3, "click", "focus", "blur", "ngStyle", "disabled", "ngClass", "pAutoFocus"], [4, "ngTemplateOutlet"], [4, "ngIf"], ["class", "p-button-label", 4, "ngIf"], [3, "value", "severity", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "ngClass", 4, "ngIf"], [3, "styleClass", "spin", 4, "ngIf"], [3, "ngClass"], [3, "styleClass", "spin"], [3, "ngIf"], [3, "class", "ngClass", 4, "ngIf"], [1, "p-button-label"], [3, "value", "severity"]], template: function Button_Template(rf, ctx) { if (rf & 1) {
1468
1482
  i0.ɵɵprojectionDef();
1469
1483
  i0.ɵɵelementStart(0, "button", 0);
1470
1484
  i0.ɵɵlistener("click", function Button_Template_button_click_0_listener($event) { return ctx.onClick.emit($event); })("focus", function Button_Template_button_focus_0_listener($event) { return ctx.onFocus.emit($event); })("blur", function Button_Template_button_blur_0_listener($event) { return ctx.onBlur.emit($event); });
1471
- i0.ɵɵprojection(1);
1472
- i0.ɵɵtemplate(2, Button_ng_container_2_Template, 1, 0, "ng-container", 1)(3, Button_ng_container_3_Template, 3, 5, "ng-container", 2)(4, Button_ng_container_4_Template, 3, 5, "ng-container", 2)(5, Button_span_5_Template, 2, 3, "span", 3)(6, Button_p_badge_6_Template, 1, 2, "p-badge", 4);
1485
+ i0.ɵɵprojection(1, 0, null, Button_ProjectionFallback_1_Template, 5, 5);
1473
1486
  i0.ɵɵelementEnd();
1474
1487
  } if (rf & 2) {
1475
1488
  i0.ɵɵproperty("ngStyle", ctx.style)("disabled", ctx.disabled || ctx.loading)("ngClass", ctx.buttonClass)("pAutoFocus", ctx.autofocus);
1476
1489
  i0.ɵɵattribute("type", ctx.type)("aria-label", ctx.ariaLabel)("data-pc-name", "button")("data-pc-section", "root")("tabindex", ctx.tabindex);
1477
- i0.ɵɵadvance(2);
1478
- i0.ɵɵproperty("ngTemplateOutlet", ctx.contentTemplate || ctx._contentTemplate);
1479
- i0.ɵɵadvance();
1480
- i0.ɵɵproperty("ngIf", ctx.loading);
1481
- i0.ɵɵadvance();
1482
- i0.ɵɵproperty("ngIf", !ctx.loading);
1483
- i0.ɵɵadvance();
1484
- i0.ɵɵproperty("ngIf", !ctx.contentTemplate && !ctx._contentTemplate && ctx.label);
1485
- i0.ɵɵadvance();
1486
- i0.ɵɵproperty("ngIf", !ctx.contentTemplate && !ctx._contentTemplate && ctx.badge);
1487
1490
  } }, dependencies: [CommonModule, i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, Ripple, AutoFocus, SpinnerIcon, BadgeModule, i2.Badge, SharedModule], encapsulation: 2, changeDetection: 0 });
1488
1491
  }
1489
1492
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Button, [{
@@ -1508,21 +1511,22 @@ class Button extends BaseComponent {
1508
1511
  [attr.tabindex]="tabindex"
1509
1512
  [pAutoFocus]="autofocus"
1510
1513
  >
1511
- <ng-content></ng-content>
1512
- <ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate"></ng-container>
1513
- <ng-container *ngIf="loading">
1514
- <ng-container *ngIf="!loadingIconTemplate && !_loadingIconTemplate">
1515
- <span *ngIf="loadingIcon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'"></span>
1516
- <SpinnerIcon *ngIf="!loadingIcon" [styleClass]="spinnerIconClass()" [spin]="true" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'" />
1514
+ <ng-content>
1515
+ <ng-container *ngTemplateOutlet="contentTemplate || _contentTemplate"></ng-container>
1516
+ <ng-container *ngIf="loading">
1517
+ <ng-container *ngIf="!loadingIconTemplate && !_loadingIconTemplate">
1518
+ <span *ngIf="loadingIcon" [ngClass]="iconClass()" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'"></span>
1519
+ <SpinnerIcon *ngIf="!loadingIcon" [styleClass]="spinnerIconClass()" [spin]="true" [attr.aria-hidden]="true" [attr.data-pc-section]="'loadingicon'" />
1520
+ </ng-container>
1521
+ <ng-template [ngIf]="loadingIconTemplate || _loadingIconTemplate" *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate; context: { class: iconClass() }"></ng-template>
1522
+ </ng-container>
1523
+ <ng-container *ngIf="!loading">
1524
+ <span *ngIf="icon && !iconTemplate && !_iconTemplate" [class]="icon" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'"></span>
1525
+ <ng-template [ngIf]="!icon && (iconTemplate || _iconTemplate)" *ngTemplateOutlet="iconTemplate || _iconTemplate; context: { class: iconClass() }"></ng-template>
1517
1526
  </ng-container>
1518
- <ng-template [ngIf]="loadingIconTemplate || _loadingIconTemplate" *ngTemplateOutlet="loadingIconTemplate || _loadingIconTemplate; context: { class: iconClass() }"></ng-template>
1519
- </ng-container>
1520
- <ng-container *ngIf="!loading">
1521
- <span *ngIf="icon && !iconTemplate && !_iconTemplate" [class]="icon" [ngClass]="iconClass()" [attr.data-pc-section]="'icon'"></span>
1522
- <ng-template [ngIf]="!icon && (iconTemplate || _iconTemplate)" *ngTemplateOutlet="iconTemplate || _iconTemplate; context: { class: iconClass() }"></ng-template>
1523
- </ng-container>
1524
- <span class="p-button-label" [attr.aria-hidden]="icon && !label" *ngIf="!contentTemplate && !_contentTemplate && label" [attr.data-pc-section]="'label'">{{ label }}</span>
1525
- <p-badge *ngIf="!contentTemplate && !_contentTemplate && badge" [value]="badge" [severity]="badgeSeverity"></p-badge>
1527
+ <span class="p-button-label" [attr.aria-hidden]="icon && !label" *ngIf="!contentTemplate && !_contentTemplate" [attr.data-pc-section]="'label'">{{ label || '&nbsp;' }}</span>
1528
+ <p-badge *ngIf="!contentTemplate && !_contentTemplate && badge" [value]="badge" [severity]="badgeSeverity"></p-badge>
1529
+ </ng-content>
1526
1530
  </button>
1527
1531
  `,
1528
1532
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1611,7 +1615,7 @@ class Button extends BaseComponent {
1611
1615
  type: ContentChildren,
1612
1616
  args: [PrimeTemplate]
1613
1617
  }] }); })();
1614
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Button, { className: "Button", filePath: "button.ts", lineNumber: 471 }); })();
1618
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Button, { className: "Button", filePath: "button.ts", lineNumber: 472 }); })();
1615
1619
  class ButtonModule {
1616
1620
  static ɵfac = function ButtonModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ButtonModule)(); };
1617
1621
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ButtonModule });