@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.
Files changed (144) hide show
  1. package/package.json +11 -11
  2. package/dist/PickerInput/Popup/Footer.cjs +0 -115
  3. package/dist/PickerInput/Popup/PopupPanel.cjs +0 -413
  4. package/dist/PickerInput/Popup/PresetPanel.cjs +0 -54
  5. package/dist/PickerInput/Popup/index.cjs +0 -526
  6. package/dist/PickerInput/RangePicker.cjs +0 -1911
  7. package/dist/PickerInput/Selector/Icon.cjs +0 -89
  8. package/dist/PickerInput/Selector/Input.cjs +0 -376
  9. package/dist/PickerInput/Selector/MaskFormat.cjs +0 -72
  10. package/dist/PickerInput/Selector/RangeSelector.cjs +0 -1393
  11. package/dist/PickerInput/Selector/SingleSelector/MultipleDates.cjs +0 -110
  12. package/dist/PickerInput/Selector/SingleSelector/index.cjs +0 -1361
  13. package/dist/PickerInput/Selector/hooks/useClearIcon.cjs +0 -17
  14. package/dist/PickerInput/Selector/hooks/useInputHooks.cjs +0 -125
  15. package/dist/PickerInput/Selector/hooks/useRootProps.cjs +0 -14
  16. package/dist/PickerInput/Selector/util.cjs +0 -32
  17. package/dist/PickerInput/SinglePicker.cjs +0 -1881
  18. package/dist/PickerInput/context.cjs +0 -12
  19. package/dist/PickerInput/hooks/useCellRender.cjs +0 -25
  20. package/dist/PickerInput/hooks/useDelayState.cjs +0 -37
  21. package/dist/PickerInput/hooks/useDisabledBoundary.cjs +0 -15
  22. package/dist/PickerInput/hooks/useFieldFormat.cjs +0 -17
  23. package/dist/PickerInput/hooks/useFieldsInvalidate.cjs +0 -24
  24. package/dist/PickerInput/hooks/useFilledProps.cjs +0 -103
  25. package/dist/PickerInput/hooks/useInputReadOnly.cjs +0 -13
  26. package/dist/PickerInput/hooks/useInvalidate.cjs +0 -34
  27. package/dist/PickerInput/hooks/useLockEffect.cjs +0 -16
  28. package/dist/PickerInput/hooks/useOpen.cjs +0 -15
  29. package/dist/PickerInput/hooks/usePresets.cjs +0 -21
  30. package/dist/PickerInput/hooks/useRangeActive.cjs +0 -57
  31. package/dist/PickerInput/hooks/useRangeDisabledDate.cjs +0 -21
  32. package/dist/PickerInput/hooks/useRangePickerValue.cjs +0 -100
  33. package/dist/PickerInput/hooks/useRangeValue.cjs +0 -135
  34. package/dist/PickerInput/hooks/useShowNow.cjs +0 -15
  35. package/dist/PickerPanel/DatePanel/index.cjs +0 -294
  36. package/dist/PickerPanel/DateTimePanel/index.cjs +0 -180
  37. package/dist/PickerPanel/DecadePanel/index.cjs +0 -230
  38. package/dist/PickerPanel/MonthPanel/index.cjs +0 -219
  39. package/dist/PickerPanel/PanelBody.cjs +0 -157
  40. package/dist/PickerPanel/PanelHeader.cjs +0 -132
  41. package/dist/PickerPanel/QuarterPanel/index.cjs +0 -211
  42. package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.cjs +0 -145
  43. package/dist/PickerPanel/TimePanel/TimePanelBody/index.cjs +0 -286
  44. package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.cjs +0 -65
  45. package/dist/PickerPanel/TimePanel/index.cjs +0 -173
  46. package/dist/PickerPanel/WeekPanel/index.cjs +0 -179
  47. package/dist/PickerPanel/YearPanel/index.cjs +0 -239
  48. package/dist/PickerPanel/context.cjs +0 -61
  49. package/dist/PickerPanel/index.cjs +0 -473
  50. package/dist/PickerTrigger/index.cjs +0 -139
  51. package/dist/PickerTrigger/util.cjs +0 -13
  52. package/dist/_virtual/rolldown_runtime.cjs +0 -21
  53. package/dist/generate/dateFns.cjs +0 -80
  54. package/dist/generate/dayjs.cjs +0 -117
  55. package/dist/generate/index.cjs +0 -1
  56. package/dist/generate/luxon.cjs +0 -75
  57. package/dist/generate/moment.cjs +0 -107
  58. package/dist/hooks/useLocale.cjs +0 -45
  59. package/dist/hooks/useSemantic.cjs +0 -18
  60. package/dist/hooks/useSyncState.cjs +0 -29
  61. package/dist/hooks/useTimeConfig.cjs +0 -161
  62. package/dist/hooks/useTimeInfo.cjs +0 -114
  63. package/dist/hooks/useToggleDates.cjs +0 -16
  64. package/dist/index.cjs +0 -12
  65. package/dist/interface.cjs +0 -1
  66. package/dist/locale/am_ET.cjs +0 -34
  67. package/dist/locale/ar_EG.cjs +0 -32
  68. package/dist/locale/az_AZ.cjs +0 -33
  69. package/dist/locale/bg_BG.cjs +0 -32
  70. package/dist/locale/bn_BD.cjs +0 -33
  71. package/dist/locale/by_BY.cjs +0 -33
  72. package/dist/locale/ca_ES.cjs +0 -32
  73. package/dist/locale/common.cjs +0 -8
  74. package/dist/locale/cs_CZ.cjs +0 -32
  75. package/dist/locale/da_DK.cjs +0 -32
  76. package/dist/locale/de_DE.cjs +0 -32
  77. package/dist/locale/el_GR.cjs +0 -32
  78. package/dist/locale/en_GB.cjs +0 -32
  79. package/dist/locale/en_US.cjs +0 -33
  80. package/dist/locale/es_ES.cjs +0 -32
  81. package/dist/locale/es_MX.cjs +0 -33
  82. package/dist/locale/et_EE.cjs +0 -32
  83. package/dist/locale/eu_ES.cjs +0 -34
  84. package/dist/locale/fa_IR.cjs +0 -32
  85. package/dist/locale/fi_FI.cjs +0 -32
  86. package/dist/locale/fr_BE.cjs +0 -32
  87. package/dist/locale/fr_CA.cjs +0 -33
  88. package/dist/locale/fr_FR.cjs +0 -33
  89. package/dist/locale/ga_IE.cjs +0 -33
  90. package/dist/locale/gl_ES.cjs +0 -32
  91. package/dist/locale/he_IL.cjs +0 -33
  92. package/dist/locale/hi_IN.cjs +0 -33
  93. package/dist/locale/hr_HR.cjs +0 -33
  94. package/dist/locale/hu_HU.cjs +0 -33
  95. package/dist/locale/id_ID.cjs +0 -33
  96. package/dist/locale/is_IS.cjs +0 -32
  97. package/dist/locale/it_IT.cjs +0 -55
  98. package/dist/locale/ja_JP.cjs +0 -35
  99. package/dist/locale/ka_GE.cjs +0 -33
  100. package/dist/locale/kk_KZ.cjs +0 -32
  101. package/dist/locale/km_KH.cjs +0 -34
  102. package/dist/locale/kmr_IQ.cjs +0 -32
  103. package/dist/locale/kn_IN.cjs +0 -33
  104. package/dist/locale/ko_KR.cjs +0 -34
  105. package/dist/locale/lt_LT.cjs +0 -34
  106. package/dist/locale/lv_LV.cjs +0 -32
  107. package/dist/locale/mk_MK.cjs +0 -32
  108. package/dist/locale/ml_IN.cjs +0 -33
  109. package/dist/locale/mn_MN.cjs +0 -34
  110. package/dist/locale/mr_IN.cjs +0 -59
  111. package/dist/locale/ms_MY.cjs +0 -34
  112. package/dist/locale/my_MM.cjs +0 -33
  113. package/dist/locale/nb_NO.cjs +0 -34
  114. package/dist/locale/ne_NP.cjs +0 -33
  115. package/dist/locale/nl_BE.cjs +0 -32
  116. package/dist/locale/nl_NL.cjs +0 -32
  117. package/dist/locale/pl_PL.cjs +0 -32
  118. package/dist/locale/pt_BR.cjs +0 -56
  119. package/dist/locale/pt_PT.cjs +0 -55
  120. package/dist/locale/ro_RO.cjs +0 -33
  121. package/dist/locale/ru_RU.cjs +0 -32
  122. package/dist/locale/si_LK.cjs +0 -34
  123. package/dist/locale/sk_SK.cjs +0 -32
  124. package/dist/locale/sl_SI.cjs +0 -32
  125. package/dist/locale/sr_Cyrl_RS.cjs +0 -32
  126. package/dist/locale/sr_RS.cjs +0 -32
  127. package/dist/locale/sv_SE.cjs +0 -32
  128. package/dist/locale/ta_IN.cjs +0 -33
  129. package/dist/locale/te_IN.cjs +0 -33
  130. package/dist/locale/th_TH.cjs +0 -32
  131. package/dist/locale/tk_TK.cjs +0 -32
  132. package/dist/locale/tr_TR.cjs +0 -55
  133. package/dist/locale/ug_CN.cjs +0 -35
  134. package/dist/locale/uk_UA.cjs +0 -32
  135. package/dist/locale/ur_PK.cjs +0 -33
  136. package/dist/locale/uz_UZ.cjs +0 -33
  137. package/dist/locale/vi_VN.cjs +0 -33
  138. package/dist/locale/zh_CN.cjs +0 -36
  139. package/dist/locale/zh_TW.cjs +0 -36
  140. package/dist/utils/dateUtil.cjs +0 -105
  141. package/dist/utils/getClearIcon.cjs +0 -7
  142. package/dist/utils/miscUtil.cjs +0 -46
  143. package/dist/utils/uiUtil.cjs +0 -6
  144. package/dist/utils/warnUtil.cjs +0 -8
