carconnect-gatherleads-ui-lib 3.1.1 → 3.1.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.
@@ -160,7 +160,7 @@ export declare function cn(...inputs: ClassValue[]): string;
160
160
  * @param {string} timeZone - The IANA time zone identifier (e.g., 'America/Guayaquil')
161
161
  * @return {Date} A new Date object where the local time matches the target time zone
162
162
  */
163
- export declare const convertToTimeZoneDatePicker: (date: Date, timeZone: DateTimeZoneType) => Date;
163
+ export declare const convertToTimeZoneGatherDatePicker: (date: Date, timeZone: DateTimeZoneType) => Date;
164
164
 
165
165
  /**
166
166
  * Helper para crear columnas tipadas con autocompletado completo.
@@ -269,6 +269,24 @@ export declare const deepClone: (obj: any) => any;
269
269
  */
270
270
  export declare const deepEqual: (obj1: any, obj2: any) => boolean;
271
271
 
272
+ /**
273
+ * Dropdown Gather Calendar component
274
+ *
275
+ * @param {DropdownGatherCalendarProps} props - The props for the DropdownGatherCalendar component.
276
+ * @returns {React.FC<DropdownGatherCalendarProps>} The DropdownGatherCalendar component.
277
+ */
278
+ export declare const DropdownGatherCalendar: React_2.ForwardRefExoticComponent<DropdownGatherCalendarProps & React_2.RefAttributes<HTMLDivElement>>;
279
+
280
+ /**
281
+ * Props for the DropdownGatherCalendar component.
282
+ */
283
+ export declare interface DropdownGatherCalendarProps {
284
+ currentMonth: Date;
285
+ onMonthChange: (date: Date) => void;
286
+ classNames?: GatherCalendarProps['classNames'];
287
+ selectProps?: GatherCalendarProps['selectProps'];
288
+ }
289
+
272
290
  /**
273
291
  * Tipo unión de todas las configuraciones de campo posibles
274
292
  */
@@ -479,7 +497,7 @@ export declare interface GatherBaseCalendarProps {
479
497
  * Callback called when the selected date changes.
480
498
  * Always returns a DateRange.
481
499
  */
482
- onSelect?: (date: DateRange | undefined) => void;
500
+ onSelect?: (date?: DateRange) => void;
483
501
  /** Minimum selectable date */
484
502
  minDate?: Date;
485
503
  /** Maximum selectable date */
@@ -502,6 +520,13 @@ export declare interface GatherBaseCalendarProps {
502
520
  * Props specific to the 'dropdown' layout mode.
503
521
  */
504
522
  selectProps?: GatherCalendarSelectProps;
523
+ /**
524
+ * Number of months to display side by side in range mode.
525
+ * For single mode, this is always 1.
526
+ * @default 1 for mobile, 2 for desktop (responsive)
527
+ * Set to 1 to always show a single calendar even in range mode
528
+ */
529
+ numberOfMonths?: number;
505
530
  }
506
531
 
507
532
  /**
@@ -609,8 +634,8 @@ export declare interface GatherCalendarProps extends GatherBaseCalendarProps {
609
634
  baseProps?: {
610
635
  single?: Omit<DayPickerProps, 'selected' | 'onSelect'>;
611
636
  range?: {
612
- from: Omit<DayPickerProps, 'selected' | 'onSelect'>;
613
- to: Omit<DayPickerProps, 'selected' | 'onSelect'>;
637
+ from?: Omit<DayPickerProps, 'selected' | 'onSelect'>;
638
+ to?: Omit<DayPickerProps, 'selected' | 'onSelect'>;
614
639
  };
615
640
  };
616
641
  }
@@ -2720,10 +2745,16 @@ export declare const generateValidationRules: (field: FieldConfig) => Validation
2720
2745
  *
2721
2746
  * @return {number[]} An array of years as numbers, sorted from newest to oldest.
2722
2747
  */
2723
- export declare const generateYearsDatePicker: (pastYearsCount?: number, futureYearsCount?: number) => number[];
2748
+ export declare const generateYearsGatherDatePicker: (pastYearsCount?: number, futureYearsCount?: number) => number[];
2724
2749
 
2725
2750
  export declare const getAllPaths: (obj: any, prefix?: string) => string[];
2726
2751
 
2752
+ /**
2753
+ * Calculates the exact UTC timestamp corresponding to the start (00:00) or end (23:59)
2754
+ * of a specific day in a specific timezone.
2755
+ */
2756
+ export declare const getBoundaryGatherDateInTimeZone: (baseDate: Date, timeZone: DateTimeZoneType, isEnd: boolean) => Date;
2757
+
2727
2758
  /**
2728
2759
  * Determina las clases de layout dinámicamente en base al tipo (`grid`, `horizontal`, `stack`, etc).
2729
2760
  */
@@ -2734,6 +2765,32 @@ export declare const getLayoutClasses: (config: FormConfig) => string;
2734
2765
  */
2735
2766
  export declare const getNestedField: (obj: any, path: string) => any;
2736
2767
 
2768
+ /**
2769
+ * Normalizes a date to a custom specific time in the target TimeZone.
2770
+ */
2771
+ export declare const getNormalizeCustomGatherDate: (date: Date, options: TimeGatherOptions, timeZone?: DateTimeZoneType) => Date | undefined;
2772
+
2773
+ /**
2774
+ * Normalizes a date range (Start of Day -> End of Day).
2775
+ */
2776
+ export declare const getNormalizeRangeGatherDate: (range: DateRange, timeZone?: DateTimeZoneType) => {
2777
+ from: Date;
2778
+ to: Date;
2779
+ } | undefined;
2780
+
2781
+ /**
2782
+ * Specific wrapper for Ecuador Range.
2783
+ */
2784
+ export declare const getNormalizeToEcuadorRangeGatherDate: (dateRange: DateRange) => {
2785
+ from: Date;
2786
+ to: Date;
2787
+ } | undefined;
2788
+
2789
+ /**
2790
+ * Wrapper to normalize a single date to Noon (12:00) in Ecuador time.
2791
+ */
2792
+ export declare const getNormalizeToNoonEcuadorGatherDate: (date: Date, options?: TimeGatherOptions) => Date | undefined;
2793
+
2737
2794
  /**
2738
2795
  * Ordena los campos en base al array `orderFields` definido en la config.
2739
2796
  */
@@ -2745,7 +2802,13 @@ export declare const getOrderedFields: (fields: FieldConfig[], orderFields?: str
2745
2802
  * @param {DatePickerMode} mode - The mode of the date picker ('single' or 'range').
2746
2803
  * @return {DatePreset[]} An array of default presets.
2747
2804
  */
2748
- export declare const getPresetsDatePicker: (mode?: DatePickerMode) => DatePreset[];
2805
+ export declare const getPresetsGatherDatePicker: (mode?: DatePickerMode) => DatePreset[];
2806
+
2807
+ /**
2808
+ * Calculates the exact UTC timestamp corresponding to a SPECIFIC time (e.g., 14:30:00)
2809
+ * on a specific day in a specific timezone.
2810
+ */
2811
+ export declare const getSpecificGatherTimeInTimeZone: (baseDate: Date, timeZone: DateTimeZoneType, time: TimeGatherOptions) => Date;
2749
2812
 
2750
2813
  /**
2751
2814
  * Tipo de opción para el componente MultiSelect
@@ -2808,6 +2871,21 @@ export declare interface SortConfig {
2808
2871
  direction: 'asc' | 'desc';
2809
2872
  }
2810
2873
 
2874
+ /**
2875
+ * Options for time selection in the date picker.
2876
+ * @interface TimeGatherOptions
2877
+ * @property {number} hour - The hour to select.
2878
+ * @property {number} minute - The minute to select.
2879
+ * @property {number} second - The second to select.
2880
+ * @property {number} millisecond - The millisecond to select.
2881
+ */
2882
+ export declare type TimeGatherOptions = {
2883
+ hour?: number;
2884
+ minute?: number;
2885
+ second?: number;
2886
+ millisecond?: number;
2887
+ };
2888
+
2811
2889
  /**
2812
2890
  * Props para el hook useModal
2813
2891
  */