{"version":3,"file":"symbol.mjs","sources":["../../../components/date-picker/symbol.ts"],"sourcesContent":["import type { Dateable } from '@vexip-ui/utils'\nimport type { CalendarPanelSlots } from '../calendar'\nimport type { WheelSlots } from '../wheel'\n\nexport type DateType = 'year' | 'month' | 'date'\nexport type TimeType = 'hour' | 'minute' | 'second'\nexport type DateTimeType = DateType | TimeType\n\nexport type DatePickerType = 'date' | 'datetime' | 'year' | 'month'\nexport type DateShortcutsPlacement = 'top' | 'right' | 'bottom' | 'left'\nexport type TimeShortcutsPlacement = DateShortcutsPlacement\n\nexport type DatePickerFormatFn = (timestamp: number, type: 'start' | 'end') => unknown\n\nexport interface DateShortcut {\n  name: string,\n  value: Dateable | Dateable[] | (() => Dateable | Dateable[])\n}\n\nexport interface TimeShortcut {\n  name: string,\n  value: string | string[] | (() => string | string[])\n}\n\nexport interface DatePickerState {\n  type: DatePickerType,\n  currentColumn: DateTimeType,\n  enabled: Record<DateTimeType, boolean>,\n  activated: Record<DateTimeType, boolean>,\n  dateValue: Record<DateTimeType, number>,\n  enterColumn(type: 'prev' | 'next'): void\n}\n\nexport interface DisabledTime {\n  hour?(hour: number): boolean,\n  minute?(hour: number, minute: number): boolean,\n  second?(hour: number, minute: number, second: number): boolean\n}\n\nexport const enum DisabledType {\n  UPSTREAM,\n  TRUE,\n  AT_MIN_TRUE,\n  AT_MAX_TRUE,\n  FALSE\n}\n\nexport type DatePickerChangeEvent = (value: number | number[] | null) => void\nexport type TimePickerChangeEvent = (value: string | string[]) => void\n\nexport const datePickerTypes = Object.freeze<DatePickerType[]>([\n  'date',\n  'datetime',\n  'year',\n  'month'\n])\n\nexport const invalidDate = new Date('')\n\n// export const TIME_REG = /^((?:[01]?[0-9])|(?:2[0-3]))((?::[0-5]?[0-9]))?((?::[0-5]?[0-9]))?$/\nexport const TIME_REG = /^((?:\\d{1,2}))((?::\\d{1,2}))?((?::\\d{1,2}))?$/\n\nexport interface TimeWheelSlots {\n  hour?: WheelSlots['default'],\n  minute?: WheelSlots['default'],\n  second?: WheelSlots['default']\n}\n\nexport interface DatePanelSlots {\n  title?: (params: {\n    panel: DateType,\n    yearStart: number,\n    year: number,\n    month: number,\n    togglePanel: (panel: DateType) => void\n  }) => any,\n  year?: (params: {\n    year: number,\n    selected: boolean,\n    isNext: boolean,\n    disabled: boolean,\n    inRange: boolean\n  }) => any,\n  month?: (params: {\n    year: number,\n    month: number,\n    selected: boolean,\n    disabled: boolean,\n    inRange: boolean\n  }) => any,\n  week?: CalendarPanelSlots['week'],\n  date?: CalendarPanelSlots['item']\n}\n\nexport interface DatePickerSlots {\n  prefix?: () => any,\n  suffix?: () => any,\n  exchange?: () => any,\n  panelTitle?: DatePanelSlots['title'],\n  panelYear?: DatePanelSlots['year'],\n  panelMonth?: DatePanelSlots['month'],\n  panelWeek?: DatePanelSlots['week'],\n  panelDate?: DatePanelSlots['date']\n}\n\nexport interface TimePickerSlots {\n  prefix?: () => any,\n  exchange?: () => any,\n  suffix?: () => any\n}\n"],"names":["DisabledType","DisabledType2","datePickerTypes","invalidDate","TIME_REG"],"mappings":"AAuCkB,IAAAA,sBAAAA,OAChBA,EAAAC,EAAA,WAAA,CAAA,IAAA,YACAD,EAAAC,EAAA,OAAA,CAAA,IAAA,QACAD,EAAAC,EAAA,cAAA,CAAA,IAAA,eACAD,EAAAC,EAAA,cAAA,CAAA,IAAA,eACAD,EAAAC,EAAA,QAAA,CAAA,IAAA,SALgBD,IAAAA,KAAA,CAAA,CAAA;AAWL,MAAAE,IAAkB,OAAO,OAAyB;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEYC,IAAkB,oBAAA,KAAK,EAAE,GAGzBC,IAAW;"}