@@ -1,173 +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_dateUtil = require("../../utils/dateUtil.cjs");
7
- const require_context = require("../context.cjs");
8
- const require_PanelHeader = require("../PanelHeader.cjs");
9
- const require_index = require("./TimePanelBody/index.cjs");
10
- let vue = require("vue");
11
- let _v_c_util = require("@v-c/util");
12
- var TimePanel = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
13
- const sharedContext = require_context.useSharedPanelContext();
14
- require_context.providePanelContext((0, vue.computed)(() => {
15
- const [info] = require_context.useInfo(props, "time", sharedContext);
16
- return info;
17
- }));
18
- return () => {
19
- const { prefixCls, value, locale, generateConfig, showTime } = props;
20
- const format = typeof showTime === "object" && showTime && showTime.format ? showTime.format : locale?.fieldTimeFormat || "HH:mm:ss";
21
- const panelPrefixCls = `${prefixCls}-time-panel`;
22
- return (0, vue.createVNode)("div", { "class": (0, _v_c_util.clsx)(panelPrefixCls) }, [(0, vue.createVNode)(require_PanelHeader.default, null, { default: () => [value ? require_dateUtil.formatValue(value, {
23
- locale,
24
- format,
25
- generateConfig
26
- }) : "\xA0"] }), (0, vue.createVNode)(require_index.default, typeof showTime === "object" ? showTime : {}, null)]);
27
- };
28
- }, {
29
- props: {
30
- prefixCls: {
31
- type: String,
32
- required: true,
33
- default: void 0
34
- },
35
- locale: {
36
- type: Object,
37
- required: false,
38
- default: void 0
39
- },
40
- generateConfig: {
41
- type: Object,
42
- required: false,
43
- default: void 0
44
- },
45
- pickerValue: {
46
- required: true,
47
- default: void 0
48
- },
49
- onPickerValueChange: {
50
- type: Function,
51
- required: true,
52
- default: void 0
53
- },
54
- value: {
55
- required: false,
56
- default: void 0
57
- },
58
- onSelect: {
59
- type: Function,
60
- required: true,
61
- default: void 0
62
- },
63
- values: {
64
- type: Array,
65
- required: false,
66
- default: void 0
67
- },
68
- onModeChange: {
69
- type: Function,
70
- required: true,
71
- default: void 0
72
- },
73
- disabledDate: {
74
- type: Function,
75
- required: false,
76
- default: void 0
77
- },
78
- minDate: {
79
- required: false,
80
- default: void 0
81
- },
82
- maxDate: {
83
- required: false,
84
- default: void 0
85
- },
86
- cellRender: {
87
- type: Function,
88
- required: false,
89
- default: void 0
90
- },
91
- hoverRangeValue: {
92
- type: [Array, null],
93
- required: true,
94
- default: void 0
95
- },
96
- hoverValue: {
97
- type: [Array, null],
98
- required: false,
99
- default: void 0
100
- },
101
- onHover: {
102
- type: Function,
103
- required: false,
104
- default: void 0
105
- },
106
- showTime: {
107
- type: Object,
108
- required: false,
109
- default: void 0
110
- },
111
- showWeek: {
112
- type: Boolean,
113
- required: false,
114
- default: void 0
115
- },
116
- prevIcon: {
117
- type: [
118
- Object,
119
- Function,
120
- String,
121
- Number,
122
- null,
123
- Boolean,
124
- Array
125
- ],
126
- required: false,
127
- default: void 0
128
- },
129
- nextIcon: {
130
- type: [
131
- Object,
132
- Function,
133
- String,
134
- Number,
135
- null,
136
- Boolean,
137
- Array
138
- ],
139
- required: false,
140
- default: void 0
141
- },
142
- superPrevIcon: {
143
- type: [
144
- Object,
145
- Function,
146
- String,
147
- Number,
148
- null,
149
- Boolean,
150
- Array
151
- ],
152
- required: false,
153
- default: void 0
154
- },
155
- superNextIcon: {
156
- type: [
157
- Object,
158
- Function,
159
- String,
160
- Number,
161
- null,
162
- Boolean,
163
- Array
164
- ],
165
- required: false,
166
- default: void 0
167
- }
168
- },
169
- name: "TimePanel",
170
- inheritAttrs: false
171
- });
172
- var TimePanel_default = TimePanel;
173
- exports.default = TimePanel_default;
@@ -1,179 +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_dateUtil = require("../../utils/dateUtil.cjs");
7
- const require_index = require("../DatePanel/index.cjs");
8
- let vue = require("vue");
9
- let _v_c_util = require("@v-c/util");
10
- var WeekPanel = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
11
- return () => {
12
- const { prefixCls, generateConfig = {}, locale = {}, value, hoverValue, hoverRangeValue } = props;
13
- const localeName = locale.locale;
14
- const rowPrefixCls = `${prefixCls}-week-panel-row`;
15
- const rowClassName = (currentDate) => {
16
- const rangeCls = {};
17
- if (hoverRangeValue) {
18
- const [rangeStart, rangeEnd] = hoverRangeValue;
19
- const isRangeStart = require_dateUtil.isSameWeek(generateConfig, localeName, rangeStart, currentDate);
20
- const isRangeEnd = require_dateUtil.isSameWeek(generateConfig, localeName, rangeEnd, currentDate);
21
- rangeCls[`${rowPrefixCls}-range-start`] = isRangeStart;
22
- rangeCls[`${rowPrefixCls}-range-end`] = isRangeEnd;
23
- rangeCls[`${rowPrefixCls}-range-hover`] = !isRangeStart && !isRangeEnd && require_dateUtil.isInRange(generateConfig, rangeStart, rangeEnd, currentDate);
24
- }
25
- if (hoverValue) rangeCls[`${rowPrefixCls}-hover`] = hoverValue.some((date) => require_dateUtil.isSameWeek(generateConfig, localeName, currentDate, date));
26
- return (0, _v_c_util.clsx)(rowPrefixCls, { [`${rowPrefixCls}-selected`]: !hoverRangeValue && require_dateUtil.isSameWeek(generateConfig, localeName, value, currentDate) }, rangeCls);
27
- };
28
- return (0, vue.createVNode)(require_index.default, (0, vue.mergeProps)(props, {
29
- "mode": "week",
30
- "panelName": "week",
31
- "rowClassName": rowClassName
32
- }), null);
33
- };
34
- }, {
35
- props: {
36
- prefixCls: {
37
- type: String,
38
- required: true,
39
- default: void 0
40
- },
41
- locale: {
42
- type: Object,
43
- required: false,
44
- default: void 0
45
- },
46
- generateConfig: {
47
- type: Object,
48
- required: false,
49
- default: void 0
50
- },
51
- pickerValue: {
52
- required: true,
53
- default: void 0
54
- },
55
- onPickerValueChange: {
56
- type: Function,
57
- required: true,
58
- default: void 0
59
- },
60
- value: {
61
- required: false,
62
- default: void 0
63
- },
64
- onSelect: {
65
- type: Function,
66
- required: true,
67
- default: void 0
68
- },
69
- values: {
70
- type: Array,
71
- required: false,
72
- default: void 0
73
- },
74
- onModeChange: {
75
- type: Function,
76
- required: true,
77
- default: void 0
78
- },
79
- disabledDate: {
80
- type: Function,
81
- required: false,
82
- default: void 0
83
- },
84
- minDate: {
85
- required: false,
86
- default: void 0
87
- },
88
- maxDate: {
89
- required: false,
90
- default: void 0
91
- },
92
- cellRender: {
93
- type: Function,
94
- required: false,
95
- default: void 0
96
- },
97
- hoverRangeValue: {
98
- type: [Array, null],
99
- required: true,
100
- default: void 0
101
- },
102
- hoverValue: {
103
- type: [Array, null],
104
- required: false,
105
- default: void 0
106
- },
107
- onHover: {
108
- type: Function,
109
- required: false,
110
- default: void 0
111
- },
112
- showTime: {
113
- type: Object,
114
- required: false,
115
- default: void 0
116
- },
117
- showWeek: {
118
- type: Boolean,
119
- required: false,
120
- default: void 0
121
- },
122
- prevIcon: {
123
- type: [
124
- Object,
125
- Function,
126
- String,
127
- Number,
128
- null,
129
- Boolean,
130
- Array
131
- ],
132
- required: false,
133
- default: void 0
134
- },
135
- nextIcon: {
136
- type: [
137
- Object,
138
- Function,
139
- String,
140
- Number,
141
- null,
142
- Boolean,
143
- Array
144
- ],
145
- required: false,
146
- default: void 0
147
- },
148
- superPrevIcon: {
149
- type: [
150
- Object,
151
- Function,
152
- String,
153
- Number,
154
- null,
155
- Boolean,
156
- Array
157
- ],
158
- required: false,
159
- default: void 0
160
- },
161
- superNextIcon: {
162
- type: [
163
- Object,
164
- Function,
165
- String,
166
- Number,
167
- null,
168
- Boolean,
169
- Array
170
- ],
171
- required: false,
172
- default: void 0
173
- }
174
- },
175
- name: "WeekPanel",
176
- inheritAttrs: false
177
- });
178
- var WeekPanel_default = WeekPanel;
179
- exports.default = WeekPanel_default;
@@ -1,239 +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_dateUtil = require("../../utils/dateUtil.cjs");
7
- const require_context = require("../context.cjs");
8
- const require_PanelBody = require("../PanelBody.cjs");
9
- const require_PanelHeader = require("../PanelHeader.cjs");
10
- let vue = require("vue");
11
- function _isSlot(s) {
12
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, vue.isVNode)(s);
13
- }
14
- var YearPanel = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
15
- const sharedContext = require_context.useSharedPanelContext();
16
- require_context.providePanelContext((0, vue.computed)(() => {
17
- const [info] = require_context.useInfo(props, "year", sharedContext);
18
- return info;
19
- }));
20
- return () => {
21
- const { prefixCls, locale = {}, generateConfig = {}, pickerValue, disabledDate, onPickerValueChange, onModeChange } = props;
22
- const panelPrefixCls = `${prefixCls}-year-panel`;
23
- const cellYearFormat = locale.cellYearFormat || "YYYY";
24
- const yearFormat = locale.yearFormat || "YYYY";
25
- const getStartYear = (date) => {
26
- const startYear = Math.floor(generateConfig.getYear(date) / 10) * 10;
27
- return generateConfig.setYear(date, startYear);
28
- };
29
- const getEndYear = (date) => {
30
- const startYear = getStartYear(date);
31
- return generateConfig.addYear(startYear, 9);
32
- };
33
- const startYearDate = getStartYear(pickerValue);
34
- const endYearDate = getEndYear(pickerValue);
35
- const baseDate = generateConfig.addYear(startYearDate, -1);
36
- const getCellDate = (date, offset) => {
37
- return generateConfig.addYear(date, offset);
38
- };
39
- const getCellText = (date) => {
40
- return require_dateUtil.formatValue(date, {
41
- locale,
42
- format: cellYearFormat,
43
- generateConfig
44
- });
45
- };
46
- const getCellClassName = (date) => {
47
- return { [`${prefixCls}-cell-in-view`]: require_dateUtil.isSameYear(generateConfig, date, startYearDate) || require_dateUtil.isSameYear(generateConfig, date, endYearDate) || require_dateUtil.isInRange(generateConfig, startYearDate, endYearDate, date) };
48
- };
49
- const mergedDisabledDate = disabledDate ? (currentDate, disabledInfo) => {
50
- const startMonth = generateConfig.setMonth(currentDate, 0);
51
- const startDate = generateConfig.setDate(startMonth, 1);
52
- const endMonth = generateConfig.addYear(startDate, 1);
53
- const endDate = generateConfig.addDate(endMonth, -1);
54
- return disabledDate(startDate, disabledInfo) && disabledDate(endDate, disabledInfo);
55
- } : void 0;
56
- const yearNode = (0, vue.createVNode)("button", {
57
- "type": "button",
58
- "key": "decade",
59
- "aria-label": locale.decadeSelect,
60
- "onClick": () => {
61
- onModeChange("decade");
62
- },
63
- "tabindex": -1,
64
- "class": `${prefixCls}-decade-btn`
65
- }, [
66
- require_dateUtil.formatValue(startYearDate, {
67
- locale,
68
- format: yearFormat,
69
- generateConfig
70
- }),
71
- (0, vue.createTextVNode)("-"),
72
- require_dateUtil.formatValue(endYearDate, {
73
- locale,
74
- format: yearFormat,
75
- generateConfig
76
- })
77
- ]);
78
- return (0, vue.createVNode)("div", { "class": panelPrefixCls }, [(0, vue.createVNode)(require_PanelHeader.default, {
79
- "superOffset": (distance, date) => generateConfig.addYear(date, distance * 10),
80
- "onChange": onPickerValueChange,
81
- "getStart": getStartYear,
82
- "getEnd": getEndYear
83
- }, _isSlot(yearNode) ? yearNode : { default: () => [yearNode] }), (0, vue.createVNode)(require_PanelBody.default, (0, vue.mergeProps)(props, {
84
- "disabledDate": mergedDisabledDate,
85
- "titleFormat": locale.fieldYearFormat,
86
- "colNum": 3,
87
- "rowNum": 4,
88
- "baseDate": baseDate,
89
- "getCellDate": getCellDate,
90
- "getCellText": getCellText,
91
- "getCellClassName": getCellClassName
92
- }), null)]);
93
- };
94
- }, {
95
- props: {
96
- prefixCls: {
97
- type: String,
98
- required: true,
99
- default: void 0
100
- },
101
- locale: {
102
- type: Object,
103
- required: false,
104
- default: void 0
105
- },
106
- generateConfig: {
107
- type: Object,
108
- required: false,
109
- default: void 0
110
- },
111
- pickerValue: {
112
- required: true,
113
- default: void 0
114
- },
115
- onPickerValueChange: {
116
- type: Function,
117
- required: true,
118
- default: void 0
119
- },
120
- value: {
121
- required: false,
122
- default: void 0
123
- },
124
- onSelect: {
125
- type: Function,
126
- required: true,
127
- default: void 0
128
- },
129
- values: {
130
- type: Array,
131
- required: false,
132
- default: void 0
133
- },
134
- onModeChange: {
135
- type: Function,
136
- required: true,
137
- default: void 0
138
- },
139
- disabledDate: {
140
- type: Function,
141
- required: false,
142
- default: void 0
143
- },
144
- minDate: {
145
- required: false,
146
- default: void 0
147
- },
148
- maxDate: {
149
- required: false,
150
- default: void 0
151
- },
152
- cellRender: {
153
- type: Function,
154
- required: false,
155
- default: void 0
156
- },
157
- hoverRangeValue: {
158
- type: [Array, null],
159
- required: true,
160
- default: void 0
161
- },
162
- hoverValue: {
163
- type: [Array, null],
164
- required: false,
165
- default: void 0
166
- },
167
- onHover: {
168
- type: Function,
169
- required: false,
170
- default: void 0
171
- },
172
- showTime: {
173
- type: Object,
174
- required: false,
175
- default: void 0
176
- },
177
- showWeek: {
178
- type: Boolean,
179
- required: false,
180
- default: void 0
181
- },
182
- prevIcon: {
183
- type: [
184
- Object,
185
- Function,
186
- String,
187
- Number,
188
- null,
189
- Boolean,
190
- Array
191
- ],
192
- required: false,
193
- default: void 0
194
- },
195
- nextIcon: {
196
- type: [
197
- Object,
198
- Function,
199
- String,
200
- Number,
201
- null,
202
- Boolean,
203
- Array
204
- ],
205
- required: false,
206
- default: void 0
207
- },
208
- superPrevIcon: {
209
- type: [
210
- Object,
211
- Function,
212
- String,
213
- Number,
214
- null,
215
- Boolean,
216
- Array
217
- ],
218
- required: false,
219
- default: void 0
220
- },
221
- superNextIcon: {
222
- type: [
223
- Object,
224
- Function,
225
- String,
226
- Number,
227
- null,
228
- Boolean,
229
- Array
230
- ],
231
- required: false,
232
- default: void 0
233
- }
234
- },
235
- name: "YearPanel",
236
- inheritAttrs: false
237
- });
238
- var YearPanel_default = YearPanel;
239
- exports.default = YearPanel_default;
@@ -1,61 +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
- var SharedPanelContextKey = Symbol("SharedPanelContext");
5
- function provideSharedPanelContext(context) {
6
- (0, vue.provide)(SharedPanelContextKey, context);
7
- }
8
- function useSharedPanelContext() {
9
- return (0, vue.inject)(SharedPanelContextKey, null);
10
- }
11
- var PanelContextKey = Symbol("PanelContext");
12
- function providePanelContext(context) {
13
- (0, vue.provide)(PanelContextKey, context);
14
- }
15
- function usePanelContext() {
16
- return (0, vue.inject)(PanelContextKey, null);
17
- }
18
- function useInfo(props, panelType, sharedContext) {
19
- const ctx = sharedContext ?? useSharedPanelContext();
20
- const classNames = ctx?.value.classNames;
21
- const styles = ctx?.value.styles;
22
- const { prefixCls, generateConfig, locale, disabledDate, minDate, maxDate, cellRender, hoverValue, hoverRangeValue, onHover, values, pickerValue, onSelect, prevIcon, nextIcon, superPrevIcon, superNextIcon } = props;
23
- const now = generateConfig.getNow();
24
- return [{
25
- now,
26
- values,
27
- pickerValue,
28
- prefixCls,
29
- classNames,
30
- styles,
31
- disabledDate,
32
- minDate,
33
- maxDate,
34
- cellRender,
35
- hoverValue,
36
- hoverRangeValue,
37
- onHover,
38
- locale,
39
- generateConfig,
40
- onSelect,
41
- panelType,
42
- prevIcon,
43
- nextIcon,
44
- superPrevIcon,
45
- superNextIcon
46
- }, now];
47
- }
48
- var PickerHackContextKey = Symbol("PickerHackContext");
49
- function providePickerHackContext(context) {
50
- (0, vue.provide)(PickerHackContextKey, context);
51
- }
52
- function usePickerHackContext() {
53
- return (0, vue.inject)(PickerHackContextKey, null);
54
- }
55
- exports.providePanelContext = providePanelContext;
56
- exports.providePickerHackContext = providePickerHackContext;
57
- exports.provideSharedPanelContext = provideSharedPanelContext;
58
- exports.useInfo = useInfo;
59
- exports.usePanelContext = usePanelContext;
60
- exports.usePickerHackContext = usePickerHackContext;
61
- exports.useSharedPanelContext = useSharedPanelContext;