@baishuyun/ui-base 6.0.0 → 6.2.0

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 (186) hide show
  1. package/dist/Amap/AmapProvider/index.js +3 -3
  2. package/dist/Amap/{AmapProvider-BkJp-sWi.js → AmapProvider-BgGnih_w.js} +1 -1
  3. package/dist/Amap/index.js +3 -3
  4. package/dist/Calendar/AllDaySection-DS0Frx1p.js +53 -0
  5. package/dist/Calendar/Calendar-CAG1Fxlh.js +806 -0
  6. package/dist/Calendar/CurrentTimeIndicator-DaIywtIA.js +59 -0
  7. package/dist/Calendar/EventCard-D_VeOVDQ.js +155 -0
  8. package/dist/Calendar/TimeAxis-gKb8dTwY.js +13 -0
  9. package/dist/Calendar/TimeGrid-D8Du5vFP.js +47 -0
  10. package/dist/Calendar/adapters/index.js +2 -0
  11. package/dist/Calendar/adapters-zYR7CgzD.js +20 -0
  12. package/dist/Calendar/colorUtils-DcpqM3KR.js +55 -0
  13. package/dist/Calendar/context/index.js +2 -0
  14. package/dist/Calendar/context-DNOJ9LW_.js +21 -0
  15. package/dist/Calendar/index.js +21 -0
  16. package/dist/Calendar/layout-DvWx_7gn.js +302 -0
  17. package/dist/Calendar/shared/AllDaySection/index.js +8 -0
  18. package/dist/Calendar/shared/CurrentTimeIndicator/index.js +5 -0
  19. package/dist/Calendar/shared/EventCard/index.js +6 -0
  20. package/dist/Calendar/shared/TimeAxis/index.js +4 -0
  21. package/dist/Calendar/shared/TimeGrid/index.js +4 -0
  22. package/dist/Calendar/style/index.js +2 -0
  23. package/dist/Calendar/style-hCRKx3m1.js +55 -0
  24. package/dist/Calendar/utils/index.js +114 -0
  25. package/dist/Calendar/utils/layout/index.js +3 -0
  26. package/dist/Card/{Card-D__c94yx.js → Card-CRrtIjNT.js} +1 -1
  27. package/dist/Card/index.js +2 -2
  28. package/dist/CheckBox/{CheckBox-DF201Nxg.js → CheckBox-CkVe5Boq.js} +1 -1
  29. package/dist/CheckBox/{CheckBox-B04hZKaC.js → CheckBox-DIunYcfS.js} +1 -1
  30. package/dist/CheckBox/index.js +3 -3
  31. package/dist/ColorPicker/ColorPicker-CKqNqAsK.js +150 -0
  32. package/dist/ColorPicker/index.js +6 -5
  33. package/dist/ConfigProvider/index.js +2 -2
  34. package/dist/DatePicker/DatePicker-BIxiJQ_W.js +91 -0
  35. package/dist/DatePicker/DatePickerPanel-CsiEGC-1.js +217 -0
  36. package/dist/DatePicker/ensureDayjsPlugins-DZjJnZgo.js +16 -0
  37. package/dist/DatePicker/index.js +8 -0
  38. package/dist/DatePicker/pickerLocale-VqSP_iIm.js +15 -0
  39. package/dist/DatePicker/style/index.js +2 -0
  40. package/dist/DatePicker/style-DZaSSoNs.js +15 -0
  41. package/dist/DropDown/{DropDown-CMKiQDrc.js → DropDown-BR-Tz58r.js} +5 -5
  42. package/dist/DropDown/index.js +7 -7
  43. package/dist/Editor/{Buttons-D17RQIEb.js → Buttons-DdZg3jAa.js} +6 -6
  44. package/dist/Editor/ToolbarPlugin/Buttons/index.js +14 -13
  45. package/dist/Editor/index.js +14 -13
  46. package/dist/Icon/{Icon-CTZCSuVg.js → Icon-BQ3Whub2.js} +1 -1
  47. package/dist/Icon/index.js +1 -1
  48. package/dist/InputTag/{InputTag-F2Dv-r56.js → InputTag-zP5QdId7.js} +1 -1
  49. package/dist/InputTag/index.js +2 -2
  50. package/dist/Loading/index.js +1 -1
  51. package/dist/Modal/{Modal-CweuD-VO.js → Modal-B5AW5GKt.js} +6 -5
  52. package/dist/Modal/index.js +2 -2
  53. package/dist/NotFoundContent/index.js +1 -1
  54. package/dist/Radio/index.js +1 -1
  55. package/dist/Segmented/Segmented-BTW445jc.js +82 -0
  56. package/dist/Segmented/index.js +1 -1
  57. package/dist/Select/{Select-D8T0S1_m.js → Select-BGsQ-PVq.js} +14 -15
  58. package/dist/Select/{SelectInputSearch-Dm3CI_L4.js → SelectInputSearch-CraymTXM.js} +3 -3
  59. package/dist/Select/index.js +11 -11
  60. package/dist/Tabs/{Tabs-Cxf7jwys.js → Tabs-CPRNkfMo.js} +4 -4
  61. package/dist/Tabs/index.js +4 -4
  62. package/dist/Tooltip/Tooltip-RkD8fs0B.js +169 -0
  63. package/dist/Tooltip/index.js +2 -0
  64. package/dist/Tree/index.js +4 -4
  65. package/dist/components/Calendar/Calendar.d.ts +3 -0
  66. package/dist/components/Calendar/Header/CalendarHeader/CalendarHeader.d.ts +2 -0
  67. package/dist/components/Calendar/Header/CalendarHeaderLeft/CalendarHeaderLeft.d.ts +2 -0
  68. package/dist/components/Calendar/Header/DateDisplay/DateDisplay.d.ts +2 -0
  69. package/dist/components/Calendar/Header/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts +1 -0
  70. package/dist/components/Calendar/Header/NavButton/NavButton.d.ts +6 -0
  71. package/dist/components/Calendar/Header/TodayButton/TodayButton.d.ts +2 -0
  72. package/dist/components/Calendar/__tests__/Calendar.contract.test.d.ts +1 -0
  73. package/dist/components/Calendar/__tests__/algorithm/monthLayoutAlgorithm.test.d.ts +1 -0
  74. package/dist/components/Calendar/__tests__/helpers/testFormatMessage.d.ts +2 -0
  75. package/dist/components/Calendar/adapters/__tests__/platformTheme.test.d.ts +1 -0
  76. package/dist/components/Calendar/adapters/index.d.ts +1 -0
  77. package/dist/components/Calendar/adapters/platformTheme.d.ts +29 -0
  78. package/dist/components/Calendar/constants.d.ts +12 -0
  79. package/dist/components/Calendar/context/CalendarContext.d.ts +29 -0
  80. package/dist/components/Calendar/context/index.d.ts +2 -0
  81. package/dist/components/Calendar/context/useCalendarContext.d.ts +3 -0
  82. package/dist/components/Calendar/index.d.ts +4 -0
  83. package/dist/components/Calendar/interface.d.ts +62 -0
  84. package/dist/components/Calendar/internalTypes.d.ts +56 -0
  85. package/dist/components/Calendar/panels/DayPanel/DayPanel.d.ts +3 -0
  86. package/dist/components/Calendar/panels/DayPanel/__tests__/CalendarDay.dayFilter.test.d.ts +1 -0
  87. package/dist/components/Calendar/panels/MonthPanel/MonthCell/MonthCell.d.ts +10 -0
  88. package/dist/components/Calendar/panels/MonthPanel/MonthCell/MonthCellPopover/MonthCellPopover.d.ts +10 -0
  89. package/dist/components/Calendar/panels/MonthPanel/MonthHeader/MonthHeader.d.ts +2 -0
  90. package/dist/components/Calendar/panels/MonthPanel/MonthPanel.d.ts +3 -0
  91. package/dist/components/Calendar/panels/MonthPanel/WeekEventLayer/MoreButton.d.ts +11 -0
  92. package/dist/components/Calendar/panels/MonthPanel/WeekEventLayer/WeekEventLayer.d.ts +3 -0
  93. package/dist/components/Calendar/panels/WeekPanel/WeekAllDaySection/WeekAllDaySection.d.ts +11 -0
  94. package/dist/components/Calendar/panels/WeekPanel/WeekHeader/WeekHeader.d.ts +6 -0
  95. package/dist/components/Calendar/panels/WeekPanel/WeekPanel.d.ts +3 -0
  96. package/dist/components/Calendar/shared/AllDaySection/AllDaySection.d.ts +7 -0
  97. package/dist/components/Calendar/shared/AllDaySection/index.d.ts +1 -0
  98. package/dist/components/Calendar/shared/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +10 -0
  99. package/dist/components/Calendar/shared/CurrentTimeIndicator/__tests__/CurrentTimeIndicator.test.d.ts +1 -0
  100. package/dist/components/Calendar/shared/CurrentTimeIndicator/index.d.ts +1 -0
  101. package/dist/components/Calendar/shared/EventCard/EventCard.d.ts +22 -0
  102. package/dist/components/Calendar/shared/EventCard/__tests__/EventCard.tooltip.test.d.ts +1 -0
  103. package/dist/components/Calendar/shared/EventCard/index.d.ts +1 -0
  104. package/dist/components/Calendar/shared/TimeAxis/TimeAxis.d.ts +6 -0
  105. package/dist/components/Calendar/shared/TimeAxis/index.d.ts +1 -0
  106. package/dist/components/Calendar/shared/TimeGrid/TimeGrid.d.ts +11 -0
  107. package/dist/components/Calendar/shared/TimeGrid/index.d.ts +1 -0
  108. package/dist/components/Calendar/style/__tests__/resolveCalendarThemeVars.test.d.ts +1 -0
  109. package/dist/components/Calendar/style/__tests__/resolveScheduleColorVars.test.d.ts +1 -0
  110. package/dist/components/Calendar/style/__tests__/resolveSubcomponentThemes.test.d.ts +1 -0
  111. package/dist/components/Calendar/style/index.d.ts +5 -0
  112. package/dist/components/Calendar/style/resolveCalendarThemeVars.d.ts +2 -0
  113. package/dist/components/Calendar/style/resolveScheduleColorVars.d.ts +3 -0
  114. package/dist/components/Calendar/style/resolveSubcomponentThemes.d.ts +5 -0
  115. package/dist/components/Calendar/utils/__tests__/dateUtils.test.d.ts +1 -0
  116. package/dist/components/Calendar/utils/__tests__/eventUtils.contract.test.d.ts +1 -0
  117. package/dist/components/Calendar/utils/__tests__/normalizeData.test.d.ts +1 -0
  118. package/dist/components/Calendar/utils/colorUtils.d.ts +8 -0
  119. package/dist/components/Calendar/utils/dateUtils.d.ts +25 -0
  120. package/dist/components/Calendar/utils/eventUtils.d.ts +44 -0
  121. package/dist/components/Calendar/utils/index.d.ts +7 -0
  122. package/dist/components/Calendar/utils/layout/dayLayoutAlgorithm.d.ts +31 -0
  123. package/dist/components/Calendar/utils/layout/index.d.ts +3 -0
  124. package/dist/components/Calendar/utils/layout/monthLayoutAlgorithm.d.ts +59 -0
  125. package/dist/components/Calendar/utils/layout/weekLayoutAlgorithm.d.ts +7 -0
  126. package/dist/components/Calendar/utils/normalizeData.d.ts +7 -0
  127. package/dist/components/Calendar/utils/timeUtils.d.ts +27 -0
  128. package/dist/components/Calendar/utils/weekTimedLayout.d.ts +14 -0
  129. package/dist/components/ColorPicker/useFloatingColorPicker.d.ts +1 -23
  130. package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +1 -0
  131. package/dist/components/DatePicker/DatePicker.d.ts +3 -0
  132. package/dist/components/DatePicker/DatePickerHeader/DatePickerHeader.d.ts +17 -0
  133. package/dist/components/DatePicker/DatePickerPanel/DatePickerPanel.d.ts +9 -0
  134. package/dist/components/DatePicker/MonthPicker/MonthPicker.d.ts +4 -0
  135. package/dist/components/DatePicker/TodayFooter/TodayFooter.d.ts +5 -0
  136. package/dist/components/DatePicker/YearPicker/YearPicker.d.ts +4 -0
  137. package/dist/components/DatePicker/__tests__/DatePicker.theme.test.d.ts +1 -0
  138. package/dist/components/DatePicker/__tests__/DatePickerPanel.dom.test.d.ts +1 -0
  139. package/dist/components/DatePicker/__tests__/DatePickerPanel.styles.test.d.ts +1 -0
  140. package/dist/components/DatePicker/index.d.ts +2 -0
  141. package/dist/components/DatePicker/interface.d.ts +37 -0
  142. package/dist/components/DatePicker/style/__tests__/resolveDatePickerThemeVars.test.d.ts +1 -0
  143. package/dist/components/DatePicker/style/index.d.ts +1 -0
  144. package/dist/components/DatePicker/style/resolveDatePickerThemeVars.d.ts +2 -0
  145. package/dist/components/DatePicker/utils/__tests__/normalizePickerValue.test.d.ts +1 -0
  146. package/dist/components/DatePicker/utils/chunkArray.d.ts +1 -0
  147. package/dist/components/DatePicker/utils/ensureDayjsPlugins.d.ts +2 -0
  148. package/dist/components/DatePicker/utils/formatPickerLabel.d.ts +1 -0
  149. package/dist/components/DatePicker/utils/normalizePickerValue.d.ts +10 -0
  150. package/dist/components/DatePicker/utils/pickerConstants.d.ts +8 -0
  151. package/dist/components/DatePicker/utils/pickerLocale.d.ts +4 -0
  152. package/dist/components/Segmented/Segmented.type.d.ts +30 -0
  153. package/dist/components/Segmented/__tests__/Segmented.theme.test.d.ts +1 -0
  154. package/dist/components/Segmented/index.d.ts +1 -1
  155. package/dist/components/Tooltip/Tooltip.d.ts +6 -0
  156. package/dist/components/Tooltip/Tooltip.type.d.ts +33 -0
  157. package/dist/components/Tooltip/__tests__/Tooltip.test.d.ts +1 -0
  158. package/dist/components/Tooltip/context/TooltipFloatingContext.d.ts +2 -0
  159. package/dist/components/Tooltip/index.d.ts +3 -0
  160. package/dist/components/index.d.ts +8 -0
  161. package/dist/hooks/useFloatingOverlay.d.ts +20 -0
  162. package/dist/hooks/useLocale.d.ts +4 -2
  163. package/dist/index.js +39 -23
  164. package/dist/locale/LocaleContext.d.ts +2 -1
  165. package/dist/locale/formatLocaleMessage.d.ts +2 -0
  166. package/dist/locale/lang/en-US.json.d.ts +43 -1
  167. package/dist/locale/lang/zh-CN.json.d.ts +43 -1
  168. package/dist/locale/lang/zh-TW.json.d.ts +43 -1
  169. package/dist/style.css +1 -1
  170. package/dist/utils/cssVars.d.ts +1 -0
  171. package/dist/utils/mergeRefs.d.ts +4 -0
  172. package/dist/vendors/{ConfigProvider-BekyDD3V.js → ConfigProvider-aWr8b3e3.js} +123 -32
  173. package/dist/vendors/{LocaleContext-Jj_JGgi2.js → LocaleContext-CuXR7Y03.js} +52 -7
  174. package/dist/vendors/{Tree-Bg2UzLsC.js → Tree-BTQ25Pi7.js} +3 -3
  175. package/dist/vendors/cssVars-C4BlzyxA.js +6 -0
  176. package/dist/vendors/useFloatingOverlay-uxlI1G-V.js +26 -0
  177. package/dist/vendors/{useLocale-Mk0d7wNt.js → useLocale-DvdSwM9e.js} +1 -1
  178. package/package.json +8 -3
  179. package/dist/ColorPicker/ColorPicker-nnQIw0_e.js +0 -168
  180. package/dist/Segmented/Segmented-Byw8j1hQ.js +0 -62
  181. /package/dist/Loading/{Loading-dsLWSWsE.js → Loading-WjmzBabh.js} +0 -0
  182. /package/dist/NotFoundContent/{NotFoundContent-DJUQ0_2D.js → NotFoundContent-7xV-zOG2.js} +0 -0
  183. /package/dist/Radio/{Radio-WNw-VqIS.js → Radio-DkrZHoG1.js} +0 -0
  184. /package/dist/vendors/{animations-C2i5EijE.js → animations-BmT0HT5q.js} +0 -0
  185. /package/dist/vendors/{color-CxdZwdYM.js → color-BeQo449h.js} +0 -0
  186. /package/dist/vendors/{useFloatingPortal-CDgiCnbb.js → useFloatingPortal-DsEtsAGW.js} +0 -0
