valtech-components 4.0.2 → 4.0.3

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.
@@ -2,51 +2,41 @@ import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core
2
2
  import { DatePickerMetadata } from './types';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
- * `val-date-picker` — selector de fecha con calendario propio basado en
6
- * `vanilla-calendar-pro` (NO ion-datetime sin el bug del grid de días vacío).
5
+ * `val-date-picker` — selector de fecha con calendario vanilla-calendar-pro v3
6
+ * (NO ion-datetime). Se presenta como **sheet modal** (bottom sheet), igual que
7
+ * el resto de los modales de la app, con espacio propio y sin problemas de
8
+ * posicionamiento o bottom-nav.
7
9
  *
8
- * Trigger (botón con la fecha formateada o placeholder) que despliega un calendario
9
- * inline debajo; al elegir un día se aplica y se cierra. Valor manejado como string
10
- * `YYYY-MM-DD` (fecha local, sin zona horaria). Integra con `FormControl` (`control`)
11
- * o vía `value` + `(valueChange)`. Auto-registra i18n (`DatePicker`).
10
+ * Trigger (botón con la fecha o placeholder) sheet con header Cerrar + calendario
11
+ * click en un día lo aplica y cierra el sheet. Valor `YYYY-MM-DD` (fecha local,
12
+ * sin zona horaria). Integra con `FormControl` o `value`/`(valueChange)`.
12
13
  *
13
- * `ViewEncapsulation.None`: el calendario se crea por JS (fuera del scope emulado),
14
- * así que los estilos de la lib + overrides de marca deben ser globales.
15
- *
16
- * @example
17
- * <val-date-picker [props]="{ control: fechaControl, label: 'Fecha', locale: 'es-CL' }"
18
- * (valueChange)="onDate($event)" />
14
+ * `ViewEncapsulation.None`: el calendario es instanciado por JS fuera del shadow;
15
+ * los estilos de marca deben ser globales.
19
16
  */
20
17
  export declare class DatePickerComponent implements OnChanges, OnDestroy {
21
18
  private i18n;
22
- private elRef;
23
- /** Cierra el panel si el click fue fuera del componente. */
24
- onDocumentClick(target: HTMLElement): void;
25
19
  constructor();
26
20
  props: DatePickerMetadata;
27
- /** Emite el valor (`YYYY-MM-DD` | null) en cada cambio. */
28
21
  valueChange: EventEmitter<string>;
29
22
  private calRef?;
30
- open: boolean;
23
+ readonly sheetOpen: import("@angular/core").WritableSignal<boolean>;
31
24
  private calendar?;
32
- /** id estable del trigger. */
33
25
  get triggerId(): string;
34
26
  private get locale();
35
- /** Valor actual (`YYYY-MM-DD` | null) — del control o del prop value. */
36
27
  private get current();
37
28
  get placeholderText(): string;
38
- /** Valor formateado a fecha larga local (sin day-shift). '' si vacío. */
39
29
  get displayValue(): string;
40
30
  ngOnChanges(_changes: SimpleChanges): void;
41
31
  ngOnDestroy(): void;
42
32
  t(key: string): string;
43
- toggle(): void;
33
+ onSheetPresent(): void;
34
+ onSheetDismiss(): void;
44
35
  private buildCalendar;
45
36
  private destroyCalendar;
46
37
  private apply;
47
38
  clear(): void;
48
39
  private setValue;
49
- /** Parsea `YYYY-MM-DD` a Date LOCAL (evita el shift de zona de new Date(str)). */
50
40
  private parseLocal;
51
41
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
52
42
  static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "val-date-picker", never, { "props": { "alias": "props"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
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.2";
5
+ export declare const VERSION = "4.0.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"