bitz-react-admin-ui 2.2.5 → 2.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.
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/_virtual/isoWeek.mjs +4 -0
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +25 -25
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +10 -9
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +16 -13
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +22 -18
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +8 -8
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +43 -44
- package/dist/components/BitzTable/Store/index.d.ts +5 -1
- package/dist/components/BitzTable/Store/index.mjs +159 -137
- package/dist/components/BitzTable/SubTable/index.mjs +86 -87
- package/dist/components/BitzTable/Table/SortableRow.mjs +2 -2
- package/dist/components/BitzTable/Table/index.d.ts +4 -10
- package/dist/components/BitzTable/Table/index.mjs +281 -282
- package/dist/components/BitzTable/Table/utils.d.ts +2 -2
- package/dist/components/BitzTable/Table/utils.mjs +29 -23
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +107 -107
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +5 -5
- package/dist/components/BitzTable/index.d.ts +9 -4
- package/dist/components/BitzTable/index.mjs +17 -15
- package/dist/components/BitzTable2/index.d.ts +2 -0
- package/dist/components/BitzTable2/index.mjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +34 -32
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs +34 -0
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { j as d } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useState as y, useEffect as
|
|
3
|
-
import
|
|
2
|
+
import { useState as y, useEffect as g, useMemo as j } from "react";
|
|
3
|
+
import D from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isToday.mjs";
|
|
4
4
|
import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
5
|
-
import { useBitzFuiCalendarStore as
|
|
6
|
-
import
|
|
5
|
+
import { useBitzFuiCalendarStore as M, CalendarTypeEnum as S } from "./BitzFuiCalendarStore.mjs";
|
|
6
|
+
import C from "./CalendarAgendumItem.mjs";
|
|
7
7
|
import x from "./CalendarAgendum.module.less.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
n.extend(
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import N from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
9
|
+
import z from "../BitzNoData/index.mjs";
|
|
10
|
+
n.extend(D);
|
|
11
|
+
const A = (e) => e.reduce((s, r) => {
|
|
12
|
+
const c = n(r.startTime).format("YYYY-MM-DD");
|
|
13
|
+
let i = s.find((t) => t.date === c);
|
|
14
|
+
return i || (i = { date: c, list: [] }, s.push(i)), i.list.push(r), s;
|
|
14
15
|
}, []), L = (e) => {
|
|
15
|
-
const { CalendarType:
|
|
16
|
-
|
|
16
|
+
const { CalendarType: u, currentDay: s } = M((t) => t), [r, c] = y([]);
|
|
17
|
+
g(() => {
|
|
17
18
|
var t, f;
|
|
18
19
|
if ((t = e == null ? void 0 : e.list) != null && t.length) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return o.isSame(
|
|
22
|
-
})
|
|
23
|
-
const m = i == null ? void 0 : i.map((a) => ({
|
|
20
|
+
const l = (f = e == null ? void 0 : e.list) == null ? void 0 : f.filter((a) => {
|
|
21
|
+
const o = n(a.startTime), T = n(a.endTime);
|
|
22
|
+
return o.isSame(s, "day") || T.isSame(s, "day");
|
|
23
|
+
}), m = l == null ? void 0 : l.map((a) => ({
|
|
24
24
|
...a,
|
|
25
25
|
startTime: n(a.startTime).utc(),
|
|
26
26
|
endTime: n(a.endTime).utc()
|
|
27
27
|
}));
|
|
28
|
-
m.sort((a, o) => n(a.startTime).isAfter(n(o.startTime)) ? 1 : -1),
|
|
28
|
+
m.sort((a, o) => n(a.startTime).isAfter(n(o.startTime)) ? 1 : -1), c(A(m));
|
|
29
29
|
}
|
|
30
|
-
}, [e == null ? void 0 : e.list,
|
|
31
|
-
const
|
|
30
|
+
}, [e == null ? void 0 : e.list, s]);
|
|
31
|
+
const i = j(() => u === S.agendum ? s.locale("zh-cn").format("MM月DD日dddd") : "", [s, u]);
|
|
32
32
|
return /* @__PURE__ */ d.jsxs("ul", { className: "calendarAgendumBlock", children: [
|
|
33
|
-
|
|
33
|
+
r == null ? void 0 : r.map((t, f) => {
|
|
34
34
|
var o;
|
|
35
|
-
const
|
|
35
|
+
const l = n(t == null ? void 0 : t.date), m = l.locale("zh-cn").format("DD日dddd"), a = n().isSame(l, "day");
|
|
36
36
|
return [
|
|
37
|
-
/* @__PURE__ */ d.jsxs("div", { className:
|
|
37
|
+
/* @__PURE__ */ d.jsxs("div", { className: N(x.timeContainer, {
|
|
38
38
|
[x.istoday]: a
|
|
39
39
|
}), children: [
|
|
40
40
|
/* @__PURE__ */ d.jsx("span", { children: m }),
|
|
@@ -43,10 +43,10 @@ const h = (e) => e.reduce((r, s) => {
|
|
|
43
43
|
/* @__PURE__ */ d.jsx("span", { children: "今天" }, "1")
|
|
44
44
|
] : null
|
|
45
45
|
] }, t == null ? void 0 : t.date),
|
|
46
|
-
(o = t == null ? void 0 : t.list) == null ? void 0 : o.map((T,
|
|
46
|
+
(o = t == null ? void 0 : t.list) == null ? void 0 : o.map((T, h) => /* @__PURE__ */ d.jsx(C, { data: T }, h))
|
|
47
47
|
];
|
|
48
48
|
}),
|
|
49
|
-
|
|
49
|
+
r.length ? null : /* @__PURE__ */ d.jsx(z, { title: `你在 ${i} 没有任何会议。` })
|
|
50
50
|
] });
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { j as i } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as c } from "react";
|
|
3
3
|
import e from "./CalendarAgendum.module.less.mjs";
|
|
4
|
-
import
|
|
5
|
-
import { Button as
|
|
4
|
+
import r from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
5
|
+
import { Button as a } from "antd";
|
|
6
6
|
const d = (_, s) => {
|
|
7
|
-
|
|
7
|
+
const t = s.diff(_, "minute");
|
|
8
|
+
let m;
|
|
8
9
|
if (t < 60)
|
|
9
10
|
m = `${t}分钟`;
|
|
10
11
|
else {
|
|
11
|
-
|
|
12
|
-
n > 0 ? m = `${
|
|
12
|
+
const l = Math.floor(t / 60), n = t % 60;
|
|
13
|
+
n > 0 ? m = `${l}小时 ${n}分钟` : m = `${l}小时`;
|
|
13
14
|
}
|
|
14
15
|
return m;
|
|
15
16
|
}, u = (_) => {
|
|
16
|
-
const { data: s } = _, t =
|
|
17
|
+
const { data: s } = _, t = c(() => d(r(s == null ? void 0 : s.startTime), r(s == null ? void 0 : s.endTime)), [s]);
|
|
17
18
|
return /* @__PURE__ */ i.jsx("li", { className: e.CalendarAgendumItem, children: /* @__PURE__ */ i.jsx("div", { className: e["ui-list__item__main"], children: /* @__PURE__ */ i.jsx("div", { className: e["ui-list__item__contentWrapper"], children: /* @__PURE__ */ i.jsx("div", { className: e["ui-list__itemcontent"], children: /* @__PURE__ */ i.jsx("div", { className: e["ui-list__item__container"], children: /* @__PURE__ */ i.jsx("div", { className: e["ui-list__item__container__wrap"], children: /* @__PURE__ */ i.jsxs("div", { className: e["ui-list__item__container__item"], children: [
|
|
18
19
|
/* @__PURE__ */ i.jsxs("div", { className: e["ui-list__item__container__item_left"], children: [
|
|
19
20
|
/* @__PURE__ */ i.jsx("div", { className: e.item_left_1, children: /* @__PURE__ */ i.jsx("div", { className: e.item_left_1_1 }) }),
|
|
20
21
|
/* @__PURE__ */ i.jsxs("div", { className: e.item_left_2, children: [
|
|
21
|
-
/* @__PURE__ */ i.jsx("div", { className: e.item_left_2_1, children:
|
|
22
|
+
/* @__PURE__ */ i.jsx("div", { className: e.item_left_2_1, children: r(s == null ? void 0 : s.startTime).format("HH:mm") }),
|
|
22
23
|
/* @__PURE__ */ i.jsx("div", { className: e.item_left_2_2, children: t })
|
|
23
24
|
] })
|
|
24
25
|
] }),
|
|
@@ -28,7 +29,7 @@ const d = (_, s) => {
|
|
|
28
29
|
/* @__PURE__ */ i.jsx("div", { className: e.item_right_1_1, children: /* @__PURE__ */ i.jsx("span", { children: "23423423423" }) }),
|
|
29
30
|
/* @__PURE__ */ i.jsx("div", { className: e.item_right_1_2, children: "Microsoft Teams Meeting" })
|
|
30
31
|
] }),
|
|
31
|
-
/* @__PURE__ */ i.jsx("div", { className: e.item_right_1_3, children: /* @__PURE__ */ i.jsx(
|
|
32
|
+
/* @__PURE__ */ i.jsx("div", { className: e.item_right_1_3, children: /* @__PURE__ */ i.jsx(a, { children: "聊天" }) })
|
|
32
33
|
] }),
|
|
33
34
|
/* @__PURE__ */ i.jsx("div", { className: e.item_right_2 })
|
|
34
35
|
] })
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { j as a } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { useState as _, useEffect as y, useMemo as f } from "react";
|
|
3
3
|
import C from "./ColumnData.mjs";
|
|
4
|
-
import { useBitzFuiCalendarStore as h, CalendarTypeEnum as
|
|
5
|
-
|
|
4
|
+
import { useBitzFuiCalendarStore as h, CalendarTypeEnum as o } from "./BitzFuiCalendarStore.mjs";
|
|
5
|
+
import j from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
6
|
+
import x from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs";
|
|
7
|
+
j.extend(x);
|
|
8
|
+
const N = (n) => {
|
|
6
9
|
const { CalendarType: s, currentDay: r } = h((e) => e), l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], [m, c] = _([]);
|
|
7
10
|
y(() => {
|
|
8
11
|
const e = [];
|
|
@@ -11,17 +14,17 @@ const v = (n) => {
|
|
|
11
14
|
c(e);
|
|
12
15
|
}, []);
|
|
13
16
|
const u = f(() => {
|
|
14
|
-
if (s ===
|
|
17
|
+
if (s === o.day)
|
|
15
18
|
return [r];
|
|
16
|
-
if (s ===
|
|
17
|
-
const e = [], t = r.startOf("
|
|
18
|
-
for (let i =
|
|
19
|
+
if (s === o.workWeek) {
|
|
20
|
+
const e = [], t = r.startOf("isoWeek");
|
|
21
|
+
for (let i = 0; i <= 4; i++)
|
|
19
22
|
e.push(t.add(i, "day"));
|
|
20
23
|
return e;
|
|
21
24
|
}
|
|
22
|
-
if (s ===
|
|
23
|
-
const e = [], t = r.startOf("
|
|
24
|
-
for (let i =
|
|
25
|
+
if (s === o.week) {
|
|
26
|
+
const e = [], t = r.startOf("isoWeek");
|
|
27
|
+
for (let i = 0; i <= 6; i++)
|
|
25
28
|
e.push(t.add(i, "day"));
|
|
26
29
|
return e;
|
|
27
30
|
}
|
|
@@ -40,21 +43,21 @@ const v = (n) => {
|
|
|
40
43
|
t + "b"
|
|
41
44
|
)) }),
|
|
42
45
|
/* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__content", children: u.map((e, t) => /* @__PURE__ */ a.jsxs("div", { className: "bitzFuiCalendarBody__content__row", children: [
|
|
43
|
-
/* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__content__row__list", children: m.map((i,
|
|
46
|
+
/* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__content__row__list", children: m.map((i, d) => /* @__PURE__ */ a.jsx(
|
|
44
47
|
"div",
|
|
45
48
|
{
|
|
46
49
|
className: "bitzFuiCalendarBody__content__row__item",
|
|
47
50
|
style: {
|
|
48
51
|
minHeight: "4.05rem",
|
|
49
|
-
borderBottomStyle:
|
|
52
|
+
borderBottomStyle: d % 2 ? "solid" : "dashed"
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
|
-
|
|
55
|
+
d
|
|
53
56
|
)) }),
|
|
54
57
|
/* @__PURE__ */ a.jsx(C, { time: e, list: n == null ? void 0 : n.data })
|
|
55
58
|
] }, t)) })
|
|
56
59
|
] }) });
|
|
57
60
|
};
|
|
58
61
|
export {
|
|
59
|
-
|
|
62
|
+
N as default
|
|
60
63
|
};
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { useBitzFuiCalendarStore as u, CalendarTypeEnum as
|
|
5
|
-
|
|
2
|
+
import m from "./CalendarHeadItem.mjs";
|
|
3
|
+
import { useMemo as d } from "react";
|
|
4
|
+
import { useBitzFuiCalendarStore as u, CalendarTypeEnum as n } from "./BitzFuiCalendarStore.mjs";
|
|
5
|
+
import f from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
6
|
+
import l from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs";
|
|
7
|
+
f.extend(l);
|
|
8
|
+
const x = () => {
|
|
6
9
|
const {
|
|
7
|
-
CalendarType:
|
|
10
|
+
CalendarType: a,
|
|
8
11
|
currentDay: t
|
|
9
|
-
} = u((e) => e),
|
|
10
|
-
if (
|
|
12
|
+
} = u((e) => e), i = d(() => {
|
|
13
|
+
if (a === n.day)
|
|
11
14
|
return [t];
|
|
12
|
-
if (
|
|
13
|
-
const e = [],
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
if (a === n.workWeek) {
|
|
16
|
+
const e = [], o = t.startOf("isoWeek");
|
|
17
|
+
console.log("currentDay", t.format("YYYY-MM-DD")), console.log("time", o.format("YYYY-MM-DD"));
|
|
18
|
+
for (let r = 0; r <= 4; r++)
|
|
19
|
+
e.push(o.add(r, "day"));
|
|
16
20
|
return e;
|
|
17
21
|
}
|
|
18
|
-
if (
|
|
19
|
-
const e = [],
|
|
20
|
-
for (let r =
|
|
21
|
-
e.push(
|
|
22
|
+
if (a === n.week) {
|
|
23
|
+
const e = [], o = t.startOf("isoWeek");
|
|
24
|
+
for (let r = 0; r <= 6; r++)
|
|
25
|
+
e.push(o.add(r, "day"));
|
|
22
26
|
return e;
|
|
23
27
|
}
|
|
24
28
|
return [t];
|
|
25
|
-
}, [
|
|
26
|
-
return /* @__PURE__ */ s.jsx("div", { className: "bitzFuiCalendarHead", children:
|
|
29
|
+
}, [a, t]);
|
|
30
|
+
return /* @__PURE__ */ s.jsx("div", { className: "bitzFuiCalendarHead", children: i.map((e, o) => /* @__PURE__ */ s.jsx(m, { time: e }, o)) });
|
|
27
31
|
};
|
|
28
32
|
export {
|
|
29
|
-
|
|
33
|
+
x as default
|
|
30
34
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { memo as C, useMemo as i } from "react";
|
|
3
|
-
import { Space as c, Button as
|
|
3
|
+
import { Space as c, Button as s, DatePicker as b, Dropdown as h } from "antd";
|
|
4
4
|
import { useBitzFuiCalendarStore as w, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
|
|
5
5
|
import g from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import T from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
|
|
@@ -13,7 +13,7 @@ const z = () => {
|
|
|
13
13
|
currentDay: d,
|
|
14
14
|
toggleCalendarType: u,
|
|
15
15
|
setCurrentDay: l
|
|
16
|
-
} = w((r) => r),
|
|
16
|
+
} = w((r) => r), o = [
|
|
17
17
|
{
|
|
18
18
|
key: a.day,
|
|
19
19
|
label: "日"
|
|
@@ -33,8 +33,8 @@ const z = () => {
|
|
|
33
33
|
}
|
|
34
34
|
], m = i(() => {
|
|
35
35
|
var r;
|
|
36
|
-
return ((r =
|
|
37
|
-
}, [n]), k = (r) => {
|
|
36
|
+
return ((r = o.find((t) => (t == null ? void 0 : t.key) === n)) == null ? void 0 : r.label) ?? "";
|
|
37
|
+
}, [n, o]), k = (r) => {
|
|
38
38
|
u(r.key);
|
|
39
39
|
}, f = i(() => {
|
|
40
40
|
switch (n) {
|
|
@@ -60,9 +60,9 @@ const z = () => {
|
|
|
60
60
|
};
|
|
61
61
|
return /* @__PURE__ */ e.jsxs("div", { className: "bitzFuiCalendarToolbar", children: [
|
|
62
62
|
/* @__PURE__ */ e.jsx("div", { className: "bitzFuiCalendarToolbar__left", children: /* @__PURE__ */ e.jsxs(c, { children: [
|
|
63
|
-
/* @__PURE__ */ e.jsx("div", { className: "bitzFuiCalendarToolbar__today", children: /* @__PURE__ */ e.jsx(
|
|
64
|
-
/* @__PURE__ */ e.jsx(
|
|
65
|
-
/* @__PURE__ */ e.jsx(
|
|
63
|
+
/* @__PURE__ */ e.jsx("div", { className: "bitzFuiCalendarToolbar__today", children: /* @__PURE__ */ e.jsx(s, { onClick: j, type: "text", icon: /* @__PURE__ */ e.jsx(T, {}), children: "今天" }) }),
|
|
64
|
+
/* @__PURE__ */ e.jsx(s, { onClick: x, icon: /* @__PURE__ */ e.jsx(v, {}) }),
|
|
65
|
+
/* @__PURE__ */ e.jsx(s, { onClick: p, icon: /* @__PURE__ */ e.jsx(_, {}) }),
|
|
66
66
|
/* @__PURE__ */ e.jsx(
|
|
67
67
|
b,
|
|
68
68
|
{
|
|
@@ -79,7 +79,7 @@ const z = () => {
|
|
|
79
79
|
h,
|
|
80
80
|
{
|
|
81
81
|
menu: {
|
|
82
|
-
items:
|
|
82
|
+
items: o,
|
|
83
83
|
selectable: !0,
|
|
84
84
|
defaultSelectedKeys: [n],
|
|
85
85
|
onClick: k
|
|
@@ -1,88 +1,87 @@
|
|
|
1
1
|
import { j as C } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useBitzFuiCalendarStore as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { memo as $, useRef as k, useState as H, useEffect as O } from "react";
|
|
3
|
+
import M from "./FuiCalendarItem.mjs";
|
|
4
|
+
import E from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
|
|
5
|
+
import Y from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrBefore.mjs";
|
|
6
|
+
import b from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
|
|
7
|
+
import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
|
|
8
|
+
import { useBitzFuiCalendarStore as F } from "./BitzFuiCalendarStore.mjs";
|
|
9
|
+
n.extend(b);
|
|
10
|
+
n.extend(Y);
|
|
11
|
+
n.extend(E);
|
|
12
12
|
const x = 1440;
|
|
13
|
-
function
|
|
13
|
+
function z(i) {
|
|
14
14
|
const a = [];
|
|
15
|
-
return i.forEach((
|
|
16
|
-
const l =
|
|
15
|
+
return i.forEach((c) => {
|
|
16
|
+
const l = n(c.startTime), f = n(c.endTime);
|
|
17
17
|
let u = !1;
|
|
18
18
|
for (let d = 0; d < a.length; d++) {
|
|
19
19
|
const h = a[d];
|
|
20
20
|
let g = !1;
|
|
21
21
|
for (let e = 0; e < h.length; e++) {
|
|
22
|
-
const
|
|
23
|
-
if (l.isSameOrAfter(t) && l.isBefore(s) ||
|
|
22
|
+
const r = h[e], t = n(r.startTime), s = n(r.endTime);
|
|
23
|
+
if (l.isSameOrAfter(t) && l.isBefore(s) || f.isAfter(t) && f.isSameOrBefore(s) || t.isSameOrAfter(l) && t.isBefore(f) || s.isAfter(l) && s.isSameOrBefore(f)) {
|
|
24
24
|
g = !0;
|
|
25
25
|
break;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
if (!g) {
|
|
29
|
-
h.push(
|
|
29
|
+
h.push(c), u = !0;
|
|
30
30
|
break;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
u || a.push([
|
|
33
|
+
u || a.push([c]);
|
|
34
34
|
}), a;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const w = (i) => {
|
|
37
37
|
const { time: a } = i, {
|
|
38
|
-
colHeight:
|
|
38
|
+
colHeight: c,
|
|
39
39
|
setColHeight: l
|
|
40
|
-
} =
|
|
40
|
+
} = F((e) => e), f = k(null), u = 194.4, [d, h] = H([]);
|
|
41
41
|
O(() => {
|
|
42
|
-
var e,
|
|
42
|
+
var e, r;
|
|
43
43
|
if ((e = i == null ? void 0 : i.list) != null && e.length) {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const t = (r = i == null ? void 0 : i.list) == null ? void 0 : r.filter((o) => {
|
|
45
|
+
const T = n(o.startTime), S = n(o.endTime);
|
|
46
46
|
return T.isSame(a, "day") || S.isSame(a, "day");
|
|
47
|
-
})
|
|
48
|
-
const s = t == null ? void 0 : t.map((o) => ({
|
|
47
|
+
}), s = t == null ? void 0 : t.map((o) => ({
|
|
49
48
|
...o,
|
|
50
|
-
startTime:
|
|
51
|
-
endTime:
|
|
52
|
-
})), m =
|
|
53
|
-
h(m);
|
|
49
|
+
startTime: n(o.startTime),
|
|
50
|
+
endTime: n(o.endTime)
|
|
51
|
+
})), m = z(s);
|
|
52
|
+
console.log(a.format("YYYY-MM-DD"), m), h(m);
|
|
54
53
|
}
|
|
55
54
|
}, [i == null ? void 0 : i.list, a]), O(() => {
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
const e = ((
|
|
55
|
+
c || setTimeout(() => {
|
|
56
|
+
var r;
|
|
57
|
+
const e = ((r = f.current) == null ? void 0 : r.getBoundingClientRect().height) ?? 0;
|
|
59
58
|
l(e);
|
|
60
59
|
}, 0);
|
|
61
|
-
}, [c
|
|
62
|
-
const g = (e,
|
|
63
|
-
let m =
|
|
60
|
+
}, [c]);
|
|
61
|
+
const g = (e, r, t, s) => {
|
|
62
|
+
let m = n(e), o = n(r);
|
|
64
63
|
const T = a.startOf("day");
|
|
65
64
|
m.isBefore(T) && (m = T);
|
|
66
65
|
const S = a.endOf("day");
|
|
67
66
|
o.isAfter(S) && (o = S);
|
|
68
|
-
const B = m.hour() * 60 + m.minute(), y = o.diff(m, "minute"), j = B / x * u, A = y / x * u,
|
|
67
|
+
const B = m.hour() * 60 + m.minute(), y = o.diff(m, "minute"), j = B / x * u, A = y / x * u, D = u / x * y, R = (s - t - 1) / s * 100, _ = t / s * 100;
|
|
69
68
|
return {
|
|
70
|
-
right: `${
|
|
71
|
-
left: `${
|
|
69
|
+
right: `${R}%`,
|
|
70
|
+
left: `${_}%`,
|
|
72
71
|
top: `${j}rem`,
|
|
73
72
|
height: `${A}rem`,
|
|
74
|
-
maxHeight: `${
|
|
73
|
+
maxHeight: `${D}rem`
|
|
75
74
|
};
|
|
76
75
|
};
|
|
77
|
-
return /* @__PURE__ */ C.jsx("div", { className: "bitzFuiCalendarBody__content__row__list2", ref:
|
|
76
|
+
return /* @__PURE__ */ C.jsx("div", { className: "bitzFuiCalendarBody__content__row__list2", ref: f, children: d.map((e, r) => e.map((t, s) => {
|
|
78
77
|
const { maxHeight: m, ...o } = g(
|
|
79
78
|
t.startTime,
|
|
80
79
|
t.endTime,
|
|
81
|
-
|
|
80
|
+
r,
|
|
82
81
|
d.length
|
|
83
82
|
);
|
|
84
83
|
return /* @__PURE__ */ C.jsx(
|
|
85
|
-
|
|
84
|
+
M,
|
|
86
85
|
{
|
|
87
86
|
event: t,
|
|
88
87
|
style: o,
|
|
@@ -91,7 +90,7 @@ const I = (i) => {
|
|
|
91
90
|
s
|
|
92
91
|
);
|
|
93
92
|
})) });
|
|
94
|
-
},
|
|
93
|
+
}, Q = $(w);
|
|
95
94
|
export {
|
|
96
|
-
|
|
95
|
+
Q as default
|
|
97
96
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnsConfigProps, BitzTableColumnsType } from '..';
|
|
2
|
+
import { ColumnsConfigProps, BitzTableColumnsType, BitzTableColumnType } from '..';
|
|
3
3
|
import { BitzTableBorderedType, StylesConfigScopeType } from '../../BitzConfigProvider/context';
|
|
4
|
+
export declare const SORTER_COLUMN: BitzTableColumnType;
|
|
5
|
+
export declare const toolCols: {}[];
|
|
4
6
|
export type DensitySize = 'xl' | 'lg' | 'md' | 'sm' | 'xs' | undefined;
|
|
5
7
|
export type ColumnStateType<TableKey extends string = any> = {
|
|
6
8
|
/**
|
|
@@ -100,6 +102,7 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
100
102
|
selected: boolean;
|
|
101
103
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
102
104
|
columns: BitzTableColumnsType<any> | undefined;
|
|
105
|
+
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[] | undefined;
|
|
103
106
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
104
107
|
persistenceKey: any;
|
|
105
108
|
onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
|
|
@@ -136,6 +139,7 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
136
139
|
selected: boolean;
|
|
137
140
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
138
141
|
columns: BitzTableColumnsType<any> | undefined;
|
|
142
|
+
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[] | undefined;
|
|
139
143
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
140
144
|
persistenceKey: any;
|
|
141
145
|
onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
|