@element-plus/nightly 0.0.20220524 → 0.0.20220525
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/index.css +1 -1
- package/dist/index.full.js +512 -538
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +512 -538
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table2.mjs +3 -36
- package/es/components/date-picker/src/date-picker-com/basic-date-table2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-month-table2.mjs +2 -28
- package/es/components/date-picker/src/date-picker-com/basic-month-table2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-year-table2.mjs +5 -14
- package/es/components/date-picker/src/date-picker-com/basic-year-table2.mjs.map +1 -1
- package/es/components/date-picker/src/props/basic-date-table.mjs +2 -0
- package/es/components/date-picker/src/props/basic-date-table.mjs.map +1 -0
- package/es/components/date-picker/src/props/basic-date-table2.mjs +15 -0
- package/es/components/date-picker/src/props/basic-date-table2.mjs.map +1 -0
- package/es/components/date-picker/src/props/basic-month-table.mjs +2 -0
- package/es/components/date-picker/src/props/basic-month-table.mjs.map +1 -0
- package/es/components/date-picker/src/props/basic-month-table2.mjs +11 -0
- package/es/components/date-picker/src/props/basic-month-table2.mjs.map +1 -0
- package/es/components/date-picker/src/props/basic-year-table.mjs +2 -0
- package/es/components/date-picker/src/props/basic-year-table.mjs.map +1 -0
- package/es/components/date-picker/src/props/basic-year-table2.mjs +13 -0
- package/es/components/date-picker/src/props/basic-year-table2.mjs.map +1 -0
- package/es/components/date-picker/src/props/shared.mjs +2 -0
- package/es/components/date-picker/src/props/shared.mjs.map +1 -0
- package/es/components/date-picker/src/props/shared2.mjs +40 -0
- package/es/components/date-picker/src/props/shared2.mjs.map +1 -0
- package/es/components/time-select/index2.mjs +1 -1
- package/es/components/time-select/src/time-select.mjs +1 -6
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +3 -235
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/time-select/src/time-select3.mjs +54 -0
- package/es/components/time-select/src/time-select3.mjs.map +1 -0
- package/es/components/time-select/src/time-select4.mjs +125 -0
- package/es/components/time-select/src/time-select4.mjs.map +1 -0
- package/es/components/time-select/src/utils.mjs +2 -0
- package/es/components/time-select/src/utils.mjs.map +1 -0
- package/es/components/time-select/src/utils2.mjs +58 -0
- package/es/components/time-select/src/utils2.mjs.map +1 -0
- package/es/packages/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +39 -69
- package/es/packages/components/date-picker/src/date-picker-com/basic-month-table.vue.d.ts +33 -54
- package/es/packages/components/date-picker/src/date-picker-com/basic-year-table.vue.d.ts +12 -23
- package/es/packages/components/date-picker/src/props/basic-date-table.d.ts +19 -0
- package/es/packages/components/date-picker/src/props/basic-month-table.d.ts +17 -0
- package/es/packages/components/date-picker/src/props/basic-year-table.d.ts +7 -0
- package/es/packages/components/date-picker/src/props/shared.d.ts +23 -0
- package/es/packages/components/time-select/index.d.ts +20310 -270
- package/es/packages/components/time-select/src/time-select.d.ts +22 -0
- package/es/packages/components/time-select/src/time-select.vue.d.ts +10155 -136
- package/es/packages/components/time-select/src/utils.d.ts +10 -0
- package/es/packages/utils/arrays.d.ts +2 -1
- package/es/packages/version.d.ts +1 -1
- package/es/utils/arrays2.mjs.map +1 -1
- package/es/version2.mjs +1 -1
- package/es/version2.mjs.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table2.js +3 -36
- package/lib/components/date-picker/src/date-picker-com/basic-date-table2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-month-table2.js +2 -28
- package/lib/components/date-picker/src/date-picker-com/basic-month-table2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-year-table2.js +5 -14
- package/lib/components/date-picker/src/date-picker-com/basic-year-table2.js.map +1 -1
- package/lib/components/date-picker/src/props/basic-date-table.js +10 -0
- package/lib/components/date-picker/src/props/basic-date-table.js.map +1 -0
- package/lib/components/date-picker/src/props/basic-date-table2.js +19 -0
- package/lib/components/date-picker/src/props/basic-date-table2.js.map +1 -0
- package/lib/components/date-picker/src/props/basic-month-table.js +10 -0
- package/lib/components/date-picker/src/props/basic-month-table.js.map +1 -0
- package/lib/components/date-picker/src/props/basic-month-table2.js +15 -0
- package/lib/components/date-picker/src/props/basic-month-table2.js.map +1 -0
- package/lib/components/date-picker/src/props/basic-year-table.js +10 -0
- package/lib/components/date-picker/src/props/basic-year-table.js.map +1 -0
- package/lib/components/date-picker/src/props/basic-year-table2.js +17 -0
- package/lib/components/date-picker/src/props/basic-year-table2.js.map +1 -0
- package/lib/components/date-picker/src/props/shared.js +11 -0
- package/lib/components/date-picker/src/props/shared.js.map +1 -0
- package/lib/components/date-picker/src/props/shared2.js +45 -0
- package/lib/components/date-picker/src/props/shared2.js.map +1 -0
- package/lib/components/time-select/index2.js +1 -1
- package/lib/components/time-select/src/time-select.js +3 -4
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +3 -240
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/time-select/src/time-select3.js +58 -0
- package/lib/components/time-select/src/time-select3.js.map +1 -0
- package/lib/components/time-select/src/time-select4.js +134 -0
- package/lib/components/time-select/src/time-select4.js.map +1 -0
- package/lib/components/time-select/src/utils.js +14 -0
- package/lib/components/time-select/src/utils.js.map +1 -0
- package/lib/components/time-select/src/utils2.js +66 -0
- package/lib/components/time-select/src/utils2.js.map +1 -0
- package/lib/packages/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +39 -69
- package/lib/packages/components/date-picker/src/date-picker-com/basic-month-table.vue.d.ts +33 -54
- package/lib/packages/components/date-picker/src/date-picker-com/basic-year-table.vue.d.ts +12 -23
- package/lib/packages/components/date-picker/src/props/basic-date-table.d.ts +19 -0
- package/lib/packages/components/date-picker/src/props/basic-month-table.d.ts +17 -0
- package/lib/packages/components/date-picker/src/props/basic-year-table.d.ts +7 -0
- package/lib/packages/components/date-picker/src/props/shared.d.ts +23 -0
- package/lib/packages/components/time-select/index.d.ts +20310 -270
- package/lib/packages/components/time-select/src/time-select.d.ts +22 -0
- package/lib/packages/components/time-select/src/time-select.vue.d.ts +10155 -136
- package/lib/packages/components/time-select/src/utils.d.ts +10 -0
- package/lib/packages/utils/arrays.d.ts +2 -1
- package/lib/packages/version.d.ts +1 -1
- package/lib/utils/arrays2.js.map +1 -1
- package/lib/version2.js +1 -1
- package/lib/version2.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-tabs.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +10 -0
- package/theme-chalk/src/date-picker/picker.scss +1 -1
- package/theme-chalk/src/select-v2.scss +4 -0
- package/theme-chalk/src/tabs.scss +5 -2
- package/web-types.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../../utils/index2.js');
|
|
6
|
+
var props = require('../../../../utils/vue/props2.js');
|
|
7
|
+
|
|
8
|
+
const selectionModes = ["date", "dates", "year", "month", "week"];
|
|
9
|
+
const datePickerSharedProps = props.buildProps({
|
|
10
|
+
disabledDate: {
|
|
11
|
+
type: props.definePropType(Function)
|
|
12
|
+
},
|
|
13
|
+
date: {
|
|
14
|
+
type: props.definePropType(Object),
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
minDate: {
|
|
18
|
+
type: props.definePropType(Object)
|
|
19
|
+
},
|
|
20
|
+
maxDate: {
|
|
21
|
+
type: props.definePropType(Object)
|
|
22
|
+
},
|
|
23
|
+
parsedValue: {
|
|
24
|
+
type: props.definePropType([Object, Array]),
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
rangeState: {
|
|
28
|
+
type: props.definePropType(Object),
|
|
29
|
+
default: () => ({
|
|
30
|
+
endDate: null,
|
|
31
|
+
selecting: false
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const selectionModeWithDefault = (mode) => {
|
|
36
|
+
return {
|
|
37
|
+
type: String,
|
|
38
|
+
values: selectionModes,
|
|
39
|
+
default: mode
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.datePickerSharedProps = datePickerSharedProps;
|
|
44
|
+
exports.selectionModeWithDefault = selectionModeWithDefault;
|
|
45
|
+
//# sourceMappingURL=shared2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared2.js","sources":["../../../../../../../packages/components/date-picker/src/props/shared.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Dayjs } from 'dayjs'\n\nconst selectionModes = ['date', 'dates', 'year', 'month', 'week']\n\ntype RangeState = {\n endDate: null | Dayjs\n selecting: boolean\n}\n\nexport const datePickerSharedProps = buildProps({\n disabledDate: {\n type: definePropType<(date: Date) => boolean>(Function),\n },\n date: {\n type: definePropType<Dayjs>(Object),\n required: true,\n },\n minDate: {\n type: definePropType<Dayjs | null>(Object),\n },\n maxDate: {\n type: definePropType<Dayjs | null>(Object),\n },\n parsedValue: {\n type: definePropType<Dayjs | Dayjs[]>([Object, Array]),\n required: true,\n },\n rangeState: {\n type: definePropType<RangeState>(Object),\n default: () => ({\n endDate: null,\n selecting: false,\n }),\n },\n} as const)\n\nexport const selectionModeWithDefault = (\n mode: typeof selectionModes[number]\n) => {\n return {\n type: String,\n values: selectionModes,\n default: mode,\n }\n}\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACA,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACtD,MAAC,qBAAqB,GAAGA,gBAAU,CAAC;AAChD,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEC,oBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEA,oBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,oBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,oBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEA,oBAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,oBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,MAAM,OAAO,EAAE,IAAI;AACnB,MAAM,SAAS,EAAE,KAAK;AACtB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,EAAE;AACS,MAAC,wBAAwB,GAAG,CAAC,IAAI,KAAK;AAClD,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG,CAAC;AACJ;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var timeSelect = require('./src/time-
|
|
5
|
+
var timeSelect = require('./src/time-select4.js');
|
|
6
6
|
|
|
7
7
|
timeSelect["default"].install = (app) => {
|
|
8
8
|
app.component(timeSelect["default"].name, timeSelect["default"]);
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var timeSelect = require('./time-select3.js');
|
|
6
6
|
|
|
7
|
-
const _sfc_main = {};
|
|
8
|
-
var timeSelect = /*#__PURE__*/pluginVue_exportHelper["default"](_sfc_main, [['__file',"/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
exports.timeSelectProps = timeSelect.timeSelectProps;
|
|
11
10
|
//# sourceMappingURL=time-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-select.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"time-select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -2,247 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var dayjs = require('dayjs');
|
|
7
|
-
var customParseFormat = require('dayjs/plugin/customParseFormat.js');
|
|
8
|
-
var index = require('../../select/index2.js');
|
|
9
|
-
var index$1 = require('../../icon/index2.js');
|
|
10
|
-
var iconsVue = require('@element-plus/icons-vue');
|
|
11
|
-
require('../../../hooks/index2.js');
|
|
12
|
-
require('../../../constants/index2.js');
|
|
13
5
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
-
var size = require('../../../constants/size2.js');
|
|
15
|
-
var index$2 = require('../../../hooks/use-namespace/index2.js');
|
|
16
6
|
|
|
17
|
-
|
|
7
|
+
const _sfc_main = {};
|
|
8
|
+
var timeSelect = /*#__PURE__*/pluginVue_exportHelper["default"](_sfc_main, [['__file',"/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);
|
|
18
9
|
|
|
19
|
-
|
|
20
|
-
var customParseFormat__default = /*#__PURE__*/_interopDefaultLegacy(customParseFormat);
|
|
21
|
-
|
|
22
|
-
dayjs__default["default"].extend(customParseFormat__default["default"]);
|
|
23
|
-
const { Option: ElOption } = index.ElSelect;
|
|
24
|
-
const parseTime = (time) => {
|
|
25
|
-
const values = (time || "").split(":");
|
|
26
|
-
if (values.length >= 2) {
|
|
27
|
-
let hours = Number.parseInt(values[0], 10);
|
|
28
|
-
const minutes = Number.parseInt(values[1], 10);
|
|
29
|
-
const timeUpper = time.toUpperCase();
|
|
30
|
-
if (timeUpper.includes("AM") && hours === 12) {
|
|
31
|
-
hours = 0;
|
|
32
|
-
} else if (timeUpper.includes("PM") && hours !== 12) {
|
|
33
|
-
hours += 12;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
hours,
|
|
37
|
-
minutes
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return null;
|
|
41
|
-
};
|
|
42
|
-
const compareTime = (time1, time2) => {
|
|
43
|
-
const value1 = parseTime(time1);
|
|
44
|
-
const value2 = parseTime(time2);
|
|
45
|
-
const minutes1 = value1.minutes + value1.hours * 60;
|
|
46
|
-
const minutes2 = value2.minutes + value2.hours * 60;
|
|
47
|
-
if (minutes1 === minutes2) {
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
return minutes1 > minutes2 ? 1 : -1;
|
|
51
|
-
};
|
|
52
|
-
const padTime = (time) => {
|
|
53
|
-
return `${time}`.padStart(2, "0");
|
|
54
|
-
};
|
|
55
|
-
const formatTime = (time) => {
|
|
56
|
-
return `${padTime(time.hours)}:${padTime(time.minutes)}`;
|
|
57
|
-
};
|
|
58
|
-
const nextTime = (time, step) => {
|
|
59
|
-
const timeValue = parseTime(time);
|
|
60
|
-
const stepValue = parseTime(step);
|
|
61
|
-
const next = {
|
|
62
|
-
hours: timeValue.hours,
|
|
63
|
-
minutes: timeValue.minutes
|
|
64
|
-
};
|
|
65
|
-
next.minutes += stepValue.minutes;
|
|
66
|
-
next.hours += stepValue.hours;
|
|
67
|
-
next.hours += Math.floor(next.minutes / 60);
|
|
68
|
-
next.minutes = next.minutes % 60;
|
|
69
|
-
return formatTime(next);
|
|
70
|
-
};
|
|
71
|
-
const _sfc_main = vue.defineComponent({
|
|
72
|
-
name: "ElTimeSelect",
|
|
73
|
-
components: { ElSelect: index.ElSelect, ElOption, ElIcon: index$1.ElIcon },
|
|
74
|
-
model: {
|
|
75
|
-
prop: "value",
|
|
76
|
-
event: "change"
|
|
77
|
-
},
|
|
78
|
-
props: {
|
|
79
|
-
format: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: "HH:mm"
|
|
82
|
-
},
|
|
83
|
-
modelValue: String,
|
|
84
|
-
disabled: {
|
|
85
|
-
type: Boolean,
|
|
86
|
-
default: false
|
|
87
|
-
},
|
|
88
|
-
editable: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: true
|
|
91
|
-
},
|
|
92
|
-
effect: {
|
|
93
|
-
type: String,
|
|
94
|
-
default: "light"
|
|
95
|
-
},
|
|
96
|
-
clearable: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: true
|
|
99
|
-
},
|
|
100
|
-
size: {
|
|
101
|
-
type: String,
|
|
102
|
-
values: size.componentSizes,
|
|
103
|
-
default: ""
|
|
104
|
-
},
|
|
105
|
-
placeholder: {
|
|
106
|
-
type: String,
|
|
107
|
-
default: ""
|
|
108
|
-
},
|
|
109
|
-
start: {
|
|
110
|
-
type: String,
|
|
111
|
-
default: "09:00"
|
|
112
|
-
},
|
|
113
|
-
end: {
|
|
114
|
-
type: String,
|
|
115
|
-
default: "18:00"
|
|
116
|
-
},
|
|
117
|
-
step: {
|
|
118
|
-
type: String,
|
|
119
|
-
default: "00:30"
|
|
120
|
-
},
|
|
121
|
-
minTime: {
|
|
122
|
-
type: String,
|
|
123
|
-
default: ""
|
|
124
|
-
},
|
|
125
|
-
maxTime: {
|
|
126
|
-
type: String,
|
|
127
|
-
default: ""
|
|
128
|
-
},
|
|
129
|
-
name: {
|
|
130
|
-
type: String,
|
|
131
|
-
default: ""
|
|
132
|
-
},
|
|
133
|
-
prefixIcon: {
|
|
134
|
-
type: [String, Object],
|
|
135
|
-
default: iconsVue.Clock
|
|
136
|
-
},
|
|
137
|
-
clearIcon: {
|
|
138
|
-
type: [String, Object],
|
|
139
|
-
default: iconsVue.CircleClose
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
emits: ["change", "blur", "focus", "update:modelValue"],
|
|
143
|
-
setup(props) {
|
|
144
|
-
const nsInput = index$2.useNamespace("input");
|
|
145
|
-
const select = vue.ref(null);
|
|
146
|
-
const value = vue.computed(() => props.modelValue);
|
|
147
|
-
const start = vue.computed(() => {
|
|
148
|
-
const time = parseTime(props.start);
|
|
149
|
-
return formatTime(time);
|
|
150
|
-
});
|
|
151
|
-
const end = vue.computed(() => {
|
|
152
|
-
const time = parseTime(props.end);
|
|
153
|
-
return formatTime(time);
|
|
154
|
-
});
|
|
155
|
-
const step = vue.computed(() => {
|
|
156
|
-
const time = parseTime(props.step);
|
|
157
|
-
return formatTime(time);
|
|
158
|
-
});
|
|
159
|
-
const minTime = vue.computed(() => {
|
|
160
|
-
const time = parseTime(props.minTime);
|
|
161
|
-
return time ? formatTime(time) : null;
|
|
162
|
-
});
|
|
163
|
-
const maxTime = vue.computed(() => {
|
|
164
|
-
const time = parseTime(props.maxTime);
|
|
165
|
-
return time ? formatTime(time) : null;
|
|
166
|
-
});
|
|
167
|
-
const items = vue.computed(() => {
|
|
168
|
-
const result = [];
|
|
169
|
-
if (props.start && props.end && props.step) {
|
|
170
|
-
let current = start.value;
|
|
171
|
-
let currentTime;
|
|
172
|
-
while (compareTime(current, end.value) <= 0) {
|
|
173
|
-
currentTime = dayjs__default["default"](current, "HH:mm").format(props.format);
|
|
174
|
-
result.push({
|
|
175
|
-
value: currentTime,
|
|
176
|
-
disabled: compareTime(current, minTime.value || "-1:-1") <= 0 || compareTime(current, maxTime.value || "100:100") >= 0
|
|
177
|
-
});
|
|
178
|
-
current = nextTime(current, step.value);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return result;
|
|
182
|
-
});
|
|
183
|
-
const blur = () => {
|
|
184
|
-
var _a, _b;
|
|
185
|
-
(_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
|
|
186
|
-
};
|
|
187
|
-
const focus = () => {
|
|
188
|
-
var _a, _b;
|
|
189
|
-
(_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
190
|
-
};
|
|
191
|
-
return {
|
|
192
|
-
nsInput,
|
|
193
|
-
select,
|
|
194
|
-
value,
|
|
195
|
-
items,
|
|
196
|
-
blur,
|
|
197
|
-
focus
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
202
|
-
const _component_el_option = vue.resolveComponent("el-option");
|
|
203
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
204
|
-
const _component_el_select = vue.resolveComponent("el-select");
|
|
205
|
-
return vue.openBlock(), vue.createBlock(_component_el_select, {
|
|
206
|
-
ref: "select",
|
|
207
|
-
"model-value": _ctx.value,
|
|
208
|
-
disabled: _ctx.disabled,
|
|
209
|
-
clearable: _ctx.clearable,
|
|
210
|
-
"clear-icon": _ctx.clearIcon,
|
|
211
|
-
size: _ctx.size,
|
|
212
|
-
effect: _ctx.effect,
|
|
213
|
-
placeholder: _ctx.placeholder,
|
|
214
|
-
"default-first-option": "",
|
|
215
|
-
filterable: _ctx.editable,
|
|
216
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit("update:modelValue", event)),
|
|
217
|
-
onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit("change", event)),
|
|
218
|
-
onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
|
|
219
|
-
onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event))
|
|
220
|
-
}, {
|
|
221
|
-
prefix: vue.withCtx(() => [
|
|
222
|
-
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
223
|
-
key: 0,
|
|
224
|
-
class: vue.normalizeClass(_ctx.nsInput.e("prefix-icon"))
|
|
225
|
-
}, {
|
|
226
|
-
default: vue.withCtx(() => [
|
|
227
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
231
|
-
]),
|
|
232
|
-
default: vue.withCtx(() => [
|
|
233
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.items, (item) => {
|
|
234
|
-
return vue.openBlock(), vue.createBlock(_component_el_option, {
|
|
235
|
-
key: item.value,
|
|
236
|
-
label: item.value,
|
|
237
|
-
value: item.value,
|
|
238
|
-
disabled: item.disabled
|
|
239
|
-
}, null, 8, ["label", "value", "disabled"]);
|
|
240
|
-
}), 128))
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
}, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable"]);
|
|
244
|
-
}
|
|
245
|
-
var TimeSelect = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);
|
|
246
|
-
|
|
247
|
-
exports["default"] = TimeSelect;
|
|
10
|
+
exports["default"] = timeSelect;
|
|
248
11
|
//# sourceMappingURL=time-select2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-select2.js","sources":["../../../../../../packages/components/time-select/src/time-select.vue"],"sourcesContent":["<template>\n <el-select\n ref=\"select\"\n :model-value=\"value\"\n :disabled=\"disabled\"\n :clearable=\"clearable\"\n :clear-icon=\"clearIcon\"\n :size=\"size\"\n :effect=\"effect\"\n :placeholder=\"placeholder\"\n default-first-option\n :filterable=\"editable\"\n @update:model-value=\"(event) => $emit('update:modelValue', event)\"\n @change=\"(event) => $emit('change', event)\"\n @blur=\"(event) => $emit('blur', event)\"\n @focus=\"(event) => $emit('focus', event)\"\n >\n <el-option\n v-for=\"item in items\"\n :key=\"item.value\"\n :label=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n />\n <template #prefix>\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('prefix-icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </template>\n </el-select>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport ElSelect from '@element-plus/components/select'\nimport ElIcon from '@element-plus/components/icon'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\n\nimport { componentSizes } from '@element-plus/constants'\nimport type { Component, PropType } from 'vue'\ndayjs.extend(customParseFormat)\n\nconst { Option: ElOption } = ElSelect\n\ninterface Time {\n hours: number\n minutes: number\n}\n\nconst parseTime = (time: string): null | Time => {\n const values = (time || '').split(':')\n if (values.length >= 2) {\n let hours = Number.parseInt(values[0], 10)\n const minutes = Number.parseInt(values[1], 10)\n const timeUpper = time.toUpperCase()\n if (timeUpper.includes('AM') && hours === 12) {\n hours = 0\n } else if (timeUpper.includes('PM') && hours !== 12) {\n hours += 12\n }\n return {\n hours,\n minutes,\n }\n }\n return null\n}\nconst compareTime = (time1: string, time2: string): number => {\n const value1 = parseTime(time1)\n const value2 = parseTime(time2)\n const minutes1 = value1.minutes + value1.hours * 60\n const minutes2 = value2.minutes + value2.hours * 60\n if (minutes1 === minutes2) {\n return 0\n }\n return minutes1 > minutes2 ? 1 : -1\n}\nconst padTime = (time: number | string) => {\n return `${time}`.padStart(2, '0')\n}\nconst formatTime = (time: Time): string => {\n return `${padTime(time.hours)}:${padTime(time.minutes)}`\n}\nconst nextTime = (time: string, step: string): string => {\n const timeValue = parseTime(time)\n const stepValue = parseTime(step)\n const next = {\n hours: timeValue.hours,\n minutes: timeValue.minutes,\n }\n next.minutes += stepValue.minutes\n next.hours += stepValue.hours\n next.hours += Math.floor(next.minutes / 60)\n next.minutes = next.minutes % 60\n return formatTime(next)\n}\n\nexport default defineComponent({\n name: 'ElTimeSelect',\n components: { ElSelect, ElOption, ElIcon },\n model: {\n prop: 'value',\n event: 'change',\n },\n props: {\n format: {\n type: String,\n default: 'HH:mm',\n },\n modelValue: String,\n disabled: {\n type: Boolean,\n default: false,\n },\n editable: {\n type: Boolean,\n default: true,\n },\n effect: {\n type: String as PropType<'light' | 'dark' | string>,\n default: 'light',\n },\n clearable: {\n type: Boolean,\n default: true,\n },\n size: {\n type: String as PropType<ComponentSize>,\n values: componentSizes,\n default: '',\n },\n placeholder: {\n type: String,\n default: '',\n },\n start: {\n type: String,\n default: '09:00',\n },\n end: {\n type: String,\n default: '18:00',\n },\n step: {\n type: String,\n default: '00:30',\n },\n minTime: {\n type: String,\n default: '',\n },\n maxTime: {\n type: String,\n default: '',\n },\n name: {\n type: String,\n default: '',\n },\n prefixIcon: {\n type: [String, Object] as PropType<string | Component>,\n default: Clock,\n },\n clearIcon: {\n type: [String, Object] as PropType<string | Component>,\n default: CircleClose,\n },\n },\n emits: ['change', 'blur', 'focus', 'update:modelValue'],\n setup(props) {\n const nsInput = useNamespace('input')\n const select = ref(null)\n\n const value = computed(() => props.modelValue)\n const start = computed(() => {\n const time = parseTime(props.start)\n return formatTime(time)\n })\n const end = computed(() => {\n const time = parseTime(props.end)\n return formatTime(time)\n })\n const step = computed(() => {\n const time = parseTime(props.step)\n return formatTime(time)\n })\n const minTime = computed(() => {\n const time = parseTime(props.minTime)\n return time ? formatTime(time) : null\n })\n const maxTime = computed(() => {\n const time = parseTime(props.maxTime)\n return time ? formatTime(time) : null\n })\n const items = computed(() => {\n const result = []\n if (props.start && props.end && props.step) {\n let current = start.value\n let currentTime\n while (compareTime(current, end.value) <= 0) {\n currentTime = dayjs(current, 'HH:mm').format(props.format)\n result.push({\n value: currentTime,\n disabled:\n compareTime(current, minTime.value || '-1:-1') <= 0 ||\n compareTime(current, maxTime.value || '100:100') >= 0,\n })\n current = nextTime(current, step.value)\n }\n }\n return result\n })\n const blur = () => {\n select.value?.blur?.()\n }\n const focus = () => {\n select.value?.focus?.()\n }\n\n return {\n nsInput,\n select,\n value,\n items,\n blur,\n focus,\n }\n },\n})\n</script>\n"],"names":["dayjs","customParseFormat","ElSelect","defineComponent","ElIcon","componentSizes","Clock","CircleClose","useNamespace","ref","computed","_resolveComponent","_openBlock","_createBlock","_withCtx","_createCommentVNode","_createElementBlock","_Fragment","_renderList"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CAA,yBAAA,CAAM,OAAOC,qCAAiB,CAAA,CAAA;AAE9B,MAAM,EAAE,QAAQ,QAAa,EAAA,GAAAC,cAAA,CAAA;AAO7B,MAAM,SAAA,GAAY,CAAC,IAA8B,KAAA;AAC/C,EAAA,MAAM,MAAU,GAAA,CAAA,IAAA,IAAQ,EAAI,EAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AACrC,EAAI,IAAA,MAAA,CAAO,UAAU,CAAG,EAAA;AACtB,IAAA,IAAI,KAAQ,GAAA,MAAA,CAAO,QAAS,CAAA,MAAA,CAAO,IAAI,EAAE,CAAA,CAAA;AACzC,IAAA,MAAM,OAAU,GAAA,MAAA,CAAO,QAAS,CAAA,MAAA,CAAO,IAAI,EAAE,CAAA,CAAA;AAC7C,IAAM,MAAA,SAAA,GAAY,KAAK,WAAY,EAAA,CAAA;AACnC,IAAA,IAAI,SAAU,CAAA,QAAA,CAAS,IAAI,CAAA,IAAK,UAAU,EAAI,EAAA;AAC5C,MAAQ,KAAA,GAAA,CAAA,CAAA;AAAA,eACC,SAAU,CAAA,QAAA,CAAS,IAAI,CAAA,IAAK,UAAU,EAAI,EAAA;AACnD,MAAS,KAAA,IAAA,EAAA,CAAA;AAAA,KACX;AACA,IAAO,OAAA;AAAA,MACL,KAAA;AAAA,MACA,OAAA;AAAA,KACF,CAAA;AAAA,GACF;AACA,EAAO,OAAA,IAAA,CAAA;AACT,CAAA,CAAA;AACA,MAAM,WAAA,GAAc,CAAC,KAAA,EAAe,KAA0B,KAAA;AAC5D,EAAM,MAAA,MAAA,GAAS,UAAU,KAAK,CAAA,CAAA;AAC9B,EAAM,MA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AAAA,KAAA,CAAA;;AAKrB,OAAAH,aAJW,CAAA,IAAA,CAAA,EAAAI,sBAAA,CAAAC,YAAA,EAAA,IAAA,EAAAC,cAAA,CAAA,IAAA,CAAA,KAAA,EAAA,CAAA,IAAA,KAAA;AAAA,QAAA,oBACE,EAAA,EAAAL,eAAA,CAAA,oBAAA,EAAA;AAAA,UACZ,SAAY,CAAA,KAAA;AAAA,UACZ,WAAe,CAAA,KAAA;AAAA,UAAA,KAAA,EAAA,IAAA,CAAA,KAAA;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"time-select2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../utils/index2.js');
|
|
6
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
7
|
+
require('../../../hooks/index2.js');
|
|
8
|
+
var props = require('../../../utils/vue/props2.js');
|
|
9
|
+
var index = require('../../../hooks/use-common-props/index2.js');
|
|
10
|
+
|
|
11
|
+
const timeSelectProps = props.buildProps({
|
|
12
|
+
format: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "HH:mm"
|
|
15
|
+
},
|
|
16
|
+
modelValue: String,
|
|
17
|
+
disabled: Boolean,
|
|
18
|
+
editable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
effect: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "light"
|
|
25
|
+
},
|
|
26
|
+
clearable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
},
|
|
30
|
+
size: index.useSizeProp,
|
|
31
|
+
placeholder: String,
|
|
32
|
+
start: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "09:00"
|
|
35
|
+
},
|
|
36
|
+
end: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "18:00"
|
|
39
|
+
},
|
|
40
|
+
step: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "00:30"
|
|
43
|
+
},
|
|
44
|
+
minTime: String,
|
|
45
|
+
maxTime: String,
|
|
46
|
+
name: String,
|
|
47
|
+
prefixIcon: {
|
|
48
|
+
type: props.definePropType([String, Object]),
|
|
49
|
+
default: () => iconsVue.Clock
|
|
50
|
+
},
|
|
51
|
+
clearIcon: {
|
|
52
|
+
type: props.definePropType([String, Object]),
|
|
53
|
+
default: () => iconsVue.CircleClose
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
exports.timeSelectProps = timeSelectProps;
|
|
58
|
+
//# sourceMappingURL=time-select3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-select3.js","sources":["../../../../../../packages/components/time-select/src/time-select.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type TimeSelect from './time-select.vue'\nimport type { Component, ExtractPropTypes, PropType } from 'vue'\n\nexport const timeSelectProps = buildProps({\n format: {\n type: String,\n default: 'HH:mm',\n },\n modelValue: String,\n disabled: Boolean,\n editable: {\n type: Boolean,\n default: true,\n },\n effect: {\n type: String as PropType<'light' | 'dark' | string>,\n default: 'light',\n },\n clearable: {\n type: Boolean,\n default: true,\n },\n size: useSizeProp,\n placeholder: String,\n start: {\n type: String,\n default: '09:00',\n },\n end: {\n type: String,\n default: '18:00',\n },\n step: {\n type: String,\n default: '00:30',\n },\n minTime: String,\n maxTime: String,\n name: String,\n prefixIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Clock,\n },\n clearIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => CircleClose,\n },\n} as const)\n\nexport type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>\n\nexport type TimeSelectInstance = InstanceType<typeof TimeSelect>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AO,EAAE,MAAME,oBAAW;AAC9B,GAAG;AACH,CAAC;;;;"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var dayjs = require('dayjs');
|
|
7
|
+
var customParseFormat = require('dayjs/plugin/customParseFormat');
|
|
8
|
+
var index = require('../../select/index2.js');
|
|
9
|
+
var index$2 = require('../../icon/index2.js');
|
|
10
|
+
require('../../../hooks/index2.js');
|
|
11
|
+
var timeSelect = require('./time-select3.js');
|
|
12
|
+
var utils = require('./utils2.js');
|
|
13
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
14
|
+
var index$1 = require('../../../hooks/use-namespace/index2.js');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
19
|
+
var customParseFormat__default = /*#__PURE__*/_interopDefaultLegacy(customParseFormat);
|
|
20
|
+
|
|
21
|
+
const __default__ = {
|
|
22
|
+
name: "ElTimeSelect",
|
|
23
|
+
model: {
|
|
24
|
+
prop: "value",
|
|
25
|
+
event: "change"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
29
|
+
...__default__,
|
|
30
|
+
props: timeSelect.timeSelectProps,
|
|
31
|
+
emits: ["change", "blur", "focus", "update:modelValue"],
|
|
32
|
+
setup(__props, { expose }) {
|
|
33
|
+
const props = __props;
|
|
34
|
+
dayjs__default["default"].extend(customParseFormat__default["default"]);
|
|
35
|
+
const { Option: ElOption } = index.ElSelect;
|
|
36
|
+
const nsInput = index$1.useNamespace("input");
|
|
37
|
+
const select = vue.ref();
|
|
38
|
+
const value = vue.computed(() => props.modelValue);
|
|
39
|
+
const start = vue.computed(() => {
|
|
40
|
+
const time = utils.parseTime(props.start);
|
|
41
|
+
return time ? utils.formatTime(time) : null;
|
|
42
|
+
});
|
|
43
|
+
const end = vue.computed(() => {
|
|
44
|
+
const time = utils.parseTime(props.end);
|
|
45
|
+
return time ? utils.formatTime(time) : null;
|
|
46
|
+
});
|
|
47
|
+
const step = vue.computed(() => {
|
|
48
|
+
const time = utils.parseTime(props.step);
|
|
49
|
+
return time ? utils.formatTime(time) : null;
|
|
50
|
+
});
|
|
51
|
+
const minTime = vue.computed(() => {
|
|
52
|
+
const time = utils.parseTime(props.minTime || "");
|
|
53
|
+
return time ? utils.formatTime(time) : null;
|
|
54
|
+
});
|
|
55
|
+
const maxTime = vue.computed(() => {
|
|
56
|
+
const time = utils.parseTime(props.maxTime || "");
|
|
57
|
+
return time ? utils.formatTime(time) : null;
|
|
58
|
+
});
|
|
59
|
+
const items = vue.computed(() => {
|
|
60
|
+
const result = [];
|
|
61
|
+
if (props.start && props.end && props.step) {
|
|
62
|
+
let current = start.value;
|
|
63
|
+
let currentTime;
|
|
64
|
+
while (current && end.value && utils.compareTime(current, end.value) <= 0) {
|
|
65
|
+
currentTime = dayjs__default["default"](current, "HH:mm").format(props.format);
|
|
66
|
+
result.push({
|
|
67
|
+
value: currentTime,
|
|
68
|
+
disabled: utils.compareTime(current, minTime.value || "-1:-1") <= 0 || utils.compareTime(current, maxTime.value || "100:100") >= 0
|
|
69
|
+
});
|
|
70
|
+
current = utils.nextTime(current, step.value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
});
|
|
75
|
+
const blur = () => {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
(_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
|
|
78
|
+
};
|
|
79
|
+
const focus = () => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
(_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
82
|
+
};
|
|
83
|
+
expose({
|
|
84
|
+
blur,
|
|
85
|
+
focus
|
|
86
|
+
});
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.ElSelect), {
|
|
89
|
+
ref_key: "select",
|
|
90
|
+
ref: select,
|
|
91
|
+
"model-value": vue.unref(value),
|
|
92
|
+
disabled: _ctx.disabled,
|
|
93
|
+
clearable: _ctx.clearable,
|
|
94
|
+
"clear-icon": _ctx.clearIcon,
|
|
95
|
+
size: _ctx.size,
|
|
96
|
+
effect: _ctx.effect,
|
|
97
|
+
placeholder: _ctx.placeholder,
|
|
98
|
+
"default-first-option": "",
|
|
99
|
+
filterable: _ctx.editable,
|
|
100
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit("update:modelValue", event)),
|
|
101
|
+
onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit("change", event)),
|
|
102
|
+
onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
|
|
103
|
+
onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event))
|
|
104
|
+
}, {
|
|
105
|
+
prefix: vue.withCtx(() => [
|
|
106
|
+
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
|
|
107
|
+
key: 0,
|
|
108
|
+
class: vue.normalizeClass(vue.unref(nsInput).e("prefix-icon"))
|
|
109
|
+
}, {
|
|
110
|
+
default: vue.withCtx(() => [
|
|
111
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
115
|
+
]),
|
|
116
|
+
default: vue.withCtx(() => [
|
|
117
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(items), (item) => {
|
|
118
|
+
return vue.openBlock(), vue.createBlock(vue.unref(ElOption), {
|
|
119
|
+
key: item.value,
|
|
120
|
+
label: item.value,
|
|
121
|
+
value: item.value,
|
|
122
|
+
disabled: item.disabled
|
|
123
|
+
}, null, 8, ["label", "value", "disabled"]);
|
|
124
|
+
}), 128))
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable"]);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var TimeSelect = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);
|
|
132
|
+
|
|
133
|
+
exports["default"] = TimeSelect;
|
|
134
|
+
//# sourceMappingURL=time-select4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-select4.js","sources":["../../../../../../packages/components/time-select/src/time-select.vue"],"sourcesContent":["<template>\n <el-select\n ref=\"select\"\n :model-value=\"value\"\n :disabled=\"disabled\"\n :clearable=\"clearable\"\n :clear-icon=\"clearIcon\"\n :size=\"size\"\n :effect=\"effect\"\n :placeholder=\"placeholder\"\n default-first-option\n :filterable=\"editable\"\n @update:model-value=\"(event) => $emit('update:modelValue', event)\"\n @change=\"(event) => $emit('change', event)\"\n @blur=\"(event) => $emit('blur', event)\"\n @focus=\"(event) => $emit('focus', event)\"\n >\n <el-option\n v-for=\"item in items\"\n :key=\"item.value\"\n :label=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n />\n <template #prefix>\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('prefix-icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </template>\n </el-select>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport ElSelect from '@element-plus/components/select'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timeSelectProps } from './time-select'\nimport { compareTime, formatTime, nextTime, parseTime } from './utils'\n\ndayjs.extend(customParseFormat)\n\nconst { Option: ElOption } = ElSelect\n\ndefineOptions({\n name: 'ElTimeSelect',\n model: {\n prop: 'value',\n event: 'change',\n },\n})\n\ndefineEmits(['change', 'blur', 'focus', 'update:modelValue'])\n\nconst props = defineProps(timeSelectProps)\n\nconst nsInput = useNamespace('input')\nconst select = ref<typeof ElSelect>()\n\nconst value = computed(() => props.modelValue)\nconst start = computed(() => {\n const time = parseTime(props.start)\n return time ? formatTime(time) : null\n})\n\nconst end = computed(() => {\n const time = parseTime(props.end)\n return time ? formatTime(time) : null\n})\n\nconst step = computed(() => {\n const time = parseTime(props.step)\n return time ? formatTime(time) : null\n})\n\nconst minTime = computed(() => {\n const time = parseTime(props.minTime || '')\n return time ? formatTime(time) : null\n})\n\nconst maxTime = computed(() => {\n const time = parseTime(props.maxTime || '')\n return time ? formatTime(time) : null\n})\n\nconst items = computed(() => {\n const result: { value: string; disabled: boolean }[] = []\n if (props.start && props.end && props.step) {\n let current = start.value\n let currentTime: string\n while (current && end.value && compareTime(current, end.value) <= 0) {\n currentTime = dayjs(current, 'HH:mm').format(props.format)\n result.push({\n value: currentTime,\n disabled:\n compareTime(current, minTime.value || '-1:-1') <= 0 ||\n compareTime(current, maxTime.value || '100:100') >= 0,\n })\n current = nextTime(current, step.value!)\n }\n }\n return result\n})\n\nconst blur = () => {\n select.value?.blur?.()\n}\n\nconst focus = () => {\n select.value?.focus?.()\n}\n\ndefineExpose({\n blur,\n focus,\n})\n</script>\n"],"names":["dayjs","customParseFormat","ElSelect","useNamespace","ref","computed","parseTime","formatTime","compareTime","nextTime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,IAAAA,yBAAA,CAAA,OAAAC,qCAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA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,EAAA,EAAA,CAAA;AAEA,MAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAAA,IACA,MAAA,CAAA;AAAA,MACA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var utils = require('./utils2.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.compareTime = utils.compareTime;
|
|
10
|
+
exports.formatTime = utils.formatTime;
|
|
11
|
+
exports.nextTime = utils.nextTime;
|
|
12
|
+
exports.padTime = utils.padTime;
|
|
13
|
+
exports.parseTime = utils.parseTime;
|
|
14
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|