2fb6c7ec2d9da27ea58ec335a758761076574ee8276274fc84e5d83df9e3834c6d7d1a5870cfbea20fac8573ec28a95dff35a41c61f79515f5f894a88d537b 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var vue = require('vue');
  4. var core = require('@vueuse/core');
  5. var index$4 = require('../../../input/index.js');
  6. var index$5 = require('../../../icon/index.js');
  7. var index$3 = require('../../../tooltip/index.js');
  8. var iconsVue = require('@element-plus/icons-vue');
  9. var utils = require('../utils.js');
  10. var constants = require('../constants.js');
  11. var useCommonPicker = require('../composables/use-common-picker.js');
  12. var props = require('./props.js');
  13. var pickerRangeTrigger = require('./picker-range-trigger.js');
  14. var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
  15. var index$1 = require('../../../../hooks/use-empty-values/index.js');
  16. var event = require('../../../../constants/event.js');
  17. var index = require('../../../../hooks/use-namespace/index.js');
  18. var useFormItem = require('../../../form/src/hooks/use-form-item.js');
  19. var useFormCommonProps = require('../../../form/src/hooks/use-form-common-props.js');
  20. var index$2 = require('../../../../hooks/use-focus-controller/index.js');
  21. var error = require('../../../../utils/error.js');
  22. var shared = require('@vue/shared');
  23. var aria = require('../../../../constants/aria.js');
  24. const __default__ = vue.defineComponent({
  25. name: "Picker"
  26. });
  27. const _sfc_main = /* @__PURE__ */ vue.defineComponent({
  28. ...__default__,
  29. props: props.timePickerDefaultProps,
  30. emits: [
  31. event.UPDATE_MODEL_EVENT,
  32. event.CHANGE_EVENT,
  33. "focus",
  34. "blur",
  35. "clear",
  36. "calendar-change",
  37. "panel-change",
  38. "visible-change",
  39. "keydown"
  40. ],
  41. setup(__props, { expose, emit }) {
  42. const props = __props;
  43. const attrs = vue.useAttrs();
  44. const nsDate = index.useNamespace("date");
  45. const nsInput = index.useNamespace("input");
  46. const nsRange = index.useNamespace("range");
  47. const { formItem } = useFormItem.useFormItem();
  48. const elPopperOptions = vue.inject(constants.PICKER_POPPER_OPTIONS_INJECTION_KEY, {});
  49. const emptyValues = index$1.useEmptyValues(props, null);
  50. const refPopper = vue.ref();
  51. const inputRef = vue.ref();
  52. const valueOnOpen = vue.ref(null);
  53. let hasJustTabExitedInput = false;
  54. const pickerDisabled = useFormCommonProps.useFormDisabled();
  55. const commonPicker = useCommonPicker.useCommonPicker(props, emit);
  56. const {
  57. parsedValue,
  58. pickerActualVisible,
  59. userInput,
  60. pickerVisible,
  61. pickerOptions,
  62. valueIsEmpty,
  63. emitInput,
  64. onPick,
  65. onSetPickerOption,
  66. onCalendarChange,
  67. onPanelChange
  68. } = commonPicker;
  69. const { isFocused, handleFocus, handleBlur } = index$2.useFocusController(inputRef, {
  70. disabled: pickerDisabled,
  71. beforeFocus() {
  72. return props.readonly;
  73. },
  74. afterFocus() {
  75. pickerVisible.value = true;
  76. },
  77. beforeBlur(event) {
  78. var _a;
  79. return !hasJustTabExitedInput && ((_a = refPopper.value) == null ? void 0 : _a.isFocusInsideContent(event));
  80. },
  81. afterBlur() {
  82. handleChange();
  83. pickerVisible.value = false;
  84. hasJustTabExitedInput = false;
  85. props.validateEvent && (formItem == null ? void 0 : formItem.validate("blur").catch((err) => error.debugWarn()));
  86. }
  87. });
  88. const hovering = vue.ref(false);
  89. const rangeInputKls = vue.computed(() => [
  90. nsDate.b("editor"),
  91. nsDate.bm("editor", props.type),
  92. nsInput.e("wrapper"),
  93. nsDate.is("disabled", pickerDisabled.value),
  94. nsDate.is("active", pickerVisible.value),
  95. nsRange.b("editor"),
  96. pickerSize ? nsRange.bm("editor", pickerSize.value) : "",
  97. attrs.class
  98. ]);
  99. const clearIconKls = vue.computed(() => [
  100. nsInput.e("icon"),
  101. nsRange.e("close-icon"),
  102. !showClearBtn.value ? nsRange.e("close-icon--hidden") : ""
  103. ]);
  104. vue.watch(pickerVisible, (val) => {
  105. if (!val) {
  106. userInput.value = null;
  107. vue.nextTick(() => {
  108. emitChange(props.modelValue);
  109. });
  110. } else {
  111. vue.nextTick(() => {
  112. if (val) {
  113. valueOnOpen.value = props.modelValue;
  114. }
  115. });
  116. }
  117. });
  118. const emitChange = (val, isClear) => {
  119. if (isClear || !utils.valueEquals(val, valueOnOpen.value)) {
  120. emit(event.CHANGE_EVENT, val);
  121. isClear && (valueOnOpen.value = val);
  122. props.validateEvent && (formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn()));
  123. }
  124. };
  125. const emitKeydown = (e) => {
  126. emit("keydown", e);
  127. };
  128. const refInput = vue.computed(() => {
  129. if (inputRef.value) {
  130. return Array.from(inputRef.value.$el.querySelectorAll("input"));
  131. }
  132. return [];
  133. });
  134. const setSelectionRange = (start, end, pos) => {
  135. const _inputs = refInput.value;
  136. if (!_inputs.length)
  137. return;
  138. if (!pos || pos === "min") {
  139. _inputs[0].setSelectionRange(start, end);
  140. _inputs[0].focus();
  141. } else if (pos === "max") {
  142. _inputs[1].setSelectionRange(start, end);
  143. _inputs[1].focus();
  144. }
  145. };
  146. const onBeforeShow = () => {
  147. pickerActualVisible.value = true;
  148. };
  149. const onShow = () => {
  150. emit("visible-change", true);
  151. };
  152. const onHide = () => {
  153. pickerActualVisible.value = false;
  154. pickerVisible.value = false;
  155. emit("visible-change", false);
  156. };
  157. const handleOpen = () => {
  158. pickerVisible.value = true;
  159. };
  160. const handleClose = () => {
  161. pickerVisible.value = false;
  162. };
  163. const displayValue = vue.computed(() => {
  164. if (!pickerOptions.value.panelReady)
  165. return "";
  166. const formattedValue = formatDayjsToString(parsedValue.value);
  167. if (shared.isArray(userInput.value)) {
  168. return [
  169. userInput.value[0] || formattedValue && formattedValue[0] || "",
  170. userInput.value[1] || formattedValue && formattedValue[1] || ""
  171. ];
  172. } else if (userInput.value !== null) {
  173. return userInput.value;
  174. }
  175. if (!isTimePicker.value && valueIsEmpty.value)
  176. return "";
  177. if (!pickerVisible.value && valueIsEmpty.value)
  178. return "";
  179. if (formattedValue) {
  180. return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue;
  181. }
  182. return "";
  183. });
  184. const isTimeLikePicker = vue.computed(() => props.type.includes("time"));
  185. const isTimePicker = vue.computed(() => props.type.startsWith("time"));
  186. const isDatesPicker = vue.computed(() => props.type === "dates");
  187. const isMonthsPicker = vue.computed(() => props.type === "months");
  188. const isYearsPicker = vue.computed(() => props.type === "years");
  189. const triggerIcon = vue.computed(() => props.prefixIcon || (isTimeLikePicker.value ? iconsVue.Clock : iconsVue.Calendar));
  190. const showClearBtn = vue.computed(() => props.clearable && !pickerDisabled.value && !props.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value));
  191. const onClearIconClick = (event) => {
  192. if (props.readonly || pickerDisabled.value)
  193. return;
  194. if (showClearBtn.value) {
  195. event.stopPropagation();
  196. if (pickerOptions.value.handleClear) {
  197. pickerOptions.value.handleClear();
  198. } else {
  199. emitInput(emptyValues.valueOnClear.value);
  200. }
  201. emitChange(emptyValues.valueOnClear.value, true);
  202. onHide();
  203. }
  204. emit("clear");
  205. };
  206. const onMouseDownInput = async (event) => {
  207. var _a;
  208. if (props.readonly || pickerDisabled.value)
  209. return;
  210. if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value) {
  211. pickerVisible.value = true;
  212. }
  213. };
  214. const onMouseEnter = () => {
  215. if (props.readonly || pickerDisabled.value)
  216. return;
  217. if (!valueIsEmpty.value && props.clearable) {
  218. hovering.value = true;
  219. }
  220. };
  221. const onMouseLeave = () => {
  222. hovering.value = false;
  223. };
  224. const onTouchStartInput = (event) => {
  225. var _a;
  226. if (props.readonly || pickerDisabled.value)
  227. return;
  228. if (((_a = event.touches[0].target) == null ? void 0 : _a.tagName) !== "INPUT" || isFocused.value) {
  229. pickerVisible.value = true;
  230. }
  231. };
  232. const isRangeInput = vue.computed(() => {
  233. return props.type.includes("range");
  234. });
  235. const pickerSize = useFormCommonProps.useFormSize();
  236. const popperEl = vue.computed(() => {
  237. var _a, _b;
  238. return (_b = (_a = vue.unref(refPopper)) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
  239. });
  240. const stophandle = core.onClickOutside(inputRef, (e) => {
  241. const unrefedPopperEl = vue.unref(popperEl);
  242. const inputEl = core.unrefElement(inputRef);
  243. if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl))
  244. return;
  245. pickerVisible.value = false;
  246. });
  247. vue.onBeforeUnmount(() => {
  248. stophandle == null ? void 0 : stophandle();
  249. });
  250. const handleChange = () => {
  251. if (userInput.value) {
  252. const value = parseUserInputToDayjs(displayValue.value);
  253. if (value) {
  254. if (isValidValue(value)) {
  255. emitInput(utils.dayOrDaysToDate(value));
  256. userInput.value = null;
  257. }
  258. }
  259. }
  260. if (userInput.value === "") {
  261. emitInput(emptyValues.valueOnClear.value);
  262. emitChange(emptyValues.valueOnClear.value, true);
  263. userInput.value = null;
  264. }
  265. };
  266. const parseUserInputToDayjs = (value) => {
  267. if (!value)
  268. return null;
  269. return pickerOptions.value.parseUserInput(value);
  270. };
  271. const formatDayjsToString = (value) => {
  272. if (!value)
  273. return null;
  274. return pickerOptions.value.formatToString(value);
  275. };
  276. const isValidValue = (value) => {
  277. return pickerOptions.value.isValidValue(value);
  278. };
  279. const handleKeydownInput = async (event) => {
  280. if (props.readonly || pickerDisabled.value)
  281. return;
  282. const { code } = event;
  283. emitKeydown(event);
  284. if (code === aria.EVENT_CODE.esc) {
  285. if (pickerVisible.value === true) {
  286. pickerVisible.value = false;
  287. event.preventDefault();
  288. event.stopPropagation();
  289. }
  290. return;
  291. }
  292. if (code === aria.EVENT_CODE.down) {
  293. if (pickerOptions.value.handleFocusPicker) {
  294. event.preventDefault();
  295. event.stopPropagation();
  296. }
  297. if (pickerVisible.value === false) {
  298. pickerVisible.value = true;
  299. await vue.nextTick();
  300. }
  301. if (pickerOptions.value.handleFocusPicker) {
  302. pickerOptions.value.handleFocusPicker();
  303. return;
  304. }
  305. }
  306. if (code === aria.EVENT_CODE.tab) {
  307. hasJustTabExitedInput = true;
  308. return;
  309. }
  310. if (code === aria.EVENT_CODE.enter || code === aria.EVENT_CODE.numpadEnter) {
  311. if (userInput.value === null || userInput.value === "" || isValidValue(parseUserInputToDayjs(displayValue.value))) {
  312. handleChange();
  313. pickerVisible.value = false;
  314. }
  315. event.stopPropagation();
  316. return;
  317. }
  318. if (userInput.value) {
  319. event.stopPropagation();
  320. return;
  321. }
  322. if (pickerOptions.value.handleKeydownInput) {
  323. pickerOptions.value.handleKeydownInput(event);
  324. }
  325. };
  326. const onUserInput = (e) => {
  327. userInput.value = e;
  328. if (!pickerVisible.value) {
  329. pickerVisible.value = true;
  330. }
  331. };
  332. const handleStartInput = (event) => {
  333. const target = event.target;
  334. if (userInput.value) {
  335. userInput.value = [target.value, userInput.value[1]];
  336. } else {
  337. userInput.value = [target.value, null];
  338. }
  339. };
  340. const handleEndInput = (event) => {
  341. const target = event.target;
  342. if (userInput.value) {
  343. userInput.value = [userInput.value[0], target.value];
  344. } else {
  345. userInput.value = [null, target.value];
  346. }
  347. };
  348. const handleStartChange = () => {
  349. var _a;
  350. const values = userInput.value;
  351. const value = parseUserInputToDayjs(values && values[0]);
  352. const parsedVal = vue.unref(parsedValue);
  353. if (value && value.isValid()) {
  354. userInput.value = [
  355. formatDayjsToString(value),
  356. ((_a = displayValue.value) == null ? void 0 : _a[1]) || null
  357. ];
  358. const newValue = [value, parsedVal && (parsedVal[1] || null)];
  359. if (isValidValue(newValue)) {
  360. emitInput(utils.dayOrDaysToDate(newValue));
  361. userInput.value = null;
  362. }
  363. }
  364. };
  365. const handleEndChange = () => {
  366. var _a;
  367. const values = vue.unref(userInput);
  368. const value = parseUserInputToDayjs(values && values[1]);
  369. const parsedVal = vue.unref(parsedValue);
  370. if (value && value.isValid()) {
  371. userInput.value = [
  372. ((_a = vue.unref(displayValue)) == null ? void 0 : _a[0]) || null,
  373. formatDayjsToString(value)
  374. ];
  375. const newValue = [parsedVal && parsedVal[0], value];
  376. if (isValidValue(newValue)) {
  377. emitInput(utils.dayOrDaysToDate(newValue));
  378. userInput.value = null;
  379. }
  380. }
  381. };
  382. const focus = () => {
  383. var _a;
  384. (_a = inputRef.value) == null ? void 0 : _a.focus();
  385. };
  386. const blur = () => {
  387. var _a;
  388. (_a = inputRef.value) == null ? void 0 : _a.blur();
  389. };
  390. vue.provide(constants.PICKER_BASE_INJECTION_KEY, {
  391. props,
  392. emptyValues
  393. });
  394. vue.provide(constants.ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker);
  395. expose({
  396. focus,
  397. blur,
  398. handleOpen,
  399. handleClose,
  400. onPick
  401. });
  402. return (_ctx, _cache) => {
  403. return vue.openBlock(), vue.createBlock(vue.unref(index$3.ElTooltip), vue.mergeProps({
  404. ref_key: "refPopper",
  405. ref: refPopper,
  406. visible: vue.unref(pickerVisible),
  407. effect: "light",
  408. pure: "",
  409. trigger: "click"
  410. }, _ctx.$attrs, {
  411. role: "dialog",
  412. teleported: "",
  413. transition: `${vue.unref(nsDate).namespace.value}-zoom-in-top`,
  414. "popper-class": [`${vue.unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
  415. "popper-style": _ctx.popperStyle,
  416. "popper-options": vue.unref(elPopperOptions),
  417. "fallback-placements": _ctx.fallbackPlacements,
  418. "gpu-acceleration": false,
  419. placement: _ctx.placement,
  420. "stop-popper-mouse-event": false,
  421. "hide-after": 0,
  422. persistent: "",
  423. onBeforeShow,
  424. onShow,
  425. onHide
  426. }), {
  427. default: vue.withCtx(() => [
  428. !vue.unref(isRangeInput) ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.ElInput), {
  429. key: 0,
  430. id: _ctx.id,
  431. ref_key: "inputRef",
  432. ref: inputRef,
  433. "container-role": "combobox",
  434. "model-value": vue.unref(displayValue),
  435. name: _ctx.name,
  436. size: vue.unref(pickerSize),
  437. disabled: vue.unref(pickerDisabled),
  438. placeholder: _ctx.placeholder,
  439. class: vue.normalizeClass([
  440. vue.unref(nsDate).b("editor"),
  441. vue.unref(nsDate).bm("editor", _ctx.type),
  442. vue.unref(nsDate).is("focus", vue.unref(pickerVisible)),
  443. _ctx.$attrs.class
  444. ]),
  445. style: vue.normalizeStyle(_ctx.$attrs.style),
  446. readonly: !_ctx.editable || _ctx.readonly || vue.unref(isDatesPicker) || vue.unref(isMonthsPicker) || vue.unref(isYearsPicker) || _ctx.type === "week",
  447. "aria-label": _ctx.ariaLabel,
  448. tabindex: _ctx.tabindex,
  449. "validate-event": false,
  450. onInput: onUserInput,
  451. onFocus: vue.unref(handleFocus),
  452. onBlur: vue.unref(handleBlur),
  453. onKeydown: handleKeydownInput,
  454. onChange: handleChange,
  455. onMousedown: onMouseDownInput,
  456. onMouseenter: onMouseEnter,
  457. onMouseleave: onMouseLeave,
  458. onTouchstartPassive: onTouchStartInput,
  459. onClick: vue.withModifiers(() => {
  460. }, ["stop"])
  461. }, {
  462. prefix: vue.withCtx(() => [
  463. vue.unref(triggerIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElIcon), {
  464. key: 0,
  465. class: vue.normalizeClass(vue.unref(nsInput).e("icon")),
  466. onMousedown: vue.withModifiers(onMouseDownInput, ["prevent"]),
  467. onTouchstartPassive: onTouchStartInput
  468. }, {
  469. default: vue.withCtx(() => [
  470. (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(triggerIcon))))
  471. ]),
  472. _: 1
  473. }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true)
  474. ]),
  475. suffix: vue.withCtx(() => [
  476. vue.unref(showClearBtn) && _ctx.clearIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElIcon), {
  477. key: 0,
  478. class: vue.normalizeClass(`${vue.unref(nsInput).e("icon")} clear-icon`),
  479. onMousedown: vue.withModifiers(vue.unref(shared.NOOP), ["prevent"]),
  480. onClick: onClearIconClick
  481. }, {
  482. default: vue.withCtx(() => [
  483. (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.clearIcon)))
  484. ]),
  485. _: 1
  486. }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true)
  487. ]),
  488. _: 1
  489. }, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "aria-label", "tabindex", "onFocus", "onBlur", "onClick"])) : (vue.openBlock(), vue.createBlock(pickerRangeTrigger["default"], {
  490. key: 1,
  491. id: _ctx.id,
  492. ref_key: "inputRef",
  493. ref: inputRef,
  494. "model-value": vue.unref(displayValue),
  495. name: _ctx.name,
  496. disabled: vue.unref(pickerDisabled),
  497. readonly: !_ctx.editable || _ctx.readonly,
  498. "start-placeholder": _ctx.startPlaceholder,
  499. "end-placeholder": _ctx.endPlaceholder,
  500. class: vue.normalizeClass(vue.unref(rangeInputKls)),
  501. style: vue.normalizeStyle(_ctx.$attrs.style),
  502. "aria-label": _ctx.ariaLabel,
  503. tabindex: _ctx.tabindex,
  504. autocomplete: "off",
  505. role: "combobox",
  506. onClick: onMouseDownInput,
  507. onFocus: vue.unref(handleFocus),
  508. onBlur: vue.unref(handleBlur),
  509. onStartInput: handleStartInput,
  510. onStartChange: handleStartChange,
  511. onEndInput: handleEndInput,
  512. onEndChange: handleEndChange,
  513. onMousedown: onMouseDownInput,
  514. onMouseenter: onMouseEnter,
  515. onMouseleave: onMouseLeave,
  516. onTouchstartPassive: onTouchStartInput,
  517. onKeydown: handleKeydownInput
  518. }, {
  519. prefix: vue.withCtx(() => [
  520. vue.unref(triggerIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElIcon), {
  521. key: 0,
  522. class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsRange).e("icon")])
  523. }, {
  524. default: vue.withCtx(() => [
  525. (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(triggerIcon))))
  526. ]),
  527. _: 1
  528. }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
  529. ]),
  530. "range-separator": vue.withCtx(() => [
  531. vue.renderSlot(_ctx.$slots, "range-separator", {}, () => [
  532. vue.createElementVNode("span", {
  533. class: vue.normalizeClass(vue.unref(nsRange).b("separator"))
  534. }, vue.toDisplayString(_ctx.rangeSeparator), 3)
  535. ])
  536. ]),
  537. suffix: vue.withCtx(() => [
  538. _ctx.clearIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$5.ElIcon), {
  539. key: 0,
  540. class: vue.normalizeClass(vue.unref(clearIconKls)),
  541. onMousedown: vue.withModifiers(vue.unref(shared.NOOP), ["prevent"]),
  542. onClick: onClearIconClick
  543. }, {
  544. default: vue.withCtx(() => [
  545. (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.clearIcon)))
  546. ]),
  547. _: 1
  548. }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true)
  549. ]),
  550. _: 3
  551. }, 8, ["id", "model-value", "name", "disabled", "readonly", "start-placeholder", "end-placeholder", "class", "style", "aria-label", "tabindex", "onFocus", "onBlur"]))
  552. ]),
  553. content: vue.withCtx(() => [
  554. vue.renderSlot(_ctx.$slots, "default", {
  555. visible: vue.unref(pickerVisible),
  556. actualVisible: vue.unref(pickerActualVisible),
  557. parsedValue: vue.unref(parsedValue),
  558. format: _ctx.format,
  559. dateFormat: _ctx.dateFormat,
  560. timeFormat: _ctx.timeFormat,
  561. unlinkPanels: _ctx.unlinkPanels,
  562. type: _ctx.type,
  563. defaultValue: _ctx.defaultValue,
  564. showNow: _ctx.showNow,
  565. showConfirm: _ctx.showConfirm,
  566. showFooter: _ctx.showFooter,
  567. showWeekNumber: _ctx.showWeekNumber,
  568. onPick: vue.unref(onPick),
  569. onSelectRange: setSelectionRange,
  570. onSetPickerOption: vue.unref(onSetPickerOption),
  571. onCalendarChange: vue.unref(onCalendarChange),
  572. onPanelChange: vue.unref(onPanelChange),
  573. onMousedown: vue.withModifiers(() => {
  574. }, ["stop"])
  575. })
  576. ]),
  577. _: 3
  578. }, 16, ["visible", "transition", "popper-class", "popper-style", "popper-options", "fallback-placements", "placement"]);
  579. };
  580. }
  581. });
  582. var CommonPicker = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "picker.vue"]]);
  583. exports["default"] = CommonPicker;
  584. //# sourceMappingURL=picker.js.map