ui-core-abv 0.3.82 → 0.3.95
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/fesm2022/ui-core-abv.mjs +1265 -1144
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/item-value/item-value.component.d.ts +22 -0
- package/lib/components/modal/side-modal/side-modal.component.d.ts +0 -1
- package/lib/components/modal/side-modal/sideModalConfig.model.d.ts +1 -0
- package/lib/components/short-table/short-table.component.d.ts +15 -0
- package/lib/components/table/table.component.d.ts +5 -8
- package/lib/components/table/table.models.d.ts +3 -14
- package/lib/components/uic-portlet-card/uic-portlet-card.component.d.ts +18 -7
- package/lib/helpers.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/lib/styles/_mixins.scss +2 -2
- package/src/lib/styles/_tokens.scss +4 -1
package/fesm2022/ui-core-abv.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule, CurrencyPipe, DatePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Input, Component, EventEmitter, Output, Directive, forwardRef, inject, ViewContainerRef, ElementRef, ViewChild, HostListener, ViewChildren, Injectable, InjectionToken, TemplateRef, ContentChild, createComponent, Pipe,
|
|
4
|
+
import { Input, Component, EventEmitter, Output, Directive, forwardRef, inject, ViewContainerRef, ElementRef, ViewChild, HostListener, ViewChildren, Injectable, InjectionToken, TemplateRef, ContentChild, createComponent, Pipe, Inject, Injector, EnvironmentInjector } from '@angular/core';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
7
7
|
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
@@ -31,11 +31,11 @@ class UicButtonComponent {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicButtonComponent, isStandalone: true, selector: "ui-button", inputs: { text: "text", icon: "icon", rightIcon: "rightIcon", iconOnly: "iconOnly", disabled: "disabled", loading: "loading", size: "size", type: "type", color: "color" }, ngImport: i0, template: "<button\r\n type=\"button\"\r\n [class]=\"'main-btn ' + buttonTypeClass\"\r\n [disabled]=\"disabled
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicButtonComponent, isStandalone: true, selector: "ui-button", inputs: { text: "text", icon: "icon", rightIcon: "rightIcon", iconOnly: "iconOnly", disabled: "disabled", loading: "loading", size: "size", type: "type", color: "color" }, ngImport: i0, template: "<button\r\n type=\"button\"\r\n [class]=\"'main-btn ' + buttonTypeClass\"\r\n [disabled]=\"disabled\"\r\n [ngClass]=\"{\r\n 'btn-tiny' :size=='t',\r\n 'btn-small' :size=='s', \r\n 'btn-medium' :size=='m',\r\n 'btn-large' :size=='l', \r\n 'btn-gigant' :size=='g'\r\n }\" >\r\n \r\n @if (icon!='' && !loading ) {\r\n <i class=\"{{icon}}\"></i>\r\n }\r\n @if (loading) {\r\n <div class=\"loader-container\"> <div class=\"loader\"></div> </div>\r\n }\r\n @if (!iconOnly) {\r\n <div class=\"btn-text\" [class.norighticon]=\"rightIcon==''\" [class.noicon]=\"icon==''\">\r\n {{text}}\r\n <ng-content ></ng-content>\r\n </div>\r\n }\r\n @if (rightIcon!='' ) {\r\n <i class=\"{{rightIcon}}\"></i>\r\n }\r\n</button>", styles: [":host{width:fit-content;display:block}.main-btn{display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border:none;text-align:center;border-radius:var(--button-radius);padding:0;white-space:nowrap;outline:none}.main-btn:focus,.main-btn:focus-visible{box-shadow:0 0 0 3px var(--secondary-alpha)}.noicon{padding-left:1rem}.norighticon{padding-right:1rem}.btn-text{font-weight:500}.btn-tiny{height:calc(2.3 * var(--form-ref));min-width:calc(2.3 * var(--form-ref))}.btn-tiny>.btn-text{font-size:.625rem;line-height:calc(2.3 * var(--form-ref))}.btn-tiny i{font-size:.875rem;line-height:calc(2.3 * var(--form-ref));width:calc(2.3 * var(--form-ref))}.btn-tiny .btn-loader{line-height:.625rem;width:.625rem}.btn-small{height:calc(3 * var(--form-ref));min-width:calc(3 * var(--form-ref))}.btn-small>.btn-text{font-size:.75rem;line-height:calc(3 * var(--form-ref))}.btn-small i{font-size:1rem;line-height:calc(3 * var(--form-ref));width:calc(3 * var(--form-ref))}.btn-small .btn-loader{line-height:.75rem;width:.75rem}.btn-medium{height:calc(4 * var(--form-ref));min-width:calc(4 * var(--form-ref))}.btn-medium>.btn-text{font-size:.875rem;line-height:calc(4 * var(--form-ref))}.btn-medium i{font-size:1.625rem;line-height:calc(4 * var(--form-ref));width:calc(4 * var(--form-ref))}.btn-medium .btn-loader{line-height:.875rem;width:.875rem}.btn-large{height:calc(4.6 * var(--form-ref));min-width:calc(4.6 * var(--form-ref))}.btn-large>.btn-text{font-size:1rem;line-height:calc(4.6 * var(--form-ref))}.btn-large i{font-size:1.625rem;line-height:calc(4.6 * var(--form-ref));width:calc(4.6 * var(--form-ref))}.btn-large .btn-loader{line-height:1rem;width:1rem}.btn-gigant{height:calc(5.4 * var(--form-ref));min-width:calc(5.4 * var(--form-ref))}.btn-gigant>.btn-text{font-size:1.125rem;line-height:calc(5.4 * var(--form-ref))}.btn-gigant i{font-size:1.625rem;line-height:calc(5.4 * var(--form-ref));width:calc(5.4 * var(--form-ref))}.btn-gigant .btn-loader{line-height:1.125rem;width:1.125rem}.btn-filled{color:var(--white);transition:background .3s ease;cursor:pointer}.btn-filled:disabled{cursor:not-allowed;color:var(--grey-300)}.btn-bordered{border:solid 1px var(--grey-200);background-color:transparent;transition:background .3s ease;cursor:pointer}.btn-bordered:disabled{cursor:not-allowed;color:var(--grey-300);border-color:var(--grey-300)}.btn-ghost{color:var(--grey-800);background-color:transparent;transition:background .3s ease;cursor:pointer}.btn-ghost:disabled{cursor:not-allowed;color:var(--grey-300)}.btn-primary-filled{background-color:var(--primary-400)}.btn-primary-filled:hover{background-color:var(--primary-600)}.btn-primary-filled:active{background-color:var(--primary-900)}.btn-primary-filled:disabled{background-color:var(--primary-100)}.btn-primary-bordered{border-color:var(--primary-400);color:var(--primary-400)}.btn-primary-bordered:hover{background-color:var(--primary-100)}.btn-primary-bordered:active{background-color:var(--primary-300)}.btn-primary-bordered:disabled{background-color:var(--primary-100)}.btn-primary-ghost:hover{background-color:var(--primary-100)}.btn-primary-ghost:active{background-color:var(--primary-300)}.btn-primary-ghost:disabled{background-color:transparent}.btn-black-filled{background-color:var(--grey-950)}.btn-black-filled:hover{background-color:var(--secondary-500)}.btn-black-filled:active{background-color:var(--secondary-800)}.btn-black-filled:disabled{background-color:var(--grey-100)}.btn-black-bordered{color:var(--grey-700)}.btn-black-bordered:hover{background-color:var(--secondary-100)}.btn-black-bordered:active{background-color:var(--secondary-300)}.btn-black-bordered:disabled{background-color:var(--grey-50)}.btn-black-ghost:hover{background-color:var(--secondary-100)}.btn-black-ghost:active{background-color:var(--secondary-300)}.btn-black-ghost:disabled{background-color:transparent}.btn-green-filled{background-color:var(--green-400)}.btn-green-filled:hover{background-color:var(--green-600)}.btn-green-filled:active{background-color:var(--green-900)}.btn-green-filled:disabled{background-color:var(--green-100)}.btn-green-bordered{border-color:var(--green-400);color:var(--green-400)}.btn-green-bordered:hover{background-color:var(--green-100)}.btn-green-bordered:active{background-color:var(--green-300)}.btn-green-bordered:disabled{background-color:var(--green-100)}.btn-green-ghost:hover{background-color:var(--green-100)}.btn-green-ghost:active{background-color:var(--green-300)}.btn-green-ghost:disabled{background-color:transparent}.btn-yellow-filled{background-color:var(--yellow-400)}.btn-yellow-filled:hover{background-color:var(--yellow-600)}.btn-yellow-filled:active{background-color:var(--yellow-900)}.btn-yellow-filled:disabled{background-color:var(--yellow-100)}.btn-yellow-bordered{border-color:var(--yellow-400);color:var(--yellow-400)}.btn-yellow-bordered:hover{background-color:var(--yellow-100)}.btn-yellow-bordered:active{background-color:var(--yellow-300)}.btn-yellow-bordered:disabled{background-color:var(--yellow-100)}.btn-yellow-ghost:hover{background-color:var(--yellow-100)}.btn-yellow-ghost:active{background-color:var(--yellow-300)}.btn-yellow-ghost:disabled{background-color:transparent}.btn-blue-filled{background-color:var(--blue-500)}.btn-blue-filled:hover{background-color:var(--blue-600)}.btn-blue-filled:active{background-color:var(--blue-900)}.btn-blue-filled:disabled{background-color:var(--blue-100)}.btn-blue-bordered{border-color:var(--blue-500);color:var(--blue-500)}.btn-blue-bordered:hover{background-color:var(--blue-100)}.btn-blue-bordered:active{background-color:var(--blue-300)}.btn-blue-bordered:disabled{background-color:var(--blue-100)}.btn-blue-ghost:hover{background-color:var(--blue-100)}.btn-blue-ghost:active{background-color:var(--blue-300)}.btn-blue-ghost:disabled{background-color:transparent}.btn-red-filled{background-color:var(--red-400)}.btn-red-filled:hover{background-color:var(--red-600)}.btn-red-filled:active{background-color:var(--red-900)}.btn-red-filled:disabled{background-color:var(--red-100)}.btn-red-bordered{border-color:var(--primary-500);color:var(--red-500)}.btn-red-bordered:hover{background-color:var(--red-100)}.btn-red-bordered:active{background-color:var(--red-300)}.btn-red-bordered:disabled{background-color:var(--red-100)}.btn-red-ghost:hover{background-color:var(--red-100)}.btn-red-ghost:active{background-color:var(--red-300)}.btn-red-ghost:disabled{background-color:transparent}.btn-grey-filled{background-color:var(--grey-400)}.btn-grey-filled:hover{background-color:var(--grey-600)}.btn-grey-filled:active{background-color:var(--grey-900)}.btn-grey-filled:disabled{background-color:var(--grey-100)}.btn-grey-bordered{border-color:var(--grey-500);color:var(--grey-500)}.btn-grey-bordered:hover{background-color:var(--grey-100)}.btn-grey-bordered:active{background-color:var(--grey-300)}.btn-grey-bordered:disabled{background-color:var(--grey-100)}.btn-loader{width:14px;aspect-ratio:1;border-radius:50%;animation:l5 1s infinite linear alternate;margin:2px}.btn-loader-container{line-height:14px;margin:3px 0;display:flex;justify-content:center;width:65px}@keyframes l5{0%{box-shadow:20px 0 var(--primary-200),-20px 0 var(--primary-600);background:var(--primary-200)}33%{box-shadow:20px 0 var(--primary-200),-20px 0 var(--primary-600);background:var(--primary-600)}66%{box-shadow:20px 0 var(--primary-600),-20px 0 var(--primary-200);background:var(--primary-600)}to{box-shadow:20px 0 var(--primary-600),-20px 0 var(--primary-200);background:var(--primary-200)}}.btn-loader:before,.btn-loader:after{content:\"\";grid-area:1/1;margin:15%;border-radius:50%;background:inherit;transform:rotate(0) translate(150%);animation:l22 1s infinite}.btn-loader:after{animation-delay:-.5s}@keyframes l22-0{to{transform:rotate(1turn)}}@keyframes l22{to{transform:rotate(1turn) translate(150%)}}.loader{width:20px;aspect-ratio:1;border-radius:50%;border:4px solid rgba(255,255,255,.913);border-right-color:#ffffff5b;animation:l2 1s infinite linear}.loader-container{padding-left:10px}@keyframes l2{to{transform:rotate(1turn)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
35
35
|
}
|
|
36
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicButtonComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
|
-
args: [{ selector: 'ui-button', imports: [CommonModule], template: "<button\r\n type=\"button\"\r\n [class]=\"'main-btn ' + buttonTypeClass\"\r\n [disabled]=\"disabled
|
|
38
|
+
args: [{ selector: 'ui-button', imports: [CommonModule], template: "<button\r\n type=\"button\"\r\n [class]=\"'main-btn ' + buttonTypeClass\"\r\n [disabled]=\"disabled\"\r\n [ngClass]=\"{\r\n 'btn-tiny' :size=='t',\r\n 'btn-small' :size=='s', \r\n 'btn-medium' :size=='m',\r\n 'btn-large' :size=='l', \r\n 'btn-gigant' :size=='g'\r\n }\" >\r\n \r\n @if (icon!='' && !loading ) {\r\n <i class=\"{{icon}}\"></i>\r\n }\r\n @if (loading) {\r\n <div class=\"loader-container\"> <div class=\"loader\"></div> </div>\r\n }\r\n @if (!iconOnly) {\r\n <div class=\"btn-text\" [class.norighticon]=\"rightIcon==''\" [class.noicon]=\"icon==''\">\r\n {{text}}\r\n <ng-content ></ng-content>\r\n </div>\r\n }\r\n @if (rightIcon!='' ) {\r\n <i class=\"{{rightIcon}}\"></i>\r\n }\r\n</button>", styles: [":host{width:fit-content;display:block}.main-btn{display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;border:none;text-align:center;border-radius:var(--button-radius);padding:0;white-space:nowrap;outline:none}.main-btn:focus,.main-btn:focus-visible{box-shadow:0 0 0 3px var(--secondary-alpha)}.noicon{padding-left:1rem}.norighticon{padding-right:1rem}.btn-text{font-weight:500}.btn-tiny{height:calc(2.3 * var(--form-ref));min-width:calc(2.3 * var(--form-ref))}.btn-tiny>.btn-text{font-size:.625rem;line-height:calc(2.3 * var(--form-ref))}.btn-tiny i{font-size:.875rem;line-height:calc(2.3 * var(--form-ref));width:calc(2.3 * var(--form-ref))}.btn-tiny .btn-loader{line-height:.625rem;width:.625rem}.btn-small{height:calc(3 * var(--form-ref));min-width:calc(3 * var(--form-ref))}.btn-small>.btn-text{font-size:.75rem;line-height:calc(3 * var(--form-ref))}.btn-small i{font-size:1rem;line-height:calc(3 * var(--form-ref));width:calc(3 * var(--form-ref))}.btn-small .btn-loader{line-height:.75rem;width:.75rem}.btn-medium{height:calc(4 * var(--form-ref));min-width:calc(4 * var(--form-ref))}.btn-medium>.btn-text{font-size:.875rem;line-height:calc(4 * var(--form-ref))}.btn-medium i{font-size:1.625rem;line-height:calc(4 * var(--form-ref));width:calc(4 * var(--form-ref))}.btn-medium .btn-loader{line-height:.875rem;width:.875rem}.btn-large{height:calc(4.6 * var(--form-ref));min-width:calc(4.6 * var(--form-ref))}.btn-large>.btn-text{font-size:1rem;line-height:calc(4.6 * var(--form-ref))}.btn-large i{font-size:1.625rem;line-height:calc(4.6 * var(--form-ref));width:calc(4.6 * var(--form-ref))}.btn-large .btn-loader{line-height:1rem;width:1rem}.btn-gigant{height:calc(5.4 * var(--form-ref));min-width:calc(5.4 * var(--form-ref))}.btn-gigant>.btn-text{font-size:1.125rem;line-height:calc(5.4 * var(--form-ref))}.btn-gigant i{font-size:1.625rem;line-height:calc(5.4 * var(--form-ref));width:calc(5.4 * var(--form-ref))}.btn-gigant .btn-loader{line-height:1.125rem;width:1.125rem}.btn-filled{color:var(--white);transition:background .3s ease;cursor:pointer}.btn-filled:disabled{cursor:not-allowed;color:var(--grey-300)}.btn-bordered{border:solid 1px var(--grey-200);background-color:transparent;transition:background .3s ease;cursor:pointer}.btn-bordered:disabled{cursor:not-allowed;color:var(--grey-300);border-color:var(--grey-300)}.btn-ghost{color:var(--grey-800);background-color:transparent;transition:background .3s ease;cursor:pointer}.btn-ghost:disabled{cursor:not-allowed;color:var(--grey-300)}.btn-primary-filled{background-color:var(--primary-400)}.btn-primary-filled:hover{background-color:var(--primary-600)}.btn-primary-filled:active{background-color:var(--primary-900)}.btn-primary-filled:disabled{background-color:var(--primary-100)}.btn-primary-bordered{border-color:var(--primary-400);color:var(--primary-400)}.btn-primary-bordered:hover{background-color:var(--primary-100)}.btn-primary-bordered:active{background-color:var(--primary-300)}.btn-primary-bordered:disabled{background-color:var(--primary-100)}.btn-primary-ghost:hover{background-color:var(--primary-100)}.btn-primary-ghost:active{background-color:var(--primary-300)}.btn-primary-ghost:disabled{background-color:transparent}.btn-black-filled{background-color:var(--grey-950)}.btn-black-filled:hover{background-color:var(--secondary-500)}.btn-black-filled:active{background-color:var(--secondary-800)}.btn-black-filled:disabled{background-color:var(--grey-100)}.btn-black-bordered{color:var(--grey-700)}.btn-black-bordered:hover{background-color:var(--secondary-100)}.btn-black-bordered:active{background-color:var(--secondary-300)}.btn-black-bordered:disabled{background-color:var(--grey-50)}.btn-black-ghost:hover{background-color:var(--secondary-100)}.btn-black-ghost:active{background-color:var(--secondary-300)}.btn-black-ghost:disabled{background-color:transparent}.btn-green-filled{background-color:var(--green-400)}.btn-green-filled:hover{background-color:var(--green-600)}.btn-green-filled:active{background-color:var(--green-900)}.btn-green-filled:disabled{background-color:var(--green-100)}.btn-green-bordered{border-color:var(--green-400);color:var(--green-400)}.btn-green-bordered:hover{background-color:var(--green-100)}.btn-green-bordered:active{background-color:var(--green-300)}.btn-green-bordered:disabled{background-color:var(--green-100)}.btn-green-ghost:hover{background-color:var(--green-100)}.btn-green-ghost:active{background-color:var(--green-300)}.btn-green-ghost:disabled{background-color:transparent}.btn-yellow-filled{background-color:var(--yellow-400)}.btn-yellow-filled:hover{background-color:var(--yellow-600)}.btn-yellow-filled:active{background-color:var(--yellow-900)}.btn-yellow-filled:disabled{background-color:var(--yellow-100)}.btn-yellow-bordered{border-color:var(--yellow-400);color:var(--yellow-400)}.btn-yellow-bordered:hover{background-color:var(--yellow-100)}.btn-yellow-bordered:active{background-color:var(--yellow-300)}.btn-yellow-bordered:disabled{background-color:var(--yellow-100)}.btn-yellow-ghost:hover{background-color:var(--yellow-100)}.btn-yellow-ghost:active{background-color:var(--yellow-300)}.btn-yellow-ghost:disabled{background-color:transparent}.btn-blue-filled{background-color:var(--blue-500)}.btn-blue-filled:hover{background-color:var(--blue-600)}.btn-blue-filled:active{background-color:var(--blue-900)}.btn-blue-filled:disabled{background-color:var(--blue-100)}.btn-blue-bordered{border-color:var(--blue-500);color:var(--blue-500)}.btn-blue-bordered:hover{background-color:var(--blue-100)}.btn-blue-bordered:active{background-color:var(--blue-300)}.btn-blue-bordered:disabled{background-color:var(--blue-100)}.btn-blue-ghost:hover{background-color:var(--blue-100)}.btn-blue-ghost:active{background-color:var(--blue-300)}.btn-blue-ghost:disabled{background-color:transparent}.btn-red-filled{background-color:var(--red-400)}.btn-red-filled:hover{background-color:var(--red-600)}.btn-red-filled:active{background-color:var(--red-900)}.btn-red-filled:disabled{background-color:var(--red-100)}.btn-red-bordered{border-color:var(--primary-500);color:var(--red-500)}.btn-red-bordered:hover{background-color:var(--red-100)}.btn-red-bordered:active{background-color:var(--red-300)}.btn-red-bordered:disabled{background-color:var(--red-100)}.btn-red-ghost:hover{background-color:var(--red-100)}.btn-red-ghost:active{background-color:var(--red-300)}.btn-red-ghost:disabled{background-color:transparent}.btn-grey-filled{background-color:var(--grey-400)}.btn-grey-filled:hover{background-color:var(--grey-600)}.btn-grey-filled:active{background-color:var(--grey-900)}.btn-grey-filled:disabled{background-color:var(--grey-100)}.btn-grey-bordered{border-color:var(--grey-500);color:var(--grey-500)}.btn-grey-bordered:hover{background-color:var(--grey-100)}.btn-grey-bordered:active{background-color:var(--grey-300)}.btn-grey-bordered:disabled{background-color:var(--grey-100)}.btn-loader{width:14px;aspect-ratio:1;border-radius:50%;animation:l5 1s infinite linear alternate;margin:2px}.btn-loader-container{line-height:14px;margin:3px 0;display:flex;justify-content:center;width:65px}@keyframes l5{0%{box-shadow:20px 0 var(--primary-200),-20px 0 var(--primary-600);background:var(--primary-200)}33%{box-shadow:20px 0 var(--primary-200),-20px 0 var(--primary-600);background:var(--primary-600)}66%{box-shadow:20px 0 var(--primary-600),-20px 0 var(--primary-200);background:var(--primary-600)}to{box-shadow:20px 0 var(--primary-600),-20px 0 var(--primary-200);background:var(--primary-200)}}.btn-loader:before,.btn-loader:after{content:\"\";grid-area:1/1;margin:15%;border-radius:50%;background:inherit;transform:rotate(0) translate(150%);animation:l22 1s infinite}.btn-loader:after{animation-delay:-.5s}@keyframes l22-0{to{transform:rotate(1turn)}}@keyframes l22{to{transform:rotate(1turn) translate(150%)}}.loader{width:20px;aspect-ratio:1;border-radius:50%;border:4px solid rgba(255,255,255,.913);border-right-color:#ffffff5b;animation:l2 1s infinite linear}.loader-container{padding-left:10px}@keyframes l2{to{transform:rotate(1turn)}}\n"] }]
|
|
39
39
|
}], propDecorators: { text: [{
|
|
40
40
|
type: Input
|
|
41
41
|
}], icon: [{
|
|
@@ -424,7 +424,7 @@ class UicRadioComponent extends base$9 {
|
|
|
424
424
|
useExisting: forwardRef(() => UicRadioComponent),
|
|
425
425
|
multi: true,
|
|
426
426
|
},
|
|
427
|
-
], usesInheritance: true, ngImport: i0, template: "<ui-input-wrapper\
|
|
427
|
+
], usesInheritance: true, ngImport: i0, template: "<ui-input-wrapper\n [icon]=\"icon\"\n [iconColor]=\"iconColor\"\n [label]=\"label\"\n [tip]=\"tip\"\n [error]=\"error\"\n [disabled]=\"disabled\"\n>\n <div\n class=\"radio-group\"\n role=\"radiogroup\"\n [class.loading-input]=\"loading\"\n [class.disabled]=\"disabled || loading\"\n [class.direction-row]=\"direction === 'row'\"\n [attr.aria-disabled]=\"disabled || loading ? true : null\"\n >\n @if (options.length) {\n @for (option of options; track option.id) {\n <button\n type=\"button\"\n class=\"radio-option\"\n [disabled]=\"disabled || loading\"\n [class.selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"isSelected(option)\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n (keydown.space)=\"selectOption(option)\"\n >\n <span class=\"radio-control\" aria-hidden=\"true\">\n <span class=\"radio-dot\"></span>\n </span>\n <span class=\"radio-texts\">\n <span class=\"radio-label\">{{ option.text }}</span>\n @if (option.detail) {\n <span class=\"radio-detail\">{{ option.detail }}</span>\n }\n </span>\n </button>\n }\n } @else {\n <div class=\"radio-empty\">{{ emptyText }}</div>\n }\n </div>\n</ui-input-wrapper>\n", styles: [".radio-group{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0;width:100%}.radio-group.direction-row{flex-direction:row;flex-wrap:wrap}.radio-group.disabled .radio-option{cursor:not-allowed;opacity:.7}.radio-option{display:inline-flex;align-items:center;gap:.5rem;padding:.25rem .5rem;width:100%;border:none;border-radius:6px;background:transparent;cursor:pointer;text-align:left;transition:background-color .2s ease,color .2s ease}.radio-option:focus-visible{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha)}.radio-option:hover:not(:disabled){background-color:var(--grey-50)}.radio-option:disabled{cursor:not-allowed;opacity:.7}.direction-row .radio-option{flex:1 1 calc(50% - .5rem)}.radio-control{width:calc(var(--design-size-ref) * 2.2);height:calc(var(--design-size-ref) * 2.2);border-radius:50%;border:2px solid var(--primary-400);display:flex;align-items:center;justify-content:center;transition:border-color .2s ease,background-color .2s ease}.radio-dot{width:calc(var(--design-size-ref) * 2.2 / 2.2);height:calc(var(--design-size-ref) * 2.2 / 2.2);border-radius:50%;background-color:transparent;transform:scale(0);transition:transform .2s ease,background-color .2s ease}.radio-option.selected{color:var(--grey-900)}.radio-option.selected .radio-control{border-color:var(--primary-500)}.radio-option.selected .radio-dot{background-color:var(--primary-500);transform:scale(1)}.radio-texts{display:flex;flex-direction:column;gap:2px}.radio-label{font-size:.875rem;color:var(--grey-950)}.radio-detail{font-size:.75rem;color:var(--grey-500)}.radio-empty{width:100%;padding:.5rem;text-align:center;border:1px dashed var(--grey-200);border-radius:6px;color:var(--disabled-color);font-size:.875rem}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.input-options{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;font-size:.875rem;z-index:500;overflow:hidden}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.input-option{display:flex;align-items:center;padding:6px 12px;line-height:1rem;-webkit-user-select:none;user-select:none;transition:ease .3s;border-radius:.25rem}.input-option-focused{background-color:var(--primary-500)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-scroll{padding:.25rem;max-height:180px;overflow:auto}.input-option-scroll-line{border-bottom:solid 1px var(--grey-200);width:100%;margin-top:2px}.input-option-scroll-focused{background-color:var(--primary-300)}.input-option-scroll-btns{border-top:solid 1px var(--grey-200);padding-top:5px;display:flex;justify-content:space-around}.input-option-scroll-btns button{background-color:var(--white);border:solid 1px var(--grey-200);padding:4px 10px;border-radius:10px}.input-option-scroll app-checkbox{width:100%}.input-wrapper{display:flex;align-items:center;width:100%;max-width:100%}.input-externalicon{margin-right:.5rem;font-size:1.625rem;height:1.625rem;width:1.625rem}.input-elements{flex-grow:1;display:flex;flex-direction:column;width:100%}.input-internalicon{color:var(--grey-700);margin-right:calc(var(--form-ref) * .6);font-size:calc(2.5 * var(--form-ref))}.label{font-size:max(var(--form-ref) + 4px,14px);line-height:1.125rem;font-weight:400;color:var(--grey-950);margin-bottom:var(--input-label-space)}.disabled-placeholder{color:var(--disabled-color-placeholder)}.fakeinput{min-height:calc(4 * var(--form-ref));border-radius:var(--input-radius);overflow:hidden;border:solid 1px var(--grey-200);display:flex;align-items:center;font-size:.875rem;-webkit-user-select:none;user-select:none;background-color:var(--white);transition:ease .3s;padding:0 var(--form-ref)}.fakeinput-wrapp{position:relative}.fakeinput-emptytext{margin:0 5px;flex:1 1;overflow:hidden;font-size:max(var(--form-ref) + 4px,14px);white-space:nowrap}.fakeinput-emptytext i{font-size:20px}.fakeinput ::ng-deep textarea{padding:10px 0}.fakeinput ::ng-deep input{height:calc(4 * var(--form-ref));padding:0}.fakeinput ::ng-deep input,.fakeinput ::ng-deep textarea{font-size:max(var(--form-ref) + 4px,14px);flex-grow:1;outline:none;width:100%;background-color:transparent;border:none!important}.fakeinput ::ng-deep input:disabled,.fakeinput ::ng-deep textarea:disabled{color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled~.fakeinput,.fakeinput ::ng-deep textarea:disabled~.fakeinput{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled::placeholder,.fakeinput ::ng-deep textarea:disabled::placeholder{color:var(--disabled-color-placeholder)}.fakeinput-button{margin:0;border:none;display:flex;justify-content:center;align-items:center;padding:4px 5px 5px;transition:ease .3s;background-color:var(--grey-200)}.fakeinput-button:disabled{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput-button:enabled:hover{cursor:pointer;background-color:var(--primary-300);color:var(--white)}.fakeinput-button:enabled:active{background-color:var(--primary-700)}.fakeinput app-checkbox{width:100%}.fakeinput-alert{font-size:13px;line-height:15px;padding:1px 4px}.fakeinput button{color:var(--grey-200)}.fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}.fakeinput:hover{border-color:var(--grey-400);cursor:text}.activeselect{border-color:var(--primary-600)}.errorinput{border-color:var(--red-500)!important}.t-disabled{color:var(--disabled-color);padding:5px;text-align:center}.disabledinput{background-color:var(--disabled-background);color:var(--disabled-color)}.disabledinput ::ng-deep input{color:var(--disabled-color)}.inputlabel{display:flex;align-items:center}.f-primary{color:var(--primary-500)}.f-secondary{color:var(--secondary-500)}.f-red{color:var(--red-500)}.f-yellow{color:var(--yellow-500)}.f-blue{color:var(--blue-500)}.f-green{color:var(--green-500)}.f-black{color:var(--grey-900)}.tip{color:var(--grey-500)}.item-disabled{color:var(--grey-400)}.item-disabled:hover{background-color:var(--white);cursor:not-allowed}.loading-input{background:linear-gradient(-45deg,#f2f2f2 40%,#dee1e2,#f2f2f2 60%);background-size:300%;background-position-x:100%;animation:shimmer 1s infinite linear}@keyframes shimmer{to{background-position-x:0%}}.char-counter{width:100%;display:flex;justify-content:flex-end;font-size:10px;color:var(--grey-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InputWrapperComponent, selector: "ui-input-wrapper", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled"] }] });
|
|
428
428
|
}
|
|
429
429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicRadioComponent, decorators: [{
|
|
430
430
|
type: Component,
|
|
@@ -434,7 +434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
434
434
|
useExisting: forwardRef(() => UicRadioComponent),
|
|
435
435
|
multi: true,
|
|
436
436
|
},
|
|
437
|
-
], template: "<ui-input-wrapper\
|
|
437
|
+
], template: "<ui-input-wrapper\n [icon]=\"icon\"\n [iconColor]=\"iconColor\"\n [label]=\"label\"\n [tip]=\"tip\"\n [error]=\"error\"\n [disabled]=\"disabled\"\n>\n <div\n class=\"radio-group\"\n role=\"radiogroup\"\n [class.loading-input]=\"loading\"\n [class.disabled]=\"disabled || loading\"\n [class.direction-row]=\"direction === 'row'\"\n [attr.aria-disabled]=\"disabled || loading ? true : null\"\n >\n @if (options.length) {\n @for (option of options; track option.id) {\n <button\n type=\"button\"\n class=\"radio-option\"\n [disabled]=\"disabled || loading\"\n [class.selected]=\"isSelected(option)\"\n [attr.aria-checked]=\"isSelected(option)\"\n (click)=\"selectOption(option)\"\n (keydown.enter)=\"selectOption(option)\"\n (keydown.space)=\"selectOption(option)\"\n >\n <span class=\"radio-control\" aria-hidden=\"true\">\n <span class=\"radio-dot\"></span>\n </span>\n <span class=\"radio-texts\">\n <span class=\"radio-label\">{{ option.text }}</span>\n @if (option.detail) {\n <span class=\"radio-detail\">{{ option.detail }}</span>\n }\n </span>\n </button>\n }\n } @else {\n <div class=\"radio-empty\">{{ emptyText }}</div>\n }\n </div>\n</ui-input-wrapper>\n", styles: [".radio-group{display:flex;flex-direction:column;gap:.25rem;padding:.25rem 0;width:100%}.radio-group.direction-row{flex-direction:row;flex-wrap:wrap}.radio-group.disabled .radio-option{cursor:not-allowed;opacity:.7}.radio-option{display:inline-flex;align-items:center;gap:.5rem;padding:.25rem .5rem;width:100%;border:none;border-radius:6px;background:transparent;cursor:pointer;text-align:left;transition:background-color .2s ease,color .2s ease}.radio-option:focus-visible{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha)}.radio-option:hover:not(:disabled){background-color:var(--grey-50)}.radio-option:disabled{cursor:not-allowed;opacity:.7}.direction-row .radio-option{flex:1 1 calc(50% - .5rem)}.radio-control{width:calc(var(--design-size-ref) * 2.2);height:calc(var(--design-size-ref) * 2.2);border-radius:50%;border:2px solid var(--primary-400);display:flex;align-items:center;justify-content:center;transition:border-color .2s ease,background-color .2s ease}.radio-dot{width:calc(var(--design-size-ref) * 2.2 / 2.2);height:calc(var(--design-size-ref) * 2.2 / 2.2);border-radius:50%;background-color:transparent;transform:scale(0);transition:transform .2s ease,background-color .2s ease}.radio-option.selected{color:var(--grey-900)}.radio-option.selected .radio-control{border-color:var(--primary-500)}.radio-option.selected .radio-dot{background-color:var(--primary-500);transform:scale(1)}.radio-texts{display:flex;flex-direction:column;gap:2px}.radio-label{font-size:.875rem;color:var(--grey-950)}.radio-detail{font-size:.75rem;color:var(--grey-500)}.radio-empty{width:100%;padding:.5rem;text-align:center;border:1px dashed var(--grey-200);border-radius:6px;color:var(--disabled-color);font-size:.875rem}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.input-options{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;font-size:.875rem;z-index:500;overflow:hidden}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.input-option{display:flex;align-items:center;padding:6px 12px;line-height:1rem;-webkit-user-select:none;user-select:none;transition:ease .3s;border-radius:.25rem}.input-option-focused{background-color:var(--primary-500)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-scroll{padding:.25rem;max-height:180px;overflow:auto}.input-option-scroll-line{border-bottom:solid 1px var(--grey-200);width:100%;margin-top:2px}.input-option-scroll-focused{background-color:var(--primary-300)}.input-option-scroll-btns{border-top:solid 1px var(--grey-200);padding-top:5px;display:flex;justify-content:space-around}.input-option-scroll-btns button{background-color:var(--white);border:solid 1px var(--grey-200);padding:4px 10px;border-radius:10px}.input-option-scroll app-checkbox{width:100%}.input-wrapper{display:flex;align-items:center;width:100%;max-width:100%}.input-externalicon{margin-right:.5rem;font-size:1.625rem;height:1.625rem;width:1.625rem}.input-elements{flex-grow:1;display:flex;flex-direction:column;width:100%}.input-internalicon{color:var(--grey-700);margin-right:calc(var(--form-ref) * .6);font-size:calc(2.5 * var(--form-ref))}.label{font-size:max(var(--form-ref) + 4px,14px);line-height:1.125rem;font-weight:400;color:var(--grey-950);margin-bottom:var(--input-label-space)}.disabled-placeholder{color:var(--disabled-color-placeholder)}.fakeinput{min-height:calc(4 * var(--form-ref));border-radius:var(--input-radius);overflow:hidden;border:solid 1px var(--grey-200);display:flex;align-items:center;font-size:.875rem;-webkit-user-select:none;user-select:none;background-color:var(--white);transition:ease .3s;padding:0 var(--form-ref)}.fakeinput-wrapp{position:relative}.fakeinput-emptytext{margin:0 5px;flex:1 1;overflow:hidden;font-size:max(var(--form-ref) + 4px,14px);white-space:nowrap}.fakeinput-emptytext i{font-size:20px}.fakeinput ::ng-deep textarea{padding:10px 0}.fakeinput ::ng-deep input{height:calc(4 * var(--form-ref));padding:0}.fakeinput ::ng-deep input,.fakeinput ::ng-deep textarea{font-size:max(var(--form-ref) + 4px,14px);flex-grow:1;outline:none;width:100%;background-color:transparent;border:none!important}.fakeinput ::ng-deep input:disabled,.fakeinput ::ng-deep textarea:disabled{color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled~.fakeinput,.fakeinput ::ng-deep textarea:disabled~.fakeinput{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled::placeholder,.fakeinput ::ng-deep textarea:disabled::placeholder{color:var(--disabled-color-placeholder)}.fakeinput-button{margin:0;border:none;display:flex;justify-content:center;align-items:center;padding:4px 5px 5px;transition:ease .3s;background-color:var(--grey-200)}.fakeinput-button:disabled{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput-button:enabled:hover{cursor:pointer;background-color:var(--primary-300);color:var(--white)}.fakeinput-button:enabled:active{background-color:var(--primary-700)}.fakeinput app-checkbox{width:100%}.fakeinput-alert{font-size:13px;line-height:15px;padding:1px 4px}.fakeinput button{color:var(--grey-200)}.fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}.fakeinput:hover{border-color:var(--grey-400);cursor:text}.activeselect{border-color:var(--primary-600)}.errorinput{border-color:var(--red-500)!important}.t-disabled{color:var(--disabled-color);padding:5px;text-align:center}.disabledinput{background-color:var(--disabled-background);color:var(--disabled-color)}.disabledinput ::ng-deep input{color:var(--disabled-color)}.inputlabel{display:flex;align-items:center}.f-primary{color:var(--primary-500)}.f-secondary{color:var(--secondary-500)}.f-red{color:var(--red-500)}.f-yellow{color:var(--yellow-500)}.f-blue{color:var(--blue-500)}.f-green{color:var(--green-500)}.f-black{color:var(--grey-900)}.tip{color:var(--grey-500)}.item-disabled{color:var(--grey-400)}.item-disabled:hover{background-color:var(--white);cursor:not-allowed}.loading-input{background:linear-gradient(-45deg,#f2f2f2 40%,#dee1e2,#f2f2f2 60%);background-size:300%;background-position-x:100%;animation:shimmer 1s infinite linear}@keyframes shimmer{to{background-position-x:0%}}.char-counter{width:100%;display:flex;justify-content:flex-end;font-size:10px;color:var(--grey-400)}\n"] }]
|
|
438
438
|
}], propDecorators: { icon: [{
|
|
439
439
|
type: Input
|
|
440
440
|
}], iconColor: [{
|
|
@@ -1111,7 +1111,7 @@ class UicPoolOptionsComponent extends base$6 {
|
|
|
1111
1111
|
useExisting: forwardRef(() => UicPoolOptionsComponent),
|
|
1112
1112
|
multi: true
|
|
1113
1113
|
}
|
|
1114
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"input-wrapper \">\
|
|
1114
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"input-wrapper \">\n @if (icon) {\n <i class=\"input-externalicon f-{{iconColor}} {{icon}}\"></i>\n }\n <div class=\"input-elements\" [style]=\"icon?'max-width: calc(100% - 34px);':''\">\n @if (label) {\n <div class=\"label inputlabel\" [class.font-error]=\"error\">{{label}} </div>\n }\n <div>\n <div class=\"pool-wrapper\" > \n @for (opt of options; track opt.id) {\n <div (click)=\"updateOptions(opt.id??'')\" class=\"pool-option\" [class.disabled-opt]=\"disabled\" [class.active-opt]=\"isSelected(opt.id??'')\">{{opt.text}}</div>\n }\n \n </div>\n <!-- BLOQUE DE LISTTA DETALLADA -->\n @if(enabledListView && selectedValues.length > 0){\n <h2 class=\"pool-selected-title\">{{listViewTitle}}</h2>\n <div>\n @for (item of selectedValues; track item.id) {\n <div class=\"pool-selected\"> \n <div class=\"pool-selected-label\">{{getItemName(item.id)}} </div>\n <div class=\"pool-selected-input\">\n <ui-input [disabled]=\"disabled\">\n <input [disabled]=\"disabled\" placeholder=\"Detalle\" type=\"text\" [value]=\"item.detail ?? ''\" (input)=\"updateDetail(item.id, $any($event.target).value)\">\n </ui-input>\n @if (!disabled) {\n <div class=\"pool-selected-button\" (click)=\"updateOptions(item.id)\" >\n <i class=\"ri-delete-bin-5-line\" ></i>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n <!-- ALERTS -->\n @if (error) {\n <div class=\"fakeinput-alert f-red\">{{error}}</div>\n }\n @if (tip) {\n <div class=\"fakeinput-alert tip\">{{tip}}</div>\n }\n </div>\n</div>\n", styles: [".pool-wrapper{display:flex;gap:var(--design-size-ref);flex-wrap:wrap}.pool-option{border:solid 1px var(--grey-300);color:var(--secondary-400);background-color:var(--secondary-50);font-size:.875rem;line-height:1.25rem;font-weight:400;padding:.5rem 1rem;border-radius:1rem;transition:ease .3s;-webkit-user-select:none;user-select:none;cursor:pointer}.pool-option:hover{border-color:var(--secondary-400)}.pool-selected-title{font-size:1.625rem;font-weight:600;line-height:calc(1.625rem + 4px);margin:1.5rem 0;color:var(--grey-950)}.pool-selected-label{margin-top:24px;font-size:.875rem;margin-bottom:.5rem}.pool-selected-input{display:flex;align-items:center;gap:16px}.pool-selected-button{height:calc(4 * var(--form-ref));aspect-ratio:1;border-radius:var(--button-radius);border:solid 1px var(--grey-300);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.25rem;transition:ease .3s}.pool-selected-button:hover{border-color:var(--red-400);color:var(--red-600)}.disabled-opt{background-color:var(--grey-200);border:none;cursor:not-allowed}.active-opt{background-color:var(--secondary-100);border:solid 1px var(--primary-400)}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.input-options{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;font-size:.875rem;z-index:500;overflow:hidden}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.input-option{display:flex;align-items:center;padding:6px 12px;line-height:1rem;-webkit-user-select:none;user-select:none;transition:ease .3s;border-radius:.25rem}.input-option-focused{background-color:var(--primary-500)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-scroll{padding:.25rem;max-height:180px;overflow:auto}.input-option-scroll-line{border-bottom:solid 1px var(--grey-200);width:100%;margin-top:2px}.input-option-scroll-focused{background-color:var(--primary-300)}.input-option-scroll-btns{border-top:solid 1px var(--grey-200);padding-top:5px;display:flex;justify-content:space-around}.input-option-scroll-btns button{background-color:var(--white);border:solid 1px var(--grey-200);padding:4px 10px;border-radius:10px}.input-option-scroll app-checkbox{width:100%}.input-wrapper{display:flex;align-items:center;width:100%;max-width:100%}.input-externalicon{margin-right:.5rem;font-size:1.625rem;height:1.625rem;width:1.625rem}.input-elements{flex-grow:1;display:flex;flex-direction:column;width:100%}.input-internalicon{color:var(--grey-700);margin-right:calc(var(--form-ref) * .6);font-size:calc(2.5 * var(--form-ref))}.label{font-size:max(var(--form-ref) + 4px,14px);line-height:1.125rem;font-weight:400;color:var(--grey-950);margin-bottom:var(--input-label-space)}.disabled-placeholder{color:var(--disabled-color-placeholder)}.fakeinput{min-height:calc(4 * var(--form-ref));border-radius:var(--input-radius);overflow:hidden;border:solid 1px var(--grey-200);display:flex;align-items:center;font-size:.875rem;-webkit-user-select:none;user-select:none;background-color:var(--white);transition:ease .3s;padding:0 var(--form-ref)}.fakeinput-wrapp{position:relative}.fakeinput-emptytext{margin:0 5px;flex:1 1;overflow:hidden;font-size:max(var(--form-ref) + 4px,14px);white-space:nowrap}.fakeinput-emptytext i{font-size:20px}.fakeinput ::ng-deep textarea{padding:10px 0}.fakeinput ::ng-deep input{height:calc(4 * var(--form-ref));padding:0}.fakeinput ::ng-deep input,.fakeinput ::ng-deep textarea{font-size:max(var(--form-ref) + 4px,14px);flex-grow:1;outline:none;width:100%;background-color:transparent;border:none!important}.fakeinput ::ng-deep input:disabled,.fakeinput ::ng-deep textarea:disabled{color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled~.fakeinput,.fakeinput ::ng-deep textarea:disabled~.fakeinput{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled::placeholder,.fakeinput ::ng-deep textarea:disabled::placeholder{color:var(--disabled-color-placeholder)}.fakeinput-button{margin:0;border:none;display:flex;justify-content:center;align-items:center;padding:4px 5px 5px;transition:ease .3s;background-color:var(--grey-200)}.fakeinput-button:disabled{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput-button:enabled:hover{cursor:pointer;background-color:var(--primary-300);color:var(--white)}.fakeinput-button:enabled:active{background-color:var(--primary-700)}.fakeinput app-checkbox{width:100%}.fakeinput-alert{font-size:13px;line-height:15px;padding:1px 4px}.fakeinput button{color:var(--grey-200)}.fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}.fakeinput:hover{border-color:var(--grey-400);cursor:text}.activeselect{border-color:var(--primary-600)}.errorinput{border-color:var(--red-500)!important}.t-disabled{color:var(--disabled-color);padding:5px;text-align:center}.disabledinput{background-color:var(--disabled-background);color:var(--disabled-color)}.disabledinput ::ng-deep input{color:var(--disabled-color)}.inputlabel{display:flex;align-items:center}.f-primary{color:var(--primary-500)}.f-secondary{color:var(--secondary-500)}.f-red{color:var(--red-500)}.f-yellow{color:var(--yellow-500)}.f-blue{color:var(--blue-500)}.f-green{color:var(--green-500)}.f-black{color:var(--grey-900)}.tip{color:var(--grey-500)}.item-disabled{color:var(--grey-400)}.item-disabled:hover{background-color:var(--white);cursor:not-allowed}.loading-input{background:linear-gradient(-45deg,#f2f2f2 40%,#dee1e2,#f2f2f2 60%);background-size:300%;background-position-x:100%;animation:shimmer 1s infinite linear}@keyframes shimmer{to{background-position-x:0%}}.char-counter{width:100%;display:flex;justify-content:flex-end;font-size:10px;color:var(--grey-400)}\n"], dependencies: [{ kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"], outputs: ["clickButton"] }] });
|
|
1115
1115
|
}
|
|
1116
1116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPoolOptionsComponent, decorators: [{
|
|
1117
1117
|
type: Component,
|
|
@@ -1121,7 +1121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1121
1121
|
useExisting: forwardRef(() => UicPoolOptionsComponent),
|
|
1122
1122
|
multi: true
|
|
1123
1123
|
}
|
|
1124
|
-
], template: "<div class=\"input-wrapper \">\
|
|
1124
|
+
], template: "<div class=\"input-wrapper \">\n @if (icon) {\n <i class=\"input-externalicon f-{{iconColor}} {{icon}}\"></i>\n }\n <div class=\"input-elements\" [style]=\"icon?'max-width: calc(100% - 34px);':''\">\n @if (label) {\n <div class=\"label inputlabel\" [class.font-error]=\"error\">{{label}} </div>\n }\n <div>\n <div class=\"pool-wrapper\" > \n @for (opt of options; track opt.id) {\n <div (click)=\"updateOptions(opt.id??'')\" class=\"pool-option\" [class.disabled-opt]=\"disabled\" [class.active-opt]=\"isSelected(opt.id??'')\">{{opt.text}}</div>\n }\n \n </div>\n <!-- BLOQUE DE LISTTA DETALLADA -->\n @if(enabledListView && selectedValues.length > 0){\n <h2 class=\"pool-selected-title\">{{listViewTitle}}</h2>\n <div>\n @for (item of selectedValues; track item.id) {\n <div class=\"pool-selected\"> \n <div class=\"pool-selected-label\">{{getItemName(item.id)}} </div>\n <div class=\"pool-selected-input\">\n <ui-input [disabled]=\"disabled\">\n <input [disabled]=\"disabled\" placeholder=\"Detalle\" type=\"text\" [value]=\"item.detail ?? ''\" (input)=\"updateDetail(item.id, $any($event.target).value)\">\n </ui-input>\n @if (!disabled) {\n <div class=\"pool-selected-button\" (click)=\"updateOptions(item.id)\" >\n <i class=\"ri-delete-bin-5-line\" ></i>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n <!-- ALERTS -->\n @if (error) {\n <div class=\"fakeinput-alert f-red\">{{error}}</div>\n }\n @if (tip) {\n <div class=\"fakeinput-alert tip\">{{tip}}</div>\n }\n </div>\n</div>\n", styles: [".pool-wrapper{display:flex;gap:var(--design-size-ref);flex-wrap:wrap}.pool-option{border:solid 1px var(--grey-300);color:var(--secondary-400);background-color:var(--secondary-50);font-size:.875rem;line-height:1.25rem;font-weight:400;padding:.5rem 1rem;border-radius:1rem;transition:ease .3s;-webkit-user-select:none;user-select:none;cursor:pointer}.pool-option:hover{border-color:var(--secondary-400)}.pool-selected-title{font-size:1.625rem;font-weight:600;line-height:calc(1.625rem + 4px);margin:1.5rem 0;color:var(--grey-950)}.pool-selected-label{margin-top:24px;font-size:.875rem;margin-bottom:.5rem}.pool-selected-input{display:flex;align-items:center;gap:16px}.pool-selected-button{height:calc(4 * var(--form-ref));aspect-ratio:1;border-radius:var(--button-radius);border:solid 1px var(--grey-300);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.25rem;transition:ease .3s}.pool-selected-button:hover{border-color:var(--red-400);color:var(--red-600)}.disabled-opt{background-color:var(--grey-200);border:none;cursor:not-allowed}.active-opt{background-color:var(--secondary-100);border:solid 1px var(--primary-400)}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.input-options{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;font-size:.875rem;z-index:500;overflow:hidden}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.input-option{display:flex;align-items:center;padding:6px 12px;line-height:1rem;-webkit-user-select:none;user-select:none;transition:ease .3s;border-radius:.25rem}.input-option-focused{background-color:var(--primary-500)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-scroll{padding:.25rem;max-height:180px;overflow:auto}.input-option-scroll-line{border-bottom:solid 1px var(--grey-200);width:100%;margin-top:2px}.input-option-scroll-focused{background-color:var(--primary-300)}.input-option-scroll-btns{border-top:solid 1px var(--grey-200);padding-top:5px;display:flex;justify-content:space-around}.input-option-scroll-btns button{background-color:var(--white);border:solid 1px var(--grey-200);padding:4px 10px;border-radius:10px}.input-option-scroll app-checkbox{width:100%}.input-wrapper{display:flex;align-items:center;width:100%;max-width:100%}.input-externalicon{margin-right:.5rem;font-size:1.625rem;height:1.625rem;width:1.625rem}.input-elements{flex-grow:1;display:flex;flex-direction:column;width:100%}.input-internalicon{color:var(--grey-700);margin-right:calc(var(--form-ref) * .6);font-size:calc(2.5 * var(--form-ref))}.label{font-size:max(var(--form-ref) + 4px,14px);line-height:1.125rem;font-weight:400;color:var(--grey-950);margin-bottom:var(--input-label-space)}.disabled-placeholder{color:var(--disabled-color-placeholder)}.fakeinput{min-height:calc(4 * var(--form-ref));border-radius:var(--input-radius);overflow:hidden;border:solid 1px var(--grey-200);display:flex;align-items:center;font-size:.875rem;-webkit-user-select:none;user-select:none;background-color:var(--white);transition:ease .3s;padding:0 var(--form-ref)}.fakeinput-wrapp{position:relative}.fakeinput-emptytext{margin:0 5px;flex:1 1;overflow:hidden;font-size:max(var(--form-ref) + 4px,14px);white-space:nowrap}.fakeinput-emptytext i{font-size:20px}.fakeinput ::ng-deep textarea{padding:10px 0}.fakeinput ::ng-deep input{height:calc(4 * var(--form-ref));padding:0}.fakeinput ::ng-deep input,.fakeinput ::ng-deep textarea{font-size:max(var(--form-ref) + 4px,14px);flex-grow:1;outline:none;width:100%;background-color:transparent;border:none!important}.fakeinput ::ng-deep input:disabled,.fakeinput ::ng-deep textarea:disabled{color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled~.fakeinput,.fakeinput ::ng-deep textarea:disabled~.fakeinput{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput ::ng-deep input:disabled::placeholder,.fakeinput ::ng-deep textarea:disabled::placeholder{color:var(--disabled-color-placeholder)}.fakeinput-button{margin:0;border:none;display:flex;justify-content:center;align-items:center;padding:4px 5px 5px;transition:ease .3s;background-color:var(--grey-200)}.fakeinput-button:disabled{background-color:var(--disabled-background);color:var(--disabled-color)}.fakeinput-button:enabled:hover{cursor:pointer;background-color:var(--primary-300);color:var(--white)}.fakeinput-button:enabled:active{background-color:var(--primary-700)}.fakeinput app-checkbox{width:100%}.fakeinput-alert{font-size:13px;line-height:15px;padding:1px 4px}.fakeinput button{color:var(--grey-200)}.fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}.fakeinput:hover{border-color:var(--grey-400);cursor:text}.activeselect{border-color:var(--primary-600)}.errorinput{border-color:var(--red-500)!important}.t-disabled{color:var(--disabled-color);padding:5px;text-align:center}.disabledinput{background-color:var(--disabled-background);color:var(--disabled-color)}.disabledinput ::ng-deep input{color:var(--disabled-color)}.inputlabel{display:flex;align-items:center}.f-primary{color:var(--primary-500)}.f-secondary{color:var(--secondary-500)}.f-red{color:var(--red-500)}.f-yellow{color:var(--yellow-500)}.f-blue{color:var(--blue-500)}.f-green{color:var(--green-500)}.f-black{color:var(--grey-900)}.tip{color:var(--grey-500)}.item-disabled{color:var(--grey-400)}.item-disabled:hover{background-color:var(--white);cursor:not-allowed}.loading-input{background:linear-gradient(-45deg,#f2f2f2 40%,#dee1e2,#f2f2f2 60%);background-size:300%;background-position-x:100%;animation:shimmer 1s infinite linear}@keyframes shimmer{to{background-position-x:0%}}.char-counter{width:100%;display:flex;justify-content:flex-end;font-size:10px;color:var(--grey-400)}\n"] }]
|
|
1125
1125
|
}], propDecorators: { icon: [{
|
|
1126
1126
|
type: Input
|
|
1127
1127
|
}], iconColor: [{
|
|
@@ -3270,7 +3270,7 @@ class UicDropdownContainerComponent {
|
|
|
3270
3270
|
provide: DROPDOWN_OVERLAY_CONTROLS,
|
|
3271
3271
|
useExisting: forwardRef(() => UicDropdownContainerComponent),
|
|
3272
3272
|
},
|
|
3273
|
-
], queries: [{ propertyName: "projectedTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: i0, template: "\n<div #triggerButton class=\"triggerButton\" (click)=\"onTriggerClick($event)\">\n <ng-content select=\"[button]\"></ng-content>\n</div>\n\n<ng-template #contentTemplate >\n <div class=\"ui-dropdown-panel\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</ng-template>", styles: [":host{display:inline-block}.triggerButton{width:fit-content;height:fit-content}.ui-dropdown-panel{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;max-height:50vh;font-size:.875rem;z-index:500;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
3273
|
+
], queries: [{ propertyName: "projectedTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: i0, template: "\r\n<div #triggerButton class=\"triggerButton\" (click)=\"onTriggerClick($event)\">\r\n <ng-content select=\"[button]\"></ng-content>\r\n</div>\r\n\r\n<ng-template #contentTemplate >\r\n <div class=\"ui-dropdown-panel\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</ng-template>", styles: [":host{display:inline-block}.triggerButton{width:fit-content;height:fit-content}.ui-dropdown-panel{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;max-height:50vh;font-size:.875rem;z-index:500;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
3274
3274
|
}
|
|
3275
3275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicDropdownContainerComponent, decorators: [{
|
|
3276
3276
|
type: Component,
|
|
@@ -3279,7 +3279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3279
3279
|
provide: DROPDOWN_OVERLAY_CONTROLS,
|
|
3280
3280
|
useExisting: forwardRef(() => UicDropdownContainerComponent),
|
|
3281
3281
|
},
|
|
3282
|
-
], template: "\n<div #triggerButton class=\"triggerButton\" (click)=\"onTriggerClick($event)\">\n <ng-content select=\"[button]\"></ng-content>\n</div>\n\n<ng-template #contentTemplate >\n <div class=\"ui-dropdown-panel\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</ng-template>", styles: [":host{display:inline-block}.triggerButton{width:fit-content;height:fit-content}.ui-dropdown-panel{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;max-height:50vh;font-size:.875rem;z-index:500;overflow:auto}\n"] }]
|
|
3282
|
+
], template: "\r\n<div #triggerButton class=\"triggerButton\" (click)=\"onTriggerClick($event)\">\r\n <ng-content select=\"[button]\"></ng-content>\r\n</div>\r\n\r\n<ng-template #contentTemplate >\r\n <div class=\"ui-dropdown-panel\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</ng-template>", styles: [":host{display:inline-block}.triggerButton{width:fit-content;height:fit-content}.ui-dropdown-panel{border-radius:var(--input-radius);background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;width:100%;top:100%;max-height:50vh;font-size:.875rem;z-index:500;overflow:auto}\n"] }]
|
|
3283
3283
|
}], propDecorators: { buttonLabel: [{
|
|
3284
3284
|
type: Input
|
|
3285
3285
|
}], disabled: [{
|
|
@@ -3352,11 +3352,11 @@ class UicTooltipComponent {
|
|
|
3352
3352
|
top = 0;
|
|
3353
3353
|
placement = 'bottom';
|
|
3354
3354
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3355
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicTooltipComponent, isStandalone: true, selector: "ui-tooltip", ngImport: i0, template: "<div @fadeAndRise class=\"tooltip\" \
|
|
3355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicTooltipComponent, isStandalone: true, selector: "ui-tooltip", ngImport: i0, template: "<div @fadeAndRise class=\"tooltip\" \n [class.tooltip--top]=\"placement === 'top'\"\n [class.tooltip--bottom]=\"placement === 'bottom'\"\n [style.left]=\"left + 'px'\" [style.top]=\"top + 'px'\" [innerHTML]=\"tooltip\">\n</div>\n", styles: [".tooltip{position:fixed;background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;max-width:400px;color:var(--grey-950);-webkit-user-select:none;user-select:none;padding:5px 10px;border-radius:4px;font-size:14px;transform:translate(-50%);z-index:1000}.tooltip:before{content:\"\";width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;position:absolute;left:calc(50% - 8px)}.tooltip.tooltip--bottom:before{top:-8px;border-bottom:8px solid var(--white);border-top:0}.tooltip.tooltip--top:before{bottom:-8px;top:auto;border-top:8px solid var(--white);border-bottom:0}\n"], animations: [fadeAndRise] });
|
|
3356
3356
|
}
|
|
3357
3357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTooltipComponent, decorators: [{
|
|
3358
3358
|
type: Component,
|
|
3359
|
-
args: [{ selector: 'ui-tooltip', imports: [], animations: [fadeAndRise], template: "<div @fadeAndRise class=\"tooltip\" \
|
|
3359
|
+
args: [{ selector: 'ui-tooltip', imports: [], animations: [fadeAndRise], template: "<div @fadeAndRise class=\"tooltip\" \n [class.tooltip--top]=\"placement === 'top'\"\n [class.tooltip--bottom]=\"placement === 'bottom'\"\n [style.left]=\"left + 'px'\" [style.top]=\"top + 'px'\" [innerHTML]=\"tooltip\">\n</div>\n", styles: [".tooltip{position:fixed;background-color:var(--white);box-shadow:0 1px 1px #00000020,0 2px 5px #00000050;max-width:400px;color:var(--grey-950);-webkit-user-select:none;user-select:none;padding:5px 10px;border-radius:4px;font-size:14px;transform:translate(-50%);z-index:1000}.tooltip:before{content:\"\";width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;position:absolute;left:calc(50% - 8px)}.tooltip.tooltip--bottom:before{top:-8px;border-bottom:8px solid var(--white);border-top:0}.tooltip.tooltip--top:before{bottom:-8px;top:auto;border-top:8px solid var(--white);border-bottom:0}\n"] }]
|
|
3360
3360
|
}] });
|
|
3361
3361
|
|
|
3362
3362
|
class UicToolTipDirective {
|
|
@@ -3468,11 +3468,11 @@ class UicTableUicSearcherComponent {
|
|
|
3468
3468
|
}
|
|
3469
3469
|
}
|
|
3470
3470
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUicSearcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3471
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableUicSearcherComponent, isStandalone: true, selector: "uic-table-searcher", inputs: { placeholder: "placeholder", label: "label", searchOnKeydown: "searchOnKeydown", showButtonText: "showButtonText", showSearchButton: "showSearchButton" }, outputs: { filter: "filter" }, ngImport: i0, template: "\r\n<div class=\"ui-table-searcher\">\r\n <
|
|
3471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableUicSearcherComponent, isStandalone: true, selector: "uic-table-searcher", inputs: { placeholder: "placeholder", label: "label", searchOnKeydown: "searchOnKeydown", showButtonText: "showButtonText", showSearchButton: "showSearchButton" }, outputs: { filter: "filter" }, ngImport: i0, template: "\r\n<div class=\"ui-table-searcher\">\r\n <ui-input [internalIcon]=\"!showSearchButton?'ri-search-line':''\">\r\n <input [(ngModel)]=\"text\" type=\"text\" (ngModelChange)=\"updateText()\" (keydown.enter)=\"filter.emit(text)\" placeholder=\"{{placeholder}}\">\r\n </ui-input>\r\n @if (showSearchButton) {\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"filter.emit(text)\" color=\"black\" type=\"bordered\" rightIcon=\"showSearchButton ri-search-2-line\" size=\"m\">{{showButtonText?'Buscar':''}}</ui-button>\r\n }\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"reset()\" color=\"black\" type=\"bordered\" rightIcon=\"ri-eraser-line\" size=\"m\">{{showButtonText?'Limpiar':''}}</ui-button>\r\n</div>", styles: [".ui-table-searcher{display:flex;gap:5px;align-items:center}.ui-table-searcher ui-input{min-width:300px;flex:1 1}@media (max-width: 479px){.ui-table-searcher ui-input{min-width:5px}}.ui-table-searcher .fakeinput{display:flex;align-items:center;border:solid 1px var(--grey-200);height:40px;padding:2px 1px 2px 10px;border-radius:8px;transition:ease .3s;width:350px}@media (max-width: 479px){.ui-table-searcher .fakeinput{width:100%}}.ui-table-searcher .fakeinput i{font-size:24px;margin-right:8px}.ui-table-searcher .fakeinput input{width:100%;border:none}.ui-table-searcher .fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}\n"], dependencies: [{ kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"], outputs: ["clickButton"] }] });
|
|
3472
3472
|
}
|
|
3473
3473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUicSearcherComponent, decorators: [{
|
|
3474
3474
|
type: Component,
|
|
3475
|
-
args: [{ selector: 'uic-table-searcher', imports: [UicButtonComponent, FormsModule, UicToolTipDirective, UicInputComponent], template: "\r\n<div class=\"ui-table-searcher\">\r\n <
|
|
3475
|
+
args: [{ selector: 'uic-table-searcher', imports: [UicButtonComponent, FormsModule, UicToolTipDirective, UicInputComponent], template: "\r\n<div class=\"ui-table-searcher\">\r\n <ui-input [internalIcon]=\"!showSearchButton?'ri-search-line':''\">\r\n <input [(ngModel)]=\"text\" type=\"text\" (ngModelChange)=\"updateText()\" (keydown.enter)=\"filter.emit(text)\" placeholder=\"{{placeholder}}\">\r\n </ui-input>\r\n @if (showSearchButton) {\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"filter.emit(text)\" color=\"black\" type=\"bordered\" rightIcon=\"showSearchButton ri-search-2-line\" size=\"m\">{{showButtonText?'Buscar':''}}</ui-button>\r\n }\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"reset()\" color=\"black\" type=\"bordered\" rightIcon=\"ri-eraser-line\" size=\"m\">{{showButtonText?'Limpiar':''}}</ui-button>\r\n</div>", styles: [".ui-table-searcher{display:flex;gap:5px;align-items:center}.ui-table-searcher ui-input{min-width:300px;flex:1 1}@media (max-width: 479px){.ui-table-searcher ui-input{min-width:5px}}.ui-table-searcher .fakeinput{display:flex;align-items:center;border:solid 1px var(--grey-200);height:40px;padding:2px 1px 2px 10px;border-radius:8px;transition:ease .3s;width:350px}@media (max-width: 479px){.ui-table-searcher .fakeinput{width:100%}}.ui-table-searcher .fakeinput i{font-size:24px;margin-right:8px}.ui-table-searcher .fakeinput input{width:100%;border:none}.ui-table-searcher .fakeinput:focus-within{box-shadow:0 0 0 3px var(--secondary-alpha)}\n"] }]
|
|
3476
3476
|
}], propDecorators: { placeholder: [{
|
|
3477
3477
|
type: Input
|
|
3478
3478
|
}], label: [{
|
|
@@ -3494,8 +3494,8 @@ class UicTablePaginationComponent {
|
|
|
3494
3494
|
size = 25;
|
|
3495
3495
|
loading = false;
|
|
3496
3496
|
showText = true;
|
|
3497
|
-
nextButtonText = '
|
|
3498
|
-
previousButtonText = '
|
|
3497
|
+
nextButtonText = 'Sig.';
|
|
3498
|
+
previousButtonText = 'Ant.';
|
|
3499
3499
|
visiblePages = 3;
|
|
3500
3500
|
pagesInView = [];
|
|
3501
3501
|
pageChange = new EventEmitter();
|
|
@@ -3534,11 +3534,11 @@ class UicTablePaginationComponent {
|
|
|
3534
3534
|
}
|
|
3535
3535
|
}
|
|
3536
3536
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTablePaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3537
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTablePaginationComponent, isStandalone: true, selector: "uic-table-pagination", inputs: { buttonSize: "buttonSize", currentPage: "currentPage", totalPages: "totalPages", size: "size", loading: "loading", showText: "showText", nextButtonText: "nextButtonText", previousButtonText: "previousButtonText" }, outputs: { pageChange: "pageChange", sizeChange: "sizeChange" }, ngImport: i0, template: "\r\n<div class=\"table-page\">\r\n <ui-button \r\n [disabled]=\"loading || currentPage == 1\" \r\n (click)=\"changePage(currentPage - 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?previousButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n icon=\"ri-arrow-left-line\" > \r\n </ui-button> \r\n <div class=\"table-numbers\">\r\n @for (p of pages; track $index) {\r\n @if ( p!= '...' ){\r\n <button [disabled]=\"loading\" (click)=\"changePage(+p)\" [ngClass]=\"{'selected':currentPage==p}\" class=\"number\">{{p}}</button>\r\n } @else {\r\n <div class=\"space\">...</div>\r\n }\r\n }\r\n </div>\r\n <ui-button \r\n [disabled]=\"loading || currentPage == totalPages\" \r\n (click)=\"changePage(currentPage + 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?nextButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n rightIcon=\"ri-arrow-right-line\" > \r\n </ui-button>\r\n</div>", styles: [".table-page{display:flex;align-items:center;background-color:#fff;justify-content:space-between;width:100%;gap:1rem;border-top:solid 1px var(--table-border-color);padding:var(--table-spacing-ref) calc(var(--table-spacing-ref) * 1.5)}.table-numbers{display:flex;align-items:center;justify-content:center;gap:2px;-webkit-user-select:none;user-select:none;min-width:250px}.number{border:none;color:var(--grey-500);width:calc(var(--table-spacing-ref) * 4);height:calc(var(--table-spacing-ref) * 4);background-color:var(--white);border-radius:var(--button-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:ease .3s}.number:enabled:hover{background-color:var(--secondary-200)}.selected{background-color:var(--grey-100);font-weight:600;color:var(--secondary-500)}.space{letter-spacing:5px}.page-size{flex:1 1;display:flex;font-size:.75rem;color:var(--grey-500);align-items:center;justify-content:flex-end}.page-size select{padding:5px 8px;margin-right:10px;color:var(--grey-500);border:solid 1px var(--primary-500);border-radius:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "ngmodule", type: FormsModule }] });
|
|
3537
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTablePaginationComponent, isStandalone: true, selector: "uic-table-pagination", inputs: { buttonSize: "buttonSize", currentPage: "currentPage", totalPages: "totalPages", size: "size", loading: "loading", showText: "showText", nextButtonText: "nextButtonText", previousButtonText: "previousButtonText" }, outputs: { pageChange: "pageChange", sizeChange: "sizeChange" }, ngImport: i0, template: "\r\n<div class=\"table-page\">\r\n <ui-button \r\n [disabled]=\"loading || currentPage == 1\" \r\n (click)=\"changePage(currentPage - 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?previousButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n icon=\"ri-arrow-left-line\" > \r\n </ui-button> \r\n <div class=\"table-numbers\">\r\n @for (p of pages; track $index) {\r\n @if ( p!= '...' ){\r\n <button [disabled]=\"loading\" (click)=\"changePage(+p)\" [ngClass]=\"{'selected':currentPage==p}\" class=\"number\">{{p}}</button>\r\n } @else {\r\n <div class=\"space\">...</div>\r\n }\r\n }\r\n </div>\r\n <div class=\"current-mobile\"> {{currentPage}} </div>\r\n <ui-button \r\n [disabled]=\"loading || currentPage == totalPages\" \r\n (click)=\"changePage(currentPage + 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?nextButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n rightIcon=\"ri-arrow-right-line\" > \r\n </ui-button>\r\n</div>", styles: [".table-page{display:flex;align-items:center;background-color:#fff;justify-content:space-between;width:100%;gap:1rem;border-top:solid 1px var(--table-border-color);padding:var(--table-spacing-ref) calc(var(--table-spacing-ref) * 1.5)}.table-numbers{display:flex;align-items:center;justify-content:center;gap:2px;-webkit-user-select:none;user-select:none;min-width:250px}@media (max-width: 479px){.table-numbers{display:none}}.current-mobile{font-size:14px;display:none}@media (max-width: 479px){.current-mobile{display:block}}.number{border:none;color:var(--grey-500);width:calc(var(--table-spacing-ref) * 4);height:calc(var(--table-spacing-ref) * 4);background-color:var(--white);border-radius:var(--button-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:ease .3s}.number:enabled:hover{background-color:var(--secondary-200)}.selected{background-color:var(--grey-100);font-weight:600;color:var(--secondary-500)}.space{letter-spacing:5px}.page-size{flex:1 1;display:flex;font-size:.75rem;color:var(--grey-500);align-items:center;justify-content:flex-end}.page-size select{padding:5px 8px;margin-right:10px;color:var(--grey-500);border:solid 1px var(--primary-500);border-radius:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "ngmodule", type: FormsModule }] });
|
|
3538
3538
|
}
|
|
3539
3539
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTablePaginationComponent, decorators: [{
|
|
3540
3540
|
type: Component,
|
|
3541
|
-
args: [{ selector: 'uic-table-pagination', imports: [CommonModule, UicButtonComponent, FormsModule], template: "\r\n<div class=\"table-page\">\r\n <ui-button \r\n [disabled]=\"loading || currentPage == 1\" \r\n (click)=\"changePage(currentPage - 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?previousButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n icon=\"ri-arrow-left-line\" > \r\n </ui-button> \r\n <div class=\"table-numbers\">\r\n @for (p of pages; track $index) {\r\n @if ( p!= '...' ){\r\n <button [disabled]=\"loading\" (click)=\"changePage(+p)\" [ngClass]=\"{'selected':currentPage==p}\" class=\"number\">{{p}}</button>\r\n } @else {\r\n <div class=\"space\">...</div>\r\n }\r\n }\r\n </div>\r\n <ui-button \r\n [disabled]=\"loading || currentPage == totalPages\" \r\n (click)=\"changePage(currentPage + 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?nextButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n rightIcon=\"ri-arrow-right-line\" > \r\n </ui-button>\r\n</div>", styles: [".table-page{display:flex;align-items:center;background-color:#fff;justify-content:space-between;width:100%;gap:1rem;border-top:solid 1px var(--table-border-color);padding:var(--table-spacing-ref) calc(var(--table-spacing-ref) * 1.5)}.table-numbers{display:flex;align-items:center;justify-content:center;gap:2px;-webkit-user-select:none;user-select:none;min-width:250px}.number{border:none;color:var(--grey-500);width:calc(var(--table-spacing-ref) * 4);height:calc(var(--table-spacing-ref) * 4);background-color:var(--white);border-radius:var(--button-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:ease .3s}.number:enabled:hover{background-color:var(--secondary-200)}.selected{background-color:var(--grey-100);font-weight:600;color:var(--secondary-500)}.space{letter-spacing:5px}.page-size{flex:1 1;display:flex;font-size:.75rem;color:var(--grey-500);align-items:center;justify-content:flex-end}.page-size select{padding:5px 8px;margin-right:10px;color:var(--grey-500);border:solid 1px var(--primary-500);border-radius:5px}\n"] }]
|
|
3541
|
+
args: [{ selector: 'uic-table-pagination', imports: [CommonModule, UicButtonComponent, FormsModule], template: "\r\n<div class=\"table-page\">\r\n <ui-button \r\n [disabled]=\"loading || currentPage == 1\" \r\n (click)=\"changePage(currentPage - 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?previousButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n icon=\"ri-arrow-left-line\" > \r\n </ui-button> \r\n <div class=\"table-numbers\">\r\n @for (p of pages; track $index) {\r\n @if ( p!= '...' ){\r\n <button [disabled]=\"loading\" (click)=\"changePage(+p)\" [ngClass]=\"{'selected':currentPage==p}\" class=\"number\">{{p}}</button>\r\n } @else {\r\n <div class=\"space\">...</div>\r\n }\r\n }\r\n </div>\r\n <div class=\"current-mobile\"> {{currentPage}} </div>\r\n <ui-button \r\n [disabled]=\"loading || currentPage == totalPages\" \r\n (click)=\"changePage(currentPage + 1)\" \r\n [size]=\"buttonSize\" \r\n color=\"black\" \r\n type=\"bordered\" \r\n [text]=\"showText?nextButtonText:''\"\r\n [iconOnly]=\"!showText\" \r\n rightIcon=\"ri-arrow-right-line\" > \r\n </ui-button>\r\n</div>", styles: [".table-page{display:flex;align-items:center;background-color:#fff;justify-content:space-between;width:100%;gap:1rem;border-top:solid 1px var(--table-border-color);padding:var(--table-spacing-ref) calc(var(--table-spacing-ref) * 1.5)}.table-numbers{display:flex;align-items:center;justify-content:center;gap:2px;-webkit-user-select:none;user-select:none;min-width:250px}@media (max-width: 479px){.table-numbers{display:none}}.current-mobile{font-size:14px;display:none}@media (max-width: 479px){.current-mobile{display:block}}.number{border:none;color:var(--grey-500);width:calc(var(--table-spacing-ref) * 4);height:calc(var(--table-spacing-ref) * 4);background-color:var(--white);border-radius:var(--button-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:ease .3s}.number:enabled:hover{background-color:var(--secondary-200)}.selected{background-color:var(--grey-100);font-weight:600;color:var(--secondary-500)}.space{letter-spacing:5px}.page-size{flex:1 1;display:flex;font-size:.75rem;color:var(--grey-500);align-items:center;justify-content:flex-end}.page-size select{padding:5px 8px;margin-right:10px;color:var(--grey-500);border:solid 1px var(--primary-500);border-radius:5px}\n"] }]
|
|
3542
3542
|
}], propDecorators: { buttonSize: [{
|
|
3543
3543
|
type: Input
|
|
3544
3544
|
}], currentPage: [{
|
|
@@ -3561,56 +3561,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3561
3561
|
type: Output
|
|
3562
3562
|
}] } });
|
|
3563
3563
|
|
|
3564
|
-
class UicTableListComponent {
|
|
3565
|
-
list = [];
|
|
3566
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3567
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableListComponent, isStandalone: true, selector: "uic-table-list", inputs: { list: "list" }, ngImport: i0, template: "@for (item of list; track $index) {\r\n <div class=\"list-item\">\r\n <i [class]=\"item.icon??'ri-capsule-fill'\"></i>\r\n <div class=\"list-item-data\">\r\n <div>{{item.text}}</div>\r\n <p>{{item.subtext}}</p>\r\n </div> \r\n </div>\r\n\r\n}\r\n", styles: [".list-item{display:flex;margin-bottom:5px}.list-item i{color:var(--grey-500);margin-right:5px}.list-item-data{text-align:left}.list-item-data p{color:var(--grey-300);font-size:13px}\n"] });
|
|
3568
|
-
}
|
|
3569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableListComponent, decorators: [{
|
|
3570
|
-
type: Component,
|
|
3571
|
-
args: [{ selector: 'uic-table-list', imports: [], template: "@for (item of list; track $index) {\r\n <div class=\"list-item\">\r\n <i [class]=\"item.icon??'ri-capsule-fill'\"></i>\r\n <div class=\"list-item-data\">\r\n <div>{{item.text}}</div>\r\n <p>{{item.subtext}}</p>\r\n </div> \r\n </div>\r\n\r\n}\r\n", styles: [".list-item{display:flex;margin-bottom:5px}.list-item i{color:var(--grey-500);margin-right:5px}.list-item-data{text-align:left}.list-item-data p{color:var(--grey-300);font-size:13px}\n"] }]
|
|
3572
|
-
}], propDecorators: { list: [{
|
|
3573
|
-
type: Input
|
|
3574
|
-
}] } });
|
|
3575
|
-
|
|
3576
|
-
class UicNameInitsPipe {
|
|
3577
|
-
transform(value) {
|
|
3578
|
-
if (!value) {
|
|
3579
|
-
return "";
|
|
3580
|
-
}
|
|
3581
|
-
const names = value.split(" ");
|
|
3582
|
-
if (names.length > 1) {
|
|
3583
|
-
return names[0].charAt(0) + names[1].charAt(0).toUpperCase();
|
|
3584
|
-
}
|
|
3585
|
-
else if (names[0].length >= 2) {
|
|
3586
|
-
return names[0].substring(0, 2).toUpperCase();
|
|
3587
|
-
}
|
|
3588
|
-
else {
|
|
3589
|
-
return '';
|
|
3590
|
-
}
|
|
3591
|
-
}
|
|
3592
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3593
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, isStandalone: true, name: "nameInitials" });
|
|
3594
|
-
}
|
|
3595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, decorators: [{
|
|
3596
|
-
type: Pipe,
|
|
3597
|
-
args: [{
|
|
3598
|
-
name: 'nameInitials'
|
|
3599
|
-
}]
|
|
3600
|
-
}] });
|
|
3601
|
-
|
|
3602
|
-
class UicTableUserComponent {
|
|
3603
|
-
user;
|
|
3604
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3605
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableUserComponent, isStandalone: true, selector: "uic-table-user", inputs: { user: "user" }, ngImport: i0, template: "@if (user) {\r\n <div class=\"user-row\">\r\n @if (!user.hideAvatar) {\r\n <div class=\"user-inits\" [style]=\"user.photo? 'background-image: url('+ user.photo +')' :'' \">\r\n {{ !user.photo? (user.name | nameInitials) :''}}\r\n </div>\r\n }\r\n <div class=\"user-row-data\">\r\n <div>{{user.name}}</div>\r\n <p>{{user.id}}</p>\r\n </div>\r\n </div>\r\n}@else{\r\n -\r\n}", styles: [".user-inits{width:32px;height:32px;border-radius:50px;border:solid 1px var(--secondary-600);background-color:var(--secondary-300);color:var(--secondary-600);display:flex;justify-content:center;align-items:center;margin-right:6px;background-repeat:no-repeat;background-size:cover;background-position:top center}.user-row{display:flex;align-items:center;width:fit-content}.user-row-data{min-width:150px;flex:1 1;font-weight:600;text-align:left;color:var(--grey-900);font-size:.875rem;line-height:1rem}.user-row-data p{color:var(--grey-500);font-weight:400;margin-bottom:0;font-size:.75rem;line-height:1rem}\n"], dependencies: [{ kind: "pipe", type: UicNameInitsPipe, name: "nameInitials" }] });
|
|
3606
|
-
}
|
|
3607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUserComponent, decorators: [{
|
|
3608
|
-
type: Component,
|
|
3609
|
-
args: [{ selector: 'uic-table-user', imports: [UicNameInitsPipe], template: "@if (user) {\r\n <div class=\"user-row\">\r\n @if (!user.hideAvatar) {\r\n <div class=\"user-inits\" [style]=\"user.photo? 'background-image: url('+ user.photo +')' :'' \">\r\n {{ !user.photo? (user.name | nameInitials) :''}}\r\n </div>\r\n }\r\n <div class=\"user-row-data\">\r\n <div>{{user.name}}</div>\r\n <p>{{user.id}}</p>\r\n </div>\r\n </div>\r\n}@else{\r\n -\r\n}", styles: [".user-inits{width:32px;height:32px;border-radius:50px;border:solid 1px var(--secondary-600);background-color:var(--secondary-300);color:var(--secondary-600);display:flex;justify-content:center;align-items:center;margin-right:6px;background-repeat:no-repeat;background-size:cover;background-position:top center}.user-row{display:flex;align-items:center;width:fit-content}.user-row-data{min-width:150px;flex:1 1;font-weight:600;text-align:left;color:var(--grey-900);font-size:.875rem;line-height:1rem}.user-row-data p{color:var(--grey-500);font-weight:400;margin-bottom:0;font-size:.75rem;line-height:1rem}\n"] }]
|
|
3610
|
-
}], propDecorators: { user: [{
|
|
3611
|
-
type: Input
|
|
3612
|
-
}] } });
|
|
3613
|
-
|
|
3614
3564
|
const highlightRow = trigger('highlightRow', [
|
|
3615
3565
|
state('highlighted', style({ backgroundColor: '#efe1f5' })),
|
|
3616
3566
|
transition('* => highlighted', [
|
|
@@ -3632,24 +3582,6 @@ const animatedRow = trigger('animatedRow', [
|
|
|
3632
3582
|
]),
|
|
3633
3583
|
]);
|
|
3634
3584
|
|
|
3635
|
-
class UicStatusLabelComponent {
|
|
3636
|
-
color = 'grey';
|
|
3637
|
-
type = 'status';
|
|
3638
|
-
icon = 'ri-circle-fill';
|
|
3639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicStatusLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicStatusLabelComponent, isStandalone: true, selector: "ui-status-label", inputs: { color: "color", type: "type", icon: "icon" }, ngImport: i0, template: "<div [class]=\"'status-label sl-' + type + ' ' + (type == 'status' ? 'slc-' : 'slt-') + color\" >\r\n @if (type == 'status') {\r\n <i [class]=\"icon\"></i>\r\n }\r\n <div class=\"sl-text\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".status-label{display:flex;align-items:center;border-radius:6px;white-space:nowrap;padding:0 8px;width:fit-content;border:solid 1px var(--grey-300);font-size:12px;line-height:18px;font-weight:500}.status-label i{font-size:10px;margin-right:6px}.slc-primary{color:var(--primary-500);border-color:var(--primary-500);background-color:var(--primary-50)}.slc-red{color:var(--red-500);border-color:var(--red-500);background-color:var(--red-50)}.slc-blue{border-color:var(--blue-600);color:var(--blue-600);background-color:var(--blue-100)}.slc-green{border-color:var(--green-500);color:var(--green-500);background-color:var(--green-50)}.slc-yellow{border-color:var(--yellow-500);color:var(--yellow-500);background-color:var(--yellow-50)}.slc-black{border-color:var(--grey-900);color:var(--grey-900);background-color:var(--grey-50)}.slc-grey{border-color:var(--grey-300);color:var(--grey-300);background-color:var(--grey-50)}.sl-text{color:var(--grey-600)}.sl-tag{border:none}.sl-tag .sl-text{color:var(--white)}.slt-primary{background-color:var(--primary-600)}.slt-red{background-color:var(--red-600)}.slt-blue{background-color:var(--blue-600)}.slt-green{background-color:var(--green-600)}.slt-yellow{background-color:var(--yellow-600)}.slt-black,.slt-grey{background-color:var(--grey-600)}\n"] });
|
|
3641
|
-
}
|
|
3642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicStatusLabelComponent, decorators: [{
|
|
3643
|
-
type: Component,
|
|
3644
|
-
args: [{ selector: 'ui-status-label', imports: [], template: "<div [class]=\"'status-label sl-' + type + ' ' + (type == 'status' ? 'slc-' : 'slt-') + color\" >\r\n @if (type == 'status') {\r\n <i [class]=\"icon\"></i>\r\n }\r\n <div class=\"sl-text\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".status-label{display:flex;align-items:center;border-radius:6px;white-space:nowrap;padding:0 8px;width:fit-content;border:solid 1px var(--grey-300);font-size:12px;line-height:18px;font-weight:500}.status-label i{font-size:10px;margin-right:6px}.slc-primary{color:var(--primary-500);border-color:var(--primary-500);background-color:var(--primary-50)}.slc-red{color:var(--red-500);border-color:var(--red-500);background-color:var(--red-50)}.slc-blue{border-color:var(--blue-600);color:var(--blue-600);background-color:var(--blue-100)}.slc-green{border-color:var(--green-500);color:var(--green-500);background-color:var(--green-50)}.slc-yellow{border-color:var(--yellow-500);color:var(--yellow-500);background-color:var(--yellow-50)}.slc-black{border-color:var(--grey-900);color:var(--grey-900);background-color:var(--grey-50)}.slc-grey{border-color:var(--grey-300);color:var(--grey-300);background-color:var(--grey-50)}.sl-text{color:var(--grey-600)}.sl-tag{border:none}.sl-tag .sl-text{color:var(--white)}.slt-primary{background-color:var(--primary-600)}.slt-red{background-color:var(--red-600)}.slt-blue{background-color:var(--blue-600)}.slt-green{background-color:var(--green-600)}.slt-yellow{background-color:var(--yellow-600)}.slt-black,.slt-grey{background-color:var(--grey-600)}\n"] }]
|
|
3645
|
-
}], propDecorators: { color: [{
|
|
3646
|
-
type: Input
|
|
3647
|
-
}], type: [{
|
|
3648
|
-
type: Input
|
|
3649
|
-
}], icon: [{
|
|
3650
|
-
type: Input
|
|
3651
|
-
}] } });
|
|
3652
|
-
|
|
3653
3585
|
class UicActionButtonComponent {
|
|
3654
3586
|
icon = 'ri-more-2-line';
|
|
3655
3587
|
options = [];
|
|
@@ -3752,1189 +3684,1401 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3752
3684
|
args: ['menuTemplate']
|
|
3753
3685
|
}] } });
|
|
3754
3686
|
|
|
3755
|
-
class
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
searchLabel = 'Buscar';
|
|
3772
|
-
searchPlaceholder = 'Buscar';
|
|
3773
|
-
headerClass = '';
|
|
3774
|
-
headerBackgroundColor = 'grey';
|
|
3775
|
-
striped = false;
|
|
3776
|
-
showPagination = true;
|
|
3777
|
-
searchOnKeydown = false;
|
|
3778
|
-
showEmptyMessage = true;
|
|
3779
|
-
showSearchButton = false;
|
|
3780
|
-
showTextPagination = true;
|
|
3781
|
-
emptyMessage = 'No hay elementos';
|
|
3782
|
-
nextButtonText = 'Siguiente';
|
|
3783
|
-
previousButtonText = 'Anterior';
|
|
3784
|
-
searcherShowButtonText = false;
|
|
3785
|
-
action = new EventEmitter();
|
|
3786
|
-
update = new EventEmitter();
|
|
3787
|
-
checkedChange = new EventEmitter();
|
|
3788
|
-
switchChange = new EventEmitter();
|
|
3789
|
-
clickedRow = new EventEmitter();
|
|
3790
|
-
allSelected = false;
|
|
3791
|
-
checkedIds = new Set();
|
|
3792
|
-
sortKey = '';
|
|
3793
|
-
sortAsc = true;
|
|
3794
|
-
filter = '';
|
|
3795
|
-
page = 1;
|
|
3796
|
-
fullViewRows = [];
|
|
3797
|
-
getValue(data, key) {
|
|
3798
|
-
const col = data.find(col => col.key == key);
|
|
3799
|
-
return col?.value?.toString() ?? '';
|
|
3800
|
-
}
|
|
3801
|
-
getSubtext(data, key) {
|
|
3802
|
-
const col = data.find(col => col.key == key);
|
|
3803
|
-
return col?.subtext?.toString() ?? '';
|
|
3804
|
-
}
|
|
3805
|
-
isChecked(data, key) {
|
|
3806
|
-
const cell = data.find(c => c.key === key);
|
|
3807
|
-
return !!cell?.checked;
|
|
3808
|
-
}
|
|
3809
|
-
getMoreActions(actions, row) {
|
|
3810
|
-
return actions
|
|
3811
|
-
.filter(f => this.isValidRule(row, f.rule))
|
|
3812
|
-
.map(p => ({ id: p.key, label: p.text ?? '', icon: p.icon ?? '' }));
|
|
3813
|
-
}
|
|
3814
|
-
getFontColor(data, key) {
|
|
3815
|
-
const col = data.find(col => col.key == key);
|
|
3816
|
-
return 'ui-trc-' + (col?.textColor ?? 'black');
|
|
3817
|
-
}
|
|
3818
|
-
getBackgroundColor(data, key) {
|
|
3819
|
-
const col = data.find(col => col.key == key);
|
|
3820
|
-
return col?.color ?? 'transparent';
|
|
3821
|
-
}
|
|
3822
|
-
isValidRule(data, key) {
|
|
3823
|
-
if (!key)
|
|
3824
|
-
return true;
|
|
3825
|
-
let valid = true;
|
|
3826
|
-
key.forEach(k => {
|
|
3827
|
-
const col = data.find(col => col.key == k);
|
|
3828
|
-
valid = valid && !!(col?.value);
|
|
3829
|
-
});
|
|
3830
|
-
return valid;
|
|
3831
|
-
}
|
|
3832
|
-
getIcon(data, key, right = false) {
|
|
3833
|
-
const col = data.find(col => col.key == key);
|
|
3834
|
-
if (col && right && col.rightIcon) {
|
|
3835
|
-
return col.rightIcon + ' ui-trc-' + (col?.iconColor ?? 'black');
|
|
3836
|
-
}
|
|
3837
|
-
if (col && !right && col.icon) {
|
|
3838
|
-
return col.icon + ' ui-trc-' + (col?.iconColor ?? 'black');
|
|
3687
|
+
class UicTableListComponent {
|
|
3688
|
+
list = [];
|
|
3689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3690
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableListComponent, isStandalone: true, selector: "uic-table-list", inputs: { list: "list" }, ngImport: i0, template: "@for (item of list; track $index) {\r\n <div class=\"list-item\">\r\n <i [class]=\"item.icon??'ri-capsule-fill'\"></i>\r\n <div class=\"list-item-data\">\r\n <div>{{item.text}}</div>\r\n <p>{{item.subtext}}</p>\r\n </div> \r\n </div>\r\n\r\n}\r\n", styles: [".list-item{display:flex;margin-bottom:5px}.list-item i{color:var(--grey-500);margin-right:5px}.list-item-data{text-align:left}.list-item-data p{color:var(--grey-300);font-size:13px}\n"] });
|
|
3691
|
+
}
|
|
3692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableListComponent, decorators: [{
|
|
3693
|
+
type: Component,
|
|
3694
|
+
args: [{ selector: 'uic-table-list', imports: [], template: "@for (item of list; track $index) {\r\n <div class=\"list-item\">\r\n <i [class]=\"item.icon??'ri-capsule-fill'\"></i>\r\n <div class=\"list-item-data\">\r\n <div>{{item.text}}</div>\r\n <p>{{item.subtext}}</p>\r\n </div> \r\n </div>\r\n\r\n}\r\n", styles: [".list-item{display:flex;margin-bottom:5px}.list-item i{color:var(--grey-500);margin-right:5px}.list-item-data{text-align:left}.list-item-data p{color:var(--grey-300);font-size:13px}\n"] }]
|
|
3695
|
+
}], propDecorators: { list: [{
|
|
3696
|
+
type: Input
|
|
3697
|
+
}] } });
|
|
3698
|
+
|
|
3699
|
+
class UicNameInitsPipe {
|
|
3700
|
+
transform(value) {
|
|
3701
|
+
if (!value) {
|
|
3702
|
+
return "";
|
|
3839
3703
|
}
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
const col = data.find(col => col.key == key);
|
|
3844
|
-
return col?.list ?? [];
|
|
3845
|
-
}
|
|
3846
|
-
getUser(data, key) {
|
|
3847
|
-
const col = data.find(col => col.key == key);
|
|
3848
|
-
return col?.user;
|
|
3849
|
-
}
|
|
3850
|
-
sortClick(key) {
|
|
3851
|
-
if (this.sortKey != key) {
|
|
3852
|
-
this.sortKey = key;
|
|
3853
|
-
this.sortAsc = true;
|
|
3704
|
+
const names = value.split(" ");
|
|
3705
|
+
if (names.length > 1) {
|
|
3706
|
+
return names[0].charAt(0) + names[1].charAt(0).toUpperCase();
|
|
3854
3707
|
}
|
|
3855
|
-
else if (
|
|
3856
|
-
|
|
3708
|
+
else if (names[0].length >= 2) {
|
|
3709
|
+
return names[0].substring(0, 2).toUpperCase();
|
|
3857
3710
|
}
|
|
3858
3711
|
else {
|
|
3859
|
-
|
|
3860
|
-
this.sortAsc = true;
|
|
3712
|
+
return '';
|
|
3861
3713
|
}
|
|
3862
|
-
this.updateData();
|
|
3863
3714
|
}
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3716
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, isStandalone: true, name: "nameInitials" });
|
|
3717
|
+
}
|
|
3718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicNameInitsPipe, decorators: [{
|
|
3719
|
+
type: Pipe,
|
|
3720
|
+
args: [{
|
|
3721
|
+
name: 'nameInitials'
|
|
3722
|
+
}]
|
|
3723
|
+
}] });
|
|
3724
|
+
|
|
3725
|
+
class UicTableUserComponent {
|
|
3726
|
+
user;
|
|
3727
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3728
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableUserComponent, isStandalone: true, selector: "uic-table-user", inputs: { user: "user" }, ngImport: i0, template: "@if (user) {\r\n <div class=\"user-row\">\r\n @if (!user.hideAvatar) {\r\n <div class=\"user-inits\" [style]=\"user.photo? 'background-image: url('+ user.photo +')' :'' \">\r\n {{ !user.photo? (user.name | nameInitials) :''}}\r\n </div>\r\n }\r\n <div class=\"user-row-data\">\r\n <div>{{user.name}}</div>\r\n <p>{{user.id}}</p>\r\n </div>\r\n </div>\r\n}@else{\r\n -\r\n}", styles: [".user-inits{width:32px;height:32px;border-radius:50px;border:solid 1px var(--secondary-600);background-color:var(--secondary-300);color:var(--secondary-600);display:flex;justify-content:center;align-items:center;margin-right:6px;background-repeat:no-repeat;background-size:cover;background-position:top center}.user-row{display:flex;align-items:center;width:fit-content}.user-row-data{min-width:150px;flex:1 1;font-weight:600;text-align:left;color:var(--grey-900);font-size:.875rem;line-height:1rem}.user-row-data p{color:var(--grey-500);font-weight:400;margin-bottom:0;font-size:.75rem;line-height:1rem}\n"], dependencies: [{ kind: "pipe", type: UicNameInitsPipe, name: "nameInitials" }] });
|
|
3729
|
+
}
|
|
3730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUserComponent, decorators: [{
|
|
3731
|
+
type: Component,
|
|
3732
|
+
args: [{ selector: 'uic-table-user', imports: [UicNameInitsPipe], template: "@if (user) {\r\n <div class=\"user-row\">\r\n @if (!user.hideAvatar) {\r\n <div class=\"user-inits\" [style]=\"user.photo? 'background-image: url('+ user.photo +')' :'' \">\r\n {{ !user.photo? (user.name | nameInitials) :''}}\r\n </div>\r\n }\r\n <div class=\"user-row-data\">\r\n <div>{{user.name}}</div>\r\n <p>{{user.id}}</p>\r\n </div>\r\n </div>\r\n}@else{\r\n -\r\n}", styles: [".user-inits{width:32px;height:32px;border-radius:50px;border:solid 1px var(--secondary-600);background-color:var(--secondary-300);color:var(--secondary-600);display:flex;justify-content:center;align-items:center;margin-right:6px;background-repeat:no-repeat;background-size:cover;background-position:top center}.user-row{display:flex;align-items:center;width:fit-content}.user-row-data{min-width:150px;flex:1 1;font-weight:600;text-align:left;color:var(--grey-900);font-size:.875rem;line-height:1rem}.user-row-data p{color:var(--grey-500);font-weight:400;margin-bottom:0;font-size:.75rem;line-height:1rem}\n"] }]
|
|
3733
|
+
}], propDecorators: { user: [{
|
|
3734
|
+
type: Input
|
|
3735
|
+
}] } });
|
|
3736
|
+
|
|
3737
|
+
class UicStatusLabelComponent {
|
|
3738
|
+
color = 'grey';
|
|
3739
|
+
type = 'status';
|
|
3740
|
+
icon = 'ri-circle-fill';
|
|
3741
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicStatusLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3742
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicStatusLabelComponent, isStandalone: true, selector: "ui-status-label", inputs: { color: "color", type: "type", icon: "icon" }, ngImport: i0, template: "<div [class]=\"'status-label sl-' + type + ' ' + (type == 'status' ? 'slc-' : 'slt-') + color\" >\r\n @if (type == 'status') {\r\n <i [class]=\"icon\"></i>\r\n }\r\n <div class=\"sl-text\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".status-label{display:flex;align-items:center;border-radius:6px;white-space:nowrap;padding:0 8px;width:fit-content;border:solid 1px var(--grey-300);font-size:12px;line-height:18px;font-weight:500}.status-label i{font-size:10px;margin-right:6px}.slc-primary{color:var(--primary-500);border-color:var(--primary-500);background-color:var(--primary-50)}.slc-red{color:var(--red-500);border-color:var(--red-500);background-color:var(--red-50)}.slc-blue{border-color:var(--blue-600);color:var(--blue-600);background-color:var(--blue-100)}.slc-green{border-color:var(--green-500);color:var(--green-500);background-color:var(--green-50)}.slc-yellow{border-color:var(--yellow-500);color:var(--yellow-500);background-color:var(--yellow-50)}.slc-black{border-color:var(--grey-900);color:var(--grey-900);background-color:var(--grey-50)}.slc-grey{border-color:var(--grey-300);color:var(--grey-300);background-color:var(--grey-50)}.sl-text{color:var(--grey-600)}.sl-tag{border:none}.sl-tag .sl-text{color:var(--white)}.slt-primary{background-color:var(--primary-600)}.slt-red{background-color:var(--red-600)}.slt-blue{background-color:var(--blue-600)}.slt-green{background-color:var(--green-600)}.slt-yellow{background-color:var(--yellow-600)}.slt-black,.slt-grey{background-color:var(--grey-600)}\n"] });
|
|
3743
|
+
}
|
|
3744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicStatusLabelComponent, decorators: [{
|
|
3745
|
+
type: Component,
|
|
3746
|
+
args: [{ selector: 'ui-status-label', imports: [], template: "<div [class]=\"'status-label sl-' + type + ' ' + (type == 'status' ? 'slc-' : 'slt-') + color\" >\r\n @if (type == 'status') {\r\n <i [class]=\"icon\"></i>\r\n }\r\n <div class=\"sl-text\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".status-label{display:flex;align-items:center;border-radius:6px;white-space:nowrap;padding:0 8px;width:fit-content;border:solid 1px var(--grey-300);font-size:12px;line-height:18px;font-weight:500}.status-label i{font-size:10px;margin-right:6px}.slc-primary{color:var(--primary-500);border-color:var(--primary-500);background-color:var(--primary-50)}.slc-red{color:var(--red-500);border-color:var(--red-500);background-color:var(--red-50)}.slc-blue{border-color:var(--blue-600);color:var(--blue-600);background-color:var(--blue-100)}.slc-green{border-color:var(--green-500);color:var(--green-500);background-color:var(--green-50)}.slc-yellow{border-color:var(--yellow-500);color:var(--yellow-500);background-color:var(--yellow-50)}.slc-black{border-color:var(--grey-900);color:var(--grey-900);background-color:var(--grey-50)}.slc-grey{border-color:var(--grey-300);color:var(--grey-300);background-color:var(--grey-50)}.sl-text{color:var(--grey-600)}.sl-tag{border:none}.sl-tag .sl-text{color:var(--white)}.slt-primary{background-color:var(--primary-600)}.slt-red{background-color:var(--red-600)}.slt-blue{background-color:var(--blue-600)}.slt-green{background-color:var(--green-600)}.slt-yellow{background-color:var(--yellow-600)}.slt-black,.slt-grey{background-color:var(--grey-600)}\n"] }]
|
|
3747
|
+
}], propDecorators: { color: [{
|
|
3748
|
+
type: Input
|
|
3749
|
+
}], type: [{
|
|
3750
|
+
type: Input
|
|
3751
|
+
}], icon: [{
|
|
3752
|
+
type: Input
|
|
3753
|
+
}] } });
|
|
3754
|
+
|
|
3755
|
+
const MODAL_DATA = 'MODAL_DATA';
|
|
3756
|
+
const MODAL_COMPONENT = 'MODAL_COMPONENT';
|
|
3757
|
+
const MODAL_CONFIG = 'MODAL_CONFIG';
|
|
3758
|
+
const MODAL_CLOSE_EVENT = 'modalClosed';
|
|
3759
|
+
const MODAL_CLOSE_REQUEST = 'modalCloserRequested';
|
|
3760
|
+
|
|
3761
|
+
class UiModalRef {
|
|
3762
|
+
overlayRef;
|
|
3763
|
+
modalService;
|
|
3764
|
+
_afterClosed = new Subject();
|
|
3765
|
+
constructor(overlayRef, modalService) {
|
|
3766
|
+
this.overlayRef = overlayRef;
|
|
3767
|
+
this.modalService = modalService;
|
|
3867
3768
|
}
|
|
3868
|
-
|
|
3869
|
-
this.
|
|
3870
|
-
this.
|
|
3769
|
+
close(result = null) {
|
|
3770
|
+
this.modalService.close(this.overlayRef, result);
|
|
3771
|
+
this._afterClosed.next({ status: result != null, data: result });
|
|
3772
|
+
this._afterClosed.complete();
|
|
3871
3773
|
}
|
|
3872
|
-
|
|
3873
|
-
this.
|
|
3874
|
-
this.
|
|
3774
|
+
closeFloating(result = null) {
|
|
3775
|
+
this.modalService.closeFloating(this.overlayRef, result);
|
|
3776
|
+
this._afterClosed.next({ status: result != null, data: result });
|
|
3777
|
+
this._afterClosed.complete();
|
|
3875
3778
|
}
|
|
3876
|
-
|
|
3877
|
-
this.
|
|
3878
|
-
sortBy: this.sortKey,
|
|
3879
|
-
isSortAscending: this.sortAsc,
|
|
3880
|
-
pageNumber: this.page,
|
|
3881
|
-
pageSize: this.size,
|
|
3882
|
-
filter: this.filter
|
|
3883
|
-
});
|
|
3779
|
+
afterClosed() {
|
|
3780
|
+
return this._afterClosed.asObservable();
|
|
3884
3781
|
}
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
class TinyAlertComponent {
|
|
3785
|
+
modalRef;
|
|
3786
|
+
data;
|
|
3787
|
+
constructor(inData, modalRef) {
|
|
3788
|
+
this.modalRef = modalRef;
|
|
3789
|
+
this.data = inData.alert;
|
|
3790
|
+
}
|
|
3791
|
+
response = {};
|
|
3792
|
+
close(value) {
|
|
3793
|
+
this.modalRef.closeFloating(value ? this.response : null);
|
|
3794
|
+
}
|
|
3795
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TinyAlertComponent, deps: [{ token: MODAL_DATA }, { token: UiModalRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3796
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TinyAlertComponent, isStandalone: true, selector: "ui-tiny-alert", ngImport: i0, template: "<div class=\"alert-wrapper\">\r\n @if (data.iconPath) {\r\n <img [src]=\"data.iconPath\" alt=\"\"> \r\n }@else{\r\n <i [class]=\"'alert-main-icon icon-'+data.type + ' ' + data.iconChar\" ></i>\r\n }\r\n <h3 [class]=\"'icon-'+data.type\"> {{data.title}} </h3>\r\n <div class=\"alert-body\" [innerHTML]=\"data.body\"> </div>\r\n <div class=\"tinyalert-buttons\">\r\n @if (data.showCancelButton) {\r\n <ui-button (click)=\"close(false)\" type=\"bordered\" [color]=\"data.cancelButtonColor??'black'\" size=\"l\"> {{data.cancelButtonText??'Cancelar'}} </ui-button>\r\n }\r\n <ui-button (click)=\"close(true)\" [color]=\"data.okButtonColor??'primary'\" size=\"l\"> {{data.okButtonText??'Continuar'}} </ui-button>\r\n </div>\r\n <button class=\"floating-close\" (click)=\"close(false)\" >\r\n <i class=\"ri-close-line\"></i>\r\n </button>\r\n</div>\r\n", styles: [".alert-wrapper{position:relative;display:flex;flex-direction:column;align-items:center;padding:20px 20px 5px;width:400px;max-width:100%;-webkit-user-select:none;user-select:none}.alert-wrapper img{height:88px;margin-bottom:20px}.tinyalert-buttons{padding-top:20px;display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}h3{font-size:24px;font-weight:800;margin-bottom:10px}.alert-body{font-size:18px;font-weight:500;line-height:24px;text-align:center;color:var(--grey-700)}.floating-close{position:absolute;top:-10px;right:-20px;background-color:transparent;font-size:28px;border:none;cursor:pointer;transition:ease .3s}.floating-close:hover{color:var(--red-500)}@media (max-width: 479px){.floating-close{top:0;right:-5px}}.alert-main-icon{font-size:80px;margin-bottom:10px}.icon-error{color:var(--red-500)}.icon-delete{color:var(--red-800)}.icon-warning{color:var(--yellow-500)}.icon-info{color:var(--blue-800)}.icon-success{color:var(--green-500)}\n"], dependencies: [{ kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }] });
|
|
3797
|
+
}
|
|
3798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TinyAlertComponent, decorators: [{
|
|
3799
|
+
type: Component,
|
|
3800
|
+
args: [{ selector: 'ui-tiny-alert', imports: [UicButtonComponent], template: "<div class=\"alert-wrapper\">\r\n @if (data.iconPath) {\r\n <img [src]=\"data.iconPath\" alt=\"\"> \r\n }@else{\r\n <i [class]=\"'alert-main-icon icon-'+data.type + ' ' + data.iconChar\" ></i>\r\n }\r\n <h3 [class]=\"'icon-'+data.type\"> {{data.title}} </h3>\r\n <div class=\"alert-body\" [innerHTML]=\"data.body\"> </div>\r\n <div class=\"tinyalert-buttons\">\r\n @if (data.showCancelButton) {\r\n <ui-button (click)=\"close(false)\" type=\"bordered\" [color]=\"data.cancelButtonColor??'black'\" size=\"l\"> {{data.cancelButtonText??'Cancelar'}} </ui-button>\r\n }\r\n <ui-button (click)=\"close(true)\" [color]=\"data.okButtonColor??'primary'\" size=\"l\"> {{data.okButtonText??'Continuar'}} </ui-button>\r\n </div>\r\n <button class=\"floating-close\" (click)=\"close(false)\" >\r\n <i class=\"ri-close-line\"></i>\r\n </button>\r\n</div>\r\n", styles: [".alert-wrapper{position:relative;display:flex;flex-direction:column;align-items:center;padding:20px 20px 5px;width:400px;max-width:100%;-webkit-user-select:none;user-select:none}.alert-wrapper img{height:88px;margin-bottom:20px}.tinyalert-buttons{padding-top:20px;display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem}h3{font-size:24px;font-weight:800;margin-bottom:10px}.alert-body{font-size:18px;font-weight:500;line-height:24px;text-align:center;color:var(--grey-700)}.floating-close{position:absolute;top:-10px;right:-20px;background-color:transparent;font-size:28px;border:none;cursor:pointer;transition:ease .3s}.floating-close:hover{color:var(--red-500)}@media (max-width: 479px){.floating-close{top:0;right:-5px}}.alert-main-icon{font-size:80px;margin-bottom:10px}.icon-error{color:var(--red-500)}.icon-delete{color:var(--red-800)}.icon-warning{color:var(--yellow-500)}.icon-info{color:var(--blue-800)}.icon-success{color:var(--green-500)}\n"] }]
|
|
3801
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3802
|
+
type: Inject,
|
|
3803
|
+
args: [MODAL_DATA]
|
|
3804
|
+
}] }, { type: UiModalRef, decorators: [{
|
|
3805
|
+
type: Inject,
|
|
3806
|
+
args: [UiModalRef]
|
|
3807
|
+
}] }] });
|
|
3808
|
+
|
|
3809
|
+
const pushTop = trigger('pushTop', [
|
|
3810
|
+
transition(':enter', [style({ opacity: 0, transform: 'translateY(20px)' }), animate('.3s ease', style({ opacity: 1, transform: 'translateY(0)' }))]),
|
|
3811
|
+
transition(':leave', [animate('.3s ease', style({ opacity: 0, transform: 'translateY(-20px)' }))])
|
|
3812
|
+
]);
|
|
3813
|
+
|
|
3814
|
+
class UicModalComponent {
|
|
3815
|
+
modalRef;
|
|
3816
|
+
component;
|
|
3817
|
+
congif;
|
|
3818
|
+
injector;
|
|
3819
|
+
myConfig = {};
|
|
3820
|
+
ready = false;
|
|
3821
|
+
title = '';
|
|
3822
|
+
portalOutlet;
|
|
3823
|
+
constructor(modalRef, component, congif, injector) {
|
|
3824
|
+
this.modalRef = modalRef;
|
|
3825
|
+
this.component = component;
|
|
3826
|
+
this.congif = congif;
|
|
3827
|
+
this.injector = injector;
|
|
3828
|
+
this.myConfig = congif;
|
|
3829
|
+
}
|
|
3830
|
+
ngAfterViewInit() {
|
|
3831
|
+
const childInjector = Injector.create({
|
|
3832
|
+
providers: [
|
|
3833
|
+
{ provide: UiModalRef, useValue: this.modalRef },
|
|
3834
|
+
{ provide: MODAL_DATA, useValue: this.congif.data }
|
|
3835
|
+
],
|
|
3836
|
+
parent: this.injector
|
|
3837
|
+
});
|
|
3838
|
+
const portal = new ComponentPortal(this.component, null, childInjector);
|
|
3839
|
+
this.portalOutlet.attachComponentPortal(portal);
|
|
3840
|
+
}
|
|
3841
|
+
closeOuside() {
|
|
3842
|
+
if (this.congif.preventCloseingOutside === true)
|
|
3843
|
+
return;
|
|
3844
|
+
this.modalRef.closeFloating(null);
|
|
3845
|
+
}
|
|
3846
|
+
close() {
|
|
3847
|
+
this.modalRef.closeFloating(null);
|
|
3848
|
+
}
|
|
3849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalComponent, deps: [{ token: UiModalRef }, { token: MODAL_COMPONENT }, { token: MODAL_CONFIG }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
3850
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicModalComponent, isStandalone: true, selector: "ui-modal", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<div class=\"backdrop\" (click)=\"closeOuside()\"> \r\n <div @pushTop class=\"modal\" \r\n [class]=\"myConfig.size\"\r\n (click)=\"$event.stopPropagation()\">\r\n \r\n @if ( myConfig.title) {\r\n <div class=\"modal-header\">\r\n {{myConfig.title}}\r\n <ui-button color=\"red\" type=\"ghost\" icon=\"ri-close-large-line\" (click)=\"close()\" [iconOnly]=\"true\"></ui-button>\r\n </div>\r\n }\r\n <div class=\"modal-body\" [class.body-padding]=\"myConfig.title!='' && !myConfig.noPadding\">\r\n <ng-template cdkPortalOutlet></ng-template>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".backdrop{position:fixed;width:100%;height:100vh;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center}@media (max-width: 479px){.backdrop{align-items:flex-start;padding-top:20px}}.modal{background:var(--white);border-radius:20px;min-width:300px;max-width:90%;height:fit-content;max-height:90vh;box-shadow:0 20px 70px #00000052;padding:0 10px;display:flex;flex-direction:column}.modal-header{padding:0 15px;width:100%;display:flex;align-items:center;font-size:22px;font-weight:600;justify-content:space-between;margin:0 auto;color:var(--primary-500);height:63px;border-bottom:solid 1px var(--primary-500)}@media (max-width: 479px){.modal-header{padding:5px}}.modal-body{flex:1 1;overflow-y:auto}.body-padding{padding:25px}@media (max-width: 479px){.body-padding{padding:10px}}.medium{width:70%;max-width:800px;max-height:80%}@media (max-width: 479px){.medium{width:90%}}.large{width:80%;max-width:900px}@media (max-width: 479px){.large{width:95%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }], animations: [pushTop] });
|
|
3851
|
+
}
|
|
3852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalComponent, decorators: [{
|
|
3853
|
+
type: Component,
|
|
3854
|
+
args: [{ selector: 'ui-modal', imports: [CommonModule, PortalModule, UicButtonComponent], animations: [pushTop], template: "<div class=\"backdrop\" (click)=\"closeOuside()\"> \r\n <div @pushTop class=\"modal\" \r\n [class]=\"myConfig.size\"\r\n (click)=\"$event.stopPropagation()\">\r\n \r\n @if ( myConfig.title) {\r\n <div class=\"modal-header\">\r\n {{myConfig.title}}\r\n <ui-button color=\"red\" type=\"ghost\" icon=\"ri-close-large-line\" (click)=\"close()\" [iconOnly]=\"true\"></ui-button>\r\n </div>\r\n }\r\n <div class=\"modal-body\" [class.body-padding]=\"myConfig.title!='' && !myConfig.noPadding\">\r\n <ng-template cdkPortalOutlet></ng-template>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".backdrop{position:fixed;width:100%;height:100vh;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center}@media (max-width: 479px){.backdrop{align-items:flex-start;padding-top:20px}}.modal{background:var(--white);border-radius:20px;min-width:300px;max-width:90%;height:fit-content;max-height:90vh;box-shadow:0 20px 70px #00000052;padding:0 10px;display:flex;flex-direction:column}.modal-header{padding:0 15px;width:100%;display:flex;align-items:center;font-size:22px;font-weight:600;justify-content:space-between;margin:0 auto;color:var(--primary-500);height:63px;border-bottom:solid 1px var(--primary-500)}@media (max-width: 479px){.modal-header{padding:5px}}.modal-body{flex:1 1;overflow-y:auto}.body-padding{padding:25px}@media (max-width: 479px){.body-padding{padding:10px}}.medium{width:70%;max-width:800px;max-height:80%}@media (max-width: 479px){.medium{width:90%}}.large{width:80%;max-width:900px}@media (max-width: 479px){.large{width:95%}}\n"] }]
|
|
3855
|
+
}], ctorParameters: () => [{ type: UiModalRef, decorators: [{
|
|
3856
|
+
type: Inject,
|
|
3857
|
+
args: [UiModalRef]
|
|
3858
|
+
}] }, { type: i0.Type, decorators: [{
|
|
3859
|
+
type: Inject,
|
|
3860
|
+
args: [MODAL_COMPONENT]
|
|
3861
|
+
}] }, { type: undefined, decorators: [{
|
|
3862
|
+
type: Inject,
|
|
3863
|
+
args: [MODAL_CONFIG]
|
|
3864
|
+
}] }, { type: i0.Injector }], propDecorators: { portalOutlet: [{
|
|
3865
|
+
type: ViewChild,
|
|
3866
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
3867
|
+
}] } });
|
|
3868
|
+
|
|
3869
|
+
const sideModal = trigger('sideModal', [
|
|
3870
|
+
state('visible', style({ transform: 'translateX(0)' })),
|
|
3871
|
+
state('hidden', style({ transform: 'translateX(100%)' })),
|
|
3872
|
+
// animación al CREARSE
|
|
3873
|
+
transition('void => visible', [
|
|
3874
|
+
style({ opacity: .8, transform: 'translateX(100%)' }),
|
|
3875
|
+
animate('.5s ease')
|
|
3876
|
+
]),
|
|
3877
|
+
// animación al CERRAR
|
|
3878
|
+
transition('visible => hidden', [
|
|
3879
|
+
animate('.5s ease')
|
|
3880
|
+
])
|
|
3881
|
+
]);
|
|
3882
|
+
const fadeBackdrop = trigger('fadeBackdrop', [
|
|
3883
|
+
state('visible', style({ opacity: 1 })),
|
|
3884
|
+
state('hidden', style({ opacity: 0 })),
|
|
3885
|
+
transition('void => visible', [
|
|
3886
|
+
style({ opacity: 0 }),
|
|
3887
|
+
animate('300ms ease-out')
|
|
3888
|
+
]),
|
|
3889
|
+
transition('visible => hidden', [
|
|
3890
|
+
animate('300ms ease-in')
|
|
3891
|
+
])
|
|
3892
|
+
]);
|
|
3893
|
+
|
|
3894
|
+
class UicSideModalComponent {
|
|
3895
|
+
modalRef;
|
|
3896
|
+
component;
|
|
3897
|
+
congif;
|
|
3898
|
+
injector;
|
|
3899
|
+
modal;
|
|
3900
|
+
overlayRef; // lo setea el servicio
|
|
3901
|
+
state = 'visible';
|
|
3902
|
+
show = true;
|
|
3903
|
+
myConfig = {};
|
|
3904
|
+
ready = false;
|
|
3905
|
+
portalOutlet;
|
|
3906
|
+
constructor(modalRef, component, congif, injector, modal) {
|
|
3907
|
+
this.modalRef = modalRef;
|
|
3908
|
+
this.component = component;
|
|
3909
|
+
this.congif = congif;
|
|
3910
|
+
this.injector = injector;
|
|
3911
|
+
this.modal = modal;
|
|
3912
|
+
this.myConfig = congif;
|
|
3913
|
+
}
|
|
3914
|
+
ngOnInit() {
|
|
3915
|
+
if (this.overlayRef) {
|
|
3916
|
+
this.overlayRef.hostElement.addEventListener(MODAL_CLOSE_REQUEST, () => {
|
|
3917
|
+
this.close();
|
|
3918
|
+
});
|
|
3919
|
+
}
|
|
3920
|
+
}
|
|
3921
|
+
ngAfterViewInit() {
|
|
3922
|
+
const childInjector = Injector.create({
|
|
3923
|
+
providers: [
|
|
3924
|
+
{ provide: UiModalRef, useValue: this.modalRef },
|
|
3925
|
+
{ provide: MODAL_DATA, useValue: this.congif.data }
|
|
3926
|
+
],
|
|
3927
|
+
parent: this.injector
|
|
3928
|
+
});
|
|
3929
|
+
const portal = new ComponentPortal(this.component, null, childInjector);
|
|
3930
|
+
this.portalOutlet.attachComponentPortal(portal);
|
|
3931
|
+
}
|
|
3932
|
+
closeOuside() {
|
|
3933
|
+
if (this.congif.preventCloseingOutside === true)
|
|
3934
|
+
return;
|
|
3935
|
+
this.close();
|
|
3936
|
+
}
|
|
3937
|
+
close() {
|
|
3938
|
+
this.state = 'hidden';
|
|
3939
|
+
}
|
|
3940
|
+
cancel() {
|
|
3941
|
+
if (this.myConfig.preventCloseOnCancel) {
|
|
3942
|
+
this.modal.triggerSave(false);
|
|
3888
3943
|
}
|
|
3889
3944
|
else {
|
|
3890
|
-
this.
|
|
3945
|
+
this.close();
|
|
3891
3946
|
}
|
|
3892
|
-
this.areAllSelected();
|
|
3893
|
-
this.checkedChange.emit(Array.from(this.checkedIds));
|
|
3894
3947
|
}
|
|
3895
|
-
|
|
3896
|
-
if (
|
|
3897
|
-
this.
|
|
3948
|
+
onAnimationDone(event) {
|
|
3949
|
+
if (event.toState === 'hidden' && event.triggerName === 'sideModal') {
|
|
3950
|
+
this.overlayRef.dispose();
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
save() {
|
|
3954
|
+
this.modal.triggerSave();
|
|
3955
|
+
}
|
|
3956
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSideModalComponent, deps: [{ token: UiModalRef }, { token: MODAL_COMPONENT }, { token: MODAL_CONFIG }, { token: i0.Injector }, { token: UicModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3957
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicSideModalComponent, isStandalone: true, selector: "ui-side-modal", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], ngImport: i0, template: "<div [@fadeBackdrop]=\"state\" class=\"backdrop\" (click)=\"closeOuside()\"> \r\n</div>\r\n<div [@sideModal]=\"state\" \r\n (@sideModal.done)=\"onAnimationDone($event)\" \r\n class=\"sidemodal\" \r\n [style.width]=\"myConfig.width??'60%'\" \r\n (click)=\"$event.stopPropagation()\">\r\n @if (myConfig.headerEnabled) {\r\n <div class=\"modal-header\">\r\n <div class=\"modal-header-title\">\r\n <div class=\"f-title\">{{myConfig.title}}</div>\r\n <div class=\"f-subtitle\">{{myConfig.subtitle}}</div>\r\n </div>\r\n <ui-button class=\"close-icon\" (click)=\"close()\" icon=\"ri-close-large-line\" type=\"ghost\" color=\"black\" [iconOnly]=\"true\" size=\"m\"></ui-button>\r\n </div>\r\n }\r\n <div class=\"sidemodal-body\" [class.nopadding]=\"myConfig.noPadding\" >\r\n <ng-template cdkPortalOutlet></ng-template>\r\n </div>\r\n @if (myConfig.footerEnabled) {\r\n <div class=\"sidemodal-footer\">\r\n @if (myConfig.showCancelButton) {\r\n <ui-button (click)=\"cancel()\" color=\"black\" size=\"l\" type=\"bordered\" [icon]=\"myConfig.footerCancelIcon??'ri-close-line'\">{{myConfig.footerCancelButtonText??'Cancelar'}}</ui-button>\r\n }\r\n <ui-button (click)=\"save()\" color=\"black\" size=\"l\" [rightIcon]=\"myConfig.footerOkIcon??'ri-check-line'\">{{myConfig.footerOkButtonText??'Siguiente'}}</ui-button>\r\n </div>\r\n }\r\n</div>", styles: ["::ng-deep .side-modal-panel{position:fixed!important;top:0;right:0;height:100%;width:400px;background:#fff;z-index:2000;box-shadow:-2px 0 8px #0003;display:flex;flex-direction:column}.modal-header{width:100%;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--grey-100);padding:5px}.modal-header-title{font-size:20px;font-weight:600;padding-left:20px}@media (max-width: 479px){.modal-header{right:10px;top:10px}}.f-subtitle{font-weight:400;font-size:16px;color:var(--grey-500)}.backdrop{position:fixed;inset:0;width:100%;height:100vh;background-color:#00000080;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;justify-content:flex-end}.sidemodal{position:fixed;right:0;top:0;height:100%;background-color:var(--white);display:flex;flex-direction:column}@media (max-width: 479px){.sidemodal{width:100%!important}}@media (min-width: 480px) and (max-width: 767px){.sidemodal{width:90%!important}}.sidemodal-header{height:30px;width:100%;padding:0 30px;display:flex;align-items:center;justify-content:space-between}.sidemodal-body{flex:1;overflow-y:auto;padding:25px}@media (max-width: 479px){.sidemodal-body{padding:10px}}.sidemodal-footer{height:calc(7 * var(--design-size-ref));padding:0 calc(2 * var(--design-size-ref));width:100%;display:flex;align-items:center;gap:8px;justify-content:flex-end;border-top:1px solid var(--grey-300)}.nopadding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }], animations: [sideModal, fadeBackdrop] });
|
|
3958
|
+
}
|
|
3959
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSideModalComponent, decorators: [{
|
|
3960
|
+
type: Component,
|
|
3961
|
+
args: [{ selector: 'ui-side-modal', imports: [PortalModule, UicButtonComponent], animations: [sideModal, fadeBackdrop], template: "<div [@fadeBackdrop]=\"state\" class=\"backdrop\" (click)=\"closeOuside()\"> \r\n</div>\r\n<div [@sideModal]=\"state\" \r\n (@sideModal.done)=\"onAnimationDone($event)\" \r\n class=\"sidemodal\" \r\n [style.width]=\"myConfig.width??'60%'\" \r\n (click)=\"$event.stopPropagation()\">\r\n @if (myConfig.headerEnabled) {\r\n <div class=\"modal-header\">\r\n <div class=\"modal-header-title\">\r\n <div class=\"f-title\">{{myConfig.title}}</div>\r\n <div class=\"f-subtitle\">{{myConfig.subtitle}}</div>\r\n </div>\r\n <ui-button class=\"close-icon\" (click)=\"close()\" icon=\"ri-close-large-line\" type=\"ghost\" color=\"black\" [iconOnly]=\"true\" size=\"m\"></ui-button>\r\n </div>\r\n }\r\n <div class=\"sidemodal-body\" [class.nopadding]=\"myConfig.noPadding\" >\r\n <ng-template cdkPortalOutlet></ng-template>\r\n </div>\r\n @if (myConfig.footerEnabled) {\r\n <div class=\"sidemodal-footer\">\r\n @if (myConfig.showCancelButton) {\r\n <ui-button (click)=\"cancel()\" color=\"black\" size=\"l\" type=\"bordered\" [icon]=\"myConfig.footerCancelIcon??'ri-close-line'\">{{myConfig.footerCancelButtonText??'Cancelar'}}</ui-button>\r\n }\r\n <ui-button (click)=\"save()\" color=\"black\" size=\"l\" [rightIcon]=\"myConfig.footerOkIcon??'ri-check-line'\">{{myConfig.footerOkButtonText??'Siguiente'}}</ui-button>\r\n </div>\r\n }\r\n</div>", styles: ["::ng-deep .side-modal-panel{position:fixed!important;top:0;right:0;height:100%;width:400px;background:#fff;z-index:2000;box-shadow:-2px 0 8px #0003;display:flex;flex-direction:column}.modal-header{width:100%;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--grey-100);padding:5px}.modal-header-title{font-size:20px;font-weight:600;padding-left:20px}@media (max-width: 479px){.modal-header{right:10px;top:10px}}.f-subtitle{font-weight:400;font-size:16px;color:var(--grey-500)}.backdrop{position:fixed;inset:0;width:100%;height:100vh;background-color:#00000080;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;justify-content:flex-end}.sidemodal{position:fixed;right:0;top:0;height:100%;background-color:var(--white);display:flex;flex-direction:column}@media (max-width: 479px){.sidemodal{width:100%!important}}@media (min-width: 480px) and (max-width: 767px){.sidemodal{width:90%!important}}.sidemodal-header{height:30px;width:100%;padding:0 30px;display:flex;align-items:center;justify-content:space-between}.sidemodal-body{flex:1;overflow-y:auto;padding:25px}@media (max-width: 479px){.sidemodal-body{padding:10px}}.sidemodal-footer{height:calc(7 * var(--design-size-ref));padding:0 calc(2 * var(--design-size-ref));width:100%;display:flex;align-items:center;gap:8px;justify-content:flex-end;border-top:1px solid var(--grey-300)}.nopadding{padding:0}\n"] }]
|
|
3962
|
+
}], ctorParameters: () => [{ type: UiModalRef, decorators: [{
|
|
3963
|
+
type: Inject,
|
|
3964
|
+
args: [UiModalRef]
|
|
3965
|
+
}] }, { type: i0.Type, decorators: [{
|
|
3966
|
+
type: Inject,
|
|
3967
|
+
args: [MODAL_COMPONENT]
|
|
3968
|
+
}] }, { type: undefined, decorators: [{
|
|
3969
|
+
type: Inject,
|
|
3970
|
+
args: [MODAL_CONFIG]
|
|
3971
|
+
}] }, { type: i0.Injector }, { type: UicModalService }], propDecorators: { portalOutlet: [{
|
|
3972
|
+
type: ViewChild,
|
|
3973
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
3974
|
+
}] } });
|
|
3975
|
+
|
|
3976
|
+
class UicModalService {
|
|
3977
|
+
overlay = inject(Overlay);
|
|
3978
|
+
envInjector = inject(EnvironmentInjector);
|
|
3979
|
+
openFloatingModal(component, config = {}) {
|
|
3980
|
+
return this.openModal(component, config, true);
|
|
3981
|
+
}
|
|
3982
|
+
openSideModal(component, config = {}) {
|
|
3983
|
+
return this.openModal(component, config, false);
|
|
3984
|
+
}
|
|
3985
|
+
openModal(component, config = {}, isFloating = false) {
|
|
3986
|
+
const overlayConfig = this.createOverlayConfig(isFloating);
|
|
3987
|
+
const overlayRef = this.overlay.create(overlayConfig);
|
|
3988
|
+
const modalRef = new UiModalRef(overlayRef, this);
|
|
3989
|
+
const injector = this.createModalInjector(overlayRef, modalRef, component, config);
|
|
3990
|
+
if (isFloating) {
|
|
3991
|
+
const modalPortal = new ComponentPortal(UicModalComponent, null, injector);
|
|
3992
|
+
overlayRef.attach(modalPortal);
|
|
3898
3993
|
}
|
|
3899
3994
|
else {
|
|
3900
|
-
|
|
3995
|
+
const modalPortal = new ComponentPortal(UicSideModalComponent, null, injector);
|
|
3996
|
+
const componentRef = overlayRef.attach(modalPortal);
|
|
3997
|
+
componentRef.instance.overlayRef = overlayRef;
|
|
3901
3998
|
}
|
|
3902
|
-
|
|
3999
|
+
return modalRef;
|
|
3903
4000
|
}
|
|
3904
|
-
|
|
3905
|
-
|
|
4001
|
+
close(overlayRef, result = null) {
|
|
4002
|
+
overlayRef.hostElement.dispatchEvent(new CustomEvent(MODAL_CLOSE_REQUEST, { detail: result }));
|
|
3906
4003
|
}
|
|
3907
|
-
|
|
3908
|
-
|
|
4004
|
+
closeFloating(overlayRef, result = null) {
|
|
4005
|
+
overlayRef.backdropElement?.dispatchEvent(new CustomEvent(MODAL_CLOSE_EVENT, { detail: result }));
|
|
4006
|
+
overlayRef.dispose();
|
|
3909
4007
|
}
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
4008
|
+
_save$ = new Subject();
|
|
4009
|
+
save$ = this._save$.asObservable();
|
|
4010
|
+
triggerSave(result = true) {
|
|
4011
|
+
this._save$.next(result);
|
|
3913
4012
|
}
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
4013
|
+
createOverlayConfig(isFloating) {
|
|
4014
|
+
const positionStrategy = isFloating
|
|
4015
|
+
? this.overlay.position().global().left()
|
|
4016
|
+
: this.overlay.position().global().right();
|
|
4017
|
+
return {
|
|
4018
|
+
hasBackdrop: true,
|
|
4019
|
+
backdropClass: 'cdk-overlay-dark-backdrop',
|
|
4020
|
+
positionStrategy,
|
|
4021
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
4022
|
+
disposeOnNavigation: true,
|
|
4023
|
+
};
|
|
3917
4024
|
}
|
|
3918
|
-
|
|
3919
|
-
|
|
4025
|
+
createModalInjector(overlayRef, modalRef, component, config) {
|
|
4026
|
+
return Injector.create({
|
|
4027
|
+
providers: [
|
|
4028
|
+
{ provide: OverlayRef, useValue: overlayRef },
|
|
4029
|
+
{ provide: UiModalRef, useValue: modalRef },
|
|
4030
|
+
{ provide: MODAL_COMPONENT, useValue: component },
|
|
4031
|
+
{ provide: MODAL_CONFIG, useValue: config }
|
|
4032
|
+
],
|
|
4033
|
+
parent: this.envInjector,
|
|
4034
|
+
});
|
|
3920
4035
|
}
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
4036
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4037
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalService, providedIn: 'root' });
|
|
4038
|
+
}
|
|
4039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalService, decorators: [{
|
|
4040
|
+
type: Injectable,
|
|
4041
|
+
args: [{
|
|
4042
|
+
providedIn: 'root'
|
|
4043
|
+
}]
|
|
4044
|
+
}] });
|
|
4045
|
+
|
|
4046
|
+
let nextId = 1;
|
|
4047
|
+
function createTinySuccess(body, options) {
|
|
4048
|
+
return {
|
|
4049
|
+
body,
|
|
4050
|
+
title: 'Operación exitosa',
|
|
4051
|
+
type: 'success',
|
|
4052
|
+
iconChar: 'ri-emotion-laugh-line',
|
|
4053
|
+
okButtonColor: 'green',
|
|
4054
|
+
...options,
|
|
4055
|
+
};
|
|
4056
|
+
}
|
|
4057
|
+
function createTinyError(body, options) {
|
|
4058
|
+
return {
|
|
4059
|
+
body,
|
|
4060
|
+
title: 'Se produjo un error',
|
|
4061
|
+
iconChar: 'ri-emotion-unhappy-line',
|
|
4062
|
+
okButtonColor: 'red',
|
|
4063
|
+
okButtonText: 'Cerrar',
|
|
4064
|
+
type: 'error',
|
|
4065
|
+
...options,
|
|
4066
|
+
};
|
|
4067
|
+
}
|
|
4068
|
+
function createTinyDelete(body, options) {
|
|
4069
|
+
return {
|
|
4070
|
+
body,
|
|
4071
|
+
title: 'Cornfirmación de acción',
|
|
4072
|
+
iconChar: 'ri-delete-bin-line',
|
|
4073
|
+
okButtonColor: 'red',
|
|
4074
|
+
okButtonText: 'Sí, eliminar',
|
|
4075
|
+
showCancelButton: true,
|
|
4076
|
+
cancelButtonText: 'Cancelar',
|
|
4077
|
+
type: 'delete',
|
|
4078
|
+
...options,
|
|
4079
|
+
};
|
|
4080
|
+
}
|
|
4081
|
+
function createTinyWarning(body, options) {
|
|
4082
|
+
return {
|
|
4083
|
+
body,
|
|
4084
|
+
title: '¡Cuidado!',
|
|
4085
|
+
iconChar: 'ri-alarm-warning-line',
|
|
4086
|
+
okButtonColor: 'yellow',
|
|
4087
|
+
type: 'warning',
|
|
4088
|
+
...options,
|
|
4089
|
+
};
|
|
4090
|
+
}
|
|
4091
|
+
function createTinyInfo(body, options) {
|
|
4092
|
+
return {
|
|
4093
|
+
body,
|
|
4094
|
+
iconChar: 'ri-information-line',
|
|
4095
|
+
okButtonColor: 'black',
|
|
4096
|
+
type: 'info',
|
|
4097
|
+
...options,
|
|
4098
|
+
};
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4101
|
+
class UicTinyAlertService {
|
|
4102
|
+
modal = inject(UicModalService);
|
|
4103
|
+
showAlert(data) {
|
|
4104
|
+
return new Promise((resolve) => {
|
|
4105
|
+
this.modal.openFloatingModal(TinyAlertComponent, {
|
|
4106
|
+
data: { alert: data }
|
|
4107
|
+
}).afterClosed().subscribe(result => {
|
|
4108
|
+
resolve({
|
|
4109
|
+
value: result?.status,
|
|
4110
|
+
data: result?.data
|
|
4111
|
+
});
|
|
4112
|
+
});
|
|
4113
|
+
});
|
|
3924
4114
|
}
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
ngAfterContentInit() {
|
|
3928
|
-
this.hasActions = !!this.actionsRef;
|
|
4115
|
+
success(message, options) {
|
|
4116
|
+
return this.showAlert(createTinySuccess(message, options));
|
|
3929
4117
|
}
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
this.clickedRow.emit(id);
|
|
3933
|
-
if (this.rowExpandible) {
|
|
3934
|
-
if (this.fullViewRows.includes(id)) {
|
|
3935
|
-
this.fullViewRows = this.fullViewRows.filter(f => f != id);
|
|
3936
|
-
}
|
|
3937
|
-
else {
|
|
3938
|
-
this.fullViewRows.push(id);
|
|
3939
|
-
}
|
|
3940
|
-
}
|
|
4118
|
+
error(message, options) {
|
|
4119
|
+
return this.showAlert(createTinyError(message, options));
|
|
3941
4120
|
}
|
|
3942
|
-
|
|
3943
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableComponent, isStandalone: true, selector: "ui-table", inputs: { columns: "columns", data: "data", loading: "loading", disabled: "disabled", rowClickable: "rowClickable", rowExpandible: "rowExpandible", pages: "pages", size: "size", squeletonRows: "squeletonRows", buttonSize: "buttonSize", highlightedId: "highlightedId", headerText: "headerText", totalItems: "totalItems", alignment: "alignment", searchEnabled: "searchEnabled", searchLabel: "searchLabel", searchPlaceholder: "searchPlaceholder", headerClass: "headerClass", headerBackgroundColor: "headerBackgroundColor", striped: "striped", showPagination: "showPagination", searchOnKeydown: "searchOnKeydown", showEmptyMessage: "showEmptyMessage", showSearchButton: "showSearchButton", showTextPagination: "showTextPagination", emptyMessage: "emptyMessage", nextButtonText: "nextButtonText", previousButtonText: "previousButtonText", searcherShowButtonText: "searcherShowButtonText" }, outputs: { action: "action", update: "update", checkedChange: "checkedChange", switchChange: "switchChange", clickedRow: "clickedRow" }, queries: [{ propertyName: "actionsRef", first: true, predicate: ["[actions]"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if ( hasActions || searchEnabled){\r\n <div class=\"ui-table-filters\">\r\n @if (searchEnabled) {\r\n <uic-table-searcher \r\n [showSearchButton]=\"showSearchButton\" \r\n [showButtonText]=\"searcherShowButtonText\" \r\n [searchOnKeydown]=\"searchOnKeydown\"\r\n (filter)=\"search($event)\" \r\n [placeholder]=\"searchPlaceholder\" ></uic-table-searcher>\r\n }\r\n <div class=\"ui-filter-actions\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n </div>\r\n}\r\n<ng-content select=\"[filters]\"></ng-content>\r\n<div class=\"ui-table-wrapper\">\r\n @if (headerText) {\r\n <div class=\"ui-table-topbar\"> {{headerText}} <span class=\"hightlited-note\"> {{totalItems}} </span> </div>\r\n }\r\n <div class=\"ui-table-container\"> \r\n <table class=\"ui-table\" [class.ui-striped]=\"striped\">\r\n <thead>\r\n <tr [class]=\" headerClass || 'header-'+headerBackgroundColor\">\r\n @for (header of columns; track $index) {\r\n <th [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-th-wrap ui-alignment-'+alignment\" >\r\n @if (header.type=='checkbox') {\r\n <div>\r\n <ui-checkbox style=\"margin-right: 5px;\" [(ngModel)]=\"allSelected\" (ngModelChange)=\"toggleAll($event)\"></ui-checkbox>\r\n </div>\r\n }\r\n {{header.label.toUpperCase() }} \r\n @if (header.sortEnable) {\r\n <div class=\"ui-sort-arrow\" (click)=\"sortClick(header.key)\" [ngClass]=\"{'ui-sort-active':header.key == sortKey}\">\r\n <i [class]=\"(sortAsc||header.key != sortKey)?'ri-arrow-down-line':'ri-arrow-up-line'\"></i> \r\n </div>\r\n }\r\n </div>\r\n </th> \r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n\r\n @if (loading) {\r\n @for (item of [].constructor(squeletonRows); track $index) {\r\n <tr>\r\n @for (header of columns; track $index) {\r\n <td> <div class=\"ui-row-loader\"></div> </td>\r\n }\r\n </tr> \r\n }\r\n } @else {\r\n @for (row of data; track row.id) {\r\n <tr [@highlightRow]=\"highlightedId === row.id ? 'highlighted' : null\" \r\n [class.ui-tr-highlighted]=\"row.highlighted\"\r\n [class.clickable-row]=\"rowClickable\"\r\n (click)=\"clickRow(row.id)\"\r\n >\r\n @for (header of columns; track $index) {\r\n <!-- TIPOS DE HEADERS -->\r\n <td [class]=\"getFontColor(row.data,header.key)\"\r\n [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-cell-content ui-alignment-'+alignment\" \r\n [style.justify-content]=\"header.align||null\"\r\n [style.width.px]=\"header.width || null\">\r\n @if (header.type == 'text' || !header.type) {\r\n @let icon = getIcon(row.data,header.key); \r\n @let rightIcon = getIcon(row.data,header.key,true);\r\n @if( icon ){ <i [class]=\"icon\"></i>}\r\n {{ getValue(row.data,header.key) }} \r\n @if( rightIcon ){ <i [class]=\"rightIcon\"></i>}\r\n }\r\n @if (header.type == 'bigtext') {\r\n <div (click)=\"expand(row, $event)\" class=\"expandible-row\" [class.expandedrow]=\"row.expanded\">\r\n {{ getValue(row.data,header.key) }} \r\n <i [class]=\"row.expanded?'ri-arrow-up-s-line':'ri-arrow-down-s-line'\"></i>\r\n @if (!row.expanded) {\r\n <div class=\"fade-overlay\"></div>\r\n }\r\n </div>\r\n }\r\n @if (header.type == 'icon-list') {\r\n @for (alert of getList(row.data,header.key); track $index) {\r\n <i [tip]=\"alert.text\" [class]=\"alert.icon + ' ui-alert'\" ></i>\r\n }\r\n }\r\n @else if (header.type == 'list'){\r\n <uic-table-list [list]=\"getList(row.data,header.key)\"></uic-table-list> \r\n }\r\n @else if (header.type == 'user'){\r\n <uic-table-user [user]=\"getUser(row.data,header.key)\"></uic-table-user> \r\n }\r\n @else if (header.type == 'checkbox'){\r\n <ui-checkbox [disabled]=\"disabled\" [ngModel]=\"checkedIds.has(row.id)\" [placeholder]=\"getValue(row.data,header.key)\" (ngModelChange)=\"toggleSelection(row.id,$event)\" ></ui-checkbox> \r\n }\r\n @else if (header.type == 'status'){\r\n <ui-status-label [icon]=\"getIcon(row.data,header.key)??'ri-circle-fill'\" [color]=\"getBackgroundColor(row.data,header.key)\"> {{getValue(row.data,header.key)}} </ui-status-label> \r\n }\r\n @else if (header.type == 'tag'){\r\n <ui-status-label type=\"tag\" [icon]=\"getIcon(row.data,header.key)??'ri-circle-fill'\" [color]=\"getBackgroundColor(row.data,header.key)\"> {{getValue(row.data,header.key)}} </ui-status-label> \r\n }\r\n @else if (header.type == 'switch'){\r\n <div (click)=\"$event.stopPropagation()\">\r\n <ui-switch [disabled]=\"disabled\" [checked]=\"isChecked(row.data,header.key)\" (checkedChange)=\"switchHandler(row.id,$event,header.key)\"></ui-switch> \r\n </div>\r\n }\r\n @else if (header.type == 'actions') { \r\n <div class=\"ui-centered-cell-content\">\r\n @for (btn of header.actions; track $index) {\r\n @if (isValidRule(row.data,btn.rule)) {\r\n <ui-button \r\n [disabled]=\"loading\"\r\n [tip]=\"btn.tooltip??''\"\r\n size=\"s\"\r\n [disabled]=\"disabled\"\r\n [text]=\"btn.text??''\"\r\n [type]=\"btn.type??'filled'\"\r\n [iconOnly]=\"!btn.text\"\r\n [icon]=\"btn.icon??''\"\r\n [color]=\"btn.color??'black'\"\r\n (click)=\"doAction(row.id,btn.key,$event)\">\r\n </ui-button> \r\n }\r\n } \r\n @if ( header.moreActions && header.moreActions.length>0 ) {\r\n @for (ma of header.moreActions; track $index) {\r\n <ui-action-button [icon]=\"ma.icon??'ri-more-2-line'\" (optionSelected)=\"doAction(row.id,$event.id)\" [options]=\"getMoreActions(ma.actions||[],row.data)\"></ui-action-button>\r\n }\r\n }\r\n </div> \r\n }\r\n </div>\r\n @let subtext = getSubtext(row.data,header.key);\r\n @if( subtext ){\r\n <div [class]=\"'subtext ui-alignment-'+alignment\">{{subtext }}</div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n @if (fullViewRows.includes(row.id)) {\r\n <tr style=\"border-top: none ;\">\r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"full-space-row\">\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @empty {\r\n @if (showEmptyMessage) {\r\n <tr> \r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"ui-empty\">{{emptyMessage}} </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n @if (showPagination) {\r\n <uic-table-pagination \r\n [loading]=\"loading\" \r\n [totalPages]=\"pages\" \r\n [showText]=\"showTextPagination\"\r\n [size]=\"size\"\r\n [nextButtonText]=\"nextButtonText\"\r\n [previousButtonText]=\"previousButtonText\"\r\n [buttonSize]=\"buttonSize\"\r\n (sizeChange)=\"sizeChabge($event)\"\r\n (pageChange)=\"pageChage($event)\">\r\n </uic-table-pagination>\r\n }\r\n</div>\r\n", styles: [".ui-table-wrapper{overflow:hidden;border:solid 1px var(--table-border-color);border-radius:12px}.ui-table{width:100%;font-weight:400;border-collapse:collapse;background-color:#fff}.ui-table th{font-size:12px;height:calc(var(--table-spacing-ref) * 5.4);font-weight:500}.ui-table th .ui-th-wrap{white-space:nowrap;display:flex;align-items:center}.ui-table th .ui-th-wrap .ui-sort-arrow{font-size:12px;line-height:12px}.ui-table th .ui-th-wrap div{padding:1px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;border-radius:50%;margin-left:10px;cursor:pointer;transition:ease .3s;color:var(--grey-400)}.ui-table th .ui-th-wrap div:hover{color:var(--primary-500)}.ui-table td{font-size:14px;color:var(--grey-600);height:calc(var(--table-spacing-ref) * 6)}.ui-table td,.ui-table th{padding:0 calc(var(--table-spacing-ref) * 2);vertical-align:middle;border:none}.ui-table tr{transition:ease .3s}.ui-table tr:hover{background-color:var(--grey-50)}.ui-table tbody tr{border-top:solid 1px var(--table-border-color)}.ui-table thead tr:hover{color:var(--grey-900)}tbody tr:last-child td{border-bottom:none}.ui-table-container{width:100%;overflow-x:auto}.ui-table-topbar{padding:20px 24px;font-weight:600;font-size:18px;line-height:28px;gap:16px;display:flex;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content}.ui-loader-tr{border-bottom:none!important}.ui-loader-tr td{padding:0}.ui-sort-active{color:var(--secondary-500)!important;border:solid 1px}.ui-empty{text-align:center;color:var(--grey-300)}.subtext{font-size:12px;color:var(--grey-600)}.ui-table-filters{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 0}.ui-filter-actions{display:flex;gap:8px}.ui-alert{width:24px;height:24px;font-size:18px;background-color:var(--red-500);color:var(--white);border-radius:50%;padding:3px}.ui-loader{height:5px;width:100%;--c:no-repeat linear-gradient(var(--primary-500) 0 0);background:var(--c),var(--c),var(--primary-500);background-size:60% 100%;animation:l16 3s infinite}@keyframes l16{0%{background-position:-150% 0,-150% 0}66%{background-position:250% 0,-150% 0}to{background-position:250% 0,250% 0}}.ui-striped tbody tr:nth-child(odd){background-color:var(--grey-50);transition:ease .3s}.ui-striped tbody tr:nth-child(odd):hover{background-color:var(--primary-500)}.ui-tr-highlighted{border-left:solid 6px var(--green-500)}.ui-centered-cell-content{width:100%;display:flex;gap:5px;justify-content:center}.ui-alignment-center{justify-content:center;text-align:center}.ui-trc-primary{color:var(--primary-500)}.ui-trc-red{color:var(--red-500)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-500)}.ui-trc-yellow{color:var(--yellow-500)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-300)}.clickable-row{cursor:pointer}.ui-row-loader{background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);height:20px;width:100%;background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.header-grey{background-color:var(--table-header-background);color:var(--table-header-color)}.header-blue{color:var(--white);background-color:var(--blue-600)}.header-red{color:var(--white);background-color:var(--red-600)}.header-green{color:var(--white);background-color:var(--green-600)}.header-primary{color:var(--white);background-color:var(--primary-600)}.header-secondary{color:var(--white);background-color:var(--secondary-600)}.header-yellow{color:var(--white);background-color:var(--yellow-600)}.full-space-row{width:100%;padding:20px;text-align:center}@media (max-width: 479px){.noshow-small{display:none}}@media (min-width: 480px) and (max-width: 767px){.noshow-medium{display:none}}@media (max-width: 479px){.noshow-medium{display:none}}.expandible-row{display:flex;align-items:flex-start;gap:10px;height:calc(var(--table-spacing-ref) * 4);overflow:hidden;position:relative}.expandible-row i{font-size:18px;font-weight:600}.expandible-row:hover>i{color:var(--primary-500)}.fade-overlay{position:absolute;bottom:0;left:0;width:100%;height:30px;pointer-events:none;background:linear-gradient(to top,white 0%,transparent 100%)}.expandedrow{height:fit-content}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: UicTableUserComponent, selector: "uic-table-user", inputs: ["user"] }, { kind: "component", type: UicTableListComponent, selector: "uic-table-list", inputs: ["list"] }, { kind: "component", type: UicActionButtonComponent, selector: "ui-action-button", inputs: ["icon", "options", "multiselect", "size"], outputs: ["optionSelected", "optionsApplied"] }, { kind: "component", type: UicTableUicSearcherComponent, selector: "uic-table-searcher", inputs: ["placeholder", "label", "searchOnKeydown", "showButtonText", "showSearchButton"], outputs: ["filter"] }, { kind: "component", type: UicStatusLabelComponent, selector: "ui-status-label", inputs: ["color", "type", "icon"] }, { kind: "component", type: UicSwichComponent, selector: "ui-switch", inputs: ["checked", "disabled", "placeholder", "label"], outputs: ["checkedChange"] }, { kind: "component", type: UicTablePaginationComponent, selector: "uic-table-pagination", inputs: ["buttonSize", "currentPage", "totalPages", "size", "loading", "showText", "nextButtonText", "previousButtonText"], outputs: ["pageChange", "sizeChange"] }, { kind: "directive", type: UicToolTipDirective, selector: "[tip]", inputs: ["tip"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [highlightRow, animatedRow] });
|
|
4121
|
+
warning(message, options) {
|
|
4122
|
+
return this.showAlert(createTinyWarning(message, options));
|
|
4123
|
+
}
|
|
4124
|
+
info(message, options) {
|
|
4125
|
+
return this.showAlert(createTinyInfo(message, options));
|
|
4126
|
+
}
|
|
4127
|
+
deleteConfirmation(message, options) {
|
|
4128
|
+
return this.showAlert(createTinyDelete(message, options));
|
|
4129
|
+
}
|
|
4130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTinyAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4131
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTinyAlertService, providedIn: 'root' });
|
|
3944
4132
|
}
|
|
3945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
3946
|
-
type:
|
|
3947
|
-
args: [{
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
UicTablePaginationComponent, UicToolTipDirective, UicCheckboxComponent, FormsModule], animations: [highlightRow, animatedRow], template: "@if ( hasActions || searchEnabled){\r\n <div class=\"ui-table-filters\">\r\n @if (searchEnabled) {\r\n <uic-table-searcher \r\n [showSearchButton]=\"showSearchButton\" \r\n [showButtonText]=\"searcherShowButtonText\" \r\n [searchOnKeydown]=\"searchOnKeydown\"\r\n (filter)=\"search($event)\" \r\n [placeholder]=\"searchPlaceholder\" ></uic-table-searcher>\r\n }\r\n <div class=\"ui-filter-actions\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n </div>\r\n}\r\n<ng-content select=\"[filters]\"></ng-content>\r\n<div class=\"ui-table-wrapper\">\r\n @if (headerText) {\r\n <div class=\"ui-table-topbar\"> {{headerText}} <span class=\"hightlited-note\"> {{totalItems}} </span> </div>\r\n }\r\n <div class=\"ui-table-container\"> \r\n <table class=\"ui-table\" [class.ui-striped]=\"striped\">\r\n <thead>\r\n <tr [class]=\" headerClass || 'header-'+headerBackgroundColor\">\r\n @for (header of columns; track $index) {\r\n <th [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-th-wrap ui-alignment-'+alignment\" >\r\n @if (header.type=='checkbox') {\r\n <div>\r\n <ui-checkbox style=\"margin-right: 5px;\" [(ngModel)]=\"allSelected\" (ngModelChange)=\"toggleAll($event)\"></ui-checkbox>\r\n </div>\r\n }\r\n {{header.label.toUpperCase() }} \r\n @if (header.sortEnable) {\r\n <div class=\"ui-sort-arrow\" (click)=\"sortClick(header.key)\" [ngClass]=\"{'ui-sort-active':header.key == sortKey}\">\r\n <i [class]=\"(sortAsc||header.key != sortKey)?'ri-arrow-down-line':'ri-arrow-up-line'\"></i> \r\n </div>\r\n }\r\n </div>\r\n </th> \r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n\r\n @if (loading) {\r\n @for (item of [].constructor(squeletonRows); track $index) {\r\n <tr>\r\n @for (header of columns; track $index) {\r\n <td> <div class=\"ui-row-loader\"></div> </td>\r\n }\r\n </tr> \r\n }\r\n } @else {\r\n @for (row of data; track row.id) {\r\n <tr [@highlightRow]=\"highlightedId === row.id ? 'highlighted' : null\" \r\n [class.ui-tr-highlighted]=\"row.highlighted\"\r\n [class.clickable-row]=\"rowClickable\"\r\n (click)=\"clickRow(row.id)\"\r\n >\r\n @for (header of columns; track $index) {\r\n <!-- TIPOS DE HEADERS -->\r\n <td [class]=\"getFontColor(row.data,header.key)\"\r\n [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-cell-content ui-alignment-'+alignment\" \r\n [style.justify-content]=\"header.align||null\"\r\n [style.width.px]=\"header.width || null\">\r\n @if (header.type == 'text' || !header.type) {\r\n @let icon = getIcon(row.data,header.key); \r\n @let rightIcon = getIcon(row.data,header.key,true);\r\n @if( icon ){ <i [class]=\"icon\"></i>}\r\n {{ getValue(row.data,header.key) }} \r\n @if( rightIcon ){ <i [class]=\"rightIcon\"></i>}\r\n }\r\n @if (header.type == 'bigtext') {\r\n <div (click)=\"expand(row, $event)\" class=\"expandible-row\" [class.expandedrow]=\"row.expanded\">\r\n {{ getValue(row.data,header.key) }} \r\n <i [class]=\"row.expanded?'ri-arrow-up-s-line':'ri-arrow-down-s-line'\"></i>\r\n @if (!row.expanded) {\r\n <div class=\"fade-overlay\"></div>\r\n }\r\n </div>\r\n }\r\n @if (header.type == 'icon-list') {\r\n @for (alert of getList(row.data,header.key); track $index) {\r\n <i [tip]=\"alert.text\" [class]=\"alert.icon + ' ui-alert'\" ></i>\r\n }\r\n }\r\n @else if (header.type == 'list'){\r\n <uic-table-list [list]=\"getList(row.data,header.key)\"></uic-table-list> \r\n }\r\n @else if (header.type == 'user'){\r\n <uic-table-user [user]=\"getUser(row.data,header.key)\"></uic-table-user> \r\n }\r\n @else if (header.type == 'checkbox'){\r\n <ui-checkbox [disabled]=\"disabled\" [ngModel]=\"checkedIds.has(row.id)\" [placeholder]=\"getValue(row.data,header.key)\" (ngModelChange)=\"toggleSelection(row.id,$event)\" ></ui-checkbox> \r\n }\r\n @else if (header.type == 'status'){\r\n <ui-status-label [icon]=\"getIcon(row.data,header.key)??'ri-circle-fill'\" [color]=\"getBackgroundColor(row.data,header.key)\"> {{getValue(row.data,header.key)}} </ui-status-label> \r\n }\r\n @else if (header.type == 'tag'){\r\n <ui-status-label type=\"tag\" [icon]=\"getIcon(row.data,header.key)??'ri-circle-fill'\" [color]=\"getBackgroundColor(row.data,header.key)\"> {{getValue(row.data,header.key)}} </ui-status-label> \r\n }\r\n @else if (header.type == 'switch'){\r\n <div (click)=\"$event.stopPropagation()\">\r\n <ui-switch [disabled]=\"disabled\" [checked]=\"isChecked(row.data,header.key)\" (checkedChange)=\"switchHandler(row.id,$event,header.key)\"></ui-switch> \r\n </div>\r\n }\r\n @else if (header.type == 'actions') { \r\n <div class=\"ui-centered-cell-content\">\r\n @for (btn of header.actions; track $index) {\r\n @if (isValidRule(row.data,btn.rule)) {\r\n <ui-button \r\n [disabled]=\"loading\"\r\n [tip]=\"btn.tooltip??''\"\r\n size=\"s\"\r\n [disabled]=\"disabled\"\r\n [text]=\"btn.text??''\"\r\n [type]=\"btn.type??'filled'\"\r\n [iconOnly]=\"!btn.text\"\r\n [icon]=\"btn.icon??''\"\r\n [color]=\"btn.color??'black'\"\r\n (click)=\"doAction(row.id,btn.key,$event)\">\r\n </ui-button> \r\n }\r\n } \r\n @if ( header.moreActions && header.moreActions.length>0 ) {\r\n @for (ma of header.moreActions; track $index) {\r\n <ui-action-button [icon]=\"ma.icon??'ri-more-2-line'\" (optionSelected)=\"doAction(row.id,$event.id)\" [options]=\"getMoreActions(ma.actions||[],row.data)\"></ui-action-button>\r\n }\r\n }\r\n </div> \r\n }\r\n </div>\r\n @let subtext = getSubtext(row.data,header.key);\r\n @if( subtext ){\r\n <div [class]=\"'subtext ui-alignment-'+alignment\">{{subtext }}</div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n @if (fullViewRows.includes(row.id)) {\r\n <tr style=\"border-top: none ;\">\r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"full-space-row\">\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @empty {\r\n @if (showEmptyMessage) {\r\n <tr> \r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"ui-empty\">{{emptyMessage}} </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n @if (showPagination) {\r\n <uic-table-pagination \r\n [loading]=\"loading\" \r\n [totalPages]=\"pages\" \r\n [showText]=\"showTextPagination\"\r\n [size]=\"size\"\r\n [nextButtonText]=\"nextButtonText\"\r\n [previousButtonText]=\"previousButtonText\"\r\n [buttonSize]=\"buttonSize\"\r\n (sizeChange)=\"sizeChabge($event)\"\r\n (pageChange)=\"pageChage($event)\">\r\n </uic-table-pagination>\r\n }\r\n</div>\r\n", styles: [".ui-table-wrapper{overflow:hidden;border:solid 1px var(--table-border-color);border-radius:12px}.ui-table{width:100%;font-weight:400;border-collapse:collapse;background-color:#fff}.ui-table th{font-size:12px;height:calc(var(--table-spacing-ref) * 5.4);font-weight:500}.ui-table th .ui-th-wrap{white-space:nowrap;display:flex;align-items:center}.ui-table th .ui-th-wrap .ui-sort-arrow{font-size:12px;line-height:12px}.ui-table th .ui-th-wrap div{padding:1px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;border-radius:50%;margin-left:10px;cursor:pointer;transition:ease .3s;color:var(--grey-400)}.ui-table th .ui-th-wrap div:hover{color:var(--primary-500)}.ui-table td{font-size:14px;color:var(--grey-600);height:calc(var(--table-spacing-ref) * 6)}.ui-table td,.ui-table th{padding:0 calc(var(--table-spacing-ref) * 2);vertical-align:middle;border:none}.ui-table tr{transition:ease .3s}.ui-table tr:hover{background-color:var(--grey-50)}.ui-table tbody tr{border-top:solid 1px var(--table-border-color)}.ui-table thead tr:hover{color:var(--grey-900)}tbody tr:last-child td{border-bottom:none}.ui-table-container{width:100%;overflow-x:auto}.ui-table-topbar{padding:20px 24px;font-weight:600;font-size:18px;line-height:28px;gap:16px;display:flex;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content}.ui-loader-tr{border-bottom:none!important}.ui-loader-tr td{padding:0}.ui-sort-active{color:var(--secondary-500)!important;border:solid 1px}.ui-empty{text-align:center;color:var(--grey-300)}.subtext{font-size:12px;color:var(--grey-600)}.ui-table-filters{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 0}.ui-filter-actions{display:flex;gap:8px}.ui-alert{width:24px;height:24px;font-size:18px;background-color:var(--red-500);color:var(--white);border-radius:50%;padding:3px}.ui-loader{height:5px;width:100%;--c:no-repeat linear-gradient(var(--primary-500) 0 0);background:var(--c),var(--c),var(--primary-500);background-size:60% 100%;animation:l16 3s infinite}@keyframes l16{0%{background-position:-150% 0,-150% 0}66%{background-position:250% 0,-150% 0}to{background-position:250% 0,250% 0}}.ui-striped tbody tr:nth-child(odd){background-color:var(--grey-50);transition:ease .3s}.ui-striped tbody tr:nth-child(odd):hover{background-color:var(--primary-500)}.ui-tr-highlighted{border-left:solid 6px var(--green-500)}.ui-centered-cell-content{width:100%;display:flex;gap:5px;justify-content:center}.ui-alignment-center{justify-content:center;text-align:center}.ui-trc-primary{color:var(--primary-500)}.ui-trc-red{color:var(--red-500)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-500)}.ui-trc-yellow{color:var(--yellow-500)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-300)}.clickable-row{cursor:pointer}.ui-row-loader{background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);height:20px;width:100%;background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.header-grey{background-color:var(--table-header-background);color:var(--table-header-color)}.header-blue{color:var(--white);background-color:var(--blue-600)}.header-red{color:var(--white);background-color:var(--red-600)}.header-green{color:var(--white);background-color:var(--green-600)}.header-primary{color:var(--white);background-color:var(--primary-600)}.header-secondary{color:var(--white);background-color:var(--secondary-600)}.header-yellow{color:var(--white);background-color:var(--yellow-600)}.full-space-row{width:100%;padding:20px;text-align:center}@media (max-width: 479px){.noshow-small{display:none}}@media (min-width: 480px) and (max-width: 767px){.noshow-medium{display:none}}@media (max-width: 479px){.noshow-medium{display:none}}.expandible-row{display:flex;align-items:flex-start;gap:10px;height:calc(var(--table-spacing-ref) * 4);overflow:hidden;position:relative}.expandible-row i{font-size:18px;font-weight:600}.expandible-row:hover>i{color:var(--primary-500)}.fade-overlay{position:absolute;bottom:0;left:0;width:100%;height:30px;pointer-events:none;background:linear-gradient(to top,white 0%,transparent 100%)}.expandedrow{height:fit-content}\n"] }]
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
4133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTinyAlertService, decorators: [{
|
|
4134
|
+
type: Injectable,
|
|
4135
|
+
args: [{
|
|
4136
|
+
providedIn: 'root'
|
|
4137
|
+
}]
|
|
4138
|
+
}] });
|
|
4139
|
+
|
|
4140
|
+
class ItemValueComponent {
|
|
4141
|
+
alers = inject(UicTinyAlertService);
|
|
4142
|
+
key = '';
|
|
4143
|
+
type = 'text';
|
|
4144
|
+
alignment = '';
|
|
4145
|
+
row;
|
|
4146
|
+
disabled = false;
|
|
4147
|
+
data = null;
|
|
4148
|
+
switchValidation = '';
|
|
4149
|
+
switchConfirmed = new EventEmitter();
|
|
4150
|
+
expanded = false;
|
|
4151
|
+
checked = false;
|
|
4152
|
+
ngOnInit() {
|
|
4153
|
+
console.log(this.data);
|
|
4154
|
+
if (this.row) {
|
|
4155
|
+
this.data = this.row.data.find(f => f.key == this.key) ?? null;
|
|
4156
|
+
this.checked = this.data?.checked ?? false;
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
switchHandler(rowId, value) {
|
|
4160
|
+
if (this.data && this.switchValidation != '') {
|
|
4161
|
+
this.alers.warning(this.switchValidation, { showCancelButton: true }).then(r => {
|
|
4162
|
+
if (r.value) {
|
|
4163
|
+
this.switchConfirmed.emit(value);
|
|
4164
|
+
}
|
|
4165
|
+
else {
|
|
4166
|
+
if (this.data) {
|
|
4167
|
+
this.data.checked = !value;
|
|
4168
|
+
this.checked = this.data.checked;
|
|
4169
|
+
}
|
|
4170
|
+
setTimeout(() => {
|
|
4171
|
+
}, 100);
|
|
4172
|
+
}
|
|
4173
|
+
});
|
|
4174
|
+
}
|
|
4175
|
+
this.switchConfirmed.emit(value);
|
|
4176
|
+
}
|
|
4177
|
+
expand(click) {
|
|
4178
|
+
click.stopPropagation();
|
|
4179
|
+
this.expanded = !this.expanded;
|
|
4180
|
+
}
|
|
4181
|
+
copyText(text, click) {
|
|
4182
|
+
click.stopPropagation();
|
|
4183
|
+
navigator.clipboard.writeText(text)
|
|
4184
|
+
.then(() => {
|
|
4185
|
+
console.log('Copiado!');
|
|
4186
|
+
})
|
|
4187
|
+
.catch(err => {
|
|
4188
|
+
console.error('No se pudo copiar: ', err);
|
|
4189
|
+
});
|
|
4190
|
+
}
|
|
4191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ItemValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4192
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: ItemValueComponent, isStandalone: true, selector: "ui-item-value", inputs: { key: "key", type: "type", alignment: "alignment", row: "row", disabled: "disabled", data: "data", switchValidation: "switchValidation" }, outputs: { switchConfirmed: "switchConfirmed" }, ngImport: i0, template: "@if (data) {\r\n @if (type == 'text' || !type) {\r\n @if( data.icon ){ <i [class]=\"data.icon\"></i>}\r\n {{ data.value }} \r\n @if( data.rightIcon ){ <i [class]=\"data.rightIcon\"></i>}\r\n }\r\n @if (type == 'copy') {\r\n <div class=\"copy-div\">\r\n {{ data.value }} \r\n <ui-button (click)=\"copyText((data.value??'').toString(),$event)\" type=\"ghost\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-file-copy-line\"></ui-button>\r\n </div>\r\n }\r\n @if (type == 'money'){\r\n {{ + (data.value??0) | currency: data.currencyCode||''}} \r\n }\r\n @if (type == 'date'){\r\n {{ (data.value??'').toString() | date: 'dd/MM/yyyy'}} \r\n }\r\n @if (type == 'bigtext') {\r\n <div (click)=\"expand($event)\" class=\"expandible-row\" [class.expandedrow]=\"expanded\">\r\n {{ data.value }} \r\n @if( data.value && data.value.toString().length > 0){\r\n <i [class]=\"expanded?'ri-arrow-up-s-line':'ri-arrow-down-s-line'\"></i>\r\n }\r\n @if (!expanded && data.value && data.value.toString().length > 0) {\r\n <div class=\"fade-overlay\"></div>\r\n }\r\n </div>\r\n }\r\n @if (type == 'icon-list') {\r\n @for (alert of data.list; track $index) {\r\n <i [tip]=\"alert.text\" [class]=\"alert.icon + ' ui-alert'\" ></i>\r\n }\r\n }\r\n @else if (type == 'list'){\r\n <uic-table-list [list]=\"data.list??[]\"></uic-table-list> \r\n }\r\n @else if (type == 'user'){\r\n <uic-table-user [user]=\"data.user\"></uic-table-user> \r\n }\r\n @else if (type == 'status'){\r\n <ui-status-label [icon]=\"data.icon??'ri-circle-fill'\" [color]=\"data.color??''\"> {{data.value}} </ui-status-label> \r\n }\r\n @else if (type == 'tag'){\r\n <ui-status-label type=\"tag\" [icon]=\"data.icon??'ri-circle-fill'\" [color]=\"data.color??''\"> {{data.value}} </ui-status-label> \r\n }\r\n @else if (type == 'switch'){\r\n <div (click)=\"$event.stopPropagation()\">\r\n <ui-switch [disabled]=\"disabled\" [(checked)]=\"checked\" (checkedChange)=\"switchHandler(row.id,$event)\"></ui-switch> \r\n </div>\r\n }\r\n\r\n @if( data.subtext ){\r\n <div [class]=\"'subtext ui-alignment-'+alignment\">{{ data.subtext }}</div>\r\n }\r\n}\r\n\r\n", styles: [".copy-div{display:flex;align-items:center;gap:5px}.expandible-row{display:flex;align-items:flex-start;gap:10px;height:calc(var(--table-spacing-ref) * 4);overflow:hidden;cursor:n-resize;-webkit-user-select:none;user-select:none;position:relative}.expandible-row i{font-size:18px;font-weight:600}.expandible-row:hover>i{color:var(--primary-500)}.fade-overlay{position:absolute;bottom:0;left:0;width:100%;height:10px;pointer-events:none;background:linear-gradient(to top,white 0%,transparent 100%)}.expandedrow{height:fit-content}.subtext{font-size:12px;color:var(--grey-500);font-weight:400;text-align:left}.ui-alignment-center{justify-content:center;text-align:center}\n"], dependencies: [{ kind: "directive", type: UicToolTipDirective, selector: "[tip]", inputs: ["tip"] }, { kind: "component", type: UicTableUserComponent, selector: "uic-table-user", inputs: ["user"] }, { kind: "component", type: UicSwichComponent, selector: "ui-switch", inputs: ["checked", "disabled", "placeholder", "label"], outputs: ["checkedChange"] }, { kind: "component", type: UicStatusLabelComponent, selector: "ui-status-label", inputs: ["color", "type", "icon"] }, { kind: "component", type: UicTableListComponent, selector: "uic-table-list", inputs: ["list"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
4193
|
+
}
|
|
4194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ItemValueComponent, decorators: [{
|
|
4195
|
+
type: Component,
|
|
4196
|
+
args: [{ selector: 'ui-item-value', imports: [
|
|
4197
|
+
UicToolTipDirective,
|
|
4198
|
+
UicTableUserComponent,
|
|
4199
|
+
UicSwichComponent,
|
|
4200
|
+
UicStatusLabelComponent,
|
|
4201
|
+
UicTableListComponent,
|
|
4202
|
+
FormsModule,
|
|
4203
|
+
UicButtonComponent,
|
|
4204
|
+
CurrencyPipe,
|
|
4205
|
+
DatePipe
|
|
4206
|
+
], template: "@if (data) {\r\n @if (type == 'text' || !type) {\r\n @if( data.icon ){ <i [class]=\"data.icon\"></i>}\r\n {{ data.value }} \r\n @if( data.rightIcon ){ <i [class]=\"data.rightIcon\"></i>}\r\n }\r\n @if (type == 'copy') {\r\n <div class=\"copy-div\">\r\n {{ data.value }} \r\n <ui-button (click)=\"copyText((data.value??'').toString(),$event)\" type=\"ghost\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-file-copy-line\"></ui-button>\r\n </div>\r\n }\r\n @if (type == 'money'){\r\n {{ + (data.value??0) | currency: data.currencyCode||''}} \r\n }\r\n @if (type == 'date'){\r\n {{ (data.value??'').toString() | date: 'dd/MM/yyyy'}} \r\n }\r\n @if (type == 'bigtext') {\r\n <div (click)=\"expand($event)\" class=\"expandible-row\" [class.expandedrow]=\"expanded\">\r\n {{ data.value }} \r\n @if( data.value && data.value.toString().length > 0){\r\n <i [class]=\"expanded?'ri-arrow-up-s-line':'ri-arrow-down-s-line'\"></i>\r\n }\r\n @if (!expanded && data.value && data.value.toString().length > 0) {\r\n <div class=\"fade-overlay\"></div>\r\n }\r\n </div>\r\n }\r\n @if (type == 'icon-list') {\r\n @for (alert of data.list; track $index) {\r\n <i [tip]=\"alert.text\" [class]=\"alert.icon + ' ui-alert'\" ></i>\r\n }\r\n }\r\n @else if (type == 'list'){\r\n <uic-table-list [list]=\"data.list??[]\"></uic-table-list> \r\n }\r\n @else if (type == 'user'){\r\n <uic-table-user [user]=\"data.user\"></uic-table-user> \r\n }\r\n @else if (type == 'status'){\r\n <ui-status-label [icon]=\"data.icon??'ri-circle-fill'\" [color]=\"data.color??''\"> {{data.value}} </ui-status-label> \r\n }\r\n @else if (type == 'tag'){\r\n <ui-status-label type=\"tag\" [icon]=\"data.icon??'ri-circle-fill'\" [color]=\"data.color??''\"> {{data.value}} </ui-status-label> \r\n }\r\n @else if (type == 'switch'){\r\n <div (click)=\"$event.stopPropagation()\">\r\n <ui-switch [disabled]=\"disabled\" [(checked)]=\"checked\" (checkedChange)=\"switchHandler(row.id,$event)\"></ui-switch> \r\n </div>\r\n }\r\n\r\n @if( data.subtext ){\r\n <div [class]=\"'subtext ui-alignment-'+alignment\">{{ data.subtext }}</div>\r\n }\r\n}\r\n\r\n", styles: [".copy-div{display:flex;align-items:center;gap:5px}.expandible-row{display:flex;align-items:flex-start;gap:10px;height:calc(var(--table-spacing-ref) * 4);overflow:hidden;cursor:n-resize;-webkit-user-select:none;user-select:none;position:relative}.expandible-row i{font-size:18px;font-weight:600}.expandible-row:hover>i{color:var(--primary-500)}.fade-overlay{position:absolute;bottom:0;left:0;width:100%;height:10px;pointer-events:none;background:linear-gradient(to top,white 0%,transparent 100%)}.expandedrow{height:fit-content}.subtext{font-size:12px;color:var(--grey-500);font-weight:400;text-align:left}.ui-alignment-center{justify-content:center;text-align:center}\n"] }]
|
|
4207
|
+
}], propDecorators: { key: [{
|
|
3997
4208
|
type: Input
|
|
3998
|
-
}],
|
|
4209
|
+
}], type: [{
|
|
3999
4210
|
type: Input
|
|
4000
|
-
}],
|
|
4211
|
+
}], alignment: [{
|
|
4001
4212
|
type: Input
|
|
4002
|
-
}],
|
|
4213
|
+
}], row: [{
|
|
4003
4214
|
type: Input
|
|
4004
|
-
}],
|
|
4215
|
+
}], disabled: [{
|
|
4005
4216
|
type: Input
|
|
4006
|
-
}],
|
|
4217
|
+
}], data: [{
|
|
4007
4218
|
type: Input
|
|
4008
|
-
}],
|
|
4219
|
+
}], switchValidation: [{
|
|
4009
4220
|
type: Input
|
|
4010
|
-
}],
|
|
4011
|
-
type: Output
|
|
4012
|
-
}], update: [{
|
|
4013
|
-
type: Output
|
|
4014
|
-
}], checkedChange: [{
|
|
4015
|
-
type: Output
|
|
4016
|
-
}], switchChange: [{
|
|
4017
|
-
type: Output
|
|
4018
|
-
}], clickedRow: [{
|
|
4221
|
+
}], switchConfirmed: [{
|
|
4019
4222
|
type: Output
|
|
4020
|
-
}], actionsRef: [{
|
|
4021
|
-
type: ContentChild,
|
|
4022
|
-
args: ['[actions]']
|
|
4023
4223
|
}] } });
|
|
4024
4224
|
|
|
4025
|
-
|
|
4026
|
-
;
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
id = 0;
|
|
4225
|
+
class UicPortletCardComponent {
|
|
4226
|
+
title = '';
|
|
4227
|
+
data = [];
|
|
4228
|
+
layout = 'horizontal';
|
|
4229
|
+
cols = 1;
|
|
4230
|
+
gap = 20;
|
|
4231
|
+
labelWeight = 400;
|
|
4232
|
+
valueWeight = 500;
|
|
4233
|
+
switchValidation = '';
|
|
4234
|
+
finalData = [];
|
|
4036
4235
|
ngOnInit() {
|
|
4037
|
-
this.
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
count = this.pauseAnimation ? count : count + this.animationIntevalMs;
|
|
4043
|
-
this.progressValue = Math.floor((count / duration) * 100);
|
|
4044
|
-
if (this.progressValue > 100) {
|
|
4045
|
-
this.close();
|
|
4046
|
-
}
|
|
4047
|
-
}, this.animationIntevalMs);
|
|
4236
|
+
this.finalData = this.data.map(p => ({ ...p, key: p.label ?? '-' }));
|
|
4237
|
+
}
|
|
4238
|
+
get gridTemplateColumns() {
|
|
4239
|
+
if (this.layout !== 'vertical') {
|
|
4240
|
+
return null;
|
|
4048
4241
|
}
|
|
4242
|
+
const columns = Math.max(1, Math.floor(this.cols || 1));
|
|
4243
|
+
return `repeat(${columns}, minmax(0, 1fr))`;
|
|
4049
4244
|
}
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4245
|
+
copyText(text) {
|
|
4246
|
+
navigator.clipboard.writeText(text)
|
|
4247
|
+
.then(() => {
|
|
4248
|
+
console.log('Copiado!');
|
|
4249
|
+
})
|
|
4250
|
+
.catch(err => {
|
|
4251
|
+
console.error('No se pudo copiar: ', err);
|
|
4252
|
+
});
|
|
4053
4253
|
}
|
|
4054
|
-
|
|
4055
|
-
|
|
4254
|
+
switchHandler(key, value) {
|
|
4255
|
+
}
|
|
4256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPortletCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicPortletCardComponent, isStandalone: true, selector: "ui-portlet-card", inputs: { title: "title", data: "data", layout: "layout", cols: "cols", gap: "gap", labelWeight: "labelWeight", valueWeight: "valueWeight", switchValidation: "switchValidation" }, ngImport: i0, template: "@if ( title) {\r\n <h2>{{title}}</h2>\r\n}\r\n<div class=\"portlet\" \r\n [class.portlet-vertical]=\"layout === 'vertical'\" \r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n [style]=\"'gap: ' + gap + 'px;'\" >\r\n @for (item of finalData; track $index) {\r\n <div class=\"portlet-row\" [class.portlet-row-vertical]=\"layout === 'vertical'\">\r\n <div class=\"portlet-row-label\" [style.fontWeight]=\"labelWeight\">{{item.label}}</div>\r\n <div class=\"portlet-row-value\" [style.fontWeight]=\"valueWeight\">\r\n <ui-item-value\r\n [type]=\"item.type??'text'\"\r\n [data]=\"item\"\r\n [switchValidation]=\"switchValidation\"\r\n (switchConfirmed)=\"switchHandler('xx', $event)\"\r\n ></ui-item-value>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".portlet{display:flex;flex-direction:column}.portlet-vertical{display:grid}.portlet-row{display:flex;justify-content:space-between;font-size:.9rem}.portlet-row-vertical{flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px}.portlet-row-value{display:flex;justify-content:flex-end;text-align:left;gap:5px}.portlet-row-label{color:var(--grey-400)}.p-type-text{font-size:.9rem;line-height:1.1rem;text-align:right}.p-type-text-sub{text-align:right;color:var(--grey-500);font-size:.8rem;font-weight:300}.portlet-vertical .portlet-row-value{justify-content:flex-start}.portlet-vertical .portlet-row-label,.portlet-vertical .p-type-text,.portlet-vertical .p-type-text-sub{text-align:left}.content-texttype{display:flex;gap:20px;align-items:center;width:100%}h2{width:100%;font-size:20px;font-weight:600;margin-bottom:15px}\n"], dependencies: [{ kind: "component", type: ItemValueComponent, selector: "ui-item-value", inputs: ["key", "type", "alignment", "row", "disabled", "data", "switchValidation"], outputs: ["switchConfirmed"] }] });
|
|
4056
4258
|
}
|
|
4057
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPortletCardComponent, decorators: [{
|
|
4058
4260
|
type: Component,
|
|
4059
|
-
args: [{ selector: 'ui-
|
|
4060
|
-
|
|
4261
|
+
args: [{ selector: 'ui-portlet-card', imports: [
|
|
4262
|
+
ItemValueComponent
|
|
4263
|
+
], template: "@if ( title) {\r\n <h2>{{title}}</h2>\r\n}\r\n<div class=\"portlet\" \r\n [class.portlet-vertical]=\"layout === 'vertical'\" \r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n [style]=\"'gap: ' + gap + 'px;'\" >\r\n @for (item of finalData; track $index) {\r\n <div class=\"portlet-row\" [class.portlet-row-vertical]=\"layout === 'vertical'\">\r\n <div class=\"portlet-row-label\" [style.fontWeight]=\"labelWeight\">{{item.label}}</div>\r\n <div class=\"portlet-row-value\" [style.fontWeight]=\"valueWeight\">\r\n <ui-item-value\r\n [type]=\"item.type??'text'\"\r\n [data]=\"item\"\r\n [switchValidation]=\"switchValidation\"\r\n (switchConfirmed)=\"switchHandler('xx', $event)\"\r\n ></ui-item-value>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".portlet{display:flex;flex-direction:column}.portlet-vertical{display:grid}.portlet-row{display:flex;justify-content:space-between;font-size:.9rem}.portlet-row-vertical{flex-direction:column;justify-content:flex-start;align-items:flex-start;gap:4px}.portlet-row-value{display:flex;justify-content:flex-end;text-align:left;gap:5px}.portlet-row-label{color:var(--grey-400)}.p-type-text{font-size:.9rem;line-height:1.1rem;text-align:right}.p-type-text-sub{text-align:right;color:var(--grey-500);font-size:.8rem;font-weight:300}.portlet-vertical .portlet-row-value{justify-content:flex-start}.portlet-vertical .portlet-row-label,.portlet-vertical .p-type-text,.portlet-vertical .p-type-text-sub{text-align:left}.content-texttype{display:flex;gap:20px;align-items:center;width:100%}h2{width:100%;font-size:20px;font-weight:600;margin-bottom:15px}\n"] }]
|
|
4264
|
+
}], propDecorators: { title: [{
|
|
4265
|
+
type: Input
|
|
4266
|
+
}], data: [{
|
|
4267
|
+
type: Input
|
|
4268
|
+
}], layout: [{
|
|
4269
|
+
type: Input
|
|
4270
|
+
}], cols: [{
|
|
4271
|
+
type: Input
|
|
4272
|
+
}], gap: [{
|
|
4273
|
+
type: Input
|
|
4274
|
+
}], labelWeight: [{
|
|
4275
|
+
type: Input
|
|
4276
|
+
}], valueWeight: [{
|
|
4277
|
+
type: Input
|
|
4278
|
+
}], switchValidation: [{
|
|
4061
4279
|
type: Input
|
|
4062
|
-
}], closeAlert: [{
|
|
4063
|
-
type: Output
|
|
4064
4280
|
}] } });
|
|
4065
4281
|
|
|
4066
|
-
class
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4282
|
+
class UicShortTableComponent {
|
|
4283
|
+
columns = [];
|
|
4284
|
+
data;
|
|
4285
|
+
loading = false;
|
|
4286
|
+
disabled = false;
|
|
4287
|
+
cols = 2;
|
|
4288
|
+
portlet = [];
|
|
4072
4289
|
ngOnInit() {
|
|
4073
|
-
this.
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4290
|
+
this.portlet = this.apTableToPortlets(this.columns, this.data);
|
|
4291
|
+
}
|
|
4292
|
+
apTableToPortlets(columns, row) {
|
|
4293
|
+
console.log(row);
|
|
4294
|
+
return columns.filter(f => !!f.hideOn)
|
|
4295
|
+
.map(col => {
|
|
4296
|
+
const cell = row.data.find(d => d.key === col.key);
|
|
4297
|
+
if (!cell)
|
|
4298
|
+
return null;
|
|
4299
|
+
return {
|
|
4300
|
+
type: col.type == 'bigtext' ? 'text' : col.type,
|
|
4301
|
+
label: col.label,
|
|
4302
|
+
...cell
|
|
4303
|
+
};
|
|
4304
|
+
})
|
|
4305
|
+
.filter((p) => p !== null);
|
|
4080
4306
|
}
|
|
4081
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4082
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicShortTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4308
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicShortTableComponent, isStandalone: true, selector: "ui-short-table", inputs: { columns: "columns", data: "data", loading: "loading", disabled: "disabled", cols: "cols" }, ngImport: i0, template: "<ui-portlet-card \r\n [gap]=\"20\" \r\n layout=\"vertical\" \r\n [cols]=\"cols\" \r\n [data]=\"portlet\">\r\n</ui-portlet-card>", styles: [".row-body{padding:10px;border:solid 1px var(--grey-200)}\n"], dependencies: [{ kind: "component", type: UicPortletCardComponent, selector: "ui-portlet-card", inputs: ["title", "data", "layout", "cols", "gap", "labelWeight", "valueWeight", "switchValidation"] }] });
|
|
4083
4309
|
}
|
|
4084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicShortTableComponent, decorators: [{
|
|
4085
4311
|
type: Component,
|
|
4086
|
-
args: [{ selector: 'ui-
|
|
4087
|
-
}],
|
|
4312
|
+
args: [{ selector: 'ui-short-table', imports: [UicPortletCardComponent], template: "<ui-portlet-card \r\n [gap]=\"20\" \r\n layout=\"vertical\" \r\n [cols]=\"cols\" \r\n [data]=\"portlet\">\r\n</ui-portlet-card>", styles: [".row-body{padding:10px;border:solid 1px var(--grey-200)}\n"] }]
|
|
4313
|
+
}], propDecorators: { columns: [{
|
|
4314
|
+
type: Input
|
|
4315
|
+
}], data: [{
|
|
4316
|
+
type: Input
|
|
4317
|
+
}], loading: [{
|
|
4318
|
+
type: Input
|
|
4319
|
+
}], disabled: [{
|
|
4320
|
+
type: Input
|
|
4321
|
+
}], cols: [{
|
|
4322
|
+
type: Input
|
|
4323
|
+
}] } });
|
|
4088
4324
|
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4325
|
+
// Mapea datos a tablas (deben tener el mismo nombre)
|
|
4326
|
+
function helperTableMapDatoToColums(data, headers) {
|
|
4327
|
+
const row = [];
|
|
4328
|
+
headers.forEach(head => {
|
|
4329
|
+
if (head.key in data && head.type == 'text') {
|
|
4330
|
+
row.push({
|
|
4331
|
+
key: head.key,
|
|
4332
|
+
value: data[head.key]
|
|
4333
|
+
});
|
|
4334
|
+
}
|
|
4335
|
+
});
|
|
4336
|
+
return row;
|
|
4337
|
+
}
|
|
4338
|
+
// MAPEA EL RESULTADO DE UN FORMULARIO AL DTO
|
|
4339
|
+
function helperFormMapFormdataToObject(formData, defaults) {
|
|
4340
|
+
return {
|
|
4341
|
+
...defaults,
|
|
4342
|
+
...Object.fromEntries(Object.keys(defaults)
|
|
4343
|
+
.filter(key => key in formData)
|
|
4344
|
+
.map(key => [key, formData[key]]))
|
|
4345
|
+
};
|
|
4346
|
+
}
|
|
4347
|
+
function isMobile() {
|
|
4348
|
+
const mobileBP = getComputedStyle(document.documentElement)
|
|
4349
|
+
.getPropertyValue('--bp-mobile');
|
|
4350
|
+
console.log(mobileBP);
|
|
4351
|
+
return window.matchMedia(`(max-width: ${mobileBP})`).matches;
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
class UicTableComponent {
|
|
4355
|
+
columns = [];
|
|
4356
|
+
data = [];
|
|
4357
|
+
loading = false;
|
|
4095
4358
|
disabled = false;
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4359
|
+
rowClickable = false;
|
|
4360
|
+
rowExpandible = false;
|
|
4361
|
+
pages = 0;
|
|
4362
|
+
size = 25;
|
|
4363
|
+
squeletonRows = 5;
|
|
4364
|
+
buttonSize = 'm';
|
|
4365
|
+
highlightedId = 0;
|
|
4366
|
+
headerText = '';
|
|
4367
|
+
totalItems = 0;
|
|
4368
|
+
alignment = 'center';
|
|
4369
|
+
searchEnabled = true;
|
|
4370
|
+
searchLabel = 'Buscar';
|
|
4371
|
+
searchPlaceholder = 'Buscar';
|
|
4372
|
+
headerClass = '';
|
|
4373
|
+
headerBackgroundColor = 'grey';
|
|
4374
|
+
striped = false;
|
|
4375
|
+
showPagination = true;
|
|
4376
|
+
searchOnKeydown = false;
|
|
4377
|
+
showEmptyMessage = true;
|
|
4378
|
+
showSearchButton = false;
|
|
4379
|
+
showTextPagination = true;
|
|
4380
|
+
emptyMessage = 'No hay elementos';
|
|
4381
|
+
switchValidation = '';
|
|
4382
|
+
nextButtonText = 'Sig.';
|
|
4383
|
+
previousButtonText = 'Ant.';
|
|
4384
|
+
mobilePortletCols = 2;
|
|
4385
|
+
searcherShowButtonText = false;
|
|
4386
|
+
action = new EventEmitter();
|
|
4387
|
+
update = new EventEmitter();
|
|
4388
|
+
checkedChange = new EventEmitter();
|
|
4389
|
+
switchChange = new EventEmitter();
|
|
4390
|
+
clickedRow = new EventEmitter();
|
|
4391
|
+
allSelected = false;
|
|
4392
|
+
checkedIds = new Set();
|
|
4393
|
+
sortKey = '';
|
|
4394
|
+
sortAsc = true;
|
|
4395
|
+
filter = '';
|
|
4396
|
+
page = 1;
|
|
4397
|
+
fullViewRows = [];
|
|
4398
|
+
mobileView = false;
|
|
4399
|
+
ngOnInit() {
|
|
4400
|
+
this.mobileView = isMobile();
|
|
4401
|
+
console.log(this.mobileView);
|
|
4402
|
+
}
|
|
4403
|
+
getValue(data, key) {
|
|
4404
|
+
const col = data.find(col => col.key == key);
|
|
4405
|
+
return col?.value?.toString() ?? '';
|
|
4406
|
+
}
|
|
4407
|
+
getMoreActions(actions, row) {
|
|
4408
|
+
return actions
|
|
4409
|
+
.filter(f => this.isValidRule(row, f.rule))
|
|
4410
|
+
.map(p => ({ id: p.key, label: p.text ?? '', icon: p.icon ?? '' }));
|
|
4411
|
+
}
|
|
4412
|
+
getFontColor(data, key) {
|
|
4413
|
+
const col = data.find(col => col.key == key);
|
|
4414
|
+
return 'ui-trc-' + (col?.textColor ?? 'black');
|
|
4415
|
+
}
|
|
4416
|
+
isValidRule(data, key) {
|
|
4417
|
+
if (!key)
|
|
4418
|
+
return true;
|
|
4419
|
+
let valid = true;
|
|
4420
|
+
key.forEach(k => {
|
|
4421
|
+
const col = data.find(col => col.key == k);
|
|
4422
|
+
valid = valid && !!(col?.value);
|
|
4423
|
+
});
|
|
4424
|
+
return valid;
|
|
4425
|
+
}
|
|
4426
|
+
sortClick(key) {
|
|
4427
|
+
if (this.sortKey != key) {
|
|
4428
|
+
this.sortKey = key;
|
|
4429
|
+
this.sortAsc = true;
|
|
4430
|
+
}
|
|
4431
|
+
else if (this.sortAsc) {
|
|
4432
|
+
this.sortAsc = false;
|
|
4433
|
+
}
|
|
4434
|
+
else {
|
|
4435
|
+
this.sortKey = '';
|
|
4436
|
+
this.sortAsc = true;
|
|
4110
4437
|
}
|
|
4438
|
+
this.updateData();
|
|
4111
4439
|
}
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
this.drawing = true;
|
|
4116
|
-
const { x, y } = this.relativePosition(event);
|
|
4117
|
-
this.ctx.beginPath();
|
|
4118
|
-
this.ctx.moveTo(x, y);
|
|
4119
|
-
this.canvasRef.nativeElement.setPointerCapture(event.pointerId);
|
|
4120
|
-
event.preventDefault();
|
|
4121
|
-
}
|
|
4122
|
-
draw(event) {
|
|
4123
|
-
if (!this.drawing || !this.ctx || this.disabled)
|
|
4124
|
-
return;
|
|
4125
|
-
const { x, y } = this.relativePosition(event);
|
|
4126
|
-
this.ctx.lineTo(x, y);
|
|
4127
|
-
this.ctx.stroke();
|
|
4128
|
-
event.preventDefault();
|
|
4440
|
+
sizeChabge(newSize) {
|
|
4441
|
+
this.size = newSize;
|
|
4442
|
+
this.updateData();
|
|
4129
4443
|
}
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
this.ctx.closePath();
|
|
4134
|
-
this.drawing = false;
|
|
4135
|
-
this.canvasRef.nativeElement.releasePointerCapture(event.pointerId);
|
|
4136
|
-
this.emitSignature();
|
|
4137
|
-
event.preventDefault();
|
|
4444
|
+
pageChage(newPage) {
|
|
4445
|
+
this.page = newPage;
|
|
4446
|
+
this.updateData();
|
|
4138
4447
|
}
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
this.resetCanvas();
|
|
4143
|
-
this.notifyChange(null);
|
|
4144
|
-
this.imageChange.emit(null);
|
|
4448
|
+
search(text) {
|
|
4449
|
+
this.filter = text;
|
|
4450
|
+
this.updateData();
|
|
4145
4451
|
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
this.imageChange.emit(blob);
|
|
4155
|
-
}, 'image/png');
|
|
4452
|
+
updateData() {
|
|
4453
|
+
this.update.emit({
|
|
4454
|
+
sortBy: this.sortKey,
|
|
4455
|
+
isSortAscending: this.sortAsc,
|
|
4456
|
+
pageNumber: this.page,
|
|
4457
|
+
pageSize: this.size,
|
|
4458
|
+
filter: this.filter
|
|
4459
|
+
});
|
|
4156
4460
|
}
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4461
|
+
toggleSelection(id, checked) {
|
|
4462
|
+
if (checked) {
|
|
4463
|
+
this.checkedIds.add(id);
|
|
4464
|
+
}
|
|
4465
|
+
else {
|
|
4466
|
+
this.checkedIds.delete(id);
|
|
4467
|
+
}
|
|
4468
|
+
this.areAllSelected();
|
|
4469
|
+
this.checkedChange.emit(Array.from(this.checkedIds));
|
|
4163
4470
|
}
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
return;
|
|
4168
|
-
if (!value) {
|
|
4169
|
-
this.resetCanvas();
|
|
4170
|
-
return;
|
|
4471
|
+
toggleAll(checked) {
|
|
4472
|
+
if (checked) {
|
|
4473
|
+
this.data.forEach(item => this.checkedIds.add(item.id));
|
|
4171
4474
|
}
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
this.ctx.drawImage(img, 0, 0, this.width, this.height);
|
|
4177
|
-
URL.revokeObjectURL(url);
|
|
4178
|
-
};
|
|
4179
|
-
img.src = url;
|
|
4475
|
+
else {
|
|
4476
|
+
this.checkedIds.clear();
|
|
4477
|
+
}
|
|
4478
|
+
this.checkedChange.emit(Array.from(this.checkedIds));
|
|
4180
4479
|
}
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4480
|
+
areAllSelected() {
|
|
4481
|
+
this.allSelected = this.checkedIds.size === this.data.length && this.data.length > 0;
|
|
4482
|
+
}
|
|
4483
|
+
ngOnChanges(change) {
|
|
4484
|
+
this.areAllSelected();
|
|
4485
|
+
}
|
|
4486
|
+
doAction(rowId, key, event) {
|
|
4487
|
+
event?.stopPropagation();
|
|
4488
|
+
this.action.emit({ rowId, key });
|
|
4489
|
+
}
|
|
4490
|
+
resetCheckedIds() {
|
|
4491
|
+
this.checkedIds.clear();
|
|
4492
|
+
this.checkedChange.emit([]);
|
|
4493
|
+
}
|
|
4494
|
+
switchHandler(key, value, columName) {
|
|
4495
|
+
this.switchChange.emit({ key, value, columName });
|
|
4496
|
+
}
|
|
4497
|
+
actionsRef;
|
|
4498
|
+
hasActions = false;
|
|
4499
|
+
ngAfterContentInit() {
|
|
4500
|
+
this.hasActions = !!this.actionsRef;
|
|
4501
|
+
}
|
|
4502
|
+
clickRow(id) {
|
|
4503
|
+
if (this.rowClickable)
|
|
4504
|
+
this.clickedRow.emit(id);
|
|
4505
|
+
if (this.rowExpandible && this.mobileView) {
|
|
4506
|
+
if (this.fullViewRows.includes(id)) {
|
|
4507
|
+
this.fullViewRows = this.fullViewRows.filter(f => f != id);
|
|
4508
|
+
}
|
|
4509
|
+
else {
|
|
4510
|
+
this.fullViewRows.push(id);
|
|
4511
|
+
}
|
|
4184
4512
|
}
|
|
4185
4513
|
}
|
|
4186
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicSignaturePadComponent, isStandalone: true, selector: "ui-signature-pad", inputs: { width: "width", height: "height", strokeColor: "strokeColor", strokeWidth: "strokeWidth", disabled: "disabled" }, outputs: { imageChange: "imageChange" }, providers: [
|
|
4188
|
-
{
|
|
4189
|
-
provide: NG_VALUE_ACCESSOR,
|
|
4190
|
-
useExisting: forwardRef(() => UicSignaturePadComponent),
|
|
4191
|
-
multi: true,
|
|
4192
|
-
},
|
|
4193
|
-
], viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"signature-pad\" [style.width.px]=\"width\">\n <canvas\n #canvas\n class=\"signature-canvas\"\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n (pointerdown)=\"startDraw($event)\"\n (pointermove)=\"draw($event)\"\n (pointerup)=\"endDraw($event)\"\n (pointerleave)=\"endDraw($event)\"\n ></canvas>\n <div class=\"signature-actions\">\n <ui-button size=\"s\" type=\"ghost\" icon=\"ri-delete-bin-line\" (click)=\"clear()\">Limpiar</ui-button>\n </div>\n</div>\n", styles: [".signature-pad{border-radius:8px;padding:8px}.signature-canvas{background-color:#fff;width:100%;display:block;border:1px solid var(--grey-200, #e5e7eb);border-radius:6px;touch-action:none}.signature-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }] });
|
|
4514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTableComponent, isStandalone: true, selector: "ui-table", inputs: { columns: "columns", data: "data", loading: "loading", disabled: "disabled", rowClickable: "rowClickable", rowExpandible: "rowExpandible", pages: "pages", size: "size", squeletonRows: "squeletonRows", buttonSize: "buttonSize", highlightedId: "highlightedId", headerText: "headerText", totalItems: "totalItems", alignment: "alignment", searchEnabled: "searchEnabled", searchLabel: "searchLabel", searchPlaceholder: "searchPlaceholder", headerClass: "headerClass", headerBackgroundColor: "headerBackgroundColor", striped: "striped", showPagination: "showPagination", searchOnKeydown: "searchOnKeydown", showEmptyMessage: "showEmptyMessage", showSearchButton: "showSearchButton", showTextPagination: "showTextPagination", emptyMessage: "emptyMessage", switchValidation: "switchValidation", nextButtonText: "nextButtonText", previousButtonText: "previousButtonText", mobilePortletCols: "mobilePortletCols", searcherShowButtonText: "searcherShowButtonText" }, outputs: { action: "action", update: "update", checkedChange: "checkedChange", switchChange: "switchChange", clickedRow: "clickedRow" }, queries: [{ propertyName: "actionsRef", first: true, predicate: ["[actions]"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if ( hasActions || searchEnabled){\r\n <div class=\"ui-table-filters\">\r\n @if (searchEnabled) {\r\n <uic-table-searcher \r\n [showSearchButton]=\"showSearchButton\" \r\n [showButtonText]=\"searcherShowButtonText\" \r\n [searchOnKeydown]=\"searchOnKeydown\"\r\n (filter)=\"search($event)\" \r\n [placeholder]=\"searchPlaceholder\" >\r\n </uic-table-searcher>\r\n }\r\n <div class=\"ui-filter-actions\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n </div>\r\n}\r\n<ng-content select=\"[filters]\"></ng-content>\r\n<div class=\"ui-table-wrapper\">\r\n @if (headerText) {\r\n <div class=\"ui-table-topbar\"> {{headerText}} <span class=\"hightlited-note\"> {{totalItems}} </span> </div>\r\n }\r\n <div class=\"ui-table-container\"> \r\n <table class=\"ui-table\" [class.ui-striped]=\"striped\">\r\n <thead>\r\n <tr [class]=\" headerClass || 'header-'+headerBackgroundColor\">\r\n @for (header of columns; track $index) {\r\n <th [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-th-wrap ui-alignment-'+alignment\" >\r\n @if (header.type=='checkbox') {\r\n <div>\r\n <ui-checkbox style=\"margin-right: 5px;\" [(ngModel)]=\"allSelected\" (ngModelChange)=\"toggleAll($event)\"></ui-checkbox>\r\n </div>\r\n }\r\n {{header.label.toUpperCase() }} \r\n @if (header.sortEnable) {\r\n <div class=\"ui-sort-arrow\" (click)=\"sortClick(header.key)\" [ngClass]=\"{'ui-sort-active':header.key == sortKey}\">\r\n <i [class]=\"(sortAsc||header.key != sortKey)?'ri-arrow-down-line':'ri-arrow-up-line'\"></i> \r\n </div>\r\n }\r\n </div>\r\n </th> \r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n\r\n @if (loading) {\r\n @for (item of [].constructor(squeletonRows); track $index) {\r\n <tr>\r\n @for (header of columns; track $index) {\r\n <td> <div class=\"ui-row-loader\"></div> </td>\r\n }\r\n </tr> \r\n }\r\n } @else {\r\n @for (row of data; track row.id) {\r\n <tr [@highlightRow]=\"highlightedId === row.id ? 'highlighted' : null\" \r\n [class.ui-tr-highlighted]=\"row.highlighted\"\r\n [class.clickable-row]=\"rowClickable\"\r\n (click)=\"clickRow(row.id)\"\r\n >\r\n @for (header of columns; track $index) {\r\n <!-- TIPOS DE HEADERS -->\r\n <td [class]=\"getFontColor(row.data,header.key)\"\r\n [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n\r\n <div [class]=\"'ui-cell-content ui-alignment-'+alignment\" \r\n [style.justify-content]=\"header.align||null\"\r\n [style.width.px]=\"header.width || null\">\r\n @if (header.type == 'actions') { \r\n <div class=\"ui-centered-cell-content\">\r\n @for (btn of header.actions; track $index) {\r\n @if (isValidRule(row.data,btn.rule)) {\r\n <ui-button \r\n [disabled]=\"loading\"\r\n [tip]=\"btn.tooltip??''\"\r\n size=\"s\"\r\n [disabled]=\"disabled\"\r\n [text]=\"btn.text??''\"\r\n [type]=\"btn.type??'filled'\"\r\n [iconOnly]=\"!btn.text\"\r\n [icon]=\"btn.icon??''\"\r\n [color]=\"btn.color??'black'\"\r\n (click)=\"doAction(row.id,btn.key,$event)\">\r\n </ui-button> \r\n }\r\n } \r\n @if ( header.moreActions && header.moreActions.length>0 ) {\r\n @for (ma of header.moreActions; track $index) {\r\n <ui-action-button [icon]=\"ma.icon??'ri-more-2-line'\" (optionSelected)=\"doAction(row.id,$event.id)\" [options]=\"getMoreActions(ma.actions||[],row.data)\"></ui-action-button>\r\n }\r\n }\r\n </div> \r\n }\r\n @else if (header.type == 'checkbox'){\r\n <ui-checkbox [disabled]=\"disabled\" [ngModel]=\"checkedIds.has(row.id)\" [placeholder]=\"getValue(row.data,header.key)\" (ngModelChange)=\"toggleSelection(row.id,$event)\" ></ui-checkbox> \r\n }\r\n @else {\r\n <ui-item-value\r\n [disabled]=\"disabled\"\r\n [key]=\"header.key\"\r\n [type]=\"header.type??'text'\"\r\n [row]=\"row\"\r\n [alignment]=\"alignment\"\r\n [switchValidation]=\"switchValidation\"\r\n (switchConfirmed)=\"switchHandler(header.key, $event, header.label)\"\r\n ></ui-item-value>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (fullViewRows.includes(row.id)) {\r\n <tr style=\"border-top: none ;\">\r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"full-space-row\">\r\n <ui-short-table [columns]=\"columns\" [cols]=\"mobilePortletCols\" [data]=\"row\"></ui-short-table>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @empty {\r\n @if (showEmptyMessage) {\r\n <tr> \r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"ui-empty\">{{emptyMessage}} </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n @if (showPagination) {\r\n <uic-table-pagination \r\n [loading]=\"loading\" \r\n [totalPages]=\"pages\" \r\n [showText]=\"showTextPagination\"\r\n [size]=\"size\"\r\n [nextButtonText]=\"nextButtonText\"\r\n [previousButtonText]=\"previousButtonText\"\r\n [buttonSize]=\"buttonSize\"\r\n (sizeChange)=\"sizeChabge($event)\"\r\n (pageChange)=\"pageChage($event)\">\r\n </uic-table-pagination>\r\n }\r\n</div>\r\n", styles: [".ui-table-wrapper{overflow:hidden;border:solid 1px var(--table-border-color);border-radius:12px}.ui-table{width:100%;font-weight:400;border-collapse:collapse;background-color:#fff}.ui-table th{font-size:12px;height:calc(var(--table-spacing-ref) * 5.4);font-weight:500}.ui-table th .ui-th-wrap{white-space:nowrap;display:flex;align-items:center}.ui-table th .ui-th-wrap .ui-sort-arrow{font-size:12px;line-height:12px}.ui-table th .ui-th-wrap div{padding:1px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;border-radius:50%;margin-left:10px;cursor:pointer;transition:ease .3s;color:var(--grey-400)}.ui-table th .ui-th-wrap div:hover{color:var(--primary-500)}.ui-table td{font-size:14px;color:var(--grey-600);height:calc(var(--table-spacing-ref) * 6)}.ui-table td,.ui-table th{padding:0 calc(var(--table-spacing-ref) * 2);vertical-align:middle;border:none}.ui-table tr{transition:ease .3s}.ui-table tr:hover{background-color:var(--grey-50)}.ui-table tbody tr{border-top:solid 1px var(--table-border-color)}.ui-table thead tr:hover{color:var(--grey-900)}tbody tr:last-child td{border-bottom:none}.ui-table-container{width:100%;overflow-x:auto}.ui-table-topbar{padding:20px 24px;font-weight:600;font-size:18px;line-height:28px;gap:16px;display:flex;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content}.ui-loader-tr{border-bottom:none!important}.ui-loader-tr td{padding:0}.ui-sort-active{color:var(--secondary-500)!important;border:solid 1px}.ui-empty{text-align:center;color:var(--grey-300)}.ui-table-filters{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 0}@media (max-width: 479px){.ui-table-filters{padding:8px 0;flex-direction:column;align-items:normal;gap:8px}}.ui-filter-actions{display:flex;flex-wrap:wrap;gap:8px}.ui-alert{width:24px;height:24px;font-size:18px;background-color:var(--red-500);color:var(--white);border-radius:50%;padding:3px}.ui-loader{height:5px;width:100%;--c:no-repeat linear-gradient(var(--primary-500) 0 0);background:var(--c),var(--c),var(--primary-500);background-size:60% 100%;animation:l16 3s infinite}@keyframes l16{0%{background-position:-150% 0,-150% 0}66%{background-position:250% 0,-150% 0}to{background-position:250% 0,250% 0}}.ui-striped tbody tr:nth-child(odd){background-color:var(--grey-50);transition:ease .3s}.ui-striped tbody tr:nth-child(odd):hover{background-color:var(--primary-500)}.ui-tr-highlighted{border-left:solid 6px var(--green-500)}.ui-centered-cell-content{width:100%;display:flex;gap:5px;justify-content:center}.ui-alignment-center{justify-content:center;text-align:center}.ui-trc-primary{color:var(--primary-500)}.ui-trc-red{color:var(--red-500)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-500)}.ui-trc-yellow{color:var(--yellow-500)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-300)}.clickable-row{cursor:pointer}.ui-row-loader{background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);height:20px;width:100%;background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.header-grey{background-color:var(--table-header-background);color:var(--table-header-color)}.header-blue{color:var(--white);background-color:var(--blue-600)}.header-red{color:var(--white);background-color:var(--red-600)}.header-green{color:var(--white);background-color:var(--green-600)}.header-primary{color:var(--white);background-color:var(--primary-600)}.header-secondary{color:var(--white);background-color:var(--secondary-600)}.header-yellow{color:var(--white);background-color:var(--yellow-600)}.full-space-row{width:100%;padding:20px;text-align:center}@media (max-width: 479px){.noshow-small{display:none}}@media (min-width: 480px) and (max-width: 767px){.noshow-medium{display:none}}@media (max-width: 479px){.noshow-medium{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: ItemValueComponent, selector: "ui-item-value", inputs: ["key", "type", "alignment", "row", "disabled", "data", "switchValidation"], outputs: ["switchConfirmed"] }, { kind: "component", type: UicShortTableComponent, selector: "ui-short-table", inputs: ["columns", "data", "loading", "disabled", "cols"] }, { kind: "component", type: UicActionButtonComponent, selector: "ui-action-button", inputs: ["icon", "options", "multiselect", "size"], outputs: ["optionSelected", "optionsApplied"] }, { kind: "component", type: UicTableUicSearcherComponent, selector: "uic-table-searcher", inputs: ["placeholder", "label", "searchOnKeydown", "showButtonText", "showSearchButton"], outputs: ["filter"] }, { kind: "component", type: UicTablePaginationComponent, selector: "uic-table-pagination", inputs: ["buttonSize", "currentPage", "totalPages", "size", "loading", "showText", "nextButtonText", "previousButtonText"], outputs: ["pageChange", "sizeChange"] }, { kind: "directive", type: UicToolTipDirective, selector: "[tip]", inputs: ["tip"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [highlightRow, animatedRow] });
|
|
4194
4516
|
}
|
|
4195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableComponent, decorators: [{
|
|
4196
4518
|
type: Component,
|
|
4197
|
-
args: [{ selector: 'ui-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
}], height: [{
|
|
4519
|
+
args: [{ selector: 'ui-table', imports: [CommonModule,
|
|
4520
|
+
UicButtonComponent,
|
|
4521
|
+
ItemValueComponent,
|
|
4522
|
+
UicShortTableComponent,
|
|
4523
|
+
UicActionButtonComponent,
|
|
4524
|
+
UicTableUicSearcherComponent,
|
|
4525
|
+
UicTablePaginationComponent,
|
|
4526
|
+
UicToolTipDirective,
|
|
4527
|
+
UicCheckboxComponent,
|
|
4528
|
+
FormsModule], animations: [highlightRow, animatedRow], template: "@if ( hasActions || searchEnabled){\r\n <div class=\"ui-table-filters\">\r\n @if (searchEnabled) {\r\n <uic-table-searcher \r\n [showSearchButton]=\"showSearchButton\" \r\n [showButtonText]=\"searcherShowButtonText\" \r\n [searchOnKeydown]=\"searchOnKeydown\"\r\n (filter)=\"search($event)\" \r\n [placeholder]=\"searchPlaceholder\" >\r\n </uic-table-searcher>\r\n }\r\n <div class=\"ui-filter-actions\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n </div>\r\n}\r\n<ng-content select=\"[filters]\"></ng-content>\r\n<div class=\"ui-table-wrapper\">\r\n @if (headerText) {\r\n <div class=\"ui-table-topbar\"> {{headerText}} <span class=\"hightlited-note\"> {{totalItems}} </span> </div>\r\n }\r\n <div class=\"ui-table-container\"> \r\n <table class=\"ui-table\" [class.ui-striped]=\"striped\">\r\n <thead>\r\n <tr [class]=\" headerClass || 'header-'+headerBackgroundColor\">\r\n @for (header of columns; track $index) {\r\n <th [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n <div [class]=\"'ui-th-wrap ui-alignment-'+alignment\" >\r\n @if (header.type=='checkbox') {\r\n <div>\r\n <ui-checkbox style=\"margin-right: 5px;\" [(ngModel)]=\"allSelected\" (ngModelChange)=\"toggleAll($event)\"></ui-checkbox>\r\n </div>\r\n }\r\n {{header.label.toUpperCase() }} \r\n @if (header.sortEnable) {\r\n <div class=\"ui-sort-arrow\" (click)=\"sortClick(header.key)\" [ngClass]=\"{'ui-sort-active':header.key == sortKey}\">\r\n <i [class]=\"(sortAsc||header.key != sortKey)?'ri-arrow-down-line':'ri-arrow-up-line'\"></i> \r\n </div>\r\n }\r\n </div>\r\n </th> \r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n\r\n @if (loading) {\r\n @for (item of [].constructor(squeletonRows); track $index) {\r\n <tr>\r\n @for (header of columns; track $index) {\r\n <td> <div class=\"ui-row-loader\"></div> </td>\r\n }\r\n </tr> \r\n }\r\n } @else {\r\n @for (row of data; track row.id) {\r\n <tr [@highlightRow]=\"highlightedId === row.id ? 'highlighted' : null\" \r\n [class.ui-tr-highlighted]=\"row.highlighted\"\r\n [class.clickable-row]=\"rowClickable\"\r\n (click)=\"clickRow(row.id)\"\r\n >\r\n @for (header of columns; track $index) {\r\n <!-- TIPOS DE HEADERS -->\r\n <td [class]=\"getFontColor(row.data,header.key)\"\r\n [class.noshow-small]=\"header.hideOn == 'small'\"\r\n [class.noshow-medium]=\"header.hideOn == 'medium'\">\r\n\r\n <div [class]=\"'ui-cell-content ui-alignment-'+alignment\" \r\n [style.justify-content]=\"header.align||null\"\r\n [style.width.px]=\"header.width || null\">\r\n @if (header.type == 'actions') { \r\n <div class=\"ui-centered-cell-content\">\r\n @for (btn of header.actions; track $index) {\r\n @if (isValidRule(row.data,btn.rule)) {\r\n <ui-button \r\n [disabled]=\"loading\"\r\n [tip]=\"btn.tooltip??''\"\r\n size=\"s\"\r\n [disabled]=\"disabled\"\r\n [text]=\"btn.text??''\"\r\n [type]=\"btn.type??'filled'\"\r\n [iconOnly]=\"!btn.text\"\r\n [icon]=\"btn.icon??''\"\r\n [color]=\"btn.color??'black'\"\r\n (click)=\"doAction(row.id,btn.key,$event)\">\r\n </ui-button> \r\n }\r\n } \r\n @if ( header.moreActions && header.moreActions.length>0 ) {\r\n @for (ma of header.moreActions; track $index) {\r\n <ui-action-button [icon]=\"ma.icon??'ri-more-2-line'\" (optionSelected)=\"doAction(row.id,$event.id)\" [options]=\"getMoreActions(ma.actions||[],row.data)\"></ui-action-button>\r\n }\r\n }\r\n </div> \r\n }\r\n @else if (header.type == 'checkbox'){\r\n <ui-checkbox [disabled]=\"disabled\" [ngModel]=\"checkedIds.has(row.id)\" [placeholder]=\"getValue(row.data,header.key)\" (ngModelChange)=\"toggleSelection(row.id,$event)\" ></ui-checkbox> \r\n }\r\n @else {\r\n <ui-item-value\r\n [disabled]=\"disabled\"\r\n [key]=\"header.key\"\r\n [type]=\"header.type??'text'\"\r\n [row]=\"row\"\r\n [alignment]=\"alignment\"\r\n [switchValidation]=\"switchValidation\"\r\n (switchConfirmed)=\"switchHandler(header.key, $event, header.label)\"\r\n ></ui-item-value>\r\n }\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n @if (fullViewRows.includes(row.id)) {\r\n <tr style=\"border-top: none ;\">\r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"full-space-row\">\r\n <ui-short-table [columns]=\"columns\" [cols]=\"mobilePortletCols\" [data]=\"row\"></ui-short-table>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n @empty {\r\n @if (showEmptyMessage) {\r\n <tr> \r\n <td [colSpan]=\"columns.length\">\r\n <div class=\"ui-empty\">{{emptyMessage}} </div>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n @if (showPagination) {\r\n <uic-table-pagination \r\n [loading]=\"loading\" \r\n [totalPages]=\"pages\" \r\n [showText]=\"showTextPagination\"\r\n [size]=\"size\"\r\n [nextButtonText]=\"nextButtonText\"\r\n [previousButtonText]=\"previousButtonText\"\r\n [buttonSize]=\"buttonSize\"\r\n (sizeChange)=\"sizeChabge($event)\"\r\n (pageChange)=\"pageChage($event)\">\r\n </uic-table-pagination>\r\n }\r\n</div>\r\n", styles: [".ui-table-wrapper{overflow:hidden;border:solid 1px var(--table-border-color);border-radius:12px}.ui-table{width:100%;font-weight:400;border-collapse:collapse;background-color:#fff}.ui-table th{font-size:12px;height:calc(var(--table-spacing-ref) * 5.4);font-weight:500}.ui-table th .ui-th-wrap{white-space:nowrap;display:flex;align-items:center}.ui-table th .ui-th-wrap .ui-sort-arrow{font-size:12px;line-height:12px}.ui-table th .ui-th-wrap div{padding:1px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;border-radius:50%;margin-left:10px;cursor:pointer;transition:ease .3s;color:var(--grey-400)}.ui-table th .ui-th-wrap div:hover{color:var(--primary-500)}.ui-table td{font-size:14px;color:var(--grey-600);height:calc(var(--table-spacing-ref) * 6)}.ui-table td,.ui-table th{padding:0 calc(var(--table-spacing-ref) * 2);vertical-align:middle;border:none}.ui-table tr{transition:ease .3s}.ui-table tr:hover{background-color:var(--grey-50)}.ui-table tbody tr{border-top:solid 1px var(--table-border-color)}.ui-table thead tr:hover{color:var(--grey-900)}tbody tr:last-child td{border-bottom:none}.ui-table-container{width:100%;overflow-x:auto}.ui-table-topbar{padding:20px 24px;font-weight:600;font-size:18px;line-height:28px;gap:16px;display:flex;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content}.ui-loader-tr{border-bottom:none!important}.ui-loader-tr td{padding:0}.ui-sort-active{color:var(--secondary-500)!important;border:solid 1px}.ui-empty{text-align:center;color:var(--grey-300)}.ui-table-filters{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 0}@media (max-width: 479px){.ui-table-filters{padding:8px 0;flex-direction:column;align-items:normal;gap:8px}}.ui-filter-actions{display:flex;flex-wrap:wrap;gap:8px}.ui-alert{width:24px;height:24px;font-size:18px;background-color:var(--red-500);color:var(--white);border-radius:50%;padding:3px}.ui-loader{height:5px;width:100%;--c:no-repeat linear-gradient(var(--primary-500) 0 0);background:var(--c),var(--c),var(--primary-500);background-size:60% 100%;animation:l16 3s infinite}@keyframes l16{0%{background-position:-150% 0,-150% 0}66%{background-position:250% 0,-150% 0}to{background-position:250% 0,250% 0}}.ui-striped tbody tr:nth-child(odd){background-color:var(--grey-50);transition:ease .3s}.ui-striped tbody tr:nth-child(odd):hover{background-color:var(--primary-500)}.ui-tr-highlighted{border-left:solid 6px var(--green-500)}.ui-centered-cell-content{width:100%;display:flex;gap:5px;justify-content:center}.ui-alignment-center{justify-content:center;text-align:center}.ui-trc-primary{color:var(--primary-500)}.ui-trc-red{color:var(--red-500)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-500)}.ui-trc-yellow{color:var(--yellow-500)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-300)}.clickable-row{cursor:pointer}.ui-row-loader{background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);height:20px;width:100%;background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.header-grey{background-color:var(--table-header-background);color:var(--table-header-color)}.header-blue{color:var(--white);background-color:var(--blue-600)}.header-red{color:var(--white);background-color:var(--red-600)}.header-green{color:var(--white);background-color:var(--green-600)}.header-primary{color:var(--white);background-color:var(--primary-600)}.header-secondary{color:var(--white);background-color:var(--secondary-600)}.header-yellow{color:var(--white);background-color:var(--yellow-600)}.full-space-row{width:100%;padding:20px;text-align:center}@media (max-width: 479px){.noshow-small{display:none}}@media (min-width: 480px) and (max-width: 767px){.noshow-medium{display:none}}@media (max-width: 479px){.noshow-medium{display:none}}\n"] }]
|
|
4529
|
+
}], propDecorators: { columns: [{
|
|
4207
4530
|
type: Input
|
|
4208
|
-
}],
|
|
4531
|
+
}], data: [{
|
|
4209
4532
|
type: Input
|
|
4210
|
-
}],
|
|
4533
|
+
}], loading: [{
|
|
4211
4534
|
type: Input
|
|
4212
4535
|
}], disabled: [{
|
|
4213
4536
|
type: Input
|
|
4214
|
-
}],
|
|
4215
|
-
type: Output
|
|
4216
|
-
}], canvasRef: [{
|
|
4217
|
-
type: ViewChild,
|
|
4218
|
-
args: ['canvas', { static: true }]
|
|
4219
|
-
}] } });
|
|
4220
|
-
|
|
4221
|
-
class UicKpiCardComponent {
|
|
4222
|
-
data;
|
|
4223
|
-
loading = false;
|
|
4224
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicKpiCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4225
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicKpiCardComponent, isStandalone: true, selector: "ui-kpi-card", inputs: { data: "data", loading: "loading" }, ngImport: i0, template: "@if (data) {\r\n <div class=\"kpi-card\">\r\n <div >\r\n <div class=\"kpi-card-label\">{{data.label}}</div>\r\n @if (loading) {\r\n <div class=\"kpi-card-value-loading\"></div>\r\n }@else {\r\n\r\n <div [class]=\"'kpi-card-value ui-trc-' + data.textColor\">{{data.value}}</div>\r\n }\r\n </div>\r\n <i [class]=\"data.icon + ' ui-trc-' + data.iconColor\"></i>\r\n </div>\r\n}", styles: [".kpi-card{border:solid 1px var(--table-border-color);background-color:#fff;padding:20px;border-radius:10px;display:flex;justify-content:space-between;align-items:center;font-size:2rem;gap:20px}.kpi-card-label{font-size:.9rem;line-height:1.2rem;color:var(--grey-500)}.kpi-card-value{font-size:1.6rem;font-weight:500;display:flex;padding-top:5px}.kpi-card-value-loading{height:1.6rem;border-radius:5px;animation:shimmer 1.5s infinite;background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);background-size:200% 100%}.ui-trc-primary{color:var(--primary-600)}.ui-trc-red{color:var(--red-600)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-600)}.ui-trc-yellow{color:var(--yellow-600)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-400)}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}\n"] });
|
|
4226
|
-
}
|
|
4227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicKpiCardComponent, decorators: [{
|
|
4228
|
-
type: Component,
|
|
4229
|
-
args: [{ selector: 'ui-kpi-card', imports: [], template: "@if (data) {\r\n <div class=\"kpi-card\">\r\n <div >\r\n <div class=\"kpi-card-label\">{{data.label}}</div>\r\n @if (loading) {\r\n <div class=\"kpi-card-value-loading\"></div>\r\n }@else {\r\n\r\n <div [class]=\"'kpi-card-value ui-trc-' + data.textColor\">{{data.value}}</div>\r\n }\r\n </div>\r\n <i [class]=\"data.icon + ' ui-trc-' + data.iconColor\"></i>\r\n </div>\r\n}", styles: [".kpi-card{border:solid 1px var(--table-border-color);background-color:#fff;padding:20px;border-radius:10px;display:flex;justify-content:space-between;align-items:center;font-size:2rem;gap:20px}.kpi-card-label{font-size:.9rem;line-height:1.2rem;color:var(--grey-500)}.kpi-card-value{font-size:1.6rem;font-weight:500;display:flex;padding-top:5px}.kpi-card-value-loading{height:1.6rem;border-radius:5px;animation:shimmer 1.5s infinite;background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);background-size:200% 100%}.ui-trc-primary{color:var(--primary-600)}.ui-trc-red{color:var(--red-600)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-600)}.ui-trc-yellow{color:var(--yellow-600)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-400)}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}\n"] }]
|
|
4230
|
-
}], propDecorators: { data: [{
|
|
4537
|
+
}], rowClickable: [{
|
|
4231
4538
|
type: Input
|
|
4232
|
-
}],
|
|
4539
|
+
}], rowExpandible: [{
|
|
4233
4540
|
type: Input
|
|
4234
|
-
}]
|
|
4235
|
-
|
|
4236
|
-
class UicPortletCardComponent {
|
|
4237
|
-
title = '';
|
|
4238
|
-
data = [];
|
|
4239
|
-
layout = 'horizontal';
|
|
4240
|
-
cols = 1;
|
|
4241
|
-
gap = 20;
|
|
4242
|
-
labelWeight = 400;
|
|
4243
|
-
valueWeight = 500;
|
|
4244
|
-
get gridTemplateColumns() {
|
|
4245
|
-
if (this.layout !== 'vertical') {
|
|
4246
|
-
return null;
|
|
4247
|
-
}
|
|
4248
|
-
const columns = Math.max(1, Math.floor(this.cols || 1));
|
|
4249
|
-
return `repeat(${columns}, minmax(0, 1fr))`;
|
|
4250
|
-
}
|
|
4251
|
-
copyText(text) {
|
|
4252
|
-
navigator.clipboard.writeText(text)
|
|
4253
|
-
.then(() => {
|
|
4254
|
-
console.log('Copiado!');
|
|
4255
|
-
})
|
|
4256
|
-
.catch(err => {
|
|
4257
|
-
console.error('No se pudo copiar: ', err);
|
|
4258
|
-
});
|
|
4259
|
-
}
|
|
4260
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPortletCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4261
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicPortletCardComponent, isStandalone: true, selector: "ui-portlet-card", inputs: { title: "title", data: "data", layout: "layout", cols: "cols", gap: "gap", labelWeight: "labelWeight", valueWeight: "valueWeight" }, ngImport: i0, template: "@if ( title) {\r\n <h2>{{title}}</h2>\r\n}\r\n<div class=\"portlet\" \r\n [class.portlet-vertical]=\"layout === 'vertical'\" \r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n [style]=\"'gap: ' + gap + 'px;'\" >\r\n @for (item of data; track $index) {\r\n <div class=\"portlet-row\" [class.portlet-row-vertical]=\"layout === 'vertical'\">\r\n <div class=\"portlet-row-label\" [style.fontWeight]=\"labelWeight\">{{item.label}}</div>\r\n <div class=\"portlet-row-value\" [style.fontWeight]=\"valueWeight\">\r\n @if (item.icon) {\r\n <i [class]=\"item.icon\"></i>\r\n }\r\n @if (['text','copy'].includes((item.type??'text'))) {\r\n <div class=\"p-type-text\">\r\n <div class=\"content-texttype\">\r\n {{item.value}} \r\n\r\n @if (item.type == 'copy'){\r\n <ui-button (click)=\"copyText(item.value.toString())\" type=\"bordered\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-file-copy-line\"></ui-button>\r\n }\r\n\r\n </div>\r\n <div class=\"p-type-text-sub\">{{item.subtext}}</div>\r\n </div>\r\n }\r\n @if (item.type == 'money') {\r\n {{ +item.value | currency: item.currencyCode}} \r\n }\r\n \r\n @if (item.type == 'date') {\r\n {{ item.value .toString() | date: 'dd/MM/yyyy'}} \r\n }\r\n @if (item.type == 'status' || item.type == 'tag') {\r\n <ui-status-label [type]=\"item.type\" [color]=\"item.color||'black'\"> {{item.value}}</ui-status-label>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".portlet{display:flex;flex-direction:column}.portlet-vertical{display:grid}.portlet-row{display:flex;justify-content:space-between;font-size:.9rem}.portlet-row-vertical{flex-direction:column;align-items:flex-start;gap:4px}.portlet-row-value{display:flex;justify-content:flex-end;gap:5px}.portlet-row-label{color:var(--grey-400)}.p-type-text{font-size:.9rem;line-height:1.1rem;text-align:right}.p-type-text-sub{text-align:right;color:var(--grey-500);font-size:.8rem;font-weight:300}.portlet-vertical .portlet-row-value{justify-content:flex-start}.portlet-vertical .portlet-row-label,.portlet-vertical .p-type-text,.portlet-vertical .p-type-text-sub{text-align:left}.content-texttype{display:flex;gap:20px;align-items:center;width:100%}h2{width:100%;font-size:20px;font-weight:600;margin-bottom:15px}\n"], dependencies: [{ kind: "component", type: UicStatusLabelComponent, selector: "ui-status-label", inputs: ["color", "type", "icon"] }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
4262
|
-
}
|
|
4263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPortletCardComponent, decorators: [{
|
|
4264
|
-
type: Component,
|
|
4265
|
-
args: [{ selector: 'ui-portlet-card', imports: [
|
|
4266
|
-
UicStatusLabelComponent,
|
|
4267
|
-
CurrencyPipe,
|
|
4268
|
-
UicButtonComponent,
|
|
4269
|
-
DatePipe
|
|
4270
|
-
], template: "@if ( title) {\r\n <h2>{{title}}</h2>\r\n}\r\n<div class=\"portlet\" \r\n [class.portlet-vertical]=\"layout === 'vertical'\" \r\n [style.gridTemplateColumns]=\"gridTemplateColumns\"\r\n [style]=\"'gap: ' + gap + 'px;'\" >\r\n @for (item of data; track $index) {\r\n <div class=\"portlet-row\" [class.portlet-row-vertical]=\"layout === 'vertical'\">\r\n <div class=\"portlet-row-label\" [style.fontWeight]=\"labelWeight\">{{item.label}}</div>\r\n <div class=\"portlet-row-value\" [style.fontWeight]=\"valueWeight\">\r\n @if (item.icon) {\r\n <i [class]=\"item.icon\"></i>\r\n }\r\n @if (['text','copy'].includes((item.type??'text'))) {\r\n <div class=\"p-type-text\">\r\n <div class=\"content-texttype\">\r\n {{item.value}} \r\n\r\n @if (item.type == 'copy'){\r\n <ui-button (click)=\"copyText(item.value.toString())\" type=\"bordered\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-file-copy-line\"></ui-button>\r\n }\r\n\r\n </div>\r\n <div class=\"p-type-text-sub\">{{item.subtext}}</div>\r\n </div>\r\n }\r\n @if (item.type == 'money') {\r\n {{ +item.value | currency: item.currencyCode}} \r\n }\r\n \r\n @if (item.type == 'date') {\r\n {{ item.value .toString() | date: 'dd/MM/yyyy'}} \r\n }\r\n @if (item.type == 'status' || item.type == 'tag') {\r\n <ui-status-label [type]=\"item.type\" [color]=\"item.color||'black'\"> {{item.value}}</ui-status-label>\r\n }\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".portlet{display:flex;flex-direction:column}.portlet-vertical{display:grid}.portlet-row{display:flex;justify-content:space-between;font-size:.9rem}.portlet-row-vertical{flex-direction:column;align-items:flex-start;gap:4px}.portlet-row-value{display:flex;justify-content:flex-end;gap:5px}.portlet-row-label{color:var(--grey-400)}.p-type-text{font-size:.9rem;line-height:1.1rem;text-align:right}.p-type-text-sub{text-align:right;color:var(--grey-500);font-size:.8rem;font-weight:300}.portlet-vertical .portlet-row-value{justify-content:flex-start}.portlet-vertical .portlet-row-label,.portlet-vertical .p-type-text,.portlet-vertical .p-type-text-sub{text-align:left}.content-texttype{display:flex;gap:20px;align-items:center;width:100%}h2{width:100%;font-size:20px;font-weight:600;margin-bottom:15px}\n"] }]
|
|
4271
|
-
}], propDecorators: { title: [{
|
|
4541
|
+
}], pages: [{
|
|
4272
4542
|
type: Input
|
|
4273
|
-
}],
|
|
4543
|
+
}], size: [{
|
|
4274
4544
|
type: Input
|
|
4275
|
-
}],
|
|
4545
|
+
}], squeletonRows: [{
|
|
4276
4546
|
type: Input
|
|
4277
|
-
}],
|
|
4547
|
+
}], buttonSize: [{
|
|
4548
|
+
type: Input
|
|
4549
|
+
}], highlightedId: [{
|
|
4550
|
+
type: Input
|
|
4551
|
+
}], headerText: [{
|
|
4552
|
+
type: Input
|
|
4553
|
+
}], totalItems: [{
|
|
4554
|
+
type: Input
|
|
4555
|
+
}], alignment: [{
|
|
4556
|
+
type: Input
|
|
4557
|
+
}], searchEnabled: [{
|
|
4558
|
+
type: Input
|
|
4559
|
+
}], searchLabel: [{
|
|
4560
|
+
type: Input
|
|
4561
|
+
}], searchPlaceholder: [{
|
|
4562
|
+
type: Input
|
|
4563
|
+
}], headerClass: [{
|
|
4564
|
+
type: Input
|
|
4565
|
+
}], headerBackgroundColor: [{
|
|
4566
|
+
type: Input
|
|
4567
|
+
}], striped: [{
|
|
4568
|
+
type: Input
|
|
4569
|
+
}], showPagination: [{
|
|
4570
|
+
type: Input
|
|
4571
|
+
}], searchOnKeydown: [{
|
|
4572
|
+
type: Input
|
|
4573
|
+
}], showEmptyMessage: [{
|
|
4574
|
+
type: Input
|
|
4575
|
+
}], showSearchButton: [{
|
|
4576
|
+
type: Input
|
|
4577
|
+
}], showTextPagination: [{
|
|
4578
|
+
type: Input
|
|
4579
|
+
}], emptyMessage: [{
|
|
4580
|
+
type: Input
|
|
4581
|
+
}], switchValidation: [{
|
|
4582
|
+
type: Input
|
|
4583
|
+
}], nextButtonText: [{
|
|
4278
4584
|
type: Input
|
|
4279
|
-
}],
|
|
4585
|
+
}], previousButtonText: [{
|
|
4280
4586
|
type: Input
|
|
4281
|
-
}],
|
|
4587
|
+
}], mobilePortletCols: [{
|
|
4282
4588
|
type: Input
|
|
4283
|
-
}],
|
|
4589
|
+
}], searcherShowButtonText: [{
|
|
4284
4590
|
type: Input
|
|
4591
|
+
}], action: [{
|
|
4592
|
+
type: Output
|
|
4593
|
+
}], update: [{
|
|
4594
|
+
type: Output
|
|
4595
|
+
}], checkedChange: [{
|
|
4596
|
+
type: Output
|
|
4597
|
+
}], switchChange: [{
|
|
4598
|
+
type: Output
|
|
4599
|
+
}], clickedRow: [{
|
|
4600
|
+
type: Output
|
|
4601
|
+
}], actionsRef: [{
|
|
4602
|
+
type: ContentChild,
|
|
4603
|
+
args: ['[actions]']
|
|
4285
4604
|
}] } });
|
|
4286
4605
|
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4606
|
+
;
|
|
4607
|
+
;
|
|
4608
|
+
|
|
4609
|
+
class UiAlertComponent {
|
|
4610
|
+
alert;
|
|
4611
|
+
closeAlert = new EventEmitter();
|
|
4612
|
+
interval;
|
|
4613
|
+
progressValue = 0;
|
|
4614
|
+
animationIntevalMs = 100;
|
|
4615
|
+
pauseAnimation = false;
|
|
4616
|
+
id = 0;
|
|
4617
|
+
ngOnInit() {
|
|
4618
|
+
this.id = this.alert.id;
|
|
4619
|
+
if (this.alert.duration && this.alert.duration > 0) {
|
|
4620
|
+
const duration = this.alert.duration;
|
|
4621
|
+
let count = 0;
|
|
4622
|
+
this.interval = setInterval(() => {
|
|
4623
|
+
count = this.pauseAnimation ? count : count + this.animationIntevalMs;
|
|
4624
|
+
this.progressValue = Math.floor((count / duration) * 100);
|
|
4625
|
+
if (this.progressValue > 100) {
|
|
4626
|
+
this.close();
|
|
4627
|
+
}
|
|
4628
|
+
}, this.animationIntevalMs);
|
|
4629
|
+
}
|
|
4294
4630
|
}
|
|
4295
|
-
|
|
4296
|
-
|
|
4631
|
+
close() {
|
|
4632
|
+
clearInterval(this.interval);
|
|
4633
|
+
this.closeAlert.emit(this.id);
|
|
4634
|
+
}
|
|
4635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4636
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UiAlertComponent, isStandalone: true, selector: "ui-alert", inputs: { alert: "alert" }, outputs: { closeAlert: "closeAlert" }, ngImport: i0, template: "<div [class]=\"'alert ' + alert.type + ' ' + (alert.style??'filled')\" >\r\n @if (alert.showProgressBar) {\r\n <div class=\"alert-process\">\r\n <div class=\"alert-process-bar\" [style.width.%]=\"progressValue\"></div>\r\n </div>\r\n }\r\n <div class=\"alert-body\">\r\n <button class=\"close\" (click)=\"close()\"> \u2715 </button>\r\n @if (alert.icon) {\r\n <i [class]=\"'highlighted ' + alert.icon\"></i>\r\n }\r\n <div>\r\n <div class=\"toast-title highlighted\">{{alert.title}}</div>\r\n <div class=\"toast-body\">{{alert.message}}</div>\r\n @if ( alert.okButtonText || alert.cancelButtonText){\r\n <div class=\"toast-buttons \">\r\n @if ( alert.okButtonText ) {\r\n <button style=\"font-weight: 500;\">{{alert.okButtonText}}</button>\r\n }\r\n @if ( alert.cancelButtonText ){\r\n <button (click)=\"close()\">{{alert.cancelButtonText}}</button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [".alert{display:flex;flex-direction:column;min-width:250px;max-width:calc(var(--design-size-ref) * 45);overflow:hidden;animation:fadeIn .3s ease;border-radius:calc(var(--border-radius-md) * 1.5)}@keyframes fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.alert-process{width:100%;height:2px;background-color:#0000004f;display:flex}.alert-process-bar{background-color:#ffffff69;height:2px}.alert-body{position:relative;padding:calc(var(--design-size-ref) * 1.5);display:flex;padding-right:calc(var(--design-size-ref) * 3)}.alert-body i{font-size:20;width:22px;height:22px;margin-right:calc(var(--design-size-ref) * 1.2)}.toast-title{font-weight:500;font-size:16px;line-height:24px}.toast-body{font-weight:400;font-size:14px;line-height:20px}.toast-buttons{margin-top:calc(var(--design-size-ref) * 1.5);display:flex;gap:calc(var(--design-size-ref) * 1.5)}.toast-buttons button{color:var(--white);border:none;background-color:transparent;font-size:calc(var(--design-size-ref) * 1.5);line-height:calc(var(--design-size-ref) * 2);padding:0}.toast-buttons button:hover{text-decoration:underline;cursor:pointer}.close{background:transparent;border:none;color:inherit;font-size:calc(var(--design-size-ref) * 1.5);cursor:pointer;position:absolute;right:5px;top:5px}.filled{color:var(--white)}.filled.success{background:var(--green-600)}.filled.error{background:var(--red-600)}.filled.warning{background:var(--yellow-600)}.filled.info{background:var(--blue-600)}.bordered{border:solid 1px;color:var(--grey-500)}.bordered.success{border-color:var(--green-600);background:var(--green-100)}.bordered.success .highlighted,.bordered.success button{color:var(--green-600)}.bordered.error{border-color:var(--red-600);background:var(--red-100)}.bordered.error .highlighted,.bordered.error button{color:var(--red-600)}.bordered.warning{border-color:var(--yellow-600);background:var(--yellow-100)}.bordered.warning .highlighted,.bordered.warning button{color:var(--yellow-600)}.bordered.info{border-color:var(--blue-600);background:var(--blue-100)}.bordered.info .highlighted,.bordered.info button{color:var(--blue-600)}\n"] });
|
|
4297
4637
|
}
|
|
4298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UiAlertComponent, decorators: [{
|
|
4299
4639
|
type: Component,
|
|
4300
|
-
args: [{ selector: 'ui-
|
|
4301
|
-
}], propDecorators: {
|
|
4302
|
-
type: Input
|
|
4303
|
-
}], activeTab: [{
|
|
4640
|
+
args: [{ selector: 'ui-alert', imports: [], template: "<div [class]=\"'alert ' + alert.type + ' ' + (alert.style??'filled')\" >\r\n @if (alert.showProgressBar) {\r\n <div class=\"alert-process\">\r\n <div class=\"alert-process-bar\" [style.width.%]=\"progressValue\"></div>\r\n </div>\r\n }\r\n <div class=\"alert-body\">\r\n <button class=\"close\" (click)=\"close()\"> \u2715 </button>\r\n @if (alert.icon) {\r\n <i [class]=\"'highlighted ' + alert.icon\"></i>\r\n }\r\n <div>\r\n <div class=\"toast-title highlighted\">{{alert.title}}</div>\r\n <div class=\"toast-body\">{{alert.message}}</div>\r\n @if ( alert.okButtonText || alert.cancelButtonText){\r\n <div class=\"toast-buttons \">\r\n @if ( alert.okButtonText ) {\r\n <button style=\"font-weight: 500;\">{{alert.okButtonText}}</button>\r\n }\r\n @if ( alert.cancelButtonText ){\r\n <button (click)=\"close()\">{{alert.cancelButtonText}}</button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>", styles: [".alert{display:flex;flex-direction:column;min-width:250px;max-width:calc(var(--design-size-ref) * 45);overflow:hidden;animation:fadeIn .3s ease;border-radius:calc(var(--border-radius-md) * 1.5)}@keyframes fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.alert-process{width:100%;height:2px;background-color:#0000004f;display:flex}.alert-process-bar{background-color:#ffffff69;height:2px}.alert-body{position:relative;padding:calc(var(--design-size-ref) * 1.5);display:flex;padding-right:calc(var(--design-size-ref) * 3)}.alert-body i{font-size:20;width:22px;height:22px;margin-right:calc(var(--design-size-ref) * 1.2)}.toast-title{font-weight:500;font-size:16px;line-height:24px}.toast-body{font-weight:400;font-size:14px;line-height:20px}.toast-buttons{margin-top:calc(var(--design-size-ref) * 1.5);display:flex;gap:calc(var(--design-size-ref) * 1.5)}.toast-buttons button{color:var(--white);border:none;background-color:transparent;font-size:calc(var(--design-size-ref) * 1.5);line-height:calc(var(--design-size-ref) * 2);padding:0}.toast-buttons button:hover{text-decoration:underline;cursor:pointer}.close{background:transparent;border:none;color:inherit;font-size:calc(var(--design-size-ref) * 1.5);cursor:pointer;position:absolute;right:5px;top:5px}.filled{color:var(--white)}.filled.success{background:var(--green-600)}.filled.error{background:var(--red-600)}.filled.warning{background:var(--yellow-600)}.filled.info{background:var(--blue-600)}.bordered{border:solid 1px;color:var(--grey-500)}.bordered.success{border-color:var(--green-600);background:var(--green-100)}.bordered.success .highlighted,.bordered.success button{color:var(--green-600)}.bordered.error{border-color:var(--red-600);background:var(--red-100)}.bordered.error .highlighted,.bordered.error button{color:var(--red-600)}.bordered.warning{border-color:var(--yellow-600);background:var(--yellow-100)}.bordered.warning .highlighted,.bordered.warning button{color:var(--yellow-600)}.bordered.info{border-color:var(--blue-600);background:var(--blue-100)}.bordered.info .highlighted,.bordered.info button{color:var(--blue-600)}\n"] }]
|
|
4641
|
+
}], propDecorators: { alert: [{
|
|
4304
4642
|
type: Input
|
|
4305
|
-
}],
|
|
4643
|
+
}], closeAlert: [{
|
|
4306
4644
|
type: Output
|
|
4307
4645
|
}] } });
|
|
4308
4646
|
|
|
4309
|
-
class
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
* Si se envia, se crea como primera pestana.
|
|
4315
|
-
*/
|
|
4316
|
-
componentType;
|
|
4317
|
-
componentInputs = {};
|
|
4318
|
-
/**
|
|
4319
|
-
* Lista inicial de pestanas a renderizar.
|
|
4320
|
-
*/
|
|
4321
|
-
tabs = [];
|
|
4322
|
-
tabsChange = new EventEmitter();
|
|
4323
|
-
tabClosed = new EventEmitter();
|
|
4324
|
-
tabSelected = new EventEmitter();
|
|
4325
|
-
tabAdded = new EventEmitter();
|
|
4326
|
-
addTabRequest = new EventEmitter();
|
|
4327
|
-
fullViewChange = new EventEmitter();
|
|
4328
|
-
minPosition = 1;
|
|
4329
|
-
showAddButton = true;
|
|
4330
|
-
fullView = false;
|
|
4331
|
-
isMinimized = false;
|
|
4332
|
-
activeTabId;
|
|
4333
|
-
tabInstances = [];
|
|
4334
|
-
idCounter = 0;
|
|
4335
|
-
initialized = false;
|
|
4336
|
-
constructor(cdr) {
|
|
4337
|
-
this.cdr = cdr;
|
|
4338
|
-
}
|
|
4339
|
-
ngAfterViewInit() {
|
|
4340
|
-
this.initialized = true;
|
|
4341
|
-
this.initializeTabs();
|
|
4342
|
-
this.renderActiveTab();
|
|
4343
|
-
// Evita ExpressionChanged en el primer ciclo al crear dinamicamente.
|
|
4344
|
-
this.cdr.detectChanges();
|
|
4647
|
+
class UicAlertContainerComponent {
|
|
4648
|
+
alertService;
|
|
4649
|
+
alerts = [];
|
|
4650
|
+
constructor(alertService) {
|
|
4651
|
+
this.alertService = alertService;
|
|
4345
4652
|
}
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
this.
|
|
4349
|
-
}
|
|
4350
|
-
else if (this.componentType) {
|
|
4351
|
-
this.createTab({
|
|
4352
|
-
label: this.componentInputs['title'] ?? 'Panel',
|
|
4353
|
-
componentType: this.componentType,
|
|
4354
|
-
componentInputs: this.componentInputs
|
|
4355
|
-
}, false);
|
|
4356
|
-
}
|
|
4653
|
+
ngOnInit() {
|
|
4654
|
+
this.alertService.stream.subscribe(alert => {
|
|
4655
|
+
this.alerts.push(alert);
|
|
4656
|
+
});
|
|
4357
4657
|
}
|
|
4358
|
-
|
|
4359
|
-
this.
|
|
4360
|
-
this.
|
|
4658
|
+
dismis(id) {
|
|
4659
|
+
const idx = this.alerts.findIndex(f => f.id == id);
|
|
4660
|
+
this.alerts.splice(idx, 1);
|
|
4361
4661
|
}
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicAlertContainerComponent, deps: [{ token: UicPushAlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4663
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicAlertContainerComponent, isStandalone: true, selector: "ui-alert-container", ngImport: i0, template: "<div class=\"alert-container\">\r\n @for (alert of alerts; track alert.id){\r\n <ui-alert\r\n (closeAlert)=\"dismis($event)\"\r\n [alert]=\"alert\">\r\n </ui-alert>\r\n } \r\n</div>\r\n", styles: [".alert-container{position:fixed;top:1rem;right:1rem;display:flex;flex-direction:column;gap:.5rem;z-index:9999}\n"], dependencies: [{ kind: "component", type: UiAlertComponent, selector: "ui-alert", inputs: ["alert"], outputs: ["closeAlert"] }] });
|
|
4664
|
+
}
|
|
4665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicAlertContainerComponent, decorators: [{
|
|
4666
|
+
type: Component,
|
|
4667
|
+
args: [{ selector: 'ui-alert-container', imports: [UiAlertComponent], template: "<div class=\"alert-container\">\r\n @for (alert of alerts; track alert.id){\r\n <ui-alert\r\n (closeAlert)=\"dismis($event)\"\r\n [alert]=\"alert\">\r\n </ui-alert>\r\n } \r\n</div>\r\n", styles: [".alert-container{position:fixed;top:1rem;right:1rem;display:flex;flex-direction:column;gap:.5rem;z-index:9999}\n"] }]
|
|
4668
|
+
}], ctorParameters: () => [{ type: UicPushAlertService }] });
|
|
4669
|
+
|
|
4670
|
+
const base = createValueAccessor();
|
|
4671
|
+
class UicSignaturePadComponent extends base {
|
|
4672
|
+
width = 400;
|
|
4673
|
+
height = 200;
|
|
4674
|
+
strokeColor = '#111827';
|
|
4675
|
+
strokeWidth = 2;
|
|
4676
|
+
disabled = false;
|
|
4677
|
+
imageChange = new EventEmitter();
|
|
4678
|
+
canvasRef;
|
|
4679
|
+
ctx = null;
|
|
4680
|
+
drawing = false;
|
|
4681
|
+
ngAfterViewInit() {
|
|
4682
|
+
const canvas = this.canvasRef.nativeElement;
|
|
4683
|
+
canvas.width = this.width;
|
|
4684
|
+
canvas.height = this.height;
|
|
4685
|
+
this.ctx = canvas.getContext('2d');
|
|
4686
|
+
if (this.ctx) {
|
|
4687
|
+
this.ctx.lineWidth = this.strokeWidth;
|
|
4688
|
+
this.ctx.lineCap = 'round';
|
|
4689
|
+
this.ctx.lineJoin = 'round';
|
|
4690
|
+
this.ctx.strokeStyle = this.strokeColor;
|
|
4370
4691
|
}
|
|
4371
|
-
const instance = this.createTab(tabConfig, true);
|
|
4372
|
-
this.activeTabId = instance.id;
|
|
4373
|
-
this.isMinimized = false;
|
|
4374
|
-
this.renderActiveTab();
|
|
4375
|
-
this.tabAdded.emit(instance.id);
|
|
4376
|
-
this.tabSelected.emit(instance.id);
|
|
4377
|
-
return instance.id;
|
|
4378
4692
|
}
|
|
4379
|
-
|
|
4380
|
-
this.
|
|
4693
|
+
startDraw(event) {
|
|
4694
|
+
if (!this.ctx || this.disabled)
|
|
4695
|
+
return;
|
|
4696
|
+
this.drawing = true;
|
|
4697
|
+
const { x, y } = this.relativePosition(event);
|
|
4698
|
+
this.ctx.beginPath();
|
|
4699
|
+
this.ctx.moveTo(x, y);
|
|
4700
|
+
this.canvasRef.nativeElement.setPointerCapture(event.pointerId);
|
|
4701
|
+
event.preventDefault();
|
|
4381
4702
|
}
|
|
4382
|
-
|
|
4383
|
-
this.
|
|
4384
|
-
if (this.activeTabId === id) {
|
|
4385
|
-
this.minimizePanel();
|
|
4703
|
+
draw(event) {
|
|
4704
|
+
if (!this.drawing || !this.ctx || this.disabled)
|
|
4386
4705
|
return;
|
|
4387
|
-
}
|
|
4388
|
-
this.
|
|
4389
|
-
this.
|
|
4390
|
-
|
|
4706
|
+
const { x, y } = this.relativePosition(event);
|
|
4707
|
+
this.ctx.lineTo(x, y);
|
|
4708
|
+
this.ctx.stroke();
|
|
4709
|
+
event.preventDefault();
|
|
4391
4710
|
}
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
if (index === -1) {
|
|
4711
|
+
endDraw(event) {
|
|
4712
|
+
if (!this.drawing || !this.ctx || this.disabled)
|
|
4395
4713
|
return;
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
}
|
|
4402
|
-
tab.componentRef.destroy();
|
|
4403
|
-
if (this.activeTabId === id) {
|
|
4404
|
-
const next = this.tabInstances[index] ?? this.tabInstances[index - 1];
|
|
4405
|
-
this.activeTabId = next?.id;
|
|
4406
|
-
}
|
|
4407
|
-
if (!this.activeTabId) {
|
|
4408
|
-
this.isMinimized = true;
|
|
4409
|
-
}
|
|
4410
|
-
this.renderActiveTab();
|
|
4411
|
-
this.emitTabsChange();
|
|
4412
|
-
this.tabClosed.emit(id);
|
|
4413
|
-
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4714
|
+
this.ctx.closePath();
|
|
4715
|
+
this.drawing = false;
|
|
4716
|
+
this.canvasRef.nativeElement.releasePointerCapture(event.pointerId);
|
|
4717
|
+
this.emitSignature();
|
|
4718
|
+
event.preventDefault();
|
|
4414
4719
|
}
|
|
4415
|
-
|
|
4416
|
-
if (this.
|
|
4417
|
-
|
|
4418
|
-
|
|
4720
|
+
clear() {
|
|
4721
|
+
if (!this.ctx)
|
|
4722
|
+
return;
|
|
4723
|
+
this.resetCanvas();
|
|
4724
|
+
this.notifyChange(null);
|
|
4725
|
+
this.imageChange.emit(null);
|
|
4419
4726
|
}
|
|
4420
|
-
|
|
4421
|
-
this.
|
|
4422
|
-
|
|
4423
|
-
this.
|
|
4727
|
+
emitSignature() {
|
|
4728
|
+
if (this.disabled)
|
|
4729
|
+
return;
|
|
4730
|
+
const canvas = this.canvasRef.nativeElement;
|
|
4731
|
+
canvas.toBlob((blob) => {
|
|
4732
|
+
if (!blob)
|
|
4733
|
+
return;
|
|
4734
|
+
this.notifyChange(blob);
|
|
4735
|
+
this.imageChange.emit(blob);
|
|
4736
|
+
}, 'image/png');
|
|
4737
|
+
}
|
|
4738
|
+
relativePosition(event) {
|
|
4739
|
+
const rect = this.canvasRef.nativeElement.getBoundingClientRect();
|
|
4740
|
+
return {
|
|
4741
|
+
x: event.clientX - rect.left,
|
|
4742
|
+
y: event.clientY - rect.top,
|
|
4743
|
+
};
|
|
4424
4744
|
}
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
const viewIndex = this.host.indexOf(componentRef.hostView);
|
|
4433
|
-
if (viewIndex > -1) {
|
|
4434
|
-
this.host.detach(viewIndex);
|
|
4435
|
-
}
|
|
4436
|
-
const instance = { ...tabConfig, id, componentRef };
|
|
4437
|
-
this.tabInstances.push(instance);
|
|
4438
|
-
if (!this.activeTabId) {
|
|
4439
|
-
this.activeTabId = id;
|
|
4440
|
-
}
|
|
4441
|
-
if (emitChange) {
|
|
4442
|
-
this.emitTabsChange();
|
|
4745
|
+
writeValue(value) {
|
|
4746
|
+
super.writeValue(value);
|
|
4747
|
+
if (!this.ctx)
|
|
4748
|
+
return;
|
|
4749
|
+
if (!value) {
|
|
4750
|
+
this.resetCanvas();
|
|
4751
|
+
return;
|
|
4443
4752
|
}
|
|
4444
|
-
|
|
4753
|
+
const url = URL.createObjectURL(value);
|
|
4754
|
+
const img = new Image();
|
|
4755
|
+
img.onload = () => {
|
|
4756
|
+
this.resetCanvas();
|
|
4757
|
+
this.ctx.drawImage(img, 0, 0, this.width, this.height);
|
|
4758
|
+
URL.revokeObjectURL(url);
|
|
4759
|
+
};
|
|
4760
|
+
img.src = url;
|
|
4445
4761
|
}
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
this.
|
|
4449
|
-
}
|
|
4450
|
-
const active = this.tabInstances.find(tab => tab.id === this.activeTabId);
|
|
4451
|
-
if (active) {
|
|
4452
|
-
this.host.insert(active.componentRef.hostView);
|
|
4453
|
-
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4762
|
+
resetCanvas() {
|
|
4763
|
+
if (this.ctx) {
|
|
4764
|
+
this.ctx.clearRect(0, 0, this.width, this.height);
|
|
4454
4765
|
}
|
|
4455
4766
|
}
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicWorkPanelComponent, isStandalone: true, selector: "ui-work-panel", inputs: { componentType: "componentType", componentInputs: "componentInputs", tabs: "tabs", minPosition: "minPosition", showAddButton: "showAddButton" }, outputs: { tabsChange: "tabsChange", tabClosed: "tabClosed", tabSelected: "tabSelected", tabAdded: "tabAdded", addTabRequest: "addTabRequest", fullViewChange: "fullViewChange" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\r\n [class]=\"fullView ? 'open-panel' : 'mid-panel'\"\r\n [class.panel-hidden]=\"isMinimized || !activeTabId\"\r\n>\r\n <div class=\"panel-header\">\r\n <ui-button (click)=\"minimizePanel()\" size=\"s\" tip=\"Minimizar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-subtract-fill\"></ui-button>\r\n @if (fullView) {\r\n <ui-button (click)=\"changeSizeBtn(false)\" size=\"s\" tip=\"Reducir\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-collapse-diagonal-fill\"></ui-button>\r\n } @else {\r\n <ui-button (click)=\"changeSizeBtn(true)\" size=\"s\" tip=\"Agrandar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-expand-diagonal-fill\"></ui-button>\r\n }\r\n <ui-button (click)=\"close()\" size=\"s\" tip=\"Cerrar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-close-line\"></ui-button>\r\n </div>\r\n <div class=\"panel-overflow\">\r\n <!-- contenido dinamico -->\r\n <ng-container #host></ng-container>\r\n </div>\r\n</div>\r\n@if (tabInstances.length > 0) {\r\n <div class=\"panel-nav-bar\">\r\n <div class=\"panel-tabs\">\r\n @for (tab of tabInstances; track tab.id) {\r\n <div class=\"minimized-panel\" [class.active]=\"tab.id === activeTabId\">\r\n <button class=\"min-btn\" type=\"button\" (click)=\"selectTab(tab.id)\">\r\n <i [class]=\"tab.icon?tab.icon : 'ri-dossier-line'\"></i>\r\n <div class=\"min-text\">{{ tab.label }}</div>\r\n </button>\r\n <i (click)=\"closeTab(tab.id)\" class=\"close-btn ri-close-line\"></i>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [".open-panel{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background-color:#fff;border:solid 1px var(--grey-300);transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease}.mid-panel{position:fixed;width:50vw;height:80vh;bottom:32px;right:0;display:flex;flex-direction:column;z-index:20;background-color:#fff;border:solid 1px var(--grey-400);border-radius:10px 10px 0 0;box-shadow:0 1px 6px 2px #00000039;transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease,bottom .2s ease,right .2s ease}.panel-nav-bar{background-color:var(--primary-900);box-shadow:0 0 7px 5px #00000041;border-radius:20px 0 0;width:100%;position:fixed;bottom:0;right:0;z-index:100;padding:0 8px 2px 20px;display:flex;gap:8px;height:32px}.panel-tabs{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;overflow-x:auto;flex:1 1 auto}.close-btn{cursor:pointer}.close-btn:hover{color:var(--primary-900)}.minimized-panel{min-width:180px;max-width:260px;height:30px;background-color:#fff;opacity:.5;border-radius:9px;border:solid 3px var(--primary-900);color:var(--grey-800);font-size:13px;padding:0 4px 0 8px;display:flex;align-items:center;gap:5px;transition:background-color .12s ease,border-color .12s ease,color .12s ease}.minimized-panel.active{opacity:1;background-color:#fff;border-color:#fff;border-radius:0 0 9px 9px;color:var(--primary-900);font-weight:600}.minimized-panel .min-text{margin-right:10px;flex:1 1;overflow:hidden;white-space:nowrap}.minimized-panel i{font-size:18px}.min-btn{border:none;background:transparent;color:inherit;display:flex;align-items:center;gap:6px;cursor:pointer;padding:0;flex:1 1 auto}.panel-overflow{width:100%;height:100%;flex:1 1;height:fit-content;overflow:auto;animation:panelFadeIn .16s ease}.panel-header{display:flex;justify-content:flex-end;padding:5px 10px;gap:10px;border-radius:10px 10px 0 0}.add-tab{flex-shrink:0}.open-panel,.mid-panel{transform-origin:bottom right}@keyframes panelFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.panel-hidden{opacity:0;transform:translateY(10px) scale(.98);pointer-events:none}@media (min-width: 480px) and (max-width: 767px){.open-panel{position:fixed;inset:0;width:100vw;height:100vh;border-radius:0}.mid-panel{width:90vw;height:80vh;right:0;left:auto}}@media (max-width: 479px){.open-panel,.mid-panel{position:fixed;inset:0;border-radius:0;z-index:2000}}\n"], dependencies: [{ kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "directive", type: UicToolTipDirective, selector: "[tip]", inputs: ["tip"] }] });
|
|
4767
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSignaturePadComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4768
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicSignaturePadComponent, isStandalone: true, selector: "ui-signature-pad", inputs: { width: "width", height: "height", strokeColor: "strokeColor", strokeWidth: "strokeWidth", disabled: "disabled" }, outputs: { imageChange: "imageChange" }, providers: [
|
|
4769
|
+
{
|
|
4770
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4771
|
+
useExisting: forwardRef(() => UicSignaturePadComponent),
|
|
4772
|
+
multi: true,
|
|
4773
|
+
},
|
|
4774
|
+
], viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"signature-pad\" [style.width.px]=\"width\">\r\n <canvas\r\n #canvas\r\n class=\"signature-canvas\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height\"\r\n (pointerdown)=\"startDraw($event)\"\r\n (pointermove)=\"draw($event)\"\r\n (pointerup)=\"endDraw($event)\"\r\n (pointerleave)=\"endDraw($event)\"\r\n ></canvas>\r\n <div class=\"signature-actions\">\r\n <ui-button size=\"s\" type=\"ghost\" icon=\"ri-delete-bin-line\" (click)=\"clear()\">Limpiar</ui-button>\r\n </div>\r\n</div>\r\n", styles: [".signature-pad{border-radius:8px;padding:8px}.signature-canvas{background-color:#fff;width:100%;display:block;border:1px solid var(--grey-200, #e5e7eb);border-radius:6px;touch-action:none}.signature-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }] });
|
|
4465
4775
|
}
|
|
4466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSignaturePadComponent, decorators: [{
|
|
4467
4777
|
type: Component,
|
|
4468
|
-
args: [{ selector: 'ui-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4778
|
+
args: [{ selector: 'ui-signature-pad', imports: [CommonModule, UicButtonComponent], providers: [
|
|
4779
|
+
{
|
|
4780
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4781
|
+
useExisting: forwardRef(() => UicSignaturePadComponent),
|
|
4782
|
+
multi: true,
|
|
4783
|
+
},
|
|
4784
|
+
], template: "<div class=\"signature-pad\" [style.width.px]=\"width\">\r\n <canvas\r\n #canvas\r\n class=\"signature-canvas\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height\"\r\n (pointerdown)=\"startDraw($event)\"\r\n (pointermove)=\"draw($event)\"\r\n (pointerup)=\"endDraw($event)\"\r\n (pointerleave)=\"endDraw($event)\"\r\n ></canvas>\r\n <div class=\"signature-actions\">\r\n <ui-button size=\"s\" type=\"ghost\" icon=\"ri-delete-bin-line\" (click)=\"clear()\">Limpiar</ui-button>\r\n </div>\r\n</div>\r\n", styles: [".signature-pad{border-radius:8px;padding:8px}.signature-canvas{background-color:#fff;width:100%;display:block;border:1px solid var(--grey-200, #e5e7eb);border-radius:6px;touch-action:none}.signature-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}\n"] }]
|
|
4785
|
+
}], propDecorators: { width: [{
|
|
4473
4786
|
type: Input
|
|
4474
|
-
}],
|
|
4787
|
+
}], height: [{
|
|
4475
4788
|
type: Input
|
|
4476
|
-
}],
|
|
4789
|
+
}], strokeColor: [{
|
|
4477
4790
|
type: Input
|
|
4478
|
-
}],
|
|
4479
|
-
type: Output
|
|
4480
|
-
}], tabClosed: [{
|
|
4481
|
-
type: Output
|
|
4482
|
-
}], tabSelected: [{
|
|
4483
|
-
type: Output
|
|
4484
|
-
}], tabAdded: [{
|
|
4485
|
-
type: Output
|
|
4486
|
-
}], addTabRequest: [{
|
|
4487
|
-
type: Output
|
|
4488
|
-
}], fullViewChange: [{
|
|
4489
|
-
type: Output
|
|
4490
|
-
}], minPosition: [{
|
|
4791
|
+
}], strokeWidth: [{
|
|
4491
4792
|
type: Input
|
|
4492
|
-
}],
|
|
4793
|
+
}], disabled: [{
|
|
4493
4794
|
type: Input
|
|
4795
|
+
}], imageChange: [{
|
|
4796
|
+
type: Output
|
|
4797
|
+
}], canvasRef: [{
|
|
4798
|
+
type: ViewChild,
|
|
4799
|
+
args: ['canvas', { static: true }]
|
|
4494
4800
|
}] } });
|
|
4495
4801
|
|
|
4496
|
-
class
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
host = inject((ElementRef));
|
|
4502
|
-
selectedSet = new Set();
|
|
4503
|
-
allSelected = false;
|
|
4504
|
-
overlayPositions = [
|
|
4505
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
4506
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
4507
|
-
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
4508
|
-
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
4509
|
-
];
|
|
4510
|
-
openMenu() {
|
|
4511
|
-
if (this.overlayRef) {
|
|
4512
|
-
this.close();
|
|
4513
|
-
return;
|
|
4514
|
-
}
|
|
4515
|
-
const origin = this.host.nativeElement.querySelector('.button-container');
|
|
4516
|
-
const positionStrategy = this.overlay.position()
|
|
4517
|
-
.flexibleConnectedTo(origin)
|
|
4518
|
-
.withPositions(this.overlayPositions)
|
|
4519
|
-
.withFlexibleDimensions(false)
|
|
4520
|
-
.withPush(true);
|
|
4521
|
-
this.overlayRef = this.overlay.create({
|
|
4522
|
-
positionStrategy,
|
|
4523
|
-
hasBackdrop: true,
|
|
4524
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
4525
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
4526
|
-
});
|
|
4527
|
-
const portal = new TemplatePortal(this.menuTemplate, this.vcr);
|
|
4528
|
-
this.overlayRef.attach(portal);
|
|
4529
|
-
this.overlayRef.backdropClick().subscribe(() => this.close());
|
|
4530
|
-
}
|
|
4531
|
-
close() {
|
|
4532
|
-
if (this.overlayRef) {
|
|
4533
|
-
this.overlayRef.dispose();
|
|
4534
|
-
this.overlayRef = null;
|
|
4535
|
-
}
|
|
4536
|
-
}
|
|
4537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicOverlayCardComponent, isStandalone: true, selector: "ui-overlay-card", viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], ngImport: i0, template: "<!-- Bot\u00F3n -->\r\n <div (click)=\"openMenu()\" class=\"button-container\">\r\n <ng-content select=\"[button]\"></ng-content>\r\n </div>\r\n\r\n<!-- Men\u00FA -->\r\n<ng-template #menuTemplate>\r\n <div class=\"action-menu\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".action-menu{display:flex;flex-direction:column;min-width:150px;background:#fff;border:1px solid var(--border-color, #ddd);border-radius:10px;box-shadow:0 2px 6px #00000026}.button-container{width:fit-content;height:fit-content;display:block}\n"] });
|
|
4802
|
+
class UicKpiCardComponent {
|
|
4803
|
+
data;
|
|
4804
|
+
loading = false;
|
|
4805
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicKpiCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4806
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicKpiCardComponent, isStandalone: true, selector: "ui-kpi-card", inputs: { data: "data", loading: "loading" }, ngImport: i0, template: "@if (data) {\r\n <div class=\"kpi-card\">\r\n <div >\r\n <div class=\"kpi-card-label\">{{data.label}}</div>\r\n @if (loading) {\r\n <div class=\"kpi-card-value-loading\"></div>\r\n }@else {\r\n\r\n <div [class]=\"'kpi-card-value ui-trc-' + data.textColor\">{{data.value}}</div>\r\n }\r\n </div>\r\n <i [class]=\"data.icon + ' ui-trc-' + data.iconColor\"></i>\r\n </div>\r\n}", styles: [".kpi-card{border:solid 1px var(--table-border-color);background-color:#fff;padding:20px;border-radius:10px;display:flex;justify-content:space-between;align-items:center;font-size:2rem;gap:20px}.kpi-card-label{font-size:.9rem;line-height:1.2rem;color:var(--grey-500)}.kpi-card-value{font-size:1.6rem;font-weight:500;display:flex;padding-top:5px}.kpi-card-value-loading{height:1.6rem;border-radius:5px;animation:shimmer 1.5s infinite;background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);background-size:200% 100%}.ui-trc-primary{color:var(--primary-600)}.ui-trc-red{color:var(--red-600)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-600)}.ui-trc-yellow{color:var(--yellow-600)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-400)}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}\n"] });
|
|
4539
4807
|
}
|
|
4540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicKpiCardComponent, decorators: [{
|
|
4541
4809
|
type: Component,
|
|
4542
|
-
args: [{ selector: 'ui-
|
|
4543
|
-
}], propDecorators: {
|
|
4544
|
-
type:
|
|
4545
|
-
|
|
4810
|
+
args: [{ selector: 'ui-kpi-card', imports: [], template: "@if (data) {\r\n <div class=\"kpi-card\">\r\n <div >\r\n <div class=\"kpi-card-label\">{{data.label}}</div>\r\n @if (loading) {\r\n <div class=\"kpi-card-value-loading\"></div>\r\n }@else {\r\n\r\n <div [class]=\"'kpi-card-value ui-trc-' + data.textColor\">{{data.value}}</div>\r\n }\r\n </div>\r\n <i [class]=\"data.icon + ' ui-trc-' + data.iconColor\"></i>\r\n </div>\r\n}", styles: [".kpi-card{border:solid 1px var(--table-border-color);background-color:#fff;padding:20px;border-radius:10px;display:flex;justify-content:space-between;align-items:center;font-size:2rem;gap:20px}.kpi-card-label{font-size:.9rem;line-height:1.2rem;color:var(--grey-500)}.kpi-card-value{font-size:1.6rem;font-weight:500;display:flex;padding-top:5px}.kpi-card-value-loading{height:1.6rem;border-radius:5px;animation:shimmer 1.5s infinite;background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-200) 50%,var(--grey-100) 75%);background-size:200% 100%}.ui-trc-primary{color:var(--primary-600)}.ui-trc-red{color:var(--red-600)}.ui-trc-blue{color:var(--blue-600)}.ui-trc-green{color:var(--green-600)}.ui-trc-yellow{color:var(--yellow-600)}.ui-trc-black{color:var(--grey-900)}.ui-trc-grey{color:var(--grey-400)}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}\n"] }]
|
|
4811
|
+
}], propDecorators: { data: [{
|
|
4812
|
+
type: Input
|
|
4813
|
+
}], loading: [{
|
|
4814
|
+
type: Input
|
|
4546
4815
|
}] } });
|
|
4547
4816
|
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
state('hidden', style({ transform: 'translateX(100%)' })),
|
|
4556
|
-
// animación al CREARSE
|
|
4557
|
-
transition('void => visible', [
|
|
4558
|
-
style({ opacity: .8, transform: 'translateX(100%)' }),
|
|
4559
|
-
animate('.5s ease')
|
|
4560
|
-
]),
|
|
4561
|
-
// animación al CERRAR
|
|
4562
|
-
transition('visible => hidden', [
|
|
4563
|
-
animate('.5s ease')
|
|
4564
|
-
])
|
|
4565
|
-
]);
|
|
4566
|
-
const fadeBackdrop = trigger('fadeBackdrop', [
|
|
4567
|
-
state('visible', style({ opacity: 1 })),
|
|
4568
|
-
state('hidden', style({ opacity: 0 })),
|
|
4569
|
-
transition('void => visible', [
|
|
4570
|
-
style({ opacity: 0 }),
|
|
4571
|
-
animate('300ms ease-out')
|
|
4572
|
-
]),
|
|
4573
|
-
transition('visible => hidden', [
|
|
4574
|
-
animate('300ms ease-in')
|
|
4575
|
-
])
|
|
4576
|
-
]);
|
|
4577
|
-
|
|
4578
|
-
const simpleFade = trigger('simpleFade', [
|
|
4579
|
-
transition(':enter', [style({ opacity: 0 }), animate('.3s ease', style({ opacity: 1 }))]),
|
|
4580
|
-
transition(':leave', [animate('.3s ease', style({ opacity: 0 }))])
|
|
4581
|
-
]);
|
|
4582
|
-
|
|
4583
|
-
const MODAL_DATA = 'MODAL_DATA';
|
|
4584
|
-
const MODAL_COMPONENT = 'MODAL_COMPONENT';
|
|
4585
|
-
const MODAL_CONFIG = 'MODAL_CONFIG';
|
|
4586
|
-
const MODAL_CLOSE_EVENT = 'modalClosed';
|
|
4587
|
-
const MODAL_CLOSE_REQUEST = 'modalCloserRequested';
|
|
4588
|
-
|
|
4589
|
-
class UiModalRef {
|
|
4590
|
-
overlayRef;
|
|
4591
|
-
modalService;
|
|
4592
|
-
_afterClosed = new Subject();
|
|
4593
|
-
constructor(overlayRef, modalService) {
|
|
4594
|
-
this.overlayRef = overlayRef;
|
|
4595
|
-
this.modalService = modalService;
|
|
4596
|
-
}
|
|
4597
|
-
close(result = null) {
|
|
4598
|
-
this.modalService.close(this.overlayRef, result);
|
|
4599
|
-
this._afterClosed.next({ status: result != null, data: result });
|
|
4600
|
-
this._afterClosed.complete();
|
|
4601
|
-
}
|
|
4602
|
-
closeFloating(result = null) {
|
|
4603
|
-
this.modalService.closeFloating(this.overlayRef, result);
|
|
4604
|
-
this._afterClosed.next({ status: result != null, data: result });
|
|
4605
|
-
this._afterClosed.complete();
|
|
4606
|
-
}
|
|
4607
|
-
afterClosed() {
|
|
4608
|
-
return this._afterClosed.asObservable();
|
|
4609
|
-
}
|
|
4610
|
-
}
|
|
4611
|
-
|
|
4612
|
-
class UicModalComponent {
|
|
4613
|
-
modalRef;
|
|
4614
|
-
component;
|
|
4615
|
-
congif;
|
|
4616
|
-
injector;
|
|
4617
|
-
myConfig = {};
|
|
4618
|
-
ready = false;
|
|
4619
|
-
title = '';
|
|
4620
|
-
portalOutlet;
|
|
4621
|
-
constructor(modalRef, component, congif, injector) {
|
|
4622
|
-
this.modalRef = modalRef;
|
|
4623
|
-
this.component = component;
|
|
4624
|
-
this.congif = congif;
|
|
4625
|
-
this.injector = injector;
|
|
4626
|
-
this.myConfig = congif;
|
|
4627
|
-
}
|
|
4628
|
-
ngAfterViewInit() {
|
|
4629
|
-
const childInjector = Injector.create({
|
|
4630
|
-
providers: [
|
|
4631
|
-
{ provide: UiModalRef, useValue: this.modalRef },
|
|
4632
|
-
{ provide: MODAL_DATA, useValue: this.congif.data }
|
|
4633
|
-
],
|
|
4634
|
-
parent: this.injector
|
|
4635
|
-
});
|
|
4636
|
-
const portal = new ComponentPortal(this.component, null, childInjector);
|
|
4637
|
-
this.portalOutlet.attachComponentPortal(portal);
|
|
4638
|
-
}
|
|
4639
|
-
closeOuside() {
|
|
4640
|
-
if (this.congif.preventCloseingOutside === true)
|
|
4641
|
-
return;
|
|
4642
|
-
this.modalRef.closeFloating(null);
|
|
4643
|
-
}
|
|
4644
|
-
close() {
|
|
4645
|
-
this.modalRef.closeFloating(null);
|
|
4817
|
+
class UicTabsButtonComponent {
|
|
4818
|
+
tabs = [];
|
|
4819
|
+
activeTab = '';
|
|
4820
|
+
activeTabChange = new EventEmitter();
|
|
4821
|
+
selectTab(tab) {
|
|
4822
|
+
this.activeTab = tab;
|
|
4823
|
+
this.activeTabChange.emit(this.activeTab);
|
|
4646
4824
|
}
|
|
4647
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4648
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type:
|
|
4825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTabsButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4826
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTabsButtonComponent, isStandalone: true, selector: "ui-tabs-button", inputs: { tabs: "tabs", activeTab: "activeTab" }, outputs: { activeTabChange: "activeTabChange" }, ngImport: i0, template: "<div class=\"tabs\">\r\n @for (tab of tabs; track $index) {\r\n <div (click)=\"selectTab(tab.key)\" [class.active-tab]=\"tab.key == activeTab\" class=\"tab\"> \r\n @if (tab.icon) {\r\n <i [class]=\"tab.icon\"></i> \r\n }\r\n {{tab.text}}</div>\r\n }\r\n</div>", styles: [".tabs{background-color:var(--grey-100);display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;padding:5px;border-radius:10px}.tab{font-size:.9rem;cursor:pointer;display:flex;gap:15px;justify-content:center;font-weight:400;padding:5px 25px;border-radius:10px;background-color:var(--grey-100);transition:ease .3s}.tab:hover{background-color:#ffffffd7}.active-tab{background-color:#fff}\n"] });
|
|
4649
4827
|
}
|
|
4650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTabsButtonComponent, decorators: [{
|
|
4651
4829
|
type: Component,
|
|
4652
|
-
args: [{ selector: 'ui-
|
|
4653
|
-
}],
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
}] }, { type: undefined, decorators: [{
|
|
4660
|
-
type: Inject,
|
|
4661
|
-
args: [MODAL_CONFIG]
|
|
4662
|
-
}] }, { type: i0.Injector }], propDecorators: { portalOutlet: [{
|
|
4663
|
-
type: ViewChild,
|
|
4664
|
-
args: [CdkPortalOutlet, { static: true }]
|
|
4830
|
+
args: [{ selector: 'ui-tabs-button', imports: [], template: "<div class=\"tabs\">\r\n @for (tab of tabs; track $index) {\r\n <div (click)=\"selectTab(tab.key)\" [class.active-tab]=\"tab.key == activeTab\" class=\"tab\"> \r\n @if (tab.icon) {\r\n <i [class]=\"tab.icon\"></i> \r\n }\r\n {{tab.text}}</div>\r\n }\r\n</div>", styles: [".tabs{background-color:var(--grey-100);display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;padding:5px;border-radius:10px}.tab{font-size:.9rem;cursor:pointer;display:flex;gap:15px;justify-content:center;font-weight:400;padding:5px 25px;border-radius:10px;background-color:var(--grey-100);transition:ease .3s}.tab:hover{background-color:#ffffffd7}.active-tab{background-color:#fff}\n"] }]
|
|
4831
|
+
}], propDecorators: { tabs: [{
|
|
4832
|
+
type: Input
|
|
4833
|
+
}], activeTab: [{
|
|
4834
|
+
type: Input
|
|
4835
|
+
}], activeTabChange: [{
|
|
4836
|
+
type: Output
|
|
4665
4837
|
}] } });
|
|
4666
4838
|
|
|
4667
|
-
class
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4839
|
+
class UicWorkPanelComponent {
|
|
4840
|
+
cdr;
|
|
4841
|
+
host;
|
|
4842
|
+
/**
|
|
4843
|
+
* Compatibilidad con la version previa (un unico componente inicial).
|
|
4844
|
+
* Si se envia, se crea como primera pestana.
|
|
4845
|
+
*/
|
|
4846
|
+
componentType;
|
|
4847
|
+
componentInputs = {};
|
|
4848
|
+
/**
|
|
4849
|
+
* Lista inicial de pestanas a renderizar.
|
|
4850
|
+
*/
|
|
4851
|
+
tabs = [];
|
|
4852
|
+
tabsChange = new EventEmitter();
|
|
4853
|
+
tabClosed = new EventEmitter();
|
|
4854
|
+
tabSelected = new EventEmitter();
|
|
4855
|
+
tabAdded = new EventEmitter();
|
|
4856
|
+
addTabRequest = new EventEmitter();
|
|
4857
|
+
fullViewChange = new EventEmitter();
|
|
4858
|
+
minPosition = 1;
|
|
4859
|
+
showAddButton = true;
|
|
4860
|
+
fullView = false;
|
|
4861
|
+
isMinimized = false;
|
|
4862
|
+
activeTabId;
|
|
4863
|
+
tabInstances = [];
|
|
4864
|
+
idCounter = 0;
|
|
4865
|
+
initialized = false;
|
|
4866
|
+
constructor(cdr) {
|
|
4867
|
+
this.cdr = cdr;
|
|
4694
4868
|
}
|
|
4695
4869
|
ngAfterViewInit() {
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
parent: this.injector
|
|
4702
|
-
});
|
|
4703
|
-
const portal = new ComponentPortal(this.component, null, childInjector);
|
|
4704
|
-
this.portalOutlet.attachComponentPortal(portal);
|
|
4705
|
-
}
|
|
4706
|
-
closeOuside() {
|
|
4707
|
-
if (this.congif.preventCloseingOutside === true)
|
|
4708
|
-
return;
|
|
4709
|
-
this.close();
|
|
4710
|
-
}
|
|
4711
|
-
close() {
|
|
4712
|
-
this.state = 'hidden';
|
|
4870
|
+
this.initialized = true;
|
|
4871
|
+
this.initializeTabs();
|
|
4872
|
+
this.renderActiveTab();
|
|
4873
|
+
// Evita ExpressionChanged en el primer ciclo al crear dinamicamente.
|
|
4874
|
+
this.cdr.detectChanges();
|
|
4713
4875
|
}
|
|
4714
|
-
|
|
4715
|
-
if (this.
|
|
4716
|
-
this.
|
|
4876
|
+
initializeTabs() {
|
|
4877
|
+
if (this.tabs?.length) {
|
|
4878
|
+
this.tabs.forEach(tab => this.createTab(tab, false));
|
|
4717
4879
|
}
|
|
4718
|
-
else {
|
|
4719
|
-
this.
|
|
4880
|
+
else if (this.componentType) {
|
|
4881
|
+
this.createTab({
|
|
4882
|
+
label: this.componentInputs['title'] ?? 'Panel',
|
|
4883
|
+
componentType: this.componentType,
|
|
4884
|
+
componentInputs: this.componentInputs
|
|
4885
|
+
}, false);
|
|
4720
4886
|
}
|
|
4721
4887
|
}
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
}
|
|
4888
|
+
changeSizeBtn(b) {
|
|
4889
|
+
this.fullView = b;
|
|
4890
|
+
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4726
4891
|
}
|
|
4727
|
-
|
|
4728
|
-
|
|
4892
|
+
addTab(tabConfig) {
|
|
4893
|
+
// Si el host aun no esta listo, guardamos la definicion para crearla luego.
|
|
4894
|
+
if (!this.initialized || !this.host) {
|
|
4895
|
+
const id = tabConfig.id ?? `tab-${++this.idCounter}`;
|
|
4896
|
+
this.tabs.push({ ...tabConfig, id });
|
|
4897
|
+
this.activeTabId = id;
|
|
4898
|
+
this.isMinimized = false;
|
|
4899
|
+
return id;
|
|
4900
|
+
}
|
|
4901
|
+
const instance = this.createTab(tabConfig, true);
|
|
4902
|
+
this.activeTabId = instance.id;
|
|
4903
|
+
this.isMinimized = false;
|
|
4904
|
+
this.renderActiveTab();
|
|
4905
|
+
this.tabAdded.emit(instance.id);
|
|
4906
|
+
this.tabSelected.emit(instance.id);
|
|
4907
|
+
return instance.id;
|
|
4729
4908
|
}
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
}
|
|
4733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSideModalComponent, decorators: [{
|
|
4734
|
-
type: Component,
|
|
4735
|
-
args: [{ selector: 'ui-side-modal', imports: [PortalModule, UicButtonComponent], animations: [sideModal, fadeBackdrop], template: "<div [@fadeBackdrop]=\"state\" class=\"backdrop\" (click)=\"closeOuside()\"> \r\n</div>\r\n<div [@sideModal]=\"state\" \r\n (@sideModal.done)=\"onAnimationDone($event)\" \r\n class=\"sidemodal\" \r\n [style.padding-top]=\"myConfig.headerEnabled?'28px':'0'\"\r\n [style.width]=\"myConfig.width??'60%'\" \r\n (click)=\"$event.stopPropagation()\">\r\n @if (myConfig.headerEnabled) {\r\n <ui-button class=\"close-icon\" (click)=\"close()\" icon=\"ri-close-large-line\" type=\"ghost\" color=\"black\" [iconOnly]=\"true\" size=\"m\"></ui-button>\r\n }\r\n <div class=\"sidemodal-body\" [class.nopadding]=\"myConfig.noPadding\">\r\n <ng-template cdkPortalOutlet></ng-template>\r\n </div>\r\n @if (myConfig.footerEnabled) {\r\n <div class=\"sidemodal-footer\">\r\n @if (myConfig.showCancelButton) {\r\n <ui-button (click)=\"cancel()\" color=\"black\" size=\"l\" type=\"bordered\" [icon]=\"myConfig.footerCancelIcon??'ri-close-line'\">{{myConfig.footerCancelButtonText??'Cancelar'}}</ui-button>\r\n }\r\n <ui-button (click)=\"save()\" color=\"black\" size=\"l\" [rightIcon]=\"myConfig.footerOkIcon??'ri-check-line'\">{{myConfig.footerOkButtonText??'Siguiente'}}</ui-button>\r\n </div>\r\n }\r\n</div>", styles: ["::ng-deep .side-modal-panel{position:fixed!important;top:0;right:0;height:100%;width:400px;background:#fff;z-index:2000;box-shadow:-2px 0 8px #0003;display:flex;flex-direction:column}.backdrop{position:fixed;inset:0;width:100%;height:100vh;background-color:#00000080;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;justify-content:flex-end}.close-icon{position:absolute;right:30px;height:30px}.sidemodal{position:fixed;right:0;top:0;height:100%;background-color:var(--white);display:flex;flex-direction:column}@media (max-width: 479px){.sidemodal{width:100%!important}}@media (min-width: 480px) and (max-width: 767px){.sidemodal{width:90%!important}}.sidemodal-header{height:30px;width:100%;padding:0 30px;display:flex;align-items:center;justify-content:space-between}.sidemodal-body{flex:1;overflow-y:auto;padding:32px}.sidemodal-footer{height:calc(9 * var(--design-size-ref));padding:0 calc(4 * var(--design-size-ref));width:100%;display:flex;align-items:center;gap:8px;justify-content:flex-end;border-top:1px solid var(--grey-300)}.nopadding{padding:0}\n"] }]
|
|
4736
|
-
}], ctorParameters: () => [{ type: UiModalRef, decorators: [{
|
|
4737
|
-
type: Inject,
|
|
4738
|
-
args: [UiModalRef]
|
|
4739
|
-
}] }, { type: i0.Type, decorators: [{
|
|
4740
|
-
type: Inject,
|
|
4741
|
-
args: [MODAL_COMPONENT]
|
|
4742
|
-
}] }, { type: undefined, decorators: [{
|
|
4743
|
-
type: Inject,
|
|
4744
|
-
args: [MODAL_CONFIG]
|
|
4745
|
-
}] }, { type: i0.Injector }, { type: UicModalService }], propDecorators: { portalOutlet: [{
|
|
4746
|
-
type: ViewChild,
|
|
4747
|
-
args: [CdkPortalOutlet, { static: true }]
|
|
4748
|
-
}] } });
|
|
4749
|
-
|
|
4750
|
-
class UicModalService {
|
|
4751
|
-
overlay = inject(Overlay);
|
|
4752
|
-
envInjector = inject(EnvironmentInjector);
|
|
4753
|
-
openFloatingModal(component, config = {}) {
|
|
4754
|
-
return this.openModal(component, config, true);
|
|
4909
|
+
requestNewTab() {
|
|
4910
|
+
this.addTabRequest.emit();
|
|
4755
4911
|
}
|
|
4756
|
-
|
|
4757
|
-
|
|
4912
|
+
selectTab(id) {
|
|
4913
|
+
this.isMinimized = false;
|
|
4914
|
+
if (this.activeTabId === id) {
|
|
4915
|
+
this.minimizePanel();
|
|
4916
|
+
return;
|
|
4917
|
+
}
|
|
4918
|
+
this.activeTabId = id;
|
|
4919
|
+
this.renderActiveTab();
|
|
4920
|
+
this.tabSelected.emit(id);
|
|
4758
4921
|
}
|
|
4759
|
-
|
|
4760
|
-
const
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
const injector = this.createModalInjector(overlayRef, modalRef, component, config);
|
|
4764
|
-
if (isFloating) {
|
|
4765
|
-
const modalPortal = new ComponentPortal(UicModalComponent, null, injector);
|
|
4766
|
-
overlayRef.attach(modalPortal);
|
|
4922
|
+
closeTab(id) {
|
|
4923
|
+
const index = this.tabInstances.findIndex(tab => tab.id === id);
|
|
4924
|
+
if (index === -1) {
|
|
4925
|
+
return;
|
|
4767
4926
|
}
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4927
|
+
const [tab] = this.tabInstances.splice(index, 1);
|
|
4928
|
+
const viewIndex = this.host.indexOf(tab.componentRef.hostView);
|
|
4929
|
+
if (viewIndex > -1) {
|
|
4930
|
+
this.host.detach(viewIndex);
|
|
4772
4931
|
}
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4932
|
+
tab.componentRef.destroy();
|
|
4933
|
+
if (this.activeTabId === id) {
|
|
4934
|
+
const next = this.tabInstances[index] ?? this.tabInstances[index - 1];
|
|
4935
|
+
this.activeTabId = next?.id;
|
|
4936
|
+
}
|
|
4937
|
+
if (!this.activeTabId) {
|
|
4938
|
+
this.isMinimized = true;
|
|
4939
|
+
}
|
|
4940
|
+
this.renderActiveTab();
|
|
4941
|
+
this.emitTabsChange();
|
|
4942
|
+
this.tabClosed.emit(id);
|
|
4943
|
+
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4777
4944
|
}
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4945
|
+
close() {
|
|
4946
|
+
if (this.activeTabId) {
|
|
4947
|
+
this.closeTab(this.activeTabId);
|
|
4948
|
+
}
|
|
4781
4949
|
}
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
this.
|
|
4950
|
+
minimizePanel() {
|
|
4951
|
+
this.isMinimized = true;
|
|
4952
|
+
this.activeTabId = '';
|
|
4953
|
+
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4786
4954
|
}
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
}
|
|
4955
|
+
createTab(tabConfig, emitChange = true) {
|
|
4956
|
+
if (!this.host) {
|
|
4957
|
+
throw new Error('WorkPanel host ViewContainerRef not ready');
|
|
4958
|
+
}
|
|
4959
|
+
const id = tabConfig.id ?? `tab-${++this.idCounter}`;
|
|
4960
|
+
const componentRef = this.host.createComponent(tabConfig.componentType);
|
|
4961
|
+
Object.assign(componentRef.instance, tabConfig.componentInputs ?? {});
|
|
4962
|
+
const viewIndex = this.host.indexOf(componentRef.hostView);
|
|
4963
|
+
if (viewIndex > -1) {
|
|
4964
|
+
this.host.detach(viewIndex);
|
|
4965
|
+
}
|
|
4966
|
+
const instance = { ...tabConfig, id, componentRef };
|
|
4967
|
+
this.tabInstances.push(instance);
|
|
4968
|
+
if (!this.activeTabId) {
|
|
4969
|
+
this.activeTabId = id;
|
|
4970
|
+
}
|
|
4971
|
+
if (emitChange) {
|
|
4972
|
+
this.emitTabsChange();
|
|
4973
|
+
}
|
|
4974
|
+
return instance;
|
|
4798
4975
|
}
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
});
|
|
4976
|
+
renderActiveTab() {
|
|
4977
|
+
while (this.host.length) {
|
|
4978
|
+
this.host.detach(0);
|
|
4979
|
+
}
|
|
4980
|
+
const active = this.tabInstances.find(tab => tab.id === this.activeTabId);
|
|
4981
|
+
if (active) {
|
|
4982
|
+
this.host.insert(active.componentRef.hostView);
|
|
4983
|
+
this.fullViewChange.emit(this.isFullViewActivated());
|
|
4984
|
+
}
|
|
4809
4985
|
}
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicModalService, decorators: [{
|
|
4814
|
-
type: Injectable,
|
|
4815
|
-
args: [{
|
|
4816
|
-
providedIn: 'root'
|
|
4817
|
-
}]
|
|
4818
|
-
}] });
|
|
4819
|
-
|
|
4820
|
-
class TinyAlertComponent {
|
|
4821
|
-
modalRef;
|
|
4822
|
-
data;
|
|
4823
|
-
constructor(inData, modalRef) {
|
|
4824
|
-
this.modalRef = modalRef;
|
|
4825
|
-
this.data = inData.alert;
|
|
4986
|
+
emitTabsChange() {
|
|
4987
|
+
const snapshot = this.tabInstances.map(({ componentRef, ...tab }) => ({ ...tab }));
|
|
4988
|
+
this.tabsChange.emit(snapshot);
|
|
4826
4989
|
}
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
this.modalRef.closeFloating(value ? this.response : null);
|
|
4990
|
+
isFullViewActivated() {
|
|
4991
|
+
return !(this.isMinimized || !this.activeTabId) && this.fullView;
|
|
4830
4992
|
}
|
|
4831
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4832
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type:
|
|
4993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicWorkPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicWorkPanelComponent, isStandalone: true, selector: "ui-work-panel", inputs: { componentType: "componentType", componentInputs: "componentInputs", tabs: "tabs", minPosition: "minPosition", showAddButton: "showAddButton" }, outputs: { tabsChange: "tabsChange", tabClosed: "tabClosed", tabSelected: "tabSelected", tabAdded: "tabAdded", addTabRequest: "addTabRequest", fullViewChange: "fullViewChange" }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\r\n [class]=\"fullView ? 'open-panel' : 'mid-panel'\"\r\n [class.panel-hidden]=\"isMinimized || !activeTabId\"\r\n>\r\n <div class=\"panel-header\">\r\n <ui-button class=\"nomob\" (click)=\"minimizePanel()\" size=\"s\" tip=\"Minimizar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-subtract-fill\"></ui-button>\r\n @if (fullView) {\r\n <ui-button class=\"nomob\" (click)=\"changeSizeBtn(false)\" size=\"s\" tip=\"Reducir\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-collapse-diagonal-fill\"></ui-button>\r\n } @else {\r\n <ui-button class=\"nomob\" (click)=\"changeSizeBtn(true)\" size=\"s\" tip=\"Agrandar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-expand-diagonal-fill\"></ui-button>\r\n }\r\n <ui-button (click)=\"close()\" size=\"s\" tip=\"Cerrar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-close-line\"></ui-button>\r\n </div>\r\n <div class=\"panel-overflow\">\r\n <!-- contenido dinamico -->\r\n <ng-container #host></ng-container>\r\n </div>\r\n</div>\r\n@if (tabInstances.length > 0) {\r\n <div class=\"panel-nav-bar\">\r\n <div class=\"panel-tabs\">\r\n @for (tab of tabInstances; track tab.id) {\r\n <div class=\"minimized-panel\" [class.active]=\"tab.id === activeTabId\">\r\n <button class=\"min-btn\" type=\"button\" (click)=\"selectTab(tab.id)\">\r\n <i [class]=\"tab.icon?tab.icon : 'ri-dossier-line'\"></i>\r\n <div class=\"min-text\">{{ tab.label }}</div>\r\n </button>\r\n <i (click)=\"closeTab(tab.id)\" class=\"close-btn ri-close-line\"></i>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [".open-panel{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background-color:#fff;border:solid 1px var(--grey-300);transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease}.mid-panel{position:fixed;width:50vw;height:80vh;bottom:32px;right:0;display:flex;flex-direction:column;z-index:20;background-color:#fff;border:solid 1px var(--grey-400);border-radius:10px 10px 0 0;box-shadow:0 1px 6px 2px #00000039;transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease,bottom .2s ease,right .2s ease}.panel-nav-bar{background-color:var(--primary-900);box-shadow:0 0 7px 5px #00000041;border-radius:20px 0 0;width:100%;position:fixed;bottom:0;right:0;z-index:100;padding:0 8px 2px 20px;display:flex;gap:8px;height:32px}@media (max-width: 479px){.panel-nav-bar{display:none}}.panel-tabs{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;overflow-x:auto;flex:1 1 auto}.close-btn{cursor:pointer}.close-btn:hover{color:var(--primary-900)}.minimized-panel{min-width:180px;max-width:260px;height:30px;background-color:#fff;opacity:.5;border-radius:9px;border:solid 3px var(--primary-900);color:var(--grey-800);font-size:13px;padding:0 4px 0 8px;display:flex;align-items:center;gap:5px;transition:background-color .12s ease,border-color .12s ease,color .12s ease}.minimized-panel.active{opacity:1;background-color:#fff;border-color:#fff;border-radius:0 0 9px 9px;color:var(--primary-900);font-weight:600}.minimized-panel .min-text{margin-right:10px;flex:1 1;overflow:hidden;white-space:nowrap}.minimized-panel i{font-size:18px}.min-btn{border:none;background:transparent;color:inherit;display:flex;align-items:center;gap:6px;cursor:pointer;padding:0;flex:1 1 auto}.panel-overflow{width:100%;height:100%;flex:1 1;height:fit-content;overflow:auto;animation:panelFadeIn .16s ease}.panel-header{display:flex;justify-content:flex-end;padding:5px 10px;gap:10px;border-radius:10px 10px 0 0}.add-tab{flex-shrink:0}.open-panel,.mid-panel{transform-origin:bottom right}@keyframes panelFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.panel-hidden{opacity:0;transform:translateY(10px) scale(.98);pointer-events:none}@media (min-width: 480px) and (max-width: 767px){.open-panel{position:fixed;inset:0;width:100vw;height:100vh;border-radius:0}.mid-panel{width:90vw;height:80vh;right:0;left:auto}}@media (max-width: 479px){.nomob{display:none}.open-panel,.mid-panel{position:fixed;inset:0;border-radius:0;width:100%;height:100vh;z-index:500}}\n"], dependencies: [{ kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "directive", type: UicToolTipDirective, selector: "[tip]", inputs: ["tip"] }] });
|
|
4833
4995
|
}
|
|
4834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicWorkPanelComponent, decorators: [{
|
|
4835
4997
|
type: Component,
|
|
4836
|
-
args: [{ selector: 'ui-
|
|
4837
|
-
}], ctorParameters: () => [{ type:
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
type: 'error',
|
|
4864
|
-
...options,
|
|
4865
|
-
};
|
|
4866
|
-
}
|
|
4867
|
-
function createTinyDelete(body, options) {
|
|
4868
|
-
return {
|
|
4869
|
-
body,
|
|
4870
|
-
title: 'Cornfirmación de acción',
|
|
4871
|
-
iconChar: 'ri-delete-bin-line',
|
|
4872
|
-
okButtonColor: 'red',
|
|
4873
|
-
okButtonText: 'Sí, eliminar',
|
|
4874
|
-
showCancelButton: true,
|
|
4875
|
-
cancelButtonText: 'Cancelar',
|
|
4876
|
-
type: 'delete',
|
|
4877
|
-
...options,
|
|
4878
|
-
};
|
|
4879
|
-
}
|
|
4880
|
-
function createTinyWarning(body, options) {
|
|
4881
|
-
return {
|
|
4882
|
-
body,
|
|
4883
|
-
title: '¡Cuidado!',
|
|
4884
|
-
iconChar: 'ri-alarm-warning-line',
|
|
4885
|
-
okButtonColor: 'yellow',
|
|
4886
|
-
type: 'warning',
|
|
4887
|
-
...options,
|
|
4888
|
-
};
|
|
4889
|
-
}
|
|
4890
|
-
function createTinyInfo(body, options) {
|
|
4891
|
-
return {
|
|
4892
|
-
body,
|
|
4893
|
-
iconChar: 'ri-information-line',
|
|
4894
|
-
okButtonColor: 'black',
|
|
4895
|
-
type: 'info',
|
|
4896
|
-
...options,
|
|
4897
|
-
};
|
|
4898
|
-
}
|
|
4998
|
+
args: [{ selector: 'ui-work-panel', imports: [UicButtonComponent, UicToolTipDirective], template: "<div\r\n [class]=\"fullView ? 'open-panel' : 'mid-panel'\"\r\n [class.panel-hidden]=\"isMinimized || !activeTabId\"\r\n>\r\n <div class=\"panel-header\">\r\n <ui-button class=\"nomob\" (click)=\"minimizePanel()\" size=\"s\" tip=\"Minimizar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-subtract-fill\"></ui-button>\r\n @if (fullView) {\r\n <ui-button class=\"nomob\" (click)=\"changeSizeBtn(false)\" size=\"s\" tip=\"Reducir\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-collapse-diagonal-fill\"></ui-button>\r\n } @else {\r\n <ui-button class=\"nomob\" (click)=\"changeSizeBtn(true)\" size=\"s\" tip=\"Agrandar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-expand-diagonal-fill\"></ui-button>\r\n }\r\n <ui-button (click)=\"close()\" size=\"s\" tip=\"Cerrar\" [iconOnly]=\"true\" color=\"black\" type=\"bordered\" rightIcon=\"ri-close-line\"></ui-button>\r\n </div>\r\n <div class=\"panel-overflow\">\r\n <!-- contenido dinamico -->\r\n <ng-container #host></ng-container>\r\n </div>\r\n</div>\r\n@if (tabInstances.length > 0) {\r\n <div class=\"panel-nav-bar\">\r\n <div class=\"panel-tabs\">\r\n @for (tab of tabInstances; track tab.id) {\r\n <div class=\"minimized-panel\" [class.active]=\"tab.id === activeTabId\">\r\n <button class=\"min-btn\" type=\"button\" (click)=\"selectTab(tab.id)\">\r\n <i [class]=\"tab.icon?tab.icon : 'ri-dossier-line'\"></i>\r\n <div class=\"min-text\">{{ tab.label }}</div>\r\n </button>\r\n <i (click)=\"closeTab(tab.id)\" class=\"close-btn ri-close-line\"></i>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [".open-panel{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background-color:#fff;border:solid 1px var(--grey-300);transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease}.mid-panel{position:fixed;width:50vw;height:80vh;bottom:32px;right:0;display:flex;flex-direction:column;z-index:20;background-color:#fff;border:solid 1px var(--grey-400);border-radius:10px 10px 0 0;box-shadow:0 1px 6px 2px #00000039;transition:transform .18s ease,opacity .18s ease,width .22s ease,height .22s ease,bottom .2s ease,right .2s ease}.panel-nav-bar{background-color:var(--primary-900);box-shadow:0 0 7px 5px #00000041;border-radius:20px 0 0;width:100%;position:fixed;bottom:0;right:0;z-index:100;padding:0 8px 2px 20px;display:flex;gap:8px;height:32px}@media (max-width: 479px){.panel-nav-bar{display:none}}.panel-tabs{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;overflow-x:auto;flex:1 1 auto}.close-btn{cursor:pointer}.close-btn:hover{color:var(--primary-900)}.minimized-panel{min-width:180px;max-width:260px;height:30px;background-color:#fff;opacity:.5;border-radius:9px;border:solid 3px var(--primary-900);color:var(--grey-800);font-size:13px;padding:0 4px 0 8px;display:flex;align-items:center;gap:5px;transition:background-color .12s ease,border-color .12s ease,color .12s ease}.minimized-panel.active{opacity:1;background-color:#fff;border-color:#fff;border-radius:0 0 9px 9px;color:var(--primary-900);font-weight:600}.minimized-panel .min-text{margin-right:10px;flex:1 1;overflow:hidden;white-space:nowrap}.minimized-panel i{font-size:18px}.min-btn{border:none;background:transparent;color:inherit;display:flex;align-items:center;gap:6px;cursor:pointer;padding:0;flex:1 1 auto}.panel-overflow{width:100%;height:100%;flex:1 1;height:fit-content;overflow:auto;animation:panelFadeIn .16s ease}.panel-header{display:flex;justify-content:flex-end;padding:5px 10px;gap:10px;border-radius:10px 10px 0 0}.add-tab{flex-shrink:0}.open-panel,.mid-panel{transform-origin:bottom right}@keyframes panelFadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.panel-hidden{opacity:0;transform:translateY(10px) scale(.98);pointer-events:none}@media (min-width: 480px) and (max-width: 767px){.open-panel{position:fixed;inset:0;width:100vw;height:100vh;border-radius:0}.mid-panel{width:90vw;height:80vh;right:0;left:auto}}@media (max-width: 479px){.nomob{display:none}.open-panel,.mid-panel{position:fixed;inset:0;border-radius:0;width:100%;height:100vh;z-index:500}}\n"] }]
|
|
4999
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { host: [{
|
|
5000
|
+
type: ViewChild,
|
|
5001
|
+
args: ['host', { read: ViewContainerRef, static: true }]
|
|
5002
|
+
}], componentType: [{
|
|
5003
|
+
type: Input
|
|
5004
|
+
}], componentInputs: [{
|
|
5005
|
+
type: Input
|
|
5006
|
+
}], tabs: [{
|
|
5007
|
+
type: Input
|
|
5008
|
+
}], tabsChange: [{
|
|
5009
|
+
type: Output
|
|
5010
|
+
}], tabClosed: [{
|
|
5011
|
+
type: Output
|
|
5012
|
+
}], tabSelected: [{
|
|
5013
|
+
type: Output
|
|
5014
|
+
}], tabAdded: [{
|
|
5015
|
+
type: Output
|
|
5016
|
+
}], addTabRequest: [{
|
|
5017
|
+
type: Output
|
|
5018
|
+
}], fullViewChange: [{
|
|
5019
|
+
type: Output
|
|
5020
|
+
}], minPosition: [{
|
|
5021
|
+
type: Input
|
|
5022
|
+
}], showAddButton: [{
|
|
5023
|
+
type: Input
|
|
5024
|
+
}] } });
|
|
4899
5025
|
|
|
4900
|
-
class
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
5026
|
+
class UicOverlayCardComponent {
|
|
5027
|
+
menuTemplate;
|
|
5028
|
+
overlayRef;
|
|
5029
|
+
overlay = inject(Overlay);
|
|
5030
|
+
vcr = inject(ViewContainerRef);
|
|
5031
|
+
host = inject((ElementRef));
|
|
5032
|
+
selectedSet = new Set();
|
|
5033
|
+
allSelected = false;
|
|
5034
|
+
overlayPositions = [
|
|
5035
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
5036
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
5037
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
5038
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
|
|
5039
|
+
];
|
|
5040
|
+
openMenu() {
|
|
5041
|
+
if (this.overlayRef) {
|
|
5042
|
+
this.close();
|
|
5043
|
+
return;
|
|
5044
|
+
}
|
|
5045
|
+
const origin = this.host.nativeElement.querySelector('.button-container');
|
|
5046
|
+
const positionStrategy = this.overlay.position()
|
|
5047
|
+
.flexibleConnectedTo(origin)
|
|
5048
|
+
.withPositions(this.overlayPositions)
|
|
5049
|
+
.withFlexibleDimensions(false)
|
|
5050
|
+
.withPush(true);
|
|
5051
|
+
this.overlayRef = this.overlay.create({
|
|
5052
|
+
positionStrategy,
|
|
5053
|
+
hasBackdrop: true,
|
|
5054
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
5055
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
4912
5056
|
});
|
|
5057
|
+
const portal = new TemplatePortal(this.menuTemplate, this.vcr);
|
|
5058
|
+
this.overlayRef.attach(portal);
|
|
5059
|
+
this.overlayRef.backdropClick().subscribe(() => this.close());
|
|
4913
5060
|
}
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
}
|
|
4920
|
-
warning(message, options) {
|
|
4921
|
-
return this.showAlert(createTinyWarning(message, options));
|
|
4922
|
-
}
|
|
4923
|
-
info(message, options) {
|
|
4924
|
-
return this.showAlert(createTinyInfo(message, options));
|
|
4925
|
-
}
|
|
4926
|
-
deleteConfirmation(message, options) {
|
|
4927
|
-
return this.showAlert(createTinyDelete(message, options));
|
|
5061
|
+
close() {
|
|
5062
|
+
if (this.overlayRef) {
|
|
5063
|
+
this.overlayRef.dispose();
|
|
5064
|
+
this.overlayRef = null;
|
|
5065
|
+
}
|
|
4928
5066
|
}
|
|
4929
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4930
|
-
static
|
|
5067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5068
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UicOverlayCardComponent, isStandalone: true, selector: "ui-overlay-card", viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menuTemplate"], descendants: true }], ngImport: i0, template: "<!-- Bot\u00F3n -->\r\n <div (click)=\"openMenu()\" class=\"button-container\">\r\n <ng-content select=\"[button]\"></ng-content>\r\n </div>\r\n\r\n<!-- Men\u00FA -->\r\n<ng-template #menuTemplate>\r\n <div class=\"action-menu\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".action-menu{display:flex;flex-direction:column;min-width:150px;background:#fff;border:1px solid var(--border-color, #ddd);border-radius:10px;box-shadow:0 2px 6px #00000026}.button-container{width:fit-content;height:fit-content;display:block}\n"] });
|
|
4931
5069
|
}
|
|
4932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
4933
|
-
type:
|
|
4934
|
-
args: [{
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
5070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayCardComponent, decorators: [{
|
|
5071
|
+
type: Component,
|
|
5072
|
+
args: [{ selector: 'ui-overlay-card', imports: [], template: "<!-- Bot\u00F3n -->\r\n <div (click)=\"openMenu()\" class=\"button-container\">\r\n <ng-content select=\"[button]\"></ng-content>\r\n </div>\r\n\r\n<!-- Men\u00FA -->\r\n<ng-template #menuTemplate>\r\n <div class=\"action-menu\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".action-menu{display:flex;flex-direction:column;min-width:150px;background:#fff;border:1px solid var(--border-color, #ddd);border-radius:10px;box-shadow:0 2px 6px #00000026}.button-container{width:fit-content;height:fit-content;display:block}\n"] }]
|
|
5073
|
+
}], propDecorators: { menuTemplate: [{
|
|
5074
|
+
type: ViewChild,
|
|
5075
|
+
args: ['menuTemplate']
|
|
5076
|
+
}] } });
|
|
5077
|
+
|
|
5078
|
+
const simpleFade = trigger('simpleFade', [
|
|
5079
|
+
transition(':enter', [style({ opacity: 0 }), animate('.3s ease', style({ opacity: 1 }))]),
|
|
5080
|
+
transition(':leave', [animate('.3s ease', style({ opacity: 0 }))])
|
|
5081
|
+
]);
|
|
4938
5082
|
|
|
4939
5083
|
class FirstCapitalPipe {
|
|
4940
5084
|
transform(str, max = 0) {
|
|
@@ -4963,34 +5107,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4963
5107
|
}]
|
|
4964
5108
|
}] });
|
|
4965
5109
|
|
|
4966
|
-
// Mapea datos a tablas (deben tener el mismo nombre)
|
|
4967
|
-
function helperTableMapDatoToColums(data, headers) {
|
|
4968
|
-
const row = [];
|
|
4969
|
-
headers.forEach(head => {
|
|
4970
|
-
if (head.key in data && head.type == 'text') {
|
|
4971
|
-
row.push({
|
|
4972
|
-
key: head.key,
|
|
4973
|
-
value: data[head.key]
|
|
4974
|
-
});
|
|
4975
|
-
}
|
|
4976
|
-
});
|
|
4977
|
-
return row;
|
|
4978
|
-
}
|
|
4979
|
-
// MAPEA EL RESULTADO DE UN FORMULARIO AL DTO
|
|
4980
|
-
function helperFormMapFormdataToObject(formData, defaults) {
|
|
4981
|
-
return {
|
|
4982
|
-
...defaults,
|
|
4983
|
-
...Object.fromEntries(Object.keys(defaults)
|
|
4984
|
-
.filter(key => key in formData)
|
|
4985
|
-
.map(key => [key, formData[key]]))
|
|
4986
|
-
};
|
|
4987
|
-
}
|
|
4988
|
-
|
|
4989
5110
|
// COMPONENTS
|
|
4990
5111
|
|
|
4991
5112
|
/**
|
|
4992
5113
|
* Generated bundle index. Do not edit.
|
|
4993
5114
|
*/
|
|
4994
5115
|
|
|
4995
|
-
export { DROPDOWN_OVERLAY_CONTROLS, FirstCapitalPipe, MODAL_CLOSE_EVENT, MODAL_CLOSE_REQUEST, MODAL_COMPONENT, MODAL_CONFIG, MODAL_DATA, UiDropdownCloseDirective, UiModalRef, UicActionButtonComponent, UicAlertContainerComponent, UicButtonComponent, UicCheckboxComponent, UicDatePickerComponent, UicDropdownContainerComponent, UicFileInputComponent, UicFormWrapperComponent, UicInputComponent, UicKpiCardComponent, UicModalService, UicMultySearcherComponent, UicMultySelectComponent, UicNameInitsPipe, UicOverlayCardComponent, UicPhoneInputComponent, UicPortletCardComponent, UicPushAlertService, UicRadioComponent, UicSearcherComponent, UicSelectComponent, UicSignaturePadComponent, UicSkeletonLoaderComponent, UicSliderComponent, UicStepTabsComponent, UicStepsFormComponent, UicSwichComponent, UicTableComponent, UicTabsButtonComponent, UicTimePickerComponent, UicTinyAlertService, UicToolTipDirective, UicWorkPanelComponent, animatedRow, fadeAndRise, fadeBackdrop, helperFormMapFormdataToObject, helperTableMapDatoToColums, highlightRow, pushTop, sideModal, simpleFade };
|
|
5116
|
+
export { DROPDOWN_OVERLAY_CONTROLS, FirstCapitalPipe, MODAL_CLOSE_EVENT, MODAL_CLOSE_REQUEST, MODAL_COMPONENT, MODAL_CONFIG, MODAL_DATA, UiDropdownCloseDirective, UiModalRef, UicActionButtonComponent, UicAlertContainerComponent, UicButtonComponent, UicCheckboxComponent, UicDatePickerComponent, UicDropdownContainerComponent, UicFileInputComponent, UicFormWrapperComponent, UicInputComponent, UicKpiCardComponent, UicModalService, UicMultySearcherComponent, UicMultySelectComponent, UicNameInitsPipe, UicOverlayCardComponent, UicPhoneInputComponent, UicPortletCardComponent, UicPushAlertService, UicRadioComponent, UicSearcherComponent, UicSelectComponent, UicShortTableComponent, UicSignaturePadComponent, UicSkeletonLoaderComponent, UicSliderComponent, UicStepTabsComponent, UicStepsFormComponent, UicSwichComponent, UicTableComponent, UicTabsButtonComponent, UicTimePickerComponent, UicTinyAlertService, UicToolTipDirective, UicWorkPanelComponent, animatedRow, fadeAndRise, fadeBackdrop, helperFormMapFormdataToObject, helperTableMapDatoToColums, highlightRow, isMobile, pushTop, sideModal, simpleFade };
|
|
4996
5117
|
//# sourceMappingURL=ui-core-abv.mjs.map
|