@v-c/picker 1.0.0 → 1.0.2
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/dist/PickerInput/hooks/useRangeValue.js +1 -0
- package/package.json +9 -9
- 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
package/dist/locale/vi_VN.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
__esModule: { value: true },
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_common = require("./common.cjs");
|
|
6
|
-
var locale = {
|
|
7
|
-
...require_common.commonLocale,
|
|
8
|
-
locale: "vi_VN",
|
|
9
|
-
today: "Hôm nay",
|
|
10
|
-
now: "Bây giờ",
|
|
11
|
-
backToToday: "Trở về hôm nay",
|
|
12
|
-
ok: "OK",
|
|
13
|
-
clear: "Xóa",
|
|
14
|
-
week: "Tuần",
|
|
15
|
-
month: "Tháng",
|
|
16
|
-
year: "Năm",
|
|
17
|
-
timeSelect: "Chọn thời gian",
|
|
18
|
-
dateSelect: "Chọn ngày",
|
|
19
|
-
weekSelect: "Chọn tuần",
|
|
20
|
-
monthSelect: "Chọn tháng",
|
|
21
|
-
yearSelect: "Chọn năm",
|
|
22
|
-
decadeSelect: "Chọn thập kỷ",
|
|
23
|
-
previousMonth: "Tháng trước (PageUp)",
|
|
24
|
-
nextMonth: "Tháng sau (PageDown)",
|
|
25
|
-
previousYear: "Năm trước (Control + left)",
|
|
26
|
-
nextYear: "Năm sau (Control + right)",
|
|
27
|
-
previousDecade: "Thập kỷ trước",
|
|
28
|
-
nextDecade: "Thập kỷ sau",
|
|
29
|
-
previousCentury: "Thế kỷ trước",
|
|
30
|
-
nextCentury: "Thế kỷ sau"
|
|
31
|
-
};
|
|
32
|
-
var vi_VN_default = locale;
|
|
33
|
-
exports.default = vi_VN_default;
|
package/dist/locale/zh_CN.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
__esModule: { value: true },
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_common = require("./common.cjs");
|
|
6
|
-
var locale = {
|
|
7
|
-
...require_common.commonLocale,
|
|
8
|
-
locale: "zh_CN",
|
|
9
|
-
today: "今天",
|
|
10
|
-
now: "此刻",
|
|
11
|
-
backToToday: "返回今天",
|
|
12
|
-
ok: "确定",
|
|
13
|
-
timeSelect: "选择时间",
|
|
14
|
-
dateSelect: "选择日期",
|
|
15
|
-
weekSelect: "选择周",
|
|
16
|
-
clear: "清除",
|
|
17
|
-
week: "周",
|
|
18
|
-
month: "月",
|
|
19
|
-
year: "年",
|
|
20
|
-
previousMonth: "上个月 (翻页上键)",
|
|
21
|
-
nextMonth: "下个月 (翻页下键)",
|
|
22
|
-
monthSelect: "选择月份",
|
|
23
|
-
yearSelect: "选择年份",
|
|
24
|
-
decadeSelect: "选择年代",
|
|
25
|
-
previousYear: "上一年 (Control键加左方向键)",
|
|
26
|
-
nextYear: "下一年 (Control键加右方向键)",
|
|
27
|
-
previousDecade: "上一年代",
|
|
28
|
-
nextDecade: "下一年代",
|
|
29
|
-
previousCentury: "上一世纪",
|
|
30
|
-
nextCentury: "下一世纪",
|
|
31
|
-
yearFormat: "YYYY年",
|
|
32
|
-
cellDateFormat: "D",
|
|
33
|
-
monthBeforeYear: false
|
|
34
|
-
};
|
|
35
|
-
var zh_CN_default = locale;
|
|
36
|
-
exports.default = zh_CN_default;
|
package/dist/locale/zh_TW.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, {
|
|
2
|
-
__esModule: { value: true },
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_common = require("./common.cjs");
|
|
6
|
-
var locale = {
|
|
7
|
-
...require_common.commonLocale,
|
|
8
|
-
locale: "zh_TW",
|
|
9
|
-
today: "今天",
|
|
10
|
-
now: "此刻",
|
|
11
|
-
backToToday: "返回今天",
|
|
12
|
-
ok: "確定",
|
|
13
|
-
timeSelect: "選擇時間",
|
|
14
|
-
dateSelect: "選擇日期",
|
|
15
|
-
weekSelect: "選擇周",
|
|
16
|
-
clear: "清除",
|
|
17
|
-
week: "週",
|
|
18
|
-
month: "月",
|
|
19
|
-
year: "年",
|
|
20
|
-
previousMonth: "上個月 (翻頁上鍵)",
|
|
21
|
-
nextMonth: "下個月 (翻頁下鍵)",
|
|
22
|
-
monthSelect: "選擇月份",
|
|
23
|
-
yearSelect: "選擇年份",
|
|
24
|
-
decadeSelect: "選擇年代",
|
|
25
|
-
yearFormat: "YYYY年",
|
|
26
|
-
previousYear: "上一年 (Control鍵加左方向鍵)",
|
|
27
|
-
nextYear: "下一年 (Control鍵加右方向鍵)",
|
|
28
|
-
previousDecade: "上一年代",
|
|
29
|
-
nextDecade: "下一年代",
|
|
30
|
-
previousCentury: "上一世紀",
|
|
31
|
-
nextCentury: "下一世紀",
|
|
32
|
-
cellDateFormat: "D",
|
|
33
|
-
monthBeforeYear: false
|
|
34
|
-
};
|
|
35
|
-
var zh_TW_default = locale;
|
|
36
|
-
exports.default = zh_TW_default;
|
package/dist/utils/dateUtil.cjs
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const WEEK_DAY_COUNT = 7;
|
|
3
|
-
function nullableCompare(value1, value2, oriCompareFn) {
|
|
4
|
-
if (!value1 && !value2 || value1 === value2) return true;
|
|
5
|
-
if (!value1 || !value2) return false;
|
|
6
|
-
return oriCompareFn();
|
|
7
|
-
}
|
|
8
|
-
function isSameDecade(generateConfig, decade1, decade2) {
|
|
9
|
-
return nullableCompare(decade1, decade2, () => {
|
|
10
|
-
return Math.floor(generateConfig.getYear(decade1) / 10) === Math.floor(generateConfig.getYear(decade2) / 10);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function isSameYear(generateConfig, year1, year2) {
|
|
14
|
-
return nullableCompare(year1, year2, () => generateConfig.getYear(year1) === generateConfig.getYear(year2));
|
|
15
|
-
}
|
|
16
|
-
function getQuarter(generateConfig, date) {
|
|
17
|
-
return Math.floor(generateConfig.getMonth(date) / 3) + 1;
|
|
18
|
-
}
|
|
19
|
-
function isSameQuarter(generateConfig, quarter1, quarter2) {
|
|
20
|
-
return nullableCompare(quarter1, quarter2, () => isSameYear(generateConfig, quarter1, quarter2) && getQuarter(generateConfig, quarter1) === getQuarter(generateConfig, quarter2));
|
|
21
|
-
}
|
|
22
|
-
function isSameMonth(generateConfig, month1, month2) {
|
|
23
|
-
return nullableCompare(month1, month2, () => isSameYear(generateConfig, month1, month2) && generateConfig.getMonth(month1) === generateConfig.getMonth(month2));
|
|
24
|
-
}
|
|
25
|
-
function isSameDate(generateConfig, date1, date2) {
|
|
26
|
-
return nullableCompare(date1, date2, () => isSameYear(generateConfig, date1, date2) && isSameMonth(generateConfig, date1, date2) && generateConfig.getDate(date1) === generateConfig.getDate(date2));
|
|
27
|
-
}
|
|
28
|
-
function isSameTime(generateConfig, time1, time2) {
|
|
29
|
-
return nullableCompare(time1, time2, () => generateConfig.getHour(time1) === generateConfig.getHour(time2) && generateConfig.getMinute(time1) === generateConfig.getMinute(time2) && generateConfig.getSecond(time1) === generateConfig.getSecond(time2));
|
|
30
|
-
}
|
|
31
|
-
function isSameTimestamp(generateConfig, time1, time2) {
|
|
32
|
-
return nullableCompare(time1, time2, () => isSameDate(generateConfig, time1, time2) && isSameTime(generateConfig, time1, time2) && generateConfig.getMillisecond(time1) === generateConfig.getMillisecond(time2));
|
|
33
|
-
}
|
|
34
|
-
function isSameWeek(generateConfig, locale, date1, date2) {
|
|
35
|
-
return nullableCompare(date1, date2, () => {
|
|
36
|
-
return isSameYear(generateConfig, generateConfig.locale.getWeekFirstDate(locale, date1), generateConfig.locale.getWeekFirstDate(locale, date2)) && generateConfig.locale.getWeek(locale, date1) === generateConfig.locale.getWeek(locale, date2);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function isSame(generateConfig, locale, source, target, type) {
|
|
40
|
-
switch (type) {
|
|
41
|
-
case "date": return isSameDate(generateConfig, source, target);
|
|
42
|
-
case "week": return isSameWeek(generateConfig, locale.locale, source, target);
|
|
43
|
-
case "month": return isSameMonth(generateConfig, source, target);
|
|
44
|
-
case "quarter": return isSameQuarter(generateConfig, source, target);
|
|
45
|
-
case "year": return isSameYear(generateConfig, source, target);
|
|
46
|
-
case "decade": return isSameDecade(generateConfig, source, target);
|
|
47
|
-
case "time": return isSameTime(generateConfig, source, target);
|
|
48
|
-
default: return isSameTimestamp(generateConfig, source, target);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function isInRange(generateConfig, startDate, endDate, current) {
|
|
52
|
-
if (!startDate || !endDate || !current) return false;
|
|
53
|
-
return generateConfig.isAfter(current, startDate) && generateConfig.isAfter(endDate, current);
|
|
54
|
-
}
|
|
55
|
-
function isSameOrAfter(generateConfig, locale, date1, date2, type) {
|
|
56
|
-
if (isSame(generateConfig, locale, date1, date2, type)) return true;
|
|
57
|
-
return generateConfig.isAfter(date1, date2);
|
|
58
|
-
}
|
|
59
|
-
function getWeekStartDate(locale, generateConfig, value) {
|
|
60
|
-
const weekFirstDay = generateConfig.locale.getWeekFirstDay(locale);
|
|
61
|
-
const monthStartDate = generateConfig.setDate(value, 1);
|
|
62
|
-
const startDateWeekDay = generateConfig.getWeekDay(monthStartDate);
|
|
63
|
-
let alignStartDate = generateConfig.addDate(monthStartDate, weekFirstDay - startDateWeekDay);
|
|
64
|
-
if (generateConfig.getMonth(alignStartDate) === generateConfig.getMonth(value) && generateConfig.getDate(alignStartDate) > 1) alignStartDate = generateConfig.addDate(alignStartDate, -7);
|
|
65
|
-
return alignStartDate;
|
|
66
|
-
}
|
|
67
|
-
function formatValue(value, { generateConfig, locale, format }) {
|
|
68
|
-
if (!value) return "";
|
|
69
|
-
return typeof format === "function" ? format(value) : generateConfig.locale.format(locale.locale, value, format);
|
|
70
|
-
}
|
|
71
|
-
function fillTime(generateConfig, date, time) {
|
|
72
|
-
let tmpDate = date;
|
|
73
|
-
const getFn = [
|
|
74
|
-
"getHour",
|
|
75
|
-
"getMinute",
|
|
76
|
-
"getSecond",
|
|
77
|
-
"getMillisecond"
|
|
78
|
-
];
|
|
79
|
-
[
|
|
80
|
-
"setHour",
|
|
81
|
-
"setMinute",
|
|
82
|
-
"setSecond",
|
|
83
|
-
"setMillisecond"
|
|
84
|
-
].forEach((fn, index) => {
|
|
85
|
-
if (time) tmpDate = generateConfig[fn](tmpDate, generateConfig[getFn[index]](time));
|
|
86
|
-
else tmpDate = generateConfig[fn](tmpDate, 0);
|
|
87
|
-
});
|
|
88
|
-
return tmpDate;
|
|
89
|
-
}
|
|
90
|
-
exports.WEEK_DAY_COUNT = WEEK_DAY_COUNT;
|
|
91
|
-
exports.fillTime = fillTime;
|
|
92
|
-
exports.formatValue = formatValue;
|
|
93
|
-
exports.getQuarter = getQuarter;
|
|
94
|
-
exports.getWeekStartDate = getWeekStartDate;
|
|
95
|
-
exports.isInRange = isInRange;
|
|
96
|
-
exports.isSame = isSame;
|
|
97
|
-
exports.isSameDate = isSameDate;
|
|
98
|
-
exports.isSameDecade = isSameDecade;
|
|
99
|
-
exports.isSameMonth = isSameMonth;
|
|
100
|
-
exports.isSameOrAfter = isSameOrAfter;
|
|
101
|
-
exports.isSameQuarter = isSameQuarter;
|
|
102
|
-
exports.isSameTime = isSameTime;
|
|
103
|
-
exports.isSameTimestamp = isSameTimestamp;
|
|
104
|
-
exports.isSameWeek = isSameWeek;
|
|
105
|
-
exports.isSameYear = isSameYear;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
|
-
let vue = require("vue");
|
|
4
|
-
function getClearIcon(prefixCls, allowClear, clearIcon) {
|
|
5
|
-
return (typeof allowClear === "object" ? allowClear.clearIcon : clearIcon) || (0, vue.createVNode)("span", { "class": `${prefixCls}-clear-btn` }, null);
|
|
6
|
-
}
|
|
7
|
-
exports.getClearIcon = getClearIcon;
|
package/dist/utils/miscUtil.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
function leftPad(str, length, fill = "0") {
|
|
3
|
-
let current = String(str);
|
|
4
|
-
while (current.length < length) current = `${fill}${current}`;
|
|
5
|
-
return current;
|
|
6
|
-
}
|
|
7
|
-
function toArray(val) {
|
|
8
|
-
if (val === null || val === void 0) return [];
|
|
9
|
-
return Array.isArray(val) ? val : [val];
|
|
10
|
-
}
|
|
11
|
-
function fillIndex(ori, index, value) {
|
|
12
|
-
const clone = [...ori];
|
|
13
|
-
clone[index] = value;
|
|
14
|
-
return clone;
|
|
15
|
-
}
|
|
16
|
-
function pickProps(props, keys) {
|
|
17
|
-
const clone = {};
|
|
18
|
-
const mergedKeys = keys || Object.keys(props);
|
|
19
|
-
if (Array.isArray(mergedKeys)) mergedKeys.forEach((key) => {
|
|
20
|
-
if (props[key] !== void 0) clone[key] = props[key];
|
|
21
|
-
});
|
|
22
|
-
return clone;
|
|
23
|
-
}
|
|
24
|
-
function getRowFormat(picker, locale, format) {
|
|
25
|
-
if (format) return format;
|
|
26
|
-
switch (picker) {
|
|
27
|
-
case "time": return locale.fieldTimeFormat;
|
|
28
|
-
case "datetime": return locale.fieldDateTimeFormat;
|
|
29
|
-
case "month": return locale.fieldMonthFormat;
|
|
30
|
-
case "year": return locale.fieldYearFormat;
|
|
31
|
-
case "quarter": return locale.fieldQuarterFormat;
|
|
32
|
-
case "week": return locale.fieldWeekFormat;
|
|
33
|
-
default: return locale.fieldDateFormat;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function getFromDate(calendarValues, activeIndexList, activeIndex) {
|
|
37
|
-
const mergedActiveIndex = activeIndex !== void 0 ? activeIndex : activeIndexList[activeIndexList.length - 1];
|
|
38
|
-
const firstValuedIndex = activeIndexList.find((index) => calendarValues[index]);
|
|
39
|
-
return mergedActiveIndex !== firstValuedIndex ? calendarValues[firstValuedIndex] : void 0;
|
|
40
|
-
}
|
|
41
|
-
exports.fillIndex = fillIndex;
|
|
42
|
-
exports.getFromDate = getFromDate;
|
|
43
|
-
exports.getRowFormat = getRowFormat;
|
|
44
|
-
exports.leftPad = leftPad;
|
|
45
|
-
exports.pickProps = pickProps;
|
|
46
|
-
exports.toArray = toArray;
|
package/dist/utils/uiUtil.cjs
DELETED
package/dist/utils/warnUtil.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
|
-
let _v_c_util = require("@v-c/util");
|
|
4
|
-
function legacyPropsWarning(props) {
|
|
5
|
-
const { picker, disabledHours, disabledMinutes, disabledSeconds } = props;
|
|
6
|
-
if (picker === "time" && (disabledHours || disabledMinutes || disabledSeconds)) (0, _v_c_util.warning)(false, `'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.`);
|
|
7
|
-
}
|
|
8
|
-
exports.legacyPropsWarning = legacyPropsWarning;
|