@unicom-cloud/ui 0.8.80 → 0.8.82

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 (256) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +2 -2
  31. package/Mentions.js +2 -2
  32. package/Menu.js +1 -1
  33. package/Message.js +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +5 -5
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Pagination.js +1 -1
  40. package/Popconfirm.js +1 -1
  41. package/Popover.js +1 -1
  42. package/Progress.js +1 -1
  43. package/Radio.js +1 -1
  44. package/Rate.js +1 -1
  45. package/ResizeBox.js +1 -1
  46. package/Result.js +1 -1
  47. package/Select.js +1 -1
  48. package/Skeleton.js +1 -1
  49. package/Slider.js +1 -1
  50. package/Space.js +1 -1
  51. package/Spin.js +1 -1
  52. package/Statistic.js +1 -1
  53. package/Steps.js +1 -1
  54. package/Switch.js +1 -1
  55. package/Table.js +1 -1
  56. package/Tabs.js +1 -1
  57. package/Tag.js +1 -1
  58. package/Tooltip.js +1 -1
  59. package/Transfer.js +2 -2
  60. package/Tree.js +1 -1
  61. package/TreeSelect.js +1 -1
  62. package/Trigger.js +1 -1
  63. package/Typography.js +1 -1
  64. package/affix/index.js +60 -57
  65. package/alert/index.js +53 -53
  66. package/anchor/Anchor.js +72 -72
  67. package/anchor/Link.js +27 -27
  68. package/auto-complete/index.js +2 -2
  69. package/avatar/Avatar.js +31 -31
  70. package/avatar/Group.js +25 -25
  71. package/back-top/index.js +24 -24
  72. package/badge/index.js +37 -37
  73. package/breadcrumb/index.js +26 -26
  74. package/button/Group.js +7 -7
  75. package/button/index.js +29 -29
  76. package/calendar/index.js +2 -2
  77. package/card/Grid.js +12 -12
  78. package/card/Meta.js +17 -17
  79. package/card/index.js +44 -44
  80. package/carousel/Arrow.js +19 -19
  81. package/carousel/Indicator.js +25 -25
  82. package/carousel/index.js +77 -77
  83. package/cascader/Cascader.js +2 -2
  84. package/cascader/index.js +1 -1
  85. package/cascader/util.js +1 -1
  86. package/checkbox/Checkbox.js +2 -2
  87. package/checkbox/Group.js +2 -2
  88. package/checkbox/GroupBlock.js +2 -2
  89. package/checkbox/index.js +2 -2
  90. package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
  91. package/chunk/CmMehQON.js +1464 -0
  92. package/chunk/Cplu5dtQ.js +730 -0
  93. package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
  94. package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
  95. package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
  96. package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
  97. package/chunk/{D73Vr7fa.js → w221i0nK.js} +2871 -2870
  98. package/collapse/Collapse.js +2 -2
  99. package/collapse/Item.js +2 -2
  100. package/collapse/index.js +1 -1
  101. package/color-picker/ControlBar.js +36 -36
  102. package/color-picker/InputAlpha.js +11 -11
  103. package/color-picker/InputHex.js +24 -24
  104. package/color-picker/InputRgb.js +23 -23
  105. package/color-picker/Palette.js +18 -18
  106. package/color-picker/Panel.js +2 -2
  107. package/color-picker/index.js +2 -2
  108. package/comment/index.js +31 -31
  109. package/config-provider/ConfigProvider.js +5 -4
  110. package/config-provider/context.js +2 -2
  111. package/config-provider/index.js +4 -3
  112. package/copy/index.js +28 -28
  113. package/date-picker/Picker.js +276 -276
  114. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  115. package/date-picker/index.js +26 -27
  116. package/descriptions/index.js +33 -33
  117. package/divider/index.js +12 -12
  118. package/draggable/index.js +23 -23
  119. package/drawer/Drawer.js +81 -81
  120. package/dropdown/Button.js +1 -1
  121. package/dropdown/index.js +56 -56
  122. package/empty/index.js +1 -1
  123. package/form/Form.js +76 -76
  124. package/form/FormItem.js +64 -64
  125. package/grid/Col.js +53 -53
  126. package/grid/Row.js +34 -34
  127. package/grid/grid-item.js +29 -29
  128. package/grid/grid.js +50 -50
  129. package/icon/index.js +20 -19
  130. package/icon-hover/index.js +1 -1
  131. package/image/Image.js +86 -86
  132. package/image/ImagePreview.js +2 -2
  133. package/image/ImagePreviewArrow.js +22 -22
  134. package/image/ImagePreviewGroup.js +1 -1
  135. package/image/index.js +1 -1
  136. package/index.js +404 -402
  137. package/input/Group.js +8 -8
  138. package/input/Input.js +322 -322
  139. package/input/InputElement.js +1 -1
  140. package/input/Password.js +1 -1
  141. package/input/Search.js +1 -1
  142. package/input/Textarea.js +1 -1
  143. package/input-number/index.js +1 -1
  144. package/input-tag/InputTag.js +40 -40
  145. package/layout/Content.js +7 -7
  146. package/layout/Footer.js +9 -9
  147. package/layout/Header.js +7 -7
  148. package/layout/Sider.js +55 -55
  149. package/layout/index.js +32 -32
  150. package/link/index.js +35 -35
  151. package/list/Item.js +29 -29
  152. package/list/Meta.js +12 -12
  153. package/list/index.js +2 -2
  154. package/mentions/index.js +2 -2
  155. package/menu/Menu.js +2 -2
  156. package/menu/OverflowWrap.js +1 -1
  157. package/menu/index.js +2 -2
  158. package/message/index.js +1 -1
  159. package/message/useMessage.js +1 -1
  160. package/modal/Confirm.js +2 -2
  161. package/modal/Modal.js +2 -2
  162. package/modal/index.js +1 -1
  163. package/notice/index.js +1 -1
  164. package/notification/index.js +5 -5
  165. package/notification/useNotification.js +1 -1
  166. package/overflow-ellipsis/OverflowItem.js +12 -12
  167. package/overflow-ellipsis/index.js +24 -24
  168. package/package.json +1 -1
  169. package/page-header/index.js +38 -38
  170. package/pagination/PageItem.js +16 -16
  171. package/pagination/PageJumper.js +1 -1
  172. package/pagination/PageOption.js +2 -2
  173. package/pagination/Pagination.js +2 -2
  174. package/pagination/index.js +1 -1
  175. package/picker/Input.js +69 -69
  176. package/picker/InputRange.js +111 -111
  177. package/popconfirm/index.js +61 -61
  178. package/popover/index.js +35 -35
  179. package/progress/index.js +22 -22
  180. package/radio/Group.js +2 -2
  181. package/radio/GroupBlock.js +2 -2
  182. package/radio/Radio.js +2 -2
  183. package/radio/index.js +2 -2
  184. package/rate/index.js +49 -49
  185. package/resize-box/ResizeTrigger.js +34 -34
  186. package/resize-box/Split.js +56 -56
  187. package/resize-box/SplitGroup.js +55 -55
  188. package/resize-box/index.js +51 -51
  189. package/result/index.js +41 -41
  190. package/select/Option.js +1 -1
  191. package/select/Select.js +2 -2
  192. package/select/index.js +2 -2
  193. package/select/util.js +1 -1
  194. package/select-view/Core.js +125 -125
  195. package/skeleton/index.js +20 -20
  196. package/slider/Button.js +57 -57
  197. package/slider/index.js +116 -116
  198. package/space/index.js +46 -44
  199. package/spin/DotLoading.js +10 -10
  200. package/spin/index.js +44 -44
  201. package/statistic/Countdown.js +34 -34
  202. package/statistic/index.js +61 -61
  203. package/steps/index.js +55 -55
  204. package/style.css +1 -1
  205. package/switch/index.js +54 -54
  206. package/table/Table.js +2 -2
  207. package/table/index.js +1 -1
  208. package/tabs/Tab.js +2 -2
  209. package/tabs/TabContent.js +2 -2
  210. package/tabs/TabPane.js +12 -12
  211. package/tabs/index.js +2 -2
  212. package/tag/index.js +45 -45
  213. package/time-picker/Picker.js +76 -76
  214. package/time-picker/TimePicker.js +136 -136
  215. package/time-picker/index.js +8 -8
  216. package/timeline/Item.js +47 -47
  217. package/timeline/Timeline.js +41 -41
  218. package/tooltip/index.js +29 -29
  219. package/transfer/Item.js +2 -2
  220. package/transfer/List.js +2 -2
  221. package/transfer/index.js +2 -2
  222. package/tree/Animation.js +2 -2
  223. package/tree/Node.js +2 -2
  224. package/tree/NodeList.js +1 -1
  225. package/tree/Tree.js +2 -2
  226. package/tree/index.js +1 -1
  227. package/tree-select/List.js +1 -1
  228. package/tree-select/Select.js +2 -2
  229. package/tree-select/index.js +2 -2
  230. package/trigger/index.js +60 -60
  231. package/types/config-provider/ConfigProvider.d.ts +2 -2
  232. package/types/config-provider/context.d.ts +1 -1
  233. package/types/date-picker/index.d.ts +8 -9
  234. package/types/date-picker/interface.d.ts +9 -9
  235. package/types/index.d.ts +1 -1
  236. package/types/picker/Input.d.ts +2 -2
  237. package/types/space/index.d.ts +2 -1
  238. package/types/utils/names.d.ts +1 -1
  239. package/typography/Base.js +53 -53
  240. package/typography/Ellipsis.js +6 -6
  241. package/typography/Operations.js +28 -28
  242. package/typography/Paragraph.js +8 -8
  243. package/typography/Typography.js +7 -7
  244. package/typography/index.js +1 -1
  245. package/upload/TriggerNode.js +47 -47
  246. package/upload/Upload.js +184 -184
  247. package/utils/contextHolder.js +3 -3
  248. package/utils/index.js +1 -1
  249. package/utils/names.js +1 -1
  250. package/utils/setPrimaryColor.js +18 -13
  251. package/verification-code/VerificationCode.js +49 -49
  252. package/version/index.js +1 -1
  253. package/watermark/Watermark.js +24 -24
  254. package/chunk/CQvM33Vg.js +0 -724
  255. package/chunk/yhU2zeeu.js +0 -1461
  256. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/chunk/yhU2zeeu.js DELETED
