{"version":3,"file":"time-picker.js","sources":["../../../../../../packages/components/time-picker/src/time-picker.tsx"],"sourcesContent":["import { defineComponent, provide, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport { DEFAULT_FORMATS_TIME } from './constants'\nimport Picker from './common/picker.vue'\nimport TimePickPanel from './time-picker-com/panel-time-pick.vue'\nimport TimeRangePanel from './time-picker-com/panel-time-range.vue'\nimport { timePickerDefaultProps } from './common/props'\ndayjs.extend(customParseFormat)\n\nexport default defineComponent({\n name: 'ElTimePicker',\n install: null,\n props: {\n ...timePickerDefaultProps,\n /**\n * @description whether to pick a time range\n */\n isRange: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['update:modelValue'],\n setup(props, ctx) {\n const commonPicker = ref>()\n const [type, Panel] = props.isRange\n ? ['timerange', TimeRangePanel]\n : ['time', TimePickPanel]\n\n const modelUpdater = (value: any) => ctx.emit('update:modelValue', value)\n provide('ElPopperOptions', props.popperOptions)\n ctx.expose({\n /**\n * @description focus the Input component\n */\n focus: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleFocusInput(e)\n },\n /**\n * @description blur the Input component\n */\n blur: (e: FocusEvent | undefined) => {\n commonPicker.value?.handleBlurInput(e)\n },\n /**\n * @description open the TimePicker popper\n */\n handleOpen: () => {\n commonPicker.value?.handleOpen()\n },\n /**\n * @description close the TimePicker popper\n */\n handleClose: () => {\n commonPicker.value?.handleClose()\n },\n })\n\n return () => {\n const format = props.format ?? DEFAULT_FORMATS_TIME\n\n return (\n \n {{\n default: (props: any) => ,\n }}\n \n )\n }\n },\n})\n"],"names":["dayjs","extend","customParseFormat","defineComponent","name","install","props","isRange","type","default","ref","TimeRangePanel","TimePickPanel","setup","commonPicker","modelUpdater","value","ctx","emit","provide","expose","handleFocusInput","blur","_createVNode","Picker","_mergeProps","handleOpen","handleClose"],"mappings":";;;;;;;;;;;;;;;;;;AAQAA,yBAAK,CAACC,MAAN,CAAaC,qCAAb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