@pumpkin-tech/pumpkin-tech-ng 0.2.31 → 0.2.33

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Input, Directive, Injectable, NgModule, EventEmitter, ElementRef, forwardRef, Output, ContentChild, ViewChild, ChangeDetectionStrategy, Component, HostListener, Inject, InjectionToken, Optional, Pipe, ContentChildren, inject } from '@angular/core';
2
+ import { HostBinding, Input, Directive, Injectable, NgModule, Optional, Self, EventEmitter, ElementRef, forwardRef, Output, ContentChild, ViewChild, ChangeDetectionStrategy, Component, HostListener, Inject, InjectionToken, Pipe, ContentChildren, inject } from '@angular/core';
3
3
  import * as i1 from '@angular/cdk/layout';
4
4
  import * as i2$4 from 'rxjs';
5
5
  import { Subject, BehaviorSubject, takeUntil as takeUntil$1, delay, tap, map, filter, of } from 'rxjs';
@@ -513,8 +513,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
513
513
  // projects/.../base/base-field.ts
514
514
  class BaseField {
515
515
  el;
516
- constructor(el) {
516
+ ptechColDirective;
517
+ constructor(el, ptechColDirective) {
517
518
  this.el = el;
519
+ this.ptechColDirective = ptechColDirective;
518
520
  }
519
521
  // ===== Coercion hints (Angular) =====
520
522
  static ngAcceptInputType_required;
@@ -554,6 +556,9 @@ class BaseField {
554
556
  }
555
557
  /** Se a diretiva [ptechCol*] estiver presente, ela domina o layout. */
556
558
  hasPtechColAttrs() {
559
+ if (this.ptechColDirective) {
560
+ return true;
561
+ }
557
562
  const el = this.el.nativeElement;
558
563
  return el.hasAttribute('ptechCol') || el.hasAttribute('ptechcol') ||
559
564
  el.hasAttribute('ptechColXs') || el.hasAttribute('ptechcolxs') ||
@@ -566,12 +571,16 @@ class BaseField {
566
571
  return this.hasPtechColAttrs() ? null : `auto / span ${this._col}`;
567
572
  }
568
573
  hostDisplay = 'block';
569
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseField, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
574
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseField, deps: [{ token: i0.ElementRef }, { token: PtechColDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
570
575
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: BaseField, isStandalone: true, inputs: { required: "required", disabled: "disabled", readonly: "readonly", loading: "loading", fullWidth: "fullWidth", label: "label", placeholder: "placeholder", name: "name", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", appearance: "appearance", col: "col" }, host: { properties: { "style.grid-column": "this.gridColumn", "style.display": "this.hostDisplay" } }, ngImport: i0 });
571
576
  }
572
577
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseField, decorators: [{
573
578
  type: Directive
574
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { required: [{
579
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: PtechColDirective, decorators: [{
580
+ type: Optional
581
+ }, {
582
+ type: Self
583
+ }] }], propDecorators: { required: [{
575
584
  type: Input
576
585
  }], disabled: [{
577
586
  type: Input
@@ -1466,7 +1475,7 @@ class ButtonComponent extends BaseField {
1466
1475
  </a>
1467
1476
 
1468
1477
  </ng-container>
1469
- `, isInline: true, styles: [".pill-style{border-radius:20px}.ptech-btn{min-height:var(--btn-h, 36px);padding:var(--btn-pad, 0 14px);display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn-icon-wrapper{display:inline-flex;align-items:center;justify-content:center}.btn-icon{font-size:var(--icon-fs, 20px);line-height:1;display:inline-flex;align-items:center;justify-content:center}.btn-label{font-size:var(--btn-fs, 15px);margin-left:2px;line-height:1;display:inline-flex;align-items:center;transform:translateY(-3.5px)}.btn-spinner{display:inline-flex;align-items:center;justify-content:center;margin-right:5px;margin-top:5px}.btn-spinner ::ng-deep .mat-mdc-progress-spinner{margin:0;vertical-align:middle}.ptech-btn.ptech-btn-icon.mat-mdc-icon-button{width:var(--btn-icon-size, 36px)!important;height:var(--btn-icon-size, 36px)!important;min-width:var(--btn-icon-size, 36px)!important;min-height:var(--btn-icon-size, 36px)!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center;pointer-events:auto}button,a[mat-button]{cursor:pointer;transition:box-shadow .3s,transform .2s}button:hover{box-shadow:0 4px 8px #0003;transform:translateY(-2px)}button:active{box-shadow:0 2px 4px #0003;transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.5;transform:none;box-shadow:none}.ptech-btn.ptech-btn-icon:disabled{opacity:1}.ptech-btn.ptech-btn-icon:disabled .btn-icon{color:var(--app-muted, #9ca3af)!important}.ptech-btn-icon .btn-icon{font-size:var(--icon-fs, 20px)}\n"], dependencies: [{ kind: "ngmodule", type: CoreMaterialModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1478
+ `, isInline: true, styles: [".pill-style{border-radius:20px}.ptech-btn{min-height:var(--btn-h, 36px);padding:var(--btn-pad, 0 14px);display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn-icon-wrapper{display:inline-flex;align-items:center;justify-content:center}.btn-icon{font-size:var(--icon-fs, 20px);line-height:1;display:inline-flex;align-items:center;justify-content:center}.btn-label{font-size:var(--btn-fs, 15px);margin-left:2px;line-height:1;display:inline-flex;align-items:center;transform:translateY(-3.5px)}.btn-spinner{display:inline-flex;align-items:center;justify-content:center;margin-right:5px;margin-top:5px}.btn-spinner ::ng-deep .mat-mdc-progress-spinner{margin:0;vertical-align:middle}.ptech-btn.ptech-btn-icon.mat-mdc-icon-button{width:var(--btn-icon-size, 36px)!important;height:var(--btn-icon-size, 36px)!important;min-width:var(--btn-icon-size, 36px)!important;min-height:var(--btn-icon-size, 36px)!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center;pointer-events:auto}button,a[mat-button]{cursor:pointer;transition:box-shadow .3s,transform .2s}button:hover{box-shadow:0 4px 8px #0003}button:active{box-shadow:0 2px 4px #0003}button:disabled{cursor:not-allowed;opacity:.5;transform:none;box-shadow:none}.ptech-btn.ptech-btn-icon:disabled{opacity:1}.ptech-btn.ptech-btn-icon:disabled .btn-icon{color:var(--app-muted, #9ca3af)!important}.ptech-btn-icon .btn-icon{font-size:var(--icon-fs, 20px)}\n"], dependencies: [{ kind: "ngmodule", type: CoreMaterialModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1470
1479
  }
1471
1480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ButtonComponent, decorators: [{
1472
1481
  type: Component,
@@ -1781,7 +1790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1781
1790
  </a>
1782
1791
 
1783
1792
  </ng-container>
1784
- `, styles: [".pill-style{border-radius:20px}.ptech-btn{min-height:var(--btn-h, 36px);padding:var(--btn-pad, 0 14px);display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn-icon-wrapper{display:inline-flex;align-items:center;justify-content:center}.btn-icon{font-size:var(--icon-fs, 20px);line-height:1;display:inline-flex;align-items:center;justify-content:center}.btn-label{font-size:var(--btn-fs, 15px);margin-left:2px;line-height:1;display:inline-flex;align-items:center;transform:translateY(-3.5px)}.btn-spinner{display:inline-flex;align-items:center;justify-content:center;margin-right:5px;margin-top:5px}.btn-spinner ::ng-deep .mat-mdc-progress-spinner{margin:0;vertical-align:middle}.ptech-btn.ptech-btn-icon.mat-mdc-icon-button{width:var(--btn-icon-size, 36px)!important;height:var(--btn-icon-size, 36px)!important;min-width:var(--btn-icon-size, 36px)!important;min-height:var(--btn-icon-size, 36px)!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center;pointer-events:auto}button,a[mat-button]{cursor:pointer;transition:box-shadow .3s,transform .2s}button:hover{box-shadow:0 4px 8px #0003;transform:translateY(-2px)}button:active{box-shadow:0 2px 4px #0003;transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.5;transform:none;box-shadow:none}.ptech-btn.ptech-btn-icon:disabled{opacity:1}.ptech-btn.ptech-btn-icon:disabled .btn-icon{color:var(--app-muted, #9ca3af)!important}.ptech-btn-icon .btn-icon{font-size:var(--icon-fs, 20px)}\n"] }]
1793
+ `, styles: [".pill-style{border-radius:20px}.ptech-btn{min-height:var(--btn-h, 36px);padding:var(--btn-pad, 0 14px);display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn-icon-wrapper{display:inline-flex;align-items:center;justify-content:center}.btn-icon{font-size:var(--icon-fs, 20px);line-height:1;display:inline-flex;align-items:center;justify-content:center}.btn-label{font-size:var(--btn-fs, 15px);margin-left:2px;line-height:1;display:inline-flex;align-items:center;transform:translateY(-3.5px)}.btn-spinner{display:inline-flex;align-items:center;justify-content:center;margin-right:5px;margin-top:5px}.btn-spinner ::ng-deep .mat-mdc-progress-spinner{margin:0;vertical-align:middle}.ptech-btn.ptech-btn-icon.mat-mdc-icon-button{width:var(--btn-icon-size, 36px)!important;height:var(--btn-icon-size, 36px)!important;min-width:var(--btn-icon-size, 36px)!important;min-height:var(--btn-icon-size, 36px)!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center;pointer-events:auto}button,a[mat-button]{cursor:pointer;transition:box-shadow .3s,transform .2s}button:hover{box-shadow:0 4px 8px #0003}button:active{box-shadow:0 2px 4px #0003}button:disabled{cursor:not-allowed;opacity:.5;transform:none;box-shadow:none}.ptech-btn.ptech-btn-icon:disabled{opacity:1}.ptech-btn.ptech-btn-icon:disabled .btn-icon{color:var(--app-muted, #9ca3af)!important}.ptech-btn-icon .btn-icon{font-size:var(--icon-fs, 20px)}\n"] }]
1785
1794
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { type: [{
1786
1795
  type: Input
1787
1796
  }], size: [{