@@ -1,1461 +0,0 @@
1
- import { jsx as o, jsxs as Z, Fragment as ye } from "react/jsx-runtime";
2
- import Mn from "@unicom-cloud/icons/IconUiCalendar";
3
- import Hn from "@unicom-cloud/icons/IconUiCalendarClock";
4
- import { isDayjs as Gt } from "dayjs";
5
- import G from "lodash/isArray";
6
- import Ge from "lodash/isPlainObject";
7
- import Fn from "lodash/isUndefined";
8
- import _n, { useContext as ce, useMemo as un, forwardRef as Wn, useRef as Ve, useImperativeHandle as Bn, useState as ie, useEffect as Ke } from "react";
9
- import { a as Re } from "./CQvM33Vg.js";
10
- import { u as zn } from "./BFTV6myl.js";
11
- import { u as Xt } from "./VSe_Wq1g.js";
12
- import { u as Zt } from "./a3hR6zLw.js";
13
- import qn from "../picker/InputRange.js";
14
- import Un from "../trigger/index.js";
15
- import ge from "@unicom-cloud/utils/class-name";
16
- import { b as Me, a as te, d as Nt, c as jn, g as oe, m as X, k as en, j as wt, e as Je, h as Qn, i as Kn } from "./tamGhTJp.js";
17
- import { a as Jn } from "./ClqoGc3r.js";
18
- import Ye from "../date-picker/context.js";
19
- import { F as Gn, S as Xn } from "./CC---6jO.js";
20
- import et from "lodash/merge";
21
- import { getAvailableDayjsLength as Xe, isDisabledDate as Zn, getFormatByIndex as he, getDefaultWeekStart as eo, getLocaleDayjsValue as yt } from "../date-picker/util.js";
22
- import tn from "@unicom-cloud/icons/IconUiDoubleLeft";
23
- import nn from "@unicom-cloud/icons/IconUiDoubleRight";
24
- import on from "@unicom-cloud/icons/IconUiLeft";
25
- import rn from "@unicom-cloud/icons/IconUiRight";
26
- import { newArray as Ze } from "../utils/constant.js";
27
- import { padStart as dn } from "../utils/pad.js";
28
- import to from "../time-picker/TimePicker.js";
29
- import { o as no } from "./BKKEev13.js";
30
- function Le(l, n) {
31
- if (l && G(l))
32
- return l[n];
33
- }
34
- function oo(l) {
35
- const {
36
- prefixCls: n,
37
- value: m,
38
- rangeValues: u,
39
- valueShowHover: s,
40
- isSameTime: c,
41
- mode: p,
42
- hideNotInViewDates: a
43
- } = l, i = Xe(u), Y = Xe(s), w = i !== 2 && Y === 2 ? Me(s) : u, V = i === 2 ? Me(s) : [];
44
- function C(g, S, L) {
45
- if (S && L)
46
- return c(g, S) || c(g, L) || g.isBetween(S, L, null);
47
- }
48
- return function(S, L, _, I) {
49
- const y = Le(w, 0), P = Le(w, 1), d = Le(V, 0), D = Le(V, 1), k = !S.isPrev && !S.isNext, B = m && c(S.time, m);
50
- let b = c(S.time, te(_, I));
51
- const x = p !== "week" ? k : !0;
52
- p === "week" && (b = te(_, I).isSame(S.time, "date")), p === "quarter" && (b = te(_, I).isSame(S.time, "quarter"));
53
- function $(A) {
54
- return x && !L && A && c(S.time, A);
55
- }
56
- const J = $(y), f = $(P), N = $(
57
- Le(u, 0)
58
- ), K = $(
59
- Le(u, 1)
60
- ), z = $(d), M = $(D);
61
- let H = !1;
62
- J ? H = d && y && d.isBefore(y) && C(y, d, D) : f && (H = D && P && D.isAfter(P) && C(P, d, D));
63
- let v = !1;
64
- return z ? v = d && y && y.isBefore(d) && C(d, y, P) : M && (v = D && P && P.isAfter(D) && C(D, y, P)), ge(`${n}-cell`, {
65
- [`${n}-cell-disabled`]: L,
66
- [`${n}-cell-hidden`]: a && !k,
67
- [`${n}-cell-in-view`]: k,
68
- [`${n}-cell-today`]: b && k,
69
- [`${n}-cell-selected`]: B || N || K,
70
- [`${n}-cell-range-start`]: J,
71
- [`${n}-cell-range-end`]: f,
72
- [`${n}-cell-in-range`]: x && !L && C(S.time, y, P),
73
- [`${n}-cell-hover-range-start`]: z,
74
- [`${n}-cell-hover-range-end`]: M,
75
- [`${n}-cell-hover-in-range`]: x && !L && C(S.time, d, D),
76
- [`${n}-cell-range-edge-in-hover-range`]: H,
77
- [`${n}-cell-hover-range-edge-in-range`]: v
78
- });
79
- };
80
- }
81
- function ro(l) {
82
- const { prefixCls: n, weekStart: m, isWeek: u, CALENDAR_LOCALE: s } = l;
83
- let c = [
84
- "sunday",
85
- "monday",
86
- "tuesday",
87
- "wednesday",
88
- "thursday",
89
- "friday",
90
- "saturday"
91
- ];
92
- c = c.slice(m).concat(c.slice(0, m)), u && c.unshift("");
93
- const p = s.week.short;
94
- return /* @__PURE__ */ o("div", { className: `${n}-week-list`, children: c.map((a) => /* @__PURE__ */ o("div", { className: `${n}-week-list-item`, children: a && p[a] }, a)) });
95
- }
96
- function tt(l) {
97
- const {
98
- prefixCls: n,
99
- isWeek: m,
100
- disabledDate: u,
101
- onSelectDate: s,
102
- dateRender: c,
103
- onMouseEnterCell: p,
104
- onMouseLeaveCell: a,
105
- CALENDAR_LOCALE: i,
106
- rows: Y,
107
- showWeekList: w,
108
- isSameTime: V,
109
- format: C,
110
- mode: g
111
- } = l, { utcOffset: S, timezone: L, weekStart: _ } = ce(Ye), I = oo({
112
- ...l,
113
- isSameTime: V
114
- });
115
- function y(P) {
116
- return P.map((d, D) => {
117
- if (d.time) {
118
- const k = Zn(d.time, u, g), B = () => !k && s(d.time.format(C), d.time);
119
- return /* @__PURE__ */ o(
120
- "div",
121
- {
122
- className: I(d, k, S, L),
123
- onMouseEnter: () => p == null ? void 0 : p(d.time, k),
124
- onMouseLeave: () => a == null ? void 0 : a(d.time, k),
125
- onClick: B,
126
- children: c ? _n.cloneElement(c(d.time)) : /* @__PURE__ */ o("div", { className: `${n}-date`, children: /* @__PURE__ */ o("div", { className: `${n}-date-value`, children: d.name }) })
127
- },
128
- D
129
- );
130
- }
131
- if ("weekOfYear" in d)
132
- return /* @__PURE__ */ o(
133
- "div",
134
- {
135
- className: ge(`${n}-cell`, `${n}-cell-week`),
136
- children: /* @__PURE__ */ o("div", { className: `${n}-date`, children: /* @__PURE__ */ o("div", { className: `${n}-date-value`, children: d.weekOfYear }) })
137
- },
138
- D
139
- );
140
- });
141
- }
142
- return /* @__PURE__ */ Z(ye, { children: [
143
- w && /* @__PURE__ */ o(
144
- ro,
145
- {
146
- prefixCls: n,
147
- weekStart: _,
148
- isWeek: m,
149
- CALENDAR_LOCALE: i
150
- }
151
- ),
152
- /* @__PURE__ */ o("div", { className: `${n}-body`, children: Y.map((P, d) => /* @__PURE__ */ o(
153
- "div",
154
- {
155
- className: ge(`${n}-row`, {
156
- [`${n}-row-week`]: m
157
- }),
158
- children: y(P)
159
- },
160
- d
161
- )) })
162
- ] });
163
- }
164
- function nt(l) {
165
- const {
166
- prefixCls: n,
167
- title: m,
168
- onPrev: u,
169
- onNext: s,
170
- onSuperPrev: c,
171
- onSuperNext: p,
172
- mode: a,
173
- value: i,
174
- onChangePanel: Y,
175
- icons: w = {},
176
- rtl: V,
177
- DATEPICKER_LOCALE: C
178
- } = l, g = typeof u == "function", S = typeof c == "function", L = typeof s == "function", _ = typeof p == "function", I = (B) => ge(`${n}-header-icon`, {
179
- [`${n}-header-icon-hidden`]: !B
180
- });
181
- function y() {
182
- const { monthBeforeYear: B, monthFormat: b, yearFormat: x } = (C == null ? void 0 : C.Calendar) || {};
183
- if (m)
184
- return m;
185
- if (a === "date" || a === "week") {
186
- const $ = /* @__PURE__ */ o(
187
- "span",
188
- {
189
- className: `${n}-header-label`,
190
- onClick: () => Y("year"),
191
- children: i.format(x || "YYYY")
192
- },
193
- "year-node"
194
- ), J = /* @__PURE__ */ o(
195
- "span",
196
- {
197
- className: `${n}-header-label`,
198
- onClick: () => Y("month"),
199
- children: i.format(b || "MM")
200
- },
201
- "month-node"
202
- );
203
- return B ? [J, $] : [$, J];
204
- }
205
- if (a === "month" || a === "quarter")
206
- return /* @__PURE__ */ o(
207
- "span",
208
- {
209
- className: `${n}-header-label`,
210
- onClick: () => Y("year"),
211
- children: i.format(x || "YYYY")
212
- }
213
- );
214
- }
215
- const P = w.prevDouble === null, d = w.prev === null, D = w.next === null, k = w.nextDouble === null;
216
- return /* @__PURE__ */ Z("div", { className: `${n}-header`, children: [
217
- !P && /* @__PURE__ */ o("div", { className: I(S), onClick: c, children: S && (P ? null : w.prevDouble || (V ? /* @__PURE__ */ o(nn, {}) : /* @__PURE__ */ o(tn, {}))) }),
218
- !d && /* @__PURE__ */ o("div", { className: I(g), onClick: u, children: g && (d ? null : w.prev || (V ? /* @__PURE__ */ o(rn, {}) : /* @__PURE__ */ o(on, {}))) }),
219
- /* @__PURE__ */ o("div", { className: `${n}-header-value`, children: y() }),
220
- !D && /* @__PURE__ */ o("div", { className: I(L), onClick: s, children: L && (D ? null : w.next || (V ? /* @__PURE__ */ o(on, {}) : /* @__PURE__ */ o(rn, {}))) }),
221
- !k && /* @__PURE__ */ o("div", { className: I(_), onClick: p, children: _ && (k ? null : w.nextDouble || (V ? /* @__PURE__ */ o(tn, {}) : /* @__PURE__ */ o(nn, {}))) })
222
- ] });
223
- }
224
- function He(l) {
225
- const {
226
- pageShowDate: n,
227
- style: m,
228
- onMouseEnterCell: u,
229
- onMouseLeaveCell: s,
230
- dateRender: c,
231
- disabledDate: p,
232
- value: a,
233
- locale: i,
234
- isRangePicker: Y,
235
- onSelect: w,
236
- rangeValues: V,
237
- onSuperPrev: C,
238
- onSuperNext: g,
239
- format: S,
240
- icons: L,
241
- ..._
242
- } = l, { locale: I, getPrefixCls: y, rtl: P } = ce(Re), D = et(I.DatePicker, i).Calendar, { utcOffset: k, timezone: B } = ce(Ye), b = y("panel-year"), x = ge(b), $ = Y ? { rangeValues: V } : { value: a }, J = n ? n.year() : te(k, B).year(), f = Math.floor(J / 10) * 10 - 1, N = Ze(3).map((H) => ""), K = Ze(4).map((H) => N).map((H, v) => H.map((A, W) => ({
243
- name: f + v * 3 + W,
244
- time: Nt(`${f + v * 3 + W}`, "YYYY").endOf("year"),
245
- isPrev: v === 0 && W === 0,
246
- isNext: v === 3 && W === 2
247
- })));
248
- function z() {
249
- return /* @__PURE__ */ o(
250
- tt,
251
- {
252
- ..._,
253
- ...$,
254
- prefixCls: y("picker"),
255
- rows: K,
256
- onSelectDate: w,
257
- isSameTime: (H, v) => H.isSame(v, "year"),
258
- onMouseEnterCell: u,
259
- onMouseLeaveCell: s,
260
- dateRender: c,
261
- disabledDate: p,
262
- CALENDAR_LOCALE: D,
263
- mode: "year",
264
- format: S
265
- }
266
- );
267
- }
268
- const M = { onSuperPrev: C, onSuperNext: g };
269
- return /* @__PURE__ */ Z("div", { className: x, style: m, children: [
270
- /* @__PURE__ */ o(
271
- nt,
272
- {
273
- prefixCls: y("picker"),
274
- icons: L,
275
- title: `${K[0][1].name} - ${K[3][2].name}`,
276
- rtl: P,
277
- ...M
278
- }
279
- ),
280
- z()
281
- ] });
282
- }
283
- function Ct(l) {
284
- const {
285
- pageShowDate: n,
286
- style: m,
287
- onMouseEnterCell: u,
288
- onMouseLeaveCell: s,
289
- dateRender: c,
290
- disabledDate: p,
291
- value: a,
292
- locale: i,
293
- isRangePicker: Y,
294
- onSelect: w,
295
- rangeValues: V,
296
- onSuperPrev: C,
297
- onSuperNext: g,
298
- format: S,
299
- getHeaderOperations: L,
300
- setPageShowDate: _,
301
- icons: I,
302
- panelMode: y,
303
- setPanelMode: P,
304
- ...d
305
- } = l, { locale: D, getPrefixCls: k, rtl: B } = ce(Re), b = et(D.DatePicker, i), x = b.Calendar, $ = k("panel-month"), J = ge($), f = Y ? { rangeValues: V } : { value: a }, N = n.year(), K = un(() => {
306
- const v = [
307
- "January",
308
- "February",
309
- "March",
310
- "April",
311
- "May",
312
- "June",
313
- "July",
314
- "August",
315
- "September",
316
- "October",
317
- "November",
318
- "December"
319
- ].map((W, re) => ({
320
- name: x.month.short[W],
321
- time: Nt(
322
- `${N}-${dn(re + 1, 2, "0")}`,
323
- "YYYY-MM"
324
- ).endOf("month")
325
- })), A = Array(4);
326
- for (let W = 0; W < 4; W++)
327
- A[W] = v.slice(W * 3, 3 * (W + 1));
328
- return A;
329
- }, [N, x]);
330
- function z() {
331
- return /* @__PURE__ */ o(
332
- tt,
333
- {
334
- ...d,
335
- ...f,
336
- prefixCls: k("picker"),
337
- rows: K,
338
- onSelectDate: w,
339
- isSameTime: (v, A) => v.isSame(A, "month"),
340
- onMouseEnterCell: u,
341
- onMouseLeaveCell: s,
342
- dateRender: c,
343
- disabledDate: p,
344
- CALENDAR_LOCALE: x,
345
- mode: "month",
346
- format: S
347
- }
348
- );
349
- }
350
- const M = { onSuperPrev: C, onSuperNext: g };
351
- function H(v) {
352
- P(v);
353
- }
354
- return y === "year" ? /* @__PURE__ */ o(
355
- He,
356
- {
357
- ...L(y),
358
- pageShowDate: n,
359
- onSelect: (v, A) => {
360
- P("month"), _(A);
361
- },
362
- disabledDate: p
363
- }
364
- ) : /* @__PURE__ */ Z("div", { className: J, style: m, children: [
365
- /* @__PURE__ */ o(
366
- nt,
367
- {
368
- ...M,
369
- DATEPICKER_LOCALE: b,
370
- icons: I,
371
- prefixCls: k("picker"),
372
- value: n,
373
- mode: y,
374
- onChangePanel: H,
375
- rtl: B
376
- }
377
- ),
378
- z()
379
- ] });
380
- }
381
- const an = 6 * 7, Dt = (l) => ({
382
- year: l.year(),
383
- month: l.month() + 1,
384
- day: l.day(),
385
- name: l.date(),
386
- time: l
387
- }), ao = (l) => ({
388
- ...Dt(X.startOf(l, "month")),
389
- days: l.daysInMonth()
390
- });
391
- function so(l, n) {
392
- const { dayStartOfWeek: m, isWeek: u } = l, s = ao(n), c = Ze(an).map((i, Y, w) => ({})), p = s.day - m < 0 ? 7 + (s.day - m) : s.day - m;
393
- c[p] = {
394
- ...s
395
- };
396
- for (let i = 0; i < p; i++)
397
- c[p - i - 1] = {
398
- ...Dt(X.subtract(s.time, i + 1, "day")),
399
- isPrev: !0
400
- };
401
- for (let i = 0; i < an - p - 1; i++)
402
- c[p + i + 1] = {
403
- ...Dt(X.add(s.time, i + 1, "day")),
404
- isNext: i >= s.days - 1
405
- };
406
- const a = Ze(6).map((i, Y, w) => []);
407
- for (let i = 0; i < 6; i++)
408
- if (a[i] = c.slice(i * 7, 7 * (i + 1)), u) {
409
- const Y = a[i][0].time, w = [...a[i]];
410
- a[i].unshift({
411
- weekRows: w,
412
- weekOfYear: Y.week()
413
- });
414
- }
415
- return a;
416
- }
417
- function bt(l) {
418
- const {
419
- isWeek: n,
420
- popupVisible: m,
421
- format: u,
422
- pageShowDate: s,
423
- showTime: c,
424
- style: p,
425
- timepickerProps: a,
426
- onMouseEnterCell: i,
427
- onMouseLeaveCell: Y,
428
- dateRender: w,
429
- disabledDate: V,
430
- disabledTime: C,
431
- value: g,
432
- rangeValues: S,
433
- locale: L,
434
- isRangePicker: _,
435
- onSelect: I,
436
- onTimePickerSelect: y,
437
- onPrev: P,
438
- onNext: d,
439
- onSuperPrev: D,
440
- onSuperNext: k,
441
- isSameTime: B,
442
- index: b,
443
- getHeaderOperations: x,
444
- setPageShowDate: $,
445
- timeValue: J,
446
- hideNotInViewDates: f,
447
- icons: N,
448
- isTimePanel: K,
449
- panelMode: z,
450
- setPanelMode: M,
451
- ...H
452
- } = l, { locale: v, getPrefixCls: A, rtl: W } = ce(Re), { utcOffset: re, timezone: ae, weekStart: fe } = ce(Ye), le = et(v.DatePicker, L), T = A(n ? "panel-week" : "panel-date"), E = ge(T), Ie = _ ? { rangeValues: S } : { value: g }, ue = Ge(c) && c.format || jn(u), U = v.dayjsLocale, ne = un(() => so(
453
- { ...l, dayStartOfWeek: fe },
454
- s.locale(U)
455
- ), [s.toString(), fe, U]);
456
- let F;
457
- _ ? F = typeof C == "function" ? C(
458
- S[b],
459
- b === 0 ? "start" : "end"
460
- ) : {} : F = typeof C == "function" ? C(oe(g, u)) : {};
461
- function q() {
462
- return /* @__PURE__ */ o(
463
- tt,
464
- {
465
- ...H,
466
- ...Ie,
467
- showWeekList: !0,
468
- isWeek: n,
469
- prefixCls: A("picker"),
470
- rows: ne,
471
- isSameTime: B || ((R, ke) => R.isSame(ke, "day")),
472
- onSelectDate: I,
473
- onMouseEnterCell: i,
474
- onMouseLeaveCell: Y,
475
- dateRender: w,
476
- disabledDate: V,
477
- CALENDAR_LOCALE: le.Calendar,
478
- mode: n ? "week" : "date",
479
- format: u,
480
- hideNotInViewDates: f
481
- }
482
- );
483
- }
484
- function de() {
485
- const R = Ge(c) ? c : {};
486
- return /* @__PURE__ */ Z("div", { className: `${T}-timepicker`, children: [
487
- /* @__PURE__ */ o("header", { className: `${T}-timepicker-title`, children: le.selectTime }),
488
- /* @__PURE__ */ o(
489
- to,
490
- {
491
- ...no(a, ["disableConfirm"]),
492
- ...R,
493
- ...F,
494
- hideFooter: !0,
495
- format: ue,
496
- valueShow: J.format(ue),
497
- onSelect: y,
498
- popupVisible: m,
499
- utcOffset: re,
500
- timezone: ae
501
- }
502
- )
503
- ] });
504
- }
505
- const O = {
506
- onPrev: P,
507
- onSuperPrev: D,
508
- onNext: d,
509
- onSuperNext: k,
510
- DATEPICKER_LOCALE: le
511
- };
512
- function pe(R) {
513
- M(R);
514
- }
515
- return z === "year" ? /* @__PURE__ */ o(
516
- He,
517
- {
518
- ...x(z),
519
- pageShowDate: s,
520
- onSelect: (R, ke) => {
521
- M("month"), $(ke);
522
- },
523
- disabledDate: V
524
- }
525
- ) : z === "month" ? /* @__PURE__ */ o(
526
- Ct,
527
- {
528
- ...x(z),
529
- setPageShowDate: $,
530
- pageShowDate: s,
531
- panelMode: z,
532
- getHeaderOperations: x,
533
- onSelect: (R, ke) => {
534
- M("date"), $(ke);
535
- },
536
- disabledDate: V,
537
- setPanelMode: M
538
- }
539
- ) : /* @__PURE__ */ o("div", { className: E, style: p, children: c && K ? de() : /* @__PURE__ */ Z("div", { className: `${T}-inner`, children: [
540
- /* @__PURE__ */ o(
541
- nt,
542
- {
543
- ...O,
544
- icons: N,
545
- prefixCls: A("picker"),
546
- value: s,
547
- mode: z,
548
- onChangePanel: pe,
549
- rtl: W
550
- }
551
- ),
552
- q()
553
- ] }) });
554
- }
555
- function sn(l) {
556
- const {
557
- pageShowDate: n,
558
- style: m,
559
- onMouseEnterCell: u,
560
- onMouseLeaveCell: s,
561
- dateRender: c,
562
- disabledDate: p,
563
- value: a,
564
- locale: i,
565
- isRangePicker: Y,
566
- onSelect: w,
567
- rangeValues: V,
568
- onSuperPrev: C,
569
- onSuperNext: g,
570
- format: S,
571
- getHeaderOperations: L,
572
- setPageShowDate: _,
573
- icons: I,
574
- panelMode: y,
575
- setPanelMode: P,
576
- ...d
577
- } = l, { locale: D, getPrefixCls: k, rtl: B } = ce(Re), b = et(D.DatePicker, i), x = b.Calendar, $ = k("panel-quarter"), J = ge($), f = Y ? { rangeValues: V } : { value: a }, N = n.year(), K = [
578
- [1, 2, 3, 4].map((v, A, W) => {
579
- var re;
580
- return {
581
- name: ((re = x.quarter) == null ? void 0 : re[`q${v}`]) || `Q${v}`,
582
- // 潘启宝修改 2024年12月23日 星期一 15时21分14秒 CST
583
- time: Nt(`${N}-${dn((v - 1) * 3 + 1, 2, "0")}-01`)
584
- };
585
- })
586
- ];
587
- function z() {
588
- return /* @__PURE__ */ o(
589
- tt,
590
- {
591
- ...d,
592
- ...f,
593
- prefixCls: k("picker"),
594
- rows: K,
595
- onSelectDate: w,
596
- isSameTime: (v, A) => v.isSame(A, "month"),
597
- onMouseEnterCell: u,
598
- onMouseLeaveCell: s,
599
- dateRender: c,
600
- disabledDate: p,
601
- CALENDAR_LOCALE: x,
602
- mode: "quarter",
603
- format: S
604
- }
605
- );
606
- }
607
- const M = { onSuperPrev: C, onSuperNext: g };
608
- function H(v) {
609
- P(v);
610
- }
611
- return y === "year" ? /* @__PURE__ */ o(
612
- He,
613
- {
614
- ...L(y),
615
- pageShowDate: n,
616
- onSelect: (v, A) => {
617
- P("quarter"), _(A);
618
- },
619
- disabledDate: p
620
- }
621
- ) : /* @__PURE__ */ Z("div", { className: J, style: m, children: [
622
- /* @__PURE__ */ o(
623
- nt,
624
- {
625
- ...M,
626
- icons: I,
627
- prefixCls: k("picker"),
628
- value: n,
629
- mode: y,
630
- onChangePanel: H,
631
- DATEPICKER_LOCALE: b,
632
- rtl: B
633
- }
634
- ),
635
- /* @__PURE__ */ o("div", { className: `${$}-wrapper`, children: z() })
636
- ] });
637
- }
638
- function cn(l) {
639
- const {
640
- value: n,
641
- isRangePicker: m,
642
- rangeValues: u,
643
- onPrev: s,
644
- onNext: c,
645
- onSuperPrev: p,
646
- onSuperNext: a,
647
- localeName: i,
648
- ...Y
649
- } = l, { weekStart: w } = ce(Ye), V = m ? { rangeValues: u } : { value: n }, C = { onPrev: s, onNext: c, onSuperPrev: p, onSuperNext: a };
650
- function g(S, L) {
651
- return X.isSameWeek(S, L, w, i);
652
- }
653
- return /* @__PURE__ */ o(
654
- bt,
655
- {
656
- ...Y,
657
- ...V,
658
- ...C,
659
- isWeek: !0,
660
- isSameTime: g,
661
- isRangePicker: m
662
- }
663
- );
664
- }
665
- function kt(l, n) {
666
- const m = [];
667
- for (let u = l; u < n; u++)
668
- m.push(u);
669
- return m;
670
- }
671
- function io(l) {
672
- const {
673
- mode: n = "date",
674
- showTime: m,
675
- disabledDate: u,
676
- disabledTime: s,
677
- format: c,
678
- dateRender: p,
679
- value: a,
680
- timeValues: i,
681
- icons: Y,
682
- locale: w,
683
- pageShowDates: V,
684
- onMouseEnterCell: C,
685
- onMouseLeaveCell: g,
686
- onTimePickerSelect: S,
687
- onSelectPanel: L,
688
- onPrev: _,
689
- onSuperPrev: I,
690
- onNext: y,
691
- onSuperNext: P,
692
- localeName: d,
693
- popupVisible: D,
694
- timepickerProps: k,
695
- getHeaderOperations: B,
696
- setRangePageShowDates: b,
697
- disabledTimePickerIndex: x,
698
- hideNotInViewDates: $,
699
- isTimePanel: J,
700
- valueShowHover: f,
701
- panelModes: N,
702
- setPanelModes: K
703
- } = l, { getPrefixCls: z } = ce(Re), M = z("picker-range"), { utcOffset: H, timezone: v } = ce(Ye), A = V[0] || te(H, v), W = V[1] || te(H, v), ae = {
704
- isRangePicker: !0,
705
- rangeValues: oe(a, c),
706
- onMouseEnterCell: C,
707
- onMouseLeaveCell: g,
708
- locale: w,
709
- disabledDate: u,
710
- onSelect: L,
711
- dateRender: p,
712
- getHeaderOperations: B,
713
- icons: Y,
714
- valueShowHover: f
715
- }, fe = {
716
- pageShowDate: A,
717
- panelMode: N[0],
718
- setPanelMode: (U) => K([U, N[1]]),
719
- format: he(c, 0)
720
- }, le = {
721
- pageShowDate: W,
722
- panelMode: N[1],
723
- setPanelMode: (U) => K([N[0], U]),
724
- format: he(c, 1)
725
- };
726
- function T() {
727
- const U = {
728
- onPrev: _,
729
- onSuperPrev: I
730
- }, ne = {
731
- onNext: y,
732
- onSuperNext: P
733
- }, F = {
734
- ...ae,
735
- localeName: d,
736
- popupVisible: D,
737
- timepickerProps: k,
738
- getHeaderOperations: B,
739
- hideNotInViewDates: $,
740
- isTimePanel: J
741
- };
742
- if (n === "week")
743
- return /* @__PURE__ */ Z(ye, { children: [
744
- /* @__PURE__ */ o(
745
- cn,
746
- {
747
- setPageShowDate: (O) => b([O, O], 0),
748
- ...U,
749
- ...F,
750
- ...fe
751
- }
752
- ),
753
- /* @__PURE__ */ o(
754
- cn,
755
- {
756
- setPageShowDate: (O) => b([X.subtract(O, 1, "month"), O], 1),
757
- ...ne,
758
- ...F,
759
- ...le
760
- }
761
- )
762
- ] });
763
- const q = {
764
- disabledTime: s,
765
- showTime: m
766
- }, de = {};
767
- if (typeof x == "number" && (de.disabledTime = () => ({
768
- disabledHours: () => kt(0, 24),
769
- disabledMinutes: () => kt(0, 60),
770
- disabledSeconds: () => kt(0, 60)
771
- }), Ge(m))) {
772
- const O = { ...m, defaultValue: void 0 };
773
- de.showTime = {
774
- ...O,
775
- hideDisabledOptions: !1
776
- };
777
- }
778
- return /* @__PURE__ */ Z(ye, { children: [
779
- /* @__PURE__ */ o(
780
- bt,
781
- {
782
- ...U,
783
- ...F,
784
- ...q,
785
- ...x === 0 ? de : {},
786
- onTimePickerSelect: (O, pe) => {
787
- S(0, O, pe);
788
- },
789
- index: 0,
790
- setPageShowDate: (O) => b([O, O], 0),
791
- timeValue: i[0],
792
- ...fe
793
- }
794
- ),
795
- /* @__PURE__ */ o(
796
- bt,
797
- {
798
- ...ne,
799
- ...F,
800
- ...q,
801
- ...x === 1 ? de : {},
802
- onTimePickerSelect: (O, pe) => {
803
- S(1, O, pe);
804
- },
805
- index: 1,
806
- setPageShowDate: (O) => b([X.subtract(O, 1, "month"), O], 1),
807
- timeValue: i[1],
808
- ...le
809
- }
810
- )
811
- ] });
812
- }
813
- function E() {
814
- const U = {
815
- onSuperPrev: I
816
- }, ne = {
817
- onSuperNext: P
818
- }, F = ae;
819
- return /* @__PURE__ */ Z(ye, { children: [
820
- /* @__PURE__ */ o(
821
- Ct,
822
- {
823
- setPageShowDate: (q) => b([q, q], 0),
824
- ...U,
825
- ...F,
826
- ...fe
827
- }
828
- ),
829
- /* @__PURE__ */ o(
830
- Ct,
831
- {
832
- setPageShowDate: (q) => b([X.subtract(q, 1, "year"), q], 1),
833
- ...ne,
834
- ...F,
835
- ...le
836
- }
837
- )
838
- ] });
839
- }
840
- function Ie() {
841
- const U = {
842
- onSuperPrev: I
843
- }, ne = {
844
- onSuperNext: P
845
- }, F = ae;
846
- return /* @__PURE__ */ Z(ye, { children: [
847
- /* @__PURE__ */ o(
848
- He,
849
- {
850
- ...U,
851
- ...F,
852
- pageShowDate: A
853
- }
854
- ),
855
- /* @__PURE__ */ o(
856
- He,
857
- {
858
- ...ne,
859
- ...F,
860
- pageShowDate: W
861
- }
862
- )
863
- ] });
864
- }
865
- function ue() {
866
- const U = {
867
- onSuperPrev: I
868
- }, ne = {
869
- onSuperNext: P
870
- }, F = ae;
871
- return /* @__PURE__ */ Z(ye, { children: [
872
- /* @__PURE__ */ o(
873
- sn,
874
- {
875
- setPageShowDate: (q) => b([q, q], 0),
876
- ...U,
877
- ...F,
878
- ...fe
879
- }
880
- ),
881
- /* @__PURE__ */ o(
882
- sn,
883
- {
884
- setPageShowDate: (q) => b([X.subtract(q, 1, "year"), q], 1),
885
- ...ne,
886
- ...F,
887
- ...le
888
- }
889
- )
890
- ] });
891
- }
892
- return /* @__PURE__ */ o("div", { className: M, children: /* @__PURE__ */ Z("div", { className: `${M}-wrapper`, children: [
893
- (n === "date" || n === "week") && T(),
894
- n === "month" && E(),
895
- n === "year" && Ie(),
896
- n === "quarter" && ue()
897
- ] }) });
898
- }
899
- function co(l) {
900
- const { format: n, showTime: m, mode: u } = l;
901
- let s;
902
- switch (u) {
903
- case "date":
904
- s = m ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
905
- break;
906
- case "month":
907
- s = "YYYY-MM";
908
- break;
909
- case "year":
910
- s = "YYYY";
911
- break;
912
- case "week":
913
- s = "YYYY-wo";
914
- break;
915
- case "quarter":
916
- s = "YYYY-[Q]Q";
917
- break;
918
- default:
919
- s = "YYYY-MM-DD";
920
- }
921
- return n && (s = n), s;
922
- }
923
- const ln = {
924
- allowClear: !0,
925
- unmountOnExit: !0,
926
- position: "bl",
927
- editable: !0,
928
- mode: "date"
929
- }, lo = { bottom: 4 }, uo = (l, n) => {
930
- var jt, Qt, Kt, Jt;
931
- const {
932
- getPrefixCls: m,
933
- locale: u,
934
- size: s,
935
- componentConfig: c,
936
- rtl: p
937
- } = ce(Re);
938
- p && (ln.position = "br");
939
- const a = zn(
940
- l,
941
- ln,
942
- c == null ? void 0 : c.DatePicker
943
- ), {
944
- allowClear: i,
945
- className: Y,
946
- style: w,
947
- placeholder: V,
948
- getPopupContainer: C,
949
- disabled: g,
950
- position: S,
951
- error: L,
952
- status: _,
953
- unmountOnExit: I,
954
- editable: y,
955
- triggerProps: P,
956
- shortcuts: d,
957
- onSelect: D,
958
- onVisibleChange: k,
959
- value: B,
960
- onChange: b,
961
- icons: x,
962
- disabledDate: $,
963
- disabledTime: J,
964
- mode: f,
965
- showTime: N,
966
- onSelectShortcut: K,
967
- extra: z,
968
- shortcutsPlacementLeft: M,
969
- onOk: H,
970
- defaultPickerValue: v,
971
- pickerValue: A,
972
- panelRender: W,
973
- onPickerValueChange: re,
974
- triggerElement: ae,
975
- clearRangeOnReselect: fe,
976
- separator: le,
977
- utcOffset: T,
978
- timezone: E,
979
- inputProps: Ie
980
- } = a, ue = m("picker-range"), U = u.DatePicker, ne = Fn(a.dayStartOfWeek) ? eo(u.dayjsLocale) : a.dayStartOfWeek, F = Ve(null), q = Ve(null), de = Ve(null), O = Ve(null), pe = Ve(null);
981
- Bn(
982
- n,
983
- () => ({
984
- focus(e) {
985
- var t, r;
986
- (r = (t = F.current) == null ? void 0 : t.focus) == null || r.call(t, e);
987
- },
988
- blur() {
989
- $t();
990
- }
991
- }),
992
- []
993
- );
994
- const R = ((Qt = (jt = U.Calendar) == null ? void 0 : jt[f]) == null ? void 0 : Qt.format) || co(a);
995
- function ke() {
996
- if (G(g)) {
997
- if (g[0] && !g[1])
998
- return 1;
999
- if (g[1] && !g[0])
1000
- return 0;
1001
- }
1002
- }
1003
- const Ce = ke(), me = typeof Ce == "number", mn = me ? 1 ^ Ce : void 0, [ee, ot] = ie(
1004
- me ? Ce : 0
1005
- );
1006
- Ke(() => {
1007
- me && ot(Ce);
1008
- }, [g]);
1009
- const Fe = 1 ^ ee, [_e, De] = ie(), [xt, We] = ie(), [rt, at] = ie(Sn()), [Se, Ne] = ie(), [fn, $e] = ie(), [Tt, st] = ie(), [pn, hn] = ie(() => !!a.popupVisible), [it, ct] = ie([f, f]), [lt, Vt] = ie(!1), ve = a.popupVisible ?? pn, be = oe(
1010
- B,
1011
- R,
1012
- T,
1013
- E
1014
- ), Pe = "value" in a ? be : rt, j = Tt || Se || Pe || [], se = Xe(Se || Pe), Ee = Ve(!0), ut = te(), Lt = en(ut, T, E);
1015
- function gn() {
1016
- const e = [], t = Ge(N) && N.defaultValue ? oe(N.defaultValue, N.format || "HH:mm:ss") : [];
1017
- return e[0] = j[0] || t[0] || Lt, e[1] = j[1] || t[1] || Lt, e;
1018
- }
1019
- const Be = gn(), Rt = me ? (e) => Ce === 0 ? e.isAfter(j[1], f) : e.isBefore(j[0], f) : void 0, dt = ae !== void 0, mt = dt || fe;
1020
- function Sn() {
1021
- let e;
1022
- if (a.value ? e = oe(a.value, R, T, E) : e = oe(a.defaultValue, R, T, E), me && (!e || e && !e[Fe])) {
1023
- const t = [];
1024
- return t[Fe] = te(T, E), t;
1025
- }
1026
- return e;
1027
- }
1028
- const ft = Pe || oe(v, R) || [ut, ut], [Yt, ze] = ie(
1029
- xe(ft)
1030
- ), qe = xe(
1031
- oe(A, R, T, E)
1032
- ) || Yt, pt = Xt(T), ht = Xt(E);
1033
- Zt(() => {
1034
- if (G(rt) && (pt !== T || E !== ht)) {
1035
- const t = rt.map(
1036
- (r) => wt(r, pt, ht)
1037
- ).map(
1038
- (r) => en(r, T, E)
1039
- );
1040
- at(t);
1041
- }
1042
- }, [T, pt, E, ht]), Zt(() => {
1043
- ze(xe(ft));
1044
- }, [f]), Ke(() => {
1045
- ct([f, f]);
1046
- }, [f]), Ke(() => {
1047
- if (We(void 0), De(void 0), ve) {
1048
- const e = xe(ft);
1049
- Vt(!1), ct([f, f]), ze(e), gt(e), Ne(Pe), M && de.current && q.current && (de.current.style.maxHeight = `${q.current.clientHeight}px`);
1050
- } else
1051
- Ne(void 0), $e(void 0), st(void 0), $t();
1052
- Ee.current = ve;
1053
- }, [ve]);
1054
- const vn = (Kt = be == null ? void 0 : be[0]) == null ? void 0 : Kt.format(he(R, 0)), Pn = (Jt = be == null ? void 0 : be[1]) == null ? void 0 : Jt.format(he(R, 1));
1055
- Ke(() => {
1056
- Ne(void 0), $e(void 0);
1057
- }, [vn, Pn]);
1058
- function Ae(e, t = ee) {
1059
- const r = xe(e, t);
1060
- ze(r), gt(r);
1061
- }
1062
- function gt(e) {
1063
- It([e[0], Yt[0]], f) || re == null || re(
1064
- G(e) ? e.map((t, r) => t && t.format(he(R, r))) : void 0,
1065
- e
1066
- );
1067
- }
1068
- function xe(e, t = ee) {
1069
- const r = t === 0 || It(e, f);
1070
- if (G(e) && e.length < 2)
1071
- return Ue(
1072
- e[0] || te(T, E),
1073
- f,
1074
- "prev"
1075
- );
1076
- if (G(e) && e.length === 2)
1077
- return e[t] ? Ue(
1078
- e[t],
1079
- f,
1080
- r ? "prev" : "next"
1081
- ) : Ue(
1082
- e[t === 0 ? 1 : 0] || te(T, E),
1083
- f,
1084
- r && !e[t === 0 ? 1 : 0] ? "prev" : "next"
1085
- );
1086
- }
1087
- function It(e, t) {
1088
- if ((e == null ? void 0 : e.length) === 2 && Wt(e))
1089
- return (t === "date" || t === "week") && e[0].isSame(e[1], "month") || (t === "month" || t === "quarter") && e[0].isSame(e[1], "year") || t === "year" && Math.floor(e[0].year() / 10) === Math.floor(e[1].year() / 10);
1090
- }
1091
- function Ue(e = te(T, E), t = f, r = "prev") {
1092
- const h = r === "prev";
1093
- switch (t) {
1094
- case "date":
1095
- case "week":
1096
- return h ? [e, X.add(e, 1, "month")] : [X.subtract(e, 1, "month"), e];
1097
- case "month":
1098
- case "quarter":
1099
- return h ? [e, X.add(e, 1, "year")] : [X.subtract(e, 1, "year"), e];
1100
- case "year":
1101
- return h ? [e, X.add(e, 10, "year")] : [X.subtract(e, 10, "year"), e];
1102
- default:
1103
- return [];
1104
- }
1105
- }
1106
- function St(e) {
1107
- var t, r;
1108
- (r = (t = F.current) == null ? void 0 : t.focus) == null || r.call(t, me ? Ce : e);
1109
- }
1110
- function $t() {
1111
- var e, t;
1112
- (t = (e = F.current) == null ? void 0 : e.blur) == null || t.call(e);
1113
- }
1114
- function je(e) {
1115
- k == null || k(e), hn(e);
1116
- }
1117
- function wn(e) {
1118
- var r;
1119
- e.stopPropagation();
1120
- let t = [...j];
1121
- me ? t[Ce] = void 0 : t = void 0, at(t), Ne(t), Mt(t), (r = a.onClear) == null || r.call(a);
1122
- }
1123
- function Et(e, t) {
1124
- if (ot(e), j && j.length && !t) {
1125
- const r = xe(j, e);
1126
- ze(r), gt(r);
1127
- }
1128
- }
1129
- function At(e) {
1130
- const t = typeof Rt == "function" ? Rt(e) : !1;
1131
- return (typeof $ == "function" ? $(e) : !1) || t;
1132
- }
1133
- function Ot(e) {
1134
- return Qn(e, R, ee) && !At(oe(e, R));
1135
- }
1136
- function yn(e) {
1137
- const t = [...j || []], r = e.target.value;
1138
- De(r), ve || je(!0), Ot(r) && (t[ee] = oe(r, R), Ne(t), Ae(t), De(void 0));
1139
- }
1140
- function kn() {
1141
- _e && De(void 0);
1142
- }
1143
- function Mt(e) {
1144
- if (Kn(Pe, e)) {
1145
- const t = G(e) ? e.map(
1146
- (r) => yt(
1147
- wt(r, T, E),
1148
- u.dayjsLocale
1149
- )
1150
- ) : void 0;
1151
- b == null || b(
1152
- G(t) ? t.map((r, h) => r && r.format(he(R, h))) : void 0,
1153
- t
1154
- );
1155
- }
1156
- }
1157
- function Cn() {
1158
- G(Se) && Se.length ? _e && !Ot(_e) ? De(void 0) : se !== 2 ? Qe() : se === 2 && Te(Se) : ve && je(!1);
1159
- }
1160
- function Te(e, t) {
1161
- const r = e || j;
1162
- if (!r || !r[0] || !r[1])
1163
- return;
1164
- const h = Me(r);
1165
- at(h), Mt(h), ae !== null && !t && je(!1);
1166
- }
1167
- function Dn() {
1168
- Te();
1169
- const e = j.map(
1170
- (t) => yt(t, u.dayjsLocale)
1171
- );
1172
- H == null || H(
1173
- e.map(
1174
- (t, r) => t && t.format(he(R, r))
1175
- ),
1176
- e
1177
- );
1178
- }
1179
- function Ht() {
1180
- switch (f) {
1181
- case "date":
1182
- case "week":
1183
- return "date";
1184
- case "month":
1185
- return "month";
1186
- case "year":
1187
- return "year";
1188
- default:
1189
- return;
1190
- }
1191
- }
1192
- function Ft(e) {
1193
- if (se !== 2)
1194
- return !1;
1195
- const t = Se || Pe;
1196
- return !!(ee === 0 && e.isAfter(t[1], Ht()) || ee === 1 && e.isBefore(t[0], Ht()));
1197
- }
1198
- function bn(e, t) {
1199
- const r = Ft(t) && Ee.current, h = mt && se === 2 && !me ? [] : [...j], Q = dt ? se === 0 || se === 2 ? 0 : 1 : ee, Oe = N ? Je(t, Be[Q]) : t;
1200
- r ? (h[Q] = Oe, h[1 ^ Q] = void 0) : h[Q] = Oe;
1201
- const vt = Me(h);
1202
- _t(vt), De(void 0), We(void 0);
1203
- const Pt = Xe(h);
1204
- mt ? se === 0 || se === 2 && !me ? dt ? ot(1) : Qe(!0) : N || Te(h) : Pt <= 1 ? Qe(!0) : se === 2 && Ee.current && !me ? (Ee.current = !1, Qe(!0), !N && !r && Te(h, !0)) : (Ee.current = !1, !N && !r && Te(h));
1205
- }
1206
- function Nn(e, t, r) {
1207
- const h = G(j) ? [...j] : [], Q = Je(
1208
- h[e] || te(T, E),
1209
- r
1210
- );
1211
- h[e] = Q, _t(h);
1212
- }
1213
- function _t(e) {
1214
- Ne(e), $e(void 0);
1215
- const r = Me(e).map(
1216
- (h) => yt(wt(h, T, E), u.dayjsLocale)
1217
- );
1218
- D == null || D(
1219
- r.map((h, Q) => h && h.format(he(R, Q))),
1220
- r,
1221
- { type: ee === 1 ? "end" : "start" }
1222
- );
1223
- }
1224
- function Qe(e) {
1225
- Et(Fe, e), setTimeout(() => St(Fe));
1226
- }
1227
- function xn(e, t) {
1228
- const r = [...j || []];
1229
- if (!t && (mt ? se === 1 : se !== 0) && !Ft(e) && (r[ee] = Je(
1230
- e,
1231
- Be[ee]
1232
- ), $e(r), De(void 0)), !t) {
1233
- const Q = N ? Je(e, Be[ee]) : e;
1234
- We(
1235
- Q.locale(u.dayjsLocale).format(he(R, ee))
1236
- );
1237
- }
1238
- }
1239
- function Tn() {
1240
- $e(void 0), We(void 0);
1241
- }
1242
- function Wt(e) {
1243
- return e && G(e) && e.length === 2 && Gt(e[0]) && Gt(e[1]);
1244
- }
1245
- function Bt(e) {
1246
- const t = typeof e.value == "function" && e.value();
1247
- return Wt(t);
1248
- }
1249
- function zt() {
1250
- clearTimeout(O.current), clearTimeout(pe.current), O.current = null, pe.current = null;
1251
- }
1252
- function Vn(e) {
1253
- zt(), O.current = setTimeout(() => {
1254
- if (Bt(e)) {
1255
- const t = oe(
1256
- e.value(),
1257
- R,
1258
- T,
1259
- E
1260
- );
1261
- st(t), Ae(t);
1262
- }
1263
- }, 50);
1264
- }
1265
- function Ln() {
1266
- zt(), pe.current = setTimeout(() => {
1267
- st(void 0), Ae(
1268
- Se || Pe || [
1269
- te(T, E),
1270
- te(T, E)
1271
- ]
1272
- );
1273
- }, 50);
1274
- }
1275
- function Rn(e) {
1276
- if (K == null || K(e), Bt(e)) {
1277
- const t = oe(
1278
- e.value(),
1279
- R,
1280
- T,
1281
- E
1282
- );
1283
- Te(t);
1284
- }
1285
- }
1286
- function we(e, t, r = 1) {
1287
- const h = e === "prev" ? 0 : 1;
1288
- let Q = [...qe];
1289
- e === "prev" && (Q[h] = X.subtract(
1290
- qe[h],
1291
- r,
1292
- t
1293
- )), e === "next" && (Q[h] = X.add(
1294
- qe[h],
1295
- r,
1296
- t
1297
- )), Q = Ue(
1298
- Q[h],
1299
- f,
1300
- e
1301
- ), Ae(Q);
1302
- }
1303
- function qt(e = f) {
1304
- if (e === "date" || e === "week")
1305
- return {
1306
- onPrev: () => we("prev", "month"),
1307
- onNext: () => we("next", "month"),
1308
- onSuperPrev: () => we("prev", "year"),
1309
- onSuperNext: () => we("next", "year")
1310
- };
1311
- if (e === "month" || e === "quarter")
1312
- return {
1313
- onSuperPrev: () => we("prev", "year"),
1314
- onSuperNext: () => we("next", "year")
1315
- };
1316
- if (e === "year")
1317
- return {
1318
- onSuperPrev: () => we("prev", "year", 10),
1319
- onSuperNext: () => we("next", "year", 10)
1320
- };
1321
- }
1322
- function Yn() {
1323
- Vt(!lt);
1324
- }
1325
- function Ut(e) {
1326
- const t = ge(
1327
- `${ue}-container`,
1328
- {
1329
- [`${ue}-panel-only`]: e,
1330
- [`${ue}-container-shortcuts-placement-left`]: G(d) && M,
1331
- [`${ue}-container-rtl`]: p
1332
- },
1333
- e ? Y : ""
1334
- ), r = {
1335
- prefixCls: m("picker"),
1336
- showTime: N,
1337
- shortcuts: d,
1338
- onMouseEnterShortcut: Vn,
1339
- onMouseLeaveShortcut: Ln,
1340
- onSelectShortcut: Rn
1341
- }, h = N && it[0] === "date" && it[1] === "date" || z || G(d) && d.length && !M, Q = /* @__PURE__ */ Z(ye, { children: [
1342
- /* @__PURE__ */ o(
1343
- io,
1344
- {
1345
- ...a,
1346
- ...qt(),
1347
- getHeaderOperations: qt,
1348
- setRangePageShowDates: Ae,
1349
- pageShowDates: qe,
1350
- value: j,
1351
- format: R,
1352
- onSelectPanel: bn,
1353
- onMouseEnterCell: xn,
1354
- onMouseLeaveCell: Tn,
1355
- disabledDate: (Pt) => At(Pt),
1356
- disabledTime: J,
1357
- mode: f,
1358
- localeName: u.dayjsLocale,
1359
- showTime: N,
1360
- timeValues: Tt || Be,
1361
- onTimePickerSelect: Nn,
1362
- popupVisible: ve,
1363
- disabledTimePickerIndex: mn,
1364
- isTimePanel: lt,
1365
- valueShowHover: fn,
1366
- panelModes: it,
1367
- setPanelModes: ct
1368
- }
1369
- ),
1370
- !!h && /* @__PURE__ */ o(
1371
- Gn,
1372
- {
1373
- ...r,
1374
- DATEPICKER_LOCALE: U,
1375
- disabled: !(G(j) && j[0] && j[1]),
1376
- onClickConfirmBtn: Dn,
1377
- extra: z,
1378
- shortcutsPlacementLeft: M,
1379
- onClickSelectTimeBtn: Yn,
1380
- isTimePanel: lt
1381
- }
1382
- )
1383
- ] }), Oe = M ? /* @__PURE__ */ Z(ye, { children: [
1384
- /* @__PURE__ */ o(Xn, { ref: de, ...r }),
1385
- /* @__PURE__ */ o("div", { ref: q, className: `${ue}-panel-wrapper`, children: Q })
1386
- ] }) : Q, vt = typeof W == "function" ? W(Oe) : Oe;
1387
- return /* @__PURE__ */ o(
1388
- "div",
1389
- {
1390
- className: t,
1391
- onClick: () => St(),
1392
- style: e ? w : {},
1393
- children: vt
1394
- }
1395
- );
1396
- }
1397
- const In = a.size || s, $n = G(V) ? V : U.placeholders[f], En = x && x.inputSuffix === null ? null : x && x.inputSuffix || (N ? /* @__PURE__ */ o(Hn, {}) : /* @__PURE__ */ o(Mn, {})), An = {
1398
- style: w,
1399
- className: Y,
1400
- popupVisible: ve,
1401
- format: R,
1402
- disabled: g,
1403
- error: L,
1404
- status: _,
1405
- size: In,
1406
- onPressEnter: Cn,
1407
- onClear: wn,
1408
- suffixIcon: En,
1409
- editable: y,
1410
- allowClear: i,
1411
- prefix: a.prefix
1412
- }, On = G(g) ? g[0] && g[1] : g;
1413
- return /* @__PURE__ */ o(Ye.Provider, { value: { utcOffset: T, timezone: E, weekStart: ne }, children: ae === null ? Ut(!0) : /* @__PURE__ */ o(
1414
- Un,
1415
- {
1416
- popup: Ut,
1417
- trigger: "click",
1418
- clickToClose: !1,
1419
- position: S,
1420
- disabled: On,
1421
- popupAlign: lo,
1422
- getPopupContainer: C,
1423
- onVisibleChange: (e) => {
1424
- e && setTimeout(() => {
1425
- St();
1426
- }), je(!!e);
1427
- },
1428
- popupVisible: ve,
1429
- classNames: "slideDynamicOrigin",
1430
- unmountOnExit: I,
1431
- ...P,
1432
- children: ae || /* @__PURE__ */ o(
1433
- qn,
1434
- {
1435
- ...Jn(a),
1436
- ...An,
1437
- inputProps: Ie,
1438
- ref: F,
1439
- placeholder: $n,
1440
- value: Se || Pe,
1441
- onChange: yn,
1442
- inputValue: xt || _e,
1443
- changeFocusedInputIndex: Et,
1444
- focusedInputIndex: ee,
1445
- isPlaceholder: !!xt,
1446
- separator: le,
1447
- onBlur: kn
1448
- }
1449
- )
1450
- }
1451
- ) });
1452
- }, mo = Wn(uo);
1453
- mo.displayName = "RangePicker";
1454
- export {
1455
- bt as D,
1456
- Ct as M,
1457
- mo as P,
1458
- sn as Q,
1459
- cn as W,
1460
- He as Y
1461
- };