@voplus/morpho-workspace 11.2.4 → 11.2.7

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 (87) hide show
  1. package/es/modules/{calendar/CalendarRoutes.d.ts → calendar-board/CalendarBoardRoutes.d.ts} +2 -1
  2. package/es/modules/{calendar/CalendarRoutes.js → calendar-board/CalendarBoardRoutes.js} +10 -9
  3. package/es/modules/calendar-board/CalendarBoardRoutes.js.map +1 -0
  4. package/es/modules/calendar-board/components/CalendarActionProperties/index.d.ts +20 -0
  5. package/es/modules/calendar-board/components/CalendarActionProperties/index.js +36 -0
  6. package/es/modules/calendar-board/components/CalendarActionProperties/index.js.map +1 -0
  7. package/es/modules/calendar-board/components/CalendarBoardGrid/index.d.ts +45 -0
  8. package/es/modules/calendar-board/components/CalendarBoardGrid/index.js +89 -0
  9. package/es/modules/calendar-board/components/CalendarBoardGrid/index.js.map +1 -0
  10. package/es/modules/calendar-board/components/CalendarEventChip/index.d.ts +22 -0
  11. package/es/modules/calendar-board/components/CalendarEventChip/index.js +20 -0
  12. package/es/modules/calendar-board/components/CalendarEventChip/index.js.map +1 -0
  13. package/es/modules/calendar-board/components/CalendarLegend/index.d.ts +42 -0
  14. package/es/modules/calendar-board/components/CalendarLegend/index.js +94 -0
  15. package/es/modules/calendar-board/components/CalendarLegend/index.js.map +1 -0
  16. package/es/modules/calendar-board/components/CalendarMoreLink/index.d.ts +11 -0
  17. package/es/modules/calendar-board/components/CalendarMoreLink/index.js +12 -0
  18. package/es/modules/calendar-board/components/CalendarMoreLink/index.js.map +1 -0
  19. package/es/modules/calendar-board/components/CalendarSidebar/index.d.ts +34 -0
  20. package/es/modules/calendar-board/components/CalendarSidebar/index.js +47 -0
  21. package/es/modules/calendar-board/components/CalendarSidebar/index.js.map +1 -0
  22. package/es/modules/calendar-board/components/CalendarToolbar/index.d.ts +30 -0
  23. package/es/modules/calendar-board/components/CalendarToolbar/index.js +30 -0
  24. package/es/modules/calendar-board/components/CalendarToolbar/index.js.map +1 -0
  25. package/es/modules/calendar-board/components/CalendarUpcomingBar/index.d.ts +30 -0
  26. package/es/modules/calendar-board/components/CalendarUpcomingBar/index.js +35 -0
  27. package/es/modules/calendar-board/components/CalendarUpcomingBar/index.js.map +1 -0
  28. package/es/modules/calendar-board/components/CalendarUpcomingEntry/index.d.ts +25 -0
  29. package/es/modules/calendar-board/components/CalendarUpcomingEntry/index.js +35 -0
  30. package/es/modules/calendar-board/components/CalendarUpcomingEntry/index.js.map +1 -0
  31. package/es/modules/calendar-board/components/CalendarViewFilter/index.d.ts +19 -0
  32. package/es/modules/calendar-board/components/CalendarViewFilter/index.js +29 -0
  33. package/es/modules/calendar-board/components/CalendarViewFilter/index.js.map +1 -0
  34. package/es/modules/calendar-board/components/CalendarViewSwitcher/index.d.ts +14 -0
  35. package/es/modules/calendar-board/components/CalendarViewSwitcher/index.js +15 -0
  36. package/es/modules/calendar-board/components/CalendarViewSwitcher/index.js.map +1 -0
  37. package/es/modules/calendar-board/event-meta.d.ts +262 -0
  38. package/es/modules/calendar-board/event-meta.js +329 -0
  39. package/es/modules/calendar-board/event-meta.js.map +1 -0
  40. package/es/modules/calendar-board/layout.d.ts +27 -0
  41. package/es/modules/calendar-board/layout.js +20 -0
  42. package/es/modules/calendar-board/layout.js.map +1 -0
  43. package/es/modules/calendar-board/pages/CalendarBoard/index.css +262 -0
  44. package/es/modules/calendar-board/pages/CalendarBoard/index.d.ts +4 -0
  45. package/es/modules/calendar-board/pages/CalendarBoard/index.js +323 -0
  46. package/es/modules/calendar-board/pages/CalendarBoard/index.js.map +1 -0
  47. package/es/modules/calendar-board/pages/CalendarBoard/state.d.ts +112 -0
  48. package/es/modules/calendar-board/pages/CalendarBoard/state.js +206 -0
  49. package/es/modules/calendar-board/pages/CalendarBoard/state.js.map +1 -0
  50. package/es/modules/calendar-board/sidebar-data.d.ts +35 -0
  51. package/es/modules/calendar-board/sidebar-data.js +28 -0
  52. package/es/modules/calendar-board/sidebar-data.js.map +1 -0
  53. package/es/modules/meeting/components/MeetingItem/index.css +0 -7
  54. package/es/modules/meeting/components/MeetingItem/index.js +3 -1
  55. package/es/modules/meeting/components/MeetingItem/index.js.map +1 -1
  56. package/es/modules/meeting/components/NewMeetingForm/index.js +1 -1
  57. package/es/modules/meeting/components/NewMeetingForm/index.js.map +1 -1
  58. package/es/modules/notification-workspace/components/NotificationList/index.js +1 -1
  59. package/es/modules/notification-workspace/components/NotificationList/index.js.map +1 -1
  60. package/es/modules/notification-workspace/components/NotificationListHeader/index.js +2 -2
  61. package/es/modules/notification-workspace/components/NotificationListHeader/index.js.map +1 -1
  62. package/es/modules/project/ProjectDefaultView/index.js +2 -2
  63. package/es/modules/project/ProjectDefaultView/index.js.map +1 -1
  64. package/es/routes.js +2 -2
  65. package/es/routes.js.map +1 -1
  66. package/package.json +1 -1
  67. package/es/modules/calendar/CalendarRoutes.js.map +0 -1
  68. package/es/modules/calendar/components/ActionCard/index.d.ts +0 -7
  69. package/es/modules/calendar/components/ActionCard/index.js +0 -12
  70. package/es/modules/calendar/components/ActionCard/index.js.map +0 -1
  71. package/es/modules/calendar/components/CalendarEventContent/index.d.ts +0 -11
  72. package/es/modules/calendar/components/CalendarEventContent/index.js +0 -10
  73. package/es/modules/calendar/components/CalendarEventContent/index.js.map +0 -1
  74. package/es/modules/calendar/components/CalendarMenu/index.css +0 -30
  75. package/es/modules/calendar/components/CalendarMenu/index.d.ts +0 -7
  76. package/es/modules/calendar/components/CalendarMenu/index.js +0 -52
  77. package/es/modules/calendar/components/CalendarMenu/index.js.map +0 -1
  78. package/es/modules/calendar/pages/CalendarMonth/index.css +0 -248
  79. package/es/modules/calendar/pages/CalendarMonth/index.d.ts +0 -4
  80. package/es/modules/calendar/pages/CalendarMonth/index.js +0 -190
  81. package/es/modules/calendar/pages/CalendarMonth/index.js.map +0 -1
  82. package/es/modules/calendar/pages/CalendarMonth/state.d.ts +0 -11
  83. package/es/modules/calendar/pages/CalendarMonth/state.js +0 -58
  84. package/es/modules/calendar/pages/CalendarMonth/state.js.map +0 -1
  85. package/es/modules/my-document/SectionTemplate/documentGroups.test.d.ts +0 -1
  86. package/es/modules/my-document/SectionTemplate/documentGroups.test.js +0 -63
  87. package/es/modules/my-document/SectionTemplate/documentGroups.test.js.map +0 -1
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { FontAwesomeIcon as FAIcon, faAngleLeftRegular, faAngleRightRegular, } from "@voplus/morpho-ui/es/faIcons";
3
+ import { UTCDatePicker as DatePicker } from "@voplus/morpho-ui";
4
+ /**
5
+ * 顶部工具栏:TODAY / ← 日期 → / 右侧控件区。
6
+ *
7
+ * FullCalendar 自带工具栏已由 headerToolbar={false} 关闭,这里完全自绘。
8
+ * 日期标题上盖一个透明的 DatePicker,沿用 CalendarMonth 的做法
9
+ * (点标题即可跳到某月 / 某周 / 某天)。
10
+ *
11
+ * 控件区(OwnerType 过滤器、视图切换)由页面通过 children 装配:桌面把 MONTH·WEEK·DAY
12
+ * 一起放进来,小屏则把视图切换收进 Filter 浮层、只留过滤器 —— 工具栏自己不认识视图切换,
13
+ * 因此也不接 onChangeType。
14
+ *
15
+ * 高度用 min-h 而不是固定 90px:小屏上 TODAY / 导航 / 控件区会换行,固定高度会把
16
+ * 换行出来的那一行裁掉。
17
+ */
18
+ const CalendarToolbar = (props) => (React.createElement("div", { className: "flex items-center gap-4 px-6 min-h-[90px] shrink-0 flex-wrap" },
19
+ React.createElement("button", { className: "secondary-button h-[45px] px-5 tracking-wide", onClick: props.onToday }, "TODAY"),
20
+ React.createElement("div", { className: "flex-1 flex items-center justify-center gap-3" },
21
+ React.createElement("button", { className: "w-10 h-10 rounded-full border border-border flex items-center justify-center text-font-grey cursor-pointer hover:text-font-secondary hover:border-font-secondary", onClick: props.onPrev },
22
+ React.createElement(FAIcon, { icon: faAngleLeftRegular })),
23
+ React.createElement("div", { className: "relative px-2 text-xl font-bold text-font-primary" },
24
+ props.title,
25
+ React.createElement(DatePicker, { picker: props.type === "month" ? "month" : props.type === "week" ? "week" : "date", className: "calendar-board-picker", defaultValue: props.currentTime, placeholder: "", onChange: props.onChangeDate })),
26
+ React.createElement("button", { className: "w-10 h-10 rounded-full border border-border flex items-center justify-center text-font-grey cursor-pointer hover:text-font-secondary hover:border-font-secondary", onClick: props.onNext },
27
+ React.createElement(FAIcon, { icon: faAngleRightRegular }))),
28
+ props.children));
29
+ export default CalendarToolbar;
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar-board/components/CalendarToolbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,eAAe,IAAI,MAAM,EACzB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGhE;;;;;;;;;;;;;GAaG;AACH,MAAM,eAAe,GAAG,CAAC,KAYxB,EAAE,EAAE,CAAC,CACL,6BAAK,SAAS,EAAC,8DAA8D;IAC5E,gCAAQ,SAAS,EAAC,8CAA8C,EAAC,OAAO,EAAE,KAAK,CAAC,OAAO,YAE9E;IAET,6BAAK,SAAS,EAAC,+CAA+C;QAC7D,gCACC,SAAS,EAAC,kKAAkK,EAC5K,OAAO,EAAE,KAAK,CAAC,MAAM;YAErB,oBAAC,MAAM,IAAC,IAAI,EAAE,kBAAkB,GAAI,CAC5B;QACT,6BAAK,SAAS,EAAC,mDAAmD;YAChE,KAAK,CAAC,KAAK;YACZ,oBAAC,UAAU,IACV,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAClF,SAAS,EAAC,uBAAuB,EACjC,YAAY,EAAE,KAAK,CAAC,WAAW,EAC/B,WAAW,EAAC,EAAE,EACd,QAAQ,EAAE,KAAK,CAAC,YAAY,GAC3B,CACG;QACN,gCACC,SAAS,EAAC,kKAAkK,EAC5K,OAAO,EAAE,KAAK,CAAC,MAAM;YAErB,oBAAC,MAAM,IAAC,IAAI,EAAE,mBAAmB,GAAI,CAC7B,CACJ;IAEL,KAAK,CAAC,QAAQ,CACV,CACN,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { type IUpcomingEvent } from "../../event-meta";
3
+ /** 没有 upcoming 时的圆点:中性灰,不拿某个分类色冒充 */
4
+ export declare const UPCOMING_BAR_EMPTY_DOT_CLASS = "bg-bg-grey";
5
+ /** 没有 upcoming 时的占位文案(面板里那块会显示 antd Empty) */
6
+ export declare const UPCOMING_BAR_EMPTY_TEXT = "No upcoming events";
7
+ /**
8
+ * 小屏(< 1024px)固定在底部的 Upcoming 条:`UPCOMING [N] ● title time remaining >`。
9
+ *
10
+ * 小屏没有右侧栏,Upcoming 只能从这里进:
11
+ * - 分类圆点取第一条(最近一条)的分类色,与面板列表同源;
12
+ * - 数字取 `total`(今天及以后的**全部**条数)—— 面板列表最多 UPCOMING_LIMIT 条,
13
+ * 拿列表长度当总数会少报,所以由页面传全量计数进来;
14
+ * - 点击只负责「由用户决定展开」,展开成什么(页面里是 Modal)不归它管。
15
+ *
16
+ * 顶边用 `--shadow-card` 抬起来(与 .fc-more-popover 同一个主题 token):条压在日历网格
17
+ * 上面,而不是平贴一根分隔线。左右与下方的外溢由外层 .calendar-board 的 overflow-hidden 裁掉,
18
+ * 只剩向上那 10px 落在网格上,正好是想要的「浮在内容之上」。
19
+ *
20
+ * 用 <button> 而不是 <div onClick>:底部条是页面唯一进入 Upcoming 的入口,
21
+ * 要有键盘可达与语义。
22
+ */
23
+ declare const CalendarUpcomingBar: (props: {
24
+ /** 今天及以后的全部条数(不截断) */
25
+ total: number;
26
+ /** 第一条(最近一条)upcoming;没有数据时不传 */
27
+ first?: IUpcomingEvent;
28
+ onExpand: () => void;
29
+ }) => React.JSX.Element;
30
+ export default CalendarUpcomingBar;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ import classnames from "classnames";
3
+ import { FontAwesomeIcon as FAIcon, faAngleRightRegular } from "@voplus/morpho-ui/es/faIcons";
4
+ import { DOT_COLOR_CLASS } from "../../event-meta";
5
+ /** 没有 upcoming 时的圆点:中性灰,不拿某个分类色冒充 */
6
+ export const UPCOMING_BAR_EMPTY_DOT_CLASS = "bg-bg-grey";
7
+ /** 没有 upcoming 时的占位文案(面板里那块会显示 antd Empty) */
8
+ export const UPCOMING_BAR_EMPTY_TEXT = "No upcoming events";
9
+ /**
10
+ * 小屏(< 1024px)固定在底部的 Upcoming 条:`UPCOMING [N] ● title time remaining >`。
11
+ *
12
+ * 小屏没有右侧栏,Upcoming 只能从这里进:
13
+ * - 分类圆点取第一条(最近一条)的分类色,与面板列表同源;
14
+ * - 数字取 `total`(今天及以后的**全部**条数)—— 面板列表最多 UPCOMING_LIMIT 条,
15
+ * 拿列表长度当总数会少报,所以由页面传全量计数进来;
16
+ * - 点击只负责「由用户决定展开」,展开成什么(页面里是 Modal)不归它管。
17
+ *
18
+ * 顶边用 `--shadow-card` 抬起来(与 .fc-more-popover 同一个主题 token):条压在日历网格
19
+ * 上面,而不是平贴一根分隔线。左右与下方的外溢由外层 .calendar-board 的 overflow-hidden 裁掉,
20
+ * 只剩向上那 10px 落在网格上,正好是想要的「浮在内容之上」。
21
+ *
22
+ * 用 <button> 而不是 <div onClick>:底部条是页面唯一进入 Upcoming 的入口,
23
+ * 要有键盘可达与语义。
24
+ */
25
+ const CalendarUpcomingBar = (props) => (React.createElement("button", { type: "button", className: "calendar-upcoming-bar flex h-[52px] w-full shrink-0 cursor-pointer items-center gap-2 border-t border-border bg-bg-white px-6 text-left shadow-(--shadow-card)", onClick: props.onExpand },
26
+ React.createElement("span", { className: "field-label shrink-0" }, "UPCOMING"),
27
+ React.createElement("span", { className: "h-4.5 px-1.5 leading-4 rounded-full bg-font-secondary text-2xs text-white" }, props.total),
28
+ React.createElement("span", { className: "min-w-0 flex-1 flex items-center gap-1.5 truncate text-sm font-bold text-font-primary" },
29
+ React.createElement("span", { className: classnames("calendar-upcoming-dot inline-block h-1.5 w-1.5 rounded-full", props.first ? DOT_COLOR_CLASS[props.first.color] : UPCOMING_BAR_EMPTY_DOT_CLASS) }),
30
+ props.first?.title ?? UPCOMING_BAR_EMPTY_TEXT,
31
+ React.createElement("span", { className: "font-medium" }, props.first?.timeLabel),
32
+ React.createElement("span", { className: "text-font-secondary" }, props.first?.remainingLabel)),
33
+ React.createElement(FAIcon, { icon: faAngleRightRegular, className: "shrink-0 text-font-grey" })));
34
+ export default CalendarUpcomingBar;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar-board/components/CalendarUpcomingBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAuB,MAAM,kBAAkB,CAAC;AAExE,qCAAqC;AACrC,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CAAC;AAEzD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAE5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,mBAAmB,GAAG,CAAC,KAM5B,EAAE,EAAE,CAAC,CACL,gCACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,gKAAgK,EAC1K,OAAO,EAAE,KAAK,CAAC,QAAQ;IAEvB,8BAAM,SAAS,EAAC,sBAAsB,eAAgB;IAEtD,8BAAM,SAAS,EAAC,2EAA2E,IACzF,KAAK,CAAC,KAAK,CACN;IAEP,8BAAM,SAAS,EAAC,uFAAuF;QACtG,8BACC,SAAS,EAAE,UAAU,CACpB,6DAA6D,EAC7D,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAC/E,GACA;QACD,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,uBAAuB;QAC9C,8BAAM,SAAS,EAAC,aAAa,IAAE,KAAK,CAAC,KAAK,EAAE,SAAS,CAAQ;QAC7D,8BAAM,SAAS,EAAC,qBAAqB,IAAE,KAAK,CAAC,KAAK,EAAE,cAAc,CAAQ,CACpE;IAEP,oBAAC,MAAM,IAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,EAAC,yBAAyB,GAAG,CACjE,CACT,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { CalendarBoardSource, IUpcomingEvent } from "../../event-meta";
3
+ import type { CalendarSidebarTab } from "../../pages/CalendarBoard/state";
4
+ /**
5
+ * 小屏(< 1024px)进入 Upcoming 的唯一入口:底部固定条 + 展开后的 Modal。
6
+ *
7
+ * 两段的责任这么分:
8
+ * - 底部条只显示「UPCOMING + 圆点总数 + 首条 title + >」并报一次点击;
9
+ * - 展开由用户决定(点条才挂 Modal),Modal 里放整份 CalendarSidebar ——
10
+ * 与桌面右侧栏同一份组件、同一份 data(搜索 / 页签 / 列表都在),小屏只是换了个容器。
11
+ *
12
+ * 点条目时先收起 Modal 再交出 source:属性面板(aside)是另一个层,
13
+ * Modal 不收的话会一直盖在它前面。
14
+ */
15
+ declare const CalendarUpcomingEntry: (props: {
16
+ /** 今天及以后的全部条数(不截断) */
17
+ total: number;
18
+ upcoming: IUpcomingEvent[];
19
+ search: string;
20
+ tab: CalendarSidebarTab;
21
+ onSearch: (value: string) => void;
22
+ onChangeTab: (tab: CalendarSidebarTab) => void;
23
+ onSelectEvent: (source?: CalendarBoardSource) => void;
24
+ }) => React.JSX.Element;
25
+ export default CalendarUpcomingEntry;
@@ -0,0 +1,35 @@
1
+ import React, { useState } from "react";
2
+ import { Modal } from "antd";
3
+ import CalendarUpcomingBar from "../CalendarUpcomingBar";
4
+ import CalendarSidebar from "../CalendarSidebar";
5
+ import classnames from "classnames";
6
+ /** Modal 里侧栏要撑满宽度、去掉「贴在日历右边」才成立的左侧分隔线 */
7
+ const MODAL_SIDEBAR_CLASS = "w-full! border-l-0!";
8
+ /**
9
+ * 小屏(< 1024px)进入 Upcoming 的唯一入口:底部固定条 + 展开后的 Modal。
10
+ *
11
+ * 两段的责任这么分:
12
+ * - 底部条只显示「UPCOMING + 圆点总数 + 首条 title + >」并报一次点击;
13
+ * - 展开由用户决定(点条才挂 Modal),Modal 里放整份 CalendarSidebar ——
14
+ * 与桌面右侧栏同一份组件、同一份 data(搜索 / 页签 / 列表都在),小屏只是换了个容器。
15
+ *
16
+ * 点条目时先收起 Modal 再交出 source:属性面板(aside)是另一个层,
17
+ * Modal 不收的话会一直盖在它前面。
18
+ */
19
+ const CalendarUpcomingEntry = (props) => {
20
+ const [open, setOpen] = useState(false);
21
+ /** 条目点击:先收起 Modal,再把 source 原样交给页面(关闭不能把这次点击吞掉) */
22
+ const handleSelectEvent = (source) => {
23
+ setOpen(false);
24
+ props.onSelectEvent(source);
25
+ };
26
+ return (React.createElement(React.Fragment, null,
27
+ React.createElement(CalendarUpcomingBar, { total: props.total, first: props.upcoming[0], onExpand: () => setOpen(true) }),
28
+ React.createElement(Modal, { open: open, onCancel: () => setOpen(false), title: "AGENDA", footer: null, centered: true, width: 340,
29
+ /* 收起时把侧栏一起卸掉:否则 Modal 里的列表会一直留在 DOM 里 */
30
+ destroyOnHidden: true, className: classnames("[&_.ant-modal-body]:p-1!") },
31
+ React.createElement("div", { className: "flex h-[70vh] max-h-[520px]" },
32
+ React.createElement(CalendarSidebar, { className: MODAL_SIDEBAR_CLASS, upcoming: props.upcoming, search: props.search, tab: props.tab, onSearch: props.onSearch, onChangeTab: props.onChangeTab, onSelectEvent: handleSelectEvent })))));
33
+ };
34
+ export default CalendarUpcomingEntry;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar-board/components/CalendarUpcomingEntry/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,yCAAyC;AACzC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,qBAAqB,GAAG,CAAC,KAS9B,EAAE,EAAE;IACJ,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,mDAAmD;IACnD,MAAM,iBAAiB,GAAG,CAAC,MAA4B,EAAE,EAAE;QAC1D,OAAO,CAAC,KAAK,CAAC,CAAC;QACf,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CACN;QACC,oBAAC,mBAAmB,IACnB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,EACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAC5B;QAEF,oBAAC,KAAK,IACL,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC9B,KAAK,EAAC,QAAQ,EACd,MAAM,EAAE,IAAI,EACZ,QAAQ,QACR,KAAK,EAAE,GAAG;YACV,yCAAyC;YACzC,eAAe,QACf,SAAS,EAAE,UAAU,CAAC,0BAA0B,CAAC;YAGjD,6BAAK,SAAS,EAAC,6BAA6B;gBAC3C,oBAAC,eAAe,IACf,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,aAAa,EAAE,iBAAiB,GAC/B,CACG,CACC,CACN,CACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { type CalendarViewType } from "../../pages/CalendarBoard/state";
3
+ /**
4
+ * Filter 浮层里的 By View 一列(小屏专用)。
5
+ *
6
+ * 小屏把工具栏的 MONTH / WEEK / DAY 收进 Filter:data 沿用 view 的 VIEW_TYPE_OPTIONS,
7
+ * 样式与交互对齐同一浮层里的 By Events(同一个 Checkbox.Group、同一串类名、同一个
8
+ * `.field-label` 标题),所以两列看起来是同一套控件。
9
+ *
10
+ * 两处刻意的差异,都是「视图是单值」决定的:
11
+ * - 受控 `value=[type]`:任何时候只有一个勾选项;
12
+ * - 点一下即切视图,且不写 filter state —— 浮层底部的 Apply / Clear Filters 不会影响它
13
+ * (Clear 只重置 OwnerType 那类真正参与请求的过滤条件)。
14
+ */
15
+ declare const CalendarViewFilter: (props: {
16
+ type: CalendarViewType;
17
+ onChangeType: (type: CalendarViewType) => void;
18
+ }) => React.JSX.Element;
19
+ export default CalendarViewFilter;
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { Checkbox } from "antd";
3
+ import { VIEW_TYPE_OPTIONS } from "../../pages/CalendarBoard/state";
4
+ /**
5
+ * Filter 浮层里的 By View 一列(小屏专用)。
6
+ *
7
+ * 小屏把工具栏的 MONTH / WEEK / DAY 收进 Filter:data 沿用 view 的 VIEW_TYPE_OPTIONS,
8
+ * 样式与交互对齐同一浮层里的 By Events(同一个 Checkbox.Group、同一串类名、同一个
9
+ * `.field-label` 标题),所以两列看起来是同一套控件。
10
+ *
11
+ * 两处刻意的差异,都是「视图是单值」决定的:
12
+ * - 受控 `value=[type]`:任何时候只有一个勾选项;
13
+ * - 点一下即切视图,且不写 filter state —— 浮层底部的 Apply / Clear Filters 不会影响它
14
+ * (Clear 只重置 OwnerType 那类真正参与请求的过滤条件)。
15
+ */
16
+ const CalendarViewFilter = (props) => (React.createElement("div", null,
17
+ React.createElement("div", { className: "field-label mb-3.5" }, "By View"),
18
+ React.createElement(Checkbox.Group, { className: "flex-col gap-3 font-semibold [&_.ant-checkbox-label]:text-font-primary", value: [props.type], options: VIEW_TYPE_OPTIONS.map((option) => ({ label: option.name, value: option.value })), onChange: (values) => {
19
+ /*
20
+ * antd 给的是一次点击后的完整勾选集合,可能是 [旧值, 新值](勾选)或 [](取消)。
21
+ * 取「不是当前视图的那一项」=刚被勾上的那项;取消当前项时取不到,
22
+ * 直接忽略 —— 视图不能为空态。
23
+ */
24
+ const next = values.find((value) => value !== props.type);
25
+ if (next)
26
+ props.onChangeType(next);
27
+ } })));
28
+ export default CalendarViewFilter;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar-board/components/CalendarViewFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAyB,MAAM,iCAAiC,CAAC;AAE3F;;;;;;;;;;;GAWG;AACH,MAAM,kBAAkB,GAAG,CAAC,KAG3B,EAAE,EAAE,CAAC,CACL;IACC,6BAAK,SAAS,EAAC,oBAAoB,cAAc;IACjD,oBAAC,QAAQ,CAAC,KAAK,IACd,SAAS,EAAC,wEAAwE,EAClF,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EACnB,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,EACzF,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACpB;;;;eAIG;YACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1D,IAAI,IAAI;gBAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,GACA,CACG,CACN,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { type CalendarViewType } from "../../pages/CalendarBoard/state";
3
+ /**
4
+ * MONTH / WEEK / DAY 胶囊控件。
5
+ *
6
+ * 原先内联在 CalendarToolbar 里,抽出来是因为装配位置在小屏和桌面不同:
7
+ * 桌面放在工具栏(这一版),小屏收进 Filter 浮层(那时用 CalendarViewFilter 的复选框形态)。
8
+ * 视觉与交互逐字沿用原工具栏里的写法,本次改动不涉及它的样式。
9
+ */
10
+ declare const CalendarViewSwitcher: (props: {
11
+ type: CalendarViewType;
12
+ onChangeType: (type: CalendarViewType) => void;
13
+ }) => React.JSX.Element;
14
+ export default CalendarViewSwitcher;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import classnames from "classnames";
3
+ import { VIEW_TYPE_OPTIONS } from "../../pages/CalendarBoard/state";
4
+ /**
5
+ * MONTH / WEEK / DAY 胶囊控件。
6
+ *
7
+ * 原先内联在 CalendarToolbar 里,抽出来是因为装配位置在小屏和桌面不同:
8
+ * 桌面放在工具栏(这一版),小屏收进 Filter 浮层(那时用 CalendarViewFilter 的复选框形态)。
9
+ * 视觉与交互逐字沿用原工具栏里的写法,本次改动不涉及它的样式。
10
+ */
11
+ const CalendarViewSwitcher = (props) => (React.createElement("div", { className: "flex items-center bg-bg-grey rounded-base p-1 h-[50px] text-sm uppercase tracking-wide" }, VIEW_TYPE_OPTIONS.map((option) => (React.createElement("button", { key: option.value, className: classnames("px-6 h-[35px] flex items-center justify-center rounded-base cursor-pointer", option.value === props.type
12
+ ? "bg-bg-white text-font-secondary font-bold shadow-sm"
13
+ : "text-font-grey font-medium"), onClick: () => props.onChangeType(option.value) }, option.label)))));
14
+ export default CalendarViewSwitcher;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar-board/components/CalendarViewSwitcher/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAyB,MAAM,iCAAiC,CAAC;AAE3F;;;;;;GAMG;AACH,MAAM,oBAAoB,GAAG,CAAC,KAG7B,EAAE,EAAE,CAAC,CACL,6BAAK,SAAS,EAAC,wFAAwF,IACrG,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAClC,gCACC,GAAG,EAAE,MAAM,CAAC,KAAK,EACjB,SAAS,EAAE,UAAU,CACpB,4EAA4E,EAC5E,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI;QAC1B,CAAC,CAAC,qDAAqD;QACvD,CAAC,CAAC,4BAA4B,CAC/B,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,IAE9C,MAAM,CAAC,KAAK,CACL,CACT,CAAC,CACG,CACN,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,262 @@
1
+ import dayjs from "dayjs";
2
+ import type { ICalendar } from "../../data/calendar";
3
+ /** 日历事件来源(服务端返回的 source 字段,运行时还会被写入 title) */
4
+ export type CalendarBoardSource = {
5
+ id: string;
6
+ type: string;
7
+ /** 属性面板派发用不到(只按 type 派发),不保证下发,见 toPropertiesTarget */
8
+ nodeType?: string;
9
+ title?: string;
10
+ };
11
+ /**
12
+ * 日历事件:字段与 src/data/calendar 的 ICalendar 兼容。
13
+ *
14
+ * 对 ICalendar 做了两处收窄 / 补充:
15
+ * - `source` 用更完整的 CalendarBoardSource(运行时还会带 nodeType / title,ICalendar 只声明了 id 与 type),
16
+ * nodeType 见 toPropertiesTarget:属性面板派发用不到它;
17
+ * - 补上 FullCalendar 运行时字段:`start` / `end` 是 FullCalendar 读取的字段,服务端实际会返回;
18
+ * `extendedProps.source` 是 FullCalendar 把非标准字段(source)收拢后的位置,
19
+ * 现有 CalendarMonth 就是通过 `info.event.extendedProps.source` 拿到事件的。
20
+ */
21
+ export type CalendarBoardEvent = Omit<ICalendar, "source"> & {
22
+ source?: CalendarBoardSource;
23
+ start?: string | Date;
24
+ end?: string | Date;
25
+ extendedProps?: {
26
+ source?: CalendarBoardSource;
27
+ };
28
+ };
29
+ /**
30
+ * 分类色板:沿用 calendar-recreation.html 的事件卡原色(蓝 / 红 / 绿 / 橙)。
31
+ *
32
+ * 顺序即取色顺序,见 buildColorMap —— 同一 source.type 永远落在同一颜色上,
33
+ * 与现有 CalendarMonth 用 generateLightColorFromHash(source.type) 的意图一致。
34
+ */
35
+ export declare const CATEGORY_COLORS: readonly ["blue", "red", "green", "orange"];
36
+ /**
37
+ * 「其他」分类统一用的中性色。
38
+ *
39
+ * 指固定 3 项(Task / Case / Work)之外的一切分类,含没有 source.type 的 Other:
40
+ * 它们在整页只有这一种颜色 —— 图例的 Others 圆点、网格里的事件卡、侧栏 UPCOMING 的
41
+ * 圆点都取它(见 resolveEventColor),所以「不属于固定分类」这件事一眼可辨。
42
+ *
43
+ * 刻意不进 CATEGORY_COLORS:它不是分类色、不参与轮转 —— 掺进去会让现有分类的配色整体挪位。
44
+ */
45
+ export declare const NEUTRAL_COLOR: "grey";
46
+ export type CategoryColor = (typeof CATEGORY_COLORS)[number] | typeof NEUTRAL_COLOR;
47
+ /**
48
+ * 事件卡配色:逐字取自 HTML 的 `border border-{c}-400 bg-{c}-50 text-{c}-600`。
49
+ *
50
+ * grey 是后加的「其他」专用色,不在设计稿的四个分类色里,按同一公式取灰阶
51
+ * (400 描边 + 50 浅底)。
52
+ */
53
+ export declare const CHIP_COLOR_CLASS: Record<CategoryColor, string>;
54
+ /** 事件卡内的时间行配色,取自 calendar-day-view.html 的 `text-amber-600` / `text-red-500` */
55
+ export declare const CHIP_TIME_CLASS: Record<CategoryColor, string>;
56
+ /**
57
+ * 图例 / 侧栏分类列表的圆点配色,取自 HTML 的 `bg-blue-600 / bg-red-500 / ...`。
58
+ *
59
+ * grey 与卡片同理,是同灰阶里更深的那一档(对应分类色的 500 / 600)。
60
+ */
61
+ export declare const DOT_COLOR_CLASS: Record<CategoryColor, string>;
62
+ /**
63
+ * 事件卡外壳:HTML 的 `text-[10px] font-bold uppercase rounded-md px-2 py-0.5 border-l-4 truncate`。
64
+ *
65
+ * 用 overflow-hidden 而不是 truncate:日视图的卡片里还有第二行时间文案,
66
+ * 文字截断交给内层每一行的 truncate。
67
+ */
68
+ export declare const CHIP_BASE_CLASS = "border border-l-4 text-2xs text-font-primary font-bold uppercase rounded-base px-2 py-0.5 cursor-pointer overflow-hidden";
69
+ /** 没有 source.type 时归入的分类名 */
70
+ export declare const DEFAULT_CATEGORY_TYPE = "Other";
71
+ /** 事件的分类名(source.type) */
72
+ export declare const getEventType: (event: CalendarBoardEvent) => string;
73
+ /**
74
+ * 事件的起始时间。
75
+ *
76
+ * ICalendar 声明的是 startDate,FullCalendar 读的是 start,两者都被兼容;
77
+ * 都缺失时退回 dueDate,仍缺失则返回 undefined(该事件不参与侧栏推导)。
78
+ */
79
+ export declare const getEventStart: (event: CalendarBoardEvent) => Date | undefined;
80
+ /** 事件标题:优先 FullCalendar 解析出的 title,退回 source.title */
81
+ export declare const getEventTitle: (event: CalendarBoardEvent) => string;
82
+ /**
83
+ * 事件 source → <NodePropertiesView> 需要的 node。
84
+ *
85
+ * 两处形状差异,收在这里而不是散在页面里:
86
+ * - `nodeType`:NodePropertiesView 的 props 把它声明成必填,但派发其实只看 type
87
+ * (DocumentMetaStore.getPropertiesView = getMeta(document.type)),
88
+ * source 拿不到时补空串即可;
89
+ * - `title`:node 不需要,顺手剥掉,避免带进组件。
90
+ */
91
+ export declare const toPropertiesTarget: (source: CalendarBoardSource) => {
92
+ id: string;
93
+ type: string;
94
+ nodeType: string;
95
+ };
96
+ /**
97
+ * Action 事件的 source.type。
98
+ *
99
+ * Action 不是文档节点:它的 meta 注册在另一个 store(morpho-collaboration-action 的
100
+ * ActionMetaStore),DocumentMetaStore 里没有 "Action"(只有 Board / WorkScheduleNode /
101
+ * Meeting / MeetingsFolder / Work / Task / WorkType)。所以 Type 为 Action 的事件不能走
102
+ * <NodePropertiesView>,要另走 action 自己的加载器,见 CalendarActionProperties。
103
+ */
104
+ export declare const ACTION_SOURCE_TYPE = "Action";
105
+ /**
106
+ * 事件 source 是不是 Action —— 决定点开后打开哪一个属性视图。
107
+ *
108
+ * 判定只看 type:`nodeType` 运行时不一定下发(见 CalendarBoardSource.nodeType)。
109
+ */
110
+ export declare const isActionSource: (source?: CalendarBoardSource) => boolean;
111
+ /**
112
+ * 按 source.type 去重排序后依次取色。
113
+ *
114
+ * 排序保证映射只取决于「出现了哪些 type」,与事件顺序无关,
115
+ * 因此事件卡、图例、侧栏分类三处拿到的颜色必然一致。
116
+ */
117
+ export declare const buildColorMap: (types: Iterable<string>) => Map<string, CategoryColor>;
118
+ export interface ICategorySummary {
119
+ /** source.type */
120
+ type: string;
121
+ color: CategoryColor;
122
+ count: number;
123
+ /**
124
+ * 该分类下的事件,供图例 hover 时列出。
125
+ *
126
+ * 与 count 同源(都基于传入的全量事件),所以「图例上的数字」和「浮层里的条数」
127
+ * 永远一致;按开始时间升序,方便直接渲染。
128
+ */
129
+ events: CalendarBoardEvent[];
130
+ }
131
+ export interface IEventSummary {
132
+ colorMap: Map<string, CategoryColor>;
133
+ categories: ICategorySummary[];
134
+ }
135
+ /** 一次算出 type → 颜色映射与分类明细(计数 + 成员),供事件卡、图例、侧栏共用 */
136
+ export declare const summarizeEvents: (events: CalendarBoardEvent[]) => IEventSummary;
137
+ /**
138
+ * 图例固定展示的三个分类。
139
+ *
140
+ * 数组顺序即图例顺序,与事件多少无关:这四项是「位置」而不是「榜单」,
141
+ * 因此某一项当期没有事件时也占位(计数 0),图例不会随数据跳动。
142
+ * 匹配的是 source.type 原文(大小写敏感)。
143
+ */
144
+ export declare const LEGEND_FIXED_TYPES: readonly ["Task", "Case", "Work"];
145
+ /** 固定项之外的事件全部折叠进这一项 */
146
+ export declare const OTHERS_CATEGORY_TYPE = "Others";
147
+ /**
148
+ * Others 的圆点颜色 = 中性色。
149
+ *
150
+ * 与网格里「其他」事件卡同一个来源(NEUTRAL_COLOR 的三张表),
151
+ * 所以图例圆点、事件卡、侧栏圆点在「不属于固定分类」这件事上是一致的。
152
+ */
153
+ export declare const OTHERS_DOT_CLASS: string;
154
+ /**
155
+ * 图例的一项。
156
+ *
157
+ * 只带圆点的类名而不是 CategoryColor:Others 没有分类色可给,
158
+ * 取色在 buildLegendCategories 里一次做实,组件照着渲染即可。
159
+ */
160
+ export interface ILegendCategory {
161
+ type: string;
162
+ count: number;
163
+ events: CalendarBoardEvent[];
164
+ dotClass: string;
165
+ }
166
+ /**
167
+ * 把分类明细折叠成图例要渲染的项:固定 3 项(Task / Case / Work)+ Others。
168
+ *
169
+ * 折叠只发生在**展示层**:`summarizeEvents` 的 colorMap 仍按全量分类计算,
170
+ * 所以固定项的取色与事件卡一致 —— 有事件时沿用它的原色(三处同色)。
171
+ *
172
+ * 0 计数的固定项没有原色可用,按固定下标取兜底色(Task → blue、Case → red、
173
+ * Work → green),否则三项会一起退回首色、挤成一个颜色。
174
+ *
175
+ * Others 只在真有其他分类时出现(否则就是一个恒为 0 的多余项);它的条目是
176
+ * 其余分类的事件合并后按开始时间升序 —— 与单个分类浮层同一口径,不按原分类分块。
177
+ */
178
+ export declare const buildLegendCategories: (categories: ICategorySummary[]) => ILegendCategory[];
179
+ /**
180
+ * 整页事件的取色入口:固定分类(Task / Case / Work)用分类原色,其余一切用中性色。
181
+ *
182
+ * 网格里的事件卡、侧栏 UPCOMING 的圆点、小屏底部条的圆点都走这里,于是
183
+ * 「不在固定分类里」在整页是同一个灰 —— 否则同一条事件会出现「网格里是灰卡、
184
+ * 侧栏里还是蓝点」这种自相矛盾的呈现。
185
+ *
186
+ * 注意与 resolveColor 的区别:那个是纯「分类色轮转」,这里才是事件的最终颜色。
187
+ */
188
+ export declare const resolveEventColor: (colorMap: Map<string, CategoryColor>, type: string) => CategoryColor;
189
+ /** 取某个分类色(按 type 轮转);映射缺失时退回色板首色。整页取色请走 resolveEventColor */
190
+ export declare const resolveColor: (colorMap: Map<string, CategoryColor>, type: string) => CategoryColor;
191
+ /**
192
+ * 本地过滤:搜索关键字 + 被隐藏的分类。
193
+ *
194
+ * 纯前端过滤,不触发重新请求;日历与侧栏 UPCOMING 列表共用同一份结果。
195
+ */
196
+ export declare const filterEvents: (events: CalendarBoardEvent[], options?: {
197
+ search?: string;
198
+ hiddenTypes?: Iterable<string>;
199
+ }) => CalendarBoardEvent[];
200
+ export interface IUpcomingEvent {
201
+ id: string;
202
+ title: string;
203
+ type: string;
204
+ color: CategoryColor;
205
+ /** 形如 `Aug 20 | 4PM`;全天事件只有日期 */
206
+ timeLabel: string;
207
+ /** 剩余天数,形如 `10D` */
208
+ remainingLabel: string;
209
+ source?: CalendarBoardSource;
210
+ }
211
+ /** 侧栏 UPCOMING DEADLINES 的默认条数,与 HTML 稿一致 */
212
+ export declare const UPCOMING_LIMIT = 5;
213
+ /** 相对今天还有几天(今天为 0D) */
214
+ export declare const formatRemaining: (start: Date, from: dayjs.Dayjs) => string;
215
+ /**
216
+ * UPCOMING DEADLINES:今天及以后的事件,按起始时间升序取前 N 条。
217
+ *
218
+ * @param from 以哪一天为「今天」,默认取当前时间;测试注入固定日期用。
219
+ */
220
+ export declare const buildUpcoming: (events: CalendarBoardEvent[], summary: IEventSummary, options?: {
221
+ from?: dayjs.Dayjs;
222
+ limit?: number;
223
+ }) => IUpcomingEvent[];
224
+ /**
225
+ * 写回服务端时的时间格式:**本地时间**,不带时区后缀。
226
+ *
227
+ * 与仓库里其它写时间属性的地方保持一致(见 MeetingHeader 的 StartTime/EndTime)。
228
+ * 注意不要用 toISOString():它产出 UTC 时刻,UTC+8 下把事件拖到某天零点时,
229
+ * 日期部分会退回前一天,服务端按本地时间解析就落到错误的日期上。
230
+ */
231
+ export declare const DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm:ss.SSS";
232
+ /** 拖拽落点 → 服务端要写的时间字段 */
233
+ export type DropPayload = {
234
+ Start: string;
235
+ End?: string;
236
+ };
237
+ /**
238
+ * 把 FullCalendar 给出的落点转成服务端载荷。
239
+ *
240
+ * @returns 起止时间都拿不到(或非法)时返回 undefined,调用方应当放弃这次拖拽
241
+ */
242
+ export declare const buildDropPayload: (options: {
243
+ start?: Date | string | null;
244
+ end?: Date | string | null;
245
+ }) => DropPayload | undefined;
246
+ /** 按事件 id 在列表里找对应的那条(id 比较规则见 isSameEvent) */
247
+ export declare const findEventById: (events: CalendarBoardEvent[], id?: string) => CalendarBoardEvent | undefined;
248
+ /**
249
+ * 把拖拽结果写回页面自己的事件列表。
250
+ *
251
+ * 必须做这一步:`state.listOptions` 只在挂载时加载一次,而事件数据会交给 FullCalendar
252
+ * 当 eventSources —— 列表里还是旧位置的话,任何一次事件源重置都会把刚拖出去的事件打回原位。
253
+ *
254
+ * ⚠️ 没命中任何一条时必须**原样返回同一个数组**:`.map()` 那种写法即使什么都没改也会造出
255
+ * 新引用,而新引用本身就会触发 FullCalendar 重置事件源,反而把拖拽结果覆盖掉。
256
+ */
257
+ export declare const applyDropToEvents: (events: CalendarBoardEvent[], id: string, drop: {
258
+ start?: Date | string | null;
259
+ end?: Date | string | null;
260
+ }) => CalendarBoardEvent[];
261
+ /** 图例浮层里的日期文案,设计稿是 `Aug 3`;拿不到时间时返回空串 */
262
+ export declare const formatEventDate: (event: CalendarBoardEvent) => string;