@baishuyun/ui-base 6.4.0 → 6.4.2
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/AmapProvider/index.js +2 -2
- package/dist/Amap/{AmapProvider-By5tTMAj.js → AmapProvider-CwKdpmCg.js} +1 -1
- package/dist/Amap/index.js +2 -2
- package/dist/Calendar/{AllDaySection-DwQz-p7a.js → AllDaySection-CseF1DuB.js} +1 -1
- package/dist/Calendar/{Calendar-CuBzeTkR.js → Calendar-Yu2HfA5D.js} +4 -3
- package/dist/Calendar/{EventCard-DRJrT_AG.js → EventCard-L6jaKgEw.js} +1 -0
- package/dist/Calendar/index.js +4 -4
- package/dist/Calendar/subcomponents/AllDaySection/index.js +2 -2
- package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-B6ZFxTt6.js → DatePicker-PCdNachD.js} +44 -43
- package/dist/DatePicker/index.js +1 -1
- package/dist/DropDown/{DropDown-C5H9UObs.js → DropDown-CvQAbsEo.js} +8 -8
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/{Buttons-B8_yDqF5.js → Buttons-DmSUkHWl.js} +2 -2
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +3 -3
- package/dist/Editor/index.js +3 -3
- package/dist/Gantt/GanttChart/index.js +6 -6
- package/dist/Gantt/GanttChart-BgDJOyW1.js +2144 -0
- package/dist/Gantt/GanttTable/index.js +3 -3
- package/dist/Gantt/{GanttTable-DSTq5XmX.js → GanttTable-Di_p-0M1.js} +2 -2
- package/dist/Gantt/GanttToolBar/index.js +4 -4
- package/dist/Gantt/GanttToolBar-D5pQdrzv.js +105 -0
- package/dist/Gantt/{collapseKeys-BWMH5k37.js → collapseKeys-C8139wvy.js} +34 -30
- package/dist/Gantt/{constants-_vMvDXFh.js → constants-D4ur8WRs.js} +16 -17
- package/dist/Gantt/index.js +8 -8
- package/dist/Gantt/{timelineViewConfig-DshzoBp7.js → timelineViewConfig-BXl2UkN8.js} +1 -1
- package/dist/Gantt/utils/index.js +4 -4
- package/dist/Modal/{Modal-CrK8gFOn.js → Modal-D3LFqIV4.js} +3 -3
- package/dist/Modal/index.js +1 -1
- package/dist/Select/{Select-Gkywa_sm.js → Select-OjCjCogR.js} +4 -4
- package/dist/Select/index.js +2 -2
- package/dist/Table/{Table-DVTq4n2V.js → Table-3-kFIm5v.js} +3 -4
- package/dist/Table/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/components/DatePicker/__tests__/DatePicker.triggerActiveClassName.test.d.ts +1 -0
- package/dist/components/DatePicker/interface.d.ts +2 -0
- package/dist/components/Gantt/GanttChart/GanttTaskBar/GanttTaskBar.d.ts +1 -1
- package/dist/components/Gantt/GanttChart/GanttTaskBar/useTaskBarPointer.d.ts +2 -2
- package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/__tests__/OffscreenTaskIndicators.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttDrag.clippedQuarterMonth.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useOffscreenIndicators.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useTimelineViewportController.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -2
- package/dist/components/Gantt/GanttChart/hooks/useGanttDrag.d.ts +3 -3
- package/dist/components/Gantt/GanttChart/hooks/useGanttScrollbars.d.ts +1 -1
- package/dist/components/Gantt/GanttChart/hooks/useOffscreenIndicators.d.ts +6 -6
- package/dist/components/Gantt/GanttChart/hooks/useTimelineViewportController.d.ts +4 -2
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineMarkers.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineRange.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewportEngine.test.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/constants.d.ts +26 -17
- package/dist/components/Gantt/GanttChart/utils/dragEngine.d.ts +2 -0
- package/dist/components/Gantt/GanttChart/utils/quarterMonthScale.d.ts +1 -0
- package/dist/components/Gantt/GanttChart/utils/timelineFocus.d.ts +0 -34
- package/dist/components/Gantt/GanttChart/utils/timelineMarkers.d.ts +2 -1
- package/dist/components/Gantt/GanttChart/utils/timelineRange.d.ts +8 -0
- package/dist/components/Gantt/GanttChart/utils/timelineViewportEngine.d.ts +44 -0
- package/dist/components/Gantt/__tests__/GanttBars.renderWindow.test.d.ts +1 -0
- package/dist/components/Gantt/types.internal.d.ts +22 -8
- package/dist/index.js +11 -11
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-BRfJ7gWc.js → ConfigProvider-DwmA94S2.js} +5 -0
- package/dist/vendors/{Tree-DJpkMB5u.js → Tree-C7BgkjCQ.js} +1 -1
- package/package.json +1 -1
- package/dist/Gantt/GanttChart-DpmbH0GI.js +0 -1965
- package/dist/Gantt/GanttToolBar-fCAi-4zZ.js +0 -91
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../vendors/useLocale-BTz4slNW.js";
|
|
2
|
-
import { t } from "../DropDown/DropDown-C5H9UObs.js";
|
|
3
|
-
import { l as n } from "./timelineViewConfig-DshzoBp7.js";
|
|
4
|
-
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import { useCallback as a, useMemo as o, useRef as s } from "react";
|
|
6
|
-
//#region src/components/Gantt/utils/localeKey.ts
|
|
7
|
-
var c = (e) => e.startsWith("gantt.") ? e : `gantt.${e}`, l = ".bsy-form-view-data-manager", u = {
|
|
8
|
-
oneMinute: "mode.oneMinute",
|
|
9
|
-
tenMinute: "mode.tenMinute",
|
|
10
|
-
halfHour: "mode.halfHour",
|
|
11
|
-
hour: "mode.hour",
|
|
12
|
-
sixHour: "mode.sixHour",
|
|
13
|
-
halfDay: "mode.halfDay",
|
|
14
|
-
day: "mode.day",
|
|
15
|
-
week: "mode.week",
|
|
16
|
-
month: "mode.month",
|
|
17
|
-
quarter: "mode.quarter",
|
|
18
|
-
quarterMonth: "mode.quarterMonth",
|
|
19
|
-
year: "mode.year"
|
|
20
|
-
}, d = ({ viewMode: d = "day", availableModes: f, onViewModeChange: p, onTodayClick: m, onScrollPrev: h, onScrollNext: g, className: _ = "" }) => {
|
|
21
|
-
let { t: v } = e(), y = a((e) => v(c(u[e])), [v]), b = `bsy-gantt-toolbar ${_}`.trim(), x = s(null), S = a(() => {
|
|
22
|
-
let e = x.current;
|
|
23
|
-
if (!e) return document.body;
|
|
24
|
-
let t = e.closest(l);
|
|
25
|
-
return t instanceof HTMLElement ? t : document.body;
|
|
26
|
-
}, []), C = o(() => {
|
|
27
|
-
let e = new Set(f ?? n);
|
|
28
|
-
return n.filter((t) => e.has(t)).map((e) => ({
|
|
29
|
-
key: e,
|
|
30
|
-
label: y(e)
|
|
31
|
-
}));
|
|
32
|
-
}, [f, y]), w = o(() => C.find((e) => e.key === d)?.label ?? d, [C, d]), T = a((e) => {
|
|
33
|
-
e?.key && e.key !== d && p?.(e.key);
|
|
34
|
-
}, [p, d]);
|
|
35
|
-
return /* @__PURE__ */ i("div", {
|
|
36
|
-
className: b,
|
|
37
|
-
ref: x,
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ r(t, {
|
|
40
|
-
menus: C,
|
|
41
|
-
activeKey: [d],
|
|
42
|
-
showSearch: !1,
|
|
43
|
-
offset: {
|
|
44
|
-
x: 0,
|
|
45
|
-
y: 4
|
|
46
|
-
},
|
|
47
|
-
zIndex: 10001,
|
|
48
|
-
getPopupContainer: S,
|
|
49
|
-
onClick: T,
|
|
50
|
-
style: {
|
|
51
|
-
width: 100,
|
|
52
|
-
minWidth: 100
|
|
53
|
-
},
|
|
54
|
-
children: /* @__PURE__ */ i("button", {
|
|
55
|
-
type: "button",
|
|
56
|
-
className: "bsy-gantt-toolbar__mode-trigger",
|
|
57
|
-
"aria-haspopup": "listbox",
|
|
58
|
-
children: [/* @__PURE__ */ r("span", {
|
|
59
|
-
className: "bsy-gantt-toolbar__mode-trigger-label",
|
|
60
|
-
children: w
|
|
61
|
-
}), /* @__PURE__ */ r("i", { className: "icon-new-bsy-arrow-down bsy-gantt-toolbar__mode-trigger-icon" })]
|
|
62
|
-
})
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ r("span", { className: "bsy-gantt-toolbar__divider" }),
|
|
65
|
-
/* @__PURE__ */ r("button", {
|
|
66
|
-
type: "button",
|
|
67
|
-
className: "bsy-gantt-toolbar__today-btn",
|
|
68
|
-
onClick: m,
|
|
69
|
-
children: v("gantt.today")
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ i("div", {
|
|
72
|
-
className: "bsy-gantt-toolbar__scroll-btns",
|
|
73
|
-
children: [/* @__PURE__ */ r("button", {
|
|
74
|
-
type: "button",
|
|
75
|
-
className: "bsy-gantt-toolbar__icon-btn bsy-gantt-toolbar__icon-btn--left",
|
|
76
|
-
"aria-label": v("gantt.aria.scrollPrev"),
|
|
77
|
-
onClick: h,
|
|
78
|
-
children: /* @__PURE__ */ r("i", { className: "icon-new-bsy-Pulldownleft" })
|
|
79
|
-
}), /* @__PURE__ */ r("button", {
|
|
80
|
-
type: "button",
|
|
81
|
-
className: "bsy-gantt-toolbar__icon-btn bsy-gantt-toolbar__icon-btn--right",
|
|
82
|
-
"aria-label": v("gantt.aria.scrollNext"),
|
|
83
|
-
onClick: g,
|
|
84
|
-
children: /* @__PURE__ */ r("i", { className: "icon-new-bsy-Pulldownright" })
|
|
85
|
-
})]
|
|
86
|
-
})
|
|
87
|
-
]
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
//#endregion
|
|
91
|
-
export { c as n, d as t };
|