@@ -0,0 +1,302 @@
1
+ import { t as e } from "../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
2
+ import t from "dayjs";
3
+ //#region src/components/Calendar/utils/normalizeData.ts
4
+ e();
5
+ var n = () => t(null), r = (e, t) => !!(t && e.$x?.$timezone === t), i = (e, i) => {
6
+ if (e == null || e === "") return n();
7
+ if (t.isDayjs(e)) return e.isValid() ? !i || r(e, i) ? e : e.tz(i) : n();
8
+ if (typeof e == "number" || e instanceof Date) {
9
+ let r = t(e);
10
+ return r.isValid() ? i ? r.tz(i) : r : n();
11
+ }
12
+ if (typeof e == "string") {
13
+ let r = t(e);
14
+ return r.isValid() ? i ? r.tz(i) : r : n();
15
+ }
16
+ return n();
17
+ }, a = (e, t = {}) => {
18
+ let { timeZone: n } = t;
19
+ return Array.isArray(e) ? e.map((e, t) => ({
20
+ id: e.id ?? t,
21
+ sourceIndex: t,
22
+ label: e.label ?? "",
23
+ startTime: i(e.startTime, n),
24
+ endTime: i(e.endTime, n),
25
+ color: e.color
26
+ })) : (process.env.NODE_ENV !== "production" && console.warn("[normalizeData] 无效入参", { data: e }), []);
27
+ }, o = (e) => e.id, s = (e, t) => {
28
+ let n = i(e.startTime, t), r = i(e.endTime, t);
29
+ return !n.isValid() || !r.isValid() ? !1 : !n.isSame(r, "day");
30
+ }, c = (e, t) => {
31
+ let n = [], r = [];
32
+ for (let i of e) s(i, t) ? n.push(i) : r.push(i);
33
+ return {
34
+ allDayEvents: n,
35
+ timedEvents: r
36
+ };
37
+ }, l = (e, t, n) => {
38
+ let r = i(e.startTime, t), a = i(e.endTime, t);
39
+ if (!r.isSame(a, "day")) return n("allDay");
40
+ let o = (e) => `${String(e.hour()).padStart(2, "0")}:${String(e.minute()).padStart(2, "0")}`;
41
+ return `${o(r)} - ${o(a)}`;
42
+ }, u = (e, t = 22, n = 4) => e * t + Math.max(0, e - 1) * n, d = (e) => ({
43
+ mode: "grid",
44
+ row: e.row,
45
+ startCol: e.startCol,
46
+ endCol: e.endCol
47
+ }), f = (e) => ({
48
+ mode: "absolute",
49
+ top: e.top,
50
+ height: e.height,
51
+ hOffset: e.left,
52
+ hSpan: e.width,
53
+ hIsPercent: e.isPercent,
54
+ isLastInColumn: e.isLastInColumn
55
+ }), p = (e, t, n, r) => !e.isValid() || !t.isValid() || !n.isValid() || !r.isValid() ? !1 : e.isSame(t) ? (e.isSame(n) || e.isAfter(n)) && e.isBefore(r) : e.isBefore(r) && t.isAfter(n), m = (e, t, n, r, a) => p(i(e, a), i(t, a), i(n, a), i(r, a)), h = 15, g = {
56
+ allowStackLayout: !0,
57
+ maxColumnsBeforeStack: 10
58
+ }, _ = (e, t) => i(e, t), v = (e, t) => {
59
+ let n = _(e.startTime, t), r = _(e.endTime, t);
60
+ return r.diff(n, "minute") < h ? n.add(h, "minute") : r;
61
+ }, y = (e, t, n) => {
62
+ let r = _(e.startTime, n), i = v(e, n), a = _(t.startTime, n), o = v(t, n);
63
+ return r.isBefore(o) && i.isAfter(a);
64
+ }, b = (e, t) => {
65
+ if (e.length === 0) return [];
66
+ let n = [...e].sort((e, n) => _(e.startTime, t).valueOf() - _(n.startTime, t).valueOf()), r = [], i = [n[0]], a = v(n[0], t);
67
+ for (let e = 1; e < n.length; e++) {
68
+ let o = n[e];
69
+ if (_(o.startTime, t).isBefore(a)) {
70
+ i.push(o);
71
+ let e = v(o, t);
72
+ e.isAfter(a) && (a = e);
73
+ } else r.push(i), i = [o], a = v(o, t);
74
+ }
75
+ return r.push(i), r;
76
+ }, x = (e, t) => {
77
+ let n = /* @__PURE__ */ new Map(), r = [], i = [...e].sort((e, n) => _(e.startTime, t).valueOf() - _(n.startTime, t).valueOf());
78
+ for (let e of i) {
79
+ let i = !1;
80
+ for (let a = 0; a < r.length; a++) if (r[a].every((n) => !y(n, e, t))) {
81
+ r[a].push(e), n.set(o(e), a), i = !0;
82
+ break;
83
+ }
84
+ i || (r.push([e]), n.set(o(e), r.length - 1));
85
+ }
86
+ return n;
87
+ }, S = (e, t, n, r, i, a) => {
88
+ let s = n;
89
+ for (let n of r) {
90
+ if (o(n) === o(e)) continue;
91
+ let r = i.get(o(n));
92
+ r > t && y(e, n, a) && (s = Math.min(s, r));
93
+ }
94
+ return s - t;
95
+ }, C = (e, t, n = {}) => {
96
+ let { allowStackLayout: r, maxColumnsBeforeStack: i, timeZone: a } = {
97
+ ...g,
98
+ ...n
99
+ }, s = Math.max(...Array.from(t.values())) + 1, c = /* @__PURE__ */ new Map(), l = r && s > i;
100
+ for (let n of e) {
101
+ let r = o(n), i = t.get(r), u = S(n, i, s, e, t, a), d = i + u === s;
102
+ if (l) {
103
+ let e = i * 15;
104
+ c.set(r, {
105
+ left: e,
106
+ width: 85,
107
+ isPercent: !1,
108
+ isLastInColumn: d
109
+ });
110
+ } else {
111
+ let e = 100 / s;
112
+ c.set(r, {
113
+ left: i * e,
114
+ width: e * u,
115
+ isPercent: !0,
116
+ isLastInColumn: d
117
+ });
118
+ }
119
+ }
120
+ return c;
121
+ }, w = (e, t, n = {}) => {
122
+ let { timeZone: r, ...i } = {
123
+ ...g,
124
+ ...n
125
+ }, { allDayEvents: a, timedEvents: s } = c(e, r), l = b(s, r), u = [];
126
+ for (let e of l) {
127
+ let n = x(e, r), a = C(e, n, {
128
+ ...i,
129
+ timeZone: r
130
+ }), s = Math.max(...Array.from(n.values())) + 1;
131
+ for (let i of e) {
132
+ let e = _(i.startTime, r), c = _(i.endTime, r), l = e.hour() * 60 + e.minute(), d = c.hour() * 60 + c.minute(), f = Math.max(d - l, h), p = l / t.interval * t.rowHeight, m = f / t.interval * t.rowHeight, g = o(i), v = a.get(g);
133
+ u.push({
134
+ event: i,
135
+ top: p,
136
+ height: m,
137
+ left: v.left,
138
+ width: v.width,
139
+ isPercent: v.isPercent,
140
+ column: n.get(g),
141
+ totalColumns: s,
142
+ isLastInColumn: v.isLastInColumn
143
+ });
144
+ }
145
+ }
146
+ return {
147
+ timedEvents: u,
148
+ allDayEvents: a
149
+ };
150
+ };
151
+ //#endregion
152
+ //#region src/components/Calendar/utils/layout/weekLayoutAlgorithm.ts
153
+ function T(e, n, r) {
154
+ let a = i(e.startTime, r), o = i(e.endTime, r), s = n.add(7, "day"), c = a.isBefore(n) ? n : a, l = o.isAfter(s) ? s : o, u = n.utcOffset(), d = c.utcOffset(u), f = l.utcOffset(u), p = d.format("YYYY-MM-DD"), m = n.format("YYYY-MM-DD"), h = t(p).diff(m, "day"), g = t(f.hour() === 0 && f.minute() === 0 && f.second() === 0 ? f.format("YYYY-MM-DD") : f.add(1, "day").format("YYYY-MM-DD")).diff(m, "day");
155
+ return {
156
+ event: e,
157
+ startCol: h,
158
+ endCol: g,
159
+ span: g - h
160
+ };
161
+ }
162
+ function E(e, t) {
163
+ return e.startCol < t.endCol && e.endCol > t.startCol;
164
+ }
165
+ function D(e, t, n) {
166
+ if (!e || e.length === 0) return [];
167
+ let r = e.map((e) => T(e, t, n)).filter((e) => e.span > 0);
168
+ r.sort((e, t) => e.startCol === t.startCol ? t.span - e.span : e.startCol - t.startCol);
169
+ let i = [], a = [];
170
+ for (let e of r) {
171
+ let t = !1;
172
+ for (let n = 0; n < i.length; n++) if (!i[n].some((t) => E(t, e))) {
173
+ i[n].push(e), a.push({
174
+ ...e,
175
+ row: n
176
+ }), t = !0;
177
+ break;
178
+ }
179
+ t || (i.push([e]), a.push({
180
+ ...e,
181
+ row: i.length - 1
182
+ }));
183
+ }
184
+ return a;
185
+ }
186
+ //#endregion
187
+ //#region src/components/Calendar/utils/layout/monthLayoutAlgorithm.ts
188
+ var O = {
189
+ HEADER_HEIGHT: 34,
190
+ SLOT_HEIGHT: 22,
191
+ SLOT_GAP: 4,
192
+ WEEK_PADDING_X: 10,
193
+ EVENT_RIGHT_GAP: 4
194
+ };
195
+ function k(e) {
196
+ let { startCol: t, endCol: n, row: r } = e, { HEADER_HEIGHT: i, SLOT_HEIGHT: a, SLOT_GAP: o, EVENT_RIGHT_GAP: s, WEEK_PADDING_X: c } = O, l = 100 / 7, u = t > 0 ? c : 0;
197
+ return {
198
+ top: i + r * (a + o),
199
+ height: a,
200
+ left: `calc(${t * l}% + ${u}px)`,
201
+ width: `calc(${(n - t) * l}% - ${s + u}px)`
202
+ };
203
+ }
204
+ function A(e, t, n, r) {
205
+ let a = i(e.startTime, r), o = i(e.endTime, r), s = t.add(n, "day"), c = a.isBefore(t) ? t : a, l = o.isAfter(s) ? s : o, u = c.diff(t, "day"), d = a.startOf("day").diff(t.startOf("day"), "day"), f = l.hour() === 0 && l.minute() === 0 && l.second() === 0, p = a.isSame(o) && !a.isBefore(t) && a.isBefore(s) ? u + 1 : f ? l.diff(t, "day") : l.diff(t, "day") + 1;
206
+ return {
207
+ event: e,
208
+ startDayIndex: u,
209
+ endDayIndex: p,
210
+ span: p - u,
211
+ originalStartDayIndex: d
212
+ };
213
+ }
214
+ function j(e, t, n, r) {
215
+ return !e || e.length === 0 ? [] : e.map((e) => A(e, t, n, r));
216
+ }
217
+ function M(e) {
218
+ if (!e || e.length === 0) return /* @__PURE__ */ new Map();
219
+ let t = [...e].sort((e, t) => e.startDayIndex === t.startDayIndex ? t.span - e.span : e.startDayIndex - t.startDayIndex), n = /* @__PURE__ */ new Map(), r = [];
220
+ for (let e of t) {
221
+ let { event: t, startDayIndex: i, endDayIndex: a } = e, s = -1;
222
+ for (let e = 0; e <= r.length; e++) {
223
+ r[e] || (r[e] = []);
224
+ let t = !0;
225
+ for (let n = i; n < a; n++) if (r[e][n]) {
226
+ t = !1;
227
+ break;
228
+ }
229
+ if (t) {
230
+ s = e;
231
+ break;
232
+ }
233
+ }
234
+ r[s] || (r[s] = []);
235
+ let c = o(t);
236
+ for (let e = i; e < a; e++) r[s][e] = c;
237
+ n.set(c, s);
238
+ }
239
+ return n;
240
+ }
241
+ function N(e, t, n, r) {
242
+ return !e || e.length === 0 ? /* @__PURE__ */ new Map() : M(j(e, t, n, r));
243
+ }
244
+ function P(e, t) {
245
+ let { event: n, startDayIndex: r, endDayIndex: i, originalStartDayIndex: a } = e, o = [], s = r;
246
+ for (; s < i;) {
247
+ let e = Math.floor(s / 7), r = (e + 1) * 7, c = Math.min(i, r), l = s % 7;
248
+ o.push({
249
+ event: n,
250
+ weekIndex: e,
251
+ startCol: l,
252
+ endCol: c - e * 7,
253
+ row: t,
254
+ isStart: s === a,
255
+ isEnd: c === i,
256
+ isWeekStart: l === 0
257
+ }), s = c;
258
+ }
259
+ return o;
260
+ }
261
+ function F(e, t, n, r, i, a, s) {
262
+ let c = /* @__PURE__ */ new Set(), l = a || j(t, n, r, s);
263
+ if (l.length === 0) return c;
264
+ let u = Array.from({ length: r }, () => []);
265
+ for (let e of l) for (let t = e.startDayIndex; t < e.endDayIndex; t++) u[t].push(e);
266
+ for (let t = 0; t < r; t++) {
267
+ let n = u[t].filter((e) => !c.has(o(e.event))), r = n.some((t) => e.get(o(t.event)) >= i) && i > 1 ? i - 1 : i;
268
+ for (let t of n) {
269
+ let n = o(t.event);
270
+ e.get(n) >= r && c.add(n);
271
+ }
272
+ }
273
+ return c;
274
+ }
275
+ function I(e, t, n = 6, r) {
276
+ let i = j(e, t, n * 7, r);
277
+ if (!e || e.length === 0) return {
278
+ weekLayouts: Array.from({ length: n }, () => []),
279
+ eventRowMap: /* @__PURE__ */ new Map(),
280
+ gridEvents: i
281
+ };
282
+ let a = M(i), s = Array.from({ length: n }, () => []);
283
+ for (let e of i) {
284
+ let t = P(e, a.get(o(e.event)));
285
+ for (let e of t) s[e.weekIndex].push(e);
286
+ }
287
+ return {
288
+ weekLayouts: s,
289
+ eventRowMap: a,
290
+ gridEvents: i
291
+ };
292
+ }
293
+ function L(e, t, n) {
294
+ let r = Array(7).fill(0), i = Array.from({ length: 7 }, () => /* @__PURE__ */ new Set());
295
+ for (let a of e) {
296
+ let e = o(a.event);
297
+ if (t.has(e) || a.row >= n) for (let t = a.startCol; t < a.endCol; t++) i[t].has(e) || (i[t].add(e), r[t]++);
298
+ }
299
+ return r;
300
+ }
301
+ //#endregion
302
+ export { i as C, a as S, p as _, F as a, f as b, x as c, w as d, b as f, s as g, o as h, k as i, S as l, l as m, N as n, L as o, u as p, I as r, D as s, O as t, C as u, m as v, d as x, c as y };
@@ -0,0 +1,8 @@
1
+ import "../../../Icon/Icon-BQ3Whub2.js";
2
+ import "../../../Tooltip/Tooltip-RkD8fs0B.js";
3
+ import "../../context-DNOJ9LW_.js";
4
+ import "../../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
5
+ import "../../layout-DvWx_7gn.js";
6
+ import "../../EventCard-D_VeOVDQ.js";
7
+ import { t as e } from "../../AllDaySection-DS0Frx1p.js";
8
+ export { e as default };
@@ -0,0 +1,5 @@
1
+ import "../../../Tooltip/Tooltip-RkD8fs0B.js";
2
+ import "../../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
3
+ import "../../layout-DvWx_7gn.js";
4
+ import { t as e } from "../../CurrentTimeIndicator-DaIywtIA.js";
5
+ export { e as default };
@@ -0,0 +1,6 @@
1
+ import "../../../Tooltip/Tooltip-RkD8fs0B.js";
2
+ import "../../context-DNOJ9LW_.js";
3
+ import "../../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
4
+ import "../../layout-DvWx_7gn.js";
5
+ import { t as e } from "../../EventCard-D_VeOVDQ.js";
6
+ export { e as default };
@@ -0,0 +1,4 @@
1
+ import "../../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
2
+ import "../../layout-DvWx_7gn.js";
3
+ import { t as e } from "../../TimeAxis-gKb8dTwY.js";
4
+ export { e as default };
@@ -0,0 +1,4 @@
1
+ import "../../../Icon/Icon-BQ3Whub2.js";
2
+ import "../../../Tooltip/Tooltip-RkD8fs0B.js";
3
+ import { t as e } from "../../TimeGrid-D8Du5vFP.js";
4
+ export { e as default };
@@ -0,0 +1,2 @@
1
+ import { a as e, i as t, n, r, t as i } from "../style-hCRKx3m1.js";
2
+ export { i as CALENDAR_CURRENT_TIME_COLOR, t as resolveCalendarThemeVars, n as resolveDatePickerThemeFromCalendar, e as resolveScheduleColorVars, r as resolveSegmentedThemeFromCalendar };
@@ -0,0 +1,55 @@
1
+ import { t as e } from "../vendors/cssVars-C4BlzyxA.js";
2
+ import { n as t } from "./colorUtils-DcpqM3KR.js";
3
+ //#region src/components/Calendar/style/resolveScheduleColorVars.ts
4
+ var n = (e, t, n) => {
5
+ let r = {};
6
+ return e && (r["--calendar-schedule-border"] = e), t && (r["--calendar-schedule-bg"] = t), n && (r["--calendar-schedule-hover"] = n), r;
7
+ }, r = (e) => {
8
+ if (!e) return {};
9
+ let r = t(e);
10
+ return n(e, r.normal, r.hover);
11
+ }, i = {
12
+ center: {
13
+ backgroundPosition: "50%",
14
+ backgroundSize: "contain"
15
+ },
16
+ stretch: {
17
+ backgroundPosition: "50%",
18
+ backgroundSize: "cover"
19
+ },
20
+ masterDrawingCenter: {
21
+ backgroundPosition: "50%",
22
+ backgroundSize: "100% 100%"
23
+ }
24
+ }, a = (t) => {
25
+ let n = {};
26
+ if (e(n, "--calendar-background-color", t.colorBgContainer), t.panelBgImage) {
27
+ let e = i[t.panelBgImagePosition ?? "center"] ?? i.center;
28
+ n["--calendar-background-image"] = `url(${t.panelBgImage})`, n["--calendar-background-position"] = e.backgroundPosition, n["--calendar-background-size"] = e.backgroundSize, n["--calendar-background-repeat"] = "no-repeat";
29
+ }
30
+ return n;
31
+ }, o = (t, i) => {
32
+ let o = { ...r(i) };
33
+ return !t || typeof t != "object" ? o : (Object.assign(o, a(t)), e(o, "--calendar-title-color", t.colorText), e(o, "--calendar-over-title-color", t.colorTextTertiary), e(o, "--calendar-specifically-color", t.colorTextQuaternary ?? t.colorTextTertiary), e(o, "--calendar-header-background", t.colorFillSecondary), e(o, "--calendar-highlight-color", t.colorPrimary), e(o, "--calendar-highlight-text-color", t.colorPrimaryText), e(o, "--calendar-border-color", t.colorSplit), e(o, "--calendar-more-record-color", t.colorLink), (t.eventBorderColor || t.eventBg || t.eventBgHover) && Object.assign(o, n(t.eventBorderColor, t.eventBg, t.eventBgHover)), o);
34
+ }, s = (e) => e.colorText !== void 0 || e.colorPrimary !== void 0 || e.colorFillSecondary !== void 0, c = (e) => e.datePickerColorBgContainer !== void 0 || e.datePickerWeekRangeBg !== void 0 || e.colorPrimary !== void 0 || e.colorText !== void 0 || e.colorTextTertiary !== void 0 || e.colorTextQuaternary !== void 0, l = (e) => {
35
+ if (!(!e || !s(e))) return {
36
+ colorText: e.colorText,
37
+ itemSelectedBg: e.colorPrimary,
38
+ itemHoverBg: e.colorPrimary,
39
+ itemHoverBorder: e.colorPrimary,
40
+ trackBg: e.colorFillSecondary
41
+ };
42
+ }, u = (e) => {
43
+ if (!(!e || !c(e))) return {
44
+ colorBgContainer: e.datePickerColorBgContainer,
45
+ colorPrimary: e.colorPrimary,
46
+ headerColor: e.colorText,
47
+ headerHoverColor: e.colorPrimary,
48
+ colorText: e.colorText,
49
+ colorTextTertiary: e.colorTextTertiary ?? e.colorTextQuaternary,
50
+ cellSelectedBg: e.colorPrimary,
51
+ weekRangeBg: e.datePickerWeekRangeBg
52
+ };
53
+ }, d = "#ff5631";
54
+ //#endregion
55
+ export { r as a, o as i, u as n, l as r, d as t };
@@ -0,0 +1,114 @@
1
+ import { t as e } from "../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
2
+ import { C as t, S as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, x as S, y as C } from "../layout-DvWx_7gn.js";
3
+ import { n as w, t as T } from "../colorUtils-DcpqM3KR.js";
4
+ import E from "dayjs";
5
+ //#region src/components/Calendar/utils/dateUtils.ts
6
+ var D = (e, n) => t(e, n), O = (e) => String(e).padStart(2, "0"), k = (e, t) => {
7
+ let n = D(e, t), r = n.startOf("month").startOf("isoWeek"), i = n.endOf("month").endOf("isoWeek").diff(r, "day") + 1;
8
+ return {
9
+ gridStart: r,
10
+ weekCount: Math.ceil(i / 7)
11
+ };
12
+ }, A = (e, t) => t("fullDate", {
13
+ year: e.year(),
14
+ month: O(e.month() + 1),
15
+ day: O(e.date())
16
+ }), j = (e, t, n, r) => D(e, r).add(t, n).toDate(), M = (e, t) => D(e, t).startOf("isoWeek"), N = (e, t) => D(e, t).endOf("isoWeek").startOf("day"), P = (e, t, n) => {
17
+ let r = D(e, t);
18
+ return n("yearMonth", {
19
+ year: r.year(),
20
+ month: O(r.month() + 1)
21
+ });
22
+ }, F = (e, t, n) => A(D(e, t), n), I = (e, t, n) => {
23
+ let r = D(e, n);
24
+ return r.date() === 1 ? t("monthDay", {
25
+ month: r.month() + 1,
26
+ day: r.date()
27
+ }) : String(r.date());
28
+ }, L = (e, t, n, r) => {
29
+ let i = D(e, n), a = D(t, n);
30
+ return i.year() === a.year() ? i.month() === a.month() ? r("dayOnly", { day: i.date() }) : r("monthDay", {
31
+ month: i.month() + 1,
32
+ day: i.date()
33
+ }) : A(i, r);
34
+ }, R = (e, t, n) => j(e, t, "day", n), z = (e, t, n) => j(e, t, "week", n), B = (e, t, n) => j(e, t, "month", n), V = (e, t) => k(e, t).weekCount, H = (e, t) => {
35
+ let { gridStart: n, weekCount: r } = k(e, t);
36
+ return Array.from({ length: r * 7 }, (e, t) => n.add(t, "day"));
37
+ }, U = (e, t) => {
38
+ let { gridStart: n, weekCount: r } = k(e, t);
39
+ return {
40
+ start: n,
41
+ end: n.add(r * 7, "day")
42
+ };
43
+ }, W = (e, t) => {
44
+ let n = D(e, t);
45
+ return n.year() * 12 + n.month();
46
+ }, G = (e, t, n) => W(e, n) === W(t, n), K = (e, t, n) => {
47
+ if (t === "day") {
48
+ let t = D(e, n).startOf("day");
49
+ return {
50
+ start: t,
51
+ end: t.add(1, "day")
52
+ };
53
+ }
54
+ if (t === "week") {
55
+ let t = M(e, n);
56
+ return {
57
+ start: t,
58
+ end: t.add(7, "day")
59
+ };
60
+ }
61
+ return t === "month" ? U(e, n) : {
62
+ start: null,
63
+ end: null
64
+ };
65
+ };
66
+ //#endregion
67
+ //#region src/components/Calendar/utils/timeUtils.ts
68
+ e();
69
+ var q = {
70
+ short: {
71
+ interval: 60,
72
+ rowHeight: 60,
73
+ totalRows: 24
74
+ },
75
+ medium: {
76
+ interval: 30,
77
+ rowHeight: 104,
78
+ totalRows: 48
79
+ },
80
+ long: {
81
+ interval: 15,
82
+ rowHeight: 148,
83
+ totalRows: 96
84
+ }
85
+ }, J = (e) => q[e] || q.medium, Y = (e, t) => e / t.interval * t.rowHeight, X = (e) => e.totalRows * e.rowHeight, Z = (e, t) => {
86
+ let n = e * t.interval, r = Math.floor(n / 60), i = n % 60;
87
+ return `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
88
+ }, Q = (e) => e ? E().tz(e) : E(), $ = (e) => {
89
+ let t = e ? E().tz(e).utcOffset() : E().utcOffset(), n = t >= 0 ? "+" : "-", r = Math.abs(t), i = Math.floor(r / 60), a = r % 60;
90
+ return a === 0 ? `GMT${n}${i}` : `GMT${n}${i}:${String(a).padStart(2, "0")}`;
91
+ }, ee = (e, n) => {
92
+ let r = Q(n);
93
+ return t(e, n).isSame(r, "day");
94
+ }, te = (e, t) => {
95
+ let n = Q(t);
96
+ return Y(n.hour() * 60 + n.minute(), e);
97
+ }, ne = (e, n, i, a) => Array.from({ length: 7 }, (o, c) => {
98
+ let l = n.add(c, "day").startOf("day"), u = l.add(1, "day"), d = [];
99
+ for (let n of e) {
100
+ let e = t(n.startTime, a), i = t(n.endTime, a);
101
+ r(e, i, l, u) && d.push({
102
+ ...n,
103
+ startTime: e.isBefore(l) ? l : e,
104
+ endTime: i.isAfter(u) ? u : i
105
+ });
106
+ }
107
+ let { timedEvents: f } = s(d, i, {
108
+ allowStackLayout: !0,
109
+ timeZone: a
110
+ });
111
+ return f;
112
+ });
113
+ //#endregion
114
+ export { T as COLOR_SCHEME, y as MONTH_LAYOUT_CONSTANTS, q as ZOOM_CONFIG, R as addDays, B as addMonths, z as addWeeks, v as assignAllDayRows, o as assignColumns, m as assignGlobalRows, _ as assignMonthEventRows, g as calcAllDaySectionHeight, f as calculateExpansion, b as calculateHorizontalLayout, s as calculateLayout, d as calculateSegmentPosition, i as computeVisibility, h as computeWeekHiddenCounts, I as formatCalendarDayNumber, p as formatEventTime, F as formatFullDate, Z as formatTimeLabel, L as formatWeekEndDate, P as formatYearMonth, u as getCalendarEventId, W as getCalendarMonthKey, w as getColorScheme, Q as getCurrentTimeInTZ, te as getCurrentTimeTop, H as getDynamicMonthViewDates, U as getMonthViewRange, V as getMonthWeekCount, $ as getTimeZoneLabel, X as getTotalHeight, K as getVisibleRangeByMode, N as getWeekEnd, M as getWeekStart, J as getZoomConfig, c as groupIntoClusters, l as isAllDayEvent, G as isCurrentMonth, ee as isToday, ne as layoutTimedEventsForWeek, Y as minutesToPixels, n as normalizeData, r as overlapsHalfOpenInstant, x as overlapsRangeHalfOpen, t as parseCalendarTime, C as partitionCalendarEvents, a as toAbsolutePosition, S as toGridPosition };
@@ -0,0 +1,3 @@
1
+ import "../../../DatePicker/ensureDayjsPlugins-DZjJnZgo.js";
2
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../../layout-DvWx_7gn.js";
3
+ export { u as MONTH_LAYOUT_CONSTANTS, l as assignAllDayRows, t as assignColumns, o as assignGlobalRows, c as assignMonthEventRows, a as calculateExpansion, d as calculateHorizontalLayout, n as calculateLayout, i as calculateSegmentPosition, e as computeVisibility, s as computeWeekHiddenCounts, r as groupIntoClusters };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../Icon/Icon-CTZCSuVg.js";
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import { useCallback as r, useMemo as i, useState as a } from "react";
4
4
  import o from "clsx";
@@ -1,3 +1,3 @@
1
- import "../Icon/Icon-CTZCSuVg.js";
2
- import { t as e } from "./Card-D__c94yx.js";
1
+ import "../Icon/Icon-BQ3Whub2.js";
2
+ import { t as e } from "./Card-CRrtIjNT.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../Icon/Icon-CTZCSuVg.js";
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { uniqueId as t } from "lodash-es";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  import { createContext as i, forwardRef as a, useContext as o } from "react";
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "./CheckBox-DF201Nxg.js";
1
+ import { n as e, r as t, t as n } from "./CheckBox-CkVe5Boq.js";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
3
  import i from "clsx";
4
4
  import { useControllableValue as a } from "ahooks";
@@ -1,4 +1,4 @@
1
- import "../Icon/Icon-CTZCSuVg.js";
2
- import "./CheckBox-DF201Nxg.js";
3
- import { t as e } from "./CheckBox-B04hZKaC.js";
1
+ import "../Icon/Icon-BQ3Whub2.js";
2
+ import "./CheckBox-CkVe5Boq.js";
3
+ import { t as e } from "./CheckBox-DIunYcfS.js";
4
4
  export { e as default };