valtech-components 2.0.135 → 2.0.137
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/esm2022/lib/components/molecules/select-search/select-search.component.mjs +240 -0
- package/esm2022/lib/components/organisms/form/form.component.mjs +6 -6
- package/esm2022/lib/services/icons.service.mjs +4 -2
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/valtech-components.mjs +171 -161
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/select-search/select-search.component.d.ts +35 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/components/molecules/search-selector-input/search-selector-input.component.mjs +0 -231
- package/lib/components/molecules/search-selector-input/search-selector-input.component.d.ts +0 -45
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, Input, Output, Injectable, ViewChild, inject, InjectionToken, Inject } from '@angular/core';
|
|
3
|
-
import { IonAvatar, IonCard, IonIcon, IonButton, IonSpinner, IonText, IonProgressBar, IonCardContent, IonCardHeader, IonCardTitle, IonCardSubtitle, IonCheckbox, IonButtons, IonTextarea, IonDatetime, IonDatetimeButton, IonModal, IonInput, IonRadioGroup, IonRadio, IonSearchbar,
|
|
3
|
+
import { IonAvatar, IonCard, IonIcon, IonButton, IonSpinner, IonText, IonProgressBar, IonCardContent, IonCardHeader, IonCardTitle, IonCardSubtitle, IonCheckbox, IonButtons, IonTextarea, IonDatetime, IonDatetimeButton, IonModal, IonInput, IonRadioGroup, IonRadio, IonSearchbar, IonSelect, IonSelectOption, IonToolbar, IonTitle, IonFooter, IonHeader, IonList, IonListHeader, IonLabel, IonNote, IonItem, IonContent } from '@ionic/angular/standalone';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule, NgStyle, NgIf, NgFor, NgClass } from '@angular/common';
|
|
6
6
|
import { addIcons } from 'ionicons';
|
|
7
|
-
import { addOutline, addCircleOutline, alertOutline, alertCircleOutline, arrowBackOutline, arrowForwardOutline, arrowDownOutline, checkmarkCircleOutline, ellipsisHorizontalOutline, notificationsOutline, openOutline, closeOutline, chatbubblesOutline, shareOutline, heart, heartOutline, homeOutline, eyeOffOutline, eyeOutline, scanOutline, chevronForwardOutline, chevronBackOutline } from 'ionicons/icons';
|
|
7
|
+
import { addOutline, addCircleOutline, alertOutline, alertCircleOutline, arrowBackOutline, arrowForwardOutline, arrowDownOutline, checkmarkCircleOutline, ellipsisHorizontalOutline, notificationsOutline, openOutline, closeOutline, chatbubblesOutline, shareOutline, heart, heartOutline, homeOutline, eyeOffOutline, eyeOutline, scanOutline, chevronDownOutline, checkmarkOutline, chevronForwardOutline, chevronBackOutline } from 'ionicons/icons';
|
|
8
8
|
import * as i1$1 from '@angular/forms';
|
|
9
9
|
import { ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
10
10
|
import { Router, RouterLink } from '@angular/router';
|
|
11
11
|
import { Browser } from '@capacitor/browser';
|
|
12
12
|
import * as i1$2 from 'ng-otp-input';
|
|
13
13
|
import { NgOtpInputComponent, NgOtpInputModule } from 'ng-otp-input';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i2 from '@ionic/angular';
|
|
15
|
+
import { IonicModule } from '@ionic/angular';
|
|
15
16
|
import { BehaviorSubject } from 'rxjs';
|
|
16
17
|
|
|
17
18
|
class AvatarComponent {
|
|
@@ -66,6 +67,8 @@ class IconService {
|
|
|
66
67
|
eyeOffOutline,
|
|
67
68
|
eyeOutline,
|
|
68
69
|
scanOutline,
|
|
70
|
+
chevronDownOutline,
|
|
71
|
+
checkmarkOutline,
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -2121,55 +2124,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2121
2124
|
type: Output
|
|
2122
2125
|
}] } });
|
|
2123
2126
|
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
title: 'No se encontraron resultados',
|
|
2127
|
-
subtitle: 'Intenta con otras palabras.',
|
|
2128
|
-
};
|
|
2129
|
-
const SEARCH_SELECTOR_NO_OPTIONS = {
|
|
2130
|
-
title: 'No hay opciones',
|
|
2131
|
-
subtitle: 'El campo seleccionado no tiene opciones. Intenta nuevamente más tarde.',
|
|
2132
|
-
};
|
|
2133
|
-
class SelectorModalComponent {
|
|
2127
|
+
// modal-select.component.ts
|
|
2128
|
+
class SelectSearchComponent {
|
|
2134
2129
|
constructor() {
|
|
2135
|
-
this.
|
|
2136
|
-
this.
|
|
2137
|
-
this.
|
|
2138
|
-
this.
|
|
2139
|
-
this.
|
|
2140
|
-
this.
|
|
2141
|
-
this.
|
|
2142
|
-
this.
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
this.selectedOption = '';
|
|
2130
|
+
this.label = 'Seleccionar';
|
|
2131
|
+
this.labelProperty = 'name';
|
|
2132
|
+
this.valueProperty = 'id';
|
|
2133
|
+
this.multiple = false;
|
|
2134
|
+
this.placeholder = 'Seleccione una opción';
|
|
2135
|
+
this.selectionChange = new EventEmitter();
|
|
2136
|
+
this.icon = inject(IconService);
|
|
2137
|
+
this.items = [];
|
|
2138
|
+
this.searchTerm = '';
|
|
2139
|
+
this.filteredItems = [];
|
|
2140
|
+
this.selectedItems = [];
|
|
2141
|
+
this.displayValue = '';
|
|
2148
2142
|
}
|
|
2149
2143
|
ngOnInit() {
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
console.log(this.props.control);
|
|
2157
|
-
if (this.props.control.invalid) {
|
|
2158
|
-
return;
|
|
2144
|
+
if (this.props?.options) {
|
|
2145
|
+
this.items = [...this.props.options];
|
|
2146
|
+
this.filteredItems = [...this.items];
|
|
2147
|
+
}
|
|
2148
|
+
else {
|
|
2149
|
+
this.filteredItems = [...this.items];
|
|
2159
2150
|
}
|
|
2160
|
-
this.
|
|
2151
|
+
this.updateDisplayValue();
|
|
2161
2152
|
}
|
|
2162
2153
|
onFilter(event) {
|
|
2163
|
-
console.log('
|
|
2154
|
+
console.log('onFilter: ', event);
|
|
2164
2155
|
if (!event) {
|
|
2165
|
-
this.
|
|
2156
|
+
this.filteredItems = [...this.items];
|
|
2166
2157
|
return;
|
|
2167
2158
|
}
|
|
2168
|
-
if (this.
|
|
2159
|
+
if (this.items.length === 0) {
|
|
2169
2160
|
return;
|
|
2170
2161
|
}
|
|
2171
2162
|
const text = replaceSpecialChars(event.toLowerCase());
|
|
2172
|
-
const filter = this.
|
|
2163
|
+
const filter = this.items.filter(element => {
|
|
2173
2164
|
const values = Object.values(element).map((a) => replaceSpecialChars(`${a}`).toLocaleLowerCase());
|
|
2174
2165
|
if (values.some((value) => value.indexOf(text) > -1)) {
|
|
2175
2166
|
return true;
|
|
@@ -2177,170 +2168,189 @@ class SelectorModalComponent {
|
|
|
2177
2168
|
return false;
|
|
2178
2169
|
});
|
|
2179
2170
|
console.log('filter: ', filter);
|
|
2180
|
-
this.
|
|
2181
|
-
}
|
|
2182
|
-
onBlur() {
|
|
2183
|
-
this.searching = false;
|
|
2171
|
+
this.filteredItems = filter;
|
|
2184
2172
|
}
|
|
2185
2173
|
onFocus() {
|
|
2186
|
-
|
|
2174
|
+
console.log('onFocus: ');
|
|
2187
2175
|
}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
return '';
|
|
2191
|
-
}
|
|
2192
|
-
const option = this.props.options.find(x => x.id === this.props.control.value);
|
|
2193
|
-
if (option) {
|
|
2194
|
-
return option.name;
|
|
2195
|
-
}
|
|
2196
|
-
return '';
|
|
2176
|
+
onBlur() {
|
|
2177
|
+
console.log('onBlur: ');
|
|
2197
2178
|
}
|
|
2198
|
-
|
|
2199
|
-
this.
|
|
2179
|
+
openModal() {
|
|
2180
|
+
if (this.modal) {
|
|
2181
|
+
this.modal.present();
|
|
2182
|
+
}
|
|
2200
2183
|
}
|
|
2201
2184
|
preventDefaultBehavior(event) {
|
|
2202
2185
|
event.preventDefault(); // Evita el comportamiento predeterminado del selector
|
|
2203
2186
|
event.stopPropagation(); // Detiene la propagación del evento
|
|
2204
|
-
this.
|
|
2187
|
+
this.openModal();
|
|
2205
2188
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2189
|
+
cancelModal() {
|
|
2190
|
+
if (this.modal) {
|
|
2191
|
+
this.modal.dismiss();
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
selectItem(item) {
|
|
2195
|
+
if (this.multiple) {
|
|
2196
|
+
const index = this.selectedItems.findIndex(selectedItem => selectedItem[this.valueProperty] === item[this.valueProperty]);
|
|
2197
|
+
if (index === -1) {
|
|
2198
|
+
this.selectedItems.push(item);
|
|
2199
|
+
}
|
|
2200
|
+
else {
|
|
2201
|
+
this.selectedItems.splice(index, 1);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
else {
|
|
2205
|
+
this.selectedItems = [item];
|
|
2206
|
+
this.cancelModal();
|
|
2207
|
+
}
|
|
2208
|
+
this.updateDisplayValue();
|
|
2209
|
+
this.emitSelectionChange();
|
|
2210
|
+
}
|
|
2211
|
+
isItemSelected(item) {
|
|
2212
|
+
return this.selectedItems.some(selectedItem => selectedItem[this.valueProperty] === item[this.valueProperty]);
|
|
2213
|
+
}
|
|
2214
|
+
updateDisplayValue() {
|
|
2215
|
+
if (this.selectedItems.length === 0) {
|
|
2216
|
+
this.displayValue = '';
|
|
2217
|
+
return;
|
|
2218
|
+
}
|
|
2219
|
+
if (this.multiple) {
|
|
2220
|
+
if (this.selectedItems.length === 1) {
|
|
2221
|
+
this.displayValue = this.selectedItems[0][this.labelProperty];
|
|
2222
|
+
}
|
|
2223
|
+
else {
|
|
2224
|
+
this.displayValue = `${this.selectedItems.length} elementos seleccionados`;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
else {
|
|
2228
|
+
this.displayValue = this.selectedItems[0][this.labelProperty];
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
emitSelectionChange() {
|
|
2232
|
+
if (this.multiple) {
|
|
2233
|
+
const selectedValues = this.selectedItems.map(item => item[this.valueProperty]);
|
|
2234
|
+
this.selectionChange.emit(selectedValues);
|
|
2235
|
+
}
|
|
2236
|
+
else {
|
|
2237
|
+
const selectedValue = this.selectedItems.length > 0 ? this.selectedItems[0][this.valueProperty] : null;
|
|
2238
|
+
this.selectionChange.emit(selectedValue);
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
// Método para establecer el valor desde el componente padre
|
|
2242
|
+
setValue(value) {
|
|
2243
|
+
if (this.multiple && Array.isArray(value)) {
|
|
2244
|
+
this.selectedItems = this.items.filter(item => value.includes(item[this.valueProperty]));
|
|
2245
|
+
}
|
|
2246
|
+
else if (!this.multiple && value !== null && value !== undefined) {
|
|
2247
|
+
const selectedItem = this.items.find(item => item[this.valueProperty] === value);
|
|
2248
|
+
if (selectedItem) {
|
|
2249
|
+
this.selectedItems = [selectedItem];
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
else {
|
|
2253
|
+
this.selectedItems = [];
|
|
2254
|
+
}
|
|
2255
|
+
this.updateDisplayValue();
|
|
2256
|
+
}
|
|
2257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2258
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SelectSearchComponent, isStandalone: true, selector: "val-select-search", inputs: { label: "label", labelProperty: "labelProperty", valueProperty: "valueProperty", multiple: "multiple", placeholder: "placeholder", props: "props" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: `
|
|
2220
2259
|
<ion-input
|
|
2221
2260
|
type="text"
|
|
2222
|
-
[value]="
|
|
2223
|
-
[placeholder]="props
|
|
2261
|
+
[value]="displayValue"
|
|
2262
|
+
[placeholder]="props?.placeholder || placeholder"
|
|
2224
2263
|
readonly
|
|
2225
2264
|
(mousedown)="preventDefaultBehavior($event)"
|
|
2226
2265
|
/>
|
|
2227
2266
|
|
|
2228
2267
|
<ion-input [formControl]="props.control" type="hidden"></ion-input>
|
|
2229
2268
|
|
|
2230
|
-
<ion-modal #modal [
|
|
2269
|
+
<ion-modal #modal trigger="open-modal" [initialBreakpoint]="0.75" [breakpoints]="[0, 0.5, 0.75, 1]">
|
|
2231
2270
|
<ng-template>
|
|
2232
2271
|
<ion-header>
|
|
2233
2272
|
<ion-toolbar>
|
|
2234
|
-
<ion-title>
|
|
2273
|
+
<ion-title>{{ label }}</ion-title>
|
|
2235
2274
|
<ion-buttons slot="end">
|
|
2236
|
-
<ion-button (click)="
|
|
2275
|
+
<ion-button (click)="cancelModal()">Cancelar</ion-button>
|
|
2237
2276
|
</ion-buttons>
|
|
2238
2277
|
</ion-toolbar>
|
|
2278
|
+
<ion-toolbar>
|
|
2279
|
+
<val-searchbar (filterEvent)="onFilter($event)" (focusEvent)="onFocus()" (blurEvent)="onBlur()" />
|
|
2280
|
+
</ion-toolbar>
|
|
2239
2281
|
</ion-header>
|
|
2240
|
-
|
|
2241
2282
|
<ion-content>
|
|
2242
|
-
<
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
</ion-list>
|
|
2252
|
-
</div>
|
|
2283
|
+
<ion-list>
|
|
2284
|
+
<ion-item *ngFor="let item of filteredItems" button (click)="selectItem(item)">
|
|
2285
|
+
<ion-label>{{ item[labelProperty] }}</ion-label>
|
|
2286
|
+
<ion-icon *ngIf="isItemSelected(item)" name="checkmark-outline" slot="end" color="primary"></ion-icon>
|
|
2287
|
+
</ion-item>
|
|
2288
|
+
<ion-item *ngIf="filteredItems.length === 0">
|
|
2289
|
+
<ion-label color="medium">No se encontraron resultados</ion-label>
|
|
2290
|
+
</ion-item>
|
|
2291
|
+
</ion-list>
|
|
2253
2292
|
</ion-content>
|
|
2254
|
-
<ion-footer style="display: flex;justify-content: space-around;padding: 8px 0px;">
|
|
2255
|
-
<ion-button color="dark" shape="round" fill="outline" (click)="dismiss()"> Cancelar </ion-button>
|
|
2256
|
-
<ion-button color="primary" shape="round" (click)="applyChanges()"> Confirmar </ion-button>
|
|
2257
|
-
</ion-footer>
|
|
2258
2293
|
</ng-template>
|
|
2259
2294
|
</ion-modal>
|
|
2260
|
-
`, isInline: true, styles: ["
|
|
2295
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IonicModule }, { kind: "component", type: i2.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i2.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2.IonInput, selector: "ion-input", inputs: ["autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "spellcheck", "step", "type", "value"] }, { kind: "component", type: i2.IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: i2.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i2.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i2.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: i2.IonModal, selector: "ion-modal" }, { kind: "directive", type: i2.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: SearchbarComponent, selector: "val-searchbar", inputs: ["disabled"], outputs: ["focusEvent", "blurEvent", "filterEvent"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
2261
2296
|
}
|
|
2262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
|
2297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectSearchComponent, decorators: [{
|
|
2263
2298
|
type: Component,
|
|
2264
|
-
args: [{ selector: 'val-search
|
|
2265
|
-
CommonModule,
|
|
2266
|
-
FormsModule,
|
|
2267
|
-
ReactiveFormsModule,
|
|
2268
|
-
IonHeader,
|
|
2269
|
-
IonToolbar,
|
|
2270
|
-
IonTitle,
|
|
2271
|
-
IonButtons,
|
|
2272
|
-
IonButton,
|
|
2273
|
-
IonFooter,
|
|
2274
|
-
IonList,
|
|
2275
|
-
IonContent,
|
|
2276
|
-
IonItem,
|
|
2277
|
-
IonLabel,
|
|
2278
|
-
IonRadio,
|
|
2279
|
-
SearchbarComponent,
|
|
2280
|
-
IonModal,
|
|
2281
|
-
IonInput,
|
|
2282
|
-
IonSelect,
|
|
2283
|
-
IonRadioGroup,
|
|
2284
|
-
], template: `
|
|
2285
|
-
<!-- <ion-select
|
|
2286
|
-
id="select-search-option-action"
|
|
2287
|
-
[formControl]="props.control"
|
|
2288
|
-
[label]="props.label"
|
|
2289
|
-
[interfaceOptions]="customModalOptions"
|
|
2290
|
-
interface="popover"
|
|
2291
|
-
[placeholder]="[props.placeholder]"
|
|
2292
|
-
cancelText="Cancelar"
|
|
2293
|
-
okText="Ok"
|
|
2294
|
-
(mousedown)="preventDefaultBehavior($event)"
|
|
2295
|
-
>
|
|
2296
|
-
</ion-select> -->
|
|
2299
|
+
args: [{ selector: 'val-select-search', standalone: true, imports: [CommonModule, IonicModule, FormsModule, SearchbarComponent, ReactiveFormsModule], template: `
|
|
2297
2300
|
<ion-input
|
|
2298
2301
|
type="text"
|
|
2299
|
-
[value]="
|
|
2300
|
-
[placeholder]="props
|
|
2302
|
+
[value]="displayValue"
|
|
2303
|
+
[placeholder]="props?.placeholder || placeholder"
|
|
2301
2304
|
readonly
|
|
2302
2305
|
(mousedown)="preventDefaultBehavior($event)"
|
|
2303
2306
|
/>
|
|
2304
2307
|
|
|
2305
2308
|
<ion-input [formControl]="props.control" type="hidden"></ion-input>
|
|
2306
2309
|
|
|
2307
|
-
<ion-modal #modal [
|
|
2310
|
+
<ion-modal #modal trigger="open-modal" [initialBreakpoint]="0.75" [breakpoints]="[0, 0.5, 0.75, 1]">
|
|
2308
2311
|
<ng-template>
|
|
2309
2312
|
<ion-header>
|
|
2310
2313
|
<ion-toolbar>
|
|
2311
|
-
<ion-title>
|
|
2314
|
+
<ion-title>{{ label }}</ion-title>
|
|
2312
2315
|
<ion-buttons slot="end">
|
|
2313
|
-
<ion-button (click)="
|
|
2316
|
+
<ion-button (click)="cancelModal()">Cancelar</ion-button>
|
|
2314
2317
|
</ion-buttons>
|
|
2315
2318
|
</ion-toolbar>
|
|
2319
|
+
<ion-toolbar>
|
|
2320
|
+
<val-searchbar (filterEvent)="onFilter($event)" (focusEvent)="onFocus()" (blurEvent)="onBlur()" />
|
|
2321
|
+
</ion-toolbar>
|
|
2316
2322
|
</ion-header>
|
|
2317
|
-
|
|
2318
2323
|
<ion-content>
|
|
2319
|
-
<
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
</ion-list>
|
|
2329
|
-
</div>
|
|
2324
|
+
<ion-list>
|
|
2325
|
+
<ion-item *ngFor="let item of filteredItems" button (click)="selectItem(item)">
|
|
2326
|
+
<ion-label>{{ item[labelProperty] }}</ion-label>
|
|
2327
|
+
<ion-icon *ngIf="isItemSelected(item)" name="checkmark-outline" slot="end" color="primary"></ion-icon>
|
|
2328
|
+
</ion-item>
|
|
2329
|
+
<ion-item *ngIf="filteredItems.length === 0">
|
|
2330
|
+
<ion-label color="medium">No se encontraron resultados</ion-label>
|
|
2331
|
+
</ion-item>
|
|
2332
|
+
</ion-list>
|
|
2330
2333
|
</ion-content>
|
|
2331
|
-
<ion-footer style="display: flex;justify-content: space-around;padding: 8px 0px;">
|
|
2332
|
-
<ion-button color="dark" shape="round" fill="outline" (click)="dismiss()"> Cancelar </ion-button>
|
|
2333
|
-
<ion-button color="primary" shape="round" (click)="applyChanges()"> Confirmar </ion-button>
|
|
2334
|
-
</ion-footer>
|
|
2335
2334
|
</ng-template>
|
|
2336
2335
|
</ion-modal>
|
|
2337
|
-
|
|
2338
|
-
}],
|
|
2336
|
+
` }]
|
|
2337
|
+
}], propDecorators: { modal: [{
|
|
2338
|
+
type: ViewChild,
|
|
2339
|
+
args: ['modal']
|
|
2340
|
+
}], label: [{
|
|
2339
2341
|
type: Input
|
|
2340
|
-
}],
|
|
2342
|
+
}], labelProperty: [{
|
|
2341
2343
|
type: Input
|
|
2342
|
-
}],
|
|
2344
|
+
}], valueProperty: [{
|
|
2343
2345
|
type: Input
|
|
2346
|
+
}], multiple: [{
|
|
2347
|
+
type: Input
|
|
2348
|
+
}], placeholder: [{
|
|
2349
|
+
type: Input
|
|
2350
|
+
}], props: [{
|
|
2351
|
+
type: Input
|
|
2352
|
+
}], selectionChange: [{
|
|
2353
|
+
type: Output
|
|
2344
2354
|
}] } });
|
|
2345
2355
|
|
|
2346
2356
|
class SearchSelectorComponent {
|
|
@@ -2518,7 +2528,7 @@ class ToolbarComponent {
|
|
|
2518
2528
|
clickHandler(token) {
|
|
2519
2529
|
this.onClick.emit(token);
|
|
2520
2530
|
}
|
|
2521
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token:
|
|
2531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i2.NavController }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2522
2532
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ToolbarComponent, isStandalone: true, selector: "val-toolbar", inputs: { props: "props" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
|
|
2523
2533
|
<ion-toolbar [color]="props.color" [class.background]="props.color === 'background'">
|
|
2524
2534
|
<ng-container *ngIf="props.withBack">
|
|
@@ -2646,7 +2656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2646
2656
|
<ng-content select="[toolbar-bottom]"></ng-content>
|
|
2647
2657
|
</ion-toolbar>
|
|
2648
2658
|
`, styles: ["ion-button{font-family:var(--ion-default-font),Arial,sans-serif}.left-buttons{margin-left:-1rem}.background{background:var(--ion-background-color)}\n"] }]
|
|
2649
|
-
}], ctorParameters: () => [{ type:
|
|
2659
|
+
}], ctorParameters: () => [{ type: i2.NavController }, { type: IconService }], propDecorators: { props: [{
|
|
2650
2660
|
type: Input
|
|
2651
2661
|
}], onClick: [{
|
|
2652
2662
|
type: Output
|
|
@@ -2943,7 +2953,7 @@ class FormComponent {
|
|
|
2943
2953
|
<val-select-input [props]="getFieldProp(f)"></val-select-input>
|
|
2944
2954
|
</ng-container>
|
|
2945
2955
|
<ng-container *ngIf="f.type === types.SEARCH_SELECT">
|
|
2946
|
-
<val-search
|
|
2956
|
+
<val-select-search [props]="getFieldProp(f)"></val-select-search>
|
|
2947
2957
|
</ng-container>
|
|
2948
2958
|
<val-hint [props]="getFieldProp(f)"></val-hint>
|
|
2949
2959
|
</div>
|
|
@@ -2956,7 +2966,7 @@ class FormComponent {
|
|
|
2956
2966
|
></val-button-group>
|
|
2957
2967
|
</form>
|
|
2958
2968
|
</div>
|
|
2959
|
-
`, isInline: true, styles: [".section{margin-top:1rem}.input{margin:.5rem 0}@media (min-width: 768px){.input{margin:.75rem 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["props"] }, { kind: "component", type: CheckInputComponent, selector: "val-check-input" }, { kind: "component", type: ButtonGroupComponent, selector: "val-button-group", inputs: ["props"], outputs: ["onClick"] }, { kind: "component", type: DividerComponent, selector: "val-divider", inputs: ["props"] }, { kind: "component", type: HintComponent, selector: "val-hint", inputs: ["props"] }, { kind: "component", type: CommentInputComponent, selector: "val-comment-input", inputs: ["props"] }, { kind: "component", type: DateInputComponent, selector: "val-date-input", inputs: ["props"] }, { kind: "component", type: FileInputComponent, selector: "val-file-input", inputs: ["props"] }, { kind: "component", type: HourInputComponent, selector: "val-hour-input", inputs: ["props"] }, { kind: "component", type: EmailInputComponent, selector: "val-email-input", inputs: ["props"] }, { kind: "component", type: NumberInputComponent, selector: "val-number-input", inputs: ["props"] }, { kind: "component", type: RadioInputComponent, selector: "val-radio-input", inputs: ["props"] }, { kind: "component", type: PasswordInputComponent, selector: "val-password-input", inputs: ["props"] }, { kind: "component", type: PinInputComponent, selector: "val-pin-input", inputs: ["props"] }, { kind: "component", type:
|
|
2969
|
+
`, isInline: true, styles: [".section{margin-top:1rem}.input{margin:.5rem 0}@media (min-width: 768px){.input{margin:.75rem 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["props"] }, { kind: "component", type: CheckInputComponent, selector: "val-check-input" }, { kind: "component", type: ButtonGroupComponent, selector: "val-button-group", inputs: ["props"], outputs: ["onClick"] }, { kind: "component", type: DividerComponent, selector: "val-divider", inputs: ["props"] }, { kind: "component", type: HintComponent, selector: "val-hint", inputs: ["props"] }, { kind: "component", type: CommentInputComponent, selector: "val-comment-input", inputs: ["props"] }, { kind: "component", type: DateInputComponent, selector: "val-date-input", inputs: ["props"] }, { kind: "component", type: FileInputComponent, selector: "val-file-input", inputs: ["props"] }, { kind: "component", type: HourInputComponent, selector: "val-hour-input", inputs: ["props"] }, { kind: "component", type: EmailInputComponent, selector: "val-email-input", inputs: ["props"] }, { kind: "component", type: NumberInputComponent, selector: "val-number-input", inputs: ["props"] }, { kind: "component", type: RadioInputComponent, selector: "val-radio-input", inputs: ["props"] }, { kind: "component", type: PasswordInputComponent, selector: "val-password-input", inputs: ["props"] }, { kind: "component", type: PinInputComponent, selector: "val-pin-input", inputs: ["props"] }, { kind: "component", type: SelectSearchComponent, selector: "val-select-search", inputs: ["label", "labelProperty", "valueProperty", "multiple", "placeholder", "props"], outputs: ["selectionChange"] }, { kind: "component", type: SearchSelectorComponent, selector: "val-select-input", inputs: ["props"] }] }); }
|
|
2960
2970
|
}
|
|
2961
2971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormComponent, decorators: [{
|
|
2962
2972
|
type: Component,
|
|
@@ -2979,8 +2989,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2979
2989
|
RadioInputComponent,
|
|
2980
2990
|
PasswordInputComponent,
|
|
2981
2991
|
PinInputComponent,
|
|
2992
|
+
SelectSearchComponent,
|
|
2982
2993
|
SearchSelectorComponent,
|
|
2983
|
-
SelectorModalComponent,
|
|
2984
2994
|
], template: `
|
|
2985
2995
|
<div class="container">
|
|
2986
2996
|
<form [formGroup]="form">
|
|
@@ -3033,7 +3043,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3033
3043
|
<val-select-input [props]="getFieldProp(f)"></val-select-input>
|
|
3034
3044
|
</ng-container>
|
|
3035
3045
|
<ng-container *ngIf="f.type === types.SEARCH_SELECT">
|
|
3036
|
-
<val-search
|
|
3046
|
+
<val-select-search [props]="getFieldProp(f)"></val-select-search>
|
|
3037
3047
|
</ng-container>
|
|
3038
3048
|
<val-hint [props]="getFieldProp(f)"></val-hint>
|
|
3039
3049
|
</div>
|
|
@@ -4014,7 +4024,7 @@ class ToastService {
|
|
|
4014
4024
|
console.error(JSON.stringify(error));
|
|
4015
4025
|
});
|
|
4016
4026
|
}
|
|
4017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToastService, deps: [{ token:
|
|
4027
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToastService, deps: [{ token: i2.ToastController }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4018
4028
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToastService, providedIn: 'root' }); }
|
|
4019
4029
|
}
|
|
4020
4030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToastService, decorators: [{
|
|
@@ -4022,7 +4032,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4022
4032
|
args: [{
|
|
4023
4033
|
providedIn: 'root',
|
|
4024
4034
|
}]
|
|
4025
|
-
}], ctorParameters: () => [{ type:
|
|
4035
|
+
}], ctorParameters: () => [{ type: i2.ToastController }] });
|
|
4026
4036
|
|
|
4027
4037
|
/*
|
|
4028
4038
|
* Public API Surface of valtech-components
|
|
@@ -4035,5 +4045,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4035
4045
|
* Generated bundle index. Do not edit.
|
|
4036
4046
|
*/
|
|
4037
4047
|
|
|
4038
|
-
export { ActionType, AlertBoxComponent, AvatarComponent, BannerComponent, BaseDefault, BoxComponent, ButtonComponent, ButtonGroupComponent, CardComponent, CardSection, CardType, CheckInputComponent, ClearDefault, ClearDefaultBlock, ClearDefaultFull, ClearDefaultRound, ClearDefaultRoundBlock, ClearDefaultRoundFull, CommentInputComponent, ComponentStates, ContentLoaderComponent, DateInputComponent, DisplayComponent, DividerComponent, DownloadService, EmailInputComponent, ExpandableTextComponent, FileInputComponent, FooterComponent, FormComponent, FormFooterComponent, HeaderComponent, HintComponent, HourInputComponent, HrefComponent, Icon, IconComponent, IconService, ImageComponent, InAppBrowserService, InputType, ItemListComponent, LangOption, LangService, LayoutComponent, LinkComponent, LinksCakeComponent, LocalStorageService, MOTION, NavigationService, NoContentComponent, NotesBoxComponent, NumberInputComponent, OutlineDefault, OutlineDefaultBlock, OutlineDefaultFull, OutlineDefaultRound, OutlineDefaultRoundBlock, OutlineDefaultRoundFull, PasswordInputComponent, PinInputComponent, PrimarySolidBlockButton, PrimarySolidBlockHrefButton, PrimarySolidBlockIconButton, PrimarySolidBlockIconHrefButton, PrimarySolidDefaultRoundButton, PrimarySolidDefaultRoundHrefButton, PrimarySolidDefaultRoundIconButton, PrimarySolidDefaultRoundIconHrefButton, PrimarySolidFullButton, PrimarySolidFullHrefButton, PrimarySolidFullIconButton, PrimarySolidFullIconHrefButton, PrimarySolidLargeRoundButton, PrimarySolidLargeRoundHrefButton, PrimarySolidLargeRoundIconButton, PrimarySolidLargeRoundIconHrefButton, PrimarySolidSmallRoundButton, PrimarySolidSmallRoundHrefButton, PrimarySolidSmallRoundIconButton, PrimarySolidSmallRoundIconHrefButton, ProgressBarComponent, ProgressStatusComponent, PrompterComponent, RadioInputComponent,
|
|
4048
|
+
export { ActionType, AlertBoxComponent, AvatarComponent, BannerComponent, BaseDefault, BoxComponent, ButtonComponent, ButtonGroupComponent, CardComponent, CardSection, CardType, CheckInputComponent, ClearDefault, ClearDefaultBlock, ClearDefaultFull, ClearDefaultRound, ClearDefaultRoundBlock, ClearDefaultRoundFull, CommentInputComponent, ComponentStates, ContentLoaderComponent, DateInputComponent, DisplayComponent, DividerComponent, DownloadService, EmailInputComponent, ExpandableTextComponent, FileInputComponent, FooterComponent, FormComponent, FormFooterComponent, HeaderComponent, HintComponent, HourInputComponent, HrefComponent, Icon, IconComponent, IconService, ImageComponent, InAppBrowserService, InputType, ItemListComponent, LangOption, LangService, LayoutComponent, LinkComponent, LinksCakeComponent, LocalStorageService, MOTION, NavigationService, NoContentComponent, NotesBoxComponent, NumberInputComponent, OutlineDefault, OutlineDefaultBlock, OutlineDefaultFull, OutlineDefaultRound, OutlineDefaultRoundBlock, OutlineDefaultRoundFull, PasswordInputComponent, PinInputComponent, PrimarySolidBlockButton, PrimarySolidBlockHrefButton, PrimarySolidBlockIconButton, PrimarySolidBlockIconHrefButton, PrimarySolidDefaultRoundButton, PrimarySolidDefaultRoundHrefButton, PrimarySolidDefaultRoundIconButton, PrimarySolidDefaultRoundIconHrefButton, PrimarySolidFullButton, PrimarySolidFullHrefButton, PrimarySolidFullIconButton, PrimarySolidFullIconHrefButton, PrimarySolidLargeRoundButton, PrimarySolidLargeRoundHrefButton, PrimarySolidLargeRoundIconButton, PrimarySolidLargeRoundIconHrefButton, PrimarySolidSmallRoundButton, PrimarySolidSmallRoundHrefButton, PrimarySolidSmallRoundIconButton, PrimarySolidSmallRoundIconHrefButton, ProgressBarComponent, ProgressStatusComponent, PrompterComponent, RadioInputComponent, SearchSelectorComponent, SearchbarComponent, SecondarySolidBlockButton, SecondarySolidBlockHrefButton, SecondarySolidBlockIconButton, SecondarySolidBlockIconHrefButton, SecondarySolidDefaultRoundButton, SecondarySolidDefaultRoundHrefButton, SecondarySolidDefaultRoundIconButton, SecondarySolidDefaultRoundIconHrefButton, SecondarySolidFullButton, SecondarySolidFullHrefButton, SecondarySolidFullIconButton, SecondarySolidFullIconHrefButton, SecondarySolidLargeRoundButton, SecondarySolidLargeRoundHrefButton, SecondarySolidLargeRoundIconButton, SecondarySolidLargeRoundIconHrefButton, SecondarySolidSmallRoundButton, SecondarySolidSmallRoundHrefButton, SecondarySolidSmallRoundIconButton, SecondarySolidSmallRoundIconHrefButton, SelectSearchComponent, SimpleComponent, SolidBlockButton, SolidDefault, SolidDefaultBlock, SolidDefaultButton, SolidDefaultFull, SolidDefaultRound, SolidDefaultRoundBlock, SolidDefaultRoundButton, SolidDefaultRoundFull, SolidFullButton, SolidLargeButton, SolidLargeRoundButton, SolidSmallButton, SolidSmallRoundButton, TextComponent, TextContent, TextInputComponent, ThemeOption, ThemeService, TitleBlockComponent, TitleComponent, ToastService, ToolbarActionType, ToolbarComponent, ValtechConfigService, WizardComponent, WizardFooterComponent, goToTop, isAtEnd, maxLength, replaceSpecialChars };
|
|
4039
4049
|
//# sourceMappingURL=valtech-components.mjs.map
|