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.
- package/components/ngt-modal/ngt-modal.component.d.ts +2 -0
- package/esm2020/components/ngt-dropzone/ngt-dropzone.component.mjs +2 -1
- package/esm2020/components/ngt-input/ngt-input.component.mjs +30 -10
- package/esm2020/components/ngt-modal/ngt-modal.component.mjs +10 -3
- package/esm2020/helpers/input-mask/input-mask.helper.mjs +2 -1
- package/fesm2015/ng-tailwind.mjs +39 -10
- package/fesm2015/ng-tailwind.mjs.map +1 -1
- package/fesm2020/ng-tailwind.mjs +39 -10
- package/fesm2020/ng-tailwind.mjs.map +1 -1
- package/helpers/input-mask/input-mask.helper.d.ts +1 -0
- package/package.json +1 -1
package/fesm2020/ng-tailwind.mjs
CHANGED
|
@@ -1710,6 +1710,7 @@ var InputMaskEnum;
|
|
|
1710
1710
|
InputMaskEnum["PLATE"] = "plate";
|
|
1711
1711
|
InputMaskEnum["CEP"] = "cep";
|
|
1712
1712
|
InputMaskEnum["INTEGER"] = "integer";
|
|
1713
|
+
InputMaskEnum["NUMERIC_STRING"] = "numeric-string";
|
|
1713
1714
|
InputMaskEnum["TIME"] = "time";
|
|
1714
1715
|
InputMaskEnum["INTERNATIONAL_PHONE"] = "international-phone";
|
|
1715
1716
|
InputMaskEnum["DATE"] = "date";
|
|
@@ -1985,15 +1986,23 @@ class NgtInputComponent extends NgtBaseNgModel {
|
|
|
1985
1986
|
return this.clearInput();
|
|
1986
1987
|
}
|
|
1987
1988
|
let masks = {
|
|
1988
|
-
[InputMaskEnum.CPF]:
|
|
1989
|
-
|
|
1989
|
+
[InputMaskEnum.CPF]: {
|
|
1990
|
+
mask: ['999.999.999-99'],
|
|
1991
|
+
clearMaskOnLostFocus: false
|
|
1992
|
+
},
|
|
1993
|
+
[InputMaskEnum.CNPJ]: {
|
|
1994
|
+
mask: ['99.999.999/9999-99'],
|
|
1995
|
+
clearMaskOnLostFocus: false
|
|
1996
|
+
},
|
|
1990
1997
|
[InputMaskEnum.CPF_CNPJ_RUT]: {
|
|
1991
1998
|
mask: ['999.999.999-99', '999999999999', '99.999.999/9999-99'],
|
|
1992
|
-
keepStatic: true
|
|
1999
|
+
keepStatic: true,
|
|
2000
|
+
clearMaskOnLostFocus: false
|
|
1993
2001
|
},
|
|
1994
2002
|
[InputMaskEnum.CPF_CNPJ]: {
|
|
1995
2003
|
mask: ['999.999.999-99', '99.999.999/9999-99'],
|
|
1996
|
-
keepStatic: true
|
|
2004
|
+
keepStatic: true,
|
|
2005
|
+
clearMaskOnLostFocus: false
|
|
1997
2006
|
},
|
|
1998
2007
|
[InputMaskEnum.DECIMAL]: {
|
|
1999
2008
|
digits: this.decimalMaskPrecision,
|
|
@@ -2003,24 +2012,36 @@ class NgtInputComponent extends NgtBaseNgModel {
|
|
|
2003
2012
|
repeat: 16,
|
|
2004
2013
|
rightAlign: false,
|
|
2005
2014
|
max: this.maxValue,
|
|
2015
|
+
clearMaskOnLostFocus: false
|
|
2006
2016
|
},
|
|
2007
2017
|
[InputMaskEnum.CELLPHONE]: {
|
|
2008
2018
|
mask: ['(99) 999-999', '(99) 9999-9999', '(99) 99999-9999'],
|
|
2009
|
-
keepStatic: true
|
|
2019
|
+
keepStatic: true,
|
|
2020
|
+
clearMaskOnLostFocus: false
|
|
2010
2021
|
},
|
|
2011
2022
|
[InputMaskEnum.INTERNATIONAL_PHONE]: {
|
|
2012
2023
|
mask: ['+999 99 999-999', '+99 (99) 9999-9999', '+99 (99) 99999-9999', '+999 (99) 9999-9999', '+999 (99) 99999-9999'],
|
|
2013
|
-
keepStatic: true
|
|
2024
|
+
keepStatic: true,
|
|
2025
|
+
clearMaskOnLostFocus: false
|
|
2014
2026
|
},
|
|
2015
2027
|
[InputMaskEnum.PLATE]: {
|
|
2016
2028
|
mask: ['AAA-9&99'],
|
|
2017
|
-
keepStatic: true
|
|
2029
|
+
keepStatic: true,
|
|
2030
|
+
clearMaskOnLostFocus: false
|
|
2031
|
+
},
|
|
2032
|
+
[InputMaskEnum.CEP]: {
|
|
2033
|
+
mask: ['99999-999'],
|
|
2034
|
+
clearMaskOnLostFocus: false
|
|
2018
2035
|
},
|
|
2019
|
-
[InputMaskEnum.CEP]: '99999-999',
|
|
2020
2036
|
[InputMaskEnum.INTEGER]: {
|
|
2021
2037
|
max: this.maxValue,
|
|
2022
2038
|
min: this.validateMinValueOnMask ? this.minValue : undefined,
|
|
2023
|
-
rightAlign: false
|
|
2039
|
+
rightAlign: false,
|
|
2040
|
+
clearMaskOnLostFocus: false
|
|
2041
|
+
},
|
|
2042
|
+
[InputMaskEnum.NUMERIC_STRING]: {
|
|
2043
|
+
regex: "[0-9]*",
|
|
2044
|
+
clearMaskOnLostFocus: false
|
|
2024
2045
|
},
|
|
2025
2046
|
[InputMaskEnum.TIME]: '99:99',
|
|
2026
2047
|
};
|
|
@@ -2566,6 +2587,7 @@ class NgtModalComponent {
|
|
|
2566
2587
|
this.onCloseModal = new EventEmitter();
|
|
2567
2588
|
this.onOpenModal = new EventEmitter();
|
|
2568
2589
|
this.isOpen = false;
|
|
2590
|
+
this.viewMode = false;
|
|
2569
2591
|
this.keydownEventWasAdded = false;
|
|
2570
2592
|
this.subscriptions = [];
|
|
2571
2593
|
if (this.tailStylizableDirective) {
|
|
@@ -2600,7 +2622,10 @@ class NgtModalComponent {
|
|
|
2600
2622
|
this.keydownEventWasAdded = true;
|
|
2601
2623
|
window.addEventListener('keydown', (event) => {
|
|
2602
2624
|
if (event.keyCode == 27) {
|
|
2603
|
-
this.
|
|
2625
|
+
if (this.viewMode) {
|
|
2626
|
+
this.closeViewMode();
|
|
2627
|
+
event.stopPropagation();
|
|
2628
|
+
}
|
|
2604
2629
|
}
|
|
2605
2630
|
}, true);
|
|
2606
2631
|
}
|
|
@@ -2612,6 +2637,9 @@ class NgtModalComponent {
|
|
|
2612
2637
|
this.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
2613
2638
|
this.subscriptions = [];
|
|
2614
2639
|
}
|
|
2640
|
+
closeViewMode() {
|
|
2641
|
+
this.viewMode = false;
|
|
2642
|
+
}
|
|
2615
2643
|
}
|
|
2616
2644
|
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 });
|
|
2617
2645
|
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: [
|
|
@@ -7204,6 +7232,7 @@ class NgtAttachmentHttpService {
|
|
|
7204
7232
|
}
|
|
7205
7233
|
|
|
7206
7234
|
class NgtDropzoneComponent extends NgtBaseNgModel {
|
|
7235
|
+
;
|
|
7207
7236
|
;
|
|
7208
7237
|
constructor(formContainer, ngtAttachmentHttpService, injector, changeDetector) {
|
|
7209
7238
|
super();
|