@v-c/picker 0.0.7 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/dist/PickerInput/Popup/Footer.cjs +0 -115
- package/dist/PickerInput/Popup/PopupPanel.cjs +0 -413
- package/dist/PickerInput/Popup/PresetPanel.cjs +0 -54
- package/dist/PickerInput/Popup/index.cjs +0 -526
- package/dist/PickerInput/RangePicker.cjs +0 -1911
- package/dist/PickerInput/Selector/Icon.cjs +0 -89
- package/dist/PickerInput/Selector/Input.cjs +0 -376
- package/dist/PickerInput/Selector/MaskFormat.cjs +0 -72
- package/dist/PickerInput/Selector/RangeSelector.cjs +0 -1393
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.cjs +0 -110
- package/dist/PickerInput/Selector/SingleSelector/index.cjs +0 -1361
- package/dist/PickerInput/Selector/hooks/useClearIcon.cjs +0 -17
- package/dist/PickerInput/Selector/hooks/useInputHooks.cjs +0 -125
- package/dist/PickerInput/Selector/hooks/useRootProps.cjs +0 -14
- package/dist/PickerInput/Selector/util.cjs +0 -32
- package/dist/PickerInput/SinglePicker.cjs +0 -1881
- package/dist/PickerInput/context.cjs +0 -12
- package/dist/PickerInput/hooks/useCellRender.cjs +0 -25
- package/dist/PickerInput/hooks/useDelayState.cjs +0 -37
- package/dist/PickerInput/hooks/useDisabledBoundary.cjs +0 -15
- package/dist/PickerInput/hooks/useFieldFormat.cjs +0 -17
- package/dist/PickerInput/hooks/useFieldsInvalidate.cjs +0 -24
- package/dist/PickerInput/hooks/useFilledProps.cjs +0 -103
- package/dist/PickerInput/hooks/useInputReadOnly.cjs +0 -13
- package/dist/PickerInput/hooks/useInvalidate.cjs +0 -34
- package/dist/PickerInput/hooks/useLockEffect.cjs +0 -16
- package/dist/PickerInput/hooks/useOpen.cjs +0 -15
- package/dist/PickerInput/hooks/usePresets.cjs +0 -21
- package/dist/PickerInput/hooks/useRangeActive.cjs +0 -57
- package/dist/PickerInput/hooks/useRangeDisabledDate.cjs +0 -21
- package/dist/PickerInput/hooks/useRangePickerValue.cjs +0 -100
- package/dist/PickerInput/hooks/useRangeValue.cjs +0 -135
- package/dist/PickerInput/hooks/useShowNow.cjs +0 -15
- package/dist/PickerPanel/DatePanel/index.cjs +0 -294
- package/dist/PickerPanel/DateTimePanel/index.cjs +0 -180
- package/dist/PickerPanel/DecadePanel/index.cjs +0 -230
- package/dist/PickerPanel/MonthPanel/index.cjs +0 -219
- package/dist/PickerPanel/PanelBody.cjs +0 -157
- package/dist/PickerPanel/PanelHeader.cjs +0 -132
- package/dist/PickerPanel/QuarterPanel/index.cjs +0 -211
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.cjs +0 -145
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.cjs +0 -286
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.cjs +0 -65
- package/dist/PickerPanel/TimePanel/index.cjs +0 -173
- package/dist/PickerPanel/WeekPanel/index.cjs +0 -179
- package/dist/PickerPanel/YearPanel/index.cjs +0 -239
- package/dist/PickerPanel/context.cjs +0 -61
- package/dist/PickerPanel/index.cjs +0 -473
- package/dist/PickerTrigger/index.cjs +0 -139
- package/dist/PickerTrigger/util.cjs +0 -13
- package/dist/_virtual/rolldown_runtime.cjs +0 -21
- package/dist/generate/dateFns.cjs +0 -80
- package/dist/generate/dayjs.cjs +0 -117
- package/dist/generate/index.cjs +0 -1
- package/dist/generate/luxon.cjs +0 -75
- package/dist/generate/moment.cjs +0 -107
- package/dist/hooks/useLocale.cjs +0 -45
- package/dist/hooks/useSemantic.cjs +0 -18
- package/dist/hooks/useSyncState.cjs +0 -29
- package/dist/hooks/useTimeConfig.cjs +0 -161
- package/dist/hooks/useTimeInfo.cjs +0 -114
- package/dist/hooks/useToggleDates.cjs +0 -16
- package/dist/index.cjs +0 -12
- package/dist/interface.cjs +0 -1
- package/dist/locale/am_ET.cjs +0 -34
- package/dist/locale/ar_EG.cjs +0 -32
- package/dist/locale/az_AZ.cjs +0 -33
- package/dist/locale/bg_BG.cjs +0 -32
- package/dist/locale/bn_BD.cjs +0 -33
- package/dist/locale/by_BY.cjs +0 -33
- package/dist/locale/ca_ES.cjs +0 -32
- package/dist/locale/common.cjs +0 -8
- package/dist/locale/cs_CZ.cjs +0 -32
- package/dist/locale/da_DK.cjs +0 -32
- package/dist/locale/de_DE.cjs +0 -32
- package/dist/locale/el_GR.cjs +0 -32
- package/dist/locale/en_GB.cjs +0 -32
- package/dist/locale/en_US.cjs +0 -33
- package/dist/locale/es_ES.cjs +0 -32
- package/dist/locale/es_MX.cjs +0 -33
- package/dist/locale/et_EE.cjs +0 -32
- package/dist/locale/eu_ES.cjs +0 -34
- package/dist/locale/fa_IR.cjs +0 -32
- package/dist/locale/fi_FI.cjs +0 -32
- package/dist/locale/fr_BE.cjs +0 -32
- package/dist/locale/fr_CA.cjs +0 -33
- package/dist/locale/fr_FR.cjs +0 -33
- package/dist/locale/ga_IE.cjs +0 -33
- package/dist/locale/gl_ES.cjs +0 -32
- package/dist/locale/he_IL.cjs +0 -33
- package/dist/locale/hi_IN.cjs +0 -33
- package/dist/locale/hr_HR.cjs +0 -33
- package/dist/locale/hu_HU.cjs +0 -33
- package/dist/locale/id_ID.cjs +0 -33
- package/dist/locale/is_IS.cjs +0 -32
- package/dist/locale/it_IT.cjs +0 -55
- package/dist/locale/ja_JP.cjs +0 -35
- package/dist/locale/ka_GE.cjs +0 -33
- package/dist/locale/kk_KZ.cjs +0 -32
- package/dist/locale/km_KH.cjs +0 -34
- package/dist/locale/kmr_IQ.cjs +0 -32
- package/dist/locale/kn_IN.cjs +0 -33
- package/dist/locale/ko_KR.cjs +0 -34
- package/dist/locale/lt_LT.cjs +0 -34
- package/dist/locale/lv_LV.cjs +0 -32
- package/dist/locale/mk_MK.cjs +0 -32
- package/dist/locale/ml_IN.cjs +0 -33
- package/dist/locale/mn_MN.cjs +0 -34
- package/dist/locale/mr_IN.cjs +0 -59
- package/dist/locale/ms_MY.cjs +0 -34
- package/dist/locale/my_MM.cjs +0 -33
- package/dist/locale/nb_NO.cjs +0 -34
- package/dist/locale/ne_NP.cjs +0 -33
- package/dist/locale/nl_BE.cjs +0 -32
- package/dist/locale/nl_NL.cjs +0 -32
- package/dist/locale/pl_PL.cjs +0 -32
- package/dist/locale/pt_BR.cjs +0 -56
- package/dist/locale/pt_PT.cjs +0 -55
- package/dist/locale/ro_RO.cjs +0 -33
- package/dist/locale/ru_RU.cjs +0 -32
- package/dist/locale/si_LK.cjs +0 -34
- package/dist/locale/sk_SK.cjs +0 -32
- package/dist/locale/sl_SI.cjs +0 -32
- package/dist/locale/sr_Cyrl_RS.cjs +0 -32
- package/dist/locale/sr_RS.cjs +0 -32
- package/dist/locale/sv_SE.cjs +0 -32
- package/dist/locale/ta_IN.cjs +0 -33
- package/dist/locale/te_IN.cjs +0 -33
- package/dist/locale/th_TH.cjs +0 -32
- package/dist/locale/tk_TK.cjs +0 -32
- package/dist/locale/tr_TR.cjs +0 -55
- package/dist/locale/ug_CN.cjs +0 -35
- package/dist/locale/uk_UA.cjs +0 -32
- package/dist/locale/ur_PK.cjs +0 -33
- package/dist/locale/uz_UZ.cjs +0 -33
- package/dist/locale/vi_VN.cjs +0 -33
- package/dist/locale/zh_CN.cjs +0 -36
- package/dist/locale/zh_TW.cjs +0 -36
- package/dist/utils/dateUtil.cjs +0 -105
- package/dist/utils/getClearIcon.cjs +0 -7
- package/dist/utils/miscUtil.cjs +0 -46
- package/dist/utils/uiUtil.cjs +0 -6
- package/dist/utils/warnUtil.cjs +0 -8
|
@@ -1,473 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
__esModule: { value: true },
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
6
|
-
const require_context = require("../PickerInput/context.cjs");
|
|
7
|
-
const require_miscUtil = require("../utils/miscUtil.cjs");
|
|
8
|
-
const require_useCellRender = require("../PickerInput/hooks/useCellRender.cjs");
|
|
9
|
-
const require_en_US = require("../locale/en_US.cjs");
|
|
10
|
-
const require_useLocale = require("../hooks/useLocale.cjs");
|
|
11
|
-
const require_useTimeConfig = require("../hooks/useTimeConfig.cjs");
|
|
12
|
-
const require_dateUtil = require("../utils/dateUtil.cjs");
|
|
13
|
-
const require_useToggleDates = require("../hooks/useToggleDates.cjs");
|
|
14
|
-
const require_context$1 = require("./context.cjs");
|
|
15
|
-
const require_index = require("./DatePanel/index.cjs");
|
|
16
|
-
const require_index$1 = require("./TimePanel/index.cjs");
|
|
17
|
-
const require_index$2 = require("./DateTimePanel/index.cjs");
|
|
18
|
-
const require_index$3 = require("./DecadePanel/index.cjs");
|
|
19
|
-
const require_index$4 = require("./MonthPanel/index.cjs");
|
|
20
|
-
const require_index$5 = require("./QuarterPanel/index.cjs");
|
|
21
|
-
const require_index$6 = require("./WeekPanel/index.cjs");
|
|
22
|
-
const require_index$7 = require("./YearPanel/index.cjs");
|
|
23
|
-
let vue = require("vue");
|
|
24
|
-
let _v_c_util = require("@v-c/util");
|
|
25
|
-
var DefaultComponents = {
|
|
26
|
-
date: require_index.default,
|
|
27
|
-
datetime: require_index$2.default,
|
|
28
|
-
week: require_index$6.default,
|
|
29
|
-
month: require_index$4.default,
|
|
30
|
-
quarter: require_index$5.default,
|
|
31
|
-
year: require_index$7.default,
|
|
32
|
-
decade: require_index$3.default,
|
|
33
|
-
time: require_index$1.default
|
|
34
|
-
};
|
|
35
|
-
var PickerPanel = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) => {
|
|
36
|
-
const pickerContext = require_context.usePickerContext();
|
|
37
|
-
const rootRef = (0, vue.ref)();
|
|
38
|
-
const mergedPrefixCls = (0, vue.computed)(() => pickerContext.value.prefixCls || props.prefixCls || "vc-picker");
|
|
39
|
-
const mergedGenerateConfig = (0, vue.computed)(() => props.generateConfig || pickerContext.value.generateConfig);
|
|
40
|
-
const mergedLocale = (0, vue.computed)(() => props.locale || pickerContext.value.locale || require_en_US.default);
|
|
41
|
-
const timePropsInfo = (0, vue.computed)(() => require_useTimeConfig.getTimeProps({
|
|
42
|
-
...props,
|
|
43
|
-
locale: mergedLocale.value,
|
|
44
|
-
format: void 0,
|
|
45
|
-
picker: props.picker
|
|
46
|
-
}));
|
|
47
|
-
const localeTimeProps = (0, vue.computed)(() => timePropsInfo.value[1]);
|
|
48
|
-
const showTimeFormat = (0, vue.computed)(() => timePropsInfo.value[2]);
|
|
49
|
-
const propFormat = (0, vue.computed)(() => timePropsInfo.value[3]);
|
|
50
|
-
const timeProps = (0, vue.computed)(() => timePropsInfo.value[0]);
|
|
51
|
-
const filledLocale = require_useLocale.default(mergedLocale, localeTimeProps);
|
|
52
|
-
const internalPicker = (0, vue.computed)(() => {
|
|
53
|
-
if (props.picker === "date" && props.showTime) return "datetime";
|
|
54
|
-
return props.picker || "date";
|
|
55
|
-
});
|
|
56
|
-
const mergedShowTime = (0, vue.computed)(() => require_useTimeConfig.fillShowTimeConfig(internalPicker.value, showTimeFormat.value, propFormat.value, timeProps.value, filledLocale.value));
|
|
57
|
-
const now = (0, vue.computed)(() => mergedGenerateConfig.value?.getNow?.());
|
|
58
|
-
const internalModeState = (0, vue.ref)(props.picker || "date");
|
|
59
|
-
const mergedMode = (0, vue.computed)(() => props.mode || internalModeState.value);
|
|
60
|
-
const setMergedMode = (m) => {
|
|
61
|
-
internalModeState.value = m;
|
|
62
|
-
};
|
|
63
|
-
const internalMode = (0, vue.computed)(() => mergedMode.value === "date" && mergedShowTime.value ? "datetime" : mergedMode.value);
|
|
64
|
-
const toggleDates = require_useToggleDates.default(mergedGenerateConfig, filledLocale, internalPicker);
|
|
65
|
-
const internalValueState = (0, vue.ref)(props.defaultValue);
|
|
66
|
-
const innerValue = (0, vue.computed)(() => props.value !== void 0 ? props.value : internalValueState.value);
|
|
67
|
-
const setMergedValue = (val) => {
|
|
68
|
-
internalValueState.value = val;
|
|
69
|
-
};
|
|
70
|
-
const mergedValue = (0, vue.computed)(() => {
|
|
71
|
-
const vals = require_miscUtil.toArray(innerValue.value).filter((val) => val);
|
|
72
|
-
return props.multiple ? vals : vals.slice(0, 1);
|
|
73
|
-
});
|
|
74
|
-
const triggerChange = (nextValue) => {
|
|
75
|
-
setMergedValue(nextValue);
|
|
76
|
-
if (props.onChange && (nextValue === null || mergedValue.value.length !== nextValue.length || mergedValue.value.some((ori, index) => !require_dateUtil.isSame(mergedGenerateConfig.value, filledLocale.value, ori, nextValue[index], internalPicker.value)))) props.onChange(props.multiple ? nextValue : nextValue?.[0]);
|
|
77
|
-
};
|
|
78
|
-
const onInternalSelect = (newDate) => {
|
|
79
|
-
props.onSelect?.(newDate);
|
|
80
|
-
if (mergedMode.value === props.picker) triggerChange(props.multiple ? toggleDates(mergedValue.value, newDate) : [newDate]);
|
|
81
|
-
};
|
|
82
|
-
const internalPickerValueState = (0, vue.ref)(props.defaultPickerValue || mergedValue.value[0] || now.value);
|
|
83
|
-
const mergedPickerValue = (0, vue.computed)(() => props.pickerValue !== void 0 ? props.pickerValue : internalPickerValueState.value);
|
|
84
|
-
const setInternalPickerValue = (val) => {
|
|
85
|
-
internalPickerValueState.value = val;
|
|
86
|
-
};
|
|
87
|
-
(0, vue.watch)(() => mergedValue.value[0], (val) => {
|
|
88
|
-
if (val && props.pickerValue === void 0) setInternalPickerValue(val);
|
|
89
|
-
});
|
|
90
|
-
const triggerPanelChange = (viewDate, nextMode) => {
|
|
91
|
-
props.onPanelChange?.(viewDate || mergedPickerValue.value, nextMode || mergedMode.value);
|
|
92
|
-
};
|
|
93
|
-
const setPickerValue = (nextPickerValue, triggerPanelEvent = false) => {
|
|
94
|
-
setInternalPickerValue(nextPickerValue);
|
|
95
|
-
props.onPickerValueChange?.(nextPickerValue);
|
|
96
|
-
if (triggerPanelEvent) triggerPanelChange(nextPickerValue);
|
|
97
|
-
};
|
|
98
|
-
const triggerModeChange = (nextMode, viewDate) => {
|
|
99
|
-
setMergedMode(nextMode);
|
|
100
|
-
if (viewDate) setPickerValue(viewDate);
|
|
101
|
-
triggerPanelChange(viewDate, nextMode);
|
|
102
|
-
};
|
|
103
|
-
const onPanelValueSelect = (nextValue) => {
|
|
104
|
-
onInternalSelect(nextValue);
|
|
105
|
-
setPickerValue(nextValue);
|
|
106
|
-
if (mergedMode.value !== props.picker) {
|
|
107
|
-
const decadeYearQueue = ["decade", "year"];
|
|
108
|
-
const decadeYearMonthQueue = [...decadeYearQueue, "month"];
|
|
109
|
-
const queue = {
|
|
110
|
-
quarter: [...decadeYearQueue, "quarter"],
|
|
111
|
-
week: [...decadeYearMonthQueue, "week"],
|
|
112
|
-
date: [...decadeYearMonthQueue, "date"]
|
|
113
|
-
}[props.picker || "date"] || decadeYearMonthQueue;
|
|
114
|
-
const nextMode = queue[queue.indexOf(mergedMode.value) + 1];
|
|
115
|
-
if (nextMode) triggerModeChange(nextMode, nextValue);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const hoverRangeDate = (0, vue.computed)(() => {
|
|
119
|
-
let start;
|
|
120
|
-
let end;
|
|
121
|
-
if (Array.isArray(props.hoverRangeValue)) [start, end] = props.hoverRangeValue;
|
|
122
|
-
else start = props.hoverRangeValue;
|
|
123
|
-
if (!start && !end) return null;
|
|
124
|
-
start = start || end;
|
|
125
|
-
end = end || start;
|
|
126
|
-
return mergedGenerateConfig.value.isAfter(start, end) ? [end, start] : [start, end];
|
|
127
|
-
});
|
|
128
|
-
const onInternalCellRender = require_useCellRender.default((0, vue.toRef)(props, "cellRender"), (0, vue.toRef)(props, "dateRender"), (0, vue.toRef)(props, "monthCellRender"));
|
|
129
|
-
require_context$1.provideSharedPanelContext((0, vue.computed)(() => ({
|
|
130
|
-
classNames: pickerContext.value.classNames?.popup ?? props.classNames ?? {},
|
|
131
|
-
styles: pickerContext.value.styles?.popup ?? props.styles ?? {}
|
|
132
|
-
})));
|
|
133
|
-
const parentHackContext = require_context$1.usePickerHackContext();
|
|
134
|
-
require_context$1.providePickerHackContext((0, vue.computed)(() => ({
|
|
135
|
-
...parentHackContext?.value || {},
|
|
136
|
-
hideHeader: props.hideHeader
|
|
137
|
-
})));
|
|
138
|
-
if (process.env.NODE_ENV !== "production") (0, _v_c_util.warning)(!mergedValue.value || mergedValue.value.every((val) => mergedGenerateConfig.value.isValidate(val)), "Invalidate date pass to `value` or `defaultValue`.");
|
|
139
|
-
return () => {
|
|
140
|
-
const PanelComponent = props.components?.[internalMode.value] || DefaultComponents[internalMode.value] || require_index.default;
|
|
141
|
-
const panelCls = `${mergedPrefixCls.value}-panel`;
|
|
142
|
-
const panelProps = require_miscUtil.pickProps(props, [
|
|
143
|
-
"showWeek",
|
|
144
|
-
"prevIcon",
|
|
145
|
-
"nextIcon",
|
|
146
|
-
"superPrevIcon",
|
|
147
|
-
"superNextIcon",
|
|
148
|
-
"disabledDate",
|
|
149
|
-
"minDate",
|
|
150
|
-
"maxDate",
|
|
151
|
-
"onHover"
|
|
152
|
-
]);
|
|
153
|
-
return (0, vue.createVNode)("div", (0, vue.mergeProps)({
|
|
154
|
-
"ref": rootRef,
|
|
155
|
-
"tabindex": props.tabindex,
|
|
156
|
-
"class": (0, _v_c_util.clsx)(panelCls, { [`${panelCls}-rtl`]: props.direction === "rtl" })
|
|
157
|
-
}, attrs), [(0, vue.createVNode)(PanelComponent, (0, vue.mergeProps)(panelProps, {
|
|
158
|
-
"showTime": mergedShowTime.value,
|
|
159
|
-
"prefixCls": mergedPrefixCls.value,
|
|
160
|
-
"locale": filledLocale.value,
|
|
161
|
-
"generateConfig": mergedGenerateConfig.value,
|
|
162
|
-
"onModeChange": triggerModeChange,
|
|
163
|
-
"pickerValue": mergedPickerValue.value,
|
|
164
|
-
"onPickerValueChange": (nextPickerValue) => {
|
|
165
|
-
setPickerValue(nextPickerValue, true);
|
|
166
|
-
},
|
|
167
|
-
"value": mergedValue.value[0],
|
|
168
|
-
"onSelect": onPanelValueSelect,
|
|
169
|
-
"values": mergedValue.value,
|
|
170
|
-
"cellRender": onInternalCellRender,
|
|
171
|
-
"hoverRangeValue": hoverRangeDate.value,
|
|
172
|
-
"hoverValue": props.hoverValue
|
|
173
|
-
}), null)]);
|
|
174
|
-
};
|
|
175
|
-
}, {
|
|
176
|
-
props: {
|
|
177
|
-
prefixCls: {
|
|
178
|
-
type: String,
|
|
179
|
-
required: false,
|
|
180
|
-
default: void 0
|
|
181
|
-
},
|
|
182
|
-
direction: {
|
|
183
|
-
type: String,
|
|
184
|
-
required: false,
|
|
185
|
-
default: void 0
|
|
186
|
-
},
|
|
187
|
-
onSelect: {
|
|
188
|
-
type: Function,
|
|
189
|
-
required: false,
|
|
190
|
-
default: void 0
|
|
191
|
-
},
|
|
192
|
-
defaultPickerValue: {
|
|
193
|
-
required: false,
|
|
194
|
-
default: void 0
|
|
195
|
-
},
|
|
196
|
-
pickerValue: {
|
|
197
|
-
required: false,
|
|
198
|
-
default: void 0
|
|
199
|
-
},
|
|
200
|
-
onPickerValueChange: {
|
|
201
|
-
type: Function,
|
|
202
|
-
required: false,
|
|
203
|
-
default: void 0
|
|
204
|
-
},
|
|
205
|
-
mode: {
|
|
206
|
-
type: String,
|
|
207
|
-
required: false,
|
|
208
|
-
default: void 0
|
|
209
|
-
},
|
|
210
|
-
onPanelChange: {
|
|
211
|
-
type: Function,
|
|
212
|
-
required: false,
|
|
213
|
-
default: void 0
|
|
214
|
-
},
|
|
215
|
-
picker: {
|
|
216
|
-
type: String,
|
|
217
|
-
required: false,
|
|
218
|
-
default: void 0
|
|
219
|
-
},
|
|
220
|
-
showTime: {
|
|
221
|
-
type: [Boolean, Object],
|
|
222
|
-
required: false,
|
|
223
|
-
default: void 0
|
|
224
|
-
},
|
|
225
|
-
showWeek: {
|
|
226
|
-
type: Boolean,
|
|
227
|
-
required: false,
|
|
228
|
-
default: void 0
|
|
229
|
-
},
|
|
230
|
-
cellRender: {
|
|
231
|
-
type: Function,
|
|
232
|
-
required: false,
|
|
233
|
-
default: void 0
|
|
234
|
-
},
|
|
235
|
-
dateRender: {
|
|
236
|
-
type: Function,
|
|
237
|
-
required: false,
|
|
238
|
-
default: void 0
|
|
239
|
-
},
|
|
240
|
-
monthCellRender: {
|
|
241
|
-
type: Function,
|
|
242
|
-
required: false,
|
|
243
|
-
default: void 0
|
|
244
|
-
},
|
|
245
|
-
hoverValue: {
|
|
246
|
-
type: Array,
|
|
247
|
-
required: false,
|
|
248
|
-
default: void 0
|
|
249
|
-
},
|
|
250
|
-
hoverRangeValue: {
|
|
251
|
-
type: Array,
|
|
252
|
-
required: false,
|
|
253
|
-
default: void 0
|
|
254
|
-
},
|
|
255
|
-
onHover: {
|
|
256
|
-
type: Function,
|
|
257
|
-
required: false,
|
|
258
|
-
default: void 0
|
|
259
|
-
},
|
|
260
|
-
components: {
|
|
261
|
-
type: Object,
|
|
262
|
-
required: false,
|
|
263
|
-
default: void 0
|
|
264
|
-
},
|
|
265
|
-
hideHeader: {
|
|
266
|
-
type: Boolean,
|
|
267
|
-
required: false,
|
|
268
|
-
default: void 0
|
|
269
|
-
},
|
|
270
|
-
locale: {
|
|
271
|
-
type: Object,
|
|
272
|
-
required: false,
|
|
273
|
-
default: void 0
|
|
274
|
-
},
|
|
275
|
-
generateConfig: {
|
|
276
|
-
type: Object,
|
|
277
|
-
required: false,
|
|
278
|
-
default: void 0
|
|
279
|
-
},
|
|
280
|
-
disabledDate: {
|
|
281
|
-
type: Function,
|
|
282
|
-
required: false,
|
|
283
|
-
default: void 0
|
|
284
|
-
},
|
|
285
|
-
minDate: {
|
|
286
|
-
required: false,
|
|
287
|
-
default: void 0
|
|
288
|
-
},
|
|
289
|
-
maxDate: {
|
|
290
|
-
required: false,
|
|
291
|
-
default: void 0
|
|
292
|
-
},
|
|
293
|
-
prevIcon: {
|
|
294
|
-
type: [
|
|
295
|
-
Object,
|
|
296
|
-
Function,
|
|
297
|
-
String,
|
|
298
|
-
Number,
|
|
299
|
-
null,
|
|
300
|
-
Boolean,
|
|
301
|
-
Array
|
|
302
|
-
],
|
|
303
|
-
required: false,
|
|
304
|
-
default: void 0
|
|
305
|
-
},
|
|
306
|
-
nextIcon: {
|
|
307
|
-
type: [
|
|
308
|
-
Object,
|
|
309
|
-
Function,
|
|
310
|
-
String,
|
|
311
|
-
Number,
|
|
312
|
-
null,
|
|
313
|
-
Boolean,
|
|
314
|
-
Array
|
|
315
|
-
],
|
|
316
|
-
required: false,
|
|
317
|
-
default: void 0
|
|
318
|
-
},
|
|
319
|
-
superPrevIcon: {
|
|
320
|
-
type: [
|
|
321
|
-
Object,
|
|
322
|
-
Function,
|
|
323
|
-
String,
|
|
324
|
-
Number,
|
|
325
|
-
null,
|
|
326
|
-
Boolean,
|
|
327
|
-
Array
|
|
328
|
-
],
|
|
329
|
-
required: false,
|
|
330
|
-
default: void 0
|
|
331
|
-
},
|
|
332
|
-
superNextIcon: {
|
|
333
|
-
type: [
|
|
334
|
-
Object,
|
|
335
|
-
Function,
|
|
336
|
-
String,
|
|
337
|
-
Number,
|
|
338
|
-
null,
|
|
339
|
-
Boolean,
|
|
340
|
-
Array
|
|
341
|
-
],
|
|
342
|
-
required: false,
|
|
343
|
-
default: void 0
|
|
344
|
-
},
|
|
345
|
-
format: {
|
|
346
|
-
type: String,
|
|
347
|
-
required: false,
|
|
348
|
-
default: void 0
|
|
349
|
-
},
|
|
350
|
-
showNow: {
|
|
351
|
-
type: Boolean,
|
|
352
|
-
required: false,
|
|
353
|
-
default: void 0
|
|
354
|
-
},
|
|
355
|
-
showHour: {
|
|
356
|
-
type: Boolean,
|
|
357
|
-
required: false,
|
|
358
|
-
default: void 0
|
|
359
|
-
},
|
|
360
|
-
showMinute: {
|
|
361
|
-
type: Boolean,
|
|
362
|
-
required: false,
|
|
363
|
-
default: void 0
|
|
364
|
-
},
|
|
365
|
-
showSecond: {
|
|
366
|
-
type: Boolean,
|
|
367
|
-
required: false,
|
|
368
|
-
default: void 0
|
|
369
|
-
},
|
|
370
|
-
showMillisecond: {
|
|
371
|
-
type: Boolean,
|
|
372
|
-
required: false,
|
|
373
|
-
default: void 0
|
|
374
|
-
},
|
|
375
|
-
use12Hours: {
|
|
376
|
-
type: Boolean,
|
|
377
|
-
required: false,
|
|
378
|
-
default: void 0
|
|
379
|
-
},
|
|
380
|
-
hourStep: {
|
|
381
|
-
required: false,
|
|
382
|
-
default: void 0
|
|
383
|
-
},
|
|
384
|
-
minuteStep: {
|
|
385
|
-
required: false,
|
|
386
|
-
default: void 0
|
|
387
|
-
},
|
|
388
|
-
secondStep: {
|
|
389
|
-
required: false,
|
|
390
|
-
default: void 0
|
|
391
|
-
},
|
|
392
|
-
millisecondStep: {
|
|
393
|
-
required: false,
|
|
394
|
-
default: void 0
|
|
395
|
-
},
|
|
396
|
-
hideDisabledOptions: {
|
|
397
|
-
type: Boolean,
|
|
398
|
-
required: false,
|
|
399
|
-
default: void 0
|
|
400
|
-
},
|
|
401
|
-
defaultValue: {
|
|
402
|
-
type: [Array, null],
|
|
403
|
-
required: false,
|
|
404
|
-
default: void 0
|
|
405
|
-
},
|
|
406
|
-
defaultOpenValue: {
|
|
407
|
-
required: false,
|
|
408
|
-
default: void 0
|
|
409
|
-
},
|
|
410
|
-
disabledHours: {
|
|
411
|
-
type: Function,
|
|
412
|
-
required: false,
|
|
413
|
-
default: void 0
|
|
414
|
-
},
|
|
415
|
-
disabledMinutes: {
|
|
416
|
-
type: Function,
|
|
417
|
-
required: false,
|
|
418
|
-
default: void 0
|
|
419
|
-
},
|
|
420
|
-
disabledSeconds: {
|
|
421
|
-
type: Function,
|
|
422
|
-
required: false,
|
|
423
|
-
default: void 0
|
|
424
|
-
},
|
|
425
|
-
disabledTime: {
|
|
426
|
-
type: Function,
|
|
427
|
-
required: false,
|
|
428
|
-
default: void 0
|
|
429
|
-
},
|
|
430
|
-
changeOnScroll: {
|
|
431
|
-
type: Boolean,
|
|
432
|
-
required: false,
|
|
433
|
-
default: void 0
|
|
434
|
-
},
|
|
435
|
-
tabindex: {
|
|
436
|
-
type: [
|
|
437
|
-
Number,
|
|
438
|
-
String,
|
|
439
|
-
null
|
|
440
|
-
],
|
|
441
|
-
required: false,
|
|
442
|
-
default: void 0
|
|
443
|
-
},
|
|
444
|
-
multiple: {
|
|
445
|
-
type: Boolean,
|
|
446
|
-
required: false,
|
|
447
|
-
default: void 0
|
|
448
|
-
},
|
|
449
|
-
value: {
|
|
450
|
-
required: false,
|
|
451
|
-
default: void 0
|
|
452
|
-
},
|
|
453
|
-
onChange: {
|
|
454
|
-
type: Function,
|
|
455
|
-
required: false,
|
|
456
|
-
default: void 0
|
|
457
|
-
},
|
|
458
|
-
styles: {
|
|
459
|
-
type: Object,
|
|
460
|
-
required: false,
|
|
461
|
-
default: void 0
|
|
462
|
-
},
|
|
463
|
-
classNames: {
|
|
464
|
-
type: Object,
|
|
465
|
-
required: false,
|
|
466
|
-
default: void 0
|
|
467
|
-
}
|
|
468
|
-
},
|
|
469
|
-
name: "PickerPanel",
|
|
470
|
-
inheritAttrs: false
|
|
471
|
-
});
|
|
472
|
-
var PickerPanel_default = PickerPanel;
|
|
473
|
-
exports.default = PickerPanel_default;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
__esModule: { value: true },
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
6
|
-
const require_context = require("../PickerInput/context.cjs");
|
|
7
|
-
const require_uiUtil = require("../utils/uiUtil.cjs");
|
|
8
|
-
let vue = require("vue");
|
|
9
|
-
let _v_c_util = require("@v-c/util");
|
|
10
|
-
let _v_c_trigger = require("@v-c/trigger");
|
|
11
|
-
_v_c_trigger = require_rolldown_runtime.__toESM(_v_c_trigger);
|
|
12
|
-
var BUILT_IN_PLACEMENTS = {
|
|
13
|
-
bottomLeft: {
|
|
14
|
-
points: ["tl", "bl"],
|
|
15
|
-
offset: [0, 4],
|
|
16
|
-
overflow: {
|
|
17
|
-
adjustX: 1,
|
|
18
|
-
adjustY: 1
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
bottomRight: {
|
|
22
|
-
points: ["tr", "br"],
|
|
23
|
-
offset: [0, 4],
|
|
24
|
-
overflow: {
|
|
25
|
-
adjustX: 1,
|
|
26
|
-
adjustY: 1
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
topLeft: {
|
|
30
|
-
points: ["bl", "tl"],
|
|
31
|
-
offset: [0, -4],
|
|
32
|
-
overflow: {
|
|
33
|
-
adjustX: 0,
|
|
34
|
-
adjustY: 1
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
topRight: {
|
|
38
|
-
points: ["br", "tr"],
|
|
39
|
-
offset: [0, -4],
|
|
40
|
-
overflow: {
|
|
41
|
-
adjustX: 0,
|
|
42
|
-
adjustY: 1
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
var PickerTrigger = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
47
|
-
const ctx = require_context.usePickerContext();
|
|
48
|
-
const dropdownPrefixCls = (0, vue.computed)(() => `${ctx.value.prefixCls}-dropdown`);
|
|
49
|
-
const realPlacement = (0, vue.computed)(() => require_uiUtil.getRealPlacement(props.placement, props.direction === "rtl"));
|
|
50
|
-
return () => {
|
|
51
|
-
return (0, vue.createVNode)(_v_c_trigger.default, {
|
|
52
|
-
"showAction": [],
|
|
53
|
-
"hideAction": ["click"],
|
|
54
|
-
"popupPlacement": realPlacement.value,
|
|
55
|
-
"builtinPlacements": props.builtinPlacements || BUILT_IN_PLACEMENTS,
|
|
56
|
-
"prefixCls": dropdownPrefixCls.value,
|
|
57
|
-
"popupMotion": props.transitionName ? { motionName: props.transitionName } : void 0,
|
|
58
|
-
"popup": props.popupElement,
|
|
59
|
-
"popupAlign": props.popupAlign,
|
|
60
|
-
"popupVisible": props.visible,
|
|
61
|
-
"popupClassName": (0, _v_c_util.clsx)(props.popupClassName, {
|
|
62
|
-
[`${dropdownPrefixCls.value}-range`]: props.range,
|
|
63
|
-
[`${dropdownPrefixCls.value}-rtl`]: props.direction === "rtl"
|
|
64
|
-
}),
|
|
65
|
-
"popupStyle": props.popupStyle,
|
|
66
|
-
"stretch": "minWidth",
|
|
67
|
-
"getPopupContainer": props.getPopupContainer,
|
|
68
|
-
"onPopupVisibleChange": (nextVisible) => {
|
|
69
|
-
if (!nextVisible) props.onClose?.();
|
|
70
|
-
}
|
|
71
|
-
}, { default: () => [slots.default?.()] });
|
|
72
|
-
};
|
|
73
|
-
}, {
|
|
74
|
-
props: {
|
|
75
|
-
popupElement: {
|
|
76
|
-
required: false,
|
|
77
|
-
default: void 0
|
|
78
|
-
},
|
|
79
|
-
popupStyle: {
|
|
80
|
-
type: Object,
|
|
81
|
-
required: false,
|
|
82
|
-
default: void 0
|
|
83
|
-
},
|
|
84
|
-
transitionName: {
|
|
85
|
-
type: String,
|
|
86
|
-
required: false,
|
|
87
|
-
default: void 0
|
|
88
|
-
},
|
|
89
|
-
getPopupContainer: {
|
|
90
|
-
type: Function,
|
|
91
|
-
required: false,
|
|
92
|
-
default: void 0
|
|
93
|
-
},
|
|
94
|
-
popupAlign: {
|
|
95
|
-
type: Object,
|
|
96
|
-
required: false,
|
|
97
|
-
default: void 0
|
|
98
|
-
},
|
|
99
|
-
range: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
required: false,
|
|
102
|
-
default: void 0
|
|
103
|
-
},
|
|
104
|
-
popupClassName: {
|
|
105
|
-
type: String,
|
|
106
|
-
required: false,
|
|
107
|
-
default: void 0
|
|
108
|
-
},
|
|
109
|
-
placement: {
|
|
110
|
-
type: String,
|
|
111
|
-
required: false,
|
|
112
|
-
default: void 0
|
|
113
|
-
},
|
|
114
|
-
builtinPlacements: {
|
|
115
|
-
type: Object,
|
|
116
|
-
required: false,
|
|
117
|
-
default: void 0
|
|
118
|
-
},
|
|
119
|
-
direction: {
|
|
120
|
-
type: String,
|
|
121
|
-
required: false,
|
|
122
|
-
default: void 0
|
|
123
|
-
},
|
|
124
|
-
visible: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
required: false,
|
|
127
|
-
default: void 0
|
|
128
|
-
},
|
|
129
|
-
onClose: {
|
|
130
|
-
type: Function,
|
|
131
|
-
required: false,
|
|
132
|
-
default: void 0
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
name: "PickerTrigger",
|
|
136
|
-
inheritAttrs: false
|
|
137
|
-
});
|
|
138
|
-
var PickerTrigger_default = PickerTrigger;
|
|
139
|
-
exports.default = PickerTrigger_default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_miscUtil = require("../utils/miscUtil.cjs");
|
|
3
|
-
function pickTriggerProps(props) {
|
|
4
|
-
return require_miscUtil.pickProps(props, [
|
|
5
|
-
"placement",
|
|
6
|
-
"builtinPlacements",
|
|
7
|
-
"popupAlign",
|
|
8
|
-
"getPopupContainer",
|
|
9
|
-
"transitionName",
|
|
10
|
-
"direction"
|
|
11
|
-
]);
|
|
12
|
-
}
|
|
13
|
-
exports.pickTriggerProps = pickTriggerProps;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
9
|
-
key = keys[i];
|
|
10
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
-
get: ((k) => from[k]).bind(null, key),
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
18
|
-
value: mod,
|
|
19
|
-
enumerable: true
|
|
20
|
-
}) : target, mod));
|
|
21
|
-
exports.__toESM = __toESM;
|