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

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,365 +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 __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
- /* eslint-disable indent */
32
- var react_1 = require("react");
33
- var react_i18next_1 = require("react-i18next");
34
- var dateHelper_1 = require("../../../common/utils/dateHelper");
35
- var styled_components_1 = __importDefault(require("styled-components"));
36
- var Dropdown_1 = require("../Dropdown");
37
- var IconButton_1 = require("../IconButton");
38
- var TextButton_1 = require("../TextButton");
39
- var TextLabel_1 = require("../TextLabel");
40
- var calendarUtils_1 = require("./calendarUtils");
41
- var DailyView_1 = require("./DailyView");
42
- var MonthlyView_1 = require("./MonthlyView");
43
- var ScheduleItem_1 = require("./ScheduleItem");
44
- var WeeklyView_1 = require("./WeeklyView");
45
- var YearlyView_1 = require("./YearlyView");
46
- var Calendar = function (_a) {
47
- 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;
48
- var t = (0, react_i18next_1.useTranslation)().t;
49
- var _h = (0, react_1.useState)(defaultViewType), currentViewType = _h[0], setCurrentViewType = _h[1];
50
- var _j = (0, react_1.useState)(new Date()), selectedDate = _j[0], setSelectedDate = _j[1];
51
- var _k = (0, react_1.useState)(null), dragStartDate = _k[0], setDragStartDate = _k[1];
52
- var _l = (0, react_1.useState)(null), dragEndDate = _l[0], setDragEndDate = _l[1];
53
- var _m = (0, react_1.useState)(false), isDragging = _m[0], setIsDragging = _m[1];
54
- var _o = (0, react_1.useState)(null), draggedSchedule = _o[0], setDraggedSchedule = _o[1];
55
- var _p = (0, react_1.useState)(null), isDragOverDate = _p[0], setIsDragOverDate = _p[1];
56
- var _q = (0, react_1.useState)([]), selectedSchedules = _q[0], setSelectedSchedules = _q[1];
57
- var _r = (0, react_1.useState)([]), selectedDates = _r[0], setSelectedDates = _r[1];
58
- var _s = (0, react_1.useState)(null), lastSelectedDate = _s[0], setLastSelectedDate = _s[1];
59
- // 오늘 날짜인지 확인
60
- var today = new Date();
61
- var isToday = function (date) { return dateHelper_1.DateHelper.isSameDay(date, today); };
62
- // 과거 날짜인지 확인
63
- var isPastDate = (0, react_1.useCallback)(function (date) { return dateHelper_1.DateHelper.isBefore(date, today) && !dateHelper_1.DateHelper.isSameDay(date, today); }, [today]);
64
- // 뷰 타입에 따른 시작일과 종료일 계산
65
- var _t = (0, calendarUtils_1.calculateDateRange)(currentViewType, selectedDate), startDate = _t.startDate, endDate = _t.endDate;
66
- // 뷰 타입 변경 처리
67
- var handleViewTypeChange = (0, react_1.useCallback)(function (option) {
68
- var newViewType = option.value;
69
- setCurrentViewType(newViewType);
70
- onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
71
- type: 'CALENDAR_TYPE_CHANGE',
72
- payload: {
73
- type: newViewType,
74
- startDate: startDate,
75
- endDate: endDate
76
- }
77
- });
78
- }, [selectedDate, onActionDispatch, calendarUtils_1.calculateDateRange]);
79
- // "오늘" 버튼 클릭 이벤트
80
- var handleTodayClick = (0, react_1.useCallback)(function () {
81
- setSelectedDate(today);
82
- onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
83
- type: 'TODAY_BUTTON_CLICK',
84
- payload: { startDate: startDate, endDate: endDate }
85
- });
86
- }, [today, currentViewType, onActionDispatch]);
87
- // 이전/다음 이동 함수
88
- var navigateDate = (0, react_1.useCallback)(function (direction) {
89
- var newDate;
90
- var increment = direction === 'next' ? 1 : -1;
91
- switch (currentViewType) {
92
- case 'DAILY': {
93
- newDate = dateHelper_1.DateHelper.addDays(selectedDate, increment);
94
- break;
95
- }
96
- case 'WEEKLY': {
97
- newDate = dateHelper_1.DateHelper.addDays(selectedDate, increment * 7);
98
- break;
99
- }
100
- case 'MONTHLY': {
101
- newDate = dateHelper_1.DateHelper.addMonths(selectedDate, increment);
102
- break;
103
- }
104
- case 'YEARLY': {
105
- newDate = new Date(selectedDate.getFullYear() + increment, selectedDate.getMonth(), selectedDate.getDate());
106
- break;
107
- }
108
- default:
109
- newDate = selectedDate;
110
- }
111
- setSelectedDate(newDate);
112
- onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
113
- type: direction === 'prev' ? 'PREV_BUTTON_CLICK' : 'NEXT_BUTTON_CLICK',
114
- payload: {
115
- startDate: startDate,
116
- endDate: endDate
117
- }
118
- });
119
- }, [selectedDate, currentViewType, onActionDispatch]);
120
- // 특정 날짜의 이벤트 가져오기
121
- var getSchedulesForDate = (0, react_1.useCallback)(function (date) {
122
- return schedules.filter(function (schedule) {
123
- var scheduleStart = new Date(schedule.start_date);
124
- var scheduleEnd = new Date(schedule.end_date);
125
- var targetDate = new Date(date);
126
- // 정확한 날짜 비교를 위해 시간을 일 시작으로 설정
127
- scheduleStart.setHours(0, 0, 0, 0);
128
- scheduleEnd.setHours(23, 59, 59, 999);
129
- targetDate.setHours(0, 0, 0, 0);
130
- // 대상 날짜가 이벤트 날짜 범위 내에 있는지 확인
131
- return targetDate >= scheduleStart && targetDate <= scheduleEnd;
132
- });
133
- }, [schedules]);
134
- // 날짜 클릭 이벤트 (일반 클릭, shift 클릭 둘다 포함)
135
- var handleDateClick = (0, react_1.useCallback)(function (date, e) {
136
- var _a, _b;
137
- 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);
138
- 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);
139
- var getDateKey = function (d) { return "".concat(d.getFullYear(), "-").concat(d.getMonth(), "-").concat(d.getDate()); };
140
- var clickedDateKey = getDateKey(date);
141
- // shift 클릭 처리
142
- if (isShiftClick) {
143
- var newSelectedDates = selectedDates.some(function (d) { return getDateKey(d) === clickedDateKey; })
144
- ? selectedDates.filter(function (d) { return getDateKey(d) !== clickedDateKey; })
145
- : __spreadArray(__spreadArray([], selectedDates, true), [date], false);
146
- setSelectedDates(newSelectedDates);
147
- setLastSelectedDate(date);
148
- if (config) {
149
- (_a = config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
150
- action: 'CLICK_WITH_SHIFT_KEY_DOWN',
151
- target: 'DATE',
152
- dates: newSelectedDates,
153
- startDate: startDate,
154
- endDate: endDate
155
- });
156
- }
157
- }
158
- setSelectedDate(date);
159
- // 일반 클릭 처리
160
- if (isNormalClick) {
161
- if (config) {
162
- (_b = config.trigger) === null || _b === void 0 ? void 0 : _b.call(config, { action: 'CLICK', target: 'DATE', date: date, startDate: startDate, endDate: endDate });
163
- }
164
- }
165
- }, [isPastDate, config, lastSelectedDate, selectedDates]);
166
- // 날짜 범위 선택을 위한 마우스 이벤트 처리
167
- var handleMouseUp = (0, react_1.useCallback)(function () {
168
- setIsDragging(false);
169
- setDragStartDate(null);
170
- setDragEndDate(null);
171
- }, [isDragging, dragStartDate, dragEndDate]);
172
- // 이벤트 드래그 핸들러
173
- var handleScheduleDragStart = (0, react_1.useCallback)(function (schedule, e) {
174
- setDraggedSchedule(schedule);
175
- e.dataTransfer.effectAllowed = 'move';
176
- e.dataTransfer.setData('text/plain', schedule.id.toString());
177
- // 더 정확한 드롭 계산을 위한 오프셋 정보 저장
178
- var scheduleStartDate = new Date(schedule.start_date);
179
- scheduleStartDate.setHours(0, 0, 0, 0);
180
- // 원본 이벤트 시작 시간을 dataTransfer에 저장
181
- e.dataTransfer.setData('scheduleStartTime', scheduleStartDate.getTime().toString());
182
- }, []);
183
- // 이벤트 드래그 종료 이벤트
184
- var handleScheduleDragEnd = (0, react_1.useCallback)(function () {
185
- setDraggedSchedule(null);
186
- setIsDragOverDate(null);
187
- }, []);
188
- // 날짜 드래그 오버 이벤트
189
- var handleDateDragOver = (0, react_1.useCallback)(function (date, e) {
190
- if (draggedSchedule) {
191
- e.preventDefault();
192
- e.dataTransfer.dropEffect = 'move';
193
- setIsDragOverDate(date);
194
- }
195
- }, [draggedSchedule]);
196
- // 날짜 드래그 떼기
197
- var handleDateDragLeave = (0, react_1.useCallback)(function () {
198
- setIsDragOverDate(null);
199
- }, []);
200
- // 삭제 키 이벤트 처리
201
- var handleKeyDown = (0, react_1.useCallback)(function (e) {
202
- var _a;
203
- if (e.key === 'Delete' && selectedSchedules.length > 0 && (config === null || config === void 0 ? void 0 : config.target) === 'SCHEDULE') {
204
- (_a = config === null || config === void 0 ? void 0 : config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
205
- action: 'DELETE_KEY_DOWN',
206
- target: 'SCHEDULE',
207
- schedules: selectedSchedules,
208
- startDate: startDate,
209
- endDate: endDate
210
- });
211
- setSelectedSchedules([]);
212
- }
213
- }, [config, selectedSchedules]);
214
- // 날짜 드래그 놓기
215
- var handleDateDrop = (0, react_1.useCallback)(function (date, e) {
216
- var _a;
217
- e.preventDefault();
218
- if (!draggedSchedule)
219
- return;
220
- if (!((config === null || config === void 0 ? void 0 : config.action) === 'DRAG' && config.target === 'SCHEDULE'))
221
- return;
222
- var originalStartDate = new Date(draggedSchedule.start_date);
223
- var originalEndDate = new Date(draggedSchedule.end_date);
224
- var duration = originalEndDate.getTime() - originalStartDate.getTime();
225
- var getAdjustedStartDate = function () {
226
- var baseDate = new Date(date);
227
- if (currentViewType === 'MONTHLY') {
228
- var target = e.target;
229
- var gridContainer = target.closest('[data-calendar-grid]');
230
- if (gridContainer) {
231
- var gridRect = gridContainer.getBoundingClientRect();
232
- var cellWidth = gridRect.width / 7;
233
- var clickedColumn = Math.floor((e.clientX - gridRect.left) / cellWidth);
234
- var dropDayOfWeek = baseDate.getDay();
235
- var columnOffset = clickedColumn - dropDayOfWeek;
236
- var actualDropDate = new Date(baseDate);
237
- actualDropDate.setDate(baseDate.getDate() + columnOffset);
238
- actualDropDate.setHours(originalStartDate.getHours(), originalStartDate.getMinutes(), 0, 0);
239
- return actualDropDate;
240
- }
241
- }
242
- // 공통 처리 (WEEKLY, DAILY, fallback)
243
- baseDate.setHours(originalStartDate.getHours(), originalStartDate.getMinutes(), 0, 0);
244
- return baseDate;
245
- };
246
- var newStartDate = getAdjustedStartDate();
247
- var newEndDate = new Date(newStartDate.getTime() + duration);
248
- var updatedSchedule = __assign(__assign({}, draggedSchedule), { start_date: newStartDate, end_date: newEndDate });
249
- if (config) {
250
- (_a = config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
251
- action: 'DRAG',
252
- target: 'SCHEDULE',
253
- schedule: updatedSchedule,
254
- startDate: startDate,
255
- endDate: endDate
256
- });
257
- }
258
- setIsDragOverDate(null);
259
- }, [draggedSchedule, config, currentViewType]);
260
- var defaultDayTexts = (0, react_1.useMemo)(function () { return [
261
- t('str_3893'),
262
- t('str_3887'),
263
- t('str_3888'),
264
- t('str_3889'),
265
- t('str_3890'),
266
- t('str_3891'),
267
- t('str_3892') // 토 - 6
268
- ]; }, [t]);
269
- // 날짜의 실제 요일에 따른 요일 텍스트 가져오기
270
- var getDayTextByDate = function (date) {
271
- return defaultDayTexts[date.getDay()];
272
- };
273
- var monthNames = (0, react_1.useMemo)(function () { return [
274
- t('calendar_month_1'),
275
- t('calendar_month_2'),
276
- t('calendar_month_3'),
277
- t('calendar_month_4'),
278
- t('calendar_month_5'),
279
- t('calendar_month_6'),
280
- t('calendar_month_7'),
281
- t('calendar_month_8'),
282
- t('calendar_month_9'),
283
- t('calendar_month_10'),
284
- t('calendar_month_11'),
285
- t('calendar_month_12')
286
- ]; }, [t]);
287
- // 뷰 타입을 위한 드롭다운 옵션 생성
288
- var viewTypeOptions = (0, react_1.useMemo)(function () {
289
- var viewTypeTextMap = {
290
- MONTHLY: t('calendar_view_monthly'),
291
- WEEKLY: t('calendar_view_weekly'),
292
- DAILY: t('calendar_view_daily'),
293
- YEARLY: t('calendar_view_yearly')
294
- };
295
- return viewTypes.map(function (viewType) { return ({
296
- text: viewTypeTextMap[viewType] || viewType,
297
- value: viewType
298
- }); });
299
- }, [viewTypes, t]);
300
- // 특정 월의 캘린더 날짜 생성 (연간 보기용)
301
- var getMonthDates = (0, react_1.useCallback)(function (year, month) {
302
- var monthDate = new Date(year, month, 1);
303
- return dateHelper_1.DateHelper.getCalendarDates(monthDate, startOfWeek);
304
- }, [startOfWeek]);
305
- // 스케줄 클릭 (일반 클릭, shift 클릭 둘다 포함)
306
- var handleScheduleClick = function (schedule, e) {
307
- var _a, _b;
308
- var isShiftClick = (config === null || config === void 0 ? void 0 : config.action) === 'CLICK_WITH_SHIFT_KEY_DOWN' &&
309
- (config === null || config === void 0 ? void 0 : config.target) === 'SCHEDULE' &&
310
- (e === null || e === void 0 ? void 0 : e.shiftKey);
311
- 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);
312
- var isSelected = selectedSchedules.some(function (s) { return s.id === (schedule === null || schedule === void 0 ? void 0 : schedule.id); });
313
- if (isShiftClick) {
314
- var newSelectedSchedules = isSelected
315
- ? selectedSchedules.filter(function (s) { return s.id !== (schedule === null || schedule === void 0 ? void 0 : schedule.id); })
316
- : __spreadArray(__spreadArray([], selectedSchedules, true), [schedule], false).filter(function (s) { return s !== undefined; });
317
- setSelectedSchedules(newSelectedSchedules);
318
- (_a = config === null || config === void 0 ? void 0 : config.trigger) === null || _a === void 0 ? void 0 : _a.call(config, {
319
- action: 'CLICK_WITH_SHIFT_KEY_DOWN',
320
- target: 'SCHEDULE',
321
- schedules: newSelectedSchedules,
322
- startDate: startDate,
323
- endDate: endDate
324
- });
325
- return;
326
- }
327
- if (isNormalClick) {
328
- // 일반 클릭 시 해당 스케줄만 선택
329
- setSelectedSchedules([schedule]);
330
- (_b = config === null || config === void 0 ? void 0 : config.trigger) === null || _b === void 0 ? void 0 : _b.call(config, { action: 'CLICK', target: 'SCHEDULE', schedule: schedule, startDate: startDate, endDate: endDate });
331
- return;
332
- }
333
- };
334
- // 다중 일자 지원을 포함한 이벤트 아이템 렌더링
335
- var renderScheduleItem = function (schedule, extraProps) {
336
- if (extraProps === void 0) { extraProps = {}; }
337
- // isAllDay 계산
338
- var isAllDay = (0, calendarUtils_1.calculateIsAllDay)(new Date(schedule.start_date), new Date(schedule.end_date));
339
- var isSelected = selectedSchedules.some(function (s) { return s.id === schedule.id; });
340
- return ((0, jsx_runtime_1.jsx)(ScheduleItem_1.ScheduleItem, { schedule: schedule, extraProps: extraProps, onDragStart: handleScheduleDragStart, onDragEnd: handleScheduleDragEnd, onClick: handleScheduleClick, isSelected: isSelected, isAllDay: isAllDay }));
341
- };
342
- // 뷰 타입에 따른 캘린더 콘텐츠 렌더링
343
- var renderCalendarContent = function () {
344
- switch (currentViewType) {
345
- case 'MONTHLY':
346
- 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 }));
347
- case 'WEEKLY':
348
- 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 }));
349
- case 'DAILY':
350
- 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 }));
351
- case 'YEARLY':
352
- return ((0, jsx_runtime_1.jsx)(YearlyView_1.YearlyView, { selectedDate: selectedDate, getMonthDates: getMonthDates, getDayTextByDate: getDayTextByDate, startOfWeek: startOfWeek, isToday: isToday, handleDateClick: handleDateClick }));
353
- default:
354
- return null;
355
- }
356
- };
357
- 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() })] })));
358
- };
359
- 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"])));
360
- 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"])));
361
- 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"])));
362
- 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"])));
363
- 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"])));
364
- exports.default = Calendar;
365
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -1,7 +0,0 @@
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 {};
@@ -1,48 +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 __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;
@@ -1,17 +0,0 @@
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 {};
@@ -1,82 +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.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.start_date).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;
@@ -1,26 +0,0 @@
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 {};