pds-dev-kit-web-test 2.5.440 → 2.5.442

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.
Files changed (185) hide show
  1. package/dist/src/common/hooks/useTooltip.js +1 -1
  2. package/dist/src/common/services/i18n/resources/en.json +1 -29
  3. package/dist/src/common/services/i18n/resources/es.json +1 -28
  4. package/dist/src/common/services/i18n/resources/fil.json +1 -28
  5. package/dist/src/common/services/i18n/resources/index.d.ts +0 -194
  6. package/dist/src/common/services/i18n/resources/ja.json +1 -29
  7. package/dist/src/common/services/i18n/resources/ko.json +1 -29
  8. package/dist/src/common/services/i18n/resources/zh-cn.json +1 -29
  9. package/dist/src/common/services/i18n/resources/zh-tw.json +1 -29
  10. package/dist/src/common/styles/colorSet/index.d.ts +2 -2
  11. package/dist/src/common/styles/colorSet/index.js +2 -2
  12. package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
  13. package/dist/src/common/utils/dateHelper.d.ts +0 -3
  14. package/dist/src/common/utils/dateHelper.js +0 -37
  15. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  16. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +21 -0
  17. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +1133 -0
  18. package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +4 -1
  19. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +5 -3
  20. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +53 -53
  21. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.d.ts +11 -0
  22. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.js +45 -0
  23. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +10 -0
  24. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +79 -0
  25. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  26. package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
  27. package/dist/src/sub/DynamicLayout/components/Section/sectionContext.d.ts +2 -2
  28. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.d.ts +12 -0
  29. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.js +76 -0
  30. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.d.ts +4 -0
  31. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.js +47 -0
  32. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.d.ts +12 -0
  33. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.js +76 -0
  34. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.d.ts +12 -0
  35. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.js +76 -0
  36. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.d.ts +12 -0
  37. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.js +76 -0
  38. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +40 -0
  39. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +36 -177
  40. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +152 -4
  41. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +150 -2
  42. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +45 -1
  43. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +262 -9
  44. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +593 -0
  45. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +253 -0
  46. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +3 -1
  47. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +5 -3
  48. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +2 -1
  49. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.js +9 -2
  50. package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +139 -0
  51. package/dist/src/sub/DynamicLayout/compositionQueryContext.d.ts +8 -0
  52. package/dist/src/sub/DynamicLayout/compositionQueryContext.js +14 -0
  53. package/dist/src/sub/DynamicLayout/mock_composition.d.ts +3 -0
  54. package/dist/src/sub/DynamicLayout/mock_composition.js +1606 -0
  55. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +1 -0
  56. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +1111 -0
  57. package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +1 -0
  58. package/dist/src/sub/DynamicLayout/mock_contentsList.js +1091 -0
  59. package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +96 -0
  60. package/dist/src/sub/DynamicLayout/mock_queryData.js +2639 -0
  61. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +842 -0
  62. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +854 -0
  63. package/dist/src/sub/DynamicLayout/mock_video.d.ts +368 -0
  64. package/dist/src/sub/DynamicLayout/mock_video.js +371 -0
  65. package/dist/src/sub/DynamicLayout/mocks.d.ts +8 -960
  66. package/dist/src/sub/DynamicLayout/mocks.js +4286 -6
  67. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +4 -4
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +1 -1
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +4 -4
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +13 -3
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +18 -2
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +4 -4
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +121 -3
  74. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +12 -0
  75. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +61 -0
  76. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
  77. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
  78. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
  79. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
  80. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +9 -0
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +87 -0
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +4 -0
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +849 -0
  84. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +43 -0
  85. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +162 -0
  86. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +39 -0
  87. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +182 -0
  88. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +25 -0
  89. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +234 -0
  90. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
  91. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
  92. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +1 -0
  93. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +8 -0
  94. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +139 -0
  95. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.js +2 -0
  96. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +8 -0
  97. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +190 -0
  98. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.d.ts +17 -0
  99. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.js +39 -0
  100. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +10 -0
  101. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +85 -0
  102. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +25 -0
  103. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +183 -0
  104. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +29 -0
  105. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +128 -0
  106. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +23 -0
  107. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +230 -0
  108. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.d.ts +1 -0
  109. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.js +8 -0
  110. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +67 -0
  111. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.js +2 -0
  112. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +39 -3
  113. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +8 -0
  114. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +138 -0
  115. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +12 -0
  116. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +39 -0
  117. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
  118. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
  119. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
  121. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +20 -0
  122. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +173 -0
  123. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +9 -0
  124. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +87 -0
  125. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +4 -0
  126. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +849 -0
  127. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +43 -0
  128. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +162 -0
  129. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +26 -0
  130. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +235 -0
  131. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
  132. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
  133. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +1 -0
  134. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.js +8 -0
  135. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +46 -0
  136. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +186 -0
  137. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +163 -0
  138. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +2 -0
  139. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +31 -7
  140. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +45 -1
  141. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/group.d.ts +1 -1
  142. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -1
  143. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +27 -10
  144. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +3 -1
  145. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +4 -4
  146. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +2 -2
  147. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.d.ts +14 -0
  148. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.js +26 -0
  149. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
  150. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +1 -1
  151. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
  152. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  153. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +52 -3
  154. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.d.ts +1 -1
  155. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -0
  156. package/dist/src/sub/DynamicLayout/types.d.ts +49 -16
  157. package/package.json +3 -2
  158. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.d.ts +0 -13
  159. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.js +0 -48
  160. package/dist/src/desktop/components/Calendar/Calendar.d.ts +0 -4
  161. package/dist/src/desktop/components/Calendar/Calendar.js +0 -365
  162. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.d.ts +0 -7
  163. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.js +0 -48
  164. package/dist/src/desktop/components/Calendar/DailyView.d.ts +0 -17
  165. package/dist/src/desktop/components/Calendar/DailyView.js +0 -82
  166. package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +0 -26
  167. package/dist/src/desktop/components/Calendar/MonthlyView.js +0 -222
  168. package/dist/src/desktop/components/Calendar/ScheduleItem.d.ts +0 -16
  169. package/dist/src/desktop/components/Calendar/ScheduleItem.js +0 -49
  170. package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +0 -21
  171. package/dist/src/desktop/components/Calendar/WeeklyView.js +0 -100
  172. package/dist/src/desktop/components/Calendar/YearlyView.d.ts +0 -11
  173. package/dist/src/desktop/components/Calendar/YearlyView.js +0 -71
  174. package/dist/src/desktop/components/Calendar/calendarUtils.d.ts +0 -23
  175. package/dist/src/desktop/components/Calendar/calendarUtils.js +0 -101
  176. package/dist/src/desktop/components/Calendar/constants.d.ts +0 -1
  177. package/dist/src/desktop/components/Calendar/constants.js +0 -31
  178. package/dist/src/desktop/components/Calendar/index.d.ts +0 -10
  179. package/dist/src/desktop/components/Calendar/index.js +0 -37
  180. package/dist/src/desktop/components/Calendar/timeFormatUtils.d.ts +0 -16
  181. package/dist/src/desktop/components/Calendar/timeFormatUtils.js +0 -45
  182. package/dist/src/desktop/components/Calendar/types.d.ts +0 -60
  183. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +0 -6
  184. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +0 -27
  185. /package/dist/src/{desktop/components/Calendar/types.js → sub/DynamicLayout/compositionActionTypes.js} +0 -0
