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

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 +29 -1
  3. package/dist/src/common/services/i18n/resources/es.json +28 -1
  4. package/dist/src/common/services/i18n/resources/fil.json +28 -1
  5. package/dist/src/common/services/i18n/resources/index.d.ts +194 -0
  6. package/dist/src/common/services/i18n/resources/ja.json +29 -1
  7. package/dist/src/common/services/i18n/resources/ko.json +29 -1
  8. package/dist/src/common/services/i18n/resources/zh-cn.json +29 -1
  9. package/dist/src/common/services/i18n/resources/zh-tw.json +29 -1
  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 +3 -0
  14. package/dist/src/common/utils/dateHelper.js +37 -0
  15. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  16. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.d.ts +13 -0
  17. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.js +48 -0
  18. package/dist/src/desktop/components/Calendar/Calendar.d.ts +4 -0
  19. package/dist/src/desktop/components/Calendar/Calendar.js +379 -0
  20. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.d.ts +7 -0
  21. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.js +48 -0
  22. package/dist/src/desktop/components/Calendar/DailyView.d.ts +17 -0
  23. package/dist/src/desktop/components/Calendar/DailyView.js +82 -0
  24. package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +26 -0
  25. package/dist/src/desktop/components/Calendar/MonthlyView.js +222 -0
  26. package/dist/src/desktop/components/Calendar/ScheduleItem.d.ts +16 -0
  27. package/dist/src/desktop/components/Calendar/ScheduleItem.js +49 -0
  28. package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +21 -0
  29. package/dist/src/desktop/components/Calendar/WeeklyView.js +100 -0
  30. package/dist/src/desktop/components/Calendar/YearlyView.d.ts +11 -0
  31. package/dist/src/desktop/components/Calendar/YearlyView.js +71 -0
  32. package/dist/src/desktop/components/Calendar/calendarUtils.d.ts +24 -0
  33. package/dist/src/desktop/components/Calendar/calendarUtils.js +108 -0
  34. package/dist/src/desktop/components/Calendar/constants.d.ts +1 -0
  35. package/dist/src/desktop/components/Calendar/constants.js +31 -0
  36. package/dist/src/desktop/components/Calendar/index.d.ts +10 -0
  37. package/dist/src/desktop/components/Calendar/index.js +37 -0
  38. package/dist/src/desktop/components/Calendar/timeFormatUtils.d.ts +16 -0
  39. package/dist/src/desktop/components/Calendar/timeFormatUtils.js +45 -0
  40. package/dist/src/desktop/components/Calendar/types.d.ts +60 -0
  41. package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +1 -4
  42. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +3 -5
  43. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +53 -53
  44. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +6 -0
  45. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +27 -0
  46. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  47. package/dist/src/sub/DynamicLayout/DynamicLayout.js +2 -3
  48. package/dist/src/sub/DynamicLayout/components/Section/sectionContext.d.ts +2 -2
  49. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +0 -40
  50. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +177 -36
  51. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +4 -152
  52. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +2 -150
  53. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +1 -45
  54. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +9 -262
  55. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +0 -593
  56. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +0 -253
  57. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +1 -3
  58. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +3 -5
  59. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +1 -2
  60. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.js +2 -9
  61. package/dist/src/sub/DynamicLayout/mocks.d.ts +960 -8
  62. package/dist/src/sub/DynamicLayout/mocks.js +6 -4286
  63. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +4 -4
  64. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +1 -1
  65. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +4 -4
  66. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +3 -13
  67. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +2 -18
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +4 -4
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +3 -121
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +3 -39
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +7 -31
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +1 -45
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/group.d.ts +1 -1
  74. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -1
  75. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +10 -27
  76. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +1 -3
  77. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +4 -4
  78. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +2 -2
  79. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
  80. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +1 -1
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -52
  84. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.d.ts +1 -1
  85. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +0 -1
  86. package/dist/src/sub/DynamicLayout/types.d.ts +16 -49
  87. package/package.json +2 -3
  88. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +0 -21
  89. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +0 -1133
  90. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.d.ts +0 -11
  91. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.js +0 -45
  92. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +0 -10
  93. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +0 -79
  94. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.d.ts +0 -12
  95. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.js +0 -76
  96. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.d.ts +0 -4
  97. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.js +0 -47
  98. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.d.ts +0 -12
  99. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.js +0 -76
  100. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.d.ts +0 -12
  101. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.js +0 -76
  102. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.d.ts +0 -12
  103. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.js +0 -76
  104. package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +0 -139
  105. package/dist/src/sub/DynamicLayout/compositionActionTypes.js +0 -2
  106. package/dist/src/sub/DynamicLayout/compositionQueryContext.d.ts +0 -8
  107. package/dist/src/sub/DynamicLayout/compositionQueryContext.js +0 -14
  108. package/dist/src/sub/DynamicLayout/mock_composition.d.ts +0 -3
  109. package/dist/src/sub/DynamicLayout/mock_composition.js +0 -1606
  110. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +0 -1
  111. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +0 -1111
  112. package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +0 -1
  113. package/dist/src/sub/DynamicLayout/mock_contentsList.js +0 -1091
  114. package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +0 -96
  115. package/dist/src/sub/DynamicLayout/mock_queryData.js +0 -2639
  116. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +0 -842
  117. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +0 -854
  118. package/dist/src/sub/DynamicLayout/mock_video.d.ts +0 -368
  119. package/dist/src/sub/DynamicLayout/mock_video.js +0 -371
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +0 -12
  121. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +0 -61
  122. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +0 -15
  123. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +0 -69
  124. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +0 -15
  125. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +0 -69
  126. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +0 -9
  127. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +0 -87
  128. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +0 -4
  129. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +0 -849
  130. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +0 -43
  131. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +0 -162
  132. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +0 -39
  133. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +0 -182
  134. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +0 -25
  135. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +0 -234
  136. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +0 -14
  137. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +0 -46
  138. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +0 -1
  139. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +0 -8
  140. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +0 -139
  141. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +0 -8
  142. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +0 -190
  143. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.d.ts +0 -17
  144. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.js +0 -39
  145. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +0 -10
  146. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +0 -85
  147. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +0 -25
  148. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +0 -183
  149. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +0 -29
  150. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +0 -128
  151. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +0 -23
  152. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +0 -230
  153. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.d.ts +0 -1
  154. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.js +0 -8
  155. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +0 -67
  156. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.js +0 -2
  157. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +0 -8
  158. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +0 -138
  159. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +0 -12
  160. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +0 -39
  161. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +0 -15
  162. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +0 -69
  163. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +0 -15
  164. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +0 -69
  165. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +0 -20
  166. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +0 -173
  167. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +0 -9
  168. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +0 -87
  169. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +0 -4
  170. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +0 -849
  171. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +0 -43
  172. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +0 -162
  173. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +0 -26
  174. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +0 -235
  175. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +0 -16
  176. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +0 -63
  177. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +0 -1
  178. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.js +0 -8
  179. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +0 -46
  180. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +0 -186
  181. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +0 -163
  182. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +0 -2
  183. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.d.ts +0 -14
  184. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.js +0 -26
  185. /package/dist/src/{sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel → desktop/components/Calendar}/types.js +0 -0
@@ -0,0 +1,48 @@
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.AllDaySchedulesSection = 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 calendarUtils_1 = require("./calendarUtils");
27
+ var AllDaySchedulesSection = function (_a) {
28
+ var calendarDates = _a.calendarDates, _b = _a.displayAllDayScheduleMode, displayAllDayScheduleMode = _b === void 0 ? 'use' : _b, getSchedulesForDate = _a.getSchedulesForDate, renderScheduleItem = _a.renderScheduleItem, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop;
29
+ var t = (0, react_i18next_1.useTranslation)().t;
30
+ if (displayAllDayScheduleMode === 'none') {
31
+ return null;
32
+ }
33
+ return ((0, jsx_runtime_1.jsxs)(S_WeeklyAllDaySection, { children: [(0, jsx_runtime_1.jsx)(S_AllDayLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption1Regular", colorTheme: "sysTextTertiary", text: t('calendar_all_day') }) }), (0, jsx_runtime_1.jsx)(S_WeeklyAllDayGrid, { children: calendarDates.map(function (date, index) {
34
+ var allDaySchedules = getSchedulesForDate(date).filter(function (e) {
35
+ return (0, calendarUtils_1.calculateIsAllDay)(new Date(e.startDate), new Date(e.endDate));
36
+ });
37
+ return ((0, jsx_runtime_1.jsx)(S_WeeklyAllDayCell, __assign({ onDragOver: function (e) { return handleDateDragOver(date, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(date, e); } }, { children: allDaySchedules.map(function (schedule) { return renderScheduleItem(schedule); }) }), index));
38
+ }) })] }));
39
+ };
40
+ exports.AllDaySchedulesSection = AllDaySchedulesSection;
41
+ var S_WeeklyAllDaySection = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom: 1px solid ", ";\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n min-height: 60px;\n"], ["\n border-bottom: 1px solid ", ";\n display: grid;\n grid-template-columns: 80px repeat(7, 1fr);\n min-height: 60px;\n"])), function (_a) {
42
+ var theme = _a.theme;
43
+ return theme.ui_cpnt_divider;
44
+ });
45
+ var S_AllDayLabel = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding: 8px;\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n padding: 8px;\n"])));
46
+ var S_WeeklyAllDayGrid = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
47
+ var S_WeeklyAllDayCell = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n gap: 2px;\n padding: 4px;\n"], ["\n align-items: center;\n display: flex;\n gap: 2px;\n padding: 4px;\n"])));
48
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { CalendarProps } from './types';
3
+ declare const Calendar: React.FC<CalendarProps>;
4
+ export default Calendar;
@@ -0,0 +1,379 @@
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
19
+ if (ar || !(i in from)) {
20
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
21
+ ar[i] = from[i];
22
+ }
23
+ }
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
+ };
26
+ var __importDefault = (this && this.__importDefault) || function (mod) {
27
+ return (mod && mod.__esModule) ? mod : { "default": mod };
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ var jsx_runtime_1 = require("react/jsx-runtime");
31
+ var react_1 = require("react");
32
+ var react_i18next_1 = require("react-i18next");
33
+ var dateHelper_1 = require("../../../common/utils/dateHelper");
34
+ var styled_components_1 = __importDefault(require("styled-components"));
35
+ var Dropdown_1 = require("../Dropdown");
36
+ var IconButton_1 = require("../IconButton");
37
+ var TextButton_1 = require("../TextButton");
38
+ var TextLabel_1 = require("../TextLabel");
39
+ var calendarUtils_1 = require("./calendarUtils");
40
+ var DailyView_1 = require("./DailyView");
41
+ var MonthlyView_1 = require("./MonthlyView");
42
+ var ScheduleItem_1 = require("./ScheduleItem");
43
+ var WeeklyView_1 = require("./WeeklyView");
44
+ var YearlyView_1 = require("./YearlyView");
45
+ var Calendar = function (_a) {
46
+ var _b = _a.defaultViewType, defaultViewType = _b === void 0 ? 'MONTHLY' : _b, _c = _a.viewTypes, viewTypes = _c === void 0 ? ['MONTHLY', 'WEEKLY', 'DAILY', 'YEARLY'] : _c, _d = _a.displayAllDayScheduleMode, displayAllDayScheduleMode = _d === void 0 ? 'use' : _d, _e = _a.startOfWeek, startOfWeek = _e === void 0 ? 'sunday' : _e, _f = _a.todayBtnMode, todayBtnMode = _f === void 0 ? 'use' : _f, _g = _a.schedules, schedules = _g === void 0 ? [] : _g, config = _a.config, onActionDispatch = _a.onActionDispatch;
47
+ var t = (0, react_i18next_1.useTranslation)().t;
48
+ var _h = (0, react_1.useState)(defaultViewType), currentViewType = _h[0], setCurrentViewType = _h[1];
49
+ var _j = (0, react_1.useState)(new Date()), selectedDate = _j[0], setSelectedDate = _j[1];
50
+ var _k = (0, react_1.useState)(null), dragStartDate = _k[0], setDragStartDate = _k[1];
51
+ var _l = (0, react_1.useState)(null), dragEndDate = _l[0], setDragEndDate = _l[1];
52
+ var _m = (0, react_1.useState)(false), isDragging = _m[0], setIsDragging = _m[1];
53
+ var _o = (0, react_1.useState)(null), draggedSchedule = _o[0], setDraggedSchedule = _o[1];
54
+ var _p = (0, react_1.useState)(null), isDragOverDate = _p[0], setIsDragOverDate = _p[1];
55
+ var _q = (0, react_1.useState)([]), selectedSchedules = _q[0], setSelectedSchedules = _q[1];
56
+ var _r = (0, react_1.useState)([]), selectedDates = _r[0], setSelectedDates = _r[1];
57
+ var _s = (0, react_1.useState)(null), lastSelectedDate = _s[0], setLastSelectedDate = _s[1];
58
+ // 오늘 날짜인지 확인
59
+ var today = new Date();
60
+ var isToday = function (date) { return dateHelper_1.DateHelper.isSameDay(date, today); };
61
+ // 과거 날짜인지 확인
62
+ var isPastDate = (0, react_1.useCallback)(function (date) { return dateHelper_1.DateHelper.isBefore(date, today) && !dateHelper_1.DateHelper.isSameDay(date, today); }, [today]);
63
+ // 뷰 타입에 따른 시작일과 종료일 계산
64
+ var _t = (0, calendarUtils_1.calculateDateRange)(currentViewType, selectedDate), startDate = _t.startDate, endDate = _t.endDate;
65
+ // 뷰 타입 변경 처리
66
+ var handleViewTypeChange = (0, react_1.useCallback)(function (option) {
67
+ var newViewType = option.value;
68
+ setCurrentViewType(newViewType);
69
+ onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
70
+ type: 'CALENDAR_TYPE_CHANGE',
71
+ payload: {
72
+ type: newViewType,
73
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
74
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
75
+ }
76
+ });
77
+ }, [selectedDate, onActionDispatch, calendarUtils_1.calculateDateRange]);
78
+ // "오늘" 버튼 클릭 이벤트
79
+ var handleTodayClick = (0, react_1.useCallback)(function () {
80
+ setSelectedDate(today);
81
+ onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
82
+ type: 'TODAY_BUTTON_CLICK',
83
+ payload: {
84
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
85
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
86
+ }
87
+ });
88
+ }, [today, currentViewType, onActionDispatch]);
89
+ // 이전/다음 이동 함수
90
+ var navigateDate = (0, react_1.useCallback)(function (direction) {
91
+ var newDate;
92
+ var increment = direction === 'next' ? 1 : -1;
93
+ switch (currentViewType) {
94
+ case 'DAILY': {
95
+ newDate = dateHelper_1.DateHelper.addDays(selectedDate, increment);
96
+ break;
97
+ }
98
+ case 'WEEKLY': {
99
+ newDate = dateHelper_1.DateHelper.addDays(selectedDate, increment * 7);
100
+ break;
101
+ }
102
+ case 'MONTHLY': {
103
+ newDate = dateHelper_1.DateHelper.addMonths(selectedDate, increment);
104
+ break;
105
+ }
106
+ case 'YEARLY': {
107
+ newDate = new Date(selectedDate.getFullYear() + increment, selectedDate.getMonth(), selectedDate.getDate());
108
+ break;
109
+ }
110
+ default:
111
+ newDate = selectedDate;
112
+ }
113
+ setSelectedDate(newDate);
114
+ onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
115
+ type: direction === 'prev' ? 'PREV_BUTTON_CLICK' : 'NEXT_BUTTON_CLICK',
116
+ payload: {
117
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
118
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
119
+ }
120
+ });
121
+ }, [selectedDate, currentViewType, onActionDispatch]);
122
+ // 특정 날짜의 이벤트 가져오기
123
+ var getSchedulesForDate = (0, react_1.useCallback)(function (date) {
124
+ return schedules.filter(function (schedule) {
125
+ var scheduleStart = new Date(schedule.startDate);
126
+ var scheduleEnd = new Date(schedule.endDate);
127
+ var targetDate = new Date(date);
128
+ // 정확한 날짜 비교를 위해 시간을 일 시작으로 설정
129
+ scheduleStart.setHours(0, 0, 0, 0);
130
+ scheduleEnd.setHours(23, 59, 59, 999);
131
+ targetDate.setHours(0, 0, 0, 0);
132
+ // 대상 날짜가 이벤트 날짜 범위 내에 있는지 확인
133
+ return targetDate >= scheduleStart && targetDate <= scheduleEnd;
134
+ });
135
+ }, [schedules]);
136
+ // 날짜 클릭 이벤트 (일반 클릭, shift 클릭 둘다 포함)
137
+ var handleDateClick = (0, react_1.useCallback)(function (date, e) {
138
+ var _a, _b;
139
+ var isShiftClick = (config === null || config === void 0 ? void 0 : config.action) === 'CLICK_WITH_SHIFT_KEY_DOWN' && (config === null || config === void 0 ? void 0 : config.target) === 'DATE' && (e === null || e === void 0 ? void 0 : e.shiftKey);
140
+ var isNormalClick = (config === null || config === void 0 ? void 0 : config.action) === 'CLICK' && (config === null || config === void 0 ? void 0 : config.target) === 'DATE' && !(e === null || e === void 0 ? void 0 : e.shiftKey);
141
+ var getDateKey = function (d) { return "".concat(d.getFullYear(), "-").concat(d.getMonth(), "-").concat(d.getDate()); };
142
+ var clickedDateKey = getDateKey(date);
143
+ // shift 클릭 처리
144
+ if (isShiftClick) {
145
+ var newSelectedDates = selectedDates.some(function (d) { return getDateKey(d) === clickedDateKey; })
146
+ ? selectedDates.filter(function (d) { return getDateKey(d) !== clickedDateKey; })
147
+ : __spreadArray(__spreadArray([], selectedDates, true), [date], false);
148
+ setSelectedDates(newSelectedDates);
149
+ setLastSelectedDate(date);
150
+ if (config) {
151
+ (_a = config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
152
+ action: 'CLICK_WITH_SHIFT_KEY_DOWN',
153
+ target: 'DATE',
154
+ dates: newSelectedDates,
155
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
156
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
157
+ });
158
+ }
159
+ }
160
+ setSelectedDate(date);
161
+ // 일반 클릭 처리
162
+ if (isNormalClick) {
163
+ if (config) {
164
+ (_b = config.trigger) === null || _b === void 0 ? void 0 : _b.call(config, {
165
+ action: 'CLICK',
166
+ target: 'DATE',
167
+ date: date,
168
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
169
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
170
+ });
171
+ }
172
+ }
173
+ }, [isPastDate, config, lastSelectedDate, selectedDates]);
174
+ // 날짜 범위 선택을 위한 마우스 이벤트 처리
175
+ var handleMouseUp = (0, react_1.useCallback)(function () {
176
+ setIsDragging(false);
177
+ setDragStartDate(null);
178
+ setDragEndDate(null);
179
+ }, [isDragging, dragStartDate, dragEndDate]);
180
+ // 이벤트 드래그 핸들러
181
+ var handleScheduleDragStart = (0, react_1.useCallback)(function (schedule, e) {
182
+ setDraggedSchedule(schedule);
183
+ e.dataTransfer.effectAllowed = 'move';
184
+ e.dataTransfer.setData('text/plain', schedule.id.toString());
185
+ // 더 정확한 드롭 계산을 위한 오프셋 정보 저장
186
+ var scheduleStartDate = new Date(schedule.startDate);
187
+ scheduleStartDate.setHours(0, 0, 0, 0);
188
+ // 원본 이벤트 시작 시간을 dataTransfer에 저장
189
+ e.dataTransfer.setData('scheduleStartTime', scheduleStartDate.getTime().toString());
190
+ }, []);
191
+ // 이벤트 드래그 종료 이벤트
192
+ var handleScheduleDragEnd = (0, react_1.useCallback)(function () {
193
+ setDraggedSchedule(null);
194
+ setIsDragOverDate(null);
195
+ }, []);
196
+ // 날짜 드래그 오버 이벤트
197
+ var handleDateDragOver = (0, react_1.useCallback)(function (date, e) {
198
+ if (draggedSchedule) {
199
+ e.preventDefault();
200
+ e.dataTransfer.dropEffect = 'move';
201
+ setIsDragOverDate(date);
202
+ }
203
+ }, [draggedSchedule]);
204
+ // 날짜 드래그 떼기
205
+ var handleDateDragLeave = (0, react_1.useCallback)(function () {
206
+ setIsDragOverDate(null);
207
+ }, []);
208
+ // 삭제 키 이벤트 처리
209
+ var handleKeyDown = (0, react_1.useCallback)(function (e) {
210
+ var _a;
211
+ if (e.key === 'Delete' && selectedSchedules.length > 0 && (config === null || config === void 0 ? void 0 : config.target) === 'SCHEDULE') {
212
+ (_a = config === null || config === void 0 ? void 0 : config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
213
+ action: 'DELETE_KEY_DOWN',
214
+ target: 'SCHEDULE',
215
+ schedules: selectedSchedules,
216
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
217
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
218
+ });
219
+ setSelectedSchedules([]);
220
+ }
221
+ }, [config, selectedSchedules]);
222
+ // 날짜 드래그 놓기
223
+ var handleDateDrop = (0, react_1.useCallback)(function (date, e) {
224
+ var _a;
225
+ e.preventDefault();
226
+ if (!draggedSchedule)
227
+ return;
228
+ if (!((config === null || config === void 0 ? void 0 : config.action) === 'DRAG' && config.target === 'SCHEDULE'))
229
+ return;
230
+ var originalStartDate = new Date(draggedSchedule.startDate);
231
+ var originalEndDate = new Date(draggedSchedule.endDate);
232
+ var duration = originalEndDate.getTime() - originalStartDate.getTime();
233
+ var getAdjustedStartDate = function () {
234
+ var baseDate = new Date(date);
235
+ if (currentViewType === 'MONTHLY') {
236
+ var target = e.target;
237
+ var gridContainer = target.closest('[data-calendar-grid]');
238
+ if (gridContainer) {
239
+ var gridRect = gridContainer.getBoundingClientRect();
240
+ var cellWidth = gridRect.width / 7;
241
+ var clickedColumn = Math.floor((e.clientX - gridRect.left) / cellWidth);
242
+ var dropDayOfWeek = baseDate.getDay();
243
+ var columnOffset = clickedColumn - dropDayOfWeek;
244
+ var actualDropDate = new Date(baseDate);
245
+ actualDropDate.setDate(baseDate.getDate() + columnOffset);
246
+ actualDropDate.setHours(originalStartDate.getHours(), originalStartDate.getMinutes(), 0, 0);
247
+ return actualDropDate;
248
+ }
249
+ }
250
+ // 공통 처리 (WEEKLY, DAILY, fallback)
251
+ baseDate.setHours(originalStartDate.getHours(), originalStartDate.getMinutes(), 0, 0);
252
+ return baseDate;
253
+ };
254
+ var newStartDate = getAdjustedStartDate();
255
+ var newEndDate = new Date(newStartDate.getTime() + duration);
256
+ var updatedSchedule = __assign(__assign({}, draggedSchedule), { startDate: newStartDate, endDate: newEndDate });
257
+ if (config) {
258
+ (_a = config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
259
+ action: 'DRAG',
260
+ target: 'SCHEDULE',
261
+ schedule: updatedSchedule,
262
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
263
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
264
+ });
265
+ }
266
+ setIsDragOverDate(null);
267
+ }, [draggedSchedule, config, currentViewType]);
268
+ var defaultDayTexts = (0, react_1.useMemo)(function () { return [
269
+ t('str_3893'),
270
+ t('str_3887'),
271
+ t('str_3888'),
272
+ t('str_3889'),
273
+ t('str_3890'),
274
+ t('str_3891'),
275
+ t('str_3892') // 토 - 6
276
+ ]; }, [t]);
277
+ // 날짜의 실제 요일에 따른 요일 텍스트 가져오기
278
+ var getDayTextByDate = function (date) {
279
+ return defaultDayTexts[date.getDay()];
280
+ };
281
+ var monthNames = (0, react_1.useMemo)(function () { return [
282
+ t('calendar_month_1'),
283
+ t('calendar_month_2'),
284
+ t('calendar_month_3'),
285
+ t('calendar_month_4'),
286
+ t('calendar_month_5'),
287
+ t('calendar_month_6'),
288
+ t('calendar_month_7'),
289
+ t('calendar_month_8'),
290
+ t('calendar_month_9'),
291
+ t('calendar_month_10'),
292
+ t('calendar_month_11'),
293
+ t('calendar_month_12')
294
+ ]; }, [t]);
295
+ // 뷰 타입을 위한 드롭다운 옵션 생성
296
+ var viewTypeOptions = (0, react_1.useMemo)(function () {
297
+ var viewTypeTextMap = {
298
+ MONTHLY: t('calendar_view_monthly'),
299
+ WEEKLY: t('calendar_view_weekly'),
300
+ DAILY: t('calendar_view_daily'),
301
+ YEARLY: t('calendar_view_yearly')
302
+ };
303
+ return viewTypes.map(function (viewType) { return ({
304
+ text: viewTypeTextMap[viewType] || viewType,
305
+ value: viewType
306
+ }); });
307
+ }, [viewTypes, t]);
308
+ // 특정 월의 캘린더 날짜 생성 (연간 보기용)
309
+ var getMonthDates = (0, react_1.useCallback)(function (year, month) {
310
+ var monthDate = new Date(year, month, 1);
311
+ return dateHelper_1.DateHelper.getCalendarDates(monthDate, startOfWeek);
312
+ }, [startOfWeek]);
313
+ // 스케줄 클릭 (일반 클릭, shift 클릭 둘다 포함)
314
+ var handleScheduleClick = function (schedule, e) {
315
+ var _a, _b;
316
+ var isShiftClick = (config === null || config === void 0 ? void 0 : config.action) === 'CLICK_WITH_SHIFT_KEY_DOWN' &&
317
+ (config === null || config === void 0 ? void 0 : config.target) === 'SCHEDULE' &&
318
+ (e === null || e === void 0 ? void 0 : e.shiftKey);
319
+ var isNormalClick = (config === null || config === void 0 ? void 0 : config.action) === 'CLICK' && (config === null || config === void 0 ? void 0 : config.target) === 'SCHEDULE' && !(e === null || e === void 0 ? void 0 : e.shiftKey);
320
+ var isSelected = selectedSchedules.some(function (s) { return s.id === (schedule === null || schedule === void 0 ? void 0 : schedule.id); });
321
+ if (isShiftClick) {
322
+ var newSelectedSchedules = isSelected
323
+ ? selectedSchedules.filter(function (s) { return s.id !== (schedule === null || schedule === void 0 ? void 0 : schedule.id); })
324
+ : __spreadArray(__spreadArray([], selectedSchedules, true), [schedule], false).filter(function (s) { return s !== undefined; });
325
+ setSelectedSchedules(newSelectedSchedules);
326
+ (_a = config === null || config === void 0 ? void 0 : config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
327
+ action: 'CLICK_WITH_SHIFT_KEY_DOWN',
328
+ target: 'SCHEDULE',
329
+ schedules: newSelectedSchedules,
330
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
331
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
332
+ });
333
+ return;
334
+ }
335
+ if (isNormalClick) {
336
+ // 일반 클릭 시 해당 스케줄만 선택
337
+ setSelectedSchedules([schedule]);
338
+ (_b = config === null || config === void 0 ? void 0 : config.trigger) === null || _b === void 0 ? void 0 : _b.call(config, {
339
+ action: 'CLICK',
340
+ target: 'SCHEDULE',
341
+ schedule: schedule,
342
+ startDate: (0, calendarUtils_1.toUTC)(startDate),
343
+ endDate: (0, calendarUtils_1.toUTC)(endDate)
344
+ });
345
+ return;
346
+ }
347
+ };
348
+ // 다중 일자 지원을 포함한 이벤트 아이템 렌더링
349
+ var renderScheduleItem = function (schedule, extraProps) {
350
+ if (extraProps === void 0) { extraProps = {}; }
351
+ // isAllDay 계산
352
+ var isAllDay = (0, calendarUtils_1.calculateIsAllDay)(new Date(schedule.startDate), new Date(schedule.endDate));
353
+ var isSelected = selectedSchedules.some(function (s) { return s.id === schedule.id; });
354
+ return ((0, jsx_runtime_1.jsx)(ScheduleItem_1.ScheduleItem, { schedule: schedule, extraProps: extraProps, onDragStart: handleScheduleDragStart, onDragEnd: handleScheduleDragEnd, onClick: handleScheduleClick, isSelected: isSelected, isAllDay: isAllDay }));
355
+ };
356
+ // 뷰 타입에 따른 캘린더 콘텐츠 렌더링
357
+ var renderCalendarContent = function () {
358
+ switch (currentViewType) {
359
+ case 'MONTHLY':
360
+ return ((0, jsx_runtime_1.jsx)(MonthlyView_1.MonthlyView, { getDayTextByDate: getDayTextByDate, startOfWeek: startOfWeek, selectedDate: selectedDate, selectedDates: selectedDates, dragStartDate: dragStartDate, selectedSchedules: selectedSchedules, dragEndDate: dragEndDate, isDragOverDate: isDragOverDate, getSchedulesForDate: getSchedulesForDate, isToday: isToday, isPastDate: isPastDate, handleDateClick: handleDateClick, handleScheduleClick: handleScheduleClick, handleMouseUp: handleMouseUp, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop, renderScheduleItem: renderScheduleItem, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd }));
361
+ case 'WEEKLY':
362
+ return ((0, jsx_runtime_1.jsx)(WeeklyView_1.WeeklyView, { selectedDate: selectedDate, startOfWeek: startOfWeek, getDayTextByDate: getDayTextByDate, defaultViewType: currentViewType, displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, isToday: isToday, isDragOverDate: isDragOverDate, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop, handleDateClick: handleDateClick, renderScheduleItem: renderScheduleItem, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd }));
363
+ case 'DAILY':
364
+ return ((0, jsx_runtime_1.jsx)(DailyView_1.DailyView, { selectedDate: selectedDate, displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, renderScheduleItem: renderScheduleItem, handleDateClick: handleDateClick, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop, isDragOverDate: isDragOverDate, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd }));
365
+ case 'YEARLY':
366
+ return ((0, jsx_runtime_1.jsx)(YearlyView_1.YearlyView, { selectedDate: selectedDate, getMonthDates: getMonthDates, getDayTextByDate: getDayTextByDate, startOfWeek: startOfWeek, isToday: isToday, handleDateClick: handleDateClick }));
367
+ default:
368
+ return null;
369
+ }
370
+ };
371
+ return ((0, jsx_runtime_1.jsxs)(S_CalendarContainer, __assign({ "x-pds-name": "Calendar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", onKeyDown: handleKeyDown, tabIndex: 0 }, { children: [(0, jsx_runtime_1.jsxs)(S_CalendarHeader, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "headingBold", textAlign: "center", text: (0, calendarUtils_1.getHeaderText)(currentViewType, selectedDate, t, monthNames, getDayTextByDate) }), (0, jsx_runtime_1.jsxs)(S_LeftContainer, { children: [(0, jsx_runtime_1.jsx)(S_NavigationButton, __assign({ onClick: function () { return navigateDate('prev'); } }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_arrow_left", baseSize: "small", iconSize: 16, baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: "ui_cpnt_icon_sys_grey_01" }) })), todayBtnMode === 'use' && ((0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { text: t('calendar_today'), size: "small", colorTheme: "grey_01", onClick: handleTodayClick })), (0, jsx_runtime_1.jsx)(S_NavigationButton, __assign({ onClick: function () { return navigateDate('next'); } }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { iconName: "ic_arrow_right", baseSize: "small", iconSize: 16, baseColorKey: "ui_cpnt_button_fill_base_transparent", iconColorKey: "ui_cpnt_icon_sys_grey_01" }) })), (0, jsx_runtime_1.jsx)(Dropdown_1.Dropdown, { size: "small", valueArray: viewTypeOptions, value: viewTypeOptions.find(function (option) { return option.value === currentViewType; }), onChange: handleViewTypeChange, customWidth: "120px" })] })] }), (0, jsx_runtime_1.jsx)(S_CalendarContent, { children: renderCalendarContent() })] })));
372
+ };
373
+ var S_CalendarContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 400px;\n overflow: hidden;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 400px;\n overflow: hidden;\n width: 100%;\n"])));
374
+ var S_CalendarHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n gap: 16px;\n padding: 16px 20px;\n"], ["\n align-items: center;\n display: flex;\n gap: 16px;\n padding: 16px 20px;\n"])));
375
+ var S_NavigationButton = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n height: 32px;\n justify-content: center;\n width: 32px;\n"], ["\n align-items: center;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n height: 32px;\n justify-content: center;\n width: 32px;\n"])));
376
+ var S_LeftContainer = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n gap: 8px;\n margin-left: auto;\n"], ["\n align-items: center;\n display: flex;\n gap: 8px;\n margin-left: auto;\n"])));
377
+ var S_CalendarContent = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex: 1;\n overflow: auto;\n"], ["\n flex: 1;\n overflow: auto;\n"])));
378
+ exports.default = Calendar;
379
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ interface CurrentTimeIndicatorProps {
3
+ show: boolean;
4
+ leftOffset?: string;
5
+ }
6
+ export declare const CurrentTimeIndicator: React.FC<CurrentTimeIndicatorProps>;
7
+ export {};
@@ -0,0 +1,48 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CurrentTimeIndicator = void 0;
11
+ var jsx_runtime_1 = require("react/jsx-runtime");
12
+ var react_1 = require("react");
13
+ var react_i18next_1 = require("react-i18next");
14
+ var styled_components_1 = __importDefault(require("styled-components"));
15
+ var constants_1 = require("./constants");
16
+ var CurrentTimeIndicator = function (_a) {
17
+ var show = _a.show, _b = _a.leftOffset, leftOffset = _b === void 0 ? '80px' : _b;
18
+ var i18n = (0, react_i18next_1.useTranslation)().i18n;
19
+ var getCurrentTime = (0, react_1.useCallback)(function () {
20
+ var now = new Date();
21
+ var locale = (0, constants_1.getLocaleFromLang)(i18n.language);
22
+ var timeInTimezone = new Date(now.toLocaleString(locale));
23
+ return {
24
+ hour: timeInTimezone.getHours(),
25
+ minute: timeInTimezone.getMinutes(),
26
+ percentage: ((timeInTimezone.getHours() * 60 + timeInTimezone.getMinutes()) / (24 * 60)) * 100
27
+ };
28
+ }, [i18n.language]);
29
+ var _c = (0, react_1.useState)(getCurrentTime()), currentTime = _c[0], setCurrentTime = _c[1];
30
+ (0, react_1.useEffect)(function () {
31
+ var updateTime = function () {
32
+ setCurrentTime(getCurrentTime());
33
+ };
34
+ updateTime();
35
+ var interval = setInterval(updateTime, 60000);
36
+ return function () { return clearInterval(interval); };
37
+ }, [getCurrentTime]);
38
+ return ((0, jsx_runtime_1.jsx)(S_CurrentTimeIndicator, { "$show": show, "$top": "".concat(currentTime.percentage, "%"), "$leftOffset": leftOffset }));
39
+ };
40
+ exports.CurrentTimeIndicator = CurrentTimeIndicator;
41
+ var S_CurrentTimeIndicator = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n display: ", ";\n height: 2px;\n left: ", ";\n position: absolute;\n right: 0;\n top: ", ";\n z-index: 10;\n\n &::before {\n background: ", ";\n border-radius: 50%;\n content: '';\n height: 8px;\n left: -4px;\n position: absolute;\n top: -3px;\n width: 8px;\n }\n"], ["\n background: ", ";\n display: ", ";\n height: 2px;\n left: ", ";\n position: absolute;\n right: 0;\n top: ", ";\n z-index: 10;\n\n &::before {\n background: ", ";\n border-radius: 50%;\n content: '';\n height: 8px;\n left: -4px;\n position: absolute;\n top: -3px;\n width: 8px;\n }\n"])), function (_a) {
42
+ var theme = _a.theme;
43
+ return theme.ui_cpnt_sheet_border_07;
44
+ }, function (props) { return (props.$show ? 'block' : 'none'); }, function (props) { return props.$leftOffset; }, function (props) { return props.$top; }, function (_a) {
45
+ var theme = _a.theme;
46
+ return theme.ui_cpnt_sheet_border_07;
47
+ });
48
+ var templateObject_1;
@@ -0,0 +1,17 @@
1
+ import type { Schedule, displayAllDayScheduleMode } from './types';
2
+ import type { FC, MouseEvent, DragEvent } from 'react';
3
+ interface DailyViewProps {
4
+ selectedDate: Date;
5
+ displayAllDayScheduleMode?: displayAllDayScheduleMode;
6
+ getSchedulesForDate: (date: Date) => Schedule[];
7
+ isDragOverDate: Date | null;
8
+ handleDateDragOver: (date: Date, e: DragEvent) => void;
9
+ handleDateDragLeave: () => void;
10
+ handleDateDrop: (date: Date, e: DragEvent) => void;
11
+ handleDateClick: (date: Date, e: MouseEvent) => void;
12
+ renderScheduleItem: (schedule: Schedule, extraProps?: any) => React.ReactNode;
13
+ handleScheduleDragStart: (schedule: Schedule, e: DragEvent) => void;
14
+ handleScheduleDragEnd: () => void;
15
+ }
16
+ export declare const DailyView: FC<DailyViewProps>;
17
+ export {};
@@ -0,0 +1,82 @@
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.DailyView = 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 AllDaySchedulesSection_1 = require("./AllDaySchedulesSection");
27
+ var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
28
+ var timeFormatUtils_1 = require("./timeFormatUtils");
29
+ var DailyView = function (_a) {
30
+ var selectedDate = _a.selectedDate, _b = _a.displayAllDayScheduleMode, displayAllDayScheduleMode = _b === void 0 ? 'use' : _b, getSchedulesForDate = _a.getSchedulesForDate, isDragOverDate = _a.isDragOverDate, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleDateClick = _a.handleDateClick, renderScheduleItem = _a.renderScheduleItem, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd;
31
+ var i18n = (0, react_i18next_1.useTranslation)().i18n;
32
+ var currentDateForDaily = [selectedDate][0];
33
+ var daySchedules = getSchedulesForDate(currentDateForDaily);
34
+ var timedSchedules = daySchedules.filter(function (e) { return !e.isAllDay; });
35
+ return ((0, jsx_runtime_1.jsxs)(S_DailyContainer, { children: [(0, jsx_runtime_1.jsx)(AllDaySchedulesSection_1.AllDaySchedulesSection, { calendarDates: [selectedDate], displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, renderScheduleItem: renderScheduleItem, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop }), (0, jsx_runtime_1.jsxs)(S_DailyTimeGrid, { children: [(0, jsx_runtime_1.jsx)(CurrentTimeIndicator_1.CurrentTimeIndicator, { show: true, leftOffset: "80px" }), Array.from({ length: 24 }, function (_unused, hour) { 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, i18n.language), colorTheme: "sysTextTertiary" }) }), (0, jsx_runtime_1.jsx)(S_DailyTimeSlot, __assign({ "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) ===
36
+ (function () {
37
+ var timeSlotDate = new Date(currentDateForDaily);
38
+ timeSlotDate.setHours(hour, 0, 0, 0);
39
+ return timeSlotDate.getTime();
40
+ })(), onClick: function () {
41
+ var clickedDate = new Date(currentDateForDaily);
42
+ clickedDate.setHours(hour, 0, 0, 0);
43
+ handleDateClick(clickedDate, {});
44
+ }, onDoubleClick: function () {
45
+ var clickedDate = new Date(currentDateForDaily);
46
+ clickedDate.setHours(hour, 0, 0, 0);
47
+ }, onDragOver: function (e) {
48
+ var timeSlotDate = new Date(currentDateForDaily);
49
+ timeSlotDate.setHours(hour, 0, 0, 0);
50
+ handleDateDragOver(timeSlotDate, e);
51
+ }, onDragLeave: handleDateDragLeave, onDrop: function (e) {
52
+ var timeSlotDate = new Date(currentDateForDaily);
53
+ timeSlotDate.setHours(hour, 0, 0, 0);
54
+ handleDateDrop(timeSlotDate, e);
55
+ } }, { children: timedSchedules
56
+ .filter(function (schedule) { return new Date(schedule.startDate).getHours() === hour; })
57
+ .map(function (schedule) {
58
+ return renderScheduleItem(schedule, {
59
+ onDragStart: function (e) { return handleScheduleDragStart === null || handleScheduleDragStart === void 0 ? void 0 : handleScheduleDragStart(schedule, e); },
60
+ onDragEnd: function () { return handleScheduleDragEnd === null || handleScheduleDragEnd === void 0 ? void 0 : handleScheduleDragEnd(); }
61
+ });
62
+ }) }))] }, hour)); })] })] }));
63
+ };
64
+ exports.DailyView = DailyView;
65
+ var S_DailyContainer = 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"])));
66
+ var S_DailyTimeGrid = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n flex: 1;\n overflow-y: auto;\n position: relative;\n"], ["\n flex: 1;\n overflow-y: auto;\n position: relative;\n"])));
67
+ var S_DailyTimeRow = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n min-height: 60px;\n"], ["\n display: flex;\n min-height: 60px;\n"])));
68
+ var S_DailyTimeLabel = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __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) {
69
+ var theme = _a.theme;
70
+ return theme.ui_cpnt_divider;
71
+ }, function (_a) {
72
+ var theme = _a.theme;
73
+ return theme.ui_cpnt_divider;
74
+ });
75
+ var S_DailyTimeSlot = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor: pointer;\n flex: 1;\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 padding: 4px;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_72 : 'transparent'); }, function (_a) {
76
+ var theme = _a.theme;
77
+ return theme.ui_cpnt_divider;
78
+ }, function (_a) {
79
+ var theme = _a.theme;
80
+ return theme.ui_72;
81
+ });
82
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { Schedule } from './types';
3
+ interface MonthlyViewProps {
4
+ getDayTextByDate: (date: Date) => string;
5
+ startOfWeek: 'sunday' | 'monday';
6
+ selectedDate: Date;
7
+ selectedDates: Date[];
8
+ dragStartDate: Date | null;
9
+ selectedSchedules: Schedule[];
10
+ dragEndDate: Date | null;
11
+ isDragOverDate: Date | null;
12
+ getSchedulesForDate: (date: Date) => Schedule[];
13
+ isToday: (date: Date) => boolean;
14
+ isPastDate: (date: Date) => boolean;
15
+ handleDateClick: (date: Date, e: React.MouseEvent) => void;
16
+ handleScheduleClick?: (schedule: Schedule, e?: React.MouseEvent) => void;
17
+ handleMouseUp: () => void;
18
+ handleDateDragOver: (date: Date, e: React.DragEvent) => void;
19
+ handleDateDragLeave: () => void;
20
+ handleDateDrop: (date: Date, e: React.DragEvent) => void;
21
+ renderScheduleItem: (schedule: Schedule, extraProps?: any) => React.ReactNode;
22
+ handleScheduleDragStart?: (schedule: Schedule, e: React.DragEvent) => void;
23
+ handleScheduleDragEnd?: () => void;
24
+ }
25
+ export declare const MonthlyView: React.FC<MonthlyViewProps>;
26
+ export {};