valtech-components 4.0.953 → 4.0.955

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.
@@ -32,7 +32,7 @@ export declare class MetadataListComponent {
32
32
  }>;
33
33
  readonly resolvedSections: import("@angular/core").Signal<MetadataSection[]>;
34
34
  readonly hostClass: import("@angular/core").Signal<string>;
35
- readonly gridStyle: import("@angular/core").Signal<string>;
35
+ readonly gridStyle: import("@angular/core").Signal<any>;
36
36
  static ɵfac: i0.ɵɵFactoryDeclaration<MetadataListComponent, never>;
37
37
  static ɵcmp: i0.ɵɵComponentDeclaration<MetadataListComponent, "val-metadata-list", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
38
38
  }
@@ -0,0 +1,44 @@
1
+ import { I18nService } from '../../../services/i18n';
2
+ import { ButtonMetadata } from '../../types';
3
+ import * as i0 from "@angular/core";
4
+ export interface SelectSearchPickerProps {
5
+ title: string;
6
+ options: Record<string, unknown>[];
7
+ valueProperty: string;
8
+ labelProperty: string;
9
+ multiple: boolean;
10
+ /** Valores ya seleccionados (siempre array — un solo elemento si no es `multiple`). */
11
+ selectedValues: unknown[];
12
+ placeholder?: string;
13
+ }
14
+ /**
15
+ * Picker de `val-select-search` / `val-multi-select-search` — full-screen en
16
+ * mobile, card flotante en desktop (`ModalService.openAdaptive`, Regla #5).
17
+ * Reemplaza el `ion-modal` con breakpoints que ambos componentes tenían
18
+ * embebido: mismo bottom-sheet en cualquier tamaño de pantalla, sin el
19
+ * tratamiento "card centrada" que el resto de los modales del factory ya usa.
20
+ *
21
+ * Selección simple: cierra al tocar un ítem (`dismiss({values:[v]}, 'selected')`).
22
+ * Selección múltiple: acumula localmente, footer con "Aplicar" (Regla #5,
23
+ * val-modal-layout con `actions`).
24
+ */
25
+ export declare class SelectSearchPickerModalComponent {
26
+ _modalRef?: {
27
+ dismiss: (data?: unknown, role?: string) => void;
28
+ };
29
+ readonly i18n: I18nService;
30
+ /** Inyectado por `ModalService.openAdaptive({ componentProps })`. */
31
+ props: SelectSearchPickerProps;
32
+ readonly query: import("@angular/core").WritableSignal<string>;
33
+ readonly selected: import("@angular/core").WritableSignal<unknown[]>;
34
+ readonly filteredItems: import("@angular/core").Signal<Record<string, unknown>[]>;
35
+ readonly footerActions: import("@angular/core").Signal<ButtonMetadata[]>;
36
+ private seeded;
37
+ private ensureSeeded;
38
+ isSelected(item: Record<string, unknown>): boolean;
39
+ toggle(item: Record<string, unknown>): void;
40
+ apply(): void;
41
+ cancel(): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectSearchPickerModalComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectSearchPickerModalComponent, "val-select-search-picker-modal", never, {}, {}, never, never, true, never>;
44
+ }
@@ -1,10 +1,8 @@
1
1
  import { OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
- import { IonModal } from '@ionic/angular';
3
2
  import { IconService } from '../../../services/icons.service';
4
3
  import { InputMetadata, InputOption } from '../../types';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class SelectSearchComponent implements OnChanges, OnDestroy {
7
- modal: IonModal;
8
6
  label: string;
9
7
  labelProperty: string;
10
8
  valueProperty: string;
@@ -24,6 +22,7 @@ export declare class SelectSearchComponent implements OnChanges, OnDestroy {
24
22
  icon: IconService;
25
23
  private changeDetector;
26
24
  private i18n;
25
+ private modals;
27
26
  /**
28
27
  * Label visible sobre el selector (estilo val-form). Solo se muestra si viene
29
28
  * explícito por `props.label` o el input `label`; sin él, no se renderiza nada.
@@ -55,26 +54,16 @@ export declare class SelectSearchComponent implements OnChanges, OnDestroy {
55
54
  private initializeItems;
56
55
  private syncControlValueWithSelectedItems;
57
56
  private applyDefaultValue;
58
- onFilter(event: any): void;
59
- onFocus(): void;
60
- onBlur(): void;
61
- openModal(): void;
62
- preventDefaultBehavior(event: MouseEvent): void;
63
- /**
64
- * Reset state only - called by didDismiss event
65
- * Separated from closeModal to avoid double dismissal and scroll issues
66
- */
67
- resetState(): void;
68
57
  /**
69
- * Close modal only - does not reset state (didDismiss will handle that)
58
+ * Abre el picker vía `ModalService.openAdaptive` (Regla #5: full-screen en
59
+ * mobile, card flotante en desktop) en vez del `ion-modal` con breakpoints
60
+ * que este componente tenía embebido antes — mismo bottom-sheet en
61
+ * cualquier tamaño de pantalla, sin el tratamiento de card centrada que ya
62
+ * usa el resto de los modales del factory. El filtrado, la selección y el
63
+ * footer "Aplicar" (modo `multiple`) viven en `SelectSearchPickerModalComponent`.
70
64
  */
71
- closeModal(): void;
72
- /**
73
- * @deprecated Use closeModal() instead. Kept for backwards compatibility.
74
- */
75
- cancelModal(): void;
76
- selectItem(item: any): void;
77
- isItemSelected(item: any): boolean;
65
+ openPicker(): Promise<void>;
66
+ preventDefaultBehavior(event: MouseEvent): void;
78
67
  updateDisplayValue(): void;
79
68
  applyChanges(): void;
80
69
  reset(): void;
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.953";
5
+ export declare const VERSION = "4.0.955";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.953",
3
+ "version": "4.0.955",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
package/public-api.d.ts CHANGED
@@ -121,6 +121,7 @@ export * from './lib/components/molecules/range-input/types';
121
121
  export * from './lib/components/molecules/searchbar/searchbar.component';
122
122
  export * from './lib/components/molecules/select-input/select-input.component';
123
123
  export * from './lib/components/molecules/select-search/select-search.component';
124
+ export * from './lib/components/molecules/select-search/select-search-picker-modal.component';
124
125
  export * from './lib/components/molecules/segment-control/segment-control.component';
125
126
  export * from './lib/components/molecules/segment-control/types';
126
127
  export * from './lib/components/molecules/text-input/text-input.component';