ng-tailwind 4.2.27 → 4.2.29

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.
@@ -1730,6 +1730,7 @@ var InputMaskEnum;
1730
1730
  InputMaskEnum["PLATE"] = "plate";
1731
1731
  InputMaskEnum["CEP"] = "cep";
1732
1732
  InputMaskEnum["INTEGER"] = "integer";
1733
+ InputMaskEnum["NUMERIC_STRING"] = "numeric-string";
1733
1734
  InputMaskEnum["TIME"] = "time";
1734
1735
  InputMaskEnum["INTERNATIONAL_PHONE"] = "international-phone";
1735
1736
  InputMaskEnum["DATE"] = "date";
@@ -2006,15 +2007,23 @@ class NgtInputComponent extends NgtBaseNgModel {
2006
2007
  return this.clearInput();
2007
2008
  }
2008
2009
  let masks = {
2009
- [InputMaskEnum.CPF]: '999.999.999-99',
2010
- [InputMaskEnum.CNPJ]: '99.999.999/9999-99',
2010
+ [InputMaskEnum.CPF]: {
2011
+ mask: ['999.999.999-99'],
2012
+ clearMaskOnLostFocus: false
2013
+ },
2014
+ [InputMaskEnum.CNPJ]: {
2015
+ mask: ['99.999.999/9999-99'],
2016
+ clearMaskOnLostFocus: false
2017
+ },
2011
2018
  [InputMaskEnum.CPF_CNPJ_RUT]: {
2012
2019
  mask: ['999.999.999-99', '999999999999', '99.999.999/9999-99'],
2013
- keepStatic: true
2020
+ keepStatic: true,
2021
+ clearMaskOnLostFocus: false
2014
2022
  },
2015
2023
  [InputMaskEnum.CPF_CNPJ]: {
2016
2024
  mask: ['999.999.999-99', '99.999.999/9999-99'],
2017
- keepStatic: true
2025
+ keepStatic: true,
2026
+ clearMaskOnLostFocus: false
2018
2027
  },
2019
2028
  [InputMaskEnum.DECIMAL]: {
2020
2029
  digits: this.decimalMaskPrecision,
@@ -2024,24 +2033,36 @@ class NgtInputComponent extends NgtBaseNgModel {
2024
2033
  repeat: 16,
2025
2034
  rightAlign: false,
2026
2035
  max: this.maxValue,
2036
+ clearMaskOnLostFocus: false
2027
2037
  },
2028
2038
  [InputMaskEnum.CELLPHONE]: {
2029
2039
  mask: ['(99) 999-999', '(99) 9999-9999', '(99) 99999-9999'],
2030
- keepStatic: true
2040
+ keepStatic: true,
2041
+ clearMaskOnLostFocus: false
2031
2042
  },
2032
2043
  [InputMaskEnum.INTERNATIONAL_PHONE]: {
2033
2044
  mask: ['+999 99 999-999', '+99 (99) 9999-9999', '+99 (99) 99999-9999', '+999 (99) 9999-9999', '+999 (99) 99999-9999'],
2034
- keepStatic: true
2045
+ keepStatic: true,
2046
+ clearMaskOnLostFocus: false
2035
2047
  },
2036
2048
  [InputMaskEnum.PLATE]: {
2037
2049
  mask: ['AAA-9&99'],
2038
- keepStatic: true
2050
+ keepStatic: true,
2051
+ clearMaskOnLostFocus: false
2052
+ },
2053
+ [InputMaskEnum.CEP]: {
2054
+ mask: ['99999-999'],
2055
+ clearMaskOnLostFocus: false
2039
2056
  },
2040
- [InputMaskEnum.CEP]: '99999-999',
2041
2057
  [InputMaskEnum.INTEGER]: {
2042
2058
  max: this.maxValue,
2043
2059
  min: this.validateMinValueOnMask ? this.minValue : undefined,
2044
- rightAlign: false
2060
+ rightAlign: false,
2061
+ clearMaskOnLostFocus: false
2062
+ },
2063
+ [InputMaskEnum.NUMERIC_STRING]: {
2064
+ regex: "[0-9]*",
2065
+ clearMaskOnLostFocus: false
2045
2066
  },
2046
2067
  [InputMaskEnum.TIME]: '99:99',
2047
2068
  };
@@ -2597,6 +2618,7 @@ class NgtModalComponent {
2597
2618
  this.onCloseModal = new EventEmitter();
2598
2619
  this.onOpenModal = new EventEmitter();
2599
2620
  this.isOpen = false;
2621
+ this.viewMode = false;
2600
2622
  this.keydownEventWasAdded = false;
2601
2623
  this.subscriptions = [];
2602
2624
  if (this.tailStylizableDirective) {
@@ -2631,7 +2653,10 @@ class NgtModalComponent {
2631
2653
  this.keydownEventWasAdded = true;
2632
2654
  window.addEventListener('keydown', (event) => {
2633
2655
  if (event.keyCode == 27) {
2634
- this.close();
2656
+ if (this.viewMode) {
2657
+ this.closeViewMode();
2658
+ event.stopPropagation();
2659
+ }
2635
2660
  }
2636
2661
  }, true);
2637
2662
  }
@@ -2643,6 +2668,9 @@ class NgtModalComponent {
2643
2668
  this.subscriptions.forEach(subscription => subscription.unsubscribe());
2644
2669
  this.subscriptions = [];
2645
2670
  }
2671
+ closeViewMode() {
2672
+ this.viewMode = false;
2673
+ }
2646
2674
  }
2647
2675
  NgtModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NgtModalComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: NgtStylizableDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
2648
2676
  NgtModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: NgtModalComponent, selector: "ngt-modal", inputs: { customLayout: "customLayout", disableDefaultCloses: "disableDefaultCloses", ngtStyle: "ngtStyle" }, outputs: { onCloseModal: "onCloseModal", onOpenModal: "onOpenModal" }, ngImport: i0, template: "<div class=\"flex min-w-full relative justify-center text-gray-700\">\n <div *ngIf=\"isOpen\" class=\"flex fixed min-w-full h-full inset-0 px-6 py-6 md:py-0 md:px-0 justify-center\"\n style=\"background: rgba(0,0,0,.7); z-index: 1100 !important;\" @fade>\n <ng-container *ngIf=\"!disableDefaultCloses\">\n <button class=\"fixed inset-0 h-full w-full bg-black opacity-0 cursor-default z-0\" tabindex=\"-1\"\n type=\"button\" (click)='close()'>\n </button>\n </ng-container>\n\n <div class=\"{{ ngtStyle.compile(['w', 'overflow']) }} relative border border-teal-500 bg-white w-full self-center rounded shadow-lg z-10\"\n style=\"max-height: 85%;\">\n <div class=\"cursor-default text-left {{ ngtStyle.compile(['py', 'px']) }}\">\n <div *ngIf=\"!customLayout\">\n <ngt-modal-header class=\"w-full\" [disableDefaultCloses]=\"disableDefaultCloses\">\n <ng-content select='[header]'></ng-content>\n </ngt-modal-header>\n </div>\n\n <ng-container *ngIf=\"!customLayout\">\n <ngt-modal-body>\n <ng-content select='[body]'></ng-content>\n </ngt-modal-body>\n </ng-container>\n\n <!--Footer-->\n <ng-container *ngIf=\"!customLayout\">\n <ngt-modal-footer>\n <ng-content select='[footer]'></ng-content>\n </ngt-modal-footer>\n </ng-container>\n\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgtModalHeaderComponent, selector: "ngt-modal-header", inputs: ["disableDefaultCloses"] }, { kind: "component", type: NgtModalBodyComponent, selector: "ngt-modal-body" }, { kind: "component", type: NgtModalFooterComponent, selector: "ngt-modal-footer" }], animations: [
@@ -7335,6 +7363,7 @@ class NgtAttachmentHttpService {
7335
7363
  }
7336
7364
 
7337
7365
  class NgtDropzoneComponent extends NgtBaseNgModel {
7366
+ ;
7338
7367
  ;
7339
7368
  constructor(formContainer, ngtAttachmentHttpService, injector, changeDetector) {
7340
7369
  super();