@dev-tcloud/tcloud-ui 0.0.70 → 0.0.71
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/esm2020/lib/_modules/tcloud-ui-filters/tcloud-ui-filters.component.mjs +2 -2
- package/esm2020/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.mjs +9 -4
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +9 -4
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +9 -4
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_modules/tcloud-ui-modal/tcloud-ui-modal.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -537,6 +537,7 @@ class TCloudUiModalComponent {
|
|
|
537
537
|
* maxWidth - number - Largura máxima do modal - default 500px
|
|
538
538
|
*/
|
|
539
539
|
this.maxWidth = 500;
|
|
540
|
+
this.control_open = false;
|
|
540
541
|
this._open = false;
|
|
541
542
|
this._loading = false;
|
|
542
543
|
this.openChange = new EventEmitter();
|
|
@@ -586,6 +587,8 @@ class TCloudUiModalComponent {
|
|
|
586
587
|
* open - boolean - Variável de controle para exibição do modal - obrigatório
|
|
587
588
|
*/
|
|
588
589
|
set open(open) {
|
|
590
|
+
this.control_open = open;
|
|
591
|
+
this.checkIsOpen();
|
|
589
592
|
this._open = open;
|
|
590
593
|
this.fixed_body((open) ? 'on' : 'off');
|
|
591
594
|
}
|
|
@@ -624,6 +627,7 @@ class TCloudUiModalComponent {
|
|
|
624
627
|
}
|
|
625
628
|
toClose(action) {
|
|
626
629
|
if (this.autoClose) {
|
|
630
|
+
this.control_open = false;
|
|
627
631
|
this.open = false;
|
|
628
632
|
this.openChange.emit(false);
|
|
629
633
|
}
|
|
@@ -632,7 +636,7 @@ class TCloudUiModalComponent {
|
|
|
632
636
|
this.fixed_body('off');
|
|
633
637
|
}
|
|
634
638
|
checkIsOpen() {
|
|
635
|
-
if (this.
|
|
639
|
+
if (this.control_open) {
|
|
636
640
|
this.fixed_body('on');
|
|
637
641
|
}
|
|
638
642
|
else {
|
|
@@ -651,6 +655,7 @@ class TCloudUiModalComponent {
|
|
|
651
655
|
}
|
|
652
656
|
}
|
|
653
657
|
ngOnDestroy() {
|
|
658
|
+
this.checkIsOpen();
|
|
654
659
|
if (this.subscription) {
|
|
655
660
|
this.subscription.unsubscribe();
|
|
656
661
|
}
|
|
@@ -659,7 +664,7 @@ class TCloudUiModalComponent {
|
|
|
659
664
|
TCloudUiModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiModalComponent, deps: [{ token: TcloudModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
660
665
|
TCloudUiModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiModalComponent, selector: "tcloud-ui-modal", inputs: { confirm: "confirm", confirmText: "confirmText", autoClose: "autoClose", title: "title", maxWidth: "maxWidth", window: "window", open: "open", loading: "loading" }, outputs: { openChange: "openChange", toConfirm: "toConfirm", toCancel: "toCancel", toAction: "toAction" }, providers: [
|
|
661
666
|
TcloudModalService
|
|
662
|
-
], ngImport: i0, template: "<div class=\"tc-background-modal\" *ngIf=\"
|
|
667
|
+
], ngImport: i0, template: "<div class=\"tc-background-modal\" *ngIf=\"control_open\" >{{ checkIsOpen() }}</div>\r\n\r\n<div class=\"base-modal\" *ngIf=\"open\">\r\n <div class=\"sub-modal\" [@fade]=\"'visible'\">\r\n <div class=\"tc-modal tc-modal-shadow\" [attr.style]=\"'max-width: ' + maxWidth + 'px;'\">\r\n <div class=\"area-top-actions\">\r\n <button type=\"button\" [class.no-use-header]=\"title\" (click)=\"toClose()\" [disabled]=\"loading\">\r\n <i *ngIf=\"!loading\" class=\"fas fa-times\"></i>\r\n <i *ngIf=\"loading\" class=\"fas fa-spinner fa-spin\"></i>\r\n </button>\r\n </div>\r\n\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Ex: Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open\">\r\n\r\n <tcloud-ui-modal-header title=\"T\u00EDtulo do Modal\" ></tcloud-ui-modal-header>\r\n\r\n <tcloud-ui-modal-body>\r\n Conte\u00FAdo do modal aqui\r\n </tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open = !open\">open modal {{ open }}</button>\r\n-->\r\n\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n\r\n<!-- Ex: Confirm Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open_confirm\" [title]=\"'Aten\u00E7\u00E3o'\" [confirmText]=\"'Aceito'\" [confirm]=\"true\" (toAction)=\"$event\" >\r\n\r\n <tcloud-ui-modal-body>Deseja realmente executar esta a\u00E7\u00E3o?</tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open_confirm = !open_confirm\">open_confirm modal {{ open_confirm }}</button>\r\n-->", styles: [".tc-background-modal{border:1px solid #ccc;position:fixed;width:100%;left:0;top:0;background-color:#000;z-index:4005;height:100%;opacity:.3}.base-modal{height:100%;overflow:scroll;position:fixed;width:100%;z-index:4005;left:0;top:0}.sub-modal{padding:30px;position:absolute;width:100%}.tc-modal{position:relative;background-color:#fff;padding:12px;border-radius:8px;margin:auto;width:100%}.tc-modal-shadow{box-shadow:2px 2px 10px #0000005e}.area-top-actions{position:absolute;top:2px;right:5px;z-index:1}.area-top-actions button{cursor:pointer;background-color:transparent;border:none;font-size:15px;padding:5px 7px}.area-top-actions button i{font-size:17px;color:#fff;transition:all .25s;opacity:.7}.area-top-actions button i:hover{opacity:1!important}h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.no-use-header i{color:#999!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
663
668
|
trigger('fade', [
|
|
664
669
|
state('visible', style({ opacity: 1 })),
|
|
665
670
|
state('hide', style({ opacity: 0, top: '-38%' })),
|
|
@@ -684,7 +689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
684
689
|
]),
|
|
685
690
|
transition('visible => hide', animate('0.3s ease-out'))
|
|
686
691
|
])
|
|
687
|
-
], template: "<div class=\"tc-background-modal\" *ngIf=\"
|
|
692
|
+
], template: "<div class=\"tc-background-modal\" *ngIf=\"control_open\" >{{ checkIsOpen() }}</div>\r\n\r\n<div class=\"base-modal\" *ngIf=\"open\">\r\n <div class=\"sub-modal\" [@fade]=\"'visible'\">\r\n <div class=\"tc-modal tc-modal-shadow\" [attr.style]=\"'max-width: ' + maxWidth + 'px;'\">\r\n <div class=\"area-top-actions\">\r\n <button type=\"button\" [class.no-use-header]=\"title\" (click)=\"toClose()\" [disabled]=\"loading\">\r\n <i *ngIf=\"!loading\" class=\"fas fa-times\"></i>\r\n <i *ngIf=\"loading\" class=\"fas fa-spinner fa-spin\"></i>\r\n </button>\r\n </div>\r\n\r\n <h4 *ngIf=\"title\" [innerHTML]=\"title\"></h4>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Ex: Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open\">\r\n\r\n <tcloud-ui-modal-header title=\"T\u00EDtulo do Modal\" ></tcloud-ui-modal-header>\r\n\r\n <tcloud-ui-modal-body>\r\n Conte\u00FAdo do modal aqui\r\n </tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open = !open\">open modal {{ open }}</button>\r\n-->\r\n\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n<!-- ****** -->\r\n\r\n<!-- Ex: Confirm Modal -->\r\n<!-- \r\n <tcloud-ui-modal [(open)]=\"open_confirm\" [title]=\"'Aten\u00E7\u00E3o'\" [confirmText]=\"'Aceito'\" [confirm]=\"true\" (toAction)=\"$event\" >\r\n\r\n <tcloud-ui-modal-body>Deseja realmente executar esta a\u00E7\u00E3o?</tcloud-ui-modal-body>\r\n\r\n <tcloud-ui-modal-footer></tcloud-ui-modal-footer>\r\n\r\n </tcloud-ui-modal>\r\n\r\n <button type=\"button\" (click)=\"open_confirm = !open_confirm\">open_confirm modal {{ open_confirm }}</button>\r\n-->", styles: [".tc-background-modal{border:1px solid #ccc;position:fixed;width:100%;left:0;top:0;background-color:#000;z-index:4005;height:100%;opacity:.3}.base-modal{height:100%;overflow:scroll;position:fixed;width:100%;z-index:4005;left:0;top:0}.sub-modal{padding:30px;position:absolute;width:100%}.tc-modal{position:relative;background-color:#fff;padding:12px;border-radius:8px;margin:auto;width:100%}.tc-modal-shadow{box-shadow:2px 2px 10px #0000005e}.area-top-actions{position:absolute;top:2px;right:5px;z-index:1}.area-top-actions button{cursor:pointer;background-color:transparent;border:none;font-size:15px;padding:5px 7px}.area-top-actions button i{font-size:17px;color:#fff;transition:all .25s;opacity:.7}.area-top-actions button i:hover{opacity:1!important}h4{font-size:16px;margin:5px 30px 10px 0;font-weight:700}.no-use-header i{color:#999!important}\n"] }]
|
|
688
693
|
}], ctorParameters: function () { return [{ type: TcloudModalService }]; }, propDecorators: { confirm: [{
|
|
689
694
|
type: Input
|
|
690
695
|
}], confirmText: [{
|
|
@@ -3289,7 +3294,7 @@ class TCloudUiFiltersComponent {
|
|
|
3289
3294
|
}
|
|
3290
3295
|
});
|
|
3291
3296
|
}
|
|
3292
|
-
console.log('onSubmit', this.filters);
|
|
3297
|
+
// console.log('onSubmit', this.filters);
|
|
3293
3298
|
this.onSubmit.emit(this.filters);
|
|
3294
3299
|
}
|
|
3295
3300
|
collectionFind(obj, path) {
|