@@ -1,222 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.MonthlyView = void 0;
22
- var jsx_runtime_1 = require("react/jsx-runtime");
23
- var react_1 = require("react");
24
- var react_i18next_1 = require("react-i18next");
25
- var dateHelper_1 = require("../../../common/utils/dateHelper");
26
- var styled_components_1 = __importDefault(require("styled-components"));
27
- var TextLabel_1 = require("../TextLabel");
28
- var ScheduleItem_1 = require("./ScheduleItem");
29
- var MonthlyView = function (_a) {
30
- 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, 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, renderScheduleItem = _a.renderScheduleItem, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd;
31
- var t = (0, react_i18next_1.useTranslation)().t;
32
- var MAX_SCHEDULES_PER_DAY = 3;
33
- var days = (function () {
34
- var monthDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1);
35
- return dateHelper_1.DateHelper.getCalendarDatesForCalendar(monthDate, startOfWeek);
36
- })();
37
- // 다중 이벤트 계산
38
- var getMultiWeekSchedules = (0, react_1.useMemo)(function () {
39
- var multiWeekSchedules = [];
40
- var allSchedules = new Map();
41
- days.forEach(function (date) {
42
- var schedulesForDate = getSchedulesForDate(date);
43
- schedulesForDate.forEach(function (schedule) {
44
- // 종일 이벤트만 추가
45
- if (schedule.isAllDay) {
46
- allSchedules.set(schedule.id, schedule);
47
- }
48
- });
49
- });
50
- allSchedules.forEach(function (schedule) {
51
- var scheduleStart = new Date(schedule.start_date);
52
- var scheduleEnd = new Date(schedule.end_date);
53
- scheduleStart.setHours(0, 0, 0, 0);
54
- scheduleEnd.setHours(0, 0, 0, 0);
55
- // 여러 날짜에 걸친 이벤트인지 확인
56
- if (scheduleStart.getTime() !== scheduleEnd.getTime()) {
57
- // 캘린더 그리드에서 시작과 끝 위치 찾기
58
- var startIndex = days.findIndex(function (date) {
59
- var d = new Date(date);
60
- d.setHours(0, 0, 0, 0);
61
- return d.getTime() === scheduleStart.getTime();
62
- });
63
- var endIndex = days.findIndex(function (date) {
64
- var d = new Date(date);
65
- d.setHours(0, 0, 0, 0);
66
- return d.getTime() === scheduleEnd.getTime();
67
- });
68
- if (startIndex !== -1 && endIndex !== -1) {
69
- var startRow_1 = Math.floor(startIndex / 7) + 2; // 헤더(+1)와 0-based 인덱스(+1) 고려
70
- var endRow = Math.floor(endIndex / 7) + 2;
71
- var startCol = (startIndex % 7) + 1;
72
- var endCol = (endIndex % 7) + 1;
73
- // 이벤트가 겹치지 않도록 행별 인덱스 계산
74
- var existingSchedulesInRow = multiWeekSchedules.filter(function (e) { return e.startRow === startRow_1; }).length;
75
- multiWeekSchedules.push({
76
- schedule: schedule,
77
- startRow: startRow_1,
78
- endRow: endRow,
79
- startCol: startCol,
80
- endCol: endCol,
81
- scheduleIndex: existingSchedulesInRow
82
- });
83
- }
84
- }
85
- });
86
- return multiWeekSchedules;
87
- }, [days, getSchedulesForDate]);
88
- // 시작 요일에 따라 정렬된 요일 헤더 생성
89
- var orderedDayTexts = (function () {
90
- var weekDates = [];
91
- var today = new Date();
92
- var startIndex = startOfWeek === 'monday' ? 1 : 0;
93
- var firstDayOfWeek = new Date(today);
94
- firstDayOfWeek.setDate(today.getDate() - ((today.getDay() - startIndex + 7) % 7));
95
- for (var i = 0; i < 7; i += 1) {
96
- var date = new Date(firstDayOfWeek);
97
- date.setDate(firstDayOfWeek.getDate() + i);
98
- weekDates.push(getDayTextByDate(date));
99
- }
100
- return weekDates;
101
- })();
102
- return ((0, jsx_runtime_1.jsxs)(S_MonthlyGrid, __assign({ "data-calendar-grid": true }, { children: [orderedDayTexts.map(function (day, index) { return ((0, jsx_runtime_1.jsx)(S_DayHeader, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", textAlign: "center", colorTheme: "sysTextSecondary", text: day }) }, "".concat(day, "-").concat(index))); }), days.map(function (date, index) {
103
- var daySchedules = getSchedulesForDate(date);
104
- // 종일 이벤트와 시간 이벤트 분리
105
- var allDaySchedules = daySchedules.filter(function (schedule) {
106
- if (!schedule.isAllDay)
107
- return false;
108
- var scheduleStart = new Date(schedule.start_date);
109
- var scheduleEnd = new Date(schedule.end_date);
110
- var checkDate = new Date(date);
111
- // 날짜 비교를 위해 시간을 00:00:00으로 설정
112
- scheduleStart.setHours(0, 0, 0, 0);
113
- scheduleEnd.setHours(0, 0, 0, 0);
114
- checkDate.setHours(0, 0, 0, 0);
115
- // 단일 날짜의 종일 이벤트만 포함
116
- return (scheduleStart.getTime() === scheduleEnd.getTime() &&
117
- scheduleStart.getTime() === checkDate.getTime());
118
- });
119
- var timeSchedules = daySchedules.filter(function (schedule) { return !schedule.isAllDay; });
120
- // 시간 이벤트를 시작 시간순으로 정렬
121
- timeSchedules.sort(function (a, b) {
122
- var timeA = new Date(a.start_date).getTime();
123
- var timeB = new Date(b.start_date).getTime();
124
- return timeA - timeB;
125
- });
126
- var visibleAllDaySchedules = allDaySchedules.slice(0, MAX_SCHEDULES_PER_DAY);
127
- var visibleTimeSchedules = timeSchedules.slice(0, MAX_SCHEDULES_PER_DAY);
128
- var hiddenSchedulesCount = daySchedules.length - (visibleAllDaySchedules.length + visibleTimeSchedules.length);
129
- return ((0, jsx_runtime_1.jsxs)(S_CalendarCell, __assign({ "$isCurrentMonth": date.getMonth() === selectedDate.getMonth(), "$isToday": isToday(date), "$isSelected": selectedDates.some(function (selectedDate) { return selectedDate.toDateString() === date.toDateString(); }) ||
130
- !!(dragStartDate &&
131
- dragEndDate &&
132
- date.getTime() >= Math.min(dragStartDate.getTime(), dragEndDate.getTime()) &&
133
- date.getTime() <= Math.max(dragStartDate.getTime(), dragEndDate.getTime())), "$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, { children: [visibleAllDaySchedules.map(function (schedule) {
134
- return renderScheduleItem(schedule, {
135
- onDragStart: function (e) { return handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e); },
136
- onDragEnd: function () { return handleScheduleDragEnd === null || handleScheduleDragEnd === void 0 ? void 0 : handleScheduleDragEnd(); }
137
- });
138
- }), visibleTimeSchedules.map(function (schedule) {
139
- return renderScheduleItem(schedule, {
140
- onDragStart: function (e) { return handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e); },
141
- onDragEnd: function () { return handleScheduleDragEnd === null || handleScheduleDragEnd === void 0 ? void 0 : handleScheduleDragEnd(); }
142
- });
143
- }), daySchedules.length >= 3 && hiddenSchedulesCount > 0 && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: "".concat(hiddenSchedulesCount, " ").concat(t('calendar_more_schedules')), styleTheme: "caption2Regular" }))] })] }), index));
144
- }), getMultiWeekSchedules.map(function (_a) {
145
- var schedule = _a.schedule, startRow = _a.startRow, endRow = _a.endRow, startCol = _a.startCol, endCol = _a.endCol, scheduleIndex = _a.scheduleIndex;
146
- var isSameRow = startRow === endRow;
147
- var isSelected = selectedSchedules.some(function (s) { return s.id === schedule.id; });
148
- if (isSameRow) {
149
- // 단일 행
150
- return ((0, jsx_runtime_1.jsxs)(S_MultiWeekSchedule, __assign({ "$color": schedule.color, "$startRow": startRow, "$endRow": endRow, "$startCol": startCol, "$endCol": endCol, "$scheduleIndex": scheduleIndex, "$isSelected": isSelected, draggable: true, onDragStart: function (e) {
151
- handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e);
152
- }, onDragEnd: handleScheduleDragEnd, onClick: function (e) {
153
- e.stopPropagation();
154
- handleScheduleClick === null || handleScheduleClick === void 0 ? void 0 : handleScheduleClick(schedule, e);
155
- } }, { children: [(0, jsx_runtime_1.jsx)(ScheduleItem_1.S_Dot, { "$isSelected": isSelected }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Regular", text: schedule.title, ellipsisMode: "use", colorTheme: isSelected ? 'sysTextWhite' : undefined })] }), "multi-".concat(schedule.id)));
156
- }
157
- // 여러 행
158
- var segments = [];
159
- for (var row = startRow; row <= endRow; row += 1) {
160
- var isFirstRow = row === startRow;
161
- var isLastRow = row === endRow;
162
- var segmentStartCol = isFirstRow ? startCol : 1;
163
- var segmentEndCol = isLastRow ? endCol : 7;
164
- segments.push((0, jsx_runtime_1.jsxs)(S_MultiWeekSchedule, __assign({ "$color": schedule.color, "$startRow": row, "$endRow": row, "$startCol": segmentStartCol, "$endCol": segmentEndCol, "$scheduleIndex": scheduleIndex, "$isSelected": isSelected, draggable: true, onDragStart: function (e) {
165
- handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e);
166
- }, onDragEnd: handleScheduleDragEnd, onClick: function (e) {
167
- e.stopPropagation();
168
- handleScheduleClick === null || handleScheduleClick === void 0 ? void 0 : handleScheduleClick(schedule, e);
169
- } }, { children: [(0, jsx_runtime_1.jsx)(ScheduleItem_1.S_Dot, { "$isSelected": isSelected }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Regular", text: schedule.title, ellipsisMode: "use", colorTheme: isSelected ? 'sysTextWhite' : undefined })] }), "multi-".concat(schedule.id, "-row-").concat(row)));
170
- }
171
- return segments;
172
- })] })));
173
- };
174
- exports.MonthlyView = MonthlyView;
175
- var S_MonthlyGrid = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n gap: 0;\n grid-template-columns: repeat(7, 1fr);\n grid-template-rows: auto repeat(6, 1fr); /* \uD5E4\uB354\uB294 auto, \uB098\uBA38\uC9C0 6\uC8FC\uB294 \uB3D9\uC77C\uD55C \uB192\uC774 */\n height: 100%; /* \uC140 \uAC04\uACA9\uC744 \uC81C\uAC70\uD558\uC5EC \uC774\uBCA4\uD2B8\uAC00 \uC5F0\uACB0\uB418\uC5B4 \uBCF4\uC774\uB3C4\uB85D */\n overflow-x: hidden; /* \uADF8\uB9AC\uB4DC \uACBD\uACC4\uB97C \uB118\uB294 \uC694\uC18C\uB97C \uC228\uAE40 */\n position: relative;\n"], ["\n display: grid;\n gap: 0;\n grid-template-columns: repeat(7, 1fr);\n grid-template-rows: auto repeat(6, 1fr); /* \uD5E4\uB354\uB294 auto, \uB098\uBA38\uC9C0 6\uC8FC\uB294 \uB3D9\uC77C\uD55C \uB192\uC774 */\n height: 100%; /* \uC140 \uAC04\uACA9\uC744 \uC81C\uAC70\uD558\uC5EC \uC774\uBCA4\uD2B8\uAC00 \uC5F0\uACB0\uB418\uC5B4 \uBCF4\uC774\uB3C4\uB85D */\n overflow-x: hidden; /* \uADF8\uB9AC\uB4DC \uACBD\uACC4\uB97C \uB118\uB294 \uC694\uC18C\uB97C \uC228\uAE40 */\n position: relative;\n"])));
176
- var S_DayHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-bottom: 1px solid ", ";\n padding: 12px 8px;\n text-align: center;\n"], ["\n border-bottom: 1px solid ", ";\n padding: 12px 8px;\n text-align: center;\n"])), function (_a) {
177
- var theme = _a.theme;
178
- return theme.ui_cpnt_divider;
179
- });
180
- 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 cursor: pointer;\n min-height: 120px;\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 cursor: pointer;\n min-height: 120px;\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) {
181
- var $isSelected = _a.$isSelected, theme = _a.theme;
182
- if ($isSelected)
183
- return theme.ui_cpnt_sheet_base;
184
- return 'transparent';
185
- }, function (_a) {
186
- var theme = _a.theme;
187
- return theme.ui_cpnt_divider;
188
- }, function (_a) {
189
- var theme = _a.theme;
190
- return theme.ui_cpnt_divider;
191
- }, function (_a) {
192
- var theme = _a.theme;
193
- return theme.ui_cpnt_sheet_base;
194
- }, function (_a) {
195
- var theme = _a.theme;
196
- return theme.ui_cpnt_divider;
197
- }, function (_a) {
198
- var theme = _a.theme;
199
- return theme.ui_cpnt_divider;
200
- });
201
- var S_SchedulesContainer = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n overflow: visible;\n position: relative;\n"], ["\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 2px;\n overflow: visible;\n position: relative;\n"])));
202
- var S_MultiWeekSchedule = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: 4px;\n color: white;\n cursor: pointer;\n display: flex;\n font-size: 12px;\n height: 20px; /* \uACE0\uC815 \uB192\uC774\uB85C \uC124\uC815 */\n left: ", ";\n padding: 2px 6px;\n position: absolute;\n top: ", ";\n user-select: none;\n width: ", ";\n z-index: 10;\n\n &:active {\n background: ", ";\n cursor: grabbing;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: 4px;\n color: white;\n cursor: pointer;\n display: flex;\n font-size: 12px;\n height: 20px; /* \uACE0\uC815 \uB192\uC774\uB85C \uC124\uC815 */\n left: ", ";\n padding: 2px 6px;\n position: absolute;\n top: ", ";\n user-select: none;\n width: ", ";\n z-index: 10;\n\n &:active {\n background: ", ";\n cursor: grabbing;\n }\n"])), function (props) {
203
- return props.$isSelected ? props.theme.ui_cpnt_sheet_base_06 : props.theme.ui_cpnt_sheet_base;
204
- }, function (props) { return "calc((".concat(props.$startCol - 1, ") * (100% / 7) + 4px)"); }, function (props) {
205
- var rowNumber = props.$startRow - 2; // 0-based row (첫번째주=0, 두번째주=1, ...)
206
- var dateMargin = 35; // 날짜 숫자 아래 여백
207
- var scheduleSpacing = (props.$scheduleIndex || 0) * 24; // 이벤트 간격
208
- // 각 주별 시작 위치
209
- var weekStartPositions = [
210
- 44,
211
- 170,
212
- 300,
213
- 428,
214
- 559 // 5째 주
215
- ];
216
- var baseTop = weekStartPositions[rowNumber] || weekStartPositions[0];
217
- return "calc(".concat(baseTop, "px + ").concat(dateMargin, "px + ").concat(scheduleSpacing, "px)");
218
- }, function (props) { return "calc((".concat(props.$endCol - props.$startCol + 1, ") * (100% / 7) - 21px)"); }, function (_a) {
219
- var theme = _a.theme;
220
- return theme.ui_cpnt_sheet_base_06;
221
- });
222
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -1,16 +0,0 @@
1
- import type { Schedule } from './types';
2
- import type React from 'react';
3
- interface ScheduleItemProps {
4
- schedule: Schedule;
5
- extraProps?: any;
6
- onDragStart: (schedule: Schedule, e: React.DragEvent) => void;
7
- onDragEnd: () => void;
8
- onClick?: (schedule: Schedule, e?: React.MouseEvent) => void;
9
- isSelected?: boolean;
10
- isAllDay?: boolean;
11
- }
12
- export declare const ScheduleItem: React.FC<ScheduleItemProps>;
13
- export declare const S_Dot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
14
- $isSelected?: boolean | undefined;
15
- }, never>;
16
- export {};
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.S_Dot = exports.ScheduleItem = void 0;
22
- var jsx_runtime_1 = require("react/jsx-runtime");
23
- var styled_components_1 = __importDefault(require("styled-components"));
24
- var TextLabel_1 = require("../TextLabel");
25
- var ScheduleItem = function (_a) {
26
- var schedule = _a.schedule, _b = _a.extraProps, extraProps = _b === void 0 ? {} : _b, onDragStart = _a.onDragStart, onDragEnd = _a.onDragEnd, onClick = _a.onClick, _c = _a.isSelected, isSelected = _c === void 0 ? false : _c, _d = _a.isAllDay, isAllDay = _d === void 0 ? false : _d;
27
- return ((0, jsx_runtime_1.jsxs)(S_ScheduleItem, __assign({ "$color": schedule.color, "$position": "single", "$isSelected": isSelected, "$isAllday": isAllDay, draggable: true, onDragStart: function (e) { return onDragStart(schedule, e); }, onDragEnd: onDragEnd, onClick: function (e) {
28
- e.stopPropagation();
29
- onClick === null || onClick === void 0 ? void 0 : onClick(schedule, e);
30
- } }, extraProps, { children: [(0, jsx_runtime_1.jsx)(exports.S_Dot, { "$isSelected": isSelected }), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Regular", text: schedule.title, colorTheme: isSelected ? 'sysTextWhite' : undefined, ellipsisMode: "use" })] }), schedule.id));
31
- };
32
- exports.ScheduleItem = ScheduleItem;
33
- var S_ScheduleItem = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background: ", ";\n border: ", ";\n border-radius: 4px;\n cursor: grab;\n display: flex;\n padding: 2px 6px;\n position: relative;\n transition: opacity 0.2s ease, transform 0.2s ease;\n\n &:active {\n background: ", ";\n cursor: grabbing;\n }\n"], ["\n align-items: center;\n background: ", ";\n border: ", ";\n border-radius: 4px;\n cursor: grab;\n display: flex;\n padding: 2px 6px;\n position: relative;\n transition: opacity 0.2s ease, transform 0.2s ease;\n\n &:active {\n background: ", ";\n cursor: grabbing;\n }\n"])), function (props) {
34
- if (props.$isSelected)
35
- return props.theme.ui_cpnt_sheet_base_06;
36
- if (props.$isAllday)
37
- return props.theme.ui_cpnt_sheet_base;
38
- return 'transparent';
39
- }, function (props) {
40
- return props.$isSelected ? "2px solid ".concat(props.theme.ui_cpnt_sheet_base_06) : 'none';
41
- }, function (_a) {
42
- var theme = _a.theme;
43
- return theme.ui_cpnt_sheet_base_06;
44
- });
45
- exports.S_Dot = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: ", ";\n border-radius: 50%;\n height: 4px;\n margin-right: 4px;\n width: 4px;\n"], ["\n background: ", ";\n border-radius: 50%;\n height: 4px;\n margin-right: 4px;\n width: 4px;\n"])), function (_a) {
46
- var $isSelected = _a.$isSelected, theme = _a.theme;
47
- return $isSelected ? theme.ui_cpnt_icon_sys_white : theme.ui_cpnt_icon_sys_grey_02;
48
- });
49
- var templateObject_1, templateObject_2;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import type { Schedule, displayAllDayScheduleMode } from './types';
3
- interface WeeklyViewProps {
4
- selectedDate: Date;
5
- startOfWeek: 'sunday' | 'monday';
6
- getDayTextByDate: (date: Date) => string;
7
- defaultViewType: string;
8
- displayAllDayScheduleMode?: displayAllDayScheduleMode;
9
- getSchedulesForDate: (date: Date) => Schedule[];
10
- isToday: (date: Date) => boolean;
11
- isDragOverDate: Date | null;
12
- handleDateDragOver: (date: Date, e: React.DragEvent) => void;
13
- handleDateDragLeave: () => void;
14
- handleDateDrop: (date: Date, e: React.DragEvent) => void;
15
- handleDateClick: (date: Date) => void;
16
- renderScheduleItem: (schedule: Schedule, extraProps?: any) => React.ReactNode;
17
- handleScheduleDragStart: (schedule: Schedule, e: React.DragEvent) => void;
18
- handleScheduleDragEnd: () => void;
19
- }
20
- export declare const WeeklyView: React.FC<WeeklyViewProps>;
21
- export {};
@@ -1,100 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.WeeklyView = void 0;
22
- var jsx_runtime_1 = require("react/jsx-runtime");
23
- var react_1 = require("react");
24
- var react_i18next_1 = require("react-i18next");
25
- var dateHelper_1 = require("../../../common/utils/dateHelper");
26
- var styled_components_1 = __importDefault(require("styled-components"));
27
- var TextLabel_1 = require("../TextLabel");
28
- var AllDaySchedulesSection_1 = require("./AllDaySchedulesSection");
29
- var calendarUtils_1 = require("./calendarUtils");
30
- var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
31
- var timeFormatUtils_1 = require("./timeFormatUtils");
32
- var WeeklyView = function (_a) {
33
- var selectedDate = _a.selectedDate, startOfWeek = _a.startOfWeek, getDayTextByDate = _a.getDayTextByDate, defaultViewType = _a.defaultViewType, _b = _a.displayAllDayScheduleMode, displayAllDayScheduleMode = _b === void 0 ? 'use' : _b, getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isDragOverDate = _a.isDragOverDate, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleDateClick = _a.handleDateClick, renderScheduleItem = _a.renderScheduleItem, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd;
34
- var _c = (0, react_i18next_1.useTranslation)(), t = _c.t, i18n = _c.i18n;
35
- // Generate calendar dates for weekly view
36
- var calendarDates = (0, react_1.useMemo)(function () {
37
- var dates = [];
38
- var startIndex = startOfWeek === 'monday' ? 1 : 0;
39
- var offset = (selectedDate.getDay() - startIndex + 7) % 7;
40
- var weekStart = dateHelper_1.DateHelper.addDays(selectedDate, -offset);
41
- for (var i = 0; i < 7; i += 1) {
42
- dates.push(dateHelper_1.DateHelper.addDays(weekStart, i));
43
- }
44
- return dates;
45
- }, [selectedDate, startOfWeek]);
46
- 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) {
47
- var dayText = getDayTextByDate(date);
48
- var dateText = t('calendar_date_format', {
49
- day: date.getDate(),
50
- dayText: dayText
51
- });
52
- return ((0, jsx_runtime_1.jsx)(S_WeeklyDayHeader, __assign({ "$isToday": isToday(date) }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", colorTheme: isToday(date) ? 'sysTextBrandPrimary' : 'sysTextTertiary', text: dateText }) }), index));
53
- })] }), (0, jsx_runtime_1.jsx)(AllDaySchedulesSection_1.AllDaySchedulesSection, { calendarDates: calendarDates, displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, renderScheduleItem: renderScheduleItem, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop }), (0, jsx_runtime_1.jsxs)(S_TimeGrid, { children: [(0, jsx_runtime_1.jsx)(CurrentTimeIndicator_1.CurrentTimeIndicator, { show: defaultViewType === 'WEEKLY' }), Array.from({ length: 24 }, function (_unused, hour) { return ((0, jsx_runtime_1.jsxs)(S_TimeRow, { children: [(0, jsx_runtime_1.jsx)(S_TimeLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", colorTheme: "sysTextTertiary", text: (0, timeFormatUtils_1.formatTimeWithLocale)(hour, i18n.language, t) }) }), (0, jsx_runtime_1.jsx)(S_TimeSlots, { children: calendarDates.map(function (date, dayIndex) {
54
- var timeSlotDate = new Date(date);
55
- timeSlotDate.setHours(hour, 0, 0, 0);
56
- var timedSchedules = getSchedulesForDate(date).filter(function (e) {
57
- return !(0, calendarUtils_1.calculateIsAllDay)(new Date(e.start_date), new Date(e.end_date)) &&
58
- new Date(e.start_date).getHours() === hour;
59
- });
60
- return ((0, jsx_runtime_1.jsx)(S_TimeSlot, __assign({ "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) === timeSlotDate.getTime(), onClick: function () {
61
- var clickedDate = new Date(date);
62
- clickedDate.setHours(hour, 0, 0, 0);
63
- handleDateClick(clickedDate);
64
- }, onDoubleClick: function () {
65
- var clickedDate = new Date(date);
66
- clickedDate.setHours(hour, 0, 0, 0);
67
- }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); } }, { children: timedSchedules.map(function (schedule) {
68
- return renderScheduleItem(schedule, {
69
- onDragStart: function (e) { return handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e); },
70
- onDragEnd: function () { return handleScheduleDragEnd === null || handleScheduleDragEnd === void 0 ? void 0 : handleScheduleDragEnd(); }
71
- });
72
- }) }), dayIndex));
73
- }) })] }, hour)); })] })] }));
74
- };
75
- exports.WeeklyView = WeeklyView;
76
- var S_WeeklyContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n height: 100%;\n"])));
77
- var S_WeeklyHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n"], ["\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n"])));
78
- var S_TimeColumnHeader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
79
- var S_WeeklyDayHeader = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 12px 8px;\n text-align: center;\n"], ["\n padding: 12px 8px;\n text-align: center;\n"])));
80
- var S_TimeGrid = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex: 1;\n overflow-y: auto;\n position: relative;\n"], ["\n flex: 1;\n overflow-y: auto;\n position: relative;\n"])));
81
- var S_TimeRow = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n height: 60px;\n"], ["\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n height: 60px;\n"])));
82
- var S_TimeLabel = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n display: flex;\n justify-content: center;\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 padding: 8px;\n"])), function (_a) {
83
- var theme = _a.theme;
84
- return theme.ui_cpnt_divider;
85
- }, function (_a) {
86
- var theme = _a.theme;
87
- return theme.ui_cpnt_divider;
88
- });
89
- var S_TimeSlots = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
90
- var S_TimeSlot = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: pointer;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: pointer;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_cpnt_sheet_base : 'transparent'); }, function (_a) {
91
- var theme = _a.theme;
92
- return theme.ui_cpnt_divider;
93
- }, function (_a) {
94
- var theme = _a.theme;
95
- return theme.ui_cpnt_divider;
96
- }, function (_a) {
97
- var theme = _a.theme;
98
- return theme.ui_cpnt_sheet_base;
99
- });
100
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
@@ -1,11 +0,0 @@
1
- import type React from 'react';
2
- interface YearlyViewProps {
3
- selectedDate: Date;
4
- getMonthDates: (year: number, month: number) => Date[];
5
- getDayTextByDate: (date: Date) => string;
6
- startOfWeek: 'sunday' | 'monday';
7
- isToday: (date: Date) => boolean;
8
- handleDateClick: (date: Date) => void;
9
- }
10
- export declare const YearlyView: React.FC<YearlyViewProps>;
11
- export {};
@@ -1,71 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.YearlyView = void 0;
22
- var jsx_runtime_1 = require("react/jsx-runtime");
23
- var react_i18next_1 = require("react-i18next");
24
- var styled_components_1 = __importDefault(require("styled-components"));
25
- var TextLabel_1 = require("../TextLabel");
26
- var YearlyView = function (_a) {
27
- var selectedDate = _a.selectedDate, getMonthDates = _a.getMonthDates, getDayTextByDate = _a.getDayTextByDate, startOfWeek = _a.startOfWeek, isToday = _a.isToday, handleDateClick = _a.handleDateClick;
28
- var t = (0, react_i18next_1.useTranslation)().t;
29
- var currentYear = selectedDate.getFullYear();
30
- var orderedDayTexts = (function () {
31
- var weekDates = [];
32
- var today = new Date();
33
- var startIndex = startOfWeek === 'monday' ? 1 : 0;
34
- var firstDayOfWeek = new Date(today);
35
- firstDayOfWeek.setDate(today.getDate() - ((today.getDay() - startIndex + 7) % 7));
36
- for (var i = 0; i < 7; i += 1) {
37
- var date = new Date(firstDayOfWeek);
38
- date.setDate(firstDayOfWeek.getDate() + i);
39
- weekDates.push(getDayTextByDate(date));
40
- }
41
- return weekDates;
42
- })();
43
- var getDateColorTheme = function (isTodayDate) {
44
- if (isTodayDate) {
45
- return 'sysTextBrandPrimary';
46
- }
47
- return 'sysTextTertiary';
48
- };
49
- return ((0, jsx_runtime_1.jsx)(S_YearlyGrid, { children: Array.from({ length: 12 }, function (_unused, monthIndex) {
50
- var monthDates = getMonthDates(currentYear, monthIndex);
51
- return ((0, jsx_runtime_1.jsxs)(S_YearlyMonth, { children: [(0, jsx_runtime_1.jsx)(S_YearlyMonthHeader, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: t("calendar_month_".concat(monthIndex + 1)), styleTheme: "body1Bold", colorTheme: "sysTextBrandPrimary" }) }), (0, jsx_runtime_1.jsxs)(S_YearlyMiniCalendar, { children: [(0, jsx_runtime_1.jsx)(S_YearlyDayHeaders, { children: orderedDayTexts.map(function (day, index) { return ((0, jsx_runtime_1.jsx)(S_YearlyDayHeader, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: day, styleTheme: "caption2Regular", textAlign: "center", colorTheme: "sysTextTertiary" }) }, "".concat(day, "-").concat(index))); }) }), (0, jsx_runtime_1.jsx)(S_YearlyDatesGrid, { children: monthDates.map(function (date, dateIndex) {
52
- var isCurrentMonth = date.getMonth() === monthIndex;
53
- var isTodayDate = isToday(date);
54
- return ((0, jsx_runtime_1.jsx)(S_YearlyDateCell, __assign({ "$isToday": isTodayDate, "$isCurrentMonth": isCurrentMonth, onClick: function () { return handleDateClick(date); } }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: date.getDate().toString(), styleTheme: "caption2Regular", textAlign: "center", colorTheme: getDateColorTheme(isTodayDate) }) }), dateIndex));
55
- }) })] })] }, monthIndex));
56
- }) }));
57
- };
58
- exports.YearlyView = YearlyView;
59
- // Styled Components
60
- var S_YearlyGrid = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid;\n gap: 24px 32px;\n grid-template-columns: repeat(4, 1fr);\n margin: 0 auto;\n max-width: 1200px;\n padding: 24px;\n"], ["\n display: grid;\n gap: 24px 32px;\n grid-template-columns: repeat(4, 1fr);\n margin: 0 auto;\n max-width: 1200px;\n padding: 24px;\n"])));
61
- var S_YearlyMonth = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 240px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 240px;\n"])));
62
- var S_YearlyMonthHeader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-left: 4px;\n"], ["\n padding-left: 4px;\n"])));
63
- var S_YearlyMiniCalendar = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 4px;\n"])));
64
- var S_YearlyDayHeaders = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: grid;\n gap: 1px;\n grid-template-columns: repeat(7, 1fr);\n"], ["\n display: grid;\n gap: 1px;\n grid-template-columns: repeat(7, 1fr);\n"])));
65
- var S_YearlyDayHeader = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 20px;\n padding: 4px 2px;\n text-align: center;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 20px;\n padding: 4px 2px;\n text-align: center;\n"])));
66
- var S_YearlyDatesGrid = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: grid;\n gap: 1px;\n grid-template-columns: repeat(7, 1fr);\n"], ["\n display: grid;\n gap: 1px;\n grid-template-columns: repeat(7, 1fr);\n"])));
67
- var S_YearlyDateCell = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-height: 24px;\n opacity: ", ";\n\n &:hover {\n background: ", ";\n }\n"], ["\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: center;\n min-height: 24px;\n opacity: ", ";\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isCurrentMonth ? 1 : 0.3); }, function (_a) {
68
- var theme = _a.theme;
69
- return theme.ui_72;
70
- });
71
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -1,23 +0,0 @@
1
- import type { CalendarViewType } from './types';
2
- import type { TFunction } from 'i18next';
3
- /**
4
- * 일정이 종일 일정인지 확인하는 함수
5
- * @param startDate 시작 날짜
6
- * @param endDate 종료 날짜
7
- * @returns 종일 일정 여부
8
- */
9
- export declare const calculateIsAllDay: (startDate: Date, endDate: Date) => boolean;
10
- export declare const calculateDateRange: (viewType: CalendarViewType, baseDate: Date) => {
11
- startDate: Date;
12
- endDate: Date;
13
- };
14
- /**
15
- * 뷰 타입에 따른 헤더 텍스트를 반환하는 함수
16
- * @param viewType 캘린더 뷰 타입 (DAILY, WEEKLY, MONTHLY, YEARLY)
17
- * @param selectedDate 선택된 날짜
18
- * @param t 다국어 변환 함수 (i18next)
19
- * @param monthNames 월 이름 배열 (예: ['1월', '2월', ...])
20
- * @param getDayTextByDate 날짜에 따른 요일 텍스트 반환 함수
21
- * @returns 헤더에 표시할 텍스트
22
- */
23
- export declare const getHeaderText: (viewType: CalendarViewType, selectedDate: Date, t: TFunction, monthNames: string[], getDayTextByDate: (date: Date) => string) => string;
@@ -1,101 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHeaderText = exports.calculateDateRange = exports.calculateIsAllDay = void 0;
4
- var dateHelper_1 = require("../../../common/utils/dateHelper");
5
- /**
6
- * 일정이 종일 일정인지 확인하는 함수
7
- * @param startDate 시작 날짜
8
- * @param endDate 종료 날짜
9
- * @returns 종일 일정 여부
10
- */
11
- var calculateIsAllDay = function (startDate, endDate) {
12
- // 시작 시간이 00:00:00이고 종료 시간이 23:59:59인 경우를 체크
13
- var isStartAtMidnight = startDate.getHours() === 0 && startDate.getMinutes() === 0 && startDate.getSeconds() === 0;
14
- var isEndAtEndOfDay = endDate.getHours() === 23 && endDate.getMinutes() === 59 && endDate.getSeconds() === 59;
15
- // 시작 시간이 00:00:00이고 종료 시간이 23:59:59인 경우를 전체일로 간주
16
- return isStartAtMidnight && isEndAtEndOfDay;
17
- };
18
- exports.calculateIsAllDay = calculateIsAllDay;
19
- var calculateDateRange = function (viewType, baseDate) {
20
- switch (viewType) {
21
- case 'DAILY':
22
- return { startDate: baseDate, endDate: baseDate };
23
- case 'WEEKLY': {
24
- var start = new Date(baseDate);
25
- start.setDate(baseDate.getDate() - baseDate.getDay());
26
- var end = new Date(start);
27
- end.setDate(start.getDate() + 6);
28
- return { startDate: start, endDate: end };
29
- }
30
- case 'MONTHLY': {
31
- var startDate = new Date(baseDate.getFullYear(), baseDate.getMonth(), 1);
32
- // 실제 MonthlyView에서 보여지는 날짜 배열을 구함
33
- var days = dateHelper_1.DateHelper.getCalendarDatesForCalendar(startDate, 'sunday');
34
- return {
35
- startDate: days[0],
36
- endDate: days[days.length - 1]
37
- };
38
- }
39
- case 'YEARLY':
40
- return {
41
- startDate: new Date(baseDate.getFullYear(), 0, 1),
42
- endDate: new Date(baseDate.getFullYear(), 11, 31)
43
- };
44
- default:
45
- return { startDate: baseDate, endDate: baseDate };
46
- }
47
- };
48
- exports.calculateDateRange = calculateDateRange;
49
- var getWeekRange = function (date) {
50
- var start = new Date(date);
51
- start.setDate(date.getDate() - date.getDay());
52
- var end = new Date(start);
53
- end.setDate(start.getDate() + 6);
54
- return [start, end];
55
- };
56
- /**
57
- * 뷰 타입에 따른 헤더 텍스트를 반환하는 함수
58
- * @param viewType 캘린더 뷰 타입 (DAILY, WEEKLY, MONTHLY, YEARLY)
59
- * @param selectedDate 선택된 날짜
60
- * @param t 다국어 변환 함수 (i18next)
61
- * @param monthNames 월 이름 배열 (예: ['1월', '2월', ...])
62
- * @param getDayTextByDate 날짜에 따른 요일 텍스트 반환 함수
63
- * @returns 헤더에 표시할 텍스트
64
- */
65
- var getHeaderText = function (viewType, selectedDate, t, monthNames, getDayTextByDate) {
66
- var year = selectedDate.getFullYear();
67
- var month = monthNames[selectedDate.getMonth()];
68
- var day = selectedDate.getDate();
69
- var dayText = getDayTextByDate(selectedDate);
70
- if (viewType === 'DAILY') {
71
- return t('calendar_header_daily', { year: year, month: month, day: day, dayText: dayText });
72
- }
73
- if (viewType === 'WEEKLY') {
74
- var _a = getWeekRange(selectedDate), weekStart = _a[0], weekEnd = _a[1];
75
- var startDay = weekStart.getDate();
76
- var endDay = weekEnd.getDate();
77
- var startMonth = monthNames[weekStart.getMonth()];
78
- var endMonth = monthNames[weekEnd.getMonth()];
79
- if (weekStart.getMonth() === weekEnd.getMonth()) {
80
- return t('calendar_header_weekly_same_month', {
81
- month: startMonth,
82
- startDay: startDay,
83
- endDay: endDay
84
- });
85
- }
86
- return t('calendar_header_weekly_diff_month', {
87
- startMonth: startMonth,
88
- startDay: startDay,
89
- endMonth: endMonth,
90
- endDay: endDay
91
- });
92
- }
93
- if (viewType === 'MONTHLY') {
94
- return t('calendar_header_monthly', { year: year, month: month });
95
- }
96
- if (viewType === 'YEARLY') {
97
- return year.toString();
98
- }
99
- return '';
100
- };
101
- exports.getHeaderText = getHeaderText;