ui-core-abv 0.8.8 → 0.9.0
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 +384 -269
- package/fesm2022/ui-core-abv.mjs.map +1 -1
- package/lib/components/dynamic-form/form.models.d.ts +1 -1
- package/lib/components/dynamic-form/overlay-dropdown.service.d.ts +36 -0
- package/lib/components/dynamic-form/search-resolver.service.d.ts +20 -0
- package/lib/components/inputs/date-picker/date-picker.component.d.ts +2 -4
- package/lib/components/inputs/input/input.component.d.ts +1 -5
- package/lib/components/inputs/multy-searcher/multy-searcher.component.d.ts +50 -7
- package/lib/components/inputs/multy-select/multy-select.component.d.ts +2 -4
- package/lib/components/inputs/phone-input/phone-input.component.d.ts +2 -3
- package/lib/components/inputs/select/select.component.d.ts +3 -4
- package/lib/components/inputs/time-picker/time-picker.component.d.ts +2 -4
- package/lib/components/inputs/uic-searcher/uic-searcher.component.d.ts +3 -8
- package/lib/translate/dictionary.en.d.ts +1 -0
- package/lib/translate/dictionary.es.d.ts +1 -0
- package/package.json +1 -1
package/fesm2022/ui-core-abv.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { Input, Component, EventEmitter, Output, Directive, forwardRef, InjectionToken, Optional, Inject, Injectable, inject, ChangeDetectorRef, Pipe, ViewContainerRef, ElementRef, ViewChild, createComponent, HostListener, ViewChildren, Host, DestroyRef, signal, computed, output, effect, TemplateRef, ContentChild, Injector, EnvironmentInjector, HostBinding, input, contentChildren } from '@angular/core';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule, FormBuilder, Validators, ReactiveFormsModule, FormArray } from '@angular/forms';
|
|
7
|
-
import { BehaviorSubject, Subject, debounceTime, distinctUntilChanged,
|
|
7
|
+
import { BehaviorSubject, Subject, debounceTime, distinctUntilChanged, switchMap, of, finalize, map, isObservable, from, Subscription } from 'rxjs';
|
|
8
8
|
import { HttpClient } from '@angular/common/http';
|
|
9
9
|
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
10
10
|
import * as i1$2 from '@angular/cdk/portal';
|
|
@@ -124,8 +124,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
124
124
|
type: Input
|
|
125
125
|
}] } });
|
|
126
126
|
|
|
127
|
-
const base$
|
|
128
|
-
class UicCheckboxComponent extends base$
|
|
127
|
+
const base$d = createValueAccessor();
|
|
128
|
+
class UicCheckboxComponent extends base$d {
|
|
129
129
|
icon = ''; // Icono externo
|
|
130
130
|
iconColor = 'black';
|
|
131
131
|
label = '';
|
|
@@ -376,6 +376,7 @@ const DICTIONARY_EN = {
|
|
|
376
376
|
clear_tip: 'Clear',
|
|
377
377
|
empty: 'No items to show',
|
|
378
378
|
without_selected: 'No selected items',
|
|
379
|
+
already_selected: 'This item is already selected',
|
|
379
380
|
},
|
|
380
381
|
alerts: {
|
|
381
382
|
success_title: 'Operation successful',
|
|
@@ -728,6 +729,7 @@ const DICTIONARY_ES = {
|
|
|
728
729
|
clear_tip: 'Limpiar',
|
|
729
730
|
empty: 'No hay elementos para mostrar',
|
|
730
731
|
without_selected: 'Sin elementos seleccionados',
|
|
732
|
+
already_selected: 'Este elemento ya fue seleccionado',
|
|
731
733
|
},
|
|
732
734
|
alerts: {
|
|
733
735
|
success_title: 'Operacion exitosa',
|
|
@@ -1022,8 +1024,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1022
1024
|
}]
|
|
1023
1025
|
}] });
|
|
1024
1026
|
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
+
const DEFAULT_POSITIONS$1 = [
|
|
1028
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1029
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1030
|
+
];
|
|
1031
|
+
class UicOverlayHandle {
|
|
1032
|
+
overlayRef;
|
|
1033
|
+
constructor(overlayRef) {
|
|
1034
|
+
this.overlayRef = overlayRef;
|
|
1035
|
+
}
|
|
1036
|
+
get isOpen() {
|
|
1037
|
+
return !!this.overlayRef && this.overlayRef.hasAttached();
|
|
1038
|
+
}
|
|
1039
|
+
get overlayElement() {
|
|
1040
|
+
return this.overlayRef.overlayElement;
|
|
1041
|
+
}
|
|
1042
|
+
updatePosition() {
|
|
1043
|
+
this.overlayRef.updatePosition();
|
|
1044
|
+
}
|
|
1045
|
+
close() {
|
|
1046
|
+
this.overlayRef.dispose();
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
class UicOverlayDropdownService {
|
|
1050
|
+
overlay = inject(Overlay);
|
|
1051
|
+
open(config) {
|
|
1052
|
+
const positions = config.positions ?? this.getPreferredPositions(config.origin);
|
|
1053
|
+
const width = config.width === 'auto' ? undefined : config.width ?? config.origin.offsetWidth;
|
|
1054
|
+
const positionStrategy = this.overlay
|
|
1055
|
+
.position()
|
|
1056
|
+
.flexibleConnectedTo(config.origin)
|
|
1057
|
+
.withPositions(positions)
|
|
1058
|
+
.withFlexibleDimensions(config.flexibleDimensions ?? true)
|
|
1059
|
+
.withPush(false);
|
|
1060
|
+
const overlayRef = this.overlay.create({
|
|
1061
|
+
positionStrategy,
|
|
1062
|
+
width,
|
|
1063
|
+
hasBackdrop: true,
|
|
1064
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
1065
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
1066
|
+
});
|
|
1067
|
+
const portal = new TemplatePortal(config.template, config.viewContainerRef);
|
|
1068
|
+
overlayRef.attach(portal);
|
|
1069
|
+
overlayRef.backdropClick().subscribe(() => {
|
|
1070
|
+
if (config.onBackdropClick) {
|
|
1071
|
+
config.onBackdropClick();
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
overlayRef.dispose();
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
if (config.onKeydown) {
|
|
1078
|
+
overlayRef.keydownEvents().subscribe(event => config.onKeydown(event));
|
|
1079
|
+
}
|
|
1080
|
+
if (config.onClose) {
|
|
1081
|
+
overlayRef.detachments().subscribe(() => config.onClose());
|
|
1082
|
+
}
|
|
1083
|
+
if (config.autoReposition ?? true) {
|
|
1084
|
+
this.observeSizeChanges(overlayRef);
|
|
1085
|
+
}
|
|
1086
|
+
return new UicOverlayHandle(overlayRef);
|
|
1087
|
+
}
|
|
1088
|
+
observeSizeChanges(overlayRef) {
|
|
1089
|
+
if (typeof ResizeObserver === 'undefined')
|
|
1090
|
+
return;
|
|
1091
|
+
const resizeObserver = new ResizeObserver(() => overlayRef.updatePosition());
|
|
1092
|
+
resizeObserver.observe(overlayRef.overlayElement);
|
|
1093
|
+
overlayRef.detachments().subscribe(() => resizeObserver.disconnect());
|
|
1094
|
+
}
|
|
1095
|
+
getPreferredPositions(origin) {
|
|
1096
|
+
if (typeof window === 'undefined')
|
|
1097
|
+
return DEFAULT_POSITIONS$1;
|
|
1098
|
+
const rect = origin.getBoundingClientRect();
|
|
1099
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
1100
|
+
const spaceAbove = rect.top;
|
|
1101
|
+
return spaceBelow >= spaceAbove ? DEFAULT_POSITIONS$1 : [...DEFAULT_POSITIONS$1].reverse();
|
|
1102
|
+
}
|
|
1103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1104
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayDropdownService, providedIn: 'root' });
|
|
1105
|
+
}
|
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicOverlayDropdownService, decorators: [{
|
|
1107
|
+
type: Injectable,
|
|
1108
|
+
args: [{ providedIn: 'root' }]
|
|
1109
|
+
}] });
|
|
1110
|
+
|
|
1111
|
+
const base$c = createValueAccessor();
|
|
1112
|
+
class UicDatePickerComponent extends base$c {
|
|
1027
1113
|
icon = ''; // Icono externo
|
|
1028
1114
|
iconColor = 'black';
|
|
1029
1115
|
internalIcon = ''; //Icono interno
|
|
@@ -1039,7 +1125,7 @@ class UicDatePickerComponent extends base$b {
|
|
|
1039
1125
|
justMonth = false;
|
|
1040
1126
|
monthDay = 'first';
|
|
1041
1127
|
calendarTemplate;
|
|
1042
|
-
|
|
1128
|
+
overlayHandle;
|
|
1043
1129
|
// Fijos
|
|
1044
1130
|
months = Array.from({ length: 12 }, (_, i) => new Date(2000, i, 1).toLocaleString('default', { month: 'short' }));
|
|
1045
1131
|
today = new Date();
|
|
@@ -1058,7 +1144,7 @@ class UicDatePickerComponent extends base$b {
|
|
|
1058
1144
|
get inputPlaceholder() {
|
|
1059
1145
|
return this.justMonth ? 'mm/yyyy' : 'dd/mm/yyyy';
|
|
1060
1146
|
}
|
|
1061
|
-
|
|
1147
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
1062
1148
|
vcr = inject(ViewContainerRef);
|
|
1063
1149
|
host = inject((ElementRef));
|
|
1064
1150
|
ngOnInit() {
|
|
@@ -1080,30 +1166,21 @@ class UicDatePickerComponent extends base$b {
|
|
|
1080
1166
|
}
|
|
1081
1167
|
}
|
|
1082
1168
|
// --- Overlay ---
|
|
1083
|
-
overlayPositions = [
|
|
1084
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1085
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1086
|
-
];
|
|
1087
1169
|
openCalendar() {
|
|
1088
1170
|
if (this.disabled)
|
|
1089
1171
|
return;
|
|
1090
|
-
if (this.
|
|
1172
|
+
if (this.overlayHandle?.isOpen) {
|
|
1091
1173
|
this.closeCalendar();
|
|
1092
1174
|
}
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
.
|
|
1097
|
-
.
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
1102
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
1175
|
+
const input = this.host.nativeElement.querySelector('.fakeinput');
|
|
1176
|
+
this.overlayHandle = this.overlayS.open({
|
|
1177
|
+
origin: input,
|
|
1178
|
+
template: this.calendarTemplate,
|
|
1179
|
+
viewContainerRef: this.vcr,
|
|
1180
|
+
width: 'auto',
|
|
1181
|
+
flexibleDimensions: false,
|
|
1182
|
+
onClose: () => this.onTouched(),
|
|
1103
1183
|
});
|
|
1104
|
-
const portal = new TemplatePortal(this.calendarTemplate, this.vcr);
|
|
1105
|
-
this.overlayRef.attach(portal);
|
|
1106
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeCalendar());
|
|
1107
1184
|
this.view = this.justMonth ? 'months' : 'days';
|
|
1108
1185
|
if (this.justMonth) {
|
|
1109
1186
|
this.decadeRange = this.getDecadeRange();
|
|
@@ -1111,11 +1188,7 @@ class UicDatePickerComponent extends base$b {
|
|
|
1111
1188
|
this.setCurrentViewDate(this.getInitialViewDate());
|
|
1112
1189
|
}
|
|
1113
1190
|
closeCalendar() {
|
|
1114
|
-
|
|
1115
|
-
this.onTouched();
|
|
1116
|
-
this.overlayRef.dispose();
|
|
1117
|
-
this.overlayRef = null;
|
|
1118
|
-
}
|
|
1191
|
+
this.overlayHandle?.close();
|
|
1119
1192
|
}
|
|
1120
1193
|
get monthName() {
|
|
1121
1194
|
return this.selectedDate.toLocaleString('default', { month: 'long' });
|
|
@@ -1586,8 +1659,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1586
1659
|
}]
|
|
1587
1660
|
}] });
|
|
1588
1661
|
|
|
1589
|
-
const base$
|
|
1590
|
-
class UicFileInputComponent extends base$
|
|
1662
|
+
const base$b = createValueAccessor();
|
|
1663
|
+
class UicFileInputComponent extends base$b {
|
|
1591
1664
|
icon = ''; // Icono externo
|
|
1592
1665
|
iconColor = 'black';
|
|
1593
1666
|
internalIcon = ''; //Icono interno
|
|
@@ -1877,17 +1950,8 @@ class UicInputComponent {
|
|
|
1877
1950
|
// FUNCTIONS
|
|
1878
1951
|
disabled = false;
|
|
1879
1952
|
loading = false;
|
|
1880
|
-
clickButton = new EventEmitter();
|
|
1881
|
-
disableBtn = false;
|
|
1882
|
-
disableButton() {
|
|
1883
|
-
this.clickButton.emit();
|
|
1884
|
-
this.disableBtn = true;
|
|
1885
|
-
setTimeout(() => {
|
|
1886
|
-
this.disableBtn = false;
|
|
1887
|
-
}, 200);
|
|
1888
|
-
}
|
|
1889
1953
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1890
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicInputComponent, isStandalone: true, selector: "ui-input", inputs: { icon: "icon", iconColor: "iconColor", internalIcon: "internalIcon", internalIconColor: "internalIconColor", size: "size", label: "label", error: "error", tip: "tip", disabled: "disabled", loading: "loading" },
|
|
1954
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicInputComponent, isStandalone: true, selector: "ui-input", inputs: { icon: "icon", iconColor: "iconColor", internalIcon: "internalIcon", internalIconColor: "internalIconColor", size: "size", label: "label", error: "error", tip: "tip", disabled: "disabled", loading: "loading" }, ngImport: i0, template: "\r\n<ui-input-wrapper\r\n [icon]=\"icon\"\r\n [iconColor]=\"iconColor\"\r\n [label]=\"label\"\r\n [error]=\"error\"\r\n [tip]=\"tip\"\r\n [disabled]=\"disabled\"> \r\n <div class=\"fakeinput\" [ngClass]=\"{'errorinput':error, 'disabledinput':disabled,'loading-input':loading}\">\r\n @if (internalIcon) {\r\n <i class=\"input-internalicon {{internalIcon}} f-{{internalIconColor}}\" ></i>\r\n }\r\n <div class=\"input-container\" >\r\n <ng-content></ng-content>\r\n </div> \r\n </div>\r\n <span class=\"char-counter\" style=\"padding-top: 1px;\" >\r\n <ng-content select=\"[counter]\"></ng-content>\r\n </span>\r\n</ui-input-wrapper>", styles: [":host{width:100%}.input-container{flex:1 1;overflow:hidden}.f-extralight{font-weight:300;color:var(--grey-500)}.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;display:flex;flex-direction:column}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.option-group-header{padding:.25rem .5rem 2px;font-size:.75rem;font-weight:600;color:var(--grey-500);text-transform:uppercase;letter-spacing:.05em;pointer-events:none;-webkit-user-select:none;user-select:none}.option-group-header:not(:first-child){border-top:1px solid var(--grey-200);margin-top:.25rem}.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(--secondary-100)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-disabled{opacity:.55;cursor:not-allowed}.input-option-disabled:hover{background-color:transparent;cursor:not-allowed}.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;min-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-grey{color:var(--grey-400)}.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}.select-searcher{width:100%;display:flex;gap:5px;padding:.25rem;border-bottom:1px solid var(--grey-200);background-color:var(--white)}.select-searcher>input{flex:1 1;padding:3px 5px;border:solid 1px var(--grey-200);margin:0 auto;border-radius:4px}.select-searcher>input:focus{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha);border-color:var(--primary-500)}.option-text-highlight ::ng-deep mark{background-color:var(--secondary-200);color:inherit;padding:0;border-radius:2px}@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: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: InputWrapperComponent, selector: "ui-input-wrapper", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled"] }] });
|
|
1891
1955
|
}
|
|
1892
1956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicInputComponent, decorators: [{
|
|
1893
1957
|
type: Component,
|
|
@@ -1912,12 +1976,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1912
1976
|
type: Input
|
|
1913
1977
|
}], loading: [{
|
|
1914
1978
|
type: Input
|
|
1915
|
-
}], clickButton: [{
|
|
1916
|
-
type: Output
|
|
1917
1979
|
}] } });
|
|
1918
1980
|
|
|
1919
|
-
const base$
|
|
1920
|
-
class UicMultySelectComponent extends base$
|
|
1981
|
+
const base$a = createValueAccessor();
|
|
1982
|
+
class UicMultySelectComponent extends base$a {
|
|
1921
1983
|
icon = ''; // Icono externo
|
|
1922
1984
|
iconColor = 'primary'; //color de ícono externo
|
|
1923
1985
|
internalIcon = ''; //Icono interno
|
|
@@ -1999,12 +2061,8 @@ class UicMultySelectComponent extends base$9 {
|
|
|
1999
2061
|
return Array.from(map.entries()).map(([label, options]) => ({ label: label || null, options }));
|
|
2000
2062
|
}
|
|
2001
2063
|
dropdownTemplate;
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
2005
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
2006
|
-
];
|
|
2007
|
-
overlay = inject(Overlay);
|
|
2064
|
+
overlayHandle;
|
|
2065
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
2008
2066
|
vcr = inject(ViewContainerRef);
|
|
2009
2067
|
host = inject((ElementRef));
|
|
2010
2068
|
ngOnChanges(changes) {
|
|
@@ -2016,33 +2074,19 @@ class UicMultySelectComponent extends base$9 {
|
|
|
2016
2074
|
openList() {
|
|
2017
2075
|
if (this.disabled || this.loading)
|
|
2018
2076
|
return;
|
|
2019
|
-
if (this.
|
|
2077
|
+
if (this.overlayHandle?.isOpen) {
|
|
2020
2078
|
this.closeList();
|
|
2021
2079
|
}
|
|
2022
2080
|
const input = this.host.nativeElement.querySelector('.fakeinput');
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
.
|
|
2026
|
-
|
|
2027
|
-
.
|
|
2028
|
-
.withPush(false);
|
|
2029
|
-
this.overlayRef = this.overlay.create({
|
|
2030
|
-
positionStrategy,
|
|
2031
|
-
width,
|
|
2032
|
-
hasBackdrop: true,
|
|
2033
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2034
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2081
|
+
this.overlayHandle = this.overlayS.open({
|
|
2082
|
+
origin: input,
|
|
2083
|
+
template: this.dropdownTemplate,
|
|
2084
|
+
viewContainerRef: this.vcr,
|
|
2085
|
+
onClose: () => this.onTouched(),
|
|
2035
2086
|
});
|
|
2036
|
-
const portal = new TemplatePortal(this.dropdownTemplate, this.vcr);
|
|
2037
|
-
this.overlayRef.attach(portal);
|
|
2038
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeList());
|
|
2039
2087
|
}
|
|
2040
2088
|
closeList() {
|
|
2041
|
-
|
|
2042
|
-
this.onTouched();
|
|
2043
|
-
this.overlayRef.dispose();
|
|
2044
|
-
this.overlayRef = null;
|
|
2045
|
-
}
|
|
2089
|
+
this.overlayHandle?.close();
|
|
2046
2090
|
}
|
|
2047
2091
|
writeValue(value) {
|
|
2048
2092
|
super.writeValue(value ?? []);
|
|
@@ -2107,6 +2151,182 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2107
2151
|
args: ['dropdownTemplate']
|
|
2108
2152
|
}] } });
|
|
2109
2153
|
|
|
2154
|
+
class UicSearchResolverHandle {
|
|
2155
|
+
config;
|
|
2156
|
+
searchSubject = new Subject();
|
|
2157
|
+
results$;
|
|
2158
|
+
constructor(config) {
|
|
2159
|
+
this.config = config;
|
|
2160
|
+
this.results$ = this.searchSubject.pipe(debounceTime(config.debounceMs ?? 300), distinctUntilChanged(), switchMap(query => {
|
|
2161
|
+
const searchFn = config.getSearchFn();
|
|
2162
|
+
if (query.length < config.getMinimumLength() || !searchFn) {
|
|
2163
|
+
config.onLoadingChange?.(false);
|
|
2164
|
+
return of([]);
|
|
2165
|
+
}
|
|
2166
|
+
config.onLoadingChange?.(true);
|
|
2167
|
+
return searchFn(query).pipe(finalize(() => config.onLoadingChange?.(false)));
|
|
2168
|
+
}));
|
|
2169
|
+
}
|
|
2170
|
+
search(query) {
|
|
2171
|
+
this.searchSubject.next(query);
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
class UicSearchResolverService {
|
|
2175
|
+
create(config) {
|
|
2176
|
+
return new UicSearchResolverHandle(config);
|
|
2177
|
+
}
|
|
2178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSearchResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2179
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSearchResolverService, providedIn: 'root' });
|
|
2180
|
+
}
|
|
2181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicSearchResolverService, decorators: [{
|
|
2182
|
+
type: Injectable,
|
|
2183
|
+
args: [{ providedIn: 'root' }]
|
|
2184
|
+
}] });
|
|
2185
|
+
|
|
2186
|
+
const base$9 = createValueAccessor();
|
|
2187
|
+
class UicMultySearcherComponent extends base$9 {
|
|
2188
|
+
icon = ''; // Icono externo
|
|
2189
|
+
iconColor = 'primary'; //color de ícono externo
|
|
2190
|
+
internalIcon = 'ri-search-2-line'; //Icono interno
|
|
2191
|
+
// TEXTO
|
|
2192
|
+
label = '';
|
|
2193
|
+
error = '';
|
|
2194
|
+
tip = '';
|
|
2195
|
+
// FUNCTIONS
|
|
2196
|
+
disabled = false;
|
|
2197
|
+
loading = false;
|
|
2198
|
+
minimumSearchLength = 3;
|
|
2199
|
+
placeholder = 'common.search_ellipsis';
|
|
2200
|
+
searchFn;
|
|
2201
|
+
itemDisplayFn = item => String(item);
|
|
2202
|
+
itemIsEnabledFn = () => true;
|
|
2203
|
+
manualSearch = false;
|
|
2204
|
+
push = inject(UicPushAlertService);
|
|
2205
|
+
i18n = inject(UicTranslateService);
|
|
2206
|
+
searchResolver = inject(UicSearchResolverService).create({
|
|
2207
|
+
getMinimumLength: () => this.minimumSearchLength,
|
|
2208
|
+
getSearchFn: () => this.searchFn,
|
|
2209
|
+
onLoadingChange: loading => this.watingApi = loading,
|
|
2210
|
+
});
|
|
2211
|
+
results$ = this.searchResolver.results$;
|
|
2212
|
+
selectedItems = [];
|
|
2213
|
+
searchText = '';
|
|
2214
|
+
watingApi = false;
|
|
2215
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
2216
|
+
vcr = inject(ViewContainerRef);
|
|
2217
|
+
host = inject((ElementRef));
|
|
2218
|
+
onSearchChange(value) {
|
|
2219
|
+
this.searchText = value;
|
|
2220
|
+
if (!this.manualSearch) {
|
|
2221
|
+
this.searchResolver.search(value);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
triggerSearch() {
|
|
2225
|
+
this.searchResolver.search(this.searchText);
|
|
2226
|
+
}
|
|
2227
|
+
selectItem(item) {
|
|
2228
|
+
if (this.itemIsEnabledFn && !this.itemIsEnabledFn(item)) {
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
if (this.selectedItems.some(selected => selected['id'] === item['id'])) {
|
|
2232
|
+
this.push.warning(this.i18n.translate('searcher.already_selected'));
|
|
2233
|
+
this.clearSearch();
|
|
2234
|
+
this.closeList();
|
|
2235
|
+
return;
|
|
2236
|
+
}
|
|
2237
|
+
this.selectedItems = [...this.selectedItems, item];
|
|
2238
|
+
this.notifyChange(this.selectedItems);
|
|
2239
|
+
this.clearSearch();
|
|
2240
|
+
this.closeList();
|
|
2241
|
+
}
|
|
2242
|
+
removeItem(index) {
|
|
2243
|
+
if (this.disabled)
|
|
2244
|
+
return;
|
|
2245
|
+
this.selectedItems = this.selectedItems.filter((_, i) => i !== index);
|
|
2246
|
+
this.notifyChange(this.selectedItems);
|
|
2247
|
+
}
|
|
2248
|
+
clearSearch() {
|
|
2249
|
+
this.searchText = '';
|
|
2250
|
+
this.searchResolver.search('');
|
|
2251
|
+
}
|
|
2252
|
+
// --- Overlay ---
|
|
2253
|
+
dropdownTemplate;
|
|
2254
|
+
overlayHandle;
|
|
2255
|
+
openList() {
|
|
2256
|
+
if (this.disabled || this.loading)
|
|
2257
|
+
return;
|
|
2258
|
+
if (this.overlayHandle?.isOpen) {
|
|
2259
|
+
this.closeList();
|
|
2260
|
+
}
|
|
2261
|
+
const input = this.host.nativeElement.querySelector('.fakeinput');
|
|
2262
|
+
if (!input)
|
|
2263
|
+
return;
|
|
2264
|
+
this.overlayHandle = this.overlayS.open({
|
|
2265
|
+
origin: input,
|
|
2266
|
+
template: this.dropdownTemplate,
|
|
2267
|
+
viewContainerRef: this.vcr,
|
|
2268
|
+
onClose: () => this.onTouched(),
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
closeList() {
|
|
2272
|
+
this.overlayHandle?.close();
|
|
2273
|
+
}
|
|
2274
|
+
writeValue(value) {
|
|
2275
|
+
const normalized = value ?? [];
|
|
2276
|
+
super.writeValue(normalized);
|
|
2277
|
+
this.selectedItems = normalized;
|
|
2278
|
+
}
|
|
2279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicMultySearcherComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicMultySearcherComponent, isStandalone: true, selector: "ui-multy-searcher", inputs: { icon: "icon", iconColor: "iconColor", internalIcon: "internalIcon", label: "label", error: "error", tip: "tip", disabled: "disabled", loading: "loading", minimumSearchLength: "minimumSearchLength", placeholder: "placeholder", searchFn: "searchFn", itemDisplayFn: "itemDisplayFn", itemIsEnabledFn: "itemIsEnabledFn", manualSearch: "manualSearch" }, providers: [
|
|
2281
|
+
{
|
|
2282
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2283
|
+
useExisting: forwardRef(() => UicMultySearcherComponent),
|
|
2284
|
+
multi: true
|
|
2285
|
+
}
|
|
2286
|
+
], viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ui-input-wrapper\n [icon]=\"icon\"\n [iconColor]=\"iconColor\"\n [label]=\"label\"\n [error]=\"error\"\n [tip]=\"tip\"\n [disabled]=\"disabled\">\n <div class=\"fakeinput-wrapp\">\n <!-- INPUT -->\n <div class=\"fakeinput\" #fakeinput\n [ngClass]=\"{'errorinput':error, 'disabledinput':disabled, 'loading-input':watingApi||loading}\">\n @if (internalIcon) {\n <i class=\"input-internalicon {{internalIcon}}\"></i>\n }\n <div class=\"input-container\">\n <input\n [disabled]=\"disabled\"\n (focus)=\"openList()\"\n type=\"text\"\n (keydown.enter)=\"triggerSearch()\"\n (keydown.escape)=\"clearSearch()\"\n [(ngModel)]=\"searchText\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"placeholder | uicTranslate\"\n />\n </div>\n @if (!disabled) {\n @if (manualSearch) {\n <ui-button [iconOnly]=\"true\" size=\"s\" type=\"ghost\" icon=\"ri-search-line\" (click)=\"triggerSearch()\"></ui-button>\n }\n <ui-button [iconOnly]=\"true\" size=\"s\" type=\"ghost\" icon=\"ri-eraser-line\" (click)=\"clearSearch()\"></ui-button>\n }\n </div>\n </div>\n\n <!-- CHIPS -->\n <div class=\"search-results\">\n @for (item of selectedItems; track $index) {\n <div class=\"search-result\" [class.disabledresult]=\"disabled\">\n <div [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\"></div>\n @if (!disabled) {\n <ui-button (click)=\"removeItem($index)\" [iconOnly]=\"true\" icon=\"ri-delete-bin-line\" type=\"ghost\" color=\"red\" size=\"s\"></ui-button>\n }\n </div>\n }\n @if (disabled && selectedItems.length == 0) {\n <div class=\"search-result-empty\">\n {{'searcher.without_selected' | uicTranslate}}\n </div>\n }\n </div>\n</ui-input-wrapper>\n\n<!-- DESPLEGABLE -->\n<ng-template #dropdownTemplate>\n @if (results$ | async; as items) {\n <div class=\"input-options\">\n <div class=\"input-option-scroll\">\n @for (item of items; track $index) {\n <div class=\"input-option\" [class.item-disabled]=\"itemIsEnabledFn?!itemIsEnabledFn(item):false\"\n (click)=\"selectItem(item)\"\n [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\">\n </div>\n } @empty {\n <div class=\"t-disabled\">{{'searcher.empty' | uicTranslate}}</div>\n }\n </div>\n </div>\n }\n</ng-template>\n", styles: [".search-results{display:flex;flex-direction:column;gap:5px;margin-top:5px}.search-results:empty{margin-top:0}.search-result{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:solid 1px var(--grey-300);border-radius:4px;display:flex;background-color:var(--grey-50);align-items:center;justify-content:space-between}.disabledresult{color:var(--disabled-color)}.search-result-empty{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:dashed 1px var(--grey-300);border-radius:4px;display:flex;color:var(--grey-400);align-items:center;justify-content:center}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.f-extralight{font-weight:300;color:var(--grey-500)}.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;display:flex;flex-direction:column}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.option-group-header{padding:.25rem .5rem 2px;font-size:.75rem;font-weight:600;color:var(--grey-500);text-transform:uppercase;letter-spacing:.05em;pointer-events:none;-webkit-user-select:none;user-select:none}.option-group-header:not(:first-child){border-top:1px solid var(--grey-200);margin-top:.25rem}.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(--secondary-100)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-disabled{opacity:.55;cursor:not-allowed}.input-option-disabled:hover{background-color:transparent;cursor:not-allowed}.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;min-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-grey{color:var(--grey-400)}.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}.select-searcher{width:100%;display:flex;gap:5px;padding:.25rem;border-bottom:1px solid var(--grey-200);background-color:var(--white)}.select-searcher>input{flex:1 1;padding:3px 5px;border:solid 1px var(--grey-200);margin:0 auto;border-radius:4px}.select-searcher>input:focus{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha);border-color:var(--primary-500)}.option-text-highlight ::ng-deep mark{background-color:var(--secondary-200);color:inherit;padding:0;border-radius:2px}@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: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: InputWrapperComponent, selector: "ui-input-wrapper", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
2287
|
+
}
|
|
2288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicMultySearcherComponent, decorators: [{
|
|
2289
|
+
type: Component,
|
|
2290
|
+
args: [{ selector: 'ui-multy-searcher', imports: [CommonModule, FormsModule, UicButtonComponent, InputWrapperComponent, UicTranslatePipe], providers: [
|
|
2291
|
+
{
|
|
2292
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2293
|
+
useExisting: forwardRef(() => UicMultySearcherComponent),
|
|
2294
|
+
multi: true
|
|
2295
|
+
}
|
|
2296
|
+
], template: "<ui-input-wrapper\n [icon]=\"icon\"\n [iconColor]=\"iconColor\"\n [label]=\"label\"\n [error]=\"error\"\n [tip]=\"tip\"\n [disabled]=\"disabled\">\n <div class=\"fakeinput-wrapp\">\n <!-- INPUT -->\n <div class=\"fakeinput\" #fakeinput\n [ngClass]=\"{'errorinput':error, 'disabledinput':disabled, 'loading-input':watingApi||loading}\">\n @if (internalIcon) {\n <i class=\"input-internalicon {{internalIcon}}\"></i>\n }\n <div class=\"input-container\">\n <input\n [disabled]=\"disabled\"\n (focus)=\"openList()\"\n type=\"text\"\n (keydown.enter)=\"triggerSearch()\"\n (keydown.escape)=\"clearSearch()\"\n [(ngModel)]=\"searchText\"\n (ngModelChange)=\"onSearchChange($event)\"\n [placeholder]=\"placeholder | uicTranslate\"\n />\n </div>\n @if (!disabled) {\n @if (manualSearch) {\n <ui-button [iconOnly]=\"true\" size=\"s\" type=\"ghost\" icon=\"ri-search-line\" (click)=\"triggerSearch()\"></ui-button>\n }\n <ui-button [iconOnly]=\"true\" size=\"s\" type=\"ghost\" icon=\"ri-eraser-line\" (click)=\"clearSearch()\"></ui-button>\n }\n </div>\n </div>\n\n <!-- CHIPS -->\n <div class=\"search-results\">\n @for (item of selectedItems; track $index) {\n <div class=\"search-result\" [class.disabledresult]=\"disabled\">\n <div [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\"></div>\n @if (!disabled) {\n <ui-button (click)=\"removeItem($index)\" [iconOnly]=\"true\" icon=\"ri-delete-bin-line\" type=\"ghost\" color=\"red\" size=\"s\"></ui-button>\n }\n </div>\n }\n @if (disabled && selectedItems.length == 0) {\n <div class=\"search-result-empty\">\n {{'searcher.without_selected' | uicTranslate}}\n </div>\n }\n </div>\n</ui-input-wrapper>\n\n<!-- DESPLEGABLE -->\n<ng-template #dropdownTemplate>\n @if (results$ | async; as items) {\n <div class=\"input-options\">\n <div class=\"input-option-scroll\">\n @for (item of items; track $index) {\n <div class=\"input-option\" [class.item-disabled]=\"itemIsEnabledFn?!itemIsEnabledFn(item):false\"\n (click)=\"selectItem(item)\"\n [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\">\n </div>\n } @empty {\n <div class=\"t-disabled\">{{'searcher.empty' | uicTranslate}}</div>\n }\n </div>\n </div>\n }\n</ng-template>\n", styles: [".search-results{display:flex;flex-direction:column;gap:5px;margin-top:5px}.search-results:empty{margin-top:0}.search-result{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:solid 1px var(--grey-300);border-radius:4px;display:flex;background-color:var(--grey-50);align-items:center;justify-content:space-between}.disabledresult{color:var(--disabled-color)}.search-result-empty{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:dashed 1px var(--grey-300);border-radius:4px;display:flex;color:var(--grey-400);align-items:center;justify-content:center}\n", ":host{width:100%}.input-container{flex:1 1;overflow:hidden}.f-extralight{font-weight:300;color:var(--grey-500)}.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;display:flex;flex-direction:column}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.option-group-header{padding:.25rem .5rem 2px;font-size:.75rem;font-weight:600;color:var(--grey-500);text-transform:uppercase;letter-spacing:.05em;pointer-events:none;-webkit-user-select:none;user-select:none}.option-group-header:not(:first-child){border-top:1px solid var(--grey-200);margin-top:.25rem}.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(--secondary-100)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-disabled{opacity:.55;cursor:not-allowed}.input-option-disabled:hover{background-color:transparent;cursor:not-allowed}.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;min-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-grey{color:var(--grey-400)}.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}.select-searcher{width:100%;display:flex;gap:5px;padding:.25rem;border-bottom:1px solid var(--grey-200);background-color:var(--white)}.select-searcher>input{flex:1 1;padding:3px 5px;border:solid 1px var(--grey-200);margin:0 auto;border-radius:4px}.select-searcher>input:focus{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha);border-color:var(--primary-500)}.option-text-highlight ::ng-deep mark{background-color:var(--secondary-200);color:inherit;padding:0;border-radius:2px}@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"] }]
|
|
2297
|
+
}], propDecorators: { icon: [{
|
|
2298
|
+
type: Input
|
|
2299
|
+
}], iconColor: [{
|
|
2300
|
+
type: Input
|
|
2301
|
+
}], internalIcon: [{
|
|
2302
|
+
type: Input
|
|
2303
|
+
}], label: [{
|
|
2304
|
+
type: Input
|
|
2305
|
+
}], error: [{
|
|
2306
|
+
type: Input
|
|
2307
|
+
}], tip: [{
|
|
2308
|
+
type: Input
|
|
2309
|
+
}], disabled: [{
|
|
2310
|
+
type: Input
|
|
2311
|
+
}], loading: [{
|
|
2312
|
+
type: Input
|
|
2313
|
+
}], minimumSearchLength: [{
|
|
2314
|
+
type: Input
|
|
2315
|
+
}], placeholder: [{
|
|
2316
|
+
type: Input
|
|
2317
|
+
}], searchFn: [{
|
|
2318
|
+
type: Input
|
|
2319
|
+
}], itemDisplayFn: [{
|
|
2320
|
+
type: Input
|
|
2321
|
+
}], itemIsEnabledFn: [{
|
|
2322
|
+
type: Input
|
|
2323
|
+
}], manualSearch: [{
|
|
2324
|
+
type: Input
|
|
2325
|
+
}], dropdownTemplate: [{
|
|
2326
|
+
type: ViewChild,
|
|
2327
|
+
args: ['dropdownTemplate']
|
|
2328
|
+
}] } });
|
|
2329
|
+
|
|
2110
2330
|
const PHONE_COUNTRIES = [
|
|
2111
2331
|
{ name: 'Argentina', iso2: 'ar', dialCode: '54' },
|
|
2112
2332
|
{ name: 'Australia', iso2: 'au', dialCode: '61' },
|
|
@@ -2174,13 +2394,9 @@ class UicPhoneInputComponent extends base$8 {
|
|
|
2174
2394
|
changeRegistered = false;
|
|
2175
2395
|
_countries = PHONE_COUNTRIES;
|
|
2176
2396
|
host = inject((ElementRef));
|
|
2177
|
-
|
|
2397
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
2178
2398
|
vcr = inject(ViewContainerRef);
|
|
2179
|
-
|
|
2180
|
-
overlayPositions = [
|
|
2181
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
2182
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }
|
|
2183
|
-
];
|
|
2399
|
+
overlayHandle;
|
|
2184
2400
|
constructor() {
|
|
2185
2401
|
super();
|
|
2186
2402
|
this.resetCountryLists();
|
|
@@ -2294,40 +2510,29 @@ class UicPhoneInputComponent extends base$8 {
|
|
|
2294
2510
|
return;
|
|
2295
2511
|
}
|
|
2296
2512
|
const trigger = this.host.nativeElement.querySelector('.fakeinput');
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
.
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2513
|
+
this.overlayHandle = this.overlayS.open({
|
|
2514
|
+
origin: trigger ?? this.host.nativeElement,
|
|
2515
|
+
template: this.dropdownTemplate,
|
|
2516
|
+
viewContainerRef: this.vcr,
|
|
2517
|
+
width: trigger?.getBoundingClientRect().width ?? 'auto',
|
|
2518
|
+
flexibleDimensions: false,
|
|
2519
|
+
onClose: () => {
|
|
2520
|
+
this.dropdownOpen = false;
|
|
2521
|
+
this.resetSearch();
|
|
2522
|
+
},
|
|
2523
|
+
onKeydown: event => {
|
|
2524
|
+
if (event.key === 'Escape') {
|
|
2525
|
+
event.preventDefault();
|
|
2526
|
+
this.closeDropdown();
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2310
2529
|
});
|
|
2311
|
-
const portal = new TemplatePortal(this.dropdownTemplate, this.vcr);
|
|
2312
|
-
this.overlayRef.attach(portal);
|
|
2313
2530
|
this.filteredCountries = [...this.countries];
|
|
2314
2531
|
this.dropdownOpen = true;
|
|
2315
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeDropdown());
|
|
2316
|
-
this.overlayRef.keydownEvents().subscribe(event => {
|
|
2317
|
-
if (event.key === 'Escape') {
|
|
2318
|
-
event.preventDefault();
|
|
2319
|
-
this.closeDropdown();
|
|
2320
|
-
}
|
|
2321
|
-
});
|
|
2322
2532
|
setTimeout(() => this.searchInput?.nativeElement.focus());
|
|
2323
2533
|
}
|
|
2324
2534
|
closeDropdown() {
|
|
2325
|
-
this.
|
|
2326
|
-
this.resetSearch();
|
|
2327
|
-
if (this.overlayRef) {
|
|
2328
|
-
this.overlayRef.dispose();
|
|
2329
|
-
this.overlayRef = undefined;
|
|
2330
|
-
}
|
|
2535
|
+
this.overlayHandle?.close();
|
|
2331
2536
|
}
|
|
2332
2537
|
resetSearch() {
|
|
2333
2538
|
this.searchTerm = '';
|
|
@@ -2584,32 +2789,26 @@ class UicSearcherComponent extends base$7 {
|
|
|
2584
2789
|
manualSearch = false;
|
|
2585
2790
|
stateless = false;
|
|
2586
2791
|
pickedItem = new EventEmitter();
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
if (!this.searchFn)
|
|
2594
|
-
return of([]);
|
|
2595
|
-
return this.searchFn(v).pipe(finalize(() => this.watingApi = false));
|
|
2596
|
-
}));
|
|
2597
|
-
;
|
|
2792
|
+
searchResolver = inject(UicSearchResolverService).create({
|
|
2793
|
+
getMinimumLength: () => this.minimumSearchLength,
|
|
2794
|
+
getSearchFn: () => this.searchFn,
|
|
2795
|
+
onLoadingChange: loading => this.watingApi = loading,
|
|
2796
|
+
});
|
|
2797
|
+
results$ = this.searchResolver.results$;
|
|
2598
2798
|
selectedOption = null;
|
|
2599
2799
|
searchText = '';
|
|
2600
2800
|
watingApi = false;
|
|
2601
|
-
|
|
2801
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
2602
2802
|
vcr = inject(ViewContainerRef);
|
|
2603
2803
|
host = inject((ElementRef));
|
|
2604
|
-
resizeObserver;
|
|
2605
2804
|
onSearchChange(value) {
|
|
2606
2805
|
this.searchText = value;
|
|
2607
2806
|
if (!this.manualSearch) {
|
|
2608
|
-
this.
|
|
2807
|
+
this.searchResolver.search(value);
|
|
2609
2808
|
}
|
|
2610
2809
|
}
|
|
2611
2810
|
triggerSearch() {
|
|
2612
|
-
this.
|
|
2811
|
+
this.searchResolver.search(this.searchText);
|
|
2613
2812
|
}
|
|
2614
2813
|
selectItem(item) {
|
|
2615
2814
|
if (!this.itemIsEnabledFn || this.itemIsEnabledFn(item)) {
|
|
@@ -2627,7 +2826,7 @@ class UicSearcherComponent extends base$7 {
|
|
|
2627
2826
|
}
|
|
2628
2827
|
clearSearch() {
|
|
2629
2828
|
this.searchText = '';
|
|
2630
|
-
this.
|
|
2829
|
+
this.searchResolver.search('');
|
|
2631
2830
|
}
|
|
2632
2831
|
unselect() {
|
|
2633
2832
|
this.selectedOption = null;
|
|
@@ -2635,63 +2834,24 @@ class UicSearcherComponent extends base$7 {
|
|
|
2635
2834
|
}
|
|
2636
2835
|
// --- Overlay ---
|
|
2637
2836
|
dropdownTemplate;
|
|
2638
|
-
|
|
2639
|
-
overlayPositions = [
|
|
2640
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
2641
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
2642
|
-
];
|
|
2837
|
+
overlayHandle;
|
|
2643
2838
|
openList() {
|
|
2644
2839
|
if (this.disabled || this.loading)
|
|
2645
2840
|
return;
|
|
2646
|
-
if (this.
|
|
2841
|
+
if (this.overlayHandle?.isOpen) {
|
|
2647
2842
|
this.closeList();
|
|
2648
2843
|
}
|
|
2649
2844
|
const input = this.host.nativeElement.querySelector('.fakeinput');
|
|
2650
2845
|
if (!input)
|
|
2651
2846
|
return;
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
.
|
|
2656
|
-
.withPositions(preferredPositions)
|
|
2657
|
-
.withFlexibleDimensions(true)
|
|
2658
|
-
.withPush(false);
|
|
2659
|
-
this.overlayRef = this.overlay.create({
|
|
2660
|
-
positionStrategy,
|
|
2661
|
-
width,
|
|
2662
|
-
hasBackdrop: true,
|
|
2663
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2664
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2847
|
+
this.overlayHandle = this.overlayS.open({
|
|
2848
|
+
origin: input,
|
|
2849
|
+
template: this.dropdownTemplate,
|
|
2850
|
+
viewContainerRef: this.vcr,
|
|
2665
2851
|
});
|
|
2666
|
-
const portal = new TemplatePortal(this.dropdownTemplate, this.vcr);
|
|
2667
|
-
this.overlayRef.attach(portal);
|
|
2668
|
-
this.observeOverlaySizeChanges();
|
|
2669
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeList());
|
|
2670
2852
|
}
|
|
2671
2853
|
closeList() {
|
|
2672
|
-
|
|
2673
|
-
this.resizeObserver?.disconnect();
|
|
2674
|
-
this.resizeObserver = undefined;
|
|
2675
|
-
this.overlayRef.dispose();
|
|
2676
|
-
this.overlayRef = null;
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
observeOverlaySizeChanges() {
|
|
2680
|
-
if (!this.overlayRef || typeof ResizeObserver === 'undefined')
|
|
2681
|
-
return;
|
|
2682
|
-
this.resizeObserver?.disconnect();
|
|
2683
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
2684
|
-
this.overlayRef?.updatePosition();
|
|
2685
|
-
});
|
|
2686
|
-
this.resizeObserver.observe(this.overlayRef.overlayElement);
|
|
2687
|
-
}
|
|
2688
|
-
getPreferredPositions(origin) {
|
|
2689
|
-
if (typeof window === 'undefined')
|
|
2690
|
-
return this.overlayPositions;
|
|
2691
|
-
const rect = origin.getBoundingClientRect();
|
|
2692
|
-
const spaceBelow = window.innerHeight - rect.bottom;
|
|
2693
|
-
const spaceAbove = rect.top;
|
|
2694
|
-
return spaceBelow >= spaceAbove ? this.overlayPositions : [...this.overlayPositions].reverse();
|
|
2854
|
+
this.overlayHandle?.close();
|
|
2695
2855
|
}
|
|
2696
2856
|
writeValue(value) {
|
|
2697
2857
|
super.writeValue(value);
|
|
@@ -2780,15 +2940,11 @@ class UicSelectComponent extends base$6 {
|
|
|
2780
2940
|
nullable = false;
|
|
2781
2941
|
options = [];
|
|
2782
2942
|
dropdownTemplate;
|
|
2783
|
-
|
|
2943
|
+
overlayHandle;
|
|
2784
2944
|
searchTerm = '';
|
|
2785
2945
|
activeOptionIndex = -1;
|
|
2786
|
-
overlayPositions = [
|
|
2787
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
2788
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
2789
|
-
];
|
|
2790
2946
|
selectedOption = null;
|
|
2791
|
-
|
|
2947
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
2792
2948
|
vcr = inject(ViewContainerRef);
|
|
2793
2949
|
host = inject((ElementRef));
|
|
2794
2950
|
ngOnChanges(changes) {
|
|
@@ -2839,30 +2995,20 @@ class UicSelectComponent extends base$6 {
|
|
|
2839
2995
|
openList() {
|
|
2840
2996
|
if (this.disabled || this.loading)
|
|
2841
2997
|
return;
|
|
2842
|
-
if (this.
|
|
2998
|
+
if (this.overlayHandle?.isOpen) {
|
|
2843
2999
|
this.closeList();
|
|
2844
3000
|
}
|
|
2845
3001
|
const input = this.host.nativeElement.querySelector('.fakeinput');
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
.
|
|
2849
|
-
|
|
2850
|
-
.
|
|
2851
|
-
.
|
|
2852
|
-
this.overlayRef = this.overlay.create({
|
|
2853
|
-
positionStrategy,
|
|
2854
|
-
width,
|
|
2855
|
-
hasBackdrop: true,
|
|
2856
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
2857
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3002
|
+
this.overlayHandle = this.overlayS.open({
|
|
3003
|
+
origin: input,
|
|
3004
|
+
template: this.dropdownTemplate,
|
|
3005
|
+
viewContainerRef: this.vcr,
|
|
3006
|
+
onKeydown: event => this.handleOverlayKeydown(event),
|
|
3007
|
+
onClose: () => this.handleOverlayClosed(),
|
|
2858
3008
|
});
|
|
2859
|
-
const portal = new TemplatePortal(this.dropdownTemplate, this.vcr);
|
|
2860
|
-
this.overlayRef.attach(portal);
|
|
2861
3009
|
this.setInitialActiveOption();
|
|
2862
3010
|
this.scrollActiveOptionIntoView();
|
|
2863
3011
|
this.focusSearcher();
|
|
2864
|
-
this.overlayRef.keydownEvents().subscribe(event => this.handleOverlayKeydown(event));
|
|
2865
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeList());
|
|
2866
3012
|
}
|
|
2867
3013
|
selectOption(option) {
|
|
2868
3014
|
if (option?.disabled) {
|
|
@@ -2873,13 +3019,12 @@ class UicSelectComponent extends base$6 {
|
|
|
2873
3019
|
this.notifyChange(option?.id ?? null);
|
|
2874
3020
|
}
|
|
2875
3021
|
closeList() {
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
}
|
|
3022
|
+
this.overlayHandle?.close();
|
|
3023
|
+
}
|
|
3024
|
+
handleOverlayClosed() {
|
|
3025
|
+
this.onTouched();
|
|
3026
|
+
this.searchTerm = '';
|
|
3027
|
+
this.activeOptionIndex = -1;
|
|
2883
3028
|
}
|
|
2884
3029
|
writeValue(value) {
|
|
2885
3030
|
super.writeValue(value);
|
|
@@ -2928,17 +3073,17 @@ class UicSelectComponent extends base$6 {
|
|
|
2928
3073
|
return highlighted;
|
|
2929
3074
|
}
|
|
2930
3075
|
focusSearcher() {
|
|
2931
|
-
if (!this.showSearcher || !this.
|
|
3076
|
+
if (!this.showSearcher || !this.overlayHandle) {
|
|
2932
3077
|
return;
|
|
2933
3078
|
}
|
|
2934
3079
|
setTimeout(() => {
|
|
2935
|
-
const input = this.
|
|
3080
|
+
const input = this.overlayHandle?.overlayElement.querySelector('.select-searcher input');
|
|
2936
3081
|
input?.focus();
|
|
2937
3082
|
input?.select();
|
|
2938
3083
|
});
|
|
2939
3084
|
}
|
|
2940
3085
|
handleOverlayKeydown(event) {
|
|
2941
|
-
if (!this.
|
|
3086
|
+
if (!this.overlayHandle?.isOpen)
|
|
2942
3087
|
return;
|
|
2943
3088
|
if (event.key === 'ArrowDown') {
|
|
2944
3089
|
event.preventDefault();
|
|
@@ -3019,10 +3164,10 @@ class UicSelectComponent extends base$6 {
|
|
|
3019
3164
|
return !option.disabled;
|
|
3020
3165
|
}
|
|
3021
3166
|
scrollActiveOptionIntoView() {
|
|
3022
|
-
if (!this.
|
|
3167
|
+
if (!this.overlayHandle || this.activeOptionIndex < 0)
|
|
3023
3168
|
return;
|
|
3024
3169
|
setTimeout(() => {
|
|
3025
|
-
const active = this.
|
|
3170
|
+
const active = this.overlayHandle?.overlayElement.querySelector(`[data-option-index="${this.activeOptionIndex}"]`);
|
|
3026
3171
|
active?.scrollIntoView({ block: 'nearest' });
|
|
3027
3172
|
});
|
|
3028
3173
|
}
|
|
@@ -3285,14 +3430,10 @@ class UicTimePickerComponent extends base$3 {
|
|
|
3285
3430
|
hourOptions;
|
|
3286
3431
|
minuteOptions;
|
|
3287
3432
|
meridiemOptions;
|
|
3288
|
-
|
|
3289
|
-
|
|
3433
|
+
overlayHandle;
|
|
3434
|
+
overlayS = inject(UicOverlayDropdownService);
|
|
3290
3435
|
vcr = inject(ViewContainerRef);
|
|
3291
3436
|
host = inject((ElementRef));
|
|
3292
|
-
overlayPositions = [
|
|
3293
|
-
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
3294
|
-
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
3295
|
-
];
|
|
3296
3437
|
// Listas para construir la hora
|
|
3297
3438
|
hours12 = Array.from({ length: 12 }, (_, i) => i + 1); // 1..12
|
|
3298
3439
|
minutes = [];
|
|
@@ -3341,39 +3482,28 @@ class UicTimePickerComponent extends base$3 {
|
|
|
3341
3482
|
openOverlay() {
|
|
3342
3483
|
if (this.disabled)
|
|
3343
3484
|
return;
|
|
3344
|
-
if (this.
|
|
3485
|
+
if (this.overlayHandle?.isOpen) {
|
|
3345
3486
|
this.closeOverlay();
|
|
3346
3487
|
return;
|
|
3347
3488
|
}
|
|
3348
3489
|
this.isOverlayOpen = true;
|
|
3349
3490
|
const inputEl = this.host.nativeElement.querySelector('.fakeinput');
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
.
|
|
3353
|
-
.
|
|
3354
|
-
|
|
3355
|
-
.
|
|
3356
|
-
.withPush(false);
|
|
3357
|
-
this.overlayRef = this.overlay.create({
|
|
3358
|
-
positionStrategy,
|
|
3359
|
-
hasBackdrop: true,
|
|
3360
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
3361
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
3362
|
-
width,
|
|
3491
|
+
this.overlayHandle = this.overlayS.open({
|
|
3492
|
+
origin: inputEl,
|
|
3493
|
+
template: this.overlayTemplate,
|
|
3494
|
+
viewContainerRef: this.vcr,
|
|
3495
|
+
flexibleDimensions: false,
|
|
3496
|
+
onBackdropClick: () => this.closeOverlay(true),
|
|
3363
3497
|
});
|
|
3364
|
-
const portal = new TemplatePortal(this.overlayTemplate, this.vcr);
|
|
3365
|
-
this.overlayRef.attach(portal);
|
|
3366
|
-
this.overlayRef.backdropClick().subscribe(() => this.closeOverlay(true));
|
|
3367
3498
|
this.syncSelectionFromValue();
|
|
3368
3499
|
setTimeout(() => this.scrollToSelection(), 0);
|
|
3369
3500
|
}
|
|
3370
3501
|
closeOverlay(commitSelection = false) {
|
|
3371
|
-
if (this.
|
|
3502
|
+
if (this.overlayHandle?.isOpen) {
|
|
3372
3503
|
if (commitSelection) {
|
|
3373
3504
|
this.commitOverlaySelection();
|
|
3374
3505
|
}
|
|
3375
|
-
this.
|
|
3376
|
-
this.overlayRef = null;
|
|
3506
|
+
this.overlayHandle.close();
|
|
3377
3507
|
this.isOverlayOpen = false;
|
|
3378
3508
|
}
|
|
3379
3509
|
}
|
|
@@ -3497,7 +3627,7 @@ class UicTimePickerComponent extends base$3 {
|
|
|
3497
3627
|
return { hour12, minute, meridiem };
|
|
3498
3628
|
}
|
|
3499
3629
|
scrollToSelection(retries = 3) {
|
|
3500
|
-
if (!this.
|
|
3630
|
+
if (!this.overlayHandle?.isOpen) {
|
|
3501
3631
|
return;
|
|
3502
3632
|
}
|
|
3503
3633
|
const hourScrolled = this.scrollColumn(this.hourOptions, this.hours12, this.selectedHour12);
|
|
@@ -3666,7 +3796,7 @@ class UicPoolOptionsComponent extends base$2 {
|
|
|
3666
3796
|
useExisting: forwardRef(() => UicPoolOptionsComponent),
|
|
3667
3797
|
multi: true
|
|
3668
3798
|
}
|
|
3669
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"input-wrapper \">\r\n @if (icon) {\r\n <i class=\"input-externalicon f-{{iconColor}} {{icon}}\"></i>\r\n }\r\n <div class=\"input-elements\" [style]=\"icon?'max-width: calc(100% - 34px);':''\">\r\n @if (label) {\r\n <div class=\"label inputlabel\" [class.font-error]=\"error\">{{label}} </div>\r\n }\r\n <div>\r\n <div class=\"pool-wrapper\" > \r\n @for (opt of options; track opt.id) {\r\n <div (click)=\"updateOptions(opt.id??'')\" class=\"pool-option\" [class.disabled-opt]=\"disabled\" [class.active-opt]=\"isSelected(opt.id??'')\">{{opt.text}}</div>\r\n }\r\n \r\n </div>\r\n <!-- BLOQUE DE LISTTA DETALLADA -->\r\n @if(enabledListView && selectedValues.length > 0){\r\n <h3 class=\"pool-selected-title\">{{listViewTitle | uicTranslate}}</h3>\r\n <div>\r\n @for (item of selectedValues; track item.id) {\r\n <div class=\"pool-selected\"> \r\n <div class=\"pool-selected-label\">{{getItemName(item.id)}} </div>\r\n <div class=\"pool-selected-input\">\r\n <ui-input [disabled]=\"disabled\">\r\n <input [disabled]=\"disabled\" [placeholder]=\"'common.detail' | uicTranslate\" type=\"text\" [value]=\"item.detail ?? ''\" (input)=\"updateDetail(item.id, $any($event.target).value)\">\r\n </ui-input>\r\n @if (!disabled) {\r\n <div class=\"pool-selected-button\" (click)=\"updateOptions(item.id)\" >\r\n <i class=\"ri-delete-bin-5-line\" ></i>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <!-- ALERTS -->\r\n @if (error) {\r\n <div class=\"fakeinput-alert f-red\">{{error}}</div>\r\n }\r\n @if (tip) {\r\n <div class=\"fakeinput-alert tip\">{{tip}}</div>\r\n }\r\n </div>\r\n</div>\r\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}.f-extralight{font-weight:300;color:var(--grey-500)}.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;display:flex;flex-direction:column}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.option-group-header{padding:.25rem .5rem 2px;font-size:.75rem;font-weight:600;color:var(--grey-500);text-transform:uppercase;letter-spacing:.05em;pointer-events:none;-webkit-user-select:none;user-select:none}.option-group-header:not(:first-child){border-top:1px solid var(--grey-200);margin-top:.25rem}.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(--secondary-100)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-disabled{opacity:.55;cursor:not-allowed}.input-option-disabled:hover{background-color:transparent;cursor:not-allowed}.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;min-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-grey{color:var(--grey-400)}.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}.select-searcher{width:100%;display:flex;gap:5px;padding:.25rem;border-bottom:1px solid var(--grey-200);background-color:var(--white)}.select-searcher>input{flex:1 1;padding:3px 5px;border:solid 1px var(--grey-200);margin:0 auto;border-radius:4px}.select-searcher>input:focus{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha);border-color:var(--primary-500)}.option-text-highlight ::ng-deep mark{background-color:var(--secondary-200);color:inherit;padding:0;border-radius:2px}@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"]
|
|
3799
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"input-wrapper \">\r\n @if (icon) {\r\n <i class=\"input-externalicon f-{{iconColor}} {{icon}}\"></i>\r\n }\r\n <div class=\"input-elements\" [style]=\"icon?'max-width: calc(100% - 34px);':''\">\r\n @if (label) {\r\n <div class=\"label inputlabel\" [class.font-error]=\"error\">{{label}} </div>\r\n }\r\n <div>\r\n <div class=\"pool-wrapper\" > \r\n @for (opt of options; track opt.id) {\r\n <div (click)=\"updateOptions(opt.id??'')\" class=\"pool-option\" [class.disabled-opt]=\"disabled\" [class.active-opt]=\"isSelected(opt.id??'')\">{{opt.text}}</div>\r\n }\r\n \r\n </div>\r\n <!-- BLOQUE DE LISTTA DETALLADA -->\r\n @if(enabledListView && selectedValues.length > 0){\r\n <h3 class=\"pool-selected-title\">{{listViewTitle | uicTranslate}}</h3>\r\n <div>\r\n @for (item of selectedValues; track item.id) {\r\n <div class=\"pool-selected\"> \r\n <div class=\"pool-selected-label\">{{getItemName(item.id)}} </div>\r\n <div class=\"pool-selected-input\">\r\n <ui-input [disabled]=\"disabled\">\r\n <input [disabled]=\"disabled\" [placeholder]=\"'common.detail' | uicTranslate\" type=\"text\" [value]=\"item.detail ?? ''\" (input)=\"updateDetail(item.id, $any($event.target).value)\">\r\n </ui-input>\r\n @if (!disabled) {\r\n <div class=\"pool-selected-button\" (click)=\"updateOptions(item.id)\" >\r\n <i class=\"ri-delete-bin-5-line\" ></i>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <!-- ALERTS -->\r\n @if (error) {\r\n <div class=\"fakeinput-alert f-red\">{{error}}</div>\r\n }\r\n @if (tip) {\r\n <div class=\"fakeinput-alert tip\">{{tip}}</div>\r\n }\r\n </div>\r\n</div>\r\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}.f-extralight{font-weight:300;color:var(--grey-500)}.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;display:flex;flex-direction:column}.option-divider{width:98%;margin:auto;border-bottom:1px solid var(--grey-200)}.option-group-header{padding:.25rem .5rem 2px;font-size:.75rem;font-weight:600;color:var(--grey-500);text-transform:uppercase;letter-spacing:.05em;pointer-events:none;-webkit-user-select:none;user-select:none}.option-group-header:not(:first-child){border-top:1px solid var(--grey-200);margin-top:.25rem}.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(--secondary-100)}.input-option:hover{background-color:var(--secondary-100);cursor:pointer}.input-option-disabled{opacity:.55;cursor:not-allowed}.input-option-disabled:hover{background-color:transparent;cursor:not-allowed}.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;min-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-grey{color:var(--grey-400)}.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}.select-searcher{width:100%;display:flex;gap:5px;padding:.25rem;border-bottom:1px solid var(--grey-200);background-color:var(--white)}.select-searcher>input{flex:1 1;padding:3px 5px;border:solid 1px var(--grey-200);margin:0 auto;border-radius:4px}.select-searcher>input:focus{outline:none;box-shadow:0 0 0 3px var(--secondary-alpha);border-color:var(--primary-500)}.option-text-highlight ::ng-deep mark{background-color:var(--secondary-200);color:inherit;padding:0;border-radius:2px}@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"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
3670
3800
|
}
|
|
3671
3801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicPoolOptionsComponent, decorators: [{
|
|
3672
3802
|
type: Component,
|
|
@@ -4310,7 +4440,7 @@ class UicDynamicFormComponent {
|
|
|
4310
4440
|
if (fieldType === 'checkbox' || fieldType === 'switch') {
|
|
4311
4441
|
return false;
|
|
4312
4442
|
}
|
|
4313
|
-
if (fieldType === 'multyselect' || fieldType === 'repeater') {
|
|
4443
|
+
if (fieldType === 'multyselect' || fieldType === 'multisearcher' || fieldType === 'repeater') {
|
|
4314
4444
|
return [];
|
|
4315
4445
|
}
|
|
4316
4446
|
return null;
|
|
@@ -4755,7 +4885,7 @@ class UicDynamicFormComponent {
|
|
|
4755
4885
|
recognition.start();
|
|
4756
4886
|
}
|
|
4757
4887
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicDynamicFormComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
4758
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicDynamicFormComponent, isStandalone: true, selector: "ui-dynamic-form", inputs: { fields: "fields", isSubForm: "isSubForm", form: "form", disabled: "disabled", externalValidationStates: "externalValidationStates", voiceToTextSilenceMs: "voiceToTextSilenceMs", cols: "cols", fileUidResolverFn: "fileUidResolverFn", selectOptionsResolver: "selectOptionsResolver", parentFormValues: "parentFormValues" }, outputs: { fieldBlur: "fieldBlur" }, ngImport: i0, template: "<div class=\"form\" [ngStyle]=\"{'--cols': cols, '--min': '180px'}\" [formGroup]=\"form\">\r\n @for (state of visibleFieldStates(); track state.field.name) {\r\n @let field = state.field;\r\n @let control = state.control;\r\n @let currentValue = state.value ?? '';\r\n @let error = getControlErrorMessages(control, field)[0];\r\n\r\n <div [style.grid-column]=\"getGridColumn(field)\" (focusout)=\"onFieldContainerFocusout(field, $event)\">\r\n @if (['text', 'number'].includes(field.type)) {\r\n @let inputColor = getInputColor(field, currentValue);\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"inputColor\"\r\n [internalIcon]=\"field.internalIcon || (currentValue !== '' ? getIconByColor(field, inputColor) : '')\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <input #inp\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [type]=\"field.type\"\r\n [step]=\"field.step\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [placeholder]=\"field.placeholder??field.label\"/>\r\n @if (field.maxLength && field.showCounter) {\r\n <span counter>{{inp.value.length}} /{{field.maxLength}}</span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'textarea') {\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <textarea #ta\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [textareaAutoresize]=\"field.textareaResize\"\r\n [textareaAutoresizeMinRows]=\"field.resizeMinRows??1\"\r\n [textareaAutoresizeMaxRows]=\"field.resizeMaxRows??5\"\r\n [rows]=\"field.resizeMinRows??3\"\r\n [placeholder]=\"field.placeholder??field.label\"\r\n ></textarea>\r\n @if (field.voiceToTextEnabled && !control?.disabled) {\r\n @let listening = isListening(field.name);\r\n <div class=\"speak-icon\" (click)=\"ta.focus()\">\r\n <ui-button\r\n [disabled]=\"listening\"\r\n style=\"margin-bottom: 2px;\"\r\n (click)=\"voiceToText(ta, field.name)\"\r\n [icon]=\"listening?'ri-mic-fill':'ri-mic-line'\"\r\n [type]=\"listening?'filled':'bordered'\"\r\n size=\"s\"\r\n [iconOnly]=\"true\"\r\n ></ui-button>\r\n @if (listening) {\r\n <i class=\"ri-voiceprint-line\"></i>\r\n }\r\n </div>\r\n }\r\n @if (field.showCounter) {\r\n <span counter>\r\n {{ta.value.length}}\r\n @if (field.maxLength) {\r\n /{{field.maxLength}}\r\n }\r\n </span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'phone') {\r\n <ui-phone-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder||field.label||''\"\r\n >\r\n </ui-phone-input>\r\n }\r\n @else if (field.type === 'date') {\r\n <ui-date-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [justMonth]=\"!!field.monthMode\"\r\n [min]=\"field.minDate??''\"\r\n [max]=\"field.maxDate??''\"\r\n [monthDay]=\"field.monthDay||'first'\"\r\n [formControlName]=\"field.name\"\r\n ></ui-date-picker>\r\n }\r\n @else if (field.type === 'time') {\r\n <ui-time-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [interval]=\"field.timeInterval??5\"\r\n [formControlName]=\"field.name\"\r\n ></ui-time-picker>\r\n }\r\n @else if (field.type === 'select') {\r\n <ui-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [nullable]=\"field.selectNullable??false\"\r\n [showSubtitle]=\"field.showSubtitle??false\"\r\n [searcherEnabled]=\"field.selectSearchEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-select>\r\n }\r\n @else if (field.type === 'multyselect') {\r\n <ui-multy-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-multy-select>\r\n }\r\n @else if (field.type === 'searcher') {\r\n <ui-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-searcher>\r\n }\r\n @else if (field.type === 'file') {\r\n <ui-file-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [fileTypes]=\"field.fileTypes??null\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [formControlName]=\"field.name\"\r\n ></ui-file-input>\r\n }\r\n @else if (['checkbox', 'switch'].includes(field.type)) {\r\n <ui-checkbox\r\n [label]=\"(field.label??'') + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [placeholder]=\"field.placeholder??''\"\r\n [tip]=\"field.tip??''\"\r\n [type]=\"field.type === 'checkbox' ? 'checkbox' : 'switch'\"\r\n ></ui-checkbox>\r\n }\r\n @else if (field.type === 'radio') {\r\n <ui-radio\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [loading]=\"field.loading??false\"\r\n [error]=\"error\"\r\n [options]=\"field.options || []\"\r\n ></ui-radio>\r\n }\r\n @else if (field.type === 'slider') {\r\n <ui-slider\r\n [min]=\"field.min??0\"\r\n [max]=\"field.max??100\"\r\n [step]=\"field.sliderInterval??1\"\r\n [markerCount]=\"field.sliderMarks??5\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n ></ui-slider>\r\n }\r\n @else if (field.type === 'pool') {\r\n <ui-pool-options\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [listViewTitle]=\"field.poolTitle??'common.selected'\"\r\n [enabledListView]=\"field.poolEnabledListView||false\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-pool-options>\r\n }\r\n @else if (field.type === 'repeater') {\r\n <ui-repeater\r\n [formArray]=\"asFormArray(control)\"\r\n [field]=\"field\"\r\n [cols]=\"cols\"\r\n [error]=\"error\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [selectOptionsResolver]=\"selectOptionsResolver\"\r\n [parentForm]=\"form\"\r\n ></ui-repeater>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".form{width:100%;display:grid;align-items:stretch;gap:1rem;padding-bottom:.75rem}@media (max-width: 479px){.form{grid-template-columns:1fr}}@media (min-width: 768px){.form{grid-template-columns:repeat(var(--cols),minmax(0,1fr))}}@media (min-width: 480px) and (max-width: 767px){.form{grid-template-columns:repeat(min(var(--cols),2),minmax(0,1fr))}}.form>*{min-width:0}h2{margin-top:1.5rem}.speak-icon{display:flex;width:100%;align-items:center;gap:10px}.speak-icon i{font-size:20px;color:var(--primary-500)}textarea{resize:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: UicDatePickerComponent, selector: "ui-date-picker", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "disabled", "label", "error", "tip", "max", "min", "justMonth", "monthDay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: UicSliderComponent, selector: "ui-slider", inputs: ["icon", "iconColor", "label", "error", "tip", "min", "max", "step", "markerCount", "disabled", "loading"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: UicPoolOptionsComponent, selector: "ui-pool-options", inputs: ["icon", "iconColor", "size", "label", "error", "tip", "disabled", "loading", "multy", "enabledListView", "listViewTitle", "options"] }, { kind: "component", type: UicTimePickerComponent, selector: "ui-time-picker", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "disabled", "label", "error", "tip", "interval"] }, { kind: "component", type: UicRadioComponent, selector: "ui-radio", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled", "loading", "options", "emptyText", "direction"] }, { kind: "component", type: UicSearcherComponent, selector: "ui-searcher", inputs: ["icon", "iconColor", "internalIcon", "size", "label", "error", "tip", "showSubtitle", "disabled", "loading", "minimumSearchLength", "showSelected", "placeholder", "searchFn", "itemDisplayFn", "itemIsEnabledFn", "manualSearch", "stateless"], outputs: ["pickedItem"] }, { kind: "component", type: UicMultySelectComponent, selector: "ui-multy-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "allSelectedText", "loading", "options"] }, { kind: "component", type: UicFileInputComponent, selector: "ui-file-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading", "multy", "fileTypes", "fileUidResolverFn"] }, { kind: "component", type: UicSelectComponent, selector: "ui-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "noneText", "emptyText", "searcherEnabled", "loading", "nullable", "options"] }, { kind: "directive", type: UicTextareaAutoresizeDirective, selector: "[textareaAutoresize]", inputs: ["minRows", "maxRows", "textareaAutoresize"] }, { kind: "directive", type: UicTextareaAutoresizeMinRowsDirective, selector: "[textareaAutoresizeMinRows]", inputs: ["textareaAutoresizeMinRows"] }, { kind: "directive", type: UicTextareaAutoresizeMaxRowsDirective, selector: "[textareaAutoresizeMaxRows]", inputs: ["textareaAutoresizeMaxRows"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"], outputs: ["clickButton"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "component", type: UicPhoneInputComponent, selector: "ui-phone-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "placeholder", "disabled", "loading", "preferredCountries", "flagPath", "countries"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UicRepeaterComponent, selector: "ui-repeater", inputs: ["formArray", "field", "cols", "error", "fileUidResolverFn", "selectOptionsResolver", "parentForm"] }] });
|
|
4888
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicDynamicFormComponent, isStandalone: true, selector: "ui-dynamic-form", inputs: { fields: "fields", isSubForm: "isSubForm", form: "form", disabled: "disabled", externalValidationStates: "externalValidationStates", voiceToTextSilenceMs: "voiceToTextSilenceMs", cols: "cols", fileUidResolverFn: "fileUidResolverFn", selectOptionsResolver: "selectOptionsResolver", parentFormValues: "parentFormValues" }, outputs: { fieldBlur: "fieldBlur" }, ngImport: i0, template: "<div class=\"form\" [ngStyle]=\"{'--cols': cols, '--min': '180px'}\" [formGroup]=\"form\">\r\n @for (state of visibleFieldStates(); track state.field.name) {\r\n @let field = state.field;\r\n @let control = state.control;\r\n @let currentValue = state.value ?? '';\r\n @let error = getControlErrorMessages(control, field)[0];\r\n\r\n <div [style.grid-column]=\"getGridColumn(field)\" (focusout)=\"onFieldContainerFocusout(field, $event)\">\r\n @if (['text', 'number'].includes(field.type)) {\r\n @let inputColor = getInputColor(field, currentValue);\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"inputColor\"\r\n [internalIcon]=\"field.internalIcon || (currentValue !== '' ? getIconByColor(field, inputColor) : '')\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <input #inp\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [type]=\"field.type\"\r\n [step]=\"field.step\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [placeholder]=\"field.placeholder??field.label\"/>\r\n @if (field.maxLength && field.showCounter) {\r\n <span counter>{{inp.value.length}} /{{field.maxLength}}</span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'textarea') {\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <textarea #ta\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [textareaAutoresize]=\"field.textareaResize\"\r\n [textareaAutoresizeMinRows]=\"field.resizeMinRows??1\"\r\n [textareaAutoresizeMaxRows]=\"field.resizeMaxRows??5\"\r\n [rows]=\"field.resizeMinRows??3\"\r\n [placeholder]=\"field.placeholder??field.label\"\r\n ></textarea>\r\n @if (field.voiceToTextEnabled && !control?.disabled) {\r\n @let listening = isListening(field.name);\r\n <div class=\"speak-icon\" (click)=\"ta.focus()\">\r\n <ui-button\r\n [disabled]=\"listening\"\r\n style=\"margin-bottom: 2px;\"\r\n (click)=\"voiceToText(ta, field.name)\"\r\n [icon]=\"listening?'ri-mic-fill':'ri-mic-line'\"\r\n [type]=\"listening?'filled':'bordered'\"\r\n size=\"s\"\r\n [iconOnly]=\"true\"\r\n ></ui-button>\r\n @if (listening) {\r\n <i class=\"ri-voiceprint-line\"></i>\r\n }\r\n </div>\r\n }\r\n @if (field.showCounter) {\r\n <span counter>\r\n {{ta.value.length}}\r\n @if (field.maxLength) {\r\n /{{field.maxLength}}\r\n }\r\n </span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'phone') {\r\n <ui-phone-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder||field.label||''\"\r\n >\r\n </ui-phone-input>\r\n }\r\n @else if (field.type === 'date') {\r\n <ui-date-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [justMonth]=\"!!field.monthMode\"\r\n [min]=\"field.minDate??''\"\r\n [max]=\"field.maxDate??''\"\r\n [monthDay]=\"field.monthDay||'first'\"\r\n [formControlName]=\"field.name\"\r\n ></ui-date-picker>\r\n }\r\n @else if (field.type === 'time') {\r\n <ui-time-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [interval]=\"field.timeInterval??5\"\r\n [formControlName]=\"field.name\"\r\n ></ui-time-picker>\r\n }\r\n @else if (field.type === 'select') {\r\n <ui-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [nullable]=\"field.selectNullable??false\"\r\n [showSubtitle]=\"field.showSubtitle??false\"\r\n [searcherEnabled]=\"field.selectSearchEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-select>\r\n }\r\n @else if (field.type === 'multyselect') {\r\n <ui-multy-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-multy-select>\r\n }\r\n @else if (field.type === 'searcher') {\r\n <ui-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-searcher>\r\n }\r\n @else if (field.type === 'multisearcher') {\r\n <ui-multy-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-multy-searcher>\r\n }\r\n @else if (field.type === 'file') {\r\n <ui-file-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [fileTypes]=\"field.fileTypes??null\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [formControlName]=\"field.name\"\r\n ></ui-file-input>\r\n }\r\n @else if (['checkbox', 'switch'].includes(field.type)) {\r\n <ui-checkbox\r\n [label]=\"(field.label??'') + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [placeholder]=\"field.placeholder??''\"\r\n [tip]=\"field.tip??''\"\r\n [type]=\"field.type === 'checkbox' ? 'checkbox' : 'switch'\"\r\n ></ui-checkbox>\r\n }\r\n @else if (field.type === 'radio') {\r\n <ui-radio\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [loading]=\"field.loading??false\"\r\n [error]=\"error\"\r\n [options]=\"field.options || []\"\r\n ></ui-radio>\r\n }\r\n @else if (field.type === 'slider') {\r\n <ui-slider\r\n [min]=\"field.min??0\"\r\n [max]=\"field.max??100\"\r\n [step]=\"field.sliderInterval??1\"\r\n [markerCount]=\"field.sliderMarks??5\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n ></ui-slider>\r\n }\r\n @else if (field.type === 'pool') {\r\n <ui-pool-options\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [listViewTitle]=\"field.poolTitle??'common.selected'\"\r\n [enabledListView]=\"field.poolEnabledListView||false\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-pool-options>\r\n }\r\n @else if (field.type === 'repeater') {\r\n <ui-repeater\r\n [formArray]=\"asFormArray(control)\"\r\n [field]=\"field\"\r\n [cols]=\"cols\"\r\n [error]=\"error\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [selectOptionsResolver]=\"selectOptionsResolver\"\r\n [parentForm]=\"form\"\r\n ></ui-repeater>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".form{width:100%;display:grid;align-items:stretch;gap:1rem;padding-bottom:.75rem}@media (max-width: 479px){.form{grid-template-columns:1fr}}@media (min-width: 768px){.form{grid-template-columns:repeat(var(--cols),minmax(0,1fr))}}@media (min-width: 480px) and (max-width: 767px){.form{grid-template-columns:repeat(min(var(--cols),2),minmax(0,1fr))}}.form>*{min-width:0}h2{margin-top:1.5rem}.speak-icon{display:flex;width:100%;align-items:center;gap:10px}.speak-icon i{font-size:20px;color:var(--primary-500)}textarea{resize:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: UicDatePickerComponent, selector: "ui-date-picker", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "disabled", "label", "error", "tip", "max", "min", "justMonth", "monthDay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: UicSliderComponent, selector: "ui-slider", inputs: ["icon", "iconColor", "label", "error", "tip", "min", "max", "step", "markerCount", "disabled", "loading"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: UicPoolOptionsComponent, selector: "ui-pool-options", inputs: ["icon", "iconColor", "size", "label", "error", "tip", "disabled", "loading", "multy", "enabledListView", "listViewTitle", "options"] }, { kind: "component", type: UicTimePickerComponent, selector: "ui-time-picker", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "disabled", "label", "error", "tip", "interval"] }, { kind: "component", type: UicRadioComponent, selector: "ui-radio", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled", "loading", "options", "emptyText", "direction"] }, { kind: "component", type: UicSearcherComponent, selector: "ui-searcher", inputs: ["icon", "iconColor", "internalIcon", "size", "label", "error", "tip", "showSubtitle", "disabled", "loading", "minimumSearchLength", "showSelected", "placeholder", "searchFn", "itemDisplayFn", "itemIsEnabledFn", "manualSearch", "stateless"], outputs: ["pickedItem"] }, { kind: "component", type: UicMultySelectComponent, selector: "ui-multy-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "allSelectedText", "loading", "options"] }, { kind: "component", type: UicMultySearcherComponent, selector: "ui-multy-searcher", inputs: ["icon", "iconColor", "internalIcon", "label", "error", "tip", "disabled", "loading", "minimumSearchLength", "placeholder", "searchFn", "itemDisplayFn", "itemIsEnabledFn", "manualSearch"] }, { kind: "component", type: UicFileInputComponent, selector: "ui-file-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading", "multy", "fileTypes", "fileUidResolverFn"] }, { kind: "component", type: UicSelectComponent, selector: "ui-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "noneText", "emptyText", "searcherEnabled", "loading", "nullable", "options"] }, { kind: "directive", type: UicTextareaAutoresizeDirective, selector: "[textareaAutoresize]", inputs: ["minRows", "maxRows", "textareaAutoresize"] }, { kind: "directive", type: UicTextareaAutoresizeMinRowsDirective, selector: "[textareaAutoresizeMinRows]", inputs: ["textareaAutoresizeMinRows"] }, { kind: "directive", type: UicTextareaAutoresizeMaxRowsDirective, selector: "[textareaAutoresizeMaxRows]", inputs: ["textareaAutoresizeMaxRows"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "component", type: UicPhoneInputComponent, selector: "ui-phone-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "placeholder", "disabled", "loading", "preferredCountries", "flagPath", "countries"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UicRepeaterComponent, selector: "ui-repeater", inputs: ["formArray", "field", "cols", "error", "fileUidResolverFn", "selectOptionsResolver", "parentForm"] }] });
|
|
4759
4889
|
}
|
|
4760
4890
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicDynamicFormComponent, decorators: [{
|
|
4761
4891
|
type: Component,
|
|
@@ -4770,6 +4900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4770
4900
|
UicRadioComponent,
|
|
4771
4901
|
UicSearcherComponent,
|
|
4772
4902
|
UicMultySelectComponent,
|
|
4903
|
+
UicMultySearcherComponent,
|
|
4773
4904
|
UicFileInputComponent,
|
|
4774
4905
|
UicSelectComponent,
|
|
4775
4906
|
UicTextareaAutoresizeDirective,
|
|
@@ -4780,7 +4911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4780
4911
|
UicPhoneInputComponent,
|
|
4781
4912
|
FormsModule,
|
|
4782
4913
|
UicRepeaterComponent
|
|
4783
|
-
], template: "<div class=\"form\" [ngStyle]=\"{'--cols': cols, '--min': '180px'}\" [formGroup]=\"form\">\r\n @for (state of visibleFieldStates(); track state.field.name) {\r\n @let field = state.field;\r\n @let control = state.control;\r\n @let currentValue = state.value ?? '';\r\n @let error = getControlErrorMessages(control, field)[0];\r\n\r\n <div [style.grid-column]=\"getGridColumn(field)\" (focusout)=\"onFieldContainerFocusout(field, $event)\">\r\n @if (['text', 'number'].includes(field.type)) {\r\n @let inputColor = getInputColor(field, currentValue);\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"inputColor\"\r\n [internalIcon]=\"field.internalIcon || (currentValue !== '' ? getIconByColor(field, inputColor) : '')\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <input #inp\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [type]=\"field.type\"\r\n [step]=\"field.step\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [placeholder]=\"field.placeholder??field.label\"/>\r\n @if (field.maxLength && field.showCounter) {\r\n <span counter>{{inp.value.length}} /{{field.maxLength}}</span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'textarea') {\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <textarea #ta\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [textareaAutoresize]=\"field.textareaResize\"\r\n [textareaAutoresizeMinRows]=\"field.resizeMinRows??1\"\r\n [textareaAutoresizeMaxRows]=\"field.resizeMaxRows??5\"\r\n [rows]=\"field.resizeMinRows??3\"\r\n [placeholder]=\"field.placeholder??field.label\"\r\n ></textarea>\r\n @if (field.voiceToTextEnabled && !control?.disabled) {\r\n @let listening = isListening(field.name);\r\n <div class=\"speak-icon\" (click)=\"ta.focus()\">\r\n <ui-button\r\n [disabled]=\"listening\"\r\n style=\"margin-bottom: 2px;\"\r\n (click)=\"voiceToText(ta, field.name)\"\r\n [icon]=\"listening?'ri-mic-fill':'ri-mic-line'\"\r\n [type]=\"listening?'filled':'bordered'\"\r\n size=\"s\"\r\n [iconOnly]=\"true\"\r\n ></ui-button>\r\n @if (listening) {\r\n <i class=\"ri-voiceprint-line\"></i>\r\n }\r\n </div>\r\n }\r\n @if (field.showCounter) {\r\n <span counter>\r\n {{ta.value.length}}\r\n @if (field.maxLength) {\r\n /{{field.maxLength}}\r\n }\r\n </span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'phone') {\r\n <ui-phone-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder||field.label||''\"\r\n >\r\n </ui-phone-input>\r\n }\r\n @else if (field.type === 'date') {\r\n <ui-date-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [justMonth]=\"!!field.monthMode\"\r\n [min]=\"field.minDate??''\"\r\n [max]=\"field.maxDate??''\"\r\n [monthDay]=\"field.monthDay||'first'\"\r\n [formControlName]=\"field.name\"\r\n ></ui-date-picker>\r\n }\r\n @else if (field.type === 'time') {\r\n <ui-time-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [interval]=\"field.timeInterval??5\"\r\n [formControlName]=\"field.name\"\r\n ></ui-time-picker>\r\n }\r\n @else if (field.type === 'select') {\r\n <ui-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [nullable]=\"field.selectNullable??false\"\r\n [showSubtitle]=\"field.showSubtitle??false\"\r\n [searcherEnabled]=\"field.selectSearchEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-select>\r\n }\r\n @else if (field.type === 'multyselect') {\r\n <ui-multy-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-multy-select>\r\n }\r\n @else if (field.type === 'searcher') {\r\n <ui-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-searcher>\r\n }\r\n @else if (field.type === 'file') {\r\n <ui-file-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [fileTypes]=\"field.fileTypes??null\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [formControlName]=\"field.name\"\r\n ></ui-file-input>\r\n }\r\n @else if (['checkbox', 'switch'].includes(field.type)) {\r\n <ui-checkbox\r\n [label]=\"(field.label??'') + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [placeholder]=\"field.placeholder??''\"\r\n [tip]=\"field.tip??''\"\r\n [type]=\"field.type === 'checkbox' ? 'checkbox' : 'switch'\"\r\n ></ui-checkbox>\r\n }\r\n @else if (field.type === 'radio') {\r\n <ui-radio\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [loading]=\"field.loading??false\"\r\n [error]=\"error\"\r\n [options]=\"field.options || []\"\r\n ></ui-radio>\r\n }\r\n @else if (field.type === 'slider') {\r\n <ui-slider\r\n [min]=\"field.min??0\"\r\n [max]=\"field.max??100\"\r\n [step]=\"field.sliderInterval??1\"\r\n [markerCount]=\"field.sliderMarks??5\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n ></ui-slider>\r\n }\r\n @else if (field.type === 'pool') {\r\n <ui-pool-options\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [listViewTitle]=\"field.poolTitle??'common.selected'\"\r\n [enabledListView]=\"field.poolEnabledListView||false\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-pool-options>\r\n }\r\n @else if (field.type === 'repeater') {\r\n <ui-repeater\r\n [formArray]=\"asFormArray(control)\"\r\n [field]=\"field\"\r\n [cols]=\"cols\"\r\n [error]=\"error\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [selectOptionsResolver]=\"selectOptionsResolver\"\r\n [parentForm]=\"form\"\r\n ></ui-repeater>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".form{width:100%;display:grid;align-items:stretch;gap:1rem;padding-bottom:.75rem}@media (max-width: 479px){.form{grid-template-columns:1fr}}@media (min-width: 768px){.form{grid-template-columns:repeat(var(--cols),minmax(0,1fr))}}@media (min-width: 480px) and (max-width: 767px){.form{grid-template-columns:repeat(min(var(--cols),2),minmax(0,1fr))}}.form>*{min-width:0}h2{margin-top:1.5rem}.speak-icon{display:flex;width:100%;align-items:center;gap:10px}.speak-icon i{font-size:20px;color:var(--primary-500)}textarea{resize:none}\n"] }]
|
|
4914
|
+
], template: "<div class=\"form\" [ngStyle]=\"{'--cols': cols, '--min': '180px'}\" [formGroup]=\"form\">\r\n @for (state of visibleFieldStates(); track state.field.name) {\r\n @let field = state.field;\r\n @let control = state.control;\r\n @let currentValue = state.value ?? '';\r\n @let error = getControlErrorMessages(control, field)[0];\r\n\r\n <div [style.grid-column]=\"getGridColumn(field)\" (focusout)=\"onFieldContainerFocusout(field, $event)\">\r\n @if (['text', 'number'].includes(field.type)) {\r\n @let inputColor = getInputColor(field, currentValue);\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"inputColor\"\r\n [internalIcon]=\"field.internalIcon || (currentValue !== '' ? getIconByColor(field, inputColor) : '')\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <input #inp\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [type]=\"field.type\"\r\n [step]=\"field.step\"\r\n [min]=\"field.min\"\r\n [max]=\"field.max\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [placeholder]=\"field.placeholder??field.label\"/>\r\n @if (field.maxLength && field.showCounter) {\r\n <span counter>{{inp.value.length}} /{{field.maxLength}}</span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'textarea') {\r\n <ui-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [disabled]=\"!!control?.disabled\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\">\r\n <textarea #ta\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [minLength]=\"field.minLength||null\"\r\n [maxlength]=\"field.maxLength||null\"\r\n [textareaAutoresize]=\"field.textareaResize\"\r\n [textareaAutoresizeMinRows]=\"field.resizeMinRows??1\"\r\n [textareaAutoresizeMaxRows]=\"field.resizeMaxRows??5\"\r\n [rows]=\"field.resizeMinRows??3\"\r\n [placeholder]=\"field.placeholder??field.label\"\r\n ></textarea>\r\n @if (field.voiceToTextEnabled && !control?.disabled) {\r\n @let listening = isListening(field.name);\r\n <div class=\"speak-icon\" (click)=\"ta.focus()\">\r\n <ui-button\r\n [disabled]=\"listening\"\r\n style=\"margin-bottom: 2px;\"\r\n (click)=\"voiceToText(ta, field.name)\"\r\n [icon]=\"listening?'ri-mic-fill':'ri-mic-line'\"\r\n [type]=\"listening?'filled':'bordered'\"\r\n size=\"s\"\r\n [iconOnly]=\"true\"\r\n ></ui-button>\r\n @if (listening) {\r\n <i class=\"ri-voiceprint-line\"></i>\r\n }\r\n </div>\r\n }\r\n @if (field.showCounter) {\r\n <span counter>\r\n {{ta.value.length}}\r\n @if (field.maxLength) {\r\n /{{field.maxLength}}\r\n }\r\n </span>\r\n }\r\n </ui-input>\r\n }\r\n @if (field.type === 'phone') {\r\n <ui-phone-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [placeholder]=\"field.placeholder||field.label||''\"\r\n >\r\n </ui-phone-input>\r\n }\r\n @else if (field.type === 'date') {\r\n <ui-date-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [justMonth]=\"!!field.monthMode\"\r\n [min]=\"field.minDate??''\"\r\n [max]=\"field.maxDate??''\"\r\n [monthDay]=\"field.monthDay||'first'\"\r\n [formControlName]=\"field.name\"\r\n ></ui-date-picker>\r\n }\r\n @else if (field.type === 'time') {\r\n <ui-time-picker\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [interval]=\"field.timeInterval??5\"\r\n [formControlName]=\"field.name\"\r\n ></ui-time-picker>\r\n }\r\n @else if (field.type === 'select') {\r\n <ui-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [loading]=\"field.loading??false\"\r\n [nullable]=\"field.selectNullable??false\"\r\n [showSubtitle]=\"field.showSubtitle??false\"\r\n [searcherEnabled]=\"field.selectSearchEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-select>\r\n }\r\n @else if (field.type === 'multyselect') {\r\n <ui-multy-select\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [tip]=\"field.tip??''\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-multy-select>\r\n }\r\n @else if (field.type === 'searcher') {\r\n <ui-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-searcher>\r\n }\r\n @else if (field.type === 'multisearcher') {\r\n <ui-multy-searcher\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [tip]=\"field.tip??''\"\r\n [searchFn]=\"getSearcherFn(field)\"\r\n [itemDisplayFn]=\"getSearcherDisplayFn(field)\"\r\n [itemIsEnabledFn]=\"getSearcherIsEnabledFn(field)\"\r\n [placeholder]=\"field.placeholder??'common.search_ellipsis'\"\r\n [error]=\"error\"\r\n ></ui-multy-searcher>\r\n }\r\n @else if (field.type === 'file') {\r\n <ui-file-input\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [internalIcon]=\"field.internalIcon??''\"\r\n [internalIconColor]=\"field.internalIconColor??'grey'\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [fileTypes]=\"field.fileTypes??null\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [formControlName]=\"field.name\"\r\n ></ui-file-input>\r\n }\r\n @else if (['checkbox', 'switch'].includes(field.type)) {\r\n <ui-checkbox\r\n [label]=\"(field.label??'') + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [placeholder]=\"field.placeholder??''\"\r\n [tip]=\"field.tip??''\"\r\n [type]=\"field.type === 'checkbox' ? 'checkbox' : 'switch'\"\r\n ></ui-checkbox>\r\n }\r\n @else if (field.type === 'radio') {\r\n <ui-radio\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [loading]=\"field.loading??false\"\r\n [error]=\"error\"\r\n [options]=\"field.options || []\"\r\n ></ui-radio>\r\n }\r\n @else if (field.type === 'slider') {\r\n <ui-slider\r\n [min]=\"field.min??0\"\r\n [max]=\"field.max??100\"\r\n [step]=\"field.sliderInterval??1\"\r\n [markerCount]=\"field.sliderMarks??5\"\r\n [id]=\"field.name\"\r\n [formControlName]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [tip]=\"field.tip??''\"\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n ></ui-slider>\r\n }\r\n @else if (field.type === 'pool') {\r\n <ui-pool-options\r\n [error]=\"error\"\r\n [label]=\"field.label + (field.required ? ' *' : '')\"\r\n [id]=\"field.name\"\r\n [icon]=\"field.icon??''\"\r\n [loading]=\"field.loading??false\"\r\n [multy]=\"field.multyEnabled??false\"\r\n [tip]=\"field.tip??''\"\r\n [listViewTitle]=\"field.poolTitle??'common.selected'\"\r\n [enabledListView]=\"field.poolEnabledListView||false\"\r\n [formControlName]=\"field.name\"\r\n [options]=\"field.options || []\"\r\n ></ui-pool-options>\r\n }\r\n @else if (field.type === 'repeater') {\r\n <ui-repeater\r\n [formArray]=\"asFormArray(control)\"\r\n [field]=\"field\"\r\n [cols]=\"cols\"\r\n [error]=\"error\"\r\n [fileUidResolverFn]=\"fileUidResolverFn\"\r\n [selectOptionsResolver]=\"selectOptionsResolver\"\r\n [parentForm]=\"form\"\r\n ></ui-repeater>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".form{width:100%;display:grid;align-items:stretch;gap:1rem;padding-bottom:.75rem}@media (max-width: 479px){.form{grid-template-columns:1fr}}@media (min-width: 768px){.form{grid-template-columns:repeat(var(--cols),minmax(0,1fr))}}@media (min-width: 480px) and (max-width: 767px){.form{grid-template-columns:repeat(min(var(--cols),2),minmax(0,1fr))}}.form>*{min-width:0}h2{margin-top:1.5rem}.speak-icon{display:flex;width:100%;align-items:center;gap:10px}.speak-icon i{font-size:20px;color:var(--primary-500)}textarea{resize:none}\n"] }]
|
|
4784
4915
|
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { fields: [{
|
|
4785
4916
|
type: Input
|
|
4786
4917
|
}], isSubForm: [{
|
|
@@ -4837,7 +4968,7 @@ class UicFormWrapperComponent {
|
|
|
4837
4968
|
immediateExternalValidationValueByField = new Map();
|
|
4838
4969
|
immediateValidationFieldTypes = new Set([
|
|
4839
4970
|
'date', 'time', 'select', 'radio', 'checkbox', 'switch',
|
|
4840
|
-
'pool', 'file', 'multyselect', 'searcher', 'slider'
|
|
4971
|
+
'pool', 'file', 'multyselect', 'searcher', 'multisearcher', 'slider'
|
|
4841
4972
|
]);
|
|
4842
4973
|
formValueSub = null;
|
|
4843
4974
|
optionSourceSubs = new Map();
|
|
@@ -5850,6 +5981,7 @@ class UicFormWrapperComponent {
|
|
|
5850
5981
|
case 'switch':
|
|
5851
5982
|
return false;
|
|
5852
5983
|
case 'multyselect':
|
|
5984
|
+
case 'multisearcher':
|
|
5853
5985
|
return [];
|
|
5854
5986
|
default:
|
|
5855
5987
|
return null;
|
|
@@ -6165,31 +6297,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6165
6297
|
type: Output
|
|
6166
6298
|
}] } });
|
|
6167
6299
|
|
|
6168
|
-
class UicMultySearcherComponent {
|
|
6169
|
-
itemDisplayFn = item => String(item);
|
|
6170
|
-
disabled = false;
|
|
6171
|
-
values = [];
|
|
6172
|
-
valuesChange = new EventEmitter();
|
|
6173
|
-
removeItem(idx) {
|
|
6174
|
-
this.values.splice(idx, 1);
|
|
6175
|
-
this.valuesChange.emit(this.values);
|
|
6176
|
-
}
|
|
6177
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicMultySearcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6178
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicMultySearcherComponent, isStandalone: true, selector: "ui-multy-searcher", inputs: { itemDisplayFn: "itemDisplayFn", disabled: "disabled", values: "values" }, outputs: { valuesChange: "valuesChange" }, ngImport: i0, template: "<div class=\"search-results\">\r\n @for (item of values; track $index) {\r\n <div class=\"search-result\" [class.disabledresult]=\"disabled\">\r\n <div [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\">\r\n </div>\r\n @if ( !disabled ){\r\n <ui-button (click)=\"removeItem($index)\" [iconOnly]=\"true\" icon=\"ri-delete-bin-line\" type=\"ghost\" color=\"red\" size=\"s\"></ui-button>\r\n }\r\n </div>\r\n }\r\n @if (disabled && values.length == 0) {\r\n <div class=\"search-result-empty\">\r\n {{'searcher.without_selected' | uicTranslate}}\r\n </div>\r\n }\r\n</div>\r\n", styles: [".search-results{display:flex;flex-direction:column;gap:5px}.search-result{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:solid 1px var(--grey-300);border-radius:4px;display:flex;background-color:var(--grey-50);align-items:center;justify-content:space-between}.disabledresult{color:var(--disabled-color)}.search-result-empty{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:dashed 1px var(--grey-300);border-radius:4px;display:flex;color:var(--grey-400);align-items:center;justify-content:center}\n"], dependencies: [{ kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
6179
|
-
}
|
|
6180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicMultySearcherComponent, decorators: [{
|
|
6181
|
-
type: Component,
|
|
6182
|
-
args: [{ selector: 'ui-multy-searcher', imports: [UicButtonComponent, UicTranslatePipe], template: "<div class=\"search-results\">\r\n @for (item of values; track $index) {\r\n <div class=\"search-result\" [class.disabledresult]=\"disabled\">\r\n <div [innerHTML]=\"itemDisplayFn?itemDisplayFn(item):''\">\r\n </div>\r\n @if ( !disabled ){\r\n <ui-button (click)=\"removeItem($index)\" [iconOnly]=\"true\" icon=\"ri-delete-bin-line\" type=\"ghost\" color=\"red\" size=\"s\"></ui-button>\r\n }\r\n </div>\r\n }\r\n @if (disabled && values.length == 0) {\r\n <div class=\"search-result-empty\">\r\n {{'searcher.without_selected' | uicTranslate}}\r\n </div>\r\n }\r\n</div>\r\n", styles: [".search-results{display:flex;flex-direction:column;gap:5px}.search-result{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:solid 1px var(--grey-300);border-radius:4px;display:flex;background-color:var(--grey-50);align-items:center;justify-content:space-between}.disabledresult{color:var(--disabled-color)}.search-result-empty{font-size:14px;line-height:16px;min-height:33px;padding:2px 2px 2px 10px;border:dashed 1px var(--grey-300);border-radius:4px;display:flex;color:var(--grey-400);align-items:center;justify-content:center}\n"] }]
|
|
6183
|
-
}], propDecorators: { itemDisplayFn: [{
|
|
6184
|
-
type: Input
|
|
6185
|
-
}], disabled: [{
|
|
6186
|
-
type: Input
|
|
6187
|
-
}], values: [{
|
|
6188
|
-
type: Input
|
|
6189
|
-
}], valuesChange: [{
|
|
6190
|
-
type: Output
|
|
6191
|
-
}] } });
|
|
6192
|
-
|
|
6193
6300
|
const DROPDOWN_OVERLAY_CONTROLS = new InjectionToken('DROPDOWN_OVERLAY_CONTROLS');
|
|
6194
6301
|
const DEFAULT_POSITIONS = [
|
|
6195
6302
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
@@ -6423,7 +6530,7 @@ class UicTableUicSearcherComponent {
|
|
|
6423
6530
|
}
|
|
6424
6531
|
}
|
|
6425
6532
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUicSearcherComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6426
|
-
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 | uicTranslate\">\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?('common.search' | uicTranslate):''}}</ui-button>\r\n }\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"reset()\" color=\"black\" type=\"bordered\" rightIcon=\"ri-eraser-line\" size=\"m\">{{showButtonText?('common.clear' | uicTranslate):''}}</ui-button>\r\n</div>\r\n", 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: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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"]
|
|
6533
|
+
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 | uicTranslate\">\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?('common.search' | uicTranslate):''}}</ui-button>\r\n }\r\n <ui-button [iconOnly]=\"!showButtonText\" (click)=\"reset()\" color=\"black\" type=\"bordered\" rightIcon=\"ri-eraser-line\" size=\"m\">{{showButtonText?('common.clear' | uicTranslate):''}}</ui-button>\r\n</div>\r\n", 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: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
6427
6534
|
}
|
|
6428
6535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableUicSearcherComponent, decorators: [{
|
|
6429
6536
|
type: Component,
|
|
@@ -6751,7 +6858,7 @@ class TinyAlertComponent {
|
|
|
6751
6858
|
this.modalRef.closeFloating(value ? this.response : null);
|
|
6752
6859
|
}
|
|
6753
6860
|
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 });
|
|
6754
|
-
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 <div class=\"h3-alert\" [class]=\"'icon-'+data.type\"> {{data.title | uicTranslate}} </div>\r\n \r\n <div class=\"alert-body\" [innerHTML]=\"data.body | uicTranslate\"> </div>\r\n @if ( data.showInput ){\r\n <div class=\"alert-input\">\r\n <ui-input [label]=\"data.inputLabel??'_'\">\r\n @if (data.inputType == 'textarea') {\r\n <textarea [(ngModel)]=\"inputData\" [placeholder]=\"data.inputPlaceholder\"></textarea>\r\n }@else{\r\n <input [(ngModel)]=\"inputData\" [placeholder]=\"data.inputPlaceholder\" type=\"text\" />\r\n }\r\n </ui-input>\r\n </div>\r\n }\r\n\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??'common.cancel') | uicTranslate}} </ui-button>\r\n }\r\n <ui-button (click)=\"close(true)\" [color]=\"data.okButtonColor??'primary'\" size=\"l\"> {{(data.okButtonText??'common.continue') | uicTranslate}} </ui-button>\r\n </div>\r\n \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-input{width:100%;padding:10px 0}.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-alert{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;line-height: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"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"]
|
|
6861
|
+
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 <div class=\"h3-alert\" [class]=\"'icon-'+data.type\"> {{data.title | uicTranslate}} </div>\r\n \r\n <div class=\"alert-body\" [innerHTML]=\"data.body | uicTranslate\"> </div>\r\n @if ( data.showInput ){\r\n <div class=\"alert-input\">\r\n <ui-input [label]=\"data.inputLabel??'_'\">\r\n @if (data.inputType == 'textarea') {\r\n <textarea [(ngModel)]=\"inputData\" [placeholder]=\"data.inputPlaceholder\"></textarea>\r\n }@else{\r\n <input [(ngModel)]=\"inputData\" [placeholder]=\"data.inputPlaceholder\" type=\"text\" />\r\n }\r\n </ui-input>\r\n </div>\r\n }\r\n\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??'common.cancel') | uicTranslate}} </ui-button>\r\n }\r\n <ui-button (click)=\"close(true)\" [color]=\"data.okButtonColor??'primary'\" size=\"l\"> {{(data.okButtonText??'common.continue') | uicTranslate}} </ui-button>\r\n </div>\r\n \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-input{width:100%;padding:10px 0}.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-alert{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;line-height: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"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
6755
6862
|
}
|
|
6756
6863
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TinyAlertComponent, decorators: [{
|
|
6757
6864
|
type: Component,
|
|
@@ -7641,7 +7748,7 @@ class UicTableComponent {
|
|
|
7641
7748
|
return `${a ?? ''}` === `${b ?? ''}`;
|
|
7642
7749
|
}
|
|
7643
7750
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7644
|
-
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", editable: "editable", rowClickable: "rowClickable", rowExpandible: "rowExpandible", pages: "pages", size: "size", squeletonRows: "squeletonRows", buttonSize: "buttonSize", highlightedId: "highlightedId", headerText: "headerText", headerSubtitle: "headerSubtitle", 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", cellChange: "cellChange" }, 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\"> \r\n <div>\r\n {{headerText}} <span class=\"hightlited-note\"> ({{totalItems}}) </span> \r\n </div>\r\n <p> {{headerSubtitle}} </p>\r\n </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 [uiTooltip]=\"btn.tooltip??''\"\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 if (isCellEditable(header)) {\r\n @if ((header.editionType ?? 'input') === 'select') {\r\n <div class=\"ui-editable-cell\" (click)=\"$event.stopPropagation()\">\r\n <ui-select\r\n [disabled]=\"disabled\"\r\n [options]=\"header.editionTypeOptions || []\"\r\n [ngModel]=\"getEditableCellValue(row.id, header.key)\"\r\n (ngModelChange)=\"onEditableSelectChange(row.id, row.data, header.key, $event)\">\r\n </ui-select>\r\n </div>\r\n } @else {\r\n <div class=\"ui-editable-cell\" (click)=\"$event.stopPropagation()\">\r\n <ui-input [disabled]=\"disabled\">\r\n <input\r\n [disabled]=\"disabled\"\r\n [ngModel]=\"getEditableCellValue(row.id, header.key)\"\r\n (ngModelChange)=\"onEditableInputChange(row.id, header.key, $event)\"\r\n (blur)=\"onEditableInputBlur(row.id, row.data, header.key)\" />\r\n </ui-input>\r\n </div>\r\n }\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(row.id, $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 | uicTranslate}} </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%;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(--table-hover)}.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:calc(var(--table-spacing-ref) * 1.6) 20px;font-weight:600;font-size:18px;line-height:20px;gap:16px;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-table-topbar p{font-size:14px;font-weight:400;color:var(--grey-400)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content;text-align:left}.ui-editable-cell{width:100%;min-width:150px}.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)}.header-white{color:var(--table-header-color);background-color:#fff}.header-white:hover{background-color:var(--table-hover)!important}.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: "pipe", type: UicTranslatePipe, name: "uicTranslate" }, { kind: "directive", type: UicToolTipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"], outputs: ["clickButton"] }, { kind: "component", type: UicSelectComponent, selector: "ui-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "noneText", "emptyText", "searcherEnabled", "loading", "nullable", "options"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [highlightRow, animatedRow] });
|
|
7751
|
+
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", editable: "editable", rowClickable: "rowClickable", rowExpandible: "rowExpandible", pages: "pages", size: "size", squeletonRows: "squeletonRows", buttonSize: "buttonSize", highlightedId: "highlightedId", headerText: "headerText", headerSubtitle: "headerSubtitle", 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", cellChange: "cellChange" }, 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\"> \r\n <div>\r\n {{headerText}} <span class=\"hightlited-note\"> ({{totalItems}}) </span> \r\n </div>\r\n <p> {{headerSubtitle}} </p>\r\n </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 [uiTooltip]=\"btn.tooltip??''\"\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 if (isCellEditable(header)) {\r\n @if ((header.editionType ?? 'input') === 'select') {\r\n <div class=\"ui-editable-cell\" (click)=\"$event.stopPropagation()\">\r\n <ui-select\r\n [disabled]=\"disabled\"\r\n [options]=\"header.editionTypeOptions || []\"\r\n [ngModel]=\"getEditableCellValue(row.id, header.key)\"\r\n (ngModelChange)=\"onEditableSelectChange(row.id, row.data, header.key, $event)\">\r\n </ui-select>\r\n </div>\r\n } @else {\r\n <div class=\"ui-editable-cell\" (click)=\"$event.stopPropagation()\">\r\n <ui-input [disabled]=\"disabled\">\r\n <input\r\n [disabled]=\"disabled\"\r\n [ngModel]=\"getEditableCellValue(row.id, header.key)\"\r\n (ngModelChange)=\"onEditableInputChange(row.id, header.key, $event)\"\r\n (blur)=\"onEditableInputBlur(row.id, row.data, header.key)\" />\r\n </ui-input>\r\n </div>\r\n }\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(row.id, $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 | uicTranslate}} </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%;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(--table-hover)}.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:calc(var(--table-spacing-ref) * 1.6) 20px;font-weight:600;font-size:18px;line-height:20px;gap:16px;background-color:#fff;align-items:center;color:var(--grey-900);border-bottom:solid 1px var(--table-border-color)}.ui-table-topbar p{font-size:14px;font-weight:400;color:var(--grey-400)}.ui-cell-content{padding:5px 0;display:flex;gap:4px;align-items:center;width:100%;min-width:fit-content;text-align:left}.ui-editable-cell{width:100%;min-width:150px}.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)}.header-white{color:var(--table-header-color);background-color:#fff}.header-white:hover{background-color:var(--table-hover)!important}.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: "pipe", type: UicTranslatePipe, name: "uicTranslate" }, { kind: "directive", type: UicToolTipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip"] }, { kind: "component", type: UicCheckboxComponent, selector: "ui-checkbox", inputs: ["icon", "iconColor", "label", "tip", "type", "placeholder", "loading", "noPadding", "disabled"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "component", type: UicSelectComponent, selector: "ui-select", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "showSubtitle", "disabled", "nonSelectedText", "noneText", "emptyText", "searcherEnabled", "loading", "nullable", "options"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [highlightRow, animatedRow] });
|
|
7645
7752
|
}
|
|
7646
7753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTableComponent, decorators: [{
|
|
7647
7754
|
type: Component,
|
|
@@ -8657,7 +8764,7 @@ class UicTreeAdminComponent {
|
|
|
8657
8764
|
}
|
|
8658
8765
|
}
|
|
8659
8766
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTreeAdminComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8660
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTreeAdminComponent, isStandalone: true, selector: "ui-tree-admin", inputs: { searchEnabled: "searchEnabled", loading: "loading", emptyMessage: "emptyMessage", duplicateNameMessage: "duplicateNameMessage", tree: "tree" }, outputs: { edit: "edit", remove: "remove", deactivate: "deactivate", nameChange: "nameChange", create: "create" }, viewQueries: [{ propertyName: "childNameInputs", predicate: ["childNameInput"], descendants: true }, { propertyName: "parentNameInputs", predicate: ["parentNameInput"], descendants: true }], ngImport: i0, template: "@if (loading) {\r\n <div class=\"tree-skeleton\">\r\n <ui-skeleton-loader [inputs]=\"4\" [cols]=\"1\"></ui-skeleton-loader>\r\n </div>\r\n} @else {\r\n @if (searchEnabled) {\r\n <div class=\"filter-bar\">\r\n {{'tree.search_label' | uicTranslate}}\r\n <ui-input>\r\n <input #inp [placeholder]=\"'tree.search_placeholder' | uicTranslate\" [value]=\"filterTerm\" (input)=\"updateFilter($event)\">\r\n </ui-input>\r\n <ui-button\r\n [iconOnly]=\"true\"\r\n icon=\"ri-eraser-line\"\r\n type=\"bordered\"\r\n color=\"black\"\r\n [disabled]=\"!filterTerm\"\r\n (click)=\"clearFilter(); inp.focus()\"\r\n ></ui-button>\r\n </div>\r\n }\r\n @for (item of getVisibleTree(); track item.id) {\r\n <div class=\"tree-item\" [class.is-collapsed]=\"!isExpanded(item)\">\r\n <div class=\"tree-header\" (click)=\"toggleItem(item)\">\r\n <i class=\"ri-arrow-down-s-line tree-arrow\" [class.is-collapsed]=\"!isExpanded(item)\"></i>\r\n <div class=\"tree-header-name\">\r\n @if (isEditingParent(item)) {\r\n <input\r\n #parentNameInput\r\n class=\"tree-name-input\"\r\n [attr.data-id]=\"item.id\"\r\n [value]=\"item.name\"\r\n (input)=\"updateParentName(item, $event)\"\r\n (blur)=\"finalizeParentEdit(item)\"\r\n (keydown.enter)=\"finalizeParentEdit(item)\"\r\n (keydown.escape)=\"cancelParentEdit(item)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n } @else {\r\n <div class=\"tree-name-text\" (click)=\"startEditParent(item, $event)\">\r\n {{item.name}}\r\n </div>\r\n }\r\n <span>{{item.children?.length || 0}}</span>\r\n </div>\r\n <div>\r\n <ui-switch\r\n [checked]=\"item.enabled\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"emitDeactivateParent(item, $event)\"\r\n ></ui-switch>\r\n </div>\r\n <ui-button (click)=\"addSubItem(item, $event)\" icon=\"ri-add-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n <ui-button (click)=\"emitEditParent(item, $event)\" icon=\"ri-edit-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n @if (!item.children?.length) {\r\n <ui-button (click)=\"emitDeleteParent(item, $event)\" icon=\"ri-delete-bin-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n }\r\n </div>\r\n <div class=\"tree-body\">\r\n @if (getFilteredChildren(item).length) {\r\n @for (subitem of getFilteredChildren(item); track subitem.id) {\r\n <div\r\n class=\"tree-subitem\"\r\n [class.is-disabled]=\"!subitem.enabled\"\r\n [class.is-pending]=\"isPendingCreate(subitem)\"\r\n [class.is-parent-disabled]=\"!item.enabled\"\r\n >\r\n <div class=\"tree-subitem-name\">\r\n <i\r\n class=\"ri-circle-fill tree-subitem-status\"\r\n [class.is-enabled]=\"subitem.enabled\"\r\n [class.is-disabled]=\"!subitem.enabled\"\r\n ></i>\r\n @if (isEditingChild(subitem)) {\r\n <input\r\n #childNameInput\r\n class=\"tree-name-input tree-name-input--sub\"\r\n [attr.data-id]=\"subitem.id\"\r\n [value]=\"subitem.name\"\r\n (input)=\"updateChildName(item, subitem, $event)\"\r\n (blur)=\"finalizeChildEdit(item, subitem)\"\r\n (keydown.enter)=\"finalizeChildEdit(item, subitem)\"\r\n (keydown.escape)=\"cancelChildEdit(item, subitem)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n } @else {\r\n <span\r\n class=\"tree-name-text\"\r\n (click)=\"!isPendingCreate(subitem) && startEditChild(subitem, $event)\"\r\n >{{subitem.name}}</span> \r\n @if (subitem.tag) {\r\n <span class=\"tree-tag tag-{{subitem.tagColor}}\" >{{subitem.tag}}</span>\r\n }\r\n }\r\n </div>\r\n <div class=\"tree-subitem-actions\">\r\n <ui-switch\r\n [checked]=\"subitem.enabled\"\r\n [disabled]=\"isPendingCreate(subitem)\"\r\n (checkedChange)=\"emitDeactivateChild(item, subitem, $event)\"\r\n ></ui-switch>\r\n <ui-button\r\n (click)=\"emitEditChild(item, subitem, $event)\"\r\n [disabled]=\"isPendingCreate(subitem)\"\r\n icon=\"ri-edit-line\"\r\n type=\"ghost\"\r\n [iconOnly]=\"true\"\r\n size=\"s\"\r\n ></ui-button>\r\n <ui-button \r\n (click)=\"emitDeleteChild(item, subitem, $event)\" \r\n icon=\"ri-delete-bin-line\" \r\n [disabled]=\"isPendingCreate(subitem)\"\r\n type=\"ghost\" \r\n [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <div class=\"tree-empty\">\r\n {{emptyMessage | uicTranslate}}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n}\r\n\r\n", styles: [":host{width:100%}.tree-item{border:solid 1px var(--grey-400);border-radius:10px;overflow:hidden;margin-bottom:4px;background:linear-gradient(180deg,var(--grey-100) 0%,var(--grey-50) 100%);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.tree-header{width:100%;display:flex;align-items:center;gap:5px;padding:4px 10px;border-bottom:solid 1px var(--grey-400);background-color:var(--grey-100);cursor:pointer;transition:background-color .16s ease}.tree-header:hover{background-color:var(--grey-200)}.tree-header-name{flex:1 1;display:flex;align-items:center;gap:10px}.tree-header-name span{border-radius:10px;padding:2px 10px;font-size:10px;color:var(--blue-800);background-color:var(--blue-100)}.tree-arrow{transition:transform .18s ease}.tree-arrow.is-collapsed{transform:rotate(-90deg)}.tree-body{background-color:var(--white);padding:2px 16px;display:flex;flex-direction:column;gap:1px;max-height:600px;opacity:1;transition:max-height .2s ease,opacity .2s ease,padding .2s ease}.tree-empty{padding:8px 10px;font-size:12px;color:var(--grey-500);background-color:var(--grey-50);border-radius:8px}.tree-subitem{color:var(--grey-700);border-radius:5px;padding:3px 15px;gap:5px;font-size:13px;display:flex;align-items:center}.tree-subitem-name{flex:1 1;display:inline-flex;align-items:center;gap:6px}.tree-subitem-status{font-size:10px;color:var(--grey-400)}.tree-subitem-status.is-enabled{color:var(--blue-500)}.tree-subitem-status.is-disabled{color:var(--grey-400)}.tree-subitem-actions{display:inline-flex;align-items:center;gap:4px;opacity:0;pointer-events:none;transform:translateY(-2px);transition:opacity .16s ease,transform .16s ease}.tree-subitem:hover{background-color:var(--blue-100)}.tree-subitem:hover .tree-subitem-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.tree-subitem.is-disabled .tree-name-text,.tree-subitem.is-disabled .tree-name-input,.tree-subitem.is-parent-disabled .tree-name-text,.tree-subitem.is-parent-disabled .tree-name-input{color:var(--grey-500)}.tree-subitem.is-parent-disabled .tree-subitem-status{color:var(--grey-400)}.tree-subitem.is-pending .tree-name-text{cursor:default;color:var(--grey-500)}.tree-name-text{color:var(--grey-900);padding:0 20px;cursor:text}.filter-bar{display:flex;gap:10px;align-items:center;margin-bottom:10px;font-size:14px}.filter-bar input{flex:1 1}.tree-name-input{flex:1 1;min-width:0;border:solid 1px var(--grey-300);border-radius:6px;padding:7px;font-size:13px;color:var(--grey-900);background-color:var(--white);outline:none;transition:border-color .16s ease,box-shadow .16s ease;width:300px}.tree-name-input:focus{border-color:var(--blue-500);box-shadow:0 0 0 2px #3b82f626}.tree-name-input--sub{font-size:12px;padding:5px}.tree-item.is-collapsed .tree-body{max-height:0;opacity:0;padding-top:0;padding-bottom:0;overflow:hidden}.tree-skeleton{padding:8px;border:solid 1px var(--grey-400);border-radius:10px;background-color:var(--grey-50)}.tree-tag{font-size:11px;padding:2px 10px;font-weight:300;border-radius:10px}.tag-yellow{background-color:var(--yellow-100)}.tag-red{background-color:var(--red-100)}.tag-green{background-color:var(--green-100)}.tag-blue{background-color:var(--blue-100)}\n"], dependencies: [{ kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"], outputs: ["clickButton"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: UicSkeletonLoaderComponent, selector: "ui-skeleton-loader", inputs: ["inputs", "cols"] }, { kind: "component", type: UicSwichComponent, selector: "ui-switch", inputs: ["checked", "disabled", "placeholder", "label"], outputs: ["checkedChange"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
8767
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: UicTreeAdminComponent, isStandalone: true, selector: "ui-tree-admin", inputs: { searchEnabled: "searchEnabled", loading: "loading", emptyMessage: "emptyMessage", duplicateNameMessage: "duplicateNameMessage", tree: "tree" }, outputs: { edit: "edit", remove: "remove", deactivate: "deactivate", nameChange: "nameChange", create: "create" }, viewQueries: [{ propertyName: "childNameInputs", predicate: ["childNameInput"], descendants: true }, { propertyName: "parentNameInputs", predicate: ["parentNameInput"], descendants: true }], ngImport: i0, template: "@if (loading) {\r\n <div class=\"tree-skeleton\">\r\n <ui-skeleton-loader [inputs]=\"4\" [cols]=\"1\"></ui-skeleton-loader>\r\n </div>\r\n} @else {\r\n @if (searchEnabled) {\r\n <div class=\"filter-bar\">\r\n {{'tree.search_label' | uicTranslate}}\r\n <ui-input>\r\n <input #inp [placeholder]=\"'tree.search_placeholder' | uicTranslate\" [value]=\"filterTerm\" (input)=\"updateFilter($event)\">\r\n </ui-input>\r\n <ui-button\r\n [iconOnly]=\"true\"\r\n icon=\"ri-eraser-line\"\r\n type=\"bordered\"\r\n color=\"black\"\r\n [disabled]=\"!filterTerm\"\r\n (click)=\"clearFilter(); inp.focus()\"\r\n ></ui-button>\r\n </div>\r\n }\r\n @for (item of getVisibleTree(); track item.id) {\r\n <div class=\"tree-item\" [class.is-collapsed]=\"!isExpanded(item)\">\r\n <div class=\"tree-header\" (click)=\"toggleItem(item)\">\r\n <i class=\"ri-arrow-down-s-line tree-arrow\" [class.is-collapsed]=\"!isExpanded(item)\"></i>\r\n <div class=\"tree-header-name\">\r\n @if (isEditingParent(item)) {\r\n <input\r\n #parentNameInput\r\n class=\"tree-name-input\"\r\n [attr.data-id]=\"item.id\"\r\n [value]=\"item.name\"\r\n (input)=\"updateParentName(item, $event)\"\r\n (blur)=\"finalizeParentEdit(item)\"\r\n (keydown.enter)=\"finalizeParentEdit(item)\"\r\n (keydown.escape)=\"cancelParentEdit(item)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n } @else {\r\n <div class=\"tree-name-text\" (click)=\"startEditParent(item, $event)\">\r\n {{item.name}}\r\n </div>\r\n }\r\n <span>{{item.children?.length || 0}}</span>\r\n </div>\r\n <div>\r\n <ui-switch\r\n [checked]=\"item.enabled\"\r\n (click)=\"$event.stopPropagation()\"\r\n (checkedChange)=\"emitDeactivateParent(item, $event)\"\r\n ></ui-switch>\r\n </div>\r\n <ui-button (click)=\"addSubItem(item, $event)\" icon=\"ri-add-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n <ui-button (click)=\"emitEditParent(item, $event)\" icon=\"ri-edit-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n @if (!item.children?.length) {\r\n <ui-button (click)=\"emitDeleteParent(item, $event)\" icon=\"ri-delete-bin-line\" type=\"ghost\" [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n }\r\n </div>\r\n <div class=\"tree-body\">\r\n @if (getFilteredChildren(item).length) {\r\n @for (subitem of getFilteredChildren(item); track subitem.id) {\r\n <div\r\n class=\"tree-subitem\"\r\n [class.is-disabled]=\"!subitem.enabled\"\r\n [class.is-pending]=\"isPendingCreate(subitem)\"\r\n [class.is-parent-disabled]=\"!item.enabled\"\r\n >\r\n <div class=\"tree-subitem-name\">\r\n <i\r\n class=\"ri-circle-fill tree-subitem-status\"\r\n [class.is-enabled]=\"subitem.enabled\"\r\n [class.is-disabled]=\"!subitem.enabled\"\r\n ></i>\r\n @if (isEditingChild(subitem)) {\r\n <input\r\n #childNameInput\r\n class=\"tree-name-input tree-name-input--sub\"\r\n [attr.data-id]=\"subitem.id\"\r\n [value]=\"subitem.name\"\r\n (input)=\"updateChildName(item, subitem, $event)\"\r\n (blur)=\"finalizeChildEdit(item, subitem)\"\r\n (keydown.enter)=\"finalizeChildEdit(item, subitem)\"\r\n (keydown.escape)=\"cancelChildEdit(item, subitem)\"\r\n (click)=\"$event.stopPropagation()\"\r\n />\r\n } @else {\r\n <span\r\n class=\"tree-name-text\"\r\n (click)=\"!isPendingCreate(subitem) && startEditChild(subitem, $event)\"\r\n >{{subitem.name}}</span> \r\n @if (subitem.tag) {\r\n <span class=\"tree-tag tag-{{subitem.tagColor}}\" >{{subitem.tag}}</span>\r\n }\r\n }\r\n </div>\r\n <div class=\"tree-subitem-actions\">\r\n <ui-switch\r\n [checked]=\"subitem.enabled\"\r\n [disabled]=\"isPendingCreate(subitem)\"\r\n (checkedChange)=\"emitDeactivateChild(item, subitem, $event)\"\r\n ></ui-switch>\r\n <ui-button\r\n (click)=\"emitEditChild(item, subitem, $event)\"\r\n [disabled]=\"isPendingCreate(subitem)\"\r\n icon=\"ri-edit-line\"\r\n type=\"ghost\"\r\n [iconOnly]=\"true\"\r\n size=\"s\"\r\n ></ui-button>\r\n <ui-button \r\n (click)=\"emitDeleteChild(item, subitem, $event)\" \r\n icon=\"ri-delete-bin-line\" \r\n [disabled]=\"isPendingCreate(subitem)\"\r\n type=\"ghost\" \r\n [iconOnly]=\"true\" size=\"s\"></ui-button>\r\n </div>\r\n </div>\r\n }\r\n } @else {\r\n <div class=\"tree-empty\">\r\n {{emptyMessage | uicTranslate}}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n}\r\n\r\n", styles: [":host{width:100%}.tree-item{border:solid 1px var(--grey-400);border-radius:10px;overflow:hidden;margin-bottom:4px;background:linear-gradient(180deg,var(--grey-100) 0%,var(--grey-50) 100%);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.tree-header{width:100%;display:flex;align-items:center;gap:5px;padding:4px 10px;border-bottom:solid 1px var(--grey-400);background-color:var(--grey-100);cursor:pointer;transition:background-color .16s ease}.tree-header:hover{background-color:var(--grey-200)}.tree-header-name{flex:1 1;display:flex;align-items:center;gap:10px}.tree-header-name span{border-radius:10px;padding:2px 10px;font-size:10px;color:var(--blue-800);background-color:var(--blue-100)}.tree-arrow{transition:transform .18s ease}.tree-arrow.is-collapsed{transform:rotate(-90deg)}.tree-body{background-color:var(--white);padding:2px 16px;display:flex;flex-direction:column;gap:1px;max-height:600px;opacity:1;transition:max-height .2s ease,opacity .2s ease,padding .2s ease}.tree-empty{padding:8px 10px;font-size:12px;color:var(--grey-500);background-color:var(--grey-50);border-radius:8px}.tree-subitem{color:var(--grey-700);border-radius:5px;padding:3px 15px;gap:5px;font-size:13px;display:flex;align-items:center}.tree-subitem-name{flex:1 1;display:inline-flex;align-items:center;gap:6px}.tree-subitem-status{font-size:10px;color:var(--grey-400)}.tree-subitem-status.is-enabled{color:var(--blue-500)}.tree-subitem-status.is-disabled{color:var(--grey-400)}.tree-subitem-actions{display:inline-flex;align-items:center;gap:4px;opacity:0;pointer-events:none;transform:translateY(-2px);transition:opacity .16s ease,transform .16s ease}.tree-subitem:hover{background-color:var(--blue-100)}.tree-subitem:hover .tree-subitem-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.tree-subitem.is-disabled .tree-name-text,.tree-subitem.is-disabled .tree-name-input,.tree-subitem.is-parent-disabled .tree-name-text,.tree-subitem.is-parent-disabled .tree-name-input{color:var(--grey-500)}.tree-subitem.is-parent-disabled .tree-subitem-status{color:var(--grey-400)}.tree-subitem.is-pending .tree-name-text{cursor:default;color:var(--grey-500)}.tree-name-text{color:var(--grey-900);padding:0 20px;cursor:text}.filter-bar{display:flex;gap:10px;align-items:center;margin-bottom:10px;font-size:14px}.filter-bar input{flex:1 1}.tree-name-input{flex:1 1;min-width:0;border:solid 1px var(--grey-300);border-radius:6px;padding:7px;font-size:13px;color:var(--grey-900);background-color:var(--white);outline:none;transition:border-color .16s ease,box-shadow .16s ease;width:300px}.tree-name-input:focus{border-color:var(--blue-500);box-shadow:0 0 0 2px #3b82f626}.tree-name-input--sub{font-size:12px;padding:5px}.tree-item.is-collapsed .tree-body{max-height:0;opacity:0;padding-top:0;padding-bottom:0;overflow:hidden}.tree-skeleton{padding:8px;border:solid 1px var(--grey-400);border-radius:10px;background-color:var(--grey-50)}.tree-tag{font-size:11px;padding:2px 10px;font-weight:300;border-radius:10px}.tag-yellow{background-color:var(--yellow-100)}.tag-red{background-color:var(--red-100)}.tag-green{background-color:var(--green-100)}.tag-blue{background-color:var(--blue-100)}\n"], dependencies: [{ kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "component", type: UicSkeletonLoaderComponent, selector: "ui-skeleton-loader", inputs: ["inputs", "cols"] }, { kind: "component", type: UicSwichComponent, selector: "ui-switch", inputs: ["checked", "disabled", "placeholder", "label"], outputs: ["checkedChange"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
8661
8768
|
}
|
|
8662
8769
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTreeAdminComponent, decorators: [{
|
|
8663
8770
|
type: Component,
|
|
@@ -9454,7 +9561,7 @@ class UicTagSelectorComponent extends base {
|
|
|
9454
9561
|
useExisting: forwardRef(() => UicTagSelectorComponent),
|
|
9455
9562
|
multi: true
|
|
9456
9563
|
}
|
|
9457
|
-
], usesInheritance: true, ngImport: i0, template: "\r\n<ui-input-wrapper\r\n [icon]=\"icon\"\r\n [iconColor]=\"iconColor\"\r\n [label]=\"label\"\r\n [error]=\"error\"\r\n [tip]=\"tip\"\r\n [disabled]=\"disabled\">\r\n<div class=\"tags-reel\">\r\n @for (item of selectedTags; track $index) {\r\n <div [class]=\"'selected-tag lc-'+item.color\" ><i [class]=\"item.icon??'ri-hashtag'\"></i>{{item.name}} <i (click)=\"removeTag(item)\" class=\"ri-close-large-line close-icon\"></i> </div>\r\n }\r\n <ui-overlay-card>\r\n <ui-button button type=\"bordered\" color=\"black\" icon=\"ri-add-line\" size=\"s\">{{buttonText | uicTranslate}}</ui-button>\r\n <ng-container content >\r\n\r\n <ui-input internalIcon=\"ri-search-line\" internalIconColor=\"blue\">\r\n <input [placeholder]=\"placeholder | uicTranslate\" [(ngModel)]=\"filterText\" (ngModelChange)=\"filter()\" >\r\n </ui-input>\r\n <div class=\"tags-overflow\">\r\n <div class=\"tags-title\">{{predefinedTitle | uicTranslate}}</div>\r\n @for(item of filterArray; track $index){\r\n <div (click)=\"select(item)\" class=\"tag-option\"> \r\n <i class=\"ri-circle-fill f-grey\"></i> \r\n <div style=\"flex: 1 1;\">{{item.name}}</div> \r\n @if ( isSelected(item.name) ) {\r\n <i class=\"ri-check-line\"></i> \r\n }\r\n </div>\r\n }\r\n <div class=\"new-tag\"> \r\n <div class=\"new-tag-label\">{{newTagTitle | uicTranslate}}:</div>\r\n <div class=\"input-tag\">\r\n <input [(ngModel)]=\"newTagLabel\" (keydown.enter)=\"createTag()\" type=\"text\">\r\n <ui-button (click)=\"createTag()\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-add-line\"></ui-button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ui-overlay-card>\r\n</div> \r\n</ui-input-wrapper>\r\n", styles: [".tags-reel{display:flex;gap:10px;flex-wrap:wrap}.selected-tag{display:flex;gap:5px;align-items:center;font-size:12px;line-height:28px;padding:0 12px;border:solid 1px var(--grey-200);border-radius:20px}.selected-tag i{font-size:14px}.close-icon{color:var(--red-600);cursor:pointer}.tags-title{font-size:13px;padding:4px;font-weight:600;margin-bottom:5px;color:var(--grey-500)}.tag-option{font-size:14px;padding:5px 10px;border-radius:5px;transition:ease;display:flex;gap:10px;color:var(--grey-600);cursor:pointer}.tag-option:hover{background-color:var(--grey-200)}.tags-overflow{display:flex;flex-direction:column;gap:2px;padding:3px;max-height:250px;overflow:auto}.new-tag{padding:5px;border-top:solid 1px var(--grey-200)}.new-tag-label{font-size:13px;line-height:25px;color:var(--grey-500)}.input-tag{display:flex;gap:5px}.input-tag input{border:solid 1px var(--grey-300);border-radius:8px;padding:0 10px}.f-grey{color:var(--grey-200)}.lc-blue{background-color:var(--blue-100);border-color:var(--blue-600);color:var(--blue-700)}\n"], dependencies: [{ kind: "component", type: UicOverlayCardComponent, selector: "ui-overlay-card" }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"]
|
|
9564
|
+
], usesInheritance: true, ngImport: i0, template: "\r\n<ui-input-wrapper\r\n [icon]=\"icon\"\r\n [iconColor]=\"iconColor\"\r\n [label]=\"label\"\r\n [error]=\"error\"\r\n [tip]=\"tip\"\r\n [disabled]=\"disabled\">\r\n<div class=\"tags-reel\">\r\n @for (item of selectedTags; track $index) {\r\n <div [class]=\"'selected-tag lc-'+item.color\" ><i [class]=\"item.icon??'ri-hashtag'\"></i>{{item.name}} <i (click)=\"removeTag(item)\" class=\"ri-close-large-line close-icon\"></i> </div>\r\n }\r\n <ui-overlay-card>\r\n <ui-button button type=\"bordered\" color=\"black\" icon=\"ri-add-line\" size=\"s\">{{buttonText | uicTranslate}}</ui-button>\r\n <ng-container content >\r\n\r\n <ui-input internalIcon=\"ri-search-line\" internalIconColor=\"blue\">\r\n <input [placeholder]=\"placeholder | uicTranslate\" [(ngModel)]=\"filterText\" (ngModelChange)=\"filter()\" >\r\n </ui-input>\r\n <div class=\"tags-overflow\">\r\n <div class=\"tags-title\">{{predefinedTitle | uicTranslate}}</div>\r\n @for(item of filterArray; track $index){\r\n <div (click)=\"select(item)\" class=\"tag-option\"> \r\n <i class=\"ri-circle-fill f-grey\"></i> \r\n <div style=\"flex: 1 1;\">{{item.name}}</div> \r\n @if ( isSelected(item.name) ) {\r\n <i class=\"ri-check-line\"></i> \r\n }\r\n </div>\r\n }\r\n <div class=\"new-tag\"> \r\n <div class=\"new-tag-label\">{{newTagTitle | uicTranslate}}:</div>\r\n <div class=\"input-tag\">\r\n <input [(ngModel)]=\"newTagLabel\" (keydown.enter)=\"createTag()\" type=\"text\">\r\n <ui-button (click)=\"createTag()\" size=\"s\" [iconOnly]=\"true\" icon=\"ri-add-line\"></ui-button>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ui-overlay-card>\r\n</div> \r\n</ui-input-wrapper>\r\n", styles: [".tags-reel{display:flex;gap:10px;flex-wrap:wrap}.selected-tag{display:flex;gap:5px;align-items:center;font-size:12px;line-height:28px;padding:0 12px;border:solid 1px var(--grey-200);border-radius:20px}.selected-tag i{font-size:14px}.close-icon{color:var(--red-600);cursor:pointer}.tags-title{font-size:13px;padding:4px;font-weight:600;margin-bottom:5px;color:var(--grey-500)}.tag-option{font-size:14px;padding:5px 10px;border-radius:5px;transition:ease;display:flex;gap:10px;color:var(--grey-600);cursor:pointer}.tag-option:hover{background-color:var(--grey-200)}.tags-overflow{display:flex;flex-direction:column;gap:2px;padding:3px;max-height:250px;overflow:auto}.new-tag{padding:5px;border-top:solid 1px var(--grey-200)}.new-tag-label{font-size:13px;line-height:25px;color:var(--grey-500)}.input-tag{display:flex;gap:5px}.input-tag input{border:solid 1px var(--grey-300);border-radius:8px;padding:0 10px}.f-grey{color:var(--grey-200)}.lc-blue{background-color:var(--blue-100);border-color:var(--blue-600);color:var(--blue-700)}\n"], dependencies: [{ kind: "component", type: UicOverlayCardComponent, selector: "ui-overlay-card" }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputWrapperComponent, selector: "ui-input-wrapper", inputs: ["icon", "iconColor", "label", "error", "tip", "disabled"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
9458
9565
|
}
|
|
9459
9566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UicTagSelectorComponent, decorators: [{
|
|
9460
9567
|
type: Component,
|
|
@@ -9657,6 +9764,7 @@ const FIELDS_CONFIG = [
|
|
|
9657
9764
|
{ value: 'pool', icon: 'ri-bubble-chart-line', detail: 'Seleccion con lista y detalle por item', label: 'Pool de opciones', properties: ['options', 'multyEnabled', 'poolEnabledListView', 'poolTitle'], visibility: { outputType: 'selectedDetailed[]', operators: ['isEmpty', 'isNotEmpty'] } },
|
|
9658
9765
|
{ value: 'file', icon: 'ri-attachment-line', detail: 'Carga de archivos', label: 'Archivo', properties: ['multyEnabled', 'fileTypes', 'iaValidation', 'iaValidationPrompt'], visibility: { outputType: 'UicFileInputValue[]', operators: ['isEmpty', 'isNotEmpty'] } },
|
|
9659
9766
|
{ value: 'searcher', icon: 'ri-seo-line', detail: 'Buscador con fuente de datos externa', label: 'Buscador', properties: ['placeholder', 'optionsSource.key', 'optionsSource.idField', 'optionsSource.textField', 'optionsSource.textTemplate', 'optionsSource.dependsOn', 'optionsSource.paramName'], visibility: { outputType: 'object', operators: ['isEmpty', 'isNotEmpty'] } },
|
|
9767
|
+
{ value: 'multisearcher', icon: 'ri-user-add-line', detail: 'Buscador con selección múltiple y fuente de datos externa', label: 'Buscador múltiple', properties: ['placeholder', 'optionsSource.key', 'optionsSource.idField', 'optionsSource.textField', 'optionsSource.textTemplate', 'optionsSource.dependsOn', 'optionsSource.paramName'], visibility: { outputType: 'object[]', operators: ['isEmpty', 'isNotEmpty'] } },
|
|
9660
9768
|
{ value: 'slider', icon: 'ri-equalizer-2-line', detail: 'Control deslizante continuo', label: 'Deslizador', properties: ['min', 'max', 'sliderInterval', 'sliderMarks'], visibility: { outputType: 'number', operators: ['equals', 'notEquals', 'greaterThan', 'lessThan', 'isEmpty', 'isNotEmpty'] } },
|
|
9661
9769
|
{ value: 'repeater', icon: 'ri-stack-line', detail: 'Grupo de campos repetibles', label: 'Repetidor', properties: ['repeaterMinItems', 'repeaterMaxItems', 'repeaterAddLabel', 'repeaterRemoveLabel', 'repeaterItemTitle'], visibility: { outputType: 'object[]', operators: ['isEmpty', 'isNotEmpty'] } },
|
|
9662
9770
|
{ value: 'computed', icon: 'ri-calculator-line', detail: 'Campo calculado automáticamente desde otros campos', label: 'Campo calculado', properties: ['computedSource.key', 'computedSource.dependsOn', 'minLength', 'maxLength'], visibility: { outputType: 'string', operators: ['equals', 'notEquals', 'includes', 'notIncludes', 'isEmpty', 'isNotEmpty'] } }
|
|
@@ -9806,6 +9914,7 @@ const EXTRA_FORM_FIELDS = [
|
|
|
9806
9914
|
internalIcon: 'ri-database-2-line',
|
|
9807
9915
|
tip: 'form_builder.extra.optionsSourceKey_tip',
|
|
9808
9916
|
type: 'text',
|
|
9917
|
+
selectNullable: true,
|
|
9809
9918
|
selectSearchEnabled: true,
|
|
9810
9919
|
showSubtitle: true
|
|
9811
9920
|
},
|
|
@@ -10277,7 +10386,7 @@ class FieldEditorComponent {
|
|
|
10277
10386
|
});
|
|
10278
10387
|
hasOptionsSourceConfig = computed(() => {
|
|
10279
10388
|
const fieldType = this.fieldType();
|
|
10280
|
-
return !!fieldType && (fieldType.value === 'searcher' || fieldType.properties.includes('options'));
|
|
10389
|
+
return !!fieldType && (fieldType.value === 'searcher' || fieldType.value === 'multisearcher' || fieldType.properties.includes('options'));
|
|
10281
10390
|
});
|
|
10282
10391
|
hasExternalOptionsSource = computed(() => !!this.localField().optionsSource?.key);
|
|
10283
10392
|
isRepeater = computed(() => this.fieldType()?.value === 'repeater');
|
|
@@ -10504,6 +10613,7 @@ class FieldEditorComponent {
|
|
|
10504
10613
|
}
|
|
10505
10614
|
updateFieldValues(fr) {
|
|
10506
10615
|
const current = this.localField();
|
|
10616
|
+
const hadExternalOptionsSource = !!current.optionsSource?.key;
|
|
10507
10617
|
const isAutoName = /^(field|sf)_\d+$/.test(current.name ?? '');
|
|
10508
10618
|
const isNameManuallySet = this.config().nameManuallySet ?? false;
|
|
10509
10619
|
if (fr['name'] !== undefined && fr['name'] !== current.name) {
|
|
@@ -10519,6 +10629,10 @@ class FieldEditorComponent {
|
|
|
10519
10629
|
...fr,
|
|
10520
10630
|
...(derivedName !== undefined ? { name: derivedName } : {})
|
|
10521
10631
|
};
|
|
10632
|
+
const hasExternalOptionsSource = !!updatedField.optionsSource?.key;
|
|
10633
|
+
if (!hadExternalOptionsSource && hasExternalOptionsSource && this.hasOptions()) {
|
|
10634
|
+
updatedField.options = [];
|
|
10635
|
+
}
|
|
10522
10636
|
this.localField.set(updatedField);
|
|
10523
10637
|
this.fieldChange.emit(updatedField);
|
|
10524
10638
|
}
|
|
@@ -11419,8 +11533,9 @@ class UicUserFormbuilderComponent {
|
|
|
11419
11533
|
const { optionsSource: _optionsSource, ...restFieldData } = cleanFieldData;
|
|
11420
11534
|
return this.cleanExternalValidationConfig(restFieldData, externalValidation);
|
|
11421
11535
|
}
|
|
11536
|
+
const { options: _manualOptions, ...fieldDataWithoutManualOptions } = cleanFieldData;
|
|
11422
11537
|
return this.cleanExternalValidationConfig({
|
|
11423
|
-
...
|
|
11538
|
+
...fieldDataWithoutManualOptions,
|
|
11424
11539
|
optionsSource: cleanOptionsSource
|
|
11425
11540
|
}, externalValidation);
|
|
11426
11541
|
}
|
|
@@ -11669,7 +11784,7 @@ class RuleDefinirionComponent {
|
|
|
11669
11784
|
return condition.id === 0 ? (condition.temporalId ?? '') : condition.id;
|
|
11670
11785
|
}
|
|
11671
11786
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RuleDefinirionComponent, deps: [{ token: MODAL_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
11672
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: RuleDefinirionComponent, isStandalone: true, selector: "lib-rule-definirion", ngImport: i0, template: "\n@if (newRule) {\n <ui-form-wrapper #formWrapper \n (formChange)=\"updateFormNewRule($event)\"\n (formSubmit)=\"createAndSelectRule($event)\" \n [initialValues]=\"initialValues\"\n [fields]=\"fields\" \n [cols]=\"2\"></ui-form-wrapper>\n <div class=\"condition-btns\">\n <ui-button icon=\"ri-arrow-left-line\" (click)=\"newRule = false\" color=\"black\" type=\"bordered\">{{ 'rule_builder.definition.cancel_and_back' | uicTranslate }}</ui-button>\n <ui-button (click)=\"formWrapper.submit()\" icon=\"ri-check-line\" color=\"black\">{{ 'rule_builder.definition.create_and_select' | uicTranslate }}</ui-button>\n </div>\n} @else {\n <div class=\"condition-searcher\">\n <ui-input>\n <input [(ngModel)]=\"searchTerm\" (ngModelChange)=\"onSearchTermChange()\" [placeholder]=\"'rule_builder.definition.search_placeholder' | uicTranslate\" type=\"text\">\n </ui-input>\n <ui-button (click)=\"newRule = true\" color=\"black\">{{ 'rule_builder.definition.new_rule' | uicTranslate }}</ui-button>\n </div>\n\n @if (paginatedConditions.length > 0) {\n @for (condition of paginatedConditions; track $index) {\n <div class=\"condition\" [class.condition-selected]=\"isSelected(condition)\">\n <i class=\"ri-align-item-horizontal-center-line\"></i>\n <div style=\"flex: 1 1;\">\n <div class=\"condition-title\"><span [innerHTML]=\"highlightSearch(condition.description)\"></span></div>\n @if (customNamesEnabled) {\n <div class=\"condition-body\">\n <span class=\"condition-field\" [innerHTML]=\"highlightSearch(condition.fieldName)\"></span>\n <span class=\"condition-operator\" [innerHTML]=\"highlightSearch(condition.operatorName)\"></span>\n <span class=\"condition-value\" [innerHTML]=\"highlightSearch(condition.value)\"></span>\n </div>\n }\n </div>\n @if (!isSelected(condition)) {\n <ui-button (click)=\"select(condition)\" color=\"primary\" size=\"s\" type=\"bordered\">{{ 'common.select' | uicTranslate }}</ui-button>\n }\n </div>\n }\n } @else {\n <div class=\"condition\">\n <div class=\"condition-emptytext\">\n {{ 'rule_builder.definition.no_results' | uicTranslate }}\n </div>\n </div>\n }\n\n <div class=\"condition-pagination\">\n <ui-button [disabled]=\"!canGoToPreviousPage\" (click)=\"goToPreviousPage()\" color=\"black\" size=\"s\" type=\"bordered\">{{ 'rule_builder.definition.previous' | uicTranslate }}</ui-button>\n <div><b>{{ currentPage }}</b> / {{ totalPages }}</div>\n <ui-button [disabled]=\"!canGoToNextPage\" (click)=\"goToNextPage()\" color=\"black\" size=\"s\" type=\"bordered\">{{ 'rule_builder.definition.next' | uicTranslate }}</ui-button>\n </div>\n}\n", styles: [".condition{border:solid 1px var(--grey-300);border-radius:10px;background-color:var(--grey-50);padding:6px;margin-bottom:4px;display:flex;align-items:center;gap:10px}.condition-emptytext{font-size:12px;text-align:center;color:var(--grey-400);padding:10px;width:100%}.condition i{color:var(--blue-600)}.condition-selected{border-color:var(--blue-500);background:linear-gradient(135deg,var(--blue-50) 0%,#eef6ff 100%);box-shadow:inset 0 0 0 1px #2563eb1f}.condition-selected .condition-title{color:var(--blue-800)}.condition-selected .condition-body,.condition-selected i{color:var(--blue-700)}.condition-title{font-size:14px;font-weight:500;line-height:16px}.condition-body{color:var(--grey-500);display:flex;gap:5px;font-size:12px}.condition-searcher{display:flex;gap:25px;margin-bottom:10px}.condition-pagination{margin-top:15px;display:flex;font-size:14px;align-items:center;justify-content:space-between}.condition-btns{padding-top:10px;border-top:solid 1px var(--grey-200);display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UicFormWrapperComponent, selector: "ui-form-wrapper", inputs: ["schema", "fields", "cols", "externalData", "selectOptionsResolver", "computedFieldResolver", "externalValidatorResolver", "loading", "disabled", "showButtons", "fillSelects", "initialValues", "focusFieldName", "focusFieldTrigger", "fileUidResolverFn"], outputs: ["formSubmit", "formChange", "optionsSourceError"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"]
|
|
11787
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: RuleDefinirionComponent, isStandalone: true, selector: "lib-rule-definirion", ngImport: i0, template: "\n@if (newRule) {\n <ui-form-wrapper #formWrapper \n (formChange)=\"updateFormNewRule($event)\"\n (formSubmit)=\"createAndSelectRule($event)\" \n [initialValues]=\"initialValues\"\n [fields]=\"fields\" \n [cols]=\"2\"></ui-form-wrapper>\n <div class=\"condition-btns\">\n <ui-button icon=\"ri-arrow-left-line\" (click)=\"newRule = false\" color=\"black\" type=\"bordered\">{{ 'rule_builder.definition.cancel_and_back' | uicTranslate }}</ui-button>\n <ui-button (click)=\"formWrapper.submit()\" icon=\"ri-check-line\" color=\"black\">{{ 'rule_builder.definition.create_and_select' | uicTranslate }}</ui-button>\n </div>\n} @else {\n <div class=\"condition-searcher\">\n <ui-input>\n <input [(ngModel)]=\"searchTerm\" (ngModelChange)=\"onSearchTermChange()\" [placeholder]=\"'rule_builder.definition.search_placeholder' | uicTranslate\" type=\"text\">\n </ui-input>\n <ui-button (click)=\"newRule = true\" color=\"black\">{{ 'rule_builder.definition.new_rule' | uicTranslate }}</ui-button>\n </div>\n\n @if (paginatedConditions.length > 0) {\n @for (condition of paginatedConditions; track $index) {\n <div class=\"condition\" [class.condition-selected]=\"isSelected(condition)\">\n <i class=\"ri-align-item-horizontal-center-line\"></i>\n <div style=\"flex: 1 1;\">\n <div class=\"condition-title\"><span [innerHTML]=\"highlightSearch(condition.description)\"></span></div>\n @if (customNamesEnabled) {\n <div class=\"condition-body\">\n <span class=\"condition-field\" [innerHTML]=\"highlightSearch(condition.fieldName)\"></span>\n <span class=\"condition-operator\" [innerHTML]=\"highlightSearch(condition.operatorName)\"></span>\n <span class=\"condition-value\" [innerHTML]=\"highlightSearch(condition.value)\"></span>\n </div>\n }\n </div>\n @if (!isSelected(condition)) {\n <ui-button (click)=\"select(condition)\" color=\"primary\" size=\"s\" type=\"bordered\">{{ 'common.select' | uicTranslate }}</ui-button>\n }\n </div>\n }\n } @else {\n <div class=\"condition\">\n <div class=\"condition-emptytext\">\n {{ 'rule_builder.definition.no_results' | uicTranslate }}\n </div>\n </div>\n }\n\n <div class=\"condition-pagination\">\n <ui-button [disabled]=\"!canGoToPreviousPage\" (click)=\"goToPreviousPage()\" color=\"black\" size=\"s\" type=\"bordered\">{{ 'rule_builder.definition.previous' | uicTranslate }}</ui-button>\n <div><b>{{ currentPage }}</b> / {{ totalPages }}</div>\n <ui-button [disabled]=\"!canGoToNextPage\" (click)=\"goToNextPage()\" color=\"black\" size=\"s\" type=\"bordered\">{{ 'rule_builder.definition.next' | uicTranslate }}</ui-button>\n </div>\n}\n", styles: [".condition{border:solid 1px var(--grey-300);border-radius:10px;background-color:var(--grey-50);padding:6px;margin-bottom:4px;display:flex;align-items:center;gap:10px}.condition-emptytext{font-size:12px;text-align:center;color:var(--grey-400);padding:10px;width:100%}.condition i{color:var(--blue-600)}.condition-selected{border-color:var(--blue-500);background:linear-gradient(135deg,var(--blue-50) 0%,#eef6ff 100%);box-shadow:inset 0 0 0 1px #2563eb1f}.condition-selected .condition-title{color:var(--blue-800)}.condition-selected .condition-body,.condition-selected i{color:var(--blue-700)}.condition-title{font-size:14px;font-weight:500;line-height:16px}.condition-body{color:var(--grey-500);display:flex;gap:5px;font-size:12px}.condition-searcher{display:flex;gap:25px;margin-bottom:10px}.condition-pagination{margin-top:15px;display:flex;font-size:14px;align-items:center;justify-content:space-between}.condition-btns{padding-top:10px;border-top:solid 1px var(--grey-200);display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UicFormWrapperComponent, selector: "ui-form-wrapper", inputs: ["schema", "fields", "cols", "externalData", "selectOptionsResolver", "computedFieldResolver", "externalValidatorResolver", "loading", "disabled", "showButtons", "fillSelects", "initialValues", "focusFieldName", "focusFieldTrigger", "fileUidResolverFn"], outputs: ["formSubmit", "formChange", "optionsSourceError"] }, { kind: "component", type: UicInputComponent, selector: "ui-input", inputs: ["icon", "iconColor", "internalIcon", "internalIconColor", "size", "label", "error", "tip", "disabled", "loading"] }, { kind: "component", type: UicButtonComponent, selector: "ui-button", inputs: ["text", "icon", "rightIcon", "iconOnly", "disabled", "loading", "size", "type", "color"] }, { kind: "pipe", type: UicTranslatePipe, name: "uicTranslate" }] });
|
|
11673
11788
|
}
|
|
11674
11789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: RuleDefinirionComponent, decorators: [{
|
|
11675
11790
|
type: Component,
|