pds-dev-kit-web-test 2.5.628 → 2.5.630
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/src/common/services/i18n/resources/en.json +14 -14
- package/dist/src/common/styles/scroll/scrollbarStyle.d.ts +2 -0
- package/dist/src/common/styles/scroll/scrollbarStyle.js +4 -3
- package/dist/src/core/pricing/translator.js +8 -7
- package/dist/src/core/pricing/types.js +1 -1
- package/dist/src/desktop/components/AdminList/AdminList.d.ts +10 -1
- package/dist/src/desktop/components/AdminList/AdminList.js +2 -2
- package/dist/src/desktop/components/AdminList/HeaderRow.d.ts +10 -1
- package/dist/src/desktop/components/AdminList/HeaderRow.js +2 -2
- package/dist/src/desktop/components/AdminListHeader/AdminListHeader.d.ts +2 -1
- package/dist/src/desktop/components/AdminListHeader/AdminListHeader.js +2 -2
- package/dist/src/desktop/components/AdminListHeader/HeaderBar.d.ts +2 -1
- package/dist/src/desktop/components/AdminListHeader/HeaderBar.js +2 -2
- package/dist/src/desktop/components/BoxItem/BoxItem.js +1 -1
- package/dist/src/desktop/components/Calendar/Calendar.js +51 -46
- package/dist/src/desktop/components/Calendar/CalendarContext.d.ts +1 -3
- package/dist/src/desktop/components/Calendar/CalendarContext.js +1 -2
- package/dist/src/desktop/components/Calendar/DailyView.d.ts +2 -8
- package/dist/src/desktop/components/Calendar/DailyView.js +7 -88
- package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +1 -2
- package/dist/src/desktop/components/Calendar/MonthlyView.js +6 -81
- package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +0 -3
- package/dist/src/desktop/components/Calendar/WeeklyView.js +7 -113
- package/dist/src/desktop/components/Calendar/calendarUtils.js +10 -20
- package/dist/src/desktop/components/Calendar/types.d.ts +4 -8
- package/dist/src/desktop/components/TextButton/TextButton.d.ts +5 -2
- package/dist/src/desktop/components/TextButton/TextButton.js +14 -4
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFA.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFB.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFE.js +1 -1
- package/dist/src/desktop/layout/LayoutWF/Containers/ContentsContainer/variation/WFL.js +8 -5
- package/dist/src/desktop/panels/DesktopBasicModal/DesktopBasicModal.d.ts +2 -1
- package/dist/src/desktop/panels/DesktopBasicModal/DesktopBasicModal.js +13 -15
- package/dist/src/desktop/panels/DesktopBasicModalWithTab/DesktopBasicModalWithTab.d.ts +3 -1
- package/dist/src/desktop/panels/DesktopBasicModalWithTab/DesktopBasicModalWithTab.js +12 -6
- package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.d.ts +2 -1
- package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.js +7 -27
- package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.d.ts +3 -1
- package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.js +11 -5
- package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.d.ts +3 -1
- package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.js +11 -4
- package/dist/src/mobile/components/BoxItem/BoxItem.js +1 -1
- package/dist/src/mobile/components/TextButton/TextButton.d.ts +5 -2
- package/dist/src/mobile/components/TextButton/TextButton.js +14 -4
- package/dist/src/mobile/panels/MobileBasicModal/MobileBasicModal.d.ts +3 -1
- package/dist/src/mobile/panels/MobileBasicModal/MobileBasicModal.js +10 -3
- package/dist/src/sub/AdminList/AdminList/AdminList.d.ts +10 -1
- package/dist/src/sub/AdminList/AdminList/AdminList.js +2 -2
- package/dist/src/sub/AdminList/AdminList/HeaderRow.d.ts +10 -1
- package/dist/src/sub/AdminList/AdminList/HeaderRow.js +2 -2
- package/package.json +1 -1
- package/release-note.md +2 -2
@@ -1,8 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
interface DailyViewProps {
|
4
|
-
schedules: Schedule[];
|
5
|
-
config?: any;
|
6
|
-
}
|
7
|
-
export declare const DailyView: React.FC<DailyViewProps>;
|
8
|
-
export {};
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const DailyView: () => JSX.Element;
|
@@ -40,7 +40,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
exports.DailyView = void 0;
|
42
42
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
43
|
-
var react_1 = require("react");
|
44
43
|
var react_i18next_1 = require("react-i18next");
|
45
44
|
var styled_components_1 = __importStar(require("styled-components"));
|
46
45
|
var TextLabel_1 = require("../TextLabel");
|
@@ -49,14 +48,9 @@ var CalendarContext_1 = require("./CalendarContext");
|
|
49
48
|
var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
|
50
49
|
var TimeBasedScheduleItem_1 = require("./TimeBasedScheduleItem");
|
51
50
|
var timeFormatUtils_1 = require("./timeFormatUtils");
|
52
|
-
var DailyView = function (
|
53
|
-
var schedules = _a.schedules, config = _a.config;
|
51
|
+
var DailyView = function () {
|
54
52
|
var i18n = (0, react_i18next_1.useTranslation)().i18n;
|
55
|
-
var
|
56
|
-
// 시간 드래그 상태
|
57
|
-
var _c = (0, react_1.useState)(null), timeSelectionStart = _c[0], setTimeSelectionStart = _c[1];
|
58
|
-
var _d = (0, react_1.useState)(null), timeSelectionEnd = _d[0], setTimeSelectionEnd = _d[1];
|
59
|
-
var _e = (0, react_1.useState)(false), isTimeDragging = _e[0], setIsTimeDragging = _e[1];
|
53
|
+
var _a = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _a.selectedDate, selectedSchedules = _a.selectedSchedules, displayAllDayScheduleMode = _a.displayAllDayScheduleMode, getSchedulesForDate = _a.getSchedulesForDate, isDragOverDate = _a.isDragOverDate, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleDateClick = _a.handleDateClick, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, handleScheduleClick = _a.handleScheduleClick;
|
60
54
|
var currentDateForDaily = [selectedDate][0];
|
61
55
|
var HOURS_IN_DAY = Array.from({ length: 24 }, function (_, i) { return i; });
|
62
56
|
var getTimeSlotDate = function (baseDate, hour) {
|
@@ -64,79 +58,10 @@ var DailyView = function (_a) {
|
|
64
58
|
date.setHours(hour, 0, 0, 0);
|
65
59
|
return date;
|
66
60
|
};
|
67
|
-
// 시간 드래그 시작
|
68
|
-
var handleTimeMouseDown = (0, react_1.useCallback)(function (hour, e) {
|
69
|
-
var _a;
|
70
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
71
|
-
return;
|
72
|
-
e.preventDefault();
|
73
|
-
setTimeSelectionStart(hour);
|
74
|
-
setTimeSelectionEnd(hour);
|
75
|
-
setIsTimeDragging(true);
|
76
|
-
}, [config]);
|
77
|
-
// 시간 드래그 중
|
78
|
-
var handleTimeMouseEnter = (0, react_1.useCallback)(function (hour) {
|
79
|
-
if (!isTimeDragging)
|
80
|
-
return;
|
81
|
-
setTimeSelectionEnd(hour);
|
82
|
-
}, [isTimeDragging]);
|
83
|
-
// 드래그 종료 시 콜백 호출
|
84
|
-
(0, react_1.useEffect)(function () {
|
85
|
-
var handleMouseUp = function () {
|
86
|
-
var _a;
|
87
|
-
if (isTimeDragging &&
|
88
|
-
timeSelectionStart !== null &&
|
89
|
-
timeSelectionEnd !== null &&
|
90
|
-
((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
|
91
|
-
// 선택된 시간 범위 계산
|
92
|
-
var startHour = Math.min(timeSelectionStart, timeSelectionEnd);
|
93
|
-
var endHour = Math.max(timeSelectionStart, timeSelectionEnd);
|
94
|
-
var startDateTime_1 = new Date(selectedDate);
|
95
|
-
startDateTime_1.setHours(startHour, 0, 0, 0);
|
96
|
-
var endDateTime_1 = new Date(selectedDate);
|
97
|
-
endDateTime_1.setHours(endHour, 59, 59, 999);
|
98
|
-
// 선택된 시간 범위에 포함되는 스케줄들 찾기
|
99
|
-
var schedulesInRange_1 = [];
|
100
|
-
schedules.forEach(function (schedule) {
|
101
|
-
var scheduleStart = new Date(schedule.startDate);
|
102
|
-
var scheduleEnd = new Date(schedule.endDate);
|
103
|
-
// 스케줄이 선택된 시간 범위와 겹치는지 확인
|
104
|
-
if (scheduleStart <= endDateTime_1 && scheduleEnd >= startDateTime_1) {
|
105
|
-
schedulesInRange_1.push(schedule);
|
106
|
-
}
|
107
|
-
});
|
108
|
-
// 선택된 날짜 (현재 날짜만)
|
109
|
-
var selectedDates = [new Date(selectedDate)];
|
110
|
-
handleDateDrag({
|
111
|
-
action: 'DRAG',
|
112
|
-
target: 'DATE',
|
113
|
-
dates: selectedDates,
|
114
|
-
schedules: schedulesInRange_1,
|
115
|
-
startDate: startDateTime_1.toISOString(),
|
116
|
-
endDate: endDateTime_1.toISOString()
|
117
|
-
});
|
118
|
-
}
|
119
|
-
setIsTimeDragging(false);
|
120
|
-
setTimeSelectionStart(null);
|
121
|
-
setTimeSelectionEnd(null);
|
122
|
-
};
|
123
|
-
if (isTimeDragging) {
|
124
|
-
document.addEventListener('mouseup', handleMouseUp);
|
125
|
-
return function () { return document.removeEventListener('mouseup', handleMouseUp); };
|
126
|
-
}
|
127
|
-
}, [isTimeDragging, timeSelectionStart, timeSelectionEnd, config, schedules, selectedDate]);
|
128
|
-
// 선택한 시간이 드래그 범위에 포함되는지 확인
|
129
|
-
var isTimeSlotInDragRange = (0, react_1.useCallback)(function (hour) {
|
130
|
-
if (timeSelectionStart === null || timeSelectionEnd === null)
|
131
|
-
return false;
|
132
|
-
var startHour = Math.min(timeSelectionStart, timeSelectionEnd);
|
133
|
-
var endHour = Math.max(timeSelectionStart, timeSelectionEnd);
|
134
|
-
return hour >= startHour && hour <= endHour;
|
135
|
-
}, [timeSelectionStart, timeSelectionEnd]);
|
136
61
|
return ((0, jsx_runtime_1.jsxs)(S_DailyContainer, { children: [(0, jsx_runtime_1.jsx)(AllDaySchedulesSection_1.AllDaySchedulesSection, { calendarDates: [selectedDate], displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop }), (0, jsx_runtime_1.jsxs)(S_DailyTimeGrid, __assign({ "$displayAllDayScheduleMode": displayAllDayScheduleMode }, { children: [(0, jsx_runtime_1.jsx)(CurrentTimeIndicator_1.CurrentTimeIndicator, { show: true, leftOffset: "80px" }), HOURS_IN_DAY.map(function (hour) {
|
137
62
|
var timeSlotDate = getTimeSlotDate(currentDateForDaily, hour);
|
138
63
|
var isDragOver = (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) === timeSlotDate.getTime();
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(S_DailyTimeRow, { children: [(0, jsx_runtime_1.jsx)(S_DailyTimeLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", text: (0, timeFormatUtils_1.formatHour)(hour, 0, i18n.language), colorTheme: "sysTextTertiary" }) }), (0, jsx_runtime_1.jsx)(S_DailyTimeSlot, __assign({ "$isDragOver": isDragOver,
|
64
|
+
return ((0, jsx_runtime_1.jsxs)(S_DailyTimeRow, { children: [(0, jsx_runtime_1.jsx)(S_DailyTimeLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", text: (0, timeFormatUtils_1.formatHour)(hour, 0, i18n.language), colorTheme: "sysTextTertiary" }) }), (0, jsx_runtime_1.jsx)(S_DailyTimeSlot, __assign({ "$isDragOver": isDragOver, onClick: function () { return handleDateClick(timeSlotDate, {}); }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); } }, { children: hour === 0 && ((0, jsx_runtime_1.jsx)(TimeBasedScheduleItem_1.TimeBasedScheduleItem, { schedules: getSchedulesForDate(currentDateForDaily), selectedSchedules: selectedSchedules, onClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd })) }))] }, hour));
|
140
65
|
})] }))] }));
|
141
66
|
};
|
142
67
|
exports.DailyView = DailyView;
|
@@ -149,24 +74,18 @@ var S_DailyTimeGrid = styled_components_1.default.div(templateObject_3 || (templ
|
|
149
74
|
});
|
150
75
|
});
|
151
76
|
var S_DailyTimeRow = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n min-height: 60px;\n"], ["\n display: flex;\n min-height: 60px;\n"])));
|
152
|
-
var S_DailyTimeLabel = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n display: flex;\n justify-content: center;\n min-width:
|
77
|
+
var S_DailyTimeLabel = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n display: flex;\n justify-content: center;\n min-width: 80px;\n padding: 8px;\n"], ["\n align-items: center;\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n display: flex;\n justify-content: center;\n min-width: 80px;\n padding: 8px;\n"])), function (_a) {
|
153
78
|
var theme = _a.theme;
|
154
79
|
return theme.ui_cpnt_divider;
|
155
80
|
}, function (_a) {
|
156
81
|
var theme = _a.theme;
|
157
82
|
return theme.ui_cpnt_divider;
|
158
83
|
});
|
159
|
-
var S_DailyTimeSlot = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor:
|
160
|
-
if (props.$isInTimeDragRange)
|
161
|
-
return props.theme.ui_cpnt_sheet_base;
|
162
|
-
if (props.$isDragOver)
|
163
|
-
return props.theme.ui_cpnt_sheet_base;
|
164
|
-
return 'transparent';
|
165
|
-
}, function (_a) {
|
84
|
+
var S_DailyTimeSlot = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor: pointer;\n flex: 1;\n min-width: 0;\n overflow: visible;\n padding: 4px;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor: pointer;\n flex: 1;\n min-width: 0;\n overflow: visible;\n padding: 4px;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_72 : 'transparent'); }, function (_a) {
|
166
85
|
var theme = _a.theme;
|
167
86
|
return theme.ui_cpnt_divider;
|
168
|
-
}, function (
|
87
|
+
}, function (_a) {
|
169
88
|
var theme = _a.theme;
|
170
|
-
return theme.
|
89
|
+
return theme.ui_72;
|
171
90
|
});
|
172
91
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Schedule
|
1
|
+
import type { Schedule } from './types';
|
2
2
|
import type React from 'react';
|
3
3
|
interface MonthlyViewProps {
|
4
4
|
getDayTextByDate: (date: Date) => string;
|
@@ -23,7 +23,6 @@ interface MonthlyViewProps {
|
|
23
23
|
handleScheduleDragEnd?: () => void;
|
24
24
|
isDraggable?: boolean;
|
25
25
|
onSwitchToWeeklyView?: (date: Date) => void;
|
26
|
-
config?: Config;
|
27
26
|
}
|
28
27
|
export declare const MonthlyView: React.FC<MonthlyViewProps>;
|
29
28
|
export {};
|
@@ -41,85 +41,17 @@ var CalendarContext_1 = require("./CalendarContext");
|
|
41
41
|
var calendarUtils_1 = require("./calendarUtils");
|
42
42
|
var MultiWeekSchedulesLayer_1 = require("./MultiWeekSchedulesLayer");
|
43
43
|
var MonthlyView = function (_a) {
|
44
|
-
var getDayTextByDate = _a.getDayTextByDate, startOfWeek = _a.startOfWeek, selectedDate = _a.selectedDate, selectedDates = _a.selectedDates, selectedSchedules = _a.selectedSchedules, dragStartDate = _a.dragStartDate, dragEndDate = _a.dragEndDate, isDragOverDate = _a.isDragOverDate, schedules = _a.schedules, getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isPastDate = _a.isPastDate, handleDateClick = _a.handleDateClick, handleScheduleClick = _a.handleScheduleClick, handleMouseUp = _a.handleMouseUp, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, _b = _a.isDraggable, isDraggable = _b === void 0 ? false : _b, onSwitchToWeeklyView = _a.onSwitchToWeeklyView
|
44
|
+
var getDayTextByDate = _a.getDayTextByDate, startOfWeek = _a.startOfWeek, selectedDate = _a.selectedDate, selectedDates = _a.selectedDates, selectedSchedules = _a.selectedSchedules, dragStartDate = _a.dragStartDate, dragEndDate = _a.dragEndDate, isDragOverDate = _a.isDragOverDate, schedules = _a.schedules, getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isPastDate = _a.isPastDate, handleDateClick = _a.handleDateClick, handleScheduleClick = _a.handleScheduleClick, handleMouseUp = _a.handleMouseUp, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, _b = _a.isDraggable, isDraggable = _b === void 0 ? false : _b, onSwitchToWeeklyView = _a.onSwitchToWeeklyView;
|
45
45
|
var t = (0, react_i18next_1.useTranslation)().t;
|
46
|
-
var
|
46
|
+
var renderScheduleItem = (0, CalendarContext_1.useCalendarContext)().renderScheduleItem;
|
47
47
|
var height = (0, useWindowSize_1.useWindowSize)().height;
|
48
48
|
var calendarCellRef = (0, react_1.useRef)(null);
|
49
|
-
var
|
49
|
+
var _c = (0, react_1.useState)(3), maxSchedulesPerDay = _c[0], setMaxSchedulesPerDay = _c[1];
|
50
50
|
var scheduleItemHeight = 22; // 스케줄 아이템 대략 높이
|
51
|
-
// 날짜 드래그 상태
|
52
|
-
var _e = (0, react_1.useState)(null), dateSelectionStart = _e[0], setDateSelectionStart = _e[1];
|
53
|
-
var _f = (0, react_1.useState)(null), dateSelectionEnd = _f[0], setDateSelectionEnd = _f[1];
|
54
|
-
var _g = (0, react_1.useState)(false), isDateDragging = _g[0], setIsDateDragging = _g[1];
|
55
51
|
var days = (0, react_1.useMemo)(function () {
|
56
52
|
var monthDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1);
|
57
53
|
return dateHelper_1.DateHelper.getCalendarDatesForCalendar(monthDate, startOfWeek);
|
58
54
|
}, [selectedDate, startOfWeek]);
|
59
|
-
// 날짜 드래그 시작
|
60
|
-
var handleDateMouseDown = function (date, e) {
|
61
|
-
var _a;
|
62
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
63
|
-
return;
|
64
|
-
e.preventDefault(); // 텍스트 선택 방지
|
65
|
-
setDateSelectionStart(date);
|
66
|
-
setDateSelectionEnd(date);
|
67
|
-
setIsDateDragging(true);
|
68
|
-
};
|
69
|
-
// 날짜 드래그 중
|
70
|
-
var handleDateMouseEnter = function (date) {
|
71
|
-
var _a;
|
72
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
73
|
-
return;
|
74
|
-
if (!isDateDragging)
|
75
|
-
return;
|
76
|
-
setDateSelectionEnd(date);
|
77
|
-
};
|
78
|
-
// 드래그 종료 시 콜백 호출
|
79
|
-
(0, react_1.useEffect)(function () {
|
80
|
-
var handleMouseUp = function () {
|
81
|
-
var _a;
|
82
|
-
if (isDateDragging && dateSelectionStart && dateSelectionEnd && ((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
|
83
|
-
var startDate_1 = new Date(Math.min(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
84
|
-
var endDate_1 = new Date(Math.max(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
85
|
-
// 선택된 날짜 구간의 모든 날짜를 생성
|
86
|
-
var selectedDates_1 = [];
|
87
|
-
var current = new Date(startDate_1);
|
88
|
-
while (current <= endDate_1) {
|
89
|
-
selectedDates_1.push(new Date(current));
|
90
|
-
current.setDate(current.getDate() + 1);
|
91
|
-
}
|
92
|
-
// 선택된 날짜 구간에 포함되는 스케줄들 찾기
|
93
|
-
var schedulesInRange_1 = [];
|
94
|
-
schedules.forEach(function (schedule) {
|
95
|
-
var scheduleStartDate = new Date(schedule.startDate);
|
96
|
-
scheduleStartDate.setHours(0, 0, 0, 0);
|
97
|
-
var scheduleEndDate = new Date(schedule.endDate);
|
98
|
-
scheduleEndDate.setHours(0, 0, 0, 0);
|
99
|
-
// 스케줄과 선택된 구간이 겹치는지 확인
|
100
|
-
// 스케줄 시작 <= 선택된 구간 끝 && 스케줄 끝 >= 선택된 구간 시작
|
101
|
-
if (scheduleStartDate <= endDate_1 && scheduleEndDate >= startDate_1) {
|
102
|
-
schedulesInRange_1.push(schedule);
|
103
|
-
}
|
104
|
-
});
|
105
|
-
handleDateDrag({
|
106
|
-
action: 'DRAG',
|
107
|
-
target: 'DATE',
|
108
|
-
dates: selectedDates_1,
|
109
|
-
schedules: schedulesInRange_1,
|
110
|
-
startDate: startDate_1.toISOString(),
|
111
|
-
endDate: endDate_1.toISOString()
|
112
|
-
});
|
113
|
-
}
|
114
|
-
setIsDateDragging(false);
|
115
|
-
setDateSelectionStart(null);
|
116
|
-
setDateSelectionEnd(null);
|
117
|
-
};
|
118
|
-
if (isDateDragging) {
|
119
|
-
document.addEventListener('mouseup', handleMouseUp);
|
120
|
-
return function () { return document.removeEventListener('mouseup', handleMouseUp); };
|
121
|
-
}
|
122
|
-
}, [isDateDragging, dateSelectionStart, dateSelectionEnd, config, schedules]);
|
123
55
|
// 셀 높이 기반으로 최대 스케줄 개수 계산
|
124
56
|
var calculateMaxSchedules = (0, react_1.useCallback)(function () {
|
125
57
|
if (!calendarCellRef.current)
|
@@ -412,14 +344,10 @@ var MonthlyView = function (_a) {
|
|
412
344
|
!!(dragStartDate &&
|
413
345
|
dragEndDate &&
|
414
346
|
date.getTime() >= Math.min(dragStartDate.getTime(), dragEndDate.getTime()) &&
|
415
|
-
date.getTime() <= Math.max(dragStartDate.getTime(), dragEndDate.getTime()))
|
416
|
-
!!(dateSelectionStart &&
|
417
|
-
dateSelectionEnd &&
|
418
|
-
date.getTime() >= Math.min(dateSelectionStart.getTime(), dateSelectionEnd.getTime()) &&
|
419
|
-
date.getTime() <= Math.max(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
347
|
+
date.getTime() <= Math.max(dragStartDate.getTime(), dragEndDate.getTime()));
|
420
348
|
return ((0, jsx_runtime_1.jsxs)(S_CalendarCell, __assign({ ref: date.getMonth() === selectedDate.getMonth() && date.getDate() === 1
|
421
349
|
? calendarCellRef
|
422
|
-
: undefined, "data-calendar-cell": true, "$isCurrentMonth": date.getMonth() === selectedDate.getMonth(), "$isToday": isToday(date), "$isSelected": isCellSelected, "$isPast": isPastDate(date), "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.toDateString()) === date.toDateString(),
|
350
|
+
: undefined, "data-calendar-cell": true, "$isCurrentMonth": date.getMonth() === selectedDate.getMonth(), "$isToday": isToday(date), "$isSelected": isCellSelected, "$isPast": isPastDate(date), "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.toDateString()) === date.toDateString(), onClick: function (e) { return handleDateClick(date, e); }, onMouseUp: handleMouseUp, onDragOver: function (e) { return handleDateDragOver(date, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(date, e); } }, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: isToday(date) ? 'caption2Bold' : 'caption2Regular', textAlign: "center", colorTheme: isToday(date) ? 'sysTextBrandPrimary' : 'sysTextSecondary', text: date.getDate().toString() }), (0, jsx_runtime_1.jsxs)(S_SchedulesContainer, __assign({ "$multiWeekSchedulesCount": visibleRows.length, id: "schedule container" }, { children: [visibleRows.map(function (_a) {
|
423
351
|
var rowIndex = _a.rowIndex, items = _a.items;
|
424
352
|
return items.map(function (item) {
|
425
353
|
var schedule = item.data;
|
@@ -449,7 +377,7 @@ var S_DayHeader = styled_components_1.default.div(templateObject_2 || (templateO
|
|
449
377
|
var theme = _a.theme;
|
450
378
|
return theme.ui_cpnt_divider;
|
451
379
|
});
|
452
|
-
var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n
|
380
|
+
var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n &:nth-child(7n + 1) {\n border-left: 1px solid ", ";\n }\n\n &:nth-child(-n + 7) {\n border-top: 1px solid ", ";\n }\n"], ["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n &:nth-child(7n + 1) {\n border-left: 1px solid ", ";\n }\n\n &:nth-child(-n + 7) {\n border-top: 1px solid ", ";\n }\n"])), function (_a) {
|
453
381
|
var $isSelected = _a.$isSelected, theme = _a.theme;
|
454
382
|
if ($isSelected)
|
455
383
|
return theme.ui_cpnt_sheet_base;
|
@@ -460,9 +388,6 @@ var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templa
|
|
460
388
|
}, function (_a) {
|
461
389
|
var theme = _a.theme;
|
462
390
|
return theme.ui_cpnt_divider;
|
463
|
-
}, function (_a) {
|
464
|
-
var $isDateDragging = _a.$isDateDragging;
|
465
|
-
return ($isDateDragging ? 'none' : 'auto');
|
466
391
|
}, function (_a) {
|
467
392
|
var theme = _a.theme;
|
468
393
|
return theme.ui_cpnt_sheet_base;
|
@@ -51,12 +51,10 @@ var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
|
|
51
51
|
var TimeBasedScheduleItem_1 = require("./TimeBasedScheduleItem");
|
52
52
|
var timeFormatUtils_1 = require("./timeFormatUtils");
|
53
53
|
var WeeklyView = function (_a) {
|
54
|
-
var startOfWeek = _a.startOfWeek
|
54
|
+
var startOfWeek = _a.startOfWeek;
|
55
55
|
var _b = (0, react_i18next_1.useTranslation)(), t = _b.t, i18n = _b.i18n;
|
56
|
-
var _c = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _c.selectedDate, selectedSchedules = _c.selectedSchedules, displayAllDayScheduleMode = _c.displayAllDayScheduleMode, getSchedulesForDate = _c.getSchedulesForDate, isToday = _c.isToday, isDragOverDate = _c.isDragOverDate, handleDateDragOver = _c.handleDateDragOver, handleDateDragLeave = _c.handleDateDragLeave, handleDateDrop = _c.handleDateDrop, handleDateClick = _c.handleDateClick,
|
57
|
-
|
58
|
-
var _e = (0, react_1.useState)(null), timeSelectionEnd = _e[0], setTimeSelectionEnd = _e[1];
|
59
|
-
var _f = (0, react_1.useState)(false), isTimeDragging = _f[0], setIsTimeDragging = _f[1];
|
56
|
+
var _c = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _c.selectedDate, selectedSchedules = _c.selectedSchedules, displayAllDayScheduleMode = _c.displayAllDayScheduleMode, getSchedulesForDate = _c.getSchedulesForDate, isToday = _c.isToday, isDragOverDate = _c.isDragOverDate, handleDateDragOver = _c.handleDateDragOver, handleDateDragLeave = _c.handleDateDragLeave, handleDateDrop = _c.handleDateDrop, handleDateClick = _c.handleDateClick, handleScheduleDragStart = _c.handleScheduleDragStart, handleScheduleDragEnd = _c.handleScheduleDragEnd, isDraggable = _c.isDraggable, handleScheduleClick = _c.handleScheduleClick, getDayTextByDate = _c.getDayTextByDate;
|
57
|
+
// Generate calendar dates for weekly view
|
60
58
|
var calendarDates = (0, react_1.useMemo)(function () {
|
61
59
|
var dates = [];
|
62
60
|
var startIndex = startOfWeek === 'monday' ? 1 : 0;
|
@@ -67,108 +65,10 @@ var WeeklyView = function (_a) {
|
|
67
65
|
}
|
68
66
|
return dates;
|
69
67
|
}, [selectedDate, startOfWeek]);
|
70
|
-
// 시간 드래그 시작
|
71
|
-
var handleTimeMouseDown = (0, react_1.useCallback)(function (date, hour, e) {
|
72
|
-
var _a;
|
73
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
74
|
-
return;
|
75
|
-
e.preventDefault();
|
76
|
-
var selection = { date: date, hour: hour };
|
77
|
-
setTimeSelectionStart(selection);
|
78
|
-
setTimeSelectionEnd(selection);
|
79
|
-
setIsTimeDragging(true);
|
80
|
-
}, [config]);
|
81
|
-
// 시간 드래그 중
|
82
|
-
var handleTimeMouseEnter = (0, react_1.useCallback)(function (date, hour) {
|
83
|
-
if (!isTimeDragging)
|
84
|
-
return;
|
85
|
-
setTimeSelectionEnd({ date: date, hour: hour });
|
86
|
-
}, [isTimeDragging]);
|
87
|
-
// 드래그 종료 시 콜백 호출
|
88
|
-
(0, react_1.useEffect)(function () {
|
89
|
-
var handleMouseUp = function () {
|
90
|
-
var _a;
|
91
|
-
if (isTimeDragging && timeSelectionStart && timeSelectionEnd && ((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
|
92
|
-
// 선택된 시간 범위 계산
|
93
|
-
var startDateTime = new Date(timeSelectionStart.date);
|
94
|
-
startDateTime.setHours(timeSelectionStart.hour, 0, 0, 0);
|
95
|
-
var endDateTime = new Date(timeSelectionEnd.date);
|
96
|
-
endDateTime.setHours(timeSelectionEnd.hour, 59, 59, 999);
|
97
|
-
// 실제 시작/종료 시간 (순서 보정)
|
98
|
-
var actualStartTime_1 = new Date(Math.min(startDateTime.getTime(), endDateTime.getTime()));
|
99
|
-
var actualEndTime_1 = new Date(Math.max(startDateTime.getTime(), endDateTime.getTime()));
|
100
|
-
// 선택된 시간 범위에 포함되는 스케줄들 찾기
|
101
|
-
var schedulesInRange_1 = [];
|
102
|
-
schedules.forEach(function (schedule) {
|
103
|
-
var scheduleStart = new Date(schedule.startDate);
|
104
|
-
var scheduleEnd = new Date(schedule.endDate);
|
105
|
-
// 스케줄이 선택된 시간 범위와 겹치는지 확인
|
106
|
-
if (scheduleStart <= actualEndTime_1 && scheduleEnd >= actualStartTime_1) {
|
107
|
-
schedulesInRange_1.push(schedule);
|
108
|
-
}
|
109
|
-
});
|
110
|
-
// 선택된 날짜들 생성 (시간 범위에 포함된 모든 날짜)
|
111
|
-
var selectedDates = [];
|
112
|
-
var currentDate = new Date(actualStartTime_1);
|
113
|
-
currentDate.setHours(0, 0, 0, 0);
|
114
|
-
var endDate = new Date(actualEndTime_1);
|
115
|
-
endDate.setHours(0, 0, 0, 0);
|
116
|
-
while (currentDate <= endDate) {
|
117
|
-
selectedDates.push(new Date(currentDate));
|
118
|
-
currentDate.setDate(currentDate.getDate() + 1);
|
119
|
-
}
|
120
|
-
handleDateDrag({
|
121
|
-
action: 'DRAG',
|
122
|
-
target: 'DATE',
|
123
|
-
dates: selectedDates,
|
124
|
-
schedules: schedulesInRange_1,
|
125
|
-
startDate: actualStartTime_1.toISOString(),
|
126
|
-
endDate: actualEndTime_1.toISOString()
|
127
|
-
});
|
128
|
-
}
|
129
|
-
setIsTimeDragging(false);
|
130
|
-
setTimeSelectionStart(null);
|
131
|
-
setTimeSelectionEnd(null);
|
132
|
-
};
|
133
|
-
if (isTimeDragging) {
|
134
|
-
document.addEventListener('mouseup', handleMouseUp);
|
135
|
-
return function () { return document.removeEventListener('mouseup', handleMouseUp); };
|
136
|
-
}
|
137
|
-
}, [isTimeDragging, timeSelectionStart, timeSelectionEnd, config, schedules]);
|
138
|
-
// 선택한 시간이 드래그 범위에 포함되는지 확인
|
139
|
-
var isTimeSlotInDragRange = (0, react_1.useCallback)(function (date, hour) {
|
140
|
-
if (!timeSelectionStart || !timeSelectionEnd)
|
141
|
-
return false;
|
142
|
-
var slotDateTime = new Date(date);
|
143
|
-
slotDateTime.setHours(hour, 0, 0, 0);
|
144
|
-
var startDateTime = new Date(timeSelectionStart.date);
|
145
|
-
startDateTime.setHours(timeSelectionStart.hour, 0, 0, 0);
|
146
|
-
var endDateTime = new Date(timeSelectionEnd.date);
|
147
|
-
endDateTime.setHours(timeSelectionEnd.hour, 0, 0, 0);
|
148
|
-
var actualStartTime = Math.min(startDateTime.getTime(), endDateTime.getTime());
|
149
|
-
var actualEndTime = Math.max(startDateTime.getTime(), endDateTime.getTime());
|
150
|
-
return slotDateTime.getTime() >= actualStartTime && slotDateTime.getTime() <= actualEndTime;
|
151
|
-
}, [timeSelectionStart, timeSelectionEnd]);
|
152
68
|
return ((0, jsx_runtime_1.jsxs)(S_WeeklyContainer, { children: [(0, jsx_runtime_1.jsxs)(S_WeeklyHeader, { children: [(0, jsx_runtime_1.jsx)(S_TimeColumnHeader, {}), calendarDates.map(function (date, index) {
|
153
69
|
var dayText = getDayTextByDate(date);
|
154
|
-
var monthNames = [
|
155
|
-
'Jan',
|
156
|
-
'Feb',
|
157
|
-
'Mar',
|
158
|
-
'Apr',
|
159
|
-
'May',
|
160
|
-
'Jun',
|
161
|
-
'Jul',
|
162
|
-
'Aug',
|
163
|
-
'Sep',
|
164
|
-
'Oct',
|
165
|
-
'Nov',
|
166
|
-
'Dec'
|
167
|
-
];
|
168
|
-
var isEnglish = i18n.language === 'en'; // i18n 인스턴스에서 현재 언어 확인
|
169
|
-
var monthText = isEnglish ? monthNames[date.getMonth()] : date.getMonth() + 1;
|
170
70
|
var dateText = t('str_calendar_weekly_date', {
|
171
|
-
month:
|
71
|
+
month: date.getMonth() + 1,
|
172
72
|
date: date.getDate(),
|
173
73
|
day: dayText
|
174
74
|
});
|
@@ -177,7 +77,7 @@ var WeeklyView = function (_a) {
|
|
177
77
|
var timeSlotDate = new Date(date);
|
178
78
|
timeSlotDate.setHours(hour, 0, 0, 0);
|
179
79
|
var isDragOver = (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) === timeSlotDate.getTime();
|
180
|
-
return ((0, jsx_runtime_1.jsx)(S_TimeSlot, __assign({ "$isDragOver": isDragOver, "$isDraggable": isDraggable,
|
80
|
+
return ((0, jsx_runtime_1.jsx)(S_TimeSlot, __assign({ "$isDragOver": isDragOver, "$isDraggable": isDraggable, onClick: function () { return handleDateClick(date, {}); }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); } }, { children: hour === 0 && ((0, jsx_runtime_1.jsx)(TimeBasedScheduleItem_1.TimeBasedScheduleItem, { schedules: getSchedulesForDate(date), selectedSchedules: selectedSchedules, isDraggable: isDraggable, onClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd })) }), dayIndex));
|
181
81
|
}) })] }, hour)); })] }))] }));
|
182
82
|
};
|
183
83
|
exports.WeeklyView = WeeklyView;
|
@@ -201,19 +101,13 @@ var S_TimeLabel = styled_components_1.default.div(templateObject_8 || (templateO
|
|
201
101
|
return theme.ui_cpnt_divider;
|
202
102
|
});
|
203
103
|
var S_TimeSlots = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
|
204
|
-
var S_TimeSlot = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor:
|
205
|
-
if (props.$isInTimeDragRange)
|
206
|
-
return props.theme.ui_cpnt_sheet_base;
|
207
|
-
if (props.$isDragOver)
|
208
|
-
return props.theme.ui_cpnt_sheet_base;
|
209
|
-
return 'transparent';
|
210
|
-
}, function (_a) {
|
104
|
+
var S_TimeSlot = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: default;\n min-width: 0;\n overflow: visible;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: default;\n min-width: 0;\n overflow: visible;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_cpnt_sheet_base : 'transparent'); }, function (_a) {
|
211
105
|
var theme = _a.theme;
|
212
106
|
return theme.ui_cpnt_divider;
|
213
107
|
}, function (_a) {
|
214
108
|
var theme = _a.theme;
|
215
109
|
return theme.ui_cpnt_divider;
|
216
|
-
}, function (
|
110
|
+
}, function (_a) {
|
217
111
|
var theme = _a.theme;
|
218
112
|
return theme.ui_cpnt_sheet_base;
|
219
113
|
});
|
@@ -1,12 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
exports.toUTC = exports.getHeaderText = exports.calculateDateRange = exports.calculateIsAllDay = void 0;
|
7
|
-
var i18n_1 = __importDefault(require("../../../common/services/i18n"));
|
8
4
|
var dateHelper_1 = require("../../../common/utils/dateHelper");
|
9
|
-
var constants_1 = require("./constants");
|
10
5
|
/**
|
11
6
|
* 일정이 종일 일정인지 확인하는 함수
|
12
7
|
* @param startDate 시작 날짜
|
@@ -27,16 +22,16 @@ var calculateIsAllDay = function (startDate, endDate) {
|
|
27
22
|
exports.calculateIsAllDay = calculateIsAllDay;
|
28
23
|
var calculateDateRange = function (viewType, baseDate) {
|
29
24
|
switch (viewType) {
|
30
|
-
case '
|
25
|
+
case 'DAILY':
|
31
26
|
return { startDate: baseDate, endDate: baseDate };
|
32
|
-
case '
|
27
|
+
case 'WEEKLY': {
|
33
28
|
var start = new Date(baseDate);
|
34
29
|
start.setDate(baseDate.getDate() - baseDate.getDay());
|
35
30
|
var end = new Date(start);
|
36
31
|
end.setDate(start.getDate() + 6);
|
37
32
|
return { startDate: start, endDate: end };
|
38
33
|
}
|
39
|
-
case '
|
34
|
+
case 'MONTHLY': {
|
40
35
|
var startDate = new Date(baseDate.getFullYear(), baseDate.getMonth(), 1);
|
41
36
|
// 실제 MonthlyView에서 보여지는 날짜 배열을 구함
|
42
37
|
var days = dateHelper_1.DateHelper.getCalendarDatesForCalendar(startDate, 'sunday');
|
@@ -45,7 +40,7 @@ var calculateDateRange = function (viewType, baseDate) {
|
|
45
40
|
endDate: days[days.length - 1]
|
46
41
|
};
|
47
42
|
}
|
48
|
-
case '
|
43
|
+
case 'YEARLY':
|
49
44
|
return {
|
50
45
|
startDate: new Date(baseDate.getFullYear(), 0, 1),
|
51
46
|
endDate: new Date(baseDate.getFullYear(), 11, 31)
|
@@ -68,21 +63,16 @@ var getHeaderText = function (viewType, selectedDate, t) {
|
|
68
63
|
var year = selectedDate.getFullYear();
|
69
64
|
var monthNumber = selectedDate.getMonth() + 1;
|
70
65
|
var day = selectedDate.getDate();
|
71
|
-
|
72
|
-
// For English locale, use month names instead of numbers for WEEKLY and MONTHLY views
|
73
|
-
var monthValue = locale === 'en-US' && (viewType === 'str_fm_week' || viewType === 'str_fm_month')
|
74
|
-
? t("calendar_month_".concat(monthNumber))
|
75
|
-
: monthNumber;
|
76
|
-
if (viewType === 'str_fm_day') {
|
66
|
+
if (viewType === 'DAILY') {
|
77
67
|
return t('str_calendar_daily_header', { year: year, month: monthNumber, day: day });
|
78
68
|
}
|
79
|
-
if (viewType === '
|
80
|
-
return t('str_calendar_weekly_header', { year: year, month:
|
69
|
+
if (viewType === 'WEEKLY') {
|
70
|
+
return t('str_calendar_weekly_header', { year: year, month: monthNumber });
|
81
71
|
}
|
82
|
-
if (viewType === '
|
83
|
-
return t('str_calendar_monthly_header', { year: year, month:
|
72
|
+
if (viewType === 'MONTHLY') {
|
73
|
+
return t('str_calendar_monthly_header', { year: year, month: monthNumber });
|
84
74
|
}
|
85
|
-
if (viewType === '
|
75
|
+
if (viewType === 'YEARLY') {
|
86
76
|
return t('str_calendar_yearly_header', { year: year });
|
87
77
|
}
|
88
78
|
return '';
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export type CalendarViewType = '
|
2
|
+
export type CalendarViewType = 'MONTHLY' | 'WEEKLY' | 'DAILY' | 'YEARLY';
|
3
3
|
export type displayAllDayScheduleMode = 'none' | 'use';
|
4
4
|
export type StartOfWeek = 'sunday' | 'monday';
|
5
5
|
export type TodayBtnMode = 'none' | 'use';
|
6
|
-
export type ActionType = 'CLICK' | 'CLICK_WITH_SHIFT_KEY_DOWN' | 'DELETE_KEY_DOWN' | 'DRAG';
|
6
|
+
export type ActionType = 'CLICK' | 'CLICK_WITH_SHIFT_KEY_DOWN' | 'DELETE_KEY_DOWN' | 'DRAG' | 'DOUBLE_CLICK';
|
7
7
|
export type TargetType = 'SCHEDULE' | 'DATE';
|
8
8
|
export type Action = {
|
9
9
|
action: ActionType;
|
@@ -40,8 +40,8 @@ export type CalendarAction = {
|
|
40
40
|
};
|
41
41
|
};
|
42
42
|
export type CalendarProps = {
|
43
|
-
defaultViewType?: CalendarViewType;
|
44
|
-
viewTypes?: CalendarViewType[];
|
43
|
+
defaultViewType?: CalendarViewType | 'str_fm_month' | 'str_fm_week' | 'str_fm_day' | 'str_fm_year';
|
44
|
+
viewTypes?: (CalendarViewType | 'str_fm_month' | 'str_fm_week' | 'str_fm_day' | 'str_fm_year')[];
|
45
45
|
displayAllDayScheduleMode?: displayAllDayScheduleMode;
|
46
46
|
startOfWeek?: StartOfWeek;
|
47
47
|
todayBtnMode?: TodayBtnMode;
|
@@ -59,7 +59,3 @@ export type EventItemProps = {
|
|
59
59
|
onDoubleClick: (schedule: Schedule) => void;
|
60
60
|
isSelected?: boolean;
|
61
61
|
};
|
62
|
-
export type TimeSelection = {
|
63
|
-
date: Date;
|
64
|
-
hour: number;
|
65
|
-
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { PDSTextType } from '../../../common';
|
1
|
+
import type { PDSIconType, PDSTextType } from '../../../common';
|
2
2
|
import type React from 'react';
|
3
3
|
export type TextButtonProps = {
|
4
4
|
text?: PDSTextType;
|
@@ -7,9 +7,12 @@ export type TextButtonProps = {
|
|
7
7
|
fontWeight?: 'bold' | 'regular';
|
8
8
|
type?: 'submit' | 'reset' | 'button';
|
9
9
|
state?: 'normal' | 'disabled';
|
10
|
+
iconMode?: 'none' | 'left' | 'right';
|
11
|
+
iconFillType?: 'fill' | 'line';
|
12
|
+
iconName?: PDSIconType;
|
10
13
|
colorTheme?: 'none' | 'red' | 'grey_01' | 'grey2' | 'grey3' | 'white' | 'white2';
|
11
14
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
12
15
|
onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
13
16
|
};
|
14
|
-
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, colorTheme, onClick, onKeyDown, ...rest }: TextButtonProps): JSX.Element;
|
17
|
+
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, iconMode, iconFillType, iconName, colorTheme, onClick, onKeyDown, ...rest }: TextButtonProps): JSX.Element;
|
15
18
|
export default TextButton;
|