@baishuyun/ui-mobile 0.3.0 → 0.5.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/README.md +2 -11
- package/dist/ActionSheet/ActionSheet-Ok-UTVMn.js +133 -0
- package/dist/ActionSheet/index.js +5 -0
- package/dist/Calendar/Calendar-ipjycVqK.js +1580 -0
- package/dist/Calendar/index.js +4 -3
- package/dist/Calendar/timeUtils-CPYfw0pt.js +27 -0
- package/dist/ConfigProvider/ConfigProvider-CNhaKMJa.js +181 -0
- package/dist/ConfigProvider/index.js +3 -3
- package/dist/Gantt/Gantt-DDItjDkR.js +1099 -0
- package/dist/Gantt/index.js +7 -3
- package/dist/Icon/Icon-CFvcrGGg.js +23 -0
- package/dist/Icon/index.js +3 -0
- package/dist/components/ActionSheet/ActionSheet.d.ts +3 -0
- package/dist/components/ActionSheet/index.d.ts +2 -0
- package/dist/components/ActionSheet/interface.d.ts +75 -0
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Calendar/interface.d.ts +65 -7
- package/dist/components/ConfigProvider/context.d.ts +4 -0
- package/dist/components/Gantt/Gantt.d.ts +1 -1
- package/dist/components/Gantt/GanttBar.d.ts +10 -0
- package/dist/components/Gantt/GanttHeader.d.ts +2 -0
- package/dist/components/Gantt/GanttTimeLine.d.ts +9 -0
- package/dist/components/Gantt/HeaderToolbar.d.ts +6 -0
- package/dist/components/Gantt/OffscreenIndicatorArrow.d.ts +8 -0
- package/dist/components/Gantt/OffscreenIndicatorOverlay.d.ts +14 -0
- package/dist/components/Gantt/StickyLabel.d.ts +10 -0
- package/dist/components/Gantt/TodayIndicator.d.ts +14 -0
- package/dist/components/Gantt/calcTodayLeft.d.ts +8 -0
- package/dist/components/Gantt/context.d.ts +27 -0
- package/dist/components/Gantt/hooks/useGanttScroll.d.ts +23 -0
- package/dist/components/Gantt/hooks/useGanttViewport.d.ts +20 -0
- package/dist/components/Gantt/hooks/useTodayTracker.d.ts +7 -0
- package/dist/components/Gantt/index.d.ts +2 -1
- package/dist/components/Gantt/interface.d.ts +27 -2
- package/dist/components/Gantt/msUntilNextDay.d.ts +2 -0
- package/dist/components/Gantt/utils/color.d.ts +2 -0
- package/dist/components/Gantt/utils/cx.d.ts +1 -0
- package/dist/components/Gantt/utils/dateRangeNormalizer.d.ts +25 -0
- package/dist/components/Gantt/utils/dayScale.d.ts +30 -0
- package/dist/components/Gantt/utils/headerTimeUtils.d.ts +43 -0
- package/dist/components/Gantt/utils/layoutBars.d.ts +26 -0
- package/dist/components/Gantt/utils/time.d.ts +4 -0
- package/dist/components/Gantt/utils/viewportDateUtils.d.ts +11 -0
- package/dist/components/Gantt/utils/zoomReanchor.d.ts +18 -0
- package/dist/components/Icon/Icon.d.ts +6 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/interface.d.ts +19 -0
- package/dist/components/Icon/loadIconfont.d.ts +1 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/index.js +9 -6
- package/dist/locale/index.d.ts +3 -0
- package/dist/locale/lang/en-US.json.d.ts +41 -0
- package/dist/locale/lang/zh-CN.json.d.ts +41 -0
- package/dist/locale/lang/zh-TW.json.d.ts +41 -0
- package/dist/style.css +1 -1
- package/dist/vendors/useLocale-CMHIlzlj.js +98 -0
- package/dist/vendors/{version-BVySNITW.js → version-3D9AaDf3.js} +1 -1
- package/dist/vite-env.d.ts +1 -0
- package/package.json +6 -1
- package/dist/Calendar/Calendar-6ibIyMx0.js +0 -1606
- package/dist/ConfigProvider/ConfigProvider-E792q6ny.js +0 -99
- package/dist/Gantt/Gantt-DLmqZPAQ.js +0 -8
- package/dist/vendors/useLocale-BbUDQCzl.js +0 -57
package/dist/Calendar/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import { t as e } from "./Calendar-
|
|
3
|
-
import "../vendors/useLocale-
|
|
1
|
+
import "../vendors/version-3D9AaDf3.js";
|
|
2
|
+
import { t as e } from "./Calendar-ipjycVqK.js";
|
|
3
|
+
import "../vendors/useLocale-CMHIlzlj.js";
|
|
4
|
+
import "./timeUtils-CPYfw0pt.js";
|
|
4
5
|
export { e as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import e from "dayjs";
|
|
2
|
+
import t from "dayjs/plugin/isoWeek";
|
|
3
|
+
import n from "dayjs/plugin/timezone";
|
|
4
|
+
import r from "dayjs/plugin/utc";
|
|
5
|
+
//#region src/components/Calendar/utils/ensureDayjsPlugins.ts
|
|
6
|
+
var i = !1;
|
|
7
|
+
i ||= (e.extend(r), e.extend(n), e.extend(t), !0);
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/components/Calendar/utils/timeUtils.ts
|
|
10
|
+
var a = () => e(null), o = (e, t) => !!(t && e.$x?.$timezone === t), s = (t, n) => {
|
|
11
|
+
if (t == null || t === "") return a();
|
|
12
|
+
if (e.isDayjs(t)) return t.isValid() ? !n || o(t, n) ? t : t.tz(n) : a();
|
|
13
|
+
if (typeof t == "number" || t instanceof Date) {
|
|
14
|
+
let r = e(t);
|
|
15
|
+
return r.isValid() ? n ? r.tz(n) : r : a();
|
|
16
|
+
}
|
|
17
|
+
if (typeof t == "string") {
|
|
18
|
+
let r = e(t);
|
|
19
|
+
return r.isValid() ? n ? r.tz(n) : r : a();
|
|
20
|
+
}
|
|
21
|
+
return a();
|
|
22
|
+
}, c = (t) => t ? e().tz(t) : e(), l = (t) => {
|
|
23
|
+
let n = t ? e().tz(t).utcOffset() : e().utcOffset(), r = n >= 0 ? "+" : "-", i = Math.abs(n), a = Math.floor(i / 60), o = i % 60;
|
|
24
|
+
return o === 0 ? `GMT${r}${a}` : `GMT${r}${a}:${String(o).padStart(2, "0")}`;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { l as n, s as r, c as t };
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { i as e, n as t, r as n } from "../vendors/useLocale-CMHIlzlj.js";
|
|
2
|
+
import { useCallback as r, useContext as i, useMemo as a } from "react";
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
var s = {
|
|
5
|
+
actionSheet: { close: "關閉" },
|
|
6
|
+
calendar: {
|
|
7
|
+
today: "今天",
|
|
8
|
+
viewDay: "日",
|
|
9
|
+
viewThreeDay: "三天",
|
|
10
|
+
viewMonth: "月",
|
|
11
|
+
yearMonth: "{year}年{monthShort}",
|
|
12
|
+
monthShort: {
|
|
13
|
+
1: "1月",
|
|
14
|
+
2: "2月",
|
|
15
|
+
3: "3月",
|
|
16
|
+
4: "4月",
|
|
17
|
+
5: "5月",
|
|
18
|
+
6: "6月",
|
|
19
|
+
7: "7月",
|
|
20
|
+
8: "8月",
|
|
21
|
+
9: "9月",
|
|
22
|
+
10: "10月",
|
|
23
|
+
11: "11月",
|
|
24
|
+
12: "12月"
|
|
25
|
+
},
|
|
26
|
+
weekday: {
|
|
27
|
+
1: "一",
|
|
28
|
+
2: "二",
|
|
29
|
+
3: "三",
|
|
30
|
+
4: "四",
|
|
31
|
+
5: "五",
|
|
32
|
+
6: "六",
|
|
33
|
+
7: "日"
|
|
34
|
+
},
|
|
35
|
+
weekdayPrefixed: {
|
|
36
|
+
1: "週一",
|
|
37
|
+
2: "週二",
|
|
38
|
+
3: "週三",
|
|
39
|
+
4: "週四",
|
|
40
|
+
5: "週五",
|
|
41
|
+
6: "週六",
|
|
42
|
+
7: "週日"
|
|
43
|
+
},
|
|
44
|
+
collapse: "收合",
|
|
45
|
+
moreRecords: "還有 {count} 筆"
|
|
46
|
+
},
|
|
47
|
+
gantt: {
|
|
48
|
+
today: "今天",
|
|
49
|
+
zoomSheetTitle: "切換時間查看",
|
|
50
|
+
prevScreen: "上一屏",
|
|
51
|
+
nextScreen: "下一屏",
|
|
52
|
+
locateTask: "定位到任務",
|
|
53
|
+
week: "{week}週",
|
|
54
|
+
year: "{year}年",
|
|
55
|
+
yearMonthDay: "{year}年{month}月{day}日",
|
|
56
|
+
hour: "{hour}點",
|
|
57
|
+
hourRange: "{start}-{end}時",
|
|
58
|
+
monthDayHour: "{month}月{day}日{hour}點",
|
|
59
|
+
am: "上午",
|
|
60
|
+
pm: "下午",
|
|
61
|
+
firstHalfYear: "上半年",
|
|
62
|
+
secondHalfYear: "下半年",
|
|
63
|
+
yearQuarter: "{year}年{quarter}",
|
|
64
|
+
quarter: {
|
|
65
|
+
1: "一季度",
|
|
66
|
+
2: "二季度",
|
|
67
|
+
3: "三季度",
|
|
68
|
+
4: "四季度"
|
|
69
|
+
},
|
|
70
|
+
zoom: {
|
|
71
|
+
oneMinute: "按分鐘查看",
|
|
72
|
+
tenMinute: "按10分鐘查看",
|
|
73
|
+
halfHour: "按半小時查看",
|
|
74
|
+
hour: "按小時查看",
|
|
75
|
+
sixHour: "按6小時查看",
|
|
76
|
+
halfDay: "按半天查看",
|
|
77
|
+
day: "按日查看",
|
|
78
|
+
week: "按週查看",
|
|
79
|
+
month: "按月查看",
|
|
80
|
+
quarter: "按季查看",
|
|
81
|
+
quarterMonth: "按季/月查看",
|
|
82
|
+
year: "按年查看"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}, c = {
|
|
86
|
+
actionSheet: { close: "Close" },
|
|
87
|
+
calendar: {
|
|
88
|
+
today: "Today",
|
|
89
|
+
viewDay: "Day",
|
|
90
|
+
viewThreeDay: "3-Day",
|
|
91
|
+
viewMonth: "Month",
|
|
92
|
+
yearMonth: "{monthShort} {year}",
|
|
93
|
+
monthShort: {
|
|
94
|
+
1: "Jan",
|
|
95
|
+
2: "Feb",
|
|
96
|
+
3: "Mar",
|
|
97
|
+
4: "Apr",
|
|
98
|
+
5: "May",
|
|
99
|
+
6: "Jun",
|
|
100
|
+
7: "Jul",
|
|
101
|
+
8: "Aug",
|
|
102
|
+
9: "Sep",
|
|
103
|
+
10: "Oct",
|
|
104
|
+
11: "Nov",
|
|
105
|
+
12: "Dec"
|
|
106
|
+
},
|
|
107
|
+
weekday: {
|
|
108
|
+
1: "Mon",
|
|
109
|
+
2: "Tue",
|
|
110
|
+
3: "Wed",
|
|
111
|
+
4: "Thu",
|
|
112
|
+
5: "Fri",
|
|
113
|
+
6: "Sat",
|
|
114
|
+
7: "Sun"
|
|
115
|
+
},
|
|
116
|
+
weekdayPrefixed: {
|
|
117
|
+
1: "Mon",
|
|
118
|
+
2: "Tue",
|
|
119
|
+
3: "Wed",
|
|
120
|
+
4: "Thu",
|
|
121
|
+
5: "Fri",
|
|
122
|
+
6: "Sat",
|
|
123
|
+
7: "Sun"
|
|
124
|
+
},
|
|
125
|
+
collapse: "Show less",
|
|
126
|
+
moreRecords: "{count} more"
|
|
127
|
+
},
|
|
128
|
+
gantt: {
|
|
129
|
+
today: "Today",
|
|
130
|
+
zoomSheetTitle: "Change time scale",
|
|
131
|
+
prevScreen: "Previous screen",
|
|
132
|
+
nextScreen: "Next screen",
|
|
133
|
+
locateTask: "Jump to task",
|
|
134
|
+
week: "W{week}",
|
|
135
|
+
year: "{year}",
|
|
136
|
+
yearMonthDay: "{monthShort} {day}, {year}",
|
|
137
|
+
hour: "{hour}:00",
|
|
138
|
+
hourRange: "{start}–{end}h",
|
|
139
|
+
monthDayHour: "{monthShort} {day}, {hour}:00",
|
|
140
|
+
am: "AM",
|
|
141
|
+
pm: "PM",
|
|
142
|
+
firstHalfYear: "H1",
|
|
143
|
+
secondHalfYear: "H2",
|
|
144
|
+
yearQuarter: "{quarter} {year}",
|
|
145
|
+
quarter: {
|
|
146
|
+
1: "Q1",
|
|
147
|
+
2: "Q2",
|
|
148
|
+
3: "Q3",
|
|
149
|
+
4: "Q4"
|
|
150
|
+
},
|
|
151
|
+
zoom: {
|
|
152
|
+
oneMinute: "Minute view",
|
|
153
|
+
tenMinute: "10-minute view",
|
|
154
|
+
halfHour: "Half-hour view",
|
|
155
|
+
hour: "Hour view",
|
|
156
|
+
sixHour: "6-hour view",
|
|
157
|
+
halfDay: "Half-day view",
|
|
158
|
+
day: "Day view",
|
|
159
|
+
week: "Week view",
|
|
160
|
+
month: "Month view",
|
|
161
|
+
quarter: "Quarter view",
|
|
162
|
+
quarterMonth: "Quarter/month view",
|
|
163
|
+
year: "Year view"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}, l = {
|
|
167
|
+
"zh-CN": e,
|
|
168
|
+
"zh-TW": s,
|
|
169
|
+
"en-US": c
|
|
170
|
+
}, u = ({ locale: e, children: s }) => {
|
|
171
|
+
let c = i(t), u = e ?? c.locale, d = r((e, t) => n(l[u], e, t), [u]), f = a(() => ({
|
|
172
|
+
locale: u,
|
|
173
|
+
t: d
|
|
174
|
+
}), [u, d]);
|
|
175
|
+
return /* @__PURE__ */ o(t.Provider, {
|
|
176
|
+
value: f,
|
|
177
|
+
children: s
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
//#endregion
|
|
181
|
+
export { u as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import { t as e } from "../vendors/useLocale-
|
|
3
|
-
import { t } from "./ConfigProvider-
|
|
1
|
+
import "../vendors/version-3D9AaDf3.js";
|
|
2
|
+
import { t as e } from "../vendors/useLocale-CMHIlzlj.js";
|
|
3
|
+
import { t } from "./ConfigProvider-CNhaKMJa.js";
|
|
4
4
|
export { t as ConfigProvider, t as default, e as useLocale };
|