@baishuyun/ui-mobile 0.9.1 → 0.10.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.
- package/dist/AMap/{AMap-B1GiEoPE.js → AMap-BkfhkrnK.js} +106 -106
- package/dist/AMap/index.js +4 -4
- package/dist/ActionSheet/{ActionSheet-DVck9uyS.js → ActionSheet-DJyeduZq.js} +7 -7
- package/dist/ActionSheet/index.js +6 -6
- package/dist/Calendar/{Calendar-B1TwDL1q.js → Calendar-Cf81JVOC.js} +353 -356
- package/dist/Calendar/index.js +5 -4
- package/dist/Calendar/{cssVars-DNOooryc.js → timeUtils-t4A3-Hr6.js} +1 -3
- package/dist/ConfigProvider/{ConfigProvider-xyGx046s.js → ConfigProvider-CNWefxiV.js} +14 -2
- package/dist/ConfigProvider/index.js +4 -4
- package/dist/ConfigProvider/{useLocale-Bf81I-9U.js → useLocale-DiKogqPs.js} +6 -0
- package/dist/Editor/Editor-CfA-ye-u.js +2774 -0
- package/dist/Editor/index.js +8 -8
- package/dist/Gantt/{Gantt-CbHw9RMw.js → Gantt-Bhvbj3l8.js} +220 -219
- package/dist/Gantt/index.js +8 -8
- package/dist/Icon/Icon-BKlmJSoE.js +23 -0
- package/dist/Icon/index.js +2 -2
- package/dist/Overlay/index.js +2 -2
- package/dist/Popup/{Popup-BIIDAUmB.js → Popup-Cg3t422z.js} +2 -2
- package/dist/Popup/index.js +4 -4
- package/dist/Segmented/Segmented-CxQ3Pd05.js +85 -0
- package/dist/Segmented/index.js +3 -0
- package/dist/components/Editor/{EditorHtml.d.ts → EditorHtmlPreview.d.ts} +1 -1
- package/dist/components/Editor/color/EditorColorPicker.d.ts +11 -0
- package/dist/components/Editor/color/colorUtils.d.ts +32 -0
- package/dist/components/Editor/constants/codeLanguages.d.ts +6 -0
- package/dist/components/Editor/hooks/useEditorAiSession.d.ts +20 -0
- package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
- package/dist/components/Editor/hooks/useEditorImageUpload.d.ts +17 -0
- package/dist/components/Editor/hooks/useEditorLink.d.ts +15 -0
- package/dist/components/Editor/hooks/useEditorValueBridge.d.ts +10 -0
- package/dist/components/Editor/htmlConfig.d.ts +2 -0
- package/dist/components/Editor/index.d.ts +1 -1
- package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
- package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +2 -0
- package/dist/components/Editor/plugins/EnterKeyPlugin.d.ts +1 -0
- package/dist/components/Editor/plugins/TablePlugin.d.ts +2 -0
- package/dist/components/Editor/popups/AiResultPopup.d.ts +13 -0
- package/dist/components/Editor/popups/ImageUrlPopup.d.ts +7 -0
- package/dist/components/Editor/popups/LinkPopup.d.ts +13 -0
- package/dist/components/Editor/popups/OptionSheets.d.ts +23 -0
- package/dist/components/Editor/popups/index.d.ts +4 -0
- package/dist/components/Editor/popups/shared.d.ts +11 -0
- package/dist/components/Editor/toolbar/Toolbar.d.ts +7 -1
- package/dist/components/Editor/toolbar/useTextFormats.d.ts +2 -15
- package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
- package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +4 -0
- package/dist/components/Editor/utils/readTextFormats.d.ts +21 -0
- package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
- package/dist/components/Segmented/Segmented.d.ts +7 -0
- package/dist/components/Segmented/index.d.ts +2 -0
- package/dist/components/Segmented/interface.d.ts +42 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/index.js +14 -13
- package/dist/locale/lang/en-US.json.d.ts +6 -0
- package/dist/locale/lang/zh-CN.json.d.ts +6 -0
- package/dist/locale/lang/zh-TW.json.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/vendors/cssVars-BbL_cmFM.js +6 -0
- package/dist/vendors/{version-CegBK2kS.js → version-C0got4sp.js} +1 -1
- package/package.json +7 -1
- package/dist/Editor/Editor-COxP3RpF.js +0 -2059
- package/dist/Icon/Icon-D3xi1oyo.js +0 -23
- package/dist/components/Editor/sheets.d.ts +0 -43
- /package/dist/Overlay/{Overlay-CqQWOqO4.js → Overlay-DFiZYsBs.js} +0 -0
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { t as e } from "../ConfigProvider/useLocale-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
b(i).isSame(e, "day") || a(e.toDate());
|
|
1
|
+
import { t as e } from "../ConfigProvider/useLocale-DiKogqPs.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./timeUtils-t4A3-Hr6.js";
|
|
3
|
+
import { t as i } from "../vendors/cssVars-BbL_cmFM.js";
|
|
4
|
+
import { t as a } from "../Segmented/Segmented-CxQ3Pd05.js";
|
|
5
|
+
import o, { createContext as s, forwardRef as c, useCallback as l, useContext as u, useEffect as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
6
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
+
import { useControllableValue as v, useLatest as y, useSize as b } from "ahooks";
|
|
8
|
+
import x from "dayjs";
|
|
9
|
+
//#region src/components/Calendar/context/CalendarContext.tsx
|
|
10
|
+
var S = s(null), C = ({ children: n, currentDate: i, setCurrentDate: a, viewMode: o, setViewMode: s, timeZone: c, events: u, onEventClick: d, onDayClick: f }) => {
|
|
11
|
+
let { t: m } = e(), h = p(() => t(c), [c]), _ = l(() => {
|
|
12
|
+
let e = r(c);
|
|
13
|
+
x(i).isSame(e, "day") || a(e.toDate());
|
|
15
14
|
}, [
|
|
16
15
|
i,
|
|
17
16
|
a,
|
|
18
|
-
|
|
19
|
-
]), v =
|
|
17
|
+
c
|
|
18
|
+
]), v = p(() => m("calendar.yearMonth", {
|
|
20
19
|
year: i.getFullYear(),
|
|
21
20
|
monthShort: m(`calendar.monthShort.${i.getMonth() + 1}`)
|
|
22
|
-
}), [i, m]), y =
|
|
21
|
+
}), [i, m]), y = p(() => ({
|
|
23
22
|
currentDate: i,
|
|
24
23
|
setCurrentDate: a,
|
|
25
24
|
goToToday: _,
|
|
26
25
|
viewMode: o,
|
|
27
26
|
setViewMode: s,
|
|
28
27
|
yearMonthText: v,
|
|
29
|
-
timeZone:
|
|
30
|
-
timezoneLabel:
|
|
28
|
+
timeZone: c,
|
|
29
|
+
timezoneLabel: h,
|
|
31
30
|
events: u,
|
|
32
31
|
onEventClick: d,
|
|
33
|
-
onDayClick:
|
|
32
|
+
onDayClick: f
|
|
34
33
|
}), [
|
|
35
34
|
i,
|
|
36
35
|
a,
|
|
@@ -38,29 +37,27 @@ var x = {
|
|
|
38
37
|
o,
|
|
39
38
|
s,
|
|
40
39
|
v,
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
c,
|
|
41
|
+
h,
|
|
43
42
|
u,
|
|
44
43
|
d,
|
|
45
|
-
|
|
44
|
+
f
|
|
46
45
|
]);
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ g(S.Provider, {
|
|
48
47
|
value: y,
|
|
49
|
-
children:
|
|
48
|
+
children: n
|
|
50
49
|
});
|
|
51
50
|
}, w = () => {
|
|
52
|
-
let e =
|
|
51
|
+
let e = u(S);
|
|
53
52
|
if (!e) throw Error("useCalendarContext must be used within a CalendarProvider");
|
|
54
53
|
return e;
|
|
55
|
-
}, T =
|
|
56
|
-
"bsy-mobile-calendar-header": "_bsy-mobile-calendar-
|
|
57
|
-
"bsy-mobile-calendar-header__left": "_bsy-mobile-calendar-
|
|
58
|
-
"bsy-mobile-calendar-header__year-month": "_bsy-mobile-calendar-header__year-
|
|
59
|
-
"bsy-mobile-calendar-header__today": "_bsy-mobile-calendar-
|
|
60
|
-
"bsy-mobile-calendar-
|
|
61
|
-
|
|
62
|
-
"bsy-mobile-calendar-segmented__item--active": "_bsy-mobile-calendar-segmented__item--active_arzu9_50"
|
|
63
|
-
}, D = [
|
|
54
|
+
}, T = {
|
|
55
|
+
"bsy-mobile-calendar-header": "_bsy-mobile-calendar-header_f5f2q_1",
|
|
56
|
+
"bsy-mobile-calendar-header__left": "_bsy-mobile-calendar-header__left_f5f2q_12",
|
|
57
|
+
"bsy-mobile-calendar-header__year-month": "_bsy-mobile-calendar-header__year-month_f5f2q_18",
|
|
58
|
+
"bsy-mobile-calendar-header__today": "_bsy-mobile-calendar-header__today_f5f2q_23",
|
|
59
|
+
"bsy-mobile-calendar-header__segmented": "_bsy-mobile-calendar-header__segmented_f5f2q_32"
|
|
60
|
+
}, E = [
|
|
64
61
|
{
|
|
65
62
|
key: "calendar.viewDay",
|
|
66
63
|
value: "day"
|
|
@@ -73,40 +70,37 @@ var x = {
|
|
|
73
70
|
key: "calendar.viewMonth",
|
|
74
71
|
value: "month"
|
|
75
72
|
}
|
|
76
|
-
],
|
|
77
|
-
let { yearMonthText: t, goToToday: n, viewMode: r, setViewMode: i } = w(), { t:
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
className:
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
-
className:
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
className:
|
|
73
|
+
], D = () => {
|
|
74
|
+
let { yearMonthText: t, goToToday: n, viewMode: r, setViewMode: i } = w(), { t: o } = e();
|
|
75
|
+
return /* @__PURE__ */ _("div", {
|
|
76
|
+
className: T["bsy-mobile-calendar-header"],
|
|
77
|
+
children: [/* @__PURE__ */ _("div", {
|
|
78
|
+
className: T["bsy-mobile-calendar-header__left"],
|
|
79
|
+
children: [/* @__PURE__ */ g("span", {
|
|
80
|
+
className: T["bsy-mobile-calendar-header__year-month"],
|
|
84
81
|
children: t
|
|
85
|
-
}), /* @__PURE__ */
|
|
86
|
-
className:
|
|
82
|
+
}), /* @__PURE__ */ g("button", {
|
|
83
|
+
className: T["bsy-mobile-calendar-header__today"],
|
|
87
84
|
onClick: n,
|
|
88
85
|
type: "button",
|
|
89
|
-
children:
|
|
86
|
+
children: o("calendar.today")
|
|
90
87
|
})]
|
|
91
|
-
}), /* @__PURE__ */
|
|
92
|
-
className:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
onClick: () => i(e.value),
|
|
100
|
-
children: a(e.key)
|
|
101
|
-
}, e.value))
|
|
88
|
+
}), /* @__PURE__ */ g(a, {
|
|
89
|
+
className: T["bsy-mobile-calendar-header__segmented"],
|
|
90
|
+
options: E.map((e) => ({
|
|
91
|
+
label: o(e.key),
|
|
92
|
+
value: e.value
|
|
93
|
+
})),
|
|
94
|
+
value: r,
|
|
95
|
+
onChange: i
|
|
102
96
|
})]
|
|
103
97
|
});
|
|
104
|
-
},
|
|
98
|
+
}, O = "0.4s", k = "cubic-bezier(0.25, 0.8, 0.25, 1)", A = 26, j = {
|
|
105
99
|
HEADER_HEIGHT: 24,
|
|
106
100
|
SLOT_HEIGHT: 22,
|
|
107
101
|
SLOT_GAP: 4,
|
|
108
102
|
WEEK_PADDING_X: 10
|
|
109
|
-
},
|
|
103
|
+
}, M = [
|
|
110
104
|
1,
|
|
111
105
|
2,
|
|
112
106
|
3,
|
|
@@ -114,7 +108,7 @@ var x = {
|
|
|
114
108
|
5,
|
|
115
109
|
6,
|
|
116
110
|
7
|
|
117
|
-
],
|
|
111
|
+
], N = {
|
|
118
112
|
"bsy-mobile-calendar-month": "_bsy-mobile-calendar-month_1t8o8_1",
|
|
119
113
|
"bsy-mobile-calendar-weekday-header": "_bsy-mobile-calendar-weekday-header_1t8o8_7",
|
|
120
114
|
"bsy-mobile-calendar-weekday-header__item": "_bsy-mobile-calendar-weekday-header__item_1t8o8_13",
|
|
@@ -133,27 +127,27 @@ var x = {
|
|
|
133
127
|
"bsy-mobile-calendar-week-events__segment": "_bsy-mobile-calendar-week-events__segment_1t8o8_113"
|
|
134
128
|
}, ee = () => {
|
|
135
129
|
let { t } = e();
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
139
|
-
className:
|
|
130
|
+
return /* @__PURE__ */ g("div", {
|
|
131
|
+
className: N["bsy-mobile-calendar-weekday-header"],
|
|
132
|
+
children: M.map((e) => /* @__PURE__ */ g("div", {
|
|
133
|
+
className: N["bsy-mobile-calendar-weekday-header__item"],
|
|
140
134
|
children: t(`calendar.weekday.${e}`)
|
|
141
135
|
}, e))
|
|
142
136
|
});
|
|
143
|
-
}, te =
|
|
144
|
-
return /* @__PURE__ */
|
|
137
|
+
}, P = (...e) => e.filter(Boolean).join(" "), te = c(function({ date: e, isCurrentMonth: t, isToday: n, hiddenCount: r = 0 }, i) {
|
|
138
|
+
return /* @__PURE__ */ _("div", {
|
|
145
139
|
ref: i,
|
|
146
|
-
className:
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
-
className:
|
|
149
|
-
children: [/* @__PURE__ */
|
|
150
|
-
className:
|
|
140
|
+
className: N["bsy-mobile-calendar-day-cell"],
|
|
141
|
+
children: [/* @__PURE__ */ _("div", {
|
|
142
|
+
className: N["bsy-mobile-calendar-day-cell__header"],
|
|
143
|
+
children: [/* @__PURE__ */ g("div", {
|
|
144
|
+
className: P(N["bsy-mobile-calendar-day-cell__text"], !t && N["bsy-mobile-calendar-day-cell__text--other"], n && N["bsy-mobile-calendar-day-cell__text--today"]),
|
|
151
145
|
children: e.date()
|
|
152
|
-
}), r > 0 ? /* @__PURE__ */
|
|
153
|
-
className:
|
|
146
|
+
}), r > 0 ? /* @__PURE__ */ _("div", {
|
|
147
|
+
className: N["bsy-mobile-calendar-day-cell__badge"],
|
|
154
148
|
children: ["+", r]
|
|
155
149
|
}) : null]
|
|
156
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ g("div", { className: N["bsy-mobile-calendar-day-cell__body"] })]
|
|
157
151
|
});
|
|
158
152
|
}), F = {
|
|
159
153
|
"bsy-mobile-calendar-event-card": "_bsy-mobile-calendar-event-card_v4uo1_1",
|
|
@@ -164,8 +158,8 @@ var x = {
|
|
|
164
158
|
"bsy-mobile-calendar-event-card__timed-body": "_bsy-mobile-calendar-event-card__timed-body_v4uo1_42",
|
|
165
159
|
"bsy-mobile-calendar-event-card__title": "_bsy-mobile-calendar-event-card__title_v4uo1_46",
|
|
166
160
|
"bsy-mobile-calendar-event-card__time": "_bsy-mobile-calendar-event-card__time_v4uo1_42"
|
|
167
|
-
}, I =
|
|
168
|
-
className:
|
|
161
|
+
}, I = o.memo(({ label: e, showLabel: t = !0, isStart: n = !0, isEnd: r = !0, isContinue: i = !1, height: a = 22, style: o, className: s, onClick: c, variant: l = "allDay", timeText: u }) => /* @__PURE__ */ g("div", {
|
|
162
|
+
className: P(F["bsy-mobile-calendar-event-card"], l === "timed" && F["bsy-mobile-calendar-event-card--timed"], n && F["bsy-mobile-calendar-event-card--start"], r && F["bsy-mobile-calendar-event-card--end"], i && F["bsy-mobile-calendar-event-card--continue"], s),
|
|
169
163
|
style: {
|
|
170
164
|
height: a,
|
|
171
165
|
lineHeight: l === "timed" ? "normal" : `${a}px`,
|
|
@@ -175,12 +169,12 @@ var x = {
|
|
|
175
169
|
e.stopPropagation(), c();
|
|
176
170
|
} : void 0,
|
|
177
171
|
role: c ? "button" : void 0,
|
|
178
|
-
children: t ? l === "timed" ? /* @__PURE__ */
|
|
172
|
+
children: t ? l === "timed" ? /* @__PURE__ */ _("div", {
|
|
179
173
|
className: F["bsy-mobile-calendar-event-card__timed-body"],
|
|
180
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ g("div", {
|
|
181
175
|
className: F["bsy-mobile-calendar-event-card__title"],
|
|
182
176
|
children: e
|
|
183
|
-
}), !!u && /* @__PURE__ */
|
|
177
|
+
}), !!u && /* @__PURE__ */ g("div", {
|
|
184
178
|
className: F["bsy-mobile-calendar-event-card__time"],
|
|
185
179
|
children: u
|
|
186
180
|
})]
|
|
@@ -189,7 +183,7 @@ var x = {
|
|
|
189
183
|
//#endregion
|
|
190
184
|
//#region src/components/Calendar/utils/monthLayoutAlgorithm.ts
|
|
191
185
|
function ne(e) {
|
|
192
|
-
let { startCol: t, endCol: n, row: r } = e, { HEADER_HEIGHT: i, SLOT_HEIGHT: a, SLOT_GAP: o, WEEK_PADDING_X: s } =
|
|
186
|
+
let { startCol: t, endCol: n, row: r } = e, { HEADER_HEIGHT: i, SLOT_HEIGHT: a, SLOT_GAP: o, WEEK_PADDING_X: s } = j, c = 100 / 7, l = s;
|
|
193
187
|
return {
|
|
194
188
|
top: i + r * (a + o),
|
|
195
189
|
height: a,
|
|
@@ -198,7 +192,7 @@ function ne(e) {
|
|
|
198
192
|
};
|
|
199
193
|
}
|
|
200
194
|
function L(e, t, n) {
|
|
201
|
-
let r =
|
|
195
|
+
let r = x(e.startTime), i = x(e.endTime), a = t.add(n, "day"), o = r.isBefore(t) ? t : r, s = i.isAfter(a) ? a : i, c = o.diff(t, "day"), l = r.startOf("day").diff(t.startOf("day"), "day"), u = s.hour() === 0 && s.minute() === 0 && s.second() === 0 ? s.diff(t, "day") : s.diff(t, "day") + 1;
|
|
202
196
|
return o.valueOf() === s.valueOf() && c >= 0 && c < n && (u = Math.min(c + 1, n)), {
|
|
203
197
|
event: e,
|
|
204
198
|
startDayIndex: c,
|
|
@@ -286,14 +280,14 @@ function se(e, t, n) {
|
|
|
286
280
|
}
|
|
287
281
|
return r;
|
|
288
282
|
}
|
|
289
|
-
var ce =
|
|
283
|
+
var ce = o.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
|
|
290
284
|
let { onEventClick: r } = w(), i = e.filter((e) => !t.has(e.event.id) && e.row < n);
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
className:
|
|
285
|
+
return /* @__PURE__ */ g("div", {
|
|
286
|
+
className: N["bsy-mobile-calendar-week-events"],
|
|
293
287
|
children: i.map((e) => {
|
|
294
288
|
let t = ne(e), { event: n, isStart: i, isEnd: a, isWeekStart: o } = e, s = i || o;
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
className:
|
|
289
|
+
return /* @__PURE__ */ g(I, {
|
|
290
|
+
className: N["bsy-mobile-calendar-week-events__segment"],
|
|
297
291
|
label: n.label,
|
|
298
292
|
showLabel: s,
|
|
299
293
|
isStart: i,
|
|
@@ -313,7 +307,7 @@ var ce = a.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
|
|
|
313
307
|
//#endregion
|
|
314
308
|
//#region src/components/Calendar/utils/dateUtils.ts
|
|
315
309
|
function le(e) {
|
|
316
|
-
let t =
|
|
310
|
+
let t = x(e).startOf("isoWeek");
|
|
317
311
|
return Array.from({ length: 7 }, (e, n) => t.add(n, "day"));
|
|
318
312
|
}
|
|
319
313
|
function ue(e) {
|
|
@@ -327,22 +321,22 @@ function de(e) {
|
|
|
327
321
|
return t;
|
|
328
322
|
}
|
|
329
323
|
function R(e, t) {
|
|
330
|
-
return e.isSame(
|
|
324
|
+
return e.isSame(r(t), "day");
|
|
331
325
|
}
|
|
332
326
|
function fe(e, t) {
|
|
333
327
|
return e.isSame(t, "month");
|
|
334
328
|
}
|
|
335
329
|
function z(e) {
|
|
336
|
-
return
|
|
330
|
+
return x(e.startTime).format("YYYY-MM-DD") !== x(e.endTime).format("YYYY-MM-DD");
|
|
337
331
|
}
|
|
338
332
|
function pe(e, t) {
|
|
339
|
-
let n = t.startOf("day"), r =
|
|
333
|
+
let n = t.startOf("day"), r = x(e.startTime).startOf("day"), i = x(e.endTime).startOf("day");
|
|
340
334
|
return !n.isBefore(r) && !n.isAfter(i);
|
|
341
335
|
}
|
|
342
336
|
function me(e, t) {
|
|
343
337
|
let n = t.startOf("day");
|
|
344
338
|
return e.filter((e) => {
|
|
345
|
-
let t =
|
|
339
|
+
let t = x(e.startTime), r = x(e.endTime), i = t.startOf("day"), a = r.hour() === 0 && r.minute() === 0 && r.second() === 0, o = t.valueOf() === r.valueOf(), s = r.startOf("day");
|
|
346
340
|
return a && !o && (s = r.subtract(1, "day").startOf("day")), !n.isBefore(i) && !n.isAfter(s);
|
|
347
341
|
});
|
|
348
342
|
}
|
|
@@ -350,23 +344,23 @@ function me(e, t) {
|
|
|
350
344
|
//#region src/components/Calendar/CalendarMonth/WeekRow/WeekRow.tsx
|
|
351
345
|
var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenScheduleIds: i, maxVisibleRows: a, cellRef: o, onDayClick: s }) => {
|
|
352
346
|
let { timeZone: c } = w();
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
className:
|
|
347
|
+
return /* @__PURE__ */ _("div", {
|
|
348
|
+
className: N["bsy-mobile-calendar-week-row"],
|
|
355
349
|
onClick: (t) => {
|
|
356
350
|
if (!s) return;
|
|
357
351
|
let n = t.currentTarget.getBoundingClientRect(), r = t.clientX - n.left, i = n.width / 7, a = Math.floor(r / i);
|
|
358
352
|
a >= 0 && a < e.length && s(e[a]);
|
|
359
353
|
},
|
|
360
|
-
children: [/* @__PURE__ */
|
|
361
|
-
className:
|
|
362
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ g("div", {
|
|
355
|
+
className: N["bsy-mobile-calendar-week-row__cells"],
|
|
356
|
+
children: e.map((e, n) => /* @__PURE__ */ g(te, {
|
|
363
357
|
ref: n === 0 ? o : void 0,
|
|
364
358
|
date: e,
|
|
365
359
|
isCurrentMonth: fe(e, t),
|
|
366
360
|
isToday: R(e, c),
|
|
367
361
|
hiddenCount: r[n] || 0
|
|
368
362
|
}, e.format("YYYY-MM-DD")))
|
|
369
|
-
}), /* @__PURE__ */
|
|
363
|
+
}), /* @__PURE__ */ g(ce, {
|
|
370
364
|
segments: n,
|
|
371
365
|
hiddenScheduleIds: i,
|
|
372
366
|
maxVisibleRows: a
|
|
@@ -376,14 +370,14 @@ var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenSchedule
|
|
|
376
370
|
//#endregion
|
|
377
371
|
//#region src/components/Calendar/hooks/useMonthDates.ts
|
|
378
372
|
function ge(e) {
|
|
379
|
-
return { weeks:
|
|
373
|
+
return { weeks: p(() => de(ue(e)), [e.format("YYYY-MM")]) };
|
|
380
374
|
}
|
|
381
375
|
//#endregion
|
|
382
376
|
//#region src/components/Calendar/hooks/useCellHeight.ts
|
|
383
|
-
var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } =
|
|
377
|
+
var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } = j;
|
|
384
378
|
function be() {
|
|
385
|
-
let e =
|
|
386
|
-
return
|
|
379
|
+
let e = m(null), [t, n] = h(2);
|
|
380
|
+
return d(() => {
|
|
387
381
|
let t = e.current;
|
|
388
382
|
if (!t) return;
|
|
389
383
|
let r = (e) => {
|
|
@@ -406,7 +400,7 @@ function be() {
|
|
|
406
400
|
//#endregion
|
|
407
401
|
//#region src/components/Calendar/hooks/useMonthEventLayout.ts
|
|
408
402
|
function xe({ events: e, monthDate: t, maxVisibleRows: n }) {
|
|
409
|
-
return
|
|
403
|
+
return p(() => {
|
|
410
404
|
if (!e || e.length === 0) return {
|
|
411
405
|
weekLayouts: Array.from({ length: 6 }, () => []),
|
|
412
406
|
hiddenScheduleIds: /* @__PURE__ */ new Set(),
|
|
@@ -432,13 +426,13 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
|
|
|
432
426
|
monthDate: e,
|
|
433
427
|
maxVisibleRows: s
|
|
434
428
|
});
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
className:
|
|
429
|
+
return /* @__PURE__ */ g("div", {
|
|
430
|
+
className: N["bsy-mobile-calendar-month-slide"],
|
|
437
431
|
style: {
|
|
438
432
|
width: t,
|
|
439
433
|
...r
|
|
440
434
|
},
|
|
441
|
-
children: a.map((t, n) => /* @__PURE__ */
|
|
435
|
+
children: a.map((t, n) => /* @__PURE__ */ g(he, {
|
|
442
436
|
dates: t,
|
|
443
437
|
monthDate: e,
|
|
444
438
|
segments: c[n] || [],
|
|
@@ -451,21 +445,21 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
|
|
|
451
445
|
});
|
|
452
446
|
}, B = (e) => e.subtract(1, "month"), V = (e) => e.add(1, "month");
|
|
453
447
|
function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
|
|
454
|
-
let r =
|
|
448
|
+
let r = p(() => [
|
|
455
449
|
B(e),
|
|
456
450
|
e,
|
|
457
451
|
V(e)
|
|
458
|
-
], [e.format("YYYY-MM")]), [i, a] =
|
|
452
|
+
], [e.format("YYYY-MM")]), [i, a] = h(0), [o, s] = h(!1), c = m({
|
|
459
453
|
startX: 0,
|
|
460
454
|
startY: 0,
|
|
461
455
|
startTime: 0,
|
|
462
456
|
isDragging: !1,
|
|
463
457
|
isVerticalScroll: !1,
|
|
464
458
|
directionLocked: !1
|
|
465
|
-
}), u =
|
|
466
|
-
if (
|
|
459
|
+
}), u = y(e), d = y(t), f = y(n), g = y(i), _ = l((e) => {
|
|
460
|
+
if (c.current.isDragging) return;
|
|
467
461
|
let t = e.touches[0];
|
|
468
|
-
|
|
462
|
+
c.current = {
|
|
469
463
|
startX: t.clientX,
|
|
470
464
|
startY: t.clientY,
|
|
471
465
|
startTime: Date.now(),
|
|
@@ -473,21 +467,21 @@ function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
|
|
|
473
467
|
isVerticalScroll: !1,
|
|
474
468
|
directionLocked: !1
|
|
475
469
|
}, s(!1);
|
|
476
|
-
}, []),
|
|
477
|
-
if (!
|
|
478
|
-
let t = e.touches[0], n = t.clientX -
|
|
479
|
-
if (!
|
|
480
|
-
|
|
470
|
+
}, []), v = l((e) => {
|
|
471
|
+
if (!c.current.isDragging) return;
|
|
472
|
+
let t = e.touches[0], n = t.clientX - c.current.startX, r = t.clientY - c.current.startY;
|
|
473
|
+
if (!c.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (c.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
|
|
474
|
+
c.current.isVerticalScroll = !0;
|
|
481
475
|
return;
|
|
482
476
|
}
|
|
483
|
-
|
|
484
|
-
}, []), b =
|
|
485
|
-
if (!
|
|
486
|
-
let e =
|
|
487
|
-
if (
|
|
488
|
-
let n = Date.now() -
|
|
477
|
+
c.current.isVerticalScroll || a(n);
|
|
478
|
+
}, []), b = l(() => {
|
|
479
|
+
if (!c.current.isDragging) return;
|
|
480
|
+
let e = f.current ?? 0, t = g.current ?? 0;
|
|
481
|
+
if (c.current.isDragging = !1, !e || c.current.isVerticalScroll) return;
|
|
482
|
+
let n = Date.now() - c.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
|
|
489
483
|
s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
|
|
490
|
-
}, [
|
|
484
|
+
}, [f, g]), x = l(() => {
|
|
491
485
|
let e = g.current ?? 0, t = u.current, n = d.current;
|
|
492
486
|
if (e !== 0 && t && n) {
|
|
493
487
|
let r = (e > 0 ? -1 : 1) == 1 ? V(t) : B(t);
|
|
@@ -502,14 +496,14 @@ function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
|
|
|
502
496
|
months: r,
|
|
503
497
|
translateX: i,
|
|
504
498
|
transitionEnabled: o,
|
|
505
|
-
bindEvents:
|
|
499
|
+
bindEvents: p(() => ({
|
|
506
500
|
onTouchStart: _,
|
|
507
|
-
onTouchMove:
|
|
501
|
+
onTouchMove: v,
|
|
508
502
|
onTouchEnd: b,
|
|
509
503
|
onTouchCancel: b
|
|
510
504
|
}), [
|
|
511
505
|
_,
|
|
512
|
-
|
|
506
|
+
v,
|
|
513
507
|
b
|
|
514
508
|
]),
|
|
515
509
|
handleTransitionEnd: x
|
|
@@ -526,10 +520,10 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
|
|
|
526
520
|
let t = me(r, e);
|
|
527
521
|
i?.(e.toDate(), t);
|
|
528
522
|
};
|
|
529
|
-
return n ? /* @__PURE__ */
|
|
530
|
-
className:
|
|
523
|
+
return n ? /* @__PURE__ */ g("div", {
|
|
524
|
+
className: N["bsy-mobile-calendar-carousel"],
|
|
531
525
|
...c,
|
|
532
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ g("div", {
|
|
533
527
|
style: {
|
|
534
528
|
width: n * 3,
|
|
535
529
|
marginLeft: -n,
|
|
@@ -540,7 +534,7 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
|
|
|
540
534
|
willChange: "transform"
|
|
541
535
|
},
|
|
542
536
|
onTransitionEnd: l,
|
|
543
|
-
children: a.map((e) => /* @__PURE__ */
|
|
537
|
+
children: a.map((e) => /* @__PURE__ */ g(Se, {
|
|
544
538
|
monthDate: e,
|
|
545
539
|
containerWidth: n,
|
|
546
540
|
events: r,
|
|
@@ -553,13 +547,13 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
|
|
|
553
547
|
})
|
|
554
548
|
}) : null;
|
|
555
549
|
}, Te = () => {
|
|
556
|
-
let e =
|
|
550
|
+
let e = m(null), t = b(e), { currentDate: n, setCurrentDate: r, events: i } = w(), a = p(() => x(n), [n]), o = l((e) => {
|
|
557
551
|
r(e.toDate());
|
|
558
552
|
}, [r]);
|
|
559
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ _("div", {
|
|
560
554
|
ref: e,
|
|
561
|
-
className:
|
|
562
|
-
children: [/* @__PURE__ */
|
|
555
|
+
className: N["bsy-mobile-calendar-month"],
|
|
556
|
+
children: [/* @__PURE__ */ g(ee, {}), /* @__PURE__ */ g(we, {
|
|
563
557
|
currentDate: a,
|
|
564
558
|
setCurrentDate: o,
|
|
565
559
|
containerWidth: t?.width ?? 0,
|
|
@@ -568,21 +562,21 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
|
|
|
568
562
|
});
|
|
569
563
|
}, H = (e) => e.subtract(1, "week"), U = (e) => e.add(1, "week");
|
|
570
564
|
function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
|
|
571
|
-
let r =
|
|
565
|
+
let r = p(() => [
|
|
572
566
|
H(e),
|
|
573
567
|
e,
|
|
574
568
|
U(e)
|
|
575
|
-
], [e.format("YYYY-MM-DD")]), [i, a] =
|
|
569
|
+
], [e.format("YYYY-MM-DD")]), [i, a] = h(0), [o, s] = h(!1), c = m({
|
|
576
570
|
startX: 0,
|
|
577
571
|
startY: 0,
|
|
578
572
|
startTime: 0,
|
|
579
573
|
isDragging: !1,
|
|
580
574
|
isVerticalScroll: !1,
|
|
581
575
|
directionLocked: !1
|
|
582
|
-
}), u =
|
|
583
|
-
if (
|
|
576
|
+
}), u = y(e), d = y(t), f = y(n), g = y(i), _ = l((e) => {
|
|
577
|
+
if (c.current.isDragging) return;
|
|
584
578
|
let t = e.touches[0];
|
|
585
|
-
|
|
579
|
+
c.current = {
|
|
586
580
|
startX: t.clientX,
|
|
587
581
|
startY: t.clientY,
|
|
588
582
|
startTime: Date.now(),
|
|
@@ -590,21 +584,21 @@ function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
|
|
|
590
584
|
isVerticalScroll: !1,
|
|
591
585
|
directionLocked: !1
|
|
592
586
|
}, s(!1);
|
|
593
|
-
}, []),
|
|
594
|
-
if (!
|
|
595
|
-
let t = e.touches[0], n = t.clientX -
|
|
596
|
-
if (!
|
|
597
|
-
|
|
587
|
+
}, []), v = l((e) => {
|
|
588
|
+
if (!c.current.isDragging) return;
|
|
589
|
+
let t = e.touches[0], n = t.clientX - c.current.startX, r = t.clientY - c.current.startY;
|
|
590
|
+
if (!c.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (c.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
|
|
591
|
+
c.current.isVerticalScroll = !0;
|
|
598
592
|
return;
|
|
599
593
|
}
|
|
600
|
-
|
|
601
|
-
}, []), b =
|
|
602
|
-
if (!
|
|
603
|
-
let e =
|
|
604
|
-
if (
|
|
605
|
-
let n = Date.now() -
|
|
594
|
+
c.current.isVerticalScroll || a(n);
|
|
595
|
+
}, []), b = l(() => {
|
|
596
|
+
if (!c.current.isDragging) return;
|
|
597
|
+
let e = f.current ?? 0, t = g.current ?? 0;
|
|
598
|
+
if (c.current.isDragging = !1, !e || c.current.isVerticalScroll) return;
|
|
599
|
+
let n = Date.now() - c.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
|
|
606
600
|
s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
|
|
607
|
-
}, [
|
|
601
|
+
}, [f, g]), x = l(() => {
|
|
608
602
|
let e = g.current ?? 0, t = u.current, n = d.current;
|
|
609
603
|
if (e !== 0 && t && n) {
|
|
610
604
|
let r = (e > 0 ? -1 : 1) == 1 ? U(t) : H(t);
|
|
@@ -619,14 +613,14 @@ function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
|
|
|
619
613
|
weeks: r,
|
|
620
614
|
translateX: i,
|
|
621
615
|
transitionEnabled: o,
|
|
622
|
-
bindEvents:
|
|
616
|
+
bindEvents: p(() => ({
|
|
623
617
|
onTouchStart: _,
|
|
624
|
-
onTouchMove:
|
|
618
|
+
onTouchMove: v,
|
|
625
619
|
onTouchEnd: b,
|
|
626
620
|
onTouchCancel: b
|
|
627
621
|
}), [
|
|
628
622
|
_,
|
|
629
|
-
|
|
623
|
+
v,
|
|
630
624
|
b
|
|
631
625
|
]),
|
|
632
626
|
handleTransitionEnd: x
|
|
@@ -668,29 +662,29 @@ var W = {
|
|
|
668
662
|
"bsy-mobile-calendar-allday__content": "_bsy-mobile-calendar-allday__content_dugny_170",
|
|
669
663
|
"bsy-mobile-calendar-allday__list": "_bsy-mobile-calendar-allday__list_dugny_176",
|
|
670
664
|
"bsy-mobile-calendar-allday__expand": "_bsy-mobile-calendar-allday__expand_dugny_180"
|
|
671
|
-
}, De = ({ weekDate: t, currentDate:
|
|
672
|
-
let { timeZone: o } = w(), { t: s } = e(), c = le(t.toDate()), l =
|
|
673
|
-
return /* @__PURE__ */
|
|
665
|
+
}, De = ({ weekDate: t, currentDate: n, containerWidth: i, onDateClick: a }) => {
|
|
666
|
+
let { timeZone: o } = w(), { t: s } = e(), c = le(t.toDate()), l = r(o).startOf("day"), u = c.some((e) => R(e, o)), d = l.day(), f = n.isSame(l, "day");
|
|
667
|
+
return /* @__PURE__ */ _("div", {
|
|
674
668
|
className: W["bsy-mobile-calendar-week-slide"],
|
|
675
669
|
style: { width: i },
|
|
676
|
-
children: [/* @__PURE__ */
|
|
670
|
+
children: [/* @__PURE__ */ g("div", {
|
|
677
671
|
className: W["bsy-mobile-calendar-week-slide__weekdays"],
|
|
678
|
-
children:
|
|
672
|
+
children: M.map((e, t) => {
|
|
679
673
|
let n = t === 6 ? 0 : t + 1, r = c.find((e) => e.day() === n), i = u && n === d, a = r ? r.isBefore(l, "day") : !1, o = r ? r.isAfter(l) : !1;
|
|
680
|
-
return /* @__PURE__ */
|
|
681
|
-
className:
|
|
674
|
+
return /* @__PURE__ */ g("div", {
|
|
675
|
+
className: P(W["bsy-mobile-calendar-week-slide__weekday"], i && W["bsy-mobile-calendar-week-slide__weekday--today"], !i && a && W["bsy-mobile-calendar-week-slide__weekday--past"], o && W["bsy-mobile-calendar-week-slide__weekday--future"]),
|
|
682
676
|
children: s(`calendar.weekday.${e}`)
|
|
683
677
|
}, e);
|
|
684
678
|
})
|
|
685
|
-
}), /* @__PURE__ */
|
|
679
|
+
}), /* @__PURE__ */ g("div", {
|
|
686
680
|
className: W["bsy-mobile-calendar-week-slide__dates"],
|
|
687
681
|
children: c.map((e) => {
|
|
688
|
-
let t = R(e, o),
|
|
689
|
-
return /* @__PURE__ */
|
|
682
|
+
let t = R(e, o), r = e.isSame(n, "day") && !t, i = e.isBefore(l);
|
|
683
|
+
return /* @__PURE__ */ g("div", {
|
|
690
684
|
className: W["bsy-mobile-calendar-week-slide__date-item"],
|
|
691
685
|
onClick: () => a?.(e),
|
|
692
|
-
children: /* @__PURE__ */
|
|
693
|
-
className:
|
|
686
|
+
children: /* @__PURE__ */ g("div", {
|
|
687
|
+
className: P(W["bsy-mobile-calendar-week-slide__date-circle"], t && (f ? W["bsy-mobile-calendar-week-slide__date-circle--today"] : W["bsy-mobile-calendar-week-slide__date-circle--today-idle"]), !t && i && W["bsy-mobile-calendar-week-slide__date-circle--past"], !t && !i && W["bsy-mobile-calendar-week-slide__date-circle--future"], r && W["bsy-mobile-calendar-week-slide__date-circle--selected"]),
|
|
694
688
|
children: e.date()
|
|
695
689
|
})
|
|
696
690
|
}, e.format("YYYY-MM-DD"));
|
|
@@ -703,10 +697,10 @@ var W = {
|
|
|
703
697
|
setSelectedDate: t,
|
|
704
698
|
containerWidth: n
|
|
705
699
|
});
|
|
706
|
-
return n ? /* @__PURE__ */
|
|
700
|
+
return n ? /* @__PURE__ */ g("div", {
|
|
707
701
|
className: W["bsy-mobile-calendar-week-carousel"],
|
|
708
702
|
...o,
|
|
709
|
-
children: /* @__PURE__ */
|
|
703
|
+
children: /* @__PURE__ */ g("div", {
|
|
710
704
|
style: {
|
|
711
705
|
width: n * 3,
|
|
712
706
|
marginLeft: -n,
|
|
@@ -717,7 +711,7 @@ var W = {
|
|
|
717
711
|
willChange: "transform"
|
|
718
712
|
},
|
|
719
713
|
onTransitionEnd: s,
|
|
720
|
-
children: r.map((r) => /* @__PURE__ */
|
|
714
|
+
children: r.map((r) => /* @__PURE__ */ g(De, {
|
|
721
715
|
weekDate: r,
|
|
722
716
|
currentDate: e,
|
|
723
717
|
containerWidth: n,
|
|
@@ -725,31 +719,31 @@ var W = {
|
|
|
725
719
|
}, r.format("YYYY-MM-DD")))
|
|
726
720
|
})
|
|
727
721
|
}) : null;
|
|
728
|
-
}, ke =
|
|
729
|
-
let { t: r } = e(), i =
|
|
730
|
-
return
|
|
722
|
+
}, ke = o.memo(({ events: t, onEventClick: n }) => {
|
|
723
|
+
let { t: r } = e(), i = m(null), [a, o] = h(0), [s, c] = h(!1), l = s ? t.length : Math.min(t.length, 3), u = t.slice(0, l), d = t.length - 3, p = t.length > 3, v = s && t.length > 8;
|
|
724
|
+
return f(() => {
|
|
731
725
|
i.current && o(t.length > 0 ? i.current.scrollHeight : 0);
|
|
732
|
-
}, [t, s]), /* @__PURE__ */
|
|
726
|
+
}, [t, s]), /* @__PURE__ */ g("div", {
|
|
733
727
|
className: W["bsy-mobile-calendar-allday"],
|
|
734
728
|
style: { height: a },
|
|
735
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ _("div", {
|
|
736
730
|
ref: i,
|
|
737
731
|
className: W["bsy-mobile-calendar-allday__content"],
|
|
738
|
-
children: [/* @__PURE__ */
|
|
732
|
+
children: [/* @__PURE__ */ g("div", {
|
|
739
733
|
className: W["bsy-mobile-calendar-allday__list"],
|
|
740
734
|
style: v ? {
|
|
741
735
|
maxHeight: 204,
|
|
742
736
|
overflowY: "auto"
|
|
743
737
|
} : void 0,
|
|
744
|
-
children: u.map((e) => /* @__PURE__ */
|
|
738
|
+
children: u.map((e) => /* @__PURE__ */ g(I, {
|
|
745
739
|
label: e.label,
|
|
746
740
|
style: { width: "100%" },
|
|
747
741
|
onClick: () => n?.(e)
|
|
748
742
|
}, e.id))
|
|
749
|
-
}),
|
|
743
|
+
}), p ? /* @__PURE__ */ _("div", {
|
|
750
744
|
className: W["bsy-mobile-calendar-allday__expand"],
|
|
751
745
|
onClick: () => c((e) => !e),
|
|
752
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ g("span", { children: s ? r("calendar.collapse") : r("calendar.moreRecords", { count: d }) }), /* @__PURE__ */ g("svg", {
|
|
753
747
|
width: "16",
|
|
754
748
|
height: "16",
|
|
755
749
|
viewBox: "0 0 16 16",
|
|
@@ -758,7 +752,7 @@ var W = {
|
|
|
758
752
|
transform: s ? "rotate(180deg)" : "rotate(0deg)",
|
|
759
753
|
transition: "transform 200ms ease"
|
|
760
754
|
},
|
|
761
|
-
children: /* @__PURE__ */
|
|
755
|
+
children: /* @__PURE__ */ g("path", {
|
|
762
756
|
d: "M4 6L8 10L12 6",
|
|
763
757
|
stroke: "currentColor",
|
|
764
758
|
strokeWidth: "1.5",
|
|
@@ -771,35 +765,35 @@ var W = {
|
|
|
771
765
|
});
|
|
772
766
|
}), Ae = ({ currentDate: e, setCurrentDate: t, containerWidth: n, allDayEvents: r, onEventClick: i }) => {
|
|
773
767
|
let { timezoneLabel: a } = w();
|
|
774
|
-
return /* @__PURE__ */
|
|
768
|
+
return /* @__PURE__ */ _("div", {
|
|
775
769
|
className: W["bsy-mobile-calendar-day__header-wrap"],
|
|
776
|
-
children: [/* @__PURE__ */
|
|
770
|
+
children: [/* @__PURE__ */ _("div", {
|
|
777
771
|
className: W["bsy-mobile-calendar-day__header"],
|
|
778
|
-
children: [/* @__PURE__ */
|
|
772
|
+
children: [/* @__PURE__ */ g("div", {
|
|
779
773
|
className: W["bsy-mobile-calendar-day__tz"],
|
|
780
774
|
children: a
|
|
781
|
-
}), /* @__PURE__ */
|
|
775
|
+
}), /* @__PURE__ */ g(Oe, {
|
|
782
776
|
currentDate: e,
|
|
783
777
|
setCurrentDate: t,
|
|
784
778
|
containerWidth: n
|
|
785
779
|
})]
|
|
786
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ g(ke, {
|
|
787
781
|
events: r,
|
|
788
782
|
onEventClick: i
|
|
789
783
|
})]
|
|
790
784
|
});
|
|
791
|
-
}, G = (e) =>
|
|
792
|
-
let t =
|
|
785
|
+
}, G = (e) => x(e.startTime).format("YYYY-MM-DD") !== x(e.endTime).format("YYYY-MM-DD"), K = (e) => {
|
|
786
|
+
let t = x(e.startTime), n = x(e.endTime);
|
|
793
787
|
return n.diff(t, "minute") < 22 ? t.add(22, "minute") : n;
|
|
794
788
|
}, q = (e, t) => {
|
|
795
|
-
let n =
|
|
789
|
+
let n = x(e.startTime), r = K(e), i = x(t.startTime), a = K(t);
|
|
796
790
|
return n.isBefore(a) && r.isAfter(i);
|
|
797
791
|
}, je = (e) => {
|
|
798
792
|
if (e.length === 0) return [];
|
|
799
|
-
let t = [...e].sort((e, t) =>
|
|
793
|
+
let t = [...e].sort((e, t) => x(e.startTime).valueOf() - x(t.startTime).valueOf()), n = [], r = [t[0]], i = K(t[0]);
|
|
800
794
|
for (let e = 1; e < t.length; e += 1) {
|
|
801
795
|
let a = t[e];
|
|
802
|
-
if (
|
|
796
|
+
if (x(a.startTime).isBefore(i)) {
|
|
803
797
|
r.push(a);
|
|
804
798
|
let e = K(a);
|
|
805
799
|
e.isAfter(i) && (i = e);
|
|
@@ -807,7 +801,7 @@ var W = {
|
|
|
807
801
|
}
|
|
808
802
|
return n.push(r), n;
|
|
809
803
|
}, Me = (e) => {
|
|
810
|
-
let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) =>
|
|
804
|
+
let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) => x(e.startTime).valueOf() - x(t.startTime).valueOf());
|
|
811
805
|
for (let e of r) {
|
|
812
806
|
let r = !1;
|
|
813
807
|
for (let i = 0; i < n.length; i += 1) if (n[i].every((t) => !q(t, e))) {
|
|
@@ -850,7 +844,7 @@ var W = {
|
|
|
850
844
|
for (let e of r) {
|
|
851
845
|
let n = Me(e), r = Pe(e, n), a = Math.max(...Array.from(n.values())) + 1;
|
|
852
846
|
for (let o of e) {
|
|
853
|
-
let e =
|
|
847
|
+
let e = x(o.startTime), s = x(o.endTime), c = e.hour() * 60 + e.minute(), l = s.hour() * 60 + s.minute(), u = Math.max(l - c, 22), d = c / t.interval * t.rowHeight, f = u / t.interval * t.rowHeight, p = r.get(o.id);
|
|
854
848
|
i.push({
|
|
855
849
|
event: o,
|
|
856
850
|
top: d,
|
|
@@ -871,11 +865,11 @@ var W = {
|
|
|
871
865
|
interval: 60,
|
|
872
866
|
rowHeight: 60
|
|
873
867
|
}, Re = (e) => {
|
|
874
|
-
let t =
|
|
868
|
+
let t = x(e.startTime), n = x(e.endTime);
|
|
875
869
|
return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
|
|
876
|
-
}, ze = (e, t, n) => Math.min(Math.max(e, t), n), Be = ({ events: e, currentDate:
|
|
877
|
-
let { timeZone: a } = w(), o =
|
|
878
|
-
|
|
870
|
+
}, ze = (e, t, n) => Math.min(Math.max(e, t), n), Be = ({ events: e, currentDate: t, onEventClick: i }) => {
|
|
871
|
+
let { timeZone: a } = w(), o = m(null), s = m(null), [c, l] = h(() => Date.now()), u = p(() => Fe(e, Le), [e]), f = p(() => new Map(e.map((e) => [e.id, e])), [e]), v = u.timedEvents ?? [], y = p(() => x(t).isSame(r(a), "day"), [t, a]);
|
|
872
|
+
d(() => {
|
|
879
873
|
if (!y) {
|
|
880
874
|
s.current = null;
|
|
881
875
|
return;
|
|
@@ -888,47 +882,47 @@ var W = {
|
|
|
888
882
|
window.clearInterval(e);
|
|
889
883
|
};
|
|
890
884
|
}, [y]);
|
|
891
|
-
let
|
|
885
|
+
let b = p(() => {
|
|
892
886
|
if (!y) return null;
|
|
893
|
-
let e =
|
|
887
|
+
let e = n(c, a);
|
|
894
888
|
return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
|
|
895
889
|
}, [
|
|
896
890
|
y,
|
|
897
891
|
c,
|
|
898
892
|
a
|
|
899
|
-
]), S =
|
|
900
|
-
return
|
|
901
|
-
if (!y || !o.current ||
|
|
902
|
-
let e =
|
|
893
|
+
]), S = p(() => b === null ? null : b - 20, [b]);
|
|
894
|
+
return d(() => {
|
|
895
|
+
if (!y || !o.current || b === null) return;
|
|
896
|
+
let e = x(t).format("YYYY-MM-DD");
|
|
903
897
|
if (s.current === e) return;
|
|
904
|
-
let
|
|
905
|
-
|
|
898
|
+
let n = o.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
|
|
899
|
+
n.scrollTop = ze(b - n.clientHeight * .35, 0, r), s.current = e;
|
|
906
900
|
}, [
|
|
907
|
-
|
|
901
|
+
t,
|
|
908
902
|
y,
|
|
909
|
-
|
|
910
|
-
]), /* @__PURE__ */
|
|
903
|
+
b
|
|
904
|
+
]), /* @__PURE__ */ g("div", {
|
|
911
905
|
className: W["bsy-mobile-calendar-day__body"],
|
|
912
906
|
ref: o,
|
|
913
|
-
children: /* @__PURE__ */
|
|
907
|
+
children: /* @__PURE__ */ _("div", {
|
|
914
908
|
className: W["bsy-mobile-calendar-day__time-grid"],
|
|
915
|
-
children: [/* @__PURE__ */
|
|
909
|
+
children: [/* @__PURE__ */ g("div", {
|
|
916
910
|
className: W["bsy-mobile-calendar-day__time-col"],
|
|
917
|
-
children: Ie.map((e, t) => /* @__PURE__ */
|
|
911
|
+
children: Ie.map((e, t) => /* @__PURE__ */ g("div", {
|
|
918
912
|
className: W["bsy-mobile-calendar-day__time-label"],
|
|
919
913
|
style: { top: 20 + t * 60 },
|
|
920
914
|
children: e
|
|
921
915
|
}, e))
|
|
922
|
-
}), /* @__PURE__ */
|
|
916
|
+
}), /* @__PURE__ */ _("div", {
|
|
923
917
|
className: W["bsy-mobile-calendar-day__content-col"],
|
|
924
918
|
children: [
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
Ie.map((e) => /* @__PURE__ */
|
|
927
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ g("div", { style: { height: 20 } }),
|
|
920
|
+
Ie.map((e) => /* @__PURE__ */ g("div", { className: W["bsy-mobile-calendar-day__hour-cell"] }, e)),
|
|
921
|
+
/* @__PURE__ */ _("div", {
|
|
928
922
|
className: W["bsy-mobile-calendar-day__timed-layer"],
|
|
929
923
|
children: [v.map((e) => {
|
|
930
|
-
let { event: t, top: n, height: r, left: a, width: o, isPercent: s } = e, c =
|
|
931
|
-
return c ? /* @__PURE__ */
|
|
924
|
+
let { event: t, top: n, height: r, left: a, width: o, isPercent: s } = e, c = f.get(t.id);
|
|
925
|
+
return c ? /* @__PURE__ */ g(I, {
|
|
932
926
|
className: W["bsy-mobile-calendar-day__timed-item"],
|
|
933
927
|
label: t.label,
|
|
934
928
|
timeText: Re(c),
|
|
@@ -941,10 +935,10 @@ var W = {
|
|
|
941
935
|
},
|
|
942
936
|
onClick: () => i?.(c)
|
|
943
937
|
}, t.id) : null;
|
|
944
|
-
}), S === null ? null : /* @__PURE__ */
|
|
938
|
+
}), S === null ? null : /* @__PURE__ */ g("div", {
|
|
945
939
|
className: W["bsy-mobile-calendar-now-line"],
|
|
946
940
|
style: { top: S },
|
|
947
|
-
children: /* @__PURE__ */
|
|
941
|
+
children: /* @__PURE__ */ g("div", { className: W["bsy-mobile-calendar-now-dot"] })
|
|
948
942
|
})]
|
|
949
943
|
})
|
|
950
944
|
]
|
|
@@ -952,25 +946,25 @@ var W = {
|
|
|
952
946
|
})
|
|
953
947
|
});
|
|
954
948
|
}, Ve = () => {
|
|
955
|
-
let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i =
|
|
956
|
-
let t =
|
|
949
|
+
let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = m(null), a = b(i), o = p(() => {
|
|
950
|
+
let t = x(e);
|
|
957
951
|
return n.filter((e) => z(e) && pe(e, t));
|
|
958
|
-
}, [n, e]), s =
|
|
959
|
-
let t =
|
|
960
|
-
return n.filter((e) => !z(e) &&
|
|
961
|
-
}, [n, e]),
|
|
952
|
+
}, [n, e]), s = p(() => {
|
|
953
|
+
let t = x(e);
|
|
954
|
+
return n.filter((e) => !z(e) && x(e.startTime).isSame(t, "day"));
|
|
955
|
+
}, [n, e]), c = p(() => a?.width ? a.width - 56 : 0, [a?.width]), u = l((e) => {
|
|
962
956
|
t(e.toDate());
|
|
963
957
|
}, [t]);
|
|
964
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ _("div", {
|
|
965
959
|
className: W["bsy-mobile-calendar-day"],
|
|
966
960
|
ref: i,
|
|
967
|
-
children: [/* @__PURE__ */
|
|
968
|
-
currentDate:
|
|
961
|
+
children: [/* @__PURE__ */ g(Ae, {
|
|
962
|
+
currentDate: x(e),
|
|
969
963
|
setCurrentDate: u,
|
|
970
|
-
containerWidth:
|
|
964
|
+
containerWidth: c,
|
|
971
965
|
allDayEvents: o,
|
|
972
966
|
onEventClick: r
|
|
973
|
-
}), /* @__PURE__ */
|
|
967
|
+
}), /* @__PURE__ */ g(Be, {
|
|
974
968
|
events: s,
|
|
975
969
|
currentDate: e,
|
|
976
970
|
onEventClick: r
|
|
@@ -991,7 +985,7 @@ function Ue(e, t) {
|
|
|
991
985
|
return e * t + e * 4;
|
|
992
986
|
}
|
|
993
987
|
function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
994
|
-
let [r, i] =
|
|
988
|
+
let [r, i] = h(0), [a, o] = h(!1), s = m({
|
|
995
989
|
startX: 0,
|
|
996
990
|
startY: 0,
|
|
997
991
|
startTime: 0,
|
|
@@ -999,16 +993,16 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
|
999
993
|
isDragging: !1,
|
|
1000
994
|
isVerticalScroll: !1,
|
|
1001
995
|
directionLocked: !1
|
|
1002
|
-
}),
|
|
1003
|
-
|
|
996
|
+
}), c = y(e), u = y(t), f = y(n), g = y(r), _ = m(e.format("YYYY-MM-DD"));
|
|
997
|
+
d(() => {
|
|
1004
998
|
let t = e.format("YYYY-MM-DD");
|
|
1005
999
|
_.current !== t && (i(0), o(!1), _.current = t);
|
|
1006
1000
|
}, [e]);
|
|
1007
|
-
let
|
|
1001
|
+
let v = p(() => He(e, r, n), [
|
|
1008
1002
|
e.format("YYYY-MM-DD"),
|
|
1009
1003
|
r,
|
|
1010
1004
|
n
|
|
1011
|
-
]), b =
|
|
1005
|
+
]), b = l((e) => Ue(e, f.current ?? 0), [f]), x = r, S = l((e) => {
|
|
1012
1006
|
if (s.current.isDragging) return;
|
|
1013
1007
|
let t = e.touches[0];
|
|
1014
1008
|
s.current = {
|
|
@@ -1020,7 +1014,7 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
|
1020
1014
|
isVerticalScroll: !1,
|
|
1021
1015
|
directionLocked: !1
|
|
1022
1016
|
}, o(!1);
|
|
1023
|
-
}, [g]), C =
|
|
1017
|
+
}, [g]), C = l((e) => {
|
|
1024
1018
|
if (!s.current.isDragging) return;
|
|
1025
1019
|
let t = e.touches[0], n = t.clientX - s.current.startX, r = t.clientY - s.current.startY;
|
|
1026
1020
|
if (!s.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (s.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
|
|
@@ -1028,15 +1022,15 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
|
1028
1022
|
return;
|
|
1029
1023
|
}
|
|
1030
1024
|
s.current.isVerticalScroll || i(s.current.startTranslateX + n);
|
|
1031
|
-
}, []), w =
|
|
1025
|
+
}, []), w = l(() => {
|
|
1032
1026
|
if (!s.current.isDragging) return;
|
|
1033
|
-
let e = g.current ?? 0, t =
|
|
1027
|
+
let e = g.current ?? 0, t = f.current ?? 0;
|
|
1034
1028
|
if (s.current.isDragging = !1, !t || s.current.isVerticalScroll) return;
|
|
1035
1029
|
let n = J(t), r = e - s.current.startTranslateX, a = Date.now() - s.current.startTime, c = Math.abs(r) / a, l = Math.abs(r) > t * .35 || c > .3, u;
|
|
1036
1030
|
u = l ? r > 0 ? Math.ceil(e / n) * n : Math.floor(e / n) * n : Math.round(e / n) * n, o(!0), i(u);
|
|
1037
|
-
}, [
|
|
1031
|
+
}, [f, g]), T = l(() => {
|
|
1038
1032
|
o(!1);
|
|
1039
|
-
let e = g.current ?? 0, t =
|
|
1033
|
+
let e = g.current ?? 0, t = f.current ?? 0, n = c.current, r = u.current;
|
|
1040
1034
|
if (t > 0 && n && r) {
|
|
1041
1035
|
let a = J(t), o = -e / a, s = Math.round(o);
|
|
1042
1036
|
if (s !== 0) {
|
|
@@ -1045,19 +1039,19 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
|
1045
1039
|
}
|
|
1046
1040
|
}
|
|
1047
1041
|
}, [
|
|
1048
|
-
|
|
1042
|
+
f,
|
|
1049
1043
|
g,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
]), E =
|
|
1044
|
+
c,
|
|
1045
|
+
u
|
|
1046
|
+
]), E = l(() => {
|
|
1053
1047
|
i(0), o(!1);
|
|
1054
1048
|
}, []);
|
|
1055
1049
|
return {
|
|
1056
|
-
visibleDays:
|
|
1050
|
+
visibleDays: v,
|
|
1057
1051
|
offsetX: r,
|
|
1058
1052
|
trackTransformX: x,
|
|
1059
1053
|
transitionEnabled: a,
|
|
1060
|
-
bindEvents:
|
|
1054
|
+
bindEvents: p(() => ({
|
|
1061
1055
|
onTouchStart: S,
|
|
1062
1056
|
onTouchMove: C,
|
|
1063
1057
|
onTouchEnd: w,
|
|
@@ -1074,14 +1068,14 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
|
|
|
1074
1068
|
}
|
|
1075
1069
|
//#endregion
|
|
1076
1070
|
//#region src/components/Calendar/CalendarThreeDay/ThreeDayCarousel.context.tsx
|
|
1077
|
-
var Ge =
|
|
1078
|
-
let n =
|
|
1079
|
-
return /* @__PURE__ */
|
|
1071
|
+
var Ge = s(null), Ke = ({ children: e, value: t }) => {
|
|
1072
|
+
let n = p(() => t, [t]);
|
|
1073
|
+
return /* @__PURE__ */ g(Ge.Provider, {
|
|
1080
1074
|
value: n,
|
|
1081
1075
|
children: e
|
|
1082
1076
|
});
|
|
1083
1077
|
}, Y = () => {
|
|
1084
|
-
let e =
|
|
1078
|
+
let e = u(Ge);
|
|
1085
1079
|
if (!e) throw Error("useThreeDayCarouselContext must be used within a ThreeDayCarouselProvider");
|
|
1086
1080
|
return e;
|
|
1087
1081
|
}, X = {
|
|
@@ -1120,39 +1114,39 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
|
|
|
1120
1114
|
"bsy-mobile-calendar-threeday__now-line": "_bsy-mobile-calendar-threeday__now-line_1alic_197",
|
|
1121
1115
|
"bsy-mobile-calendar-threeday__now-dot": "_bsy-mobile-calendar-threeday__now-dot_1alic_206"
|
|
1122
1116
|
}, qe = () => {
|
|
1123
|
-
let { visibleDays: t, trackTransformX:
|
|
1124
|
-
transform: `translateX(${
|
|
1125
|
-
transition: i ? `transform ${
|
|
1126
|
-
}), [
|
|
1127
|
-
return /* @__PURE__ */
|
|
1117
|
+
let { visibleDays: t, trackTransformX: n, transitionEnabled: i, bindEvents: a, handleTransitionEnd: o, columnWidth: s, getColumnLeft: c } = Y(), { timeZone: l, timezoneLabel: u } = w(), { t: d } = e(), f = p(() => r(l).startOf("day"), [l]), m = p(() => ({
|
|
1118
|
+
transform: `translateX(${n}px)`,
|
|
1119
|
+
transition: i ? `transform ${O} ${k}` : "none"
|
|
1120
|
+
}), [n, i]);
|
|
1121
|
+
return /* @__PURE__ */ _("div", {
|
|
1128
1122
|
className: X["bsy-mobile-calendar-threeday__header"],
|
|
1129
|
-
children: [/* @__PURE__ */
|
|
1123
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1130
1124
|
className: X["bsy-mobile-calendar-threeday__tz"],
|
|
1131
|
-
children: [/* @__PURE__ */
|
|
1125
|
+
children: [/* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__tz-empty"] }), /* @__PURE__ */ g("div", {
|
|
1132
1126
|
className: X["bsy-mobile-calendar-threeday__tz-label"],
|
|
1133
1127
|
children: u
|
|
1134
1128
|
})]
|
|
1135
|
-
}), /* @__PURE__ */
|
|
1129
|
+
}), /* @__PURE__ */ g("div", {
|
|
1136
1130
|
className: X["bsy-mobile-calendar-threeday__dates"],
|
|
1137
1131
|
...a,
|
|
1138
|
-
children: /* @__PURE__ */
|
|
1132
|
+
children: /* @__PURE__ */ g("div", {
|
|
1139
1133
|
className: X["bsy-mobile-calendar-threeday__dates-track"],
|
|
1140
1134
|
style: m,
|
|
1141
1135
|
onTransitionEnd: o,
|
|
1142
1136
|
children: t.map(({ date: e, offset: t }) => {
|
|
1143
|
-
let n = e.isSame(
|
|
1144
|
-
return /* @__PURE__ */
|
|
1137
|
+
let n = e.isSame(f, "day"), r = e.isBefore(f, "day"), i = e.isoWeekday(), a = c(t);
|
|
1138
|
+
return /* @__PURE__ */ _("div", {
|
|
1145
1139
|
className: X["bsy-mobile-calendar-threeday__date-col"],
|
|
1146
1140
|
style: {
|
|
1147
1141
|
position: "absolute",
|
|
1148
1142
|
left: a,
|
|
1149
1143
|
width: s
|
|
1150
1144
|
},
|
|
1151
|
-
children: [/* @__PURE__ */
|
|
1152
|
-
className:
|
|
1145
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1146
|
+
className: P(X["bsy-mobile-calendar-threeday__weekday"], n && X["bsy-mobile-calendar-threeday__weekday--today"], !n && r && X["bsy-mobile-calendar-threeday__weekday--past"]),
|
|
1153
1147
|
children: d(`calendar.weekdayPrefixed.${i}`)
|
|
1154
|
-
}), /* @__PURE__ */
|
|
1155
|
-
className:
|
|
1148
|
+
}), /* @__PURE__ */ g("div", {
|
|
1149
|
+
className: P(X["bsy-mobile-calendar-threeday__date-num"], n && X["bsy-mobile-calendar-threeday__date-num--today"], !n && r && X["bsy-mobile-calendar-threeday__date-num--past"], !n && !r && X["bsy-mobile-calendar-threeday__date-num--future"]),
|
|
1156
1150
|
children: e.date()
|
|
1157
1151
|
})]
|
|
1158
1152
|
}, e.format("YYYY-MM-DD"));
|
|
@@ -1164,16 +1158,16 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
|
|
|
1164
1158
|
interval: 60,
|
|
1165
1159
|
rowHeight: 60
|
|
1166
1160
|
}, Xe = 4, Ze = 8, Qe = 4, Z = 8, $e = (e) => {
|
|
1167
|
-
let t =
|
|
1161
|
+
let t = x(e.startTime), n = x(e.endTime);
|
|
1168
1162
|
return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
|
|
1169
|
-
}, et = (e, t, n) => Math.min(Math.max(e, t), n), tt = ({ events: e, currentDate:
|
|
1170
|
-
let { timeZone: a } = w(), { visibleDays: o, trackTransformX: s, transitionEnabled: c, bindEvents: l, columnWidth:
|
|
1163
|
+
}, et = (e, t, n) => Math.min(Math.max(e, t), n), tt = ({ events: e, currentDate: t, onEventClick: i }) => {
|
|
1164
|
+
let { timeZone: a } = w(), { visibleDays: o, trackTransformX: s, transitionEnabled: c, bindEvents: l, columnWidth: u, getColumnLeft: f } = Y(), v = m(null), y = m(null), [b, S] = h(() => Date.now()), C = p(() => r(a).startOf("day"), [a]), T = p(() => o.map(({ date: t, offset: n }, r) => ({
|
|
1171
1165
|
date: t,
|
|
1172
1166
|
offset: n,
|
|
1173
|
-
layout: Fe(e.filter((e) =>
|
|
1167
|
+
layout: Fe(e.filter((e) => x(e.startTime).isSame(t, "day") || x(e.startTime).isBefore(t, "day") && x(e.endTime).isAfter(t, "day")), Ye),
|
|
1174
1168
|
isFirstVisibleDay: r === 2
|
|
1175
|
-
})), [o, e]), E =
|
|
1176
|
-
|
|
1169
|
+
})), [o, e]), E = p(() => new Map(e.map((e) => [e.id, e])), [e]), D = p(() => o.findIndex(({ date: e }) => e.isSame(C, "day")), [o, C]), A = p(() => x(t).isSame(C, "day"), [t, C]);
|
|
1170
|
+
d(() => {
|
|
1177
1171
|
if (D === -1) {
|
|
1178
1172
|
y.current = null;
|
|
1179
1173
|
return;
|
|
@@ -1182,67 +1176,67 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
|
|
|
1182
1176
|
let e = window.setInterval(() => S(Date.now()), 60 * 1e3);
|
|
1183
1177
|
return () => window.clearInterval(e);
|
|
1184
1178
|
}, [D]);
|
|
1185
|
-
let j =
|
|
1179
|
+
let j = p(() => {
|
|
1186
1180
|
if (D === -1) return null;
|
|
1187
|
-
let e =
|
|
1181
|
+
let e = n(b, a);
|
|
1188
1182
|
return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
|
|
1189
1183
|
}, [
|
|
1190
1184
|
D,
|
|
1191
|
-
|
|
1185
|
+
b,
|
|
1192
1186
|
a
|
|
1193
|
-
]), M =
|
|
1194
|
-
|
|
1195
|
-
if (!
|
|
1196
|
-
let e =
|
|
1187
|
+
]), M = p(() => j === null ? null : j - 20, [j]);
|
|
1188
|
+
d(() => {
|
|
1189
|
+
if (!A || !v.current || j === null) return;
|
|
1190
|
+
let e = x(t).format("YYYY-MM-DD");
|
|
1197
1191
|
if (y.current === e) return;
|
|
1198
|
-
let
|
|
1199
|
-
|
|
1192
|
+
let n = v.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
|
|
1193
|
+
n.scrollTop = et(j - n.clientHeight * .35, 0, r), y.current = e;
|
|
1200
1194
|
}, [
|
|
1201
|
-
|
|
1202
|
-
|
|
1195
|
+
t,
|
|
1196
|
+
A,
|
|
1203
1197
|
j
|
|
1204
1198
|
]);
|
|
1205
|
-
let N =
|
|
1199
|
+
let N = p(() => ({
|
|
1206
1200
|
transform: `translateX(${s}px)`,
|
|
1207
|
-
transition: c ? `transform ${
|
|
1201
|
+
transition: c ? `transform ${O} ${k}` : "none"
|
|
1208
1202
|
}), [s, c]);
|
|
1209
|
-
return /* @__PURE__ */
|
|
1203
|
+
return /* @__PURE__ */ g("div", {
|
|
1210
1204
|
className: X["bsy-mobile-calendar-threeday__body"],
|
|
1211
1205
|
ref: v,
|
|
1212
|
-
children: /* @__PURE__ */
|
|
1206
|
+
children: /* @__PURE__ */ _("div", {
|
|
1213
1207
|
className: X["bsy-mobile-calendar-threeday__body-content"],
|
|
1214
|
-
children: [/* @__PURE__ */
|
|
1208
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1215
1209
|
className: X["bsy-mobile-calendar-threeday__body-time"],
|
|
1216
|
-
children: Je.map((e, t) => /* @__PURE__ */
|
|
1210
|
+
children: Je.map((e, t) => /* @__PURE__ */ g("div", {
|
|
1217
1211
|
className: X["bsy-mobile-calendar-threeday__time-label"],
|
|
1218
1212
|
style: { top: 20 + t * 60 },
|
|
1219
1213
|
children: e
|
|
1220
1214
|
}, e))
|
|
1221
|
-
}), /* @__PURE__ */
|
|
1215
|
+
}), /* @__PURE__ */ g("div", {
|
|
1222
1216
|
className: X["bsy-mobile-calendar-threeday__grid"],
|
|
1223
1217
|
...l,
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1218
|
+
children: /* @__PURE__ */ g("div", {
|
|
1225
1219
|
className: X["bsy-mobile-calendar-threeday__grid-track"],
|
|
1226
1220
|
style: N,
|
|
1227
1221
|
children: T.map((e) => {
|
|
1228
|
-
let { date: t, offset: n, layout: r, isFirstVisibleDay: a } = e, o = r.timedEvents ?? [], s = t.isSame(C, "day"), c =
|
|
1229
|
-
return /* @__PURE__ */
|
|
1222
|
+
let { date: t, offset: n, layout: r, isFirstVisibleDay: a } = e, o = r.timedEvents ?? [], s = t.isSame(C, "day"), c = f(n);
|
|
1223
|
+
return /* @__PURE__ */ _("div", {
|
|
1230
1224
|
className: X["bsy-mobile-calendar-threeday__day-col"],
|
|
1231
1225
|
style: {
|
|
1232
1226
|
position: "absolute",
|
|
1233
1227
|
left: c,
|
|
1234
|
-
width:
|
|
1228
|
+
width: u
|
|
1235
1229
|
},
|
|
1236
1230
|
children: [
|
|
1237
|
-
/* @__PURE__ */
|
|
1238
|
-
Je.map((e) => /* @__PURE__ */
|
|
1239
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ g("div", { style: { height: 20 } }),
|
|
1232
|
+
Je.map((e) => /* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__hour-cell"] }, e)),
|
|
1233
|
+
/* @__PURE__ */ _("div", {
|
|
1240
1234
|
className: X["bsy-mobile-calendar-threeday__timed-layer"],
|
|
1241
1235
|
children: [o.map((e) => {
|
|
1242
|
-
let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns:
|
|
1236
|
+
let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns: d } = e, f = E.get(t.id);
|
|
1243
1237
|
if (!f) return null;
|
|
1244
|
-
let p = a ? Ze : Qe, m = Math.max(0,
|
|
1245
|
-
return /* @__PURE__ */
|
|
1238
|
+
let p = a ? Ze : Qe, m = Math.max(0, u - p), h = Math.max(d ?? 1, 1), _ = Math.max(0, s - p), v = Math.max(Z, m - (h - 1) * Z), y = et(_, Math.min(Z, m), Math.min(m, v)), b = Math.max(0, m - y), x = (h > 1 ? (l ?? 0) / (h - 1) : 0) * b, S = a ? x + Xe : x;
|
|
1239
|
+
return /* @__PURE__ */ g(I, {
|
|
1246
1240
|
className: X["bsy-mobile-calendar-threeday__timed-item"],
|
|
1247
1241
|
label: t.label,
|
|
1248
1242
|
timeText: $e(f),
|
|
@@ -1255,10 +1249,10 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
|
|
|
1255
1249
|
},
|
|
1256
1250
|
onClick: () => i?.(f)
|
|
1257
1251
|
}, t.id);
|
|
1258
|
-
}), s && M !== null ? /* @__PURE__ */
|
|
1252
|
+
}), s && M !== null ? /* @__PURE__ */ g("div", {
|
|
1259
1253
|
className: X["bsy-mobile-calendar-threeday__now-line"],
|
|
1260
1254
|
style: { top: M },
|
|
1261
|
-
children: /* @__PURE__ */
|
|
1255
|
+
children: /* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__now-dot"] })
|
|
1262
1256
|
}) : null]
|
|
1263
1257
|
})
|
|
1264
1258
|
]
|
|
@@ -1272,7 +1266,7 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
|
|
|
1272
1266
|
//#endregion
|
|
1273
1267
|
//#region src/components/Calendar/utils/threeDaysAlgorithm.ts
|
|
1274
1268
|
function nt(e, t) {
|
|
1275
|
-
let n = t.startOf("day"), r =
|
|
1269
|
+
let n = t.startOf("day"), r = x(e.startTime), i = x(e.endTime), a = r.startOf("day").diff(n, "day"), o = i.hour() === 0 && i.minute() === 0 && i.second() === 0 ? i.startOf("day").diff(n, "day") : i.startOf("day").add(1, "day").diff(n, "day");
|
|
1276
1270
|
return {
|
|
1277
1271
|
event: e,
|
|
1278
1272
|
startCol: a,
|
|
@@ -1329,14 +1323,14 @@ function st(e, t, n) {
|
|
|
1329
1323
|
return i;
|
|
1330
1324
|
}
|
|
1331
1325
|
var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
1332
|
-
let { offsetX: r, transitionEnabled: i, bindEvents: a, columnWidth: o } = Y(), [s, c] =
|
|
1326
|
+
let { offsetX: r, transitionEnabled: i, bindEvents: a, columnWidth: o } = Y(), [s, c] = h(!1), l = p(() => it(e, t), [e, t]), u = p(() => {
|
|
1333
1327
|
let e = l.filter((e) => ot(e.startCol, e.endCol, r, o).visible);
|
|
1334
1328
|
return e.length === 0 ? -1 : Math.max(...e.map((e) => e.row));
|
|
1335
1329
|
}, [
|
|
1336
1330
|
l,
|
|
1337
1331
|
r,
|
|
1338
1332
|
o
|
|
1339
|
-
]) + 1, d = u > 3,
|
|
1333
|
+
]) + 1, d = u > 3, f = s && u > 8, m = s ? Math.min(u, 8) : Math.min(u, 3), v = p(() => s || !d ? [
|
|
1340
1334
|
0,
|
|
1341
1335
|
0,
|
|
1342
1336
|
0
|
|
@@ -1346,29 +1340,29 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
|
1346
1340
|
o,
|
|
1347
1341
|
s,
|
|
1348
1342
|
d
|
|
1349
|
-
]), y = !s && d && v.some((e) => e > 0), b =
|
|
1343
|
+
]), y = !s && d && v.some((e) => e > 0), b = p(() => u === 0 ? 0 : m * A + (y ? at : 0) + 8, [
|
|
1350
1344
|
u,
|
|
1351
|
-
|
|
1345
|
+
m,
|
|
1352
1346
|
y
|
|
1353
|
-
]), x =
|
|
1347
|
+
]), x = p(() => u === 0 ? 0 : f ? u * A : m * A + (y ? at : 0), [
|
|
1354
1348
|
u,
|
|
1355
|
-
|
|
1349
|
+
m,
|
|
1356
1350
|
y,
|
|
1357
|
-
|
|
1351
|
+
f
|
|
1358
1352
|
]), S = J(o);
|
|
1359
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ _("div", {
|
|
1360
1354
|
className: X["bsy-mobile-calendar-threeday__allday"],
|
|
1361
1355
|
style: { height: b },
|
|
1362
|
-
children: [s && d ? /* @__PURE__ */
|
|
1356
|
+
children: [s && d ? /* @__PURE__ */ g("div", {
|
|
1363
1357
|
className: X["bsy-mobile-calendar-threeday__collapse"],
|
|
1364
1358
|
onClick: () => c(!1),
|
|
1365
|
-
children: /* @__PURE__ */
|
|
1359
|
+
children: /* @__PURE__ */ g("svg", {
|
|
1366
1360
|
width: "16",
|
|
1367
1361
|
height: "16",
|
|
1368
1362
|
viewBox: "0 0 16 16",
|
|
1369
1363
|
fill: "none",
|
|
1370
1364
|
style: { transform: "rotate(180deg)" },
|
|
1371
|
-
children: /* @__PURE__ */
|
|
1365
|
+
children: /* @__PURE__ */ g("path", {
|
|
1372
1366
|
d: "M4 6L8 10L12 6",
|
|
1373
1367
|
stroke: "currentColor",
|
|
1374
1368
|
strokeWidth: "1.5",
|
|
@@ -1376,24 +1370,24 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
|
1376
1370
|
strokeLinejoin: "round"
|
|
1377
1371
|
})
|
|
1378
1372
|
})
|
|
1379
|
-
}) : null, /* @__PURE__ */
|
|
1373
|
+
}) : null, /* @__PURE__ */ g("div", {
|
|
1380
1374
|
className: X["bsy-mobile-calendar-threeday__allday-area"],
|
|
1381
|
-
style:
|
|
1375
|
+
style: f ? {
|
|
1382
1376
|
overflowY: "auto",
|
|
1383
|
-
maxHeight: 8 *
|
|
1377
|
+
maxHeight: 8 * A
|
|
1384
1378
|
} : void 0,
|
|
1385
1379
|
...a,
|
|
1386
|
-
children: /* @__PURE__ */
|
|
1380
|
+
children: /* @__PURE__ */ _("div", {
|
|
1387
1381
|
className: X["bsy-mobile-calendar-threeday__allday-track"],
|
|
1388
1382
|
style: {
|
|
1389
1383
|
height: x,
|
|
1390
|
-
transition: i ? `height ${
|
|
1384
|
+
transition: i ? `height ${O} ${k}` : "none"
|
|
1391
1385
|
},
|
|
1392
1386
|
children: [l.map((e) => {
|
|
1393
1387
|
let { event: t, startCol: i, endCol: a, row: c } = e;
|
|
1394
1388
|
if (!s && c >= 3) return null;
|
|
1395
1389
|
let l = ot(i, a, r, o);
|
|
1396
|
-
return l.visible ? /* @__PURE__ */
|
|
1390
|
+
return l.visible ? /* @__PURE__ */ g(I, {
|
|
1397
1391
|
className: X["bsy-mobile-calendar-threeday__allday-card"],
|
|
1398
1392
|
label: t.label,
|
|
1399
1393
|
variant: "allDay",
|
|
@@ -1404,22 +1398,22 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
|
1404
1398
|
style: {
|
|
1405
1399
|
left: l.left,
|
|
1406
1400
|
width: l.width - 4,
|
|
1407
|
-
top: c *
|
|
1401
|
+
top: c * A + 4
|
|
1408
1402
|
},
|
|
1409
1403
|
onClick: () => n?.(t)
|
|
1410
1404
|
}, t.id) : null;
|
|
1411
1405
|
}), y ? v.map((e, t) => {
|
|
1412
1406
|
if (e === 0) return null;
|
|
1413
1407
|
let n = t * S;
|
|
1414
|
-
return /* @__PURE__ */
|
|
1408
|
+
return /* @__PURE__ */ g("div", {
|
|
1415
1409
|
className: X["bsy-mobile-calendar-threeday__expand-btn"],
|
|
1416
1410
|
style: {
|
|
1417
1411
|
left: n,
|
|
1418
1412
|
width: o - 4,
|
|
1419
|
-
top: 3 *
|
|
1413
|
+
top: 3 * A + 4
|
|
1420
1414
|
},
|
|
1421
1415
|
onClick: () => c(!0),
|
|
1422
|
-
children: /* @__PURE__ */
|
|
1416
|
+
children: /* @__PURE__ */ _("span", { children: [
|
|
1423
1417
|
"还有",
|
|
1424
1418
|
e,
|
|
1425
1419
|
"条记录"
|
|
@@ -1430,60 +1424,60 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
|
1430
1424
|
})]
|
|
1431
1425
|
});
|
|
1432
1426
|
}, lt = () => {
|
|
1433
|
-
let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i =
|
|
1427
|
+
let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = m(null), a = b(i), o = p(() => a?.width ? (a.width - 56 - 8 - 8) / 3 : 0, [a?.width]), s = p(() => x(e), [e]), { visibleDays: c, offsetX: u, trackTransformX: d, transitionEnabled: f, bindEvents: h, handleTransitionEnd: v, getColumnLeft: y, resetPosition: S } = We({
|
|
1434
1428
|
baseDate: s,
|
|
1435
|
-
setBaseDate:
|
|
1429
|
+
setBaseDate: l((e) => {
|
|
1436
1430
|
t(e.toDate());
|
|
1437
1431
|
}, [t]),
|
|
1438
1432
|
columnWidth: o
|
|
1439
|
-
}), C =
|
|
1440
|
-
visibleDays:
|
|
1433
|
+
}), C = p(() => n.filter((e) => z(e)), [n]), T = p(() => n.filter((e) => !z(e)), [n]), E = p(() => ({
|
|
1434
|
+
visibleDays: c,
|
|
1441
1435
|
offsetX: u,
|
|
1442
1436
|
trackTransformX: d,
|
|
1443
|
-
transitionEnabled:
|
|
1444
|
-
bindEvents:
|
|
1437
|
+
transitionEnabled: f,
|
|
1438
|
+
bindEvents: h,
|
|
1445
1439
|
handleTransitionEnd: v,
|
|
1446
1440
|
columnWidth: o,
|
|
1447
|
-
getColumnLeft:
|
|
1441
|
+
getColumnLeft: y,
|
|
1448
1442
|
resetPosition: S
|
|
1449
1443
|
}), [
|
|
1450
|
-
|
|
1444
|
+
c,
|
|
1451
1445
|
u,
|
|
1452
1446
|
d,
|
|
1453
|
-
|
|
1454
|
-
|
|
1447
|
+
f,
|
|
1448
|
+
h,
|
|
1455
1449
|
v,
|
|
1456
1450
|
o,
|
|
1457
|
-
|
|
1451
|
+
y,
|
|
1458
1452
|
S
|
|
1459
1453
|
]);
|
|
1460
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ g("div", {
|
|
1461
1455
|
className: X["bsy-mobile-calendar-threeday"],
|
|
1462
1456
|
ref: i,
|
|
1463
|
-
children: o > 0 ? /* @__PURE__ */
|
|
1457
|
+
children: o > 0 ? /* @__PURE__ */ _(Ke, {
|
|
1464
1458
|
value: E,
|
|
1465
|
-
children: [/* @__PURE__ */
|
|
1459
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1466
1460
|
className: X["bsy-mobile-calendar-threeday__header-wrap"],
|
|
1467
|
-
children: [/* @__PURE__ */
|
|
1461
|
+
children: [/* @__PURE__ */ g(qe, {}), /* @__PURE__ */ g(ct, {
|
|
1468
1462
|
events: C,
|
|
1469
1463
|
baseDate: s,
|
|
1470
1464
|
onEventClick: r
|
|
1471
1465
|
})]
|
|
1472
|
-
}), /* @__PURE__ */
|
|
1466
|
+
}), /* @__PURE__ */ g(tt, {
|
|
1473
1467
|
events: T,
|
|
1474
1468
|
currentDate: e,
|
|
1475
1469
|
onEventClick: r
|
|
1476
1470
|
})]
|
|
1477
1471
|
}) : null
|
|
1478
1472
|
});
|
|
1479
|
-
}, ut = (e,
|
|
1480
|
-
let { timeZone: r } =
|
|
1481
|
-
return Array.isArray(e) ? e.map((e,
|
|
1473
|
+
}, ut = (e, t = {}) => {
|
|
1474
|
+
let { timeZone: r } = t;
|
|
1475
|
+
return Array.isArray(e) ? e.map((e, t) => ({
|
|
1482
1476
|
...e,
|
|
1483
|
-
id: e.id ?? String(
|
|
1477
|
+
id: e.id ?? String(t),
|
|
1484
1478
|
label: e.label ?? "",
|
|
1485
|
-
startTime:
|
|
1486
|
-
endTime:
|
|
1479
|
+
startTime: n(e.startTime, r),
|
|
1480
|
+
endTime: n(e.endTime, r)
|
|
1487
1481
|
})) : [];
|
|
1488
1482
|
}, Q = {
|
|
1489
1483
|
"#005EEF": {
|
|
@@ -1561,35 +1555,38 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
|
|
|
1561
1555
|
}, ht = (e, t) => {
|
|
1562
1556
|
let n = t ?? e?.colorPrimary ?? "#0265ff", r = dt(n), a = ft(n, r.normal, r.hover);
|
|
1563
1557
|
return e ? (Object.assign(a, mt(e)), i(a, "--bsy-mobile-calendar-title-color", e.colorText), i(a, "--bsy-mobile-calendar-over-title-color", e.colorTextTertiary), i(a, "--bsy-mobile-calendar-specifically-color", e.colorTextQuaternary ?? e.colorTextTertiary), i(a, "--bsy-mobile-calendar-header-background", e.colorFillSecondary), i(a, "--bsy-mobile-calendar-highlight-color", e.colorPrimary), e.colorPrimary && (a["--bsy-mobile-calendar-segmented-active-color"] = "#fff"), i(a, "--bsy-mobile-calendar-highlight-text-color", e.colorPrimaryText), i(a, "--bsy-mobile-calendar-border-color", e.colorSplit), i(a, "--bsy-mobile-calendar-more-record-color", e.colorLink), Object.assign(a, ft(e.eventBorderColor, e.eventBg, e.eventBgHover)), a) : a;
|
|
1564
|
-
}, gt =
|
|
1565
|
-
|
|
1558
|
+
}, gt = {
|
|
1559
|
+
"bsy-mobile-calendar": "_bsy-mobile-calendar_1c2fd_1",
|
|
1560
|
+
"bsy-mobile-calendar__body": "_bsy-mobile-calendar__body_1c2fd_19"
|
|
1561
|
+
}, _t = (e) => {
|
|
1562
|
+
let { events: t, scheduleColor: n, theme: i, timeZone: a, className: o, onEventClick: s, onDayClick: c } = e, [l, u] = v(e, {
|
|
1566
1563
|
defaultValue: "month",
|
|
1567
1564
|
defaultValuePropName: "defaultMode",
|
|
1568
1565
|
valuePropName: "mode",
|
|
1569
1566
|
trigger: "onModeChange"
|
|
1570
|
-
}), [d,
|
|
1571
|
-
return /* @__PURE__ */
|
|
1572
|
-
className:
|
|
1573
|
-
style:
|
|
1574
|
-
children: /* @__PURE__ */
|
|
1567
|
+
}), [d, f] = v(e, { defaultValue: r(a).toDate() }), m = p(() => ut(t, { timeZone: a }), [t, a]), h = p(() => ht(i, n), [i, n]);
|
|
1568
|
+
return /* @__PURE__ */ g("div", {
|
|
1569
|
+
className: P(gt["bsy-mobile-calendar"], o),
|
|
1570
|
+
style: h,
|
|
1571
|
+
children: /* @__PURE__ */ _(C, {
|
|
1575
1572
|
currentDate: d,
|
|
1576
|
-
setCurrentDate:
|
|
1573
|
+
setCurrentDate: f,
|
|
1577
1574
|
viewMode: l,
|
|
1578
1575
|
setViewMode: u,
|
|
1579
1576
|
timeZone: a,
|
|
1580
1577
|
events: m,
|
|
1581
1578
|
onEventClick: s,
|
|
1582
1579
|
onDayClick: c,
|
|
1583
|
-
children: [/* @__PURE__ */
|
|
1584
|
-
className:
|
|
1580
|
+
children: [/* @__PURE__ */ g(D, {}), /* @__PURE__ */ _("div", {
|
|
1581
|
+
className: gt["bsy-mobile-calendar__body"],
|
|
1585
1582
|
children: [
|
|
1586
|
-
l === "month" ? /* @__PURE__ */
|
|
1587
|
-
l === "day" ? /* @__PURE__ */
|
|
1588
|
-
l === "threeDay" ? /* @__PURE__ */
|
|
1583
|
+
l === "month" ? /* @__PURE__ */ g(Te, {}) : null,
|
|
1584
|
+
l === "day" ? /* @__PURE__ */ g(Ve, {}) : null,
|
|
1585
|
+
l === "threeDay" ? /* @__PURE__ */ g(lt, {}) : null
|
|
1589
1586
|
]
|
|
1590
1587
|
})]
|
|
1591
1588
|
})
|
|
1592
1589
|
});
|
|
1593
1590
|
};
|
|
1594
1591
|
//#endregion
|
|
1595
|
-
export {
|
|
1592
|
+
export { _t as t };
|