@oneluiz/dual-datepicker 3.0.0 → 3.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oneluiz-dual-datepicker.mjs","sources":["../../src/date-adapter.ts","../../src/native-date-adapter.ts","../../src/dual-datepicker.component.ts","../../src/dual-datepicker.component.html","../../src/preset-utils.ts","../../src/public-api.ts","../../src/oneluiz-dual-datepicker.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Abstract class for date adapters.\n * Allows the component to work with different date libraries (Date, DayJS, date-fns, Luxon, etc.)\n */\nexport abstract class DateAdapter<T = any> {\n /**\n * Parses a value into a date object\n * @param value - Value to parse (string, number, or date object)\n * @returns Parsed date object\n */\n abstract parse(value: any): T | null;\n\n /**\n * Formats a date object into a string\n * @param date - Date object to format\n * @param format - Optional format string\n * @returns Formatted date string\n */\n abstract format(date: T, format?: string): string;\n\n /**\n * Adds days to a date\n * @param date - Date object\n * @param days - Number of days to add (can be negative)\n * @returns New date object\n */\n abstract addDays(date: T, days: number): T;\n\n /**\n * Adds months to a date\n * @param date - Date object\n * @param months - Number of months to add (can be negative)\n * @returns New date object\n */\n abstract addMonths(date: T, months: number): T;\n\n /**\n * Gets the year from a date\n * @param date - Date object\n * @returns Year number\n */\n abstract getYear(date: T): number;\n\n /**\n * Gets the month from a date (0-11)\n * @param date - Date object\n * @returns Month number (0-11)\n */\n abstract getMonth(date: T): number;\n\n /**\n * Gets the day of month from a date\n * @param date - Date object\n * @returns Day of month (1-31)\n */\n abstract getDate(date: T): number;\n\n /**\n * Gets the day of week from a date (0-6, Sunday = 0)\n * @param date - Date object\n * @returns Day of week (0-6)\n */\n abstract getDay(date: T): number;\n\n /**\n * Creates a new date object\n * @param year - Year\n * @param month - Month (0-11)\n * @param date - Day of month (1-31)\n * @returns New date object\n */\n abstract createDate(year: number, month: number, date: number): T;\n\n /**\n * Gets today's date\n * @returns Today's date object\n */\n abstract today(): T;\n\n /**\n * Checks if two dates are the same day\n * @param a - First date\n * @param b - Second date\n * @returns True if same day\n */\n abstract isSameDay(a: T | null, b: T | null): boolean;\n\n /**\n * Checks if a date is before another\n * @param a - First date\n * @param b - Second date\n * @returns True if a is before b\n */\n abstract isBefore(a: T | null, b: T | null): boolean;\n\n /**\n * Checks if a date is after another\n * @param a - First date\n * @param b - Second date\n * @returns True if a is after b\n */\n abstract isAfter(a: T | null, b: T | null): boolean;\n\n /**\n * Checks if a date is between two other dates\n * @param date - Date to check\n * @param start - Start date\n * @param end - End date\n * @returns True if date is between start and end\n */\n abstract isBetween(date: T | null, start: T | null, end: T | null): boolean;\n\n /**\n * Clones a date object\n * @param date - Date to clone\n * @returns Cloned date object\n */\n abstract clone(date: T): T;\n\n /**\n * Checks if a value is a valid date\n * @param date - Value to check\n * @returns True if valid date\n */\n abstract isValid(date: any): boolean;\n}\n\n/**\n * Injection token for DateAdapter\n */\nexport const DATE_ADAPTER = new InjectionToken<DateAdapter>('DATE_ADAPTER');\n","import { Injectable } from '@angular/core';\nimport { DateAdapter } from './date-adapter';\n\n/**\n * Date adapter implementation for native JavaScript Date objects\n * This is the default adapter used by the component\n */\n@Injectable()\nexport class NativeDateAdapter extends DateAdapter<Date> {\n parse(value: any): Date | null {\n if (!value) return null;\n \n if (value instanceof Date) {\n return new Date(value);\n }\n \n if (typeof value === 'string' || typeof value === 'number') {\n const date = new Date(value);\n return this.isValid(date) ? date : null;\n }\n \n return null;\n }\n\n format(date: Date, format: string = 'YYYY-MM-DD'): string {\n if (!this.isValid(date)) return '';\n \n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n \n // Simple format implementation\n switch (format) {\n case 'YYYY-MM-DD':\n return `${year}-${month}-${day}`;\n case 'MM/DD/YYYY':\n return `${month}/${day}/${year}`;\n case 'DD/MM/YYYY':\n return `${day}/${month}/${year}`;\n default:\n return `${year}-${month}-${day}`;\n }\n }\n\n addDays(date: Date, days: number): Date {\n const result = this.clone(date);\n result.setDate(result.getDate() + days);\n return result;\n }\n\n addMonths(date: Date, months: number): Date {\n const result = this.clone(date);\n result.setMonth(result.getMonth() + months);\n return result;\n }\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDay(date: Date): number {\n return date.getDay();\n }\n\n createDate(year: number, month: number, date: number): Date {\n return new Date(year, month, date);\n }\n\n today(): Date {\n return new Date();\n }\n\n isSameDay(a: Date | null, b: Date | null): boolean {\n if (!a || !b) return false;\n if (!this.isValid(a) || !this.isValid(b)) return false;\n \n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n }\n\n isBefore(a: Date | null, b: Date | null): boolean {\n if (!a || !b) return false;\n if (!this.isValid(a) || !this.isValid(b)) return false;\n \n return a.getTime() < b.getTime();\n }\n\n isAfter(a: Date | null, b: Date | null): boolean {\n if (!a || !b) return false;\n if (!this.isValid(a) || !this.isValid(b)) return false;\n \n return a.getTime() > b.getTime();\n }\n\n isBetween(date: Date | null, start: Date | null, end: Date | null): boolean {\n if (!date || !start || !end) return false;\n if (!this.isValid(date) || !this.isValid(start) || !this.isValid(end)) return false;\n \n const dateTime = date.getTime();\n const startTime = start.getTime();\n const endTime = end.getTime();\n \n return dateTime >= startTime && dateTime <= endTime;\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n isValid(date: any): boolean {\n return date instanceof Date && !isNaN(date.getTime());\n }\n}\n","import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, HostListener, ElementRef, forwardRef, signal, computed, effect, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule, ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DateAdapter, DATE_ADAPTER } from './date-adapter';\nimport { NativeDateAdapter } from './native-date-adapter';\n\nexport interface DateRange {\n startDate: string;\n endDate: string;\n rangeText: string;\n}\n\nexport interface MultiDateRange {\n ranges: DateRange[];\n}\n\nexport interface PresetRange {\n start: string;\n end: string;\n}\n\nexport interface PresetConfig {\n label: string;\n getValue: () => PresetRange;\n}\n\nexport interface LocaleConfig {\n monthNames?: string[];\n monthNamesShort?: string[];\n dayNames?: string[];\n dayNamesShort?: string[];\n firstDayOfWeek?: number; // 0 = Sunday, 1 = Monday, etc.\n}\n\n@Component({\n selector: 'ngx-dual-datepicker',\n standalone: true,\n imports: [CommonModule, FormsModule, ReactiveFormsModule],\n templateUrl: './dual-datepicker.component.html',\n styleUrl: './dual-datepicker.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DualDatepickerComponent),\n multi: true\n },\n {\n provide: DATE_ADAPTER,\n useClass: NativeDateAdapter\n }\n ]\n})\nexport class DualDatepickerComponent implements OnInit, OnChanges, ControlValueAccessor {\n @Input() placeholder: string = 'Select date range';\n @Input() startDate: string = '';\n @Input() endDate: string = '';\n @Input() showPresets: boolean = true;\n @Input() showClearButton: boolean = false;\n @Input() multiRange: boolean = false;\n @Input() closeOnSelection: boolean = true;\n @Input() closeOnPresetSelection: boolean = true;\n @Input() closeOnClickOutside: boolean = true;\n @Input() presets: PresetConfig[] = [];\n @Input() inputBackgroundColor: string = '#fff';\n @Input() inputTextColor: string = '#495057';\n @Input() inputBorderColor: string = '#ced4da';\n @Input() inputBorderColorHover: string = '#ced4da';\n @Input() inputBorderColorFocus: string = '#80bdff';\n @Input() inputPadding: string = '0.375rem 0.75rem';\n @Input() locale: LocaleConfig = {};\n\n @Output() dateRangeChange = new EventEmitter<DateRange>();\n @Output() dateRangeSelected = new EventEmitter<DateRange>();\n @Output() multiDateRangeChange = new EventEmitter<MultiDateRange>();\n @Output() multiDateRangeSelected = new EventEmitter<MultiDateRange>();\n\n // Date adapter injection\n private dateAdapter = inject<DateAdapter>(DATE_ADAPTER);\n\n // Signals for reactive state\n showDatePicker = signal(false);\n dateRangeText = signal('');\n selectingStartDate = signal(true);\n currentMonth = signal(this.dateAdapter.today());\n previousMonth = signal(this.dateAdapter.today());\n currentMonthDays = signal<any[]>([]);\n previousMonthDays = signal<any[]>([]);\n isDisabled = signal(false);\n \n // Multi-range support\n selectedRanges = signal<DateRange[]>([]);\n currentRangeIndex = signal<number>(-1);\n\n // Keyboard navigation\n focusedDay = signal<{ date: string; monthIndex: number } | null>(null); // monthIndex: 0 = previous, 1 = current\n \n // Computed values\n currentMonthName = computed(() => this.getMonthName(this.currentMonth()));\n previousMonthName = computed(() => this.getMonthName(this.previousMonth()));\n weekDayNames = computed(() => this.getDayNames());\n\n private readonly defaultMonthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n private readonly defaultMonthNamesShort = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n private readonly defaultDayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n private readonly defaultDayNamesShort = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];\n\n // ControlValueAccessor callbacks\n private onChange: (value: DateRange | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n constructor(private elementRef: ElementRef) {\n // Effect to emit changes when dates change\n effect(() => {\n const range = this.dateRangeText();\n if (this.startDate || this.endDate) {\n this.onChange(this.getDateRangeValue());\n }\n });\n }\n\n @HostListener('document:click', ['$event'])\n onClickOutside(event: MouseEvent): void {\n if (this.showDatePicker() && this.closeOnClickOutside) {\n const clickedInside = this.elementRef.nativeElement.contains(event.target);\n if (!clickedInside) {\n this.closeDatePicker();\n }\n }\n }\n\n @HostListener('keydown', ['$event'])\n handleKeyboardNavigation(event: KeyboardEvent): void {\n if (!this.showDatePicker()) {\n // When picker is closed, allow Enter/Space to open it\n if (event.key === 'Enter' || event.key === ' ') {\n const target = event.target as HTMLElement;\n if (target.classList.contains('datepicker-input')) {\n event.preventDefault();\n this.toggleDatePicker();\n }\n }\n return;\n }\n\n // When picker is open\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.closeDatePicker();\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n this.moveFocusVertical(-1);\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.moveFocusVertical(1);\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n this.moveFocusHorizontal(-1);\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n this.moveFocusHorizontal(1);\n break;\n\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.selectFocusedDay();\n break;\n\n case 'Home':\n event.preventDefault();\n this.moveFocusToFirstDay();\n break;\n\n case 'End':\n event.preventDefault();\n this.moveFocusToLastDay();\n break;\n\n case 'PageUp':\n event.preventDefault();\n if (event.shiftKey) {\n this.moveFocusYear(-1);\n } else {\n this.changeMonth(-1);\n this.adjustFocusAfterMonthChange();\n }\n break;\n\n case 'PageDown':\n event.preventDefault();\n if (event.shiftKey) {\n this.moveFocusYear(1);\n } else {\n this.changeMonth(1);\n this.adjustFocusAfterMonthChange();\n }\n break;\n }\n }\n\n // Keyboard navigation methods\n private initializeFocus(): void {\n // Set initial focus to start date, end date, or first available day\n if (this.startDate) {\n const startMonth = this.isDateInMonth(this.startDate, this.previousMonth()) ? 0 : 1;\n this.focusedDay.set({ date: this.startDate, monthIndex: startMonth });\n } else if (this.endDate) {\n const endMonth = this.isDateInMonth(this.endDate, this.previousMonth()) ? 0 : 1;\n this.focusedDay.set({ date: this.endDate, monthIndex: endMonth });\n } else {\n // Focus first day of current month\n const currentMonthDays = this.currentMonthDays();\n const firstDay = currentMonthDays.find(day => day.isCurrentMonth);\n if (firstDay) {\n this.focusedDay.set({ date: firstDay.date, monthIndex: 1 });\n }\n }\n }\n\n private isDateInMonth(dateStr: string, monthDate: Date): boolean {\n const date = this.dateAdapter.parse(dateStr);\n if (!date) return false;\n const year = this.dateAdapter.getYear(date);\n const month = this.dateAdapter.getMonth(date);\n const monthYear = this.dateAdapter.getYear(monthDate);\n const monthMonth = this.dateAdapter.getMonth(monthDate);\n return year === monthYear && month === monthMonth;\n }\n\n private moveFocusHorizontal(direction: number): void {\n const focused = this.focusedDay();\n if (!focused) {\n this.initializeFocus();\n return;\n }\n\n const currentDate = this.dateAdapter.parse(focused.date);\n if (!currentDate) return;\n\n const newDate = this.dateAdapter.addDays(currentDate, direction);\n const newDateStr = this.formatDate(newDate);\n\n // Determine which month the new date belongs to\n const inPrevMonth = this.isDateInMonth(newDateStr, this.previousMonth());\n const inCurrMonth = this.isDateInMonth(newDateStr, this.currentMonth());\n\n if (inPrevMonth || inCurrMonth) {\n this.focusedDay.set({ \n date: newDateStr, \n monthIndex: inPrevMonth ? 0 : 1 \n });\n } else {\n // Date is outside visible months, navigate month\n if (direction > 0) {\n this.changeMonth(1);\n } else {\n this.changeMonth(-1);\n }\n this.focusedDay.set({ date: newDateStr, monthIndex: direction > 0 ? 0 : 1 });\n }\n }\n\n private moveFocusVertical(direction: number): void {\n const focused = this.focusedDay();\n if (!focused) {\n this.initializeFocus();\n return;\n }\n\n const currentDate = this.dateAdapter.parse(focused.date);\n if (!currentDate) return;\n\n const newDate = this.dateAdapter.addDays(currentDate, direction * 7); // Move by week\n const newDateStr = this.formatDate(newDate);\n\n const inPrevMonth = this.isDateInMonth(newDateStr, this.previousMonth());\n const inCurrMonth = this.isDateInMonth(newDateStr, this.currentMonth());\n\n if (inPrevMonth || inCurrMonth) {\n this.focusedDay.set({ \n date: newDateStr, \n monthIndex: inPrevMonth ? 0 : 1 \n });\n } else {\n // Navigate to month containing the new date\n if (direction > 0) {\n this.changeMonth(1);\n } else {\n this.changeMonth(-1);\n }\n this.focusedDay.set({ date: newDateStr, monthIndex: direction > 0 ? 0 : 1 });\n }\n }\n\n private moveFocusToFirstDay(): void {\n const prevMonthDays = this.previousMonthDays();\n const firstDay = prevMonthDays.find(day => day.isCurrentMonth);\n if (firstDay) {\n this.focusedDay.set({ date: firstDay.date, monthIndex: 0 });\n }\n }\n\n private moveFocusToLastDay(): void {\n const currMonthDays = this.currentMonthDays();\n const validDays = currMonthDays.filter(day => day.isCurrentMonth);\n const lastDay = validDays[validDays.length - 1];\n if (lastDay) {\n this.focusedDay.set({ date: lastDay.date, monthIndex: 1 });\n }\n }\n\n private moveFocusYear(direction: number): void {\n const focused = this.focusedDay();\n if (!focused) {\n this.initializeFocus();\n return;\n }\n\n const currentDate = this.dateAdapter.parse(focused.date);\n if (!currentDate) return;\n\n const currentYear = this.dateAdapter.getYear(currentDate);\n const currentMonth = this.dateAdapter.getMonth(currentDate);\n const currentDay = this.dateAdapter.getDate(currentDate);\n \n const newDate = this.dateAdapter.createDate(currentYear + direction, currentMonth, currentDay);\n const newDateStr = this.formatDate(newDate);\n\n // Update months to show the new year\n this.currentMonth.set(this.dateAdapter.createDate(currentYear + direction, currentMonth, 1));\n this.previousMonth.set(this.dateAdapter.createDate(currentYear + direction, currentMonth - 1, 1));\n this.generateCalendars();\n\n const inPrevMonth = this.isDateInMonth(newDateStr, this.previousMonth());\n this.focusedDay.set({ \n date: newDateStr, \n monthIndex: inPrevMonth ? 0 : 1 \n });\n }\n\n private adjustFocusAfterMonthChange(): void {\n const focused = this.focusedDay();\n if (!focused) return;\n\n const inPrevMonth = this.isDateInMonth(focused.date, this.previousMonth());\n const inCurrMonth = this.isDateInMonth(focused.date, this.currentMonth());\n\n if (!inPrevMonth && !inCurrMonth) {\n // Focused day is no longer visible, move to equivalent day in visible months\n this.initializeFocus();\n } else {\n // Update month index if needed\n this.focusedDay.set({\n date: focused.date,\n monthIndex: inPrevMonth ? 0 : 1\n });\n }\n }\n\n private selectFocusedDay(): void {\n const focused = this.focusedDay();\n if (!focused) return;\n\n const monthDays = focused.monthIndex === 0 ? this.previousMonthDays() : this.currentMonthDays();\n const dayObj = monthDays.find(day => day.date === focused.date && day.isCurrentMonth);\n \n if (dayObj) {\n this.selectDay(dayObj);\n }\n }\n\n hasKeyboardFocus(date: string, monthIndex: number): boolean {\n const focused = this.focusedDay();\n return focused !== null && focused.date === date && focused.monthIndex === monthIndex;\n }\n\n ngOnInit(): void {\n if (this.startDate && this.endDate) {\n this.updateDateRangeText();\n this.generateCalendars();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['startDate'] || changes['endDate']) {\n if (this.startDate && this.endDate) {\n this.updateDateRangeText();\n this.generateCalendars();\n } else if (!this.startDate && !this.endDate) {\n this.dateRangeText.set('');\n }\n }\n }\n\n formatDate(date: Date): string {\n const year = this.dateAdapter.getYear(date);\n const month = String(this.dateAdapter.getMonth(date) + 1).padStart(2, '0');\n const day = String(this.dateAdapter.getDate(date)).padStart(2, '0');\n return `${year}-${month}-${day}`;\n }\n\n formatDateDisplay(dateStr: string): string {\n if (!dateStr) return '';\n const date = this.dateAdapter.parse(dateStr);\n if (!date) return '';\n const monthNames = this.locale.monthNamesShort || this.defaultMonthNamesShort;\n return `${this.dateAdapter.getDate(date)} ${monthNames[this.dateAdapter.getMonth(date)]}`;\n }\n\n updateDateRangeText(): void {\n if (this.startDate && this.endDate) {\n const start = this.formatDateDisplay(this.startDate);\n const end = this.formatDateDisplay(this.endDate);\n this.dateRangeText.set(`${start} - ${end}`);\n } else {\n this.dateRangeText.set('');\n }\n }\n\n toggleDatePicker(): void {\n this.showDatePicker.update(value => !value);\n if (this.showDatePicker()) {\n this.selectingStartDate.set(true);\n const currentMonthValue = this.currentMonth();\n const year = this.dateAdapter.getYear(currentMonthValue);\n const month = this.dateAdapter.getMonth(currentMonthValue);\n const previousMonthDate = this.dateAdapter.createDate(year, month - 1, 1);\n this.previousMonth.set(previousMonthDate);\n this.generateCalendars();\n // Initialize keyboard focus\n this.initializeFocus();\n } else {\n // Clear focus when closing\n this.focusedDay.set(null);\n }\n this.onTouched();\n }\n\n closeDatePicker(): void {\n this.showDatePicker.set(false);\n this.focusedDay.set(null);\n this.onTouched();\n }\n\n generateCalendars(): void {\n this.previousMonthDays.set(this.generateMonthCalendar(this.previousMonth()));\n this.currentMonthDays.set(this.generateMonthCalendar(this.currentMonth()));\n }\n\n generateMonthCalendar(date: Date): any[] {\n const year = this.dateAdapter.getYear(date);\n const month = this.dateAdapter.getMonth(date);\n const firstDay = this.dateAdapter.createDate(year, month, 1);\n const lastDay = this.dateAdapter.createDate(year, month + 1, 0);\n const daysInMonth = this.dateAdapter.getDate(lastDay);\n const firstDayOfWeek = this.dateAdapter.getDay(firstDay);\n\n const monthDays = [];\n\n for (let i = 0; i < firstDayOfWeek; i++) {\n monthDays.push({ day: null, isCurrentMonth: false });\n }\n\n for (let day = 1; day <= daysInMonth; day++) {\n const dayDate = this.dateAdapter.createDate(year, month, day);\n const dateStr = this.formatDate(dayDate);\n monthDays.push({\n day: day,\n date: dateStr,\n isCurrentMonth: true,\n isStart: this.startDate === dateStr,\n isEnd: this.endDate === dateStr,\n inRange: this.isInRange(dateStr)\n });\n }\n\n return monthDays;\n }\n\n isInRange(dateStr: string): boolean {\n if (this.multiRange) {\n // Check if date is in any of the selected ranges\n return this.selectedRanges().some(range => {\n return dateStr >= range.startDate && dateStr <= range.endDate;\n });\n } else {\n if (!this.startDate || !this.endDate) return false;\n return dateStr >= this.startDate && dateStr <= this.endDate;\n }\n }\n\n selectDay(dayObj: any): void {\n if (!dayObj.isCurrentMonth || this.isDisabled()) return;\n\n if (this.multiRange) {\n // Multi-range mode: add ranges to array\n if (this.selectingStartDate()) {\n this.startDate = dayObj.date;\n this.endDate = '';\n this.dateRangeText.set('');\n this.selectingStartDate.set(false);\n } else {\n if (dayObj.date < this.startDate) {\n this.endDate = this.startDate;\n this.startDate = dayObj.date;\n } else {\n this.endDate = dayObj.date;\n }\n \n // Add the new range to the array\n const newRange: DateRange = {\n startDate: this.startDate,\n endDate: this.endDate,\n rangeText: this.formatDateDisplay(this.startDate) + ' – ' + this.formatDateDisplay(this.endDate)\n };\n \n const currentRanges = [...this.selectedRanges()];\n currentRanges.push(newRange);\n this.selectedRanges.set(currentRanges);\n \n // Reset for next range selection\n this.startDate = '';\n this.endDate = '';\n this.selectingStartDate.set(true);\n \n // Update display text\n this.updateMultiRangeText();\n \n // Don't close if multiRange, allow adding more ranges\n if (this.closeOnSelection && !this.multiRange) {\n this.showDatePicker.set(false);\n }\n \n this.emitMultiChange();\n this.emitMultiSelection();\n }\n this.generateCalendars();\n } else {\n // Single range mode (original behavior)\n if (this.selectingStartDate()) {\n this.startDate = dayObj.date;\n this.endDate = '';\n this.dateRangeText.set('');\n this.selectingStartDate.set(false);\n this.emitChange();\n } else {\n if (dayObj.date < this.startDate) {\n this.endDate = this.startDate;\n this.startDate = dayObj.date;\n } else {\n this.endDate = dayObj.date;\n }\n this.updateDateRangeText();\n if (this.closeOnSelection) {\n this.showDatePicker.set(false);\n }\n this.selectingStartDate.set(true);\n this.emitChange();\n this.emitSelection();\n }\n this.generateCalendars();\n }\n }\n\n changeMonth(direction: number): void {\n const currentMonthValue = this.currentMonth();\n const year = this.dateAdapter.getYear(currentMonthValue);\n const month = this.dateAdapter.getMonth(currentMonthValue);\n const newCurrentMonth = this.dateAdapter.createDate(year, month + direction, 1);\n this.currentMonth.set(newCurrentMonth);\n \n const newYear = this.dateAdapter.getYear(newCurrentMonth);\n const newMonth = this.dateAdapter.getMonth(newCurrentMonth);\n const newPreviousMonth = this.dateAdapter.createDate(newYear, newMonth - 1, 1);\n this.previousMonth.set(newPreviousMonth);\n this.generateCalendars();\n }\n\n getMonthName(date: Date): string {\n const monthNames = this.locale.monthNames || this.defaultMonthNames;\n return `${monthNames[this.dateAdapter.getMonth(date)]} ${this.dateAdapter.getYear(date)}`;\n }\n\n getDayNames(): string[] {\n return this.locale.dayNamesShort || this.defaultDayNamesShort;\n }\n\n selectPresetRange(preset: PresetConfig): void {\n if (!preset.getValue) {\n console.error('PresetConfig must have getValue() function');\n return;\n }\n\n const range = preset.getValue();\n this.startDate = range.start;\n this.endDate = range.end;\n this.updateDateRangeText();\n this.generateCalendars();\n if (this.closeOnPresetSelection) {\n this.showDatePicker.set(false);\n }\n this.emitSelection();\n }\n\n clear(): void {\n this.startDate = '';\n this.endDate = '';\n this.dateRangeText.set('');\n this.showDatePicker.set(false);\n this.selectingStartDate.set(true);\n \n if (this.multiRange) {\n this.selectedRanges.set([]);\n this.currentRangeIndex.set(-1);\n this.emitMultiChange();\n } else {\n this.emitChange();\n }\n \n this.onTouched();\n this.generateCalendars();\n }\n \n removeRange(index: number): void {\n if (!this.multiRange) return;\n \n const currentRanges = [...this.selectedRanges()];\n currentRanges.splice(index, 1);\n this.selectedRanges.set(currentRanges);\n \n this.updateMultiRangeText();\n this.emitMultiChange();\n this.emitMultiSelection();\n this.generateCalendars();\n }\n \n private updateMultiRangeText(): void {\n const count = this.selectedRanges().length;\n if (count === 0) {\n this.dateRangeText.set('');\n } else if (count === 1) {\n this.dateRangeText.set('1 range selected');\n } else {\n this.dateRangeText.set(`${count} ranges selected`);\n }\n }\n\n private emitChange(): void {\n this.dateRangeChange.emit({\n startDate: this.startDate,\n endDate: this.endDate,\n rangeText: this.dateRangeText()\n });\n }\n\n private emitSelection(): void {\n this.dateRangeSelected.emit({\n startDate: this.startDate,\n endDate: this.endDate,\n rangeText: this.dateRangeText()\n });\n }\n \n private emitMultiChange(): void {\n this.multiDateRangeChange.emit({\n ranges: this.selectedRanges()\n });\n }\n \n private emitMultiSelection(): void {\n this.multiDateRangeSelected.emit({\n ranges: this.selectedRanges()\n });\n }\n\n private getDateRangeValue(): DateRange {\n return {\n startDate: this.startDate,\n endDate: this.endDate,\n rangeText: this.dateRangeText()\n };\n }\n\n // ControlValueAccessor implementation\n writeValue(value: DateRange | null): void {\n if (value) {\n this.startDate = value.startDate || '';\n this.endDate = value.endDate || '';\n if (this.startDate && this.endDate) {\n this.updateDateRangeText();\n this.generateCalendars();\n }\n } else {\n this.startDate = '';\n this.endDate = '';\n this.dateRangeText.set('');\n }\n }\n\n registerOnChange(fn: (value: DateRange | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n","<div class=\"datepicker-wrapper\" \n [style.--input-border-hover]=\"inputBorderColorHover\"\n [style.--input-border-focus]=\"inputBorderColorFocus\">\n <input \n type=\"text\" \n class=\"datepicker-input\" \n [value]=\"dateRangeText()\" \n (click)=\"toggleDatePicker()\" \n [placeholder]=\"placeholder\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"placeholder\"\n [attr.aria-expanded]=\"showDatePicker()\"\n [attr.aria-haspopup]=\"'dialog'\"\n role=\"combobox\"\n [ngStyle]=\"{\n 'background-color': inputBackgroundColor,\n 'color': inputTextColor,\n 'border-color': inputBorderColor,\n 'padding': inputPadding\n }\"\n readonly>\n\n @if (showDatePicker()) {\n <div class=\"date-picker-dropdown\">\n @if (showPresets) {\n <div class=\"date-picker-presets\">\n @for (preset of presets; track preset.label) {\n <button type=\"button\" (click)=\"selectPresetRange(preset)\">{{ preset.label }}</button>\n }\n <button type=\"button\" class=\"btn-close-calendar\" (click)=\"closeDatePicker()\" title=\"Close\">\n ×\n </button>\n </div>\n }\n\n @if (!showPresets) {\n <div class=\"date-picker-header-only-close\">\n <button type=\"button\" class=\"btn-close-calendar\" (click)=\"closeDatePicker()\" title=\"Close\">\n ×\n </button>\n </div>\n }\n\n <!-- Calendars -->\n <div class=\"date-picker-calendars\">\n <!-- Previous month calendar -->\n <div class=\"date-picker-calendar\">\n <div class=\"date-picker-header\">\n <button type=\"button\" (click)=\"changeMonth(-1)\">\n <svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"/>\n </svg>\n </button>\n <span>{{ previousMonthName() }}</span>\n <button type=\"button\" style=\"visibility: hidden;\">\n <svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"/>\n </svg>\n </button>\n </div>\n <div class=\"date-picker-weekdays\">\n @for (dayName of weekDayNames(); track $index) {\n <span>{{ dayName }}</span>\n }\n </div>\n <div class=\"date-picker-days\">\n @for (dayObj of previousMonthDays(); track dayObj.date || $index) {\n <button \n type=\"button\"\n class=\"date-picker-day\" \n [class.empty]=\"!dayObj.isCurrentMonth\"\n [class.selected]=\"dayObj.isStart || dayObj.isEnd\"\n [class.in-range]=\"dayObj.inRange && !dayObj.isStart && !dayObj.isEnd\"\n [class.keyboard-focused]=\"hasKeyboardFocus(dayObj.date, 0)\"\n [attr.tabindex]=\"dayObj.isCurrentMonth && hasKeyboardFocus(dayObj.date, 0) ? 0 : -1\"\n [attr.aria-label]=\"formatDateDisplay(dayObj.date)\"\n [attr.aria-selected]=\"dayObj.isStart || dayObj.isEnd\"\n [attr.aria-current]=\"dayObj.isStart ? 'date' : null\"\n (click)=\"selectDay(dayObj)\"\n [disabled]=\"!dayObj.isCurrentMonth\">\n {{ dayObj.day }}\n </button>\n }\n </div>\n </div>\n\n <!-- Current month calendar -->\n <div class=\"date-picker-calendar\">\n <div class=\"date-picker-header\">\n <button type=\"button\" style=\"visibility: hidden;\">\n <svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"/>\n </svg>\n </button>\n <span>{{ currentMonthName() }}</span>\n <button type=\"button\" (click)=\"changeMonth(1)\">\n <svg width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\"/>\n </svg>\n </button>\n </div>\n <div class=\"date-picker-weekdays\">\n @for (dayName of weekDayNames(); track $index) {\n <span>{{ dayName }}</span>\n }\n </div>\n <div class=\"date-picker-days\">\n @for (dayObj of currentMonthDays(); track dayObj.date || $index) {\n <button \n type=\"button\"\n class=\"date-picker-day\" \n [class.empty]=\"!dayObj.isCurrentMonth\"\n [class.selected]=\"dayObj.isStart || dayObj.isEnd\"\n [class.in-range]=\"dayObj.inRange && !dayObj.isStart && !dayObj.isEnd\"\n [class.keyboard-focused]=\"hasKeyboardFocus(dayObj.date, 1)\"\n [attr.tabindex]=\"dayObj.isCurrentMonth && hasKeyboardFocus(dayObj.date, 1) ? 0 : -1\"\n [attr.aria-label]=\"formatDateDisplay(dayObj.date)\"\n [attr.aria-selected]=\"dayObj.isStart || dayObj.isEnd\"\n [attr.aria-current]=\"dayObj.isStart ? 'date' : null\"\n (click)=\"selectDay(dayObj)\"\n [disabled]=\"!dayObj.isCurrentMonth\">\n {{ dayObj.day }}\n </button>\n }\n </div>\n </div>\n </div>\n\n <!-- Multi-Range List -->\n @if (multiRange && selectedRanges().length > 0) {\n <div class=\"multi-range-list\">\n <div class=\"multi-range-header\">\n <span class=\"multi-range-title\">Selected Ranges ({{ selectedRanges().length }})</span>\n </div>\n <div class=\"multi-range-items\">\n @for (range of selectedRanges(); track $index) {\n <div class=\"multi-range-item\">\n <span class=\"multi-range-text\">{{ range.rangeText }}</span>\n <button \n type=\"button\" \n class=\"btn-remove-range\" \n (click)=\"removeRange($index)\"\n title=\"Remove this range\">\n <svg width=\"14\" height=\"14\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path d=\"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Footer with clear button -->\n @if (showClearButton || multiRange) {\n <div class=\"date-picker-footer\">\n @if (multiRange) {\n <div class=\"multi-range-footer-actions\">\n <button type=\"button\" class=\"btn-clear\" (click)=\"clear()\" title=\"Clear all ranges\">\n Clear All\n </button>\n <button type=\"button\" class=\"btn-done\" (click)=\"closeDatePicker()\" title=\"Done selecting\">\n Done\n </button>\n </div>\n }\n @if (!multiRange && showClearButton) {\n <button type=\"button\" class=\"btn-clear\" (click)=\"clear()\" title=\"Clear selection\">\n Clear\n </button>\n }\n </div>\n }\n </div>\n }\n</div>\n","import { PresetConfig, PresetRange } from './dual-datepicker.component';\n\n/**\n * Utility functions for creating common date range presets\n * Perfect for dashboards, reporting, POS, BI apps, and ERP systems\n */\n\n/**\n * Format a date as YYYY-MM-DD string\n */\nfunction formatDate(date: Date): string {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n}\n\n/**\n * Get the start of today\n */\nexport function getToday(): PresetRange {\n const today = new Date();\n return {\n start: formatDate(today),\n end: formatDate(today)\n };\n}\n\n/**\n * Get yesterday's date range\n */\nexport function getYesterday(): PresetRange {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n return {\n start: formatDate(yesterday),\n end: formatDate(yesterday)\n };\n}\n\n/**\n * Get last N days (including today)\n */\nexport function getLastNDays(days: number): PresetRange {\n const end = new Date();\n const start = new Date();\n start.setDate(start.getDate() - days + 1);\n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get this week (Monday to Sunday)\n */\nexport function getThisWeek(): PresetRange {\n const today = new Date();\n const dayOfWeek = today.getDay();\n const start = new Date(today);\n // Adjust to Monday (1) as first day of week\n const daysToMonday = dayOfWeek === 0 ? 6 : dayOfWeek - 1;\n start.setDate(start.getDate() - daysToMonday);\n \n const end = new Date(start);\n end.setDate(end.getDate() + 6);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get last week (Monday to Sunday)\n */\nexport function getLastWeek(): PresetRange {\n const today = new Date();\n const dayOfWeek = today.getDay();\n const daysToMonday = dayOfWeek === 0 ? 6 : dayOfWeek - 1;\n \n const lastMonday = new Date(today);\n lastMonday.setDate(lastMonday.getDate() - daysToMonday - 7);\n \n const lastSunday = new Date(lastMonday);\n lastSunday.setDate(lastSunday.getDate() + 6);\n \n return {\n start: formatDate(lastMonday),\n end: formatDate(lastSunday)\n };\n}\n\n/**\n * Get this month (1st to last day)\n */\nexport function getThisMonth(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear(), today.getMonth(), 1);\n const end = new Date(today.getFullYear(), today.getMonth() + 1, 0);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get last month (1st to last day)\n */\nexport function getLastMonth(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear(), today.getMonth() - 1, 1);\n const end = new Date(today.getFullYear(), today.getMonth(), 0);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get month to date (1st of current month to today)\n */\nexport function getMonthToDate(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear(), today.getMonth(), 1);\n \n return {\n start: formatDate(start),\n end: formatDate(today)\n };\n}\n\n/**\n * Get this quarter (Q1, Q2, Q3, or Q4)\n */\nexport function getThisQuarter(): PresetRange {\n const today = new Date();\n const currentMonth = today.getMonth();\n const quarterStartMonth = Math.floor(currentMonth / 3) * 3;\n \n const start = new Date(today.getFullYear(), quarterStartMonth, 1);\n const end = new Date(today.getFullYear(), quarterStartMonth + 3, 0);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get last quarter\n */\nexport function getLastQuarter(): PresetRange {\n const today = new Date();\n const currentMonth = today.getMonth();\n const lastQuarterStartMonth = Math.floor(currentMonth / 3) * 3 - 3;\n \n const start = new Date(today.getFullYear(), lastQuarterStartMonth, 1);\n const end = new Date(today.getFullYear(), lastQuarterStartMonth + 3, 0);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get quarter to date (start of current quarter to today)\n */\nexport function getQuarterToDate(): PresetRange {\n const today = new Date();\n const currentMonth = today.getMonth();\n const quarterStartMonth = Math.floor(currentMonth / 3) * 3;\n \n const start = new Date(today.getFullYear(), quarterStartMonth, 1);\n \n return {\n start: formatDate(start),\n end: formatDate(today)\n };\n}\n\n/**\n * Get this year (January 1 to December 31)\n */\nexport function getThisYear(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear(), 0, 1);\n const end = new Date(today.getFullYear(), 11, 31);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get last year\n */\nexport function getLastYear(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear() - 1, 0, 1);\n const end = new Date(today.getFullYear() - 1, 11, 31);\n \n return {\n start: formatDate(start),\n end: formatDate(end)\n };\n}\n\n/**\n * Get year to date (January 1 to today)\n */\nexport function getYearToDate(): PresetRange {\n const today = new Date();\n const start = new Date(today.getFullYear(), 0, 1);\n \n return {\n start: formatDate(start),\n end: formatDate(today)\n };\n}\n\n/**\n * Get last N months (including current partial month)\n */\nexport function getLastNMonths(months: number): PresetRange {\n const today = new Date();\n const start = new Date(today);\n start.setMonth(start.getMonth() - months);\n \n return {\n start: formatDate(start),\n end: formatDate(today)\n };\n}\n\n/**\n * Get last N years\n */\nexport function getLastNYears(years: number): PresetRange {\n const today = new Date();\n const start = new Date(today);\n start.setFullYear(start.getFullYear() - years);\n \n return {\n start: formatDate(start),\n end: formatDate(today)\n };\n}\n\n/**\n * Pre-built preset configurations for common use cases\n * Import and use these directly in your component\n */\nexport const CommonPresets = {\n /**\n * Dashboard presets - Perfect for analytics dashboards\n */\n dashboard: [\n { label: 'Today', getValue: getToday },\n { label: 'Yesterday', getValue: getYesterday },\n { label: 'Last 7 days', getValue: () => getLastNDays(7) },\n { label: 'Last 30 days', getValue: () => getLastNDays(30) },\n { label: 'This month', getValue: getThisMonth },\n { label: 'Last month', getValue: getLastMonth }\n ] as PresetConfig[],\n\n /**\n * Reporting presets - Perfect for business reporting\n */\n reporting: [\n { label: 'Today', getValue: getToday },\n { label: 'This week', getValue: getThisWeek },\n { label: 'Last week', getValue: getLastWeek },\n { label: 'This month', getValue: getThisMonth },\n { label: 'Last month', getValue: getLastMonth },\n { label: 'This quarter', getValue: getThisQuarter },\n { label: 'Last quarter', getValue: getLastQuarter }\n ] as PresetConfig[],\n\n /**\n * Financial presets - Perfect for ERP and accounting systems\n */\n financial: [\n { label: 'Month to date', getValue: getMonthToDate },\n { label: 'Quarter to date', getValue: getQuarterToDate },\n { label: 'Year to date', getValue: getYearToDate },\n { label: 'Last month', getValue: getLastMonth },\n { label: 'Last quarter', getValue: getLastQuarter },\n { label: 'Last year', getValue: getLastYear }\n ] as PresetConfig[],\n\n /**\n * Analytics presets - Perfect for BI and data analysis\n */\n analytics: [\n { label: 'Last 7 days', getValue: () => getLastNDays(7) },\n { label: 'Last 14 days', getValue: () => getLastNDays(14) },\n { label: 'Last 30 days', getValue: () => getLastNDays(30) },\n { label: 'Last 60 days', getValue: () => getLastNDays(60) },\n { label: 'Last 90 days', getValue: () => getLastNDays(90) },\n { label: 'Last 180 days', getValue: () => getLastNDays(180) },\n { label: 'Last 365 days', getValue: () => getLastNDays(365) }\n ] as PresetConfig[],\n\n /**\n * Simple presets - Basic common ranges\n */\n simple: [\n { label: 'Today', getValue: getToday },\n { label: 'Last 7 days', getValue: () => getLastNDays(7) },\n { label: 'Last 30 days', getValue: () => getLastNDays(30) },\n { label: 'This year', getValue: getThisYear }\n ] as PresetConfig[]\n};\n","/**\n * Public API Surface of @oneluiz/dual-datepicker\n */\n\nexport { DualDatepickerComponent } from './dual-datepicker.component';\nexport type { DateRange, MultiDateRange, PresetConfig, PresetRange, LocaleConfig } from './dual-datepicker.component';\n\n// Date Adapter System\nexport { DateAdapter, DATE_ADAPTER } from './date-adapter';\nexport { NativeDateAdapter } from './native-date-adapter';\n\n// Preset Utilities\nexport * from './preset-utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACmB,WAAW,CAAA;AAyHhC;AAED;;AAEG;MACU,YAAY,GAAG,IAAI,cAAc,CAAc,cAAc;;ACjI1E;;;AAGG;AAEG,MAAO,iBAAkB,SAAQ,WAAiB,CAAA;AACtD,IAAA,KAAK,CAAC,KAAU,EAAA;AACd,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,IAAI;AAEvB,QAAA,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,YAAA,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC;QACxB;QAEA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC1D,YAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;AAC5B,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;QACzC;AAEA,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,CAAC,IAAU,EAAE,MAAA,GAAiB,YAAY,EAAA;AAC9C,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,EAAE;AAElC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAA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,MAAM,YAAY,CAAC,EAAE,CAAC,EAAE;AAC3D,QAAA,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,EAAE,CAAC,EAAE;AAC3D,QAAA,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,EAAE,CAAC,EAAE;AAC3D,QAAA,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,GAAG,CAAC,EAAE;AAC7D,QAAA,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,GAAG,CAAC;AAC1C,KAAA;AAEnB;;AAEG;AACH,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE;AACtC,QAAA,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,EAAE;AACzD,QAAA,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC,EAAE,CAAC,EAAE;AAC3D,QAAA,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW;AAC1B;;;AC5TrB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneluiz/dual-datepicker",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "A customizable dual-calendar date range picker component for Angular 17+ with Reactive Forms, Signals, and Multi-Range support",
5
5
  "keywords": [
6
6
  "angular",
@@ -31,26 +31,22 @@
31
31
  "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",
32
32
  "@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
33
33
  },
34
- "scripts": {
35
- "build": "ng-packagr -p ng-package.json",
36
- "publish:pkg": "cd dist && npm publish --access public",
37
- "demo:serve": "ng serve demo",
38
- "demo:build": "ng build demo --base-href=/ng-dual-datepicker/ && cd docs && mv browser/* . 2>/dev/null || true && rm -rf browser 2>/dev/null || true && touch .nojekyll && cd .."
34
+ "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad",
35
+ "module": "fesm2022/oneluiz-dual-datepicker.mjs",
36
+ "typings": "index.d.ts",
37
+ "exports": {
38
+ "./package.json": {
39
+ "default": "./package.json"
40
+ },
41
+ ".": {
42
+ "types": "./index.d.ts",
43
+ "esm2022": "./esm2022/oneluiz-dual-datepicker.mjs",
44
+ "esm": "./esm2022/oneluiz-dual-datepicker.mjs",
45
+ "default": "./fesm2022/oneluiz-dual-datepicker.mjs"
46
+ }
39
47
  },
40
- "devDependencies": {
41
- "@angular-devkit/build-angular": "^18.2.14",
42
- "@angular/cli": "^18.2.14",
43
- "@angular/common": "^18.2.14",
44
- "@angular/compiler": "^18.2.14",
45
- "@angular/compiler-cli": "^18.2.14",
46
- "@angular/core": "^18.2.14",
47
- "@angular/forms": "^18.2.14",
48
- "@angular/platform-browser": "^18.2.14",
49
- "@angular/platform-browser-dynamic": "^18.2.14",
50
- "ng-packagr": "^18.2.1",
51
- "rxjs": "^7.8.2",
52
- "typescript": "5.5",
53
- "zone.js": "^0.14.10"
54
- },
55
- "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
56
- }
48
+ "sideEffects": false,
49
+ "dependencies": {
50
+ "tslib": "^2.3.0"
51
+ }
52
+ }
package/.nojekyll DELETED
File without changes
package/CHANGELOG.md DELETED
@@ -1,254 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [3.0.0] - 2026-02-19
9
-
10
- ### 🚨 BREAKING CHANGES
11
-
12
- #### Interface Property Renames (Spanish → English)
13
-
14
- All `DateRange` interface properties have been renamed to English for better international adoption:
15
-
16
- ```typescript
17
- // v2.x (DEPRECATED)
18
- interface DateRange {
19
- fechaInicio: string;
20
- fechaFin: string;
21
- rangoTexto: string;
22
- }
23
-
24
- // v3.0.0 (NEW)
25
- interface DateRange {
26
- startDate: string;
27
- endDate: string;
28
- rangeText: string;
29
- }
30
- ```
31
-
32
- **Migration**: Replace all references:
33
- - `range.fechaInicio` → `range.startDate`
34
- - `range.fechaFin` → `range.endDate`
35
- - `range.rangoTexto` → `range.rangeText`
36
-
37
- #### Component @Input Properties Renamed
38
-
39
- ```typescript
40
- // v2.x (DEPRECATED)
41
- <ngx-dual-datepicker
42
- [fechaInicio]="startDate"
43
- [fechaFin]="endDate">
44
- </ngx-dual-datepicker>
45
-
46
- // v3.0.0 (NEW)
47
- <ngx-dual-datepicker
48
- [startDate]="startDate"
49
- [endDate]="endDate">
50
- </ngx-dual-datepicker>
51
- ```
52
-
53
- #### Deprecated `daysAgo` Pattern Removed
54
-
55
- The deprecated `daysAgo` property has been completely removed from `PresetConfig`. You must now use the `getValue()` pattern:
56
-
57
- ```typescript
58
- // v2.x (NO LONGER WORKS)
59
- presets = [
60
- { label: 'Last 30 days', daysAgo: 30 }
61
- ];
62
-
63
- // v3.0.0 (REQUIRED)
64
- import { getLastNDays, CommonPresets } from '@oneluiz/dual-datepicker';
65
-
66
- // Option 1: Use helper function
67
- presets = [
68
- { label: 'Last 30 days', getValue: () => getLastNDays(30) }
69
- ];
70
-
71
- // Option 2: Use pre-built collections
72
- presets = CommonPresets.dashboard;
73
- ```
74
-
75
- #### Component Methods Renamed to English
76
-
77
- All public methods have been renamed:
78
-
79
- | v2.x | v3.0.0 |
80
- |------|--------|
81
- | `limpiar()` | `clear()` |
82
- | `seleccionarDia()` | `selectDay()` |
83
- | `cambiarMes()` | `changeMonth()` |
84
- | `cerrarDatePicker()` | `closeDatePicker()` |
85
- | `actualizarRangoFechasTexto()` | `updateDateRangeText()` |
86
- | `generarCalendarios()` | `generateCalendars()` |
87
- | `seleccionarRangoPredefinido()` | `selectPresetRange()` |
88
- | `eliminarRango()` | `removeRange()` |
89
-
90
- **Migration**: Update method calls:
91
- ```typescript
92
- // v2.x
93
- this.datepicker.limpiar();
94
-
95
- // v3.0.0
96
- this.datepicker.clear();
97
- ```
98
-
99
- #### Signals Renamed to English
100
-
101
- All internal signals have been renamed (only affects direct signal access):
102
-
103
- - `mostrarDatePicker` → `showDatePicker`
104
- - `rangoFechas` → `dateRangeText`
105
- - `fechaSeleccionandoInicio` → `selectingStartDate`
106
- - `mesActual` → `currentMonth`
107
- - `mesAnterior` → `previousMonth`
108
- - `diasMesActual` → `currentMonthDays`
109
- - `diasMesAnterior` → `previousMonthDays`
110
- - `nombreMesActual` → `currentMonthName`
111
- - `nombreMesAnterior` → `previousMonthName`
112
- - `diasSemana` → `weekDayNames`
113
-
114
- ### 📖 Migration Guide
115
-
116
- See [MIGRATION_V3.md](MIGRATION_V3.md) for complete migration instructions including:
117
- - Step-by-step migration checklist
118
- - Find & replace patterns
119
- - Before/after code examples
120
- - Rollback instructions
121
-
122
- ### 🎯 Why These Changes?
123
-
124
- 1. **International Adoption**: English property names make the library more accessible to the global developer community
125
- 2. **TypeScript Best Practices**: Aligns with Angular and TypeScript naming conventions
126
- 3. **Maintainability**: Consistent English naming reduces cognitive overhead
127
- 4. **Technical Debt Elimination**: Removed deprecated `daysAgo` pattern that was replaced by more flexible `getValue()` in v2.6.0
128
-
129
- ### ✅ What's NOT Breaking
130
-
131
- - All styling properties remain unchanged
132
- - All output events remain unchanged (`dateRangeSelected`, `dateRangeChange`, `multiDateRangeSelected`)
133
- - Component selector (`<ngx-dual-datepicker>`) unchanged
134
- - `LocaleConfig` interface unchanged
135
- - Multi-range functionality unchanged
136
- - All visual behavior unchanged
137
-
138
- ---
139
-
140
- ## [2.7.0] - 2026-02-15
141
-
142
- ### Added
143
-
144
- - **Multi-Range Support**: Select multiple non-overlapping date ranges in a single picker
145
- - New `multiRange` @Input property (boolean, default: false)
146
- - New `multiDateRangeSelected` @Output event
147
- - New `multiDateRangeChange` @Output event
148
- - Visual indicators for multiple ranges
149
- - Delete button for each range
150
- - Validation to prevent overlapping ranges
151
- - Perfect for booking systems, blackout dates, and complex scheduling
152
-
153
- ### Changed
154
-
155
- - Updated GitHub Page Documentation tab with Multi-Range section
156
- - Updated API Reference with new v2.7.0 properties
157
-
158
- ---
159
-
160
- ## [2.6.0] - 2025-12-10
161
-
162
- ### Added
163
-
164
- - **Flexible Preset System**: New `getValue()` pattern for dynamic presets
165
- - Allows custom date calculation logic
166
- - Helper functions: `getLastNDays()`, `getThisMonth()`, `getLastMonth()`, `getYearToDate()`
167
- - Pre-built preset collections: `CommonPresets.simple`, `CommonPresets.dashboard`, `CommonPresets.analytics`
168
-
169
- ### Deprecated
170
-
171
- - `daysAgo` property in `PresetConfig` (use `getValue()` instead)
172
-
173
- ---
174
-
175
- ## [2.5.0] - 2025-10-05
176
-
177
- ### Added
178
-
179
- - **Date Adapter System**: Support for third-party date libraries
180
- - DayJS adapter
181
- - date-fns adapter
182
- - Luxon adapter
183
- - Custom adapter interface
184
-
185
- ---
186
-
187
- ## [2.4.0] - 2025-08-20
188
-
189
- ### Added
190
-
191
- - **Reactive Forms Support**: Implement `ControlValueAccessor` interface
192
- - Full Angular Forms integration
193
- - Support for `ngModel`, `formControl`, `formControlName`
194
- - Validation support
195
-
196
- ### Changed
197
-
198
- - **Default `showClearButton` changed to `false`** (BREAKING CHANGE)
199
- - Redesigned clear button with minimalist UI
200
-
201
- ---
202
-
203
- ## [2.3.0] - 2025-06-15
204
-
205
- ### Added
206
-
207
- - Spanish locale support
208
- - Custom locale configuration
209
- - Internationalization (i18n) infrastructure
210
-
211
- ---
212
-
213
- ## [2.2.0] - 2025-04-10
214
-
215
- ### Added
216
-
217
- - Preset ranges (`presetRanges` @Input)
218
- - Auto-close on selection (`closeOnSelection` @Input)
219
- - Auto-close on preset selection (`closeOnPresetSelection` @Input)
220
-
221
- ---
222
-
223
- ## [2.1.0] - 2025-02-01
224
-
225
- ### Added
226
-
227
- - Custom styling properties (16 CSS customization inputs)
228
- - Theme support
229
-
230
- ---
231
-
232
- ## [2.0.0] - 2024-12-15
233
-
234
- ### Added
235
-
236
- - **Angular Signals**: Complete rewrite using Angular Signals for better reactivity and performance
237
- - Standalone component architecture
238
- - Zero dependencies
239
-
240
- ### Changed
241
-
242
- - Minimum Angular version: 17.0.0 (BREAKING CHANGE)
243
-
244
- ---
245
-
246
- ## [1.0.0] - 2024-10-01
247
-
248
- ### Added
249
-
250
- - Initial release
251
- - Basic date range picker functionality
252
- - Dual calendar view
253
- - Date range selection
254
- - Custom date range text formatting
package/GITHUB_PAGES.md DELETED
@@ -1,82 +0,0 @@
1
- # GitHub Pages Setup
2
-
3
- This project includes a live demo hosted on GitHub Pages.
4
-
5
- ## 🚀 Viewing the Demo
6
-
7
- Visit [https://oneluiz.github.io/ng-dual-datepicker/](https://oneluiz.github.io/ng-dual-datepicker/) to see the component in action.
8
-
9
- ## 🛠️ Building the Demo Locally
10
-
11
- To build and preview the demo locally:
12
-
13
- ```bash
14
- # Install dependencies
15
- npm install
16
-
17
- # Serve the demo locally
18
- npm run demo:serve
19
-
20
- # Build the demo for production
21
- npm run demo:build
22
- ```
23
-
24
- The built demo will be placed in the `docs/` directory, which is configured for GitHub Pages deployment.
25
-
26
- ## 📝 GitHub Pages Configuration
27
-
28
- To enable GitHub Pages for this repository:
29
-
30
- 1. Go to your repository settings on GitHub
31
- 2. Navigate to **Pages** in the left sidebar
32
- 3. Under **Source**, select:
33
- - **Branch**: `main` (or your default branch)
34
- - **Folder**: `/docs`
35
- 4. Click **Save**
36
- 5. Your site will be published at `https://[username].github.io/ng-dual-datepicker/`
37
-
38
- ## 🔄 Updating the Demo
39
-
40
- After making changes to the demo:
41
-
42
- ```bash
43
- # Rebuild the demo
44
- npm run demo:build
45
-
46
- # Move files from browser subfolder to docs root
47
- cd docs && mv browser/* . && rm -r browser && cd ..
48
-
49
- # Commit and push changes
50
- git add docs/
51
- git commit -m "Update demo"
52
- git push
53
- ```
54
-
55
- GitHub Pages will automatically deploy the updated demo within a few minutes.
56
-
57
- ## 📁 Project Structure
58
-
59
- ```
60
- ng-dual-datepicker/
61
- ├── src/ # Source code for the component
62
- ├── demo/ # Demo application source
63
- │ └── src/
64
- │ ├── app/ # Demo app components
65
- │ ├── index.html # Demo HTML template
66
- │ └── styles.scss # Demo styles
67
- ├── docs/ # Built demo (GitHub Pages)
68
- │ ├── .nojekyll # Tells GitHub not to use Jekyll
69
- │ ├── index.html
70
- │ └── *.js, *.css # Compiled assets
71
- └── dist/ # Built library package
72
- ```
73
-
74
- ## 🎨 Customizing the Demo
75
-
76
- The demo source code is in `demo/src/app/`. You can:
77
-
78
- - Edit `app.component.html` to change the layout
79
- - Edit `app.component.ts` to add new examples
80
- - Edit `app.component.scss` or `styles.scss` for styling
81
-
82
- After making changes, rebuild with `npm run demo:build`.