UNPKG

hongluan-ui

Version:
783 lines (780 loc) 33.7 kB
import { defineComponent, inject, toRef, ref, watch, computed, unref, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, withCtx, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives } from 'vue'; import dayjs from 'dayjs'; import '../../../../directives/index.mjs'; import '../../../../utils/index.mjs'; import '../../../../hooks/index.mjs'; import { HlInput } from '../../../input/index.mjs'; import { HlButton } from '../../../button/index.mjs'; import { HlGroup } from '../../../group/index.mjs'; import { HlIcon } from '../../../icon/index.mjs'; import '../../../system-icon/index.mjs'; import '../../../time-picker/index.mjs'; import { panelDateRangeProps } from '../props/panel-date-range.mjs'; import { useRangePicker } from '../composables/use-range-picker.mjs'; import { isValidRange, getDefaultValue } from '../utils.mjs'; import _sfc_main$2 from './basic-date-table.mjs'; import { useLocale } from '../../../../hooks/use-locale/index.mjs'; import { useNamespace } from '../../../../hooks/use-namespace/index.mjs'; import { extractTimeFormat, extractDateFormat } from '../../../time-picker/src/utils.mjs'; import { isArray } from '@vue/shared'; import SystemCalendar from '../../../system-icon/src/calendar.mjs'; import SystemClock from '../../../system-icon/src/clock.mjs'; import _sfc_main$1 from '../../../time-picker/src/time-picker-com/panel-time-pick.mjs'; import ClickOutside from '../../../../directives/click-outside/index.mjs'; import SystemDoubleArrowLeft from '../../../system-icon/src/double-arrow-left.mjs'; import SystemArrowLeft from '../../../system-icon/src/arrow-left.mjs'; import SystemArrowRight from '../../../system-icon/src/arrow-right.mjs'; import SystemDoubleArrowRight from '../../../system-icon/src/double-arrow-right.mjs'; const unit = "month"; const _sfc_main = /* @__PURE__ */ defineComponent({ props: panelDateRangeProps, emits: [ "pick", "set-picker-option", "calendar-change", "panel-change" ], setup(__props, { emit }) { const props = __props; const pickerBase = inject("EP_PICKER_BASE"); const { disabledDate, cellClassName, defaultTime, clearable } = pickerBase.props; const format = toRef(pickerBase.props, "format"); const shortcuts = toRef(pickerBase.props, "shortcuts"); const defaultValue = toRef(pickerBase.props, "defaultValue"); const { lang } = useLocale(); const leftDate = ref(dayjs().locale(lang.value)); const rightDate = ref(dayjs().locale(lang.value).add(1, unit)); const { namespace } = useNamespace(); const { minDate, maxDate, rangeState, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, onReset, t } = useRangePicker(props, { defaultValue, leftDate, rightDate, unit, onParsedValueChanged }); watch(() => props.visible, (visible) => { if (!visible && rangeState.value.selecting) { onReset(props.parsedValue); onSelect(false); } }); const dateUserInput = ref({ min: null, max: null }); const timeUserInput = ref({ min: null, max: null }); const leftLabel = computed(() => { return `${leftDate.value.year()} ${t("hl.datepicker.year")} ${t(`hl.datepicker.month${leftDate.value.month() + 1}`)}`; }); const rightLabel = computed(() => { return `${rightDate.value.year()} ${t("hl.datepicker.year")} ${t(`hl.datepicker.month${rightDate.value.month() + 1}`)}`; }); const leftYear = computed(() => { return leftDate.value.year(); }); const leftMonth = computed(() => { return leftDate.value.month(); }); const rightYear = computed(() => { return rightDate.value.year(); }); const rightMonth = computed(() => { return rightDate.value.month(); }); const hasShortcuts = computed(() => !!shortcuts.value.length); const minVisibleDate = computed(() => { if (dateUserInput.value.min !== null) return dateUserInput.value.min; if (minDate.value) return minDate.value.format(dateFormat.value); return ""; }); const maxVisibleDate = computed(() => { if (dateUserInput.value.max !== null) return dateUserInput.value.max; if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(dateFormat.value); return ""; }); const minVisibleTime = computed(() => { if (timeUserInput.value.min !== null) return timeUserInput.value.min; if (minDate.value) return minDate.value.format(timeFormat.value); return ""; }); const maxVisibleTime = computed(() => { if (timeUserInput.value.max !== null) return timeUserInput.value.max; if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(timeFormat.value); return ""; }); const timeFormat = computed(() => { return props.timeFormat || extractTimeFormat(format.value); }); const dateFormat = computed(() => { return props.dateFormat || extractDateFormat(format.value); }); const isValidValue = (date) => { return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true); }; const leftPrevYear = () => { leftDate.value = leftDate.value.subtract(1, "year"); if (!props.unlinkPanels) { rightDate.value = leftDate.value.add(1, "month"); } handlePanelChange("year"); }; const leftPrevMonth = () => { leftDate.value = leftDate.value.subtract(1, "month"); if (!props.unlinkPanels) { rightDate.value = leftDate.value.add(1, "month"); } handlePanelChange("month"); }; const rightNextYear = () => { if (!props.unlinkPanels) { leftDate.value = leftDate.value.add(1, "year"); rightDate.value = leftDate.value.add(1, "month"); } else { rightDate.value = rightDate.value.add(1, "year"); } handlePanelChange("year"); }; const rightNextMonth = () => { if (!props.unlinkPanels) { leftDate.value = leftDate.value.add(1, "month"); rightDate.value = leftDate.value.add(1, "month"); } else { rightDate.value = rightDate.value.add(1, "month"); } handlePanelChange("month"); }; const leftNextYear = () => { leftDate.value = leftDate.value.add(1, "year"); handlePanelChange("year"); }; const leftNextMonth = () => { leftDate.value = leftDate.value.add(1, "month"); handlePanelChange("month"); }; const rightPrevYear = () => { rightDate.value = rightDate.value.subtract(1, "year"); handlePanelChange("year"); }; const rightPrevMonth = () => { rightDate.value = rightDate.value.subtract(1, "month"); handlePanelChange("month"); }; const handlePanelChange = (mode) => { emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode); }; const enableMonthArrow = computed(() => { const nextMonth = (leftMonth.value + 1) % 12; const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0; return props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value); }); const enableYearArrow = computed(() => { return props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12; }); const btnDisabled = computed(() => { return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange([minDate.value, maxDate.value])); }); const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange"); const formatEmit = (emitDayjs, index) => { if (!emitDayjs) return; if (defaultTime) { const defaultTimeD = dayjs(defaultTime[index] || defaultTime).locale(lang.value); return defaultTimeD.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date()); } return emitDayjs; }; const handleRangePick = (val, close = true) => { const min_ = val.minDate; const max_ = val.maxDate; const minDate_ = formatEmit(min_, 0); const maxDate_ = formatEmit(max_, 1); if (maxDate.value === maxDate_ && minDate.value === minDate_) { return; } emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]); maxDate.value = maxDate_; minDate.value = minDate_; if (!close || showTime.value) return; handleRangeConfirm(); }; const minTimePickerVisible = ref(false); const maxTimePickerVisible = ref(false); const handleMinTimeClose = () => { minTimePickerVisible.value = false; }; const handleMaxTimeClose = () => { maxTimePickerVisible.value = false; }; const handleDateInput = (value, type) => { dateUserInput.value[type] = value; const parsedValueD = dayjs(value, dateFormat.value).locale(lang.value); if (parsedValueD.isValid()) { if (disabledDate && disabledDate(parsedValueD.toDate())) { return; } if (type === "min") { leftDate.value = parsedValueD; minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); if (!props.unlinkPanels && (!maxDate.value || maxDate.value.isBefore(minDate.value))) { rightDate.value = parsedValueD.add(1, "month"); maxDate.value = minDate.value.add(1, "month"); } } else { rightDate.value = parsedValueD; maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date()); if (!props.unlinkPanels && (!minDate.value || minDate.value.isAfter(maxDate.value))) { leftDate.value = parsedValueD.subtract(1, "month"); minDate.value = maxDate.value.subtract(1, "month"); } } } }; const handleDateChange = (_, type) => { dateUserInput.value[type] = null; }; const handleTimeInput = (value, type) => { timeUserInput.value[type] = value; const parsedValueD = dayjs(value, timeFormat.value).locale(lang.value); if (parsedValueD.isValid()) { if (type === "min") { minTimePickerVisible.value = true; minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second()); } else { maxTimePickerVisible.value = true; maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second()); rightDate.value = maxDate.value; } } }; const handleTimeChange = (value, type) => { timeUserInput.value[type] = null; if (type === "min") { leftDate.value = minDate.value; minTimePickerVisible.value = false; if (!maxDate.value || maxDate.value.isBefore(minDate.value)) { maxDate.value = minDate.value; } } else { rightDate.value = maxDate.value; maxTimePickerVisible.value = false; if (maxDate.value && maxDate.value.isBefore(minDate.value)) { minDate.value = maxDate.value; } } }; const handleMinTimePick = (value, visible, first) => { if (timeUserInput.value.min) return; if (value) { leftDate.value = value; minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second()); } if (!first) { minTimePickerVisible.value = visible; } if (!maxDate.value || maxDate.value.isBefore(minDate.value)) { maxDate.value = minDate.value; rightDate.value = value; } }; const handleMaxTimePick = (value, visible, first) => { if (timeUserInput.value.max) return; if (value) { rightDate.value = value; maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second()); } if (!first) { maxTimePickerVisible.value = visible; } if (maxDate.value && maxDate.value.isBefore(minDate.value)) { minDate.value = maxDate.value; } }; const handleClear = () => { leftDate.value = getDefaultValue(unref(defaultValue), { lang: unref(lang), unit: "month", unlinkPanels: props.unlinkPanels })[0]; rightDate.value = leftDate.value.add(1, "month"); maxDate.value = void 0; minDate.value = void 0; emit("pick", null); }; const formatToString = (value) => { return isArray(value) ? value.map((_) => _.format(format.value)) : value.format(format.value); }; const parseUserInput = (value) => { return isArray(value) ? value.map((_) => dayjs(_, format.value).locale(lang.value)) : dayjs(value, format.value).locale(lang.value); }; function onParsedValueChanged(minDate2, maxDate2) { if (props.unlinkPanels && maxDate2) { const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0; const minDateMonth = (minDate2 == null ? void 0 : minDate2.month()) || 0; const maxDateYear = maxDate2.year(); const maxDateMonth = maxDate2.month(); rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate2.add(1, unit) : maxDate2; } else { rightDate.value = leftDate.value.add(1, unit); if (maxDate2) { rightDate.value = rightDate.value.hour(maxDate2.hour()).minute(maxDate2.minute()).second(maxDate2.second()); } } } emit("set-picker-option", ["isValidValue", isValidValue]); emit("set-picker-option", ["parseUserInput", parseUserInput]); emit("set-picker-option", ["formatToString", formatToString]); emit("set-picker-option", ["handleClear", handleClear]); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: normalizeClass(["range-picker", [{ "has-sidebar": _ctx.$slots.sidebar || unref(hasShortcuts), "has-time": unref(showTime) }, unref(namespace) + "-date-picker"]]) }, [ createElementVNode("div", { class: "picker-wrapper" }, [ renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(["picker-sidebar", unref(namespace) + "-group", "vertical"]) }), unref(hasShortcuts) ? (openBlock(), createBlock(unref(HlGroup), { key: 0, class: normalizeClass(["picker-sidebar"]), dir: "vertical" }, { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => { return openBlock(), createBlock(unref(HlGroup), { key, class: "p-x-sm p-y-xxs hover:text-hover cursor-pointer", onClick: ($event) => unref(handleShortcutClick)(shortcut) }, { default: withCtx(() => [ createTextVNode(toDisplayString(shortcut.text), 1) ]), _: 2 }, 1032, ["onClick"]); }), 128)) ]), _: 1 })) : createCommentVNode("v-if", true), createElementVNode("div", { class: "picker-body" }, [ unref(showTime) ? (openBlock(), createElementBlock("div", { key: 0, class: "picker-body-header-wrapper" }, [ createVNode(unref(HlGroup), { class: "picker-time-header", "deep-merge": "", indent: "", full: "" }, { default: withCtx(() => [ createVNode(unref(HlInput), { size: "sm", disabled: unref(rangeState).selecting, placeholder: unref(t)("hl.datepicker.startDate"), "validate-event": false, "model-value": unref(minVisibleDate), onInput: (val) => handleDateInput(val, "min"), onChange: (val) => handleDateChange(val, "min") }, { prefix: withCtx(() => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemCalendar)) ]), _: 1 }) ]), _: 1 }, 8, ["disabled", "placeholder", "model-value", "onInput", "onChange"]), withDirectives((openBlock(), createElementBlock("div", null, [ createVNode(unref(HlInput), { size: "sm", disabled: unref(rangeState).selecting, placeholder: unref(t)("hl.datepicker.startTime"), "model-value": unref(minVisibleTime), "validate-event": false, onFocus: ($event) => minTimePickerVisible.value = true, onInput: (val) => handleTimeInput(val, "min"), onChange: (val) => handleTimeChange(val, "min") }, { prefix: withCtx(() => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemClock)) ]), _: 1 }) ]), _: 1 }, 8, ["disabled", "placeholder", "model-value", "onFocus", "onInput", "onChange"]), createVNode(unref(_sfc_main$1), { visible: minTimePickerVisible.value, format: unref(timeFormat), "datetime-role": "start", "parsed-value": leftDate.value, onPick: handleMinTimePick }, null, 8, ["visible", "format", "parsed-value"]) ])), [ [unref(ClickOutside), handleMinTimeClose] ]) ]), _: 1 }), createVNode(unref(HlButton), { size: "sm", class: "range-separator" }), createVNode(unref(HlGroup), { class: "picker-time-header is-right", "deep-merge": "", indent: "", full: "" }, { default: withCtx(() => [ createVNode(unref(HlInput), { size: "sm", disabled: unref(rangeState).selecting, placeholder: unref(t)("hl.datepicker.endDate"), "model-value": unref(maxVisibleDate), readonly: !unref(minDate), "validate-event": false, onInput: (val) => handleDateInput(val, "max"), onChange: (val) => handleDateChange(val, "max") }, { prefix: withCtx(() => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemCalendar)) ]), _: 1 }) ]), _: 1 }, 8, ["disabled", "placeholder", "model-value", "readonly", "onInput", "onChange"]), withDirectives((openBlock(), createElementBlock("div", null, [ createVNode(unref(HlInput), { size: "sm", disabled: unref(rangeState).selecting, placeholder: unref(t)("hl.datepicker.endTime"), "model-value": unref(maxVisibleTime), readonly: !unref(minDate), "validate-event": false, onFocus: ($event) => unref(minDate) && (maxTimePickerVisible.value = true), onInput: (val) => handleTimeInput(val, "max"), onChange: (val) => handleTimeChange(val, "max") }, { prefix: withCtx(() => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemClock)) ]), _: 1 }) ]), _: 1 }, 8, ["disabled", "placeholder", "model-value", "readonly", "onFocus", "onInput", "onChange"]), createVNode(unref(_sfc_main$1), { "datetime-role": "end", visible: maxTimePickerVisible.value, format: unref(timeFormat), "parsed-value": rightDate.value, onPick: handleMaxTimePick }, null, 8, ["visible", "format", "parsed-value"]) ])), [ [unref(ClickOutside), handleMaxTimeClose] ]) ]), _: 1 }) ])) : createCommentVNode("v-if", true), createElementVNode("div", { class: "picker-body-content is-left" }, [ createVNode(unref(HlGroup), { class: "picker-body-header", full: "" }, { default: withCtx(() => [ createElementVNode("div", { class: "static" }, [ createVNode(unref(HlButton), { type: "link", size: "sm", class: "prev-year", "aria-label": unref(t)(`hl.datepicker.prevYear`), equal: "", onClick: leftPrevYear }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "prev-year", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemDoubleArrowLeft)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["aria-label"]), createVNode(unref(HlButton), { type: "link", size: "sm", class: "prev-month", "aria-label": unref(t)(`hl.datepicker.prevMonth`), equal: "", onClick: leftPrevMonth }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "prev-month", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemArrowLeft)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["aria-label"]) ]), createElementVNode("div", { class: "header-label" }, [ createVNode(unref(HlButton), { type: "link" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(leftLabel)), 1) ]), _: 1 }) ]), createElementVNode("div", { class: "static" }, [ _ctx.unlinkPanels ? (openBlock(), createBlock(unref(HlButton), { key: 0, type: "link", size: "sm", disabled: !unref(enableMonthArrow), class: normalizeClass([{ "is-disabled": !unref(enableMonthArrow) }, "group-item next-month"]), "aria-label": unref(t)(`hl.datepicker.nextMonth`), equal: "", onClick: leftNextMonth }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "next-month", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemArrowRight)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["disabled", "class", "aria-label"])) : createCommentVNode("v-if", true), _ctx.unlinkPanels ? (openBlock(), createBlock(unref(HlButton), { key: 1, type: "link", size: "sm", disabled: !unref(enableYearArrow), class: normalizeClass([{ "is-disabled": !unref(enableYearArrow) }, "group-item next-year"]), "aria-label": unref(t)(`hl.datepicker.nextYear`), equal: "", onClick: leftNextYear }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "next-year", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemDoubleArrowRight)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["disabled", "class", "aria-label"])) : createCommentVNode("v-if", true) ]) ]), _: 3 }), createVNode(_sfc_main$2, { "selection-mode": "range", date: leftDate.value, "min-date": unref(minDate), "max-date": unref(maxDate), "range-state": unref(rangeState), "disabled-date": unref(disabledDate), "cell-class-name": unref(cellClassName), onChangerange: unref(handleChangeRange), onPick: handleRangePick, onSelect: unref(onSelect) }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "onChangerange", "onSelect"]) ]), createElementVNode("div", { class: "picker-body-content is-right" }, [ createVNode(unref(HlGroup), { class: "picker-body-header", full: "" }, { default: withCtx(() => [ createElementVNode("div", { class: "static" }, [ _ctx.unlinkPanels ? (openBlock(), createBlock(unref(HlButton), { key: 0, size: "sm", disabled: !unref(enableYearArrow), class: normalizeClass([{ "is-disabled": !unref(enableYearArrow) }, "prev-year"]), "aria-label": unref(t)(`hl.datepicker.prevYear`), equal: "", onClick: rightPrevYear }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "prev-year", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemDoubleArrowLeft)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["disabled", "class", "aria-label"])) : createCommentVNode("v-if", true), _ctx.unlinkPanels ? (openBlock(), createBlock(unref(HlButton), { key: 1, size: "sm", disabled: !unref(enableMonthArrow), class: normalizeClass([{ "is-disabled": !unref(enableMonthArrow) }, "prev-month"]), "aria-label": unref(t)(`hl.datepicker.prevMonth`), equal: "", onClick: rightPrevMonth }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "prev-month", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemArrowLeft)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["disabled", "class", "aria-label"])) : createCommentVNode("v-if", true) ]), createElementVNode("div", { class: "header-label" }, [ createVNode(unref(HlButton), null, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(rightLabel)), 1) ]), _: 1 }) ]), createElementVNode("div", { class: "static" }, [ createVNode(unref(HlButton), { size: "sm", class: "next-month", "aria-label": unref(t)(`hl.datepicker.nextMonth`), equal: "", onClick: rightNextMonth }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "next-month", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemArrowRight)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["aria-label"]), createVNode(unref(HlButton), { size: "sm", class: "next-year", "aria-label": unref(t)(`hl.datepicker.nextYear`), equal: "", onClick: rightNextYear }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "next-year", {}, () => [ createVNode(unref(HlIcon), null, { default: withCtx(() => [ createVNode(unref(SystemDoubleArrowRight)) ]), _: 1 }) ]) ]), _: 3 }, 8, ["aria-label"]) ]) ]), _: 3 }), createVNode(_sfc_main$2, { "selection-mode": "range", date: rightDate.value, "min-date": unref(minDate), "max-date": unref(maxDate), "range-state": unref(rangeState), "disabled-date": unref(disabledDate), "cell-class-name": unref(cellClassName), onChangerange: unref(handleChangeRange), onPick: handleRangePick, onSelect: unref(onSelect) }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "onChangerange", "onSelect"]) ]) ]) ]), unref(showTime) ? (openBlock(), createElementBlock("div", { key: 0, class: "picker-footer" }, [ unref(clearable) ? (openBlock(), createBlock(unref(HlButton), { key: 0, class: "", onClick: handleClear }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("hl.datepicker.clear")), 1) ]), _: 1 })) : createCommentVNode("v-if", true), createVNode(unref(HlButton), { type: "primary", class: "", disabled: unref(btnDisabled), onClick: ($event) => unref(handleRangeConfirm)(false) }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(t)("hl.datepicker.confirm")), 1) ]), _: 1 }, 8, ["disabled", "onClick"]) ])) : createCommentVNode("v-if", true) ], 2); }; } }); export { _sfc_main as default }; //# sourceMappingURL=panel-date-range.mjs.map