hongluan-ui
Version:
Hongluan Component Library for Vue 3
741 lines (738 loc) • 30.3 kB
JavaScript
import { defineComponent, useAttrs, useSlots, inject, toRef, ref, computed, nextTick, watch, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives, vShow, withKeys } from 'vue';
import dayjs from 'dayjs';
import '../../../../directives/index.mjs';
import '../../../../hooks/index.mjs';
import '../../../time-picker/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 '../../../../utils/index.mjs';
import '../../../../constants/index.mjs';
import '../../../../tokens/index.mjs';
import { panelDatePickProps } from '../props/panel-date-pick.mjs';
import { getValidDateOfMonth, getValidDateOfYear } from '../utils.mjs';
import _sfc_main$2 from './basic-date-table.mjs';
import _sfc_main$4 from './basic-month-table.mjs';
import _sfc_main$3 from './basic-year-table.mjs';
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
import { TOOLTIP_INJECTION_KEY } from '../../../../tokens/tooltip.mjs';
import { isArray, isFunction } from '@vue/shared';
import { extractTimeFormat, extractDateFormat } from '../../../time-picker/src/utils.mjs';
import { EVENT_CODE } from '../../../../constants/aria.mjs';
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 _sfc_main = /* @__PURE__ */ defineComponent({
props: panelDatePickProps,
emits: ["pick", "set-picker-option", "panel-change"],
setup(__props, { emit: contextEmit }) {
const props = __props;
const timeWithinRange = (_, __, ___) => true;
const attrs = useAttrs();
const slots = useSlots();
const { t, lang } = useLocale();
const { namespace } = useNamespace();
const pickerBase = inject("EP_PICKER_BASE");
const popper = inject(TOOLTIP_INJECTION_KEY);
const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props;
const defaultValue = toRef(pickerBase.props, "defaultValue");
const currentViewRef = ref();
const innerDate = ref(dayjs().locale(lang.value));
const isChangeToNow = ref(false);
let isShortcut = false;
const defaultTimeD = computed(() => {
return dayjs(defaultTime).locale(lang.value);
});
const month = computed(() => {
return innerDate.value.month();
});
const year = computed(() => {
return innerDate.value.year();
});
const selectableRange = ref([]);
const userInputDate = ref(null);
const userInputTime = ref(null);
const checkDateWithinRange = (date) => {
return selectableRange.value.length > 0 ? timeWithinRange(date, selectableRange.value, props.format || "HH:mm:ss") : true;
};
const formatEmit = (emitDayjs) => {
if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) {
return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
}
if (showTime.value)
return emitDayjs.millisecond(0);
return emitDayjs.startOf("day");
};
const emit = (value, ...args) => {
if (!value) {
contextEmit("pick", value, ...args);
} else if (isArray(value)) {
const dates = value.map(formatEmit);
contextEmit("pick", dates, ...args);
} else {
contextEmit("pick", formatEmit(value), ...args);
}
userInputDate.value = null;
userInputTime.value = null;
isChangeToNow.value = false;
isShortcut = false;
};
const handleDatePick = async (value, keepOpen) => {
if (selectionMode.value === "date") {
value = value;
let newDate = props.parsedValue ? props.parsedValue.year(value.year()).month(value.month()).date(value.date()) : value;
if (!checkDateWithinRange(newDate)) {
newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
}
innerDate.value = newDate;
emit(newDate, showTime.value || keepOpen);
if (props.type === "datetime") {
await nextTick();
handleFocusPicker();
}
} else if (selectionMode.value === "week") {
emit(value.date);
} else if (selectionMode.value === "dates") {
emit(value, true);
}
};
const moveByMonth = (forward) => {
const action = forward ? "add" : "subtract";
innerDate.value = innerDate.value[action](1, "month");
handlePanelChange("month");
};
const moveByYear = (forward) => {
const currentDate = innerDate.value;
const action = forward ? "add" : "subtract";
innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year");
handlePanelChange("year");
};
const currentView = ref("date");
const yearLabel = computed(() => {
const yearTranslation = t("hl.datepicker.year");
if (currentView.value === "year") {
const startYear = Math.floor(year.value / 10) * 10;
if (yearTranslation) {
return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`;
}
return `${startYear} - ${startYear + 9}`;
}
return `${year.value} ${yearTranslation}`;
});
const handleShortcutClick = (shortcut) => {
const shortcutValue = isFunction(shortcut.value) ? shortcut.value() : shortcut.value;
if (shortcutValue) {
isShortcut = true;
emit(dayjs(shortcutValue).locale(lang.value));
return;
}
if (shortcut.onClick) {
shortcut.onClick({
attrs,
slots,
emit: contextEmit
});
}
};
const selectionMode = computed(() => {
const { type } = props;
if (["week", "month", "months", "year", "years", "dates"].includes(type))
return type;
return "date";
});
const isMultipleType = computed(() => {
return selectionMode.value === "dates" || selectionMode.value === "months" || selectionMode.value === "years";
});
const keyboardMode = computed(() => {
return selectionMode.value === "date" ? currentView.value : selectionMode.value;
});
const hasShortcuts = computed(() => !!shortcuts.length);
const handleMonthPick = async (month2, keepOpen) => {
if (selectionMode.value === "month") {
innerDate.value = getValidDateOfMonth(innerDate.value.year(), month2, lang.value, disabledDate);
emit(innerDate.value, false);
} else if (selectionMode.value === "months") {
emit(month2, keepOpen != null ? keepOpen : true);
} else {
innerDate.value = getValidDateOfMonth(innerDate.value.year(), month2, lang.value, disabledDate);
currentView.value = "date";
if (["month", "year", "date", "week"].includes(selectionMode.value)) {
emit(innerDate.value, true);
await nextTick();
handleFocusPicker();
}
}
handlePanelChange("month");
};
const handleYearPick = async (year2, keepOpen) => {
if (selectionMode.value === "year") {
const data = innerDate.value.startOf("year").year(year2);
innerDate.value = getValidDateOfYear(data, lang.value, disabledDate);
emit(innerDate.value, false);
} else if (selectionMode.value === "years") {
emit(year2, keepOpen != null ? keepOpen : true);
} else {
const data = innerDate.value.year(year2);
innerDate.value = getValidDateOfYear(data, lang.value, disabledDate);
currentView.value = "month";
if (["month", "year", "date", "week"].includes(selectionMode.value)) {
emit(innerDate.value, true);
await nextTick();
handleFocusPicker();
}
}
handlePanelChange("year");
};
const showPicker = async (view) => {
currentView.value = view;
await nextTick();
handleFocusPicker();
};
const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
const footerVisible = computed(() => {
const showDateFooter = showTime.value || selectionMode.value === "dates";
const showYearFooter = selectionMode.value === "years";
const showMonthFooter = selectionMode.value === "months";
const isDateView = currentView.value === "date";
const isYearView = currentView.value === "year";
const isMonthView = currentView.value === "month";
return showDateFooter && isDateView || showYearFooter && isYearView || showMonthFooter && isMonthView;
});
const disabledConfirm = computed(() => {
if (!disabledDate)
return false;
if (!props.parsedValue)
return true;
if (isArray(props.parsedValue)) {
return disabledDate(props.parsedValue[0].toDate());
}
return disabledDate(props.parsedValue.toDate());
});
const onConfirm = () => {
if (isMultipleType.value) {
emit(props.parsedValue);
} else {
let result = props.parsedValue;
if (!result) {
const defaultTimeD2 = dayjs(defaultTime).locale(lang.value);
const defaultValueD = getDefaultValue();
result = defaultTimeD2.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());
}
innerDate.value = result;
emit(result);
}
};
const disabledNow = computed(() => {
if (!disabledDate)
return false;
return disabledDate(dayjs().locale(lang.value).toDate());
});
const changeToNow = () => {
const now = dayjs().locale(lang.value);
const nowDate = now.toDate();
isChangeToNow.value = true;
if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) {
innerDate.value = dayjs().locale(lang.value);
emit(innerDate.value);
}
};
const timeFormat = computed(() => {
return props.timeFormat || extractTimeFormat(props.format);
});
const dateFormat = computed(() => {
return props.dateFormat || extractDateFormat(props.format);
});
const visibleTime = computed(() => {
if (userInputTime.value)
return userInputTime.value;
if (!props.parsedValue && !defaultValue.value)
return;
return (props.parsedValue || innerDate.value).format(timeFormat.value);
});
const visibleDate = computed(() => {
if (userInputDate.value)
return userInputDate.value;
if (!props.parsedValue && !defaultValue.value)
return;
return (props.parsedValue || innerDate.value).format(dateFormat.value);
});
const timePickerVisible = ref(false);
const onTimePickerInputFocus = () => {
timePickerVisible.value = true;
};
const handleTimePickClose = () => {
timePickerVisible.value = false;
};
const getUnits = (date) => {
return {
hour: date.hour(),
minute: date.minute(),
second: date.second(),
year: date.year(),
month: date.month(),
date: date.date()
};
};
const handleTimePick = (value, visible, first) => {
const { hour, minute, second } = getUnits(value);
const newDate = props.parsedValue ? props.parsedValue.hour(hour).minute(minute).second(second) : value;
innerDate.value = newDate;
emit(innerDate.value, true);
if (!first) {
timePickerVisible.value = visible;
}
};
const handleVisibleTimeChange = (value) => {
const newDate = dayjs(value, timeFormat.value).locale(lang.value);
if (newDate.isValid() && checkDateWithinRange(newDate)) {
const { year: year2, month: month2, date } = getUnits(innerDate.value);
innerDate.value = newDate.year(year2).month(month2).date(date);
userInputTime.value = null;
timePickerVisible.value = false;
emit(innerDate.value, true);
}
};
const handleVisibleDateChange = (value) => {
const newDate = dayjs(value, dateFormat.value).locale(lang.value);
if (newDate.isValid()) {
if (disabledDate && disabledDate(newDate.toDate())) {
return;
}
const { hour, minute, second } = getUnits(innerDate.value);
innerDate.value = newDate.hour(hour).minute(minute).second(second);
userInputDate.value = null;
emit(innerDate.value, true);
}
};
const isValidValue = (date) => {
return dayjs.isDayjs(date) && date.isValid() && (disabledDate ? !disabledDate(date.toDate()) : true);
};
const formatToString = (value) => {
return isArray(value) ? value.map((_) => _.format(props.format)) : value.format(props.format);
};
const parseUserInput = (value) => {
return dayjs(value, props.format).locale(lang.value);
};
const getDefaultValue = () => {
const parseDate = dayjs(defaultValue.value).locale(lang.value);
if (!defaultValue.value) {
const defaultTimeDValue = defaultTimeD.value;
return dayjs().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value);
}
return parseDate;
};
const handleFocusPicker = async () => {
var _a;
if (["week", "month", "year", "date"].includes(selectionMode.value)) {
(_a = currentViewRef.value) == null ? void 0 : _a.focus();
if (selectionMode.value === "week") {
handleKeyControl(EVENT_CODE.down);
}
}
};
const handleKeydownTable = (event) => {
const { code } = event;
const validCode = [
EVENT_CODE.up,
EVENT_CODE.down,
EVENT_CODE.left,
EVENT_CODE.right,
EVENT_CODE.home,
EVENT_CODE.end,
EVENT_CODE.pageUp,
EVENT_CODE.pageDown
];
if (validCode.includes(code)) {
handleKeyControl(code);
event.stopPropagation();
event.preventDefault();
}
if ([EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.numpadEnter].includes(code) && userInputDate.value === null && userInputTime.value === null) {
event.preventDefault();
emit(innerDate.value, false);
}
};
const handleKeyControl = (code) => {
var _a;
const { up, down, left, right, home, end, pageUp, pageDown } = EVENT_CODE;
const mapping = {
year: {
[up]: -4,
[down]: 4,
[left]: -1,
[right]: 1,
offset: (date, step) => date.setFullYear(date.getFullYear() + step)
},
month: {
[up]: -4,
[down]: 4,
[left]: -1,
[right]: 1,
offset: (date, step) => date.setMonth(date.getMonth() + step)
},
week: {
[up]: -1,
[down]: 1,
[left]: -1,
[right]: 1,
offset: (date, step) => date.setDate(date.getDate() + step * 7)
},
date: {
[up]: -7,
[down]: 7,
[left]: -1,
[right]: 1,
[home]: (date) => -date.getDay(),
[end]: (date) => -date.getDay() + 6,
[pageUp]: (date) => -new Date(date.getFullYear(), date.getMonth(), 0).getDate(),
[pageDown]: (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(),
offset: (date, step) => date.setDate(date.getDate() + step)
}
};
const newDate = innerDate.value.toDate();
while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) {
const map = mapping[keyboardMode.value];
if (!map)
return;
map.offset(newDate, isFunction(map[code]) ? map[code](newDate) : (_a = map[code]) != null ? _a : 0);
if (disabledDate && disabledDate(newDate)) {
break;
}
const result = dayjs(newDate).locale(lang.value);
innerDate.value = result;
contextEmit("pick", result, true);
break;
}
};
const handlePanelChange = (mode) => {
contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value);
};
watch(() => selectionMode.value, (val) => {
if (["month", "year"].includes(val)) {
currentView.value = val;
return;
} else if (val === "years") {
currentView.value = "year";
return;
} else if (val === "months") {
currentView.value = "month";
return;
}
currentView.value = "date";
}, { immediate: true });
watch(() => currentView.value, () => {
popper == null ? void 0 : popper.updatePopper();
});
watch(() => defaultValue.value, (val) => {
if (val) {
innerDate.value = getDefaultValue();
}
}, { immediate: true });
watch(() => props.parsedValue, (val) => {
if (val) {
if (isMultipleType.value)
return;
if (Array.isArray(val))
return;
innerDate.value = val;
} else {
innerDate.value = getDefaultValue();
}
}, { immediate: true });
contextEmit("set-picker-option", ["isValidValue", isValidValue]);
contextEmit("set-picker-option", ["formatToString", formatToString]);
contextEmit("set-picker-option", ["parseUserInput", parseUserInput]);
contextEmit("set-picker-option", ["handleFocusPicker", handleFocusPicker]);
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", {
class: normalizeClass([
{
"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) => 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(), createBlock(unref(HlGroup), {
key: 0,
class: "picker-time-header",
"deep-merge": "",
indent: "",
full: ""
}, {
default: withCtx(() => [
createVNode(unref(HlInput), {
placeholder: unref(t)("hl.datepicker.selectDate"),
size: "sm",
"model-value": unref(visibleDate),
"validate-event": false,
onInput: (val) => userInputDate.value = val,
onChange: handleVisibleDateChange
}, {
prefix: withCtx(() => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemCalendar))
]),
_: 1
})
]),
_: 1
}, 8, ["placeholder", "model-value", "onInput"]),
withDirectives((openBlock(), createElementBlock("div", null, [
createVNode(unref(HlInput), {
placeholder: unref(t)("hl.datepicker.selectTime"),
"model-value": unref(visibleTime),
size: "sm",
"validate-event": false,
onFocus: onTimePickerInputFocus,
onInput: (val) => userInputTime.value = val,
onChange: handleVisibleTimeChange
}, {
prefix: withCtx(() => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemClock))
]),
_: 1
})
]),
_: 1
}, 8, ["placeholder", "model-value", "onInput"]),
createVNode(unref(_sfc_main$1), {
visible: timePickerVisible.value,
format: unref(timeFormat),
"parsed-value": innerDate.value,
onPick: handleTimePick
}, null, 8, ["visible", "format", "parsed-value"])
])), [
[unref(ClickOutside), handleTimePickClose]
])
]),
_: 1
})) : createCommentVNode("v-if", true),
createCommentVNode(`:class="{ '': currentView === 'year' || currentView === 'month' }"`),
withDirectives(createElementVNode("div", {
class: normalizeClass(["picker-body-header", unref(namespace) + "-group", "full"])
}, [
createElementVNode("div", { class: "group-item static" }, [
createVNode(unref(HlButton), {
size: "sm",
class: "prev-year",
equal: "",
"aria-label": unref(t)(`hl.datepicker.prevYear`),
onClick: ($event) => moveByYear(false)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "prev-year", {}, () => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemDoubleArrowLeft))
]),
_: 1
})
])
]),
_: 3
}, 8, ["aria-label", "onClick"]),
withDirectives(createVNode(unref(HlButton), {
size: "sm",
class: "prev-month",
equal: "",
"aria-label": unref(t)(`hl.datepicker.prevMonth`),
onClick: ($event) => moveByMonth(false)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "prev-month", {}, () => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemArrowLeft))
]),
_: 1
})
])
]),
_: 3
}, 8, ["aria-label", "onClick"]), [
[vShow, currentView.value === "date"]
])
]),
createElementVNode("div", { class: "header-label group-item" }, [
createVNode(unref(HlButton), {
role: "button",
"aria-live": "polite",
tabindex: "0",
onKeydown: withKeys(($event) => showPicker("year"), ["enter"]),
onClick: ($event) => showPicker("year")
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(yearLabel)), 1)
]),
_: 1
}, 8, ["onKeydown", "onClick"]),
withDirectives(createVNode(unref(HlButton), {
role: "button",
"aria-live": "polite",
tabindex: "0",
class: normalizeClass({ active: currentView.value === "month" }),
onKeydown: withKeys(($event) => showPicker("month"), ["enter"]),
onClick: ($event) => showPicker("month")
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)(`hl.datepicker.month${unref(month) + 1}`)), 1)
]),
_: 1
}, 8, ["class", "onKeydown", "onClick"]), [
[vShow, currentView.value === "date"]
])
]),
createElementVNode("div", { class: "group-item static" }, [
withDirectives(createVNode(unref(HlButton), {
size: "sm",
class: "next-month",
equal: "",
"aria-label": unref(t)(`hl.datepicker.nextMonth`),
onClick: ($event) => moveByMonth(true)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "next-month", {}, () => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemArrowRight))
]),
_: 1
})
])
]),
_: 3
}, 8, ["aria-label", "onClick"]), [
[vShow, currentView.value === "date"]
]),
createVNode(unref(HlButton), {
size: "sm",
class: "next-year",
equal: "",
"aria-label": unref(t)(`hl.datepicker.nextYear`),
onClick: ($event) => moveByYear(true)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "next-year", {}, () => [
createVNode(unref(HlIcon), null, {
default: withCtx(() => [
createVNode(unref(SystemDoubleArrowRight))
]),
_: 1
})
])
]),
_: 3
}, 8, ["aria-label", "onClick"])
])
], 2), [
[vShow, currentView.value !== "time"]
]),
createElementVNode("div", {
class: "picker-body-content",
onKeydown: handleKeydownTable
}, [
currentView.value === "date" ? (openBlock(), createBlock(_sfc_main$2, {
key: 0,
ref_key: "currentViewRef",
ref: currentViewRef,
"selection-mode": unref(selectionMode),
date: innerDate.value,
"parsed-value": _ctx.parsedValue,
"disabled-date": unref(disabledDate),
"cell-class-name": unref(cellClassName),
onPick: handleDatePick
}, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "cell-class-name"])) : createCommentVNode("v-if", true),
currentView.value === "year" ? (openBlock(), createBlock(_sfc_main$3, {
key: 1,
ref_key: "currentViewRef",
ref: currentViewRef,
"selection-mode": unref(selectionMode),
date: innerDate.value,
"disabled-date": unref(disabledDate),
"parsed-value": _ctx.parsedValue,
onPick: handleYearPick
}, null, 8, ["selection-mode", "date", "disabled-date", "parsed-value"])) : createCommentVNode("v-if", true),
currentView.value === "month" ? (openBlock(), createBlock(_sfc_main$4, {
key: 2,
ref_key: "currentViewRef",
ref: currentViewRef,
"selection-mode": unref(selectionMode),
date: innerDate.value,
"parsed-value": _ctx.parsedValue,
"disabled-date": unref(disabledDate),
onPick: handleMonthPick
}, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date"])) : createCommentVNode("v-if", true)
], 32)
])
]),
withDirectives(createElementVNode("div", { class: "picker-footer" }, [
withDirectives(createVNode(unref(HlButton), {
type: "link",
disabled: unref(disabledNow),
onClick: changeToNow
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("hl.datepicker.now")), 1)
]),
_: 1
}, 8, ["disabled"]), [
[vShow, !unref(isMultipleType)]
]),
createVNode(unref(HlButton), {
plain: "",
type: "primary",
disabled: unref(disabledConfirm),
onClick: onConfirm
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("hl.datepicker.confirm")), 1)
]),
_: 1
}, 8, ["disabled"])
], 512), [
[vShow, unref(footerVisible)]
])
], 2);
};
}
});
export { _sfc_main as default };
//# sourceMappingURL=panel-date-pick.mjs.map