pds-dev-kit-web-test 2.5.624 → 2.5.626

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 (252) hide show
  1. package/dist/scripts/copy-tinymce.d.ts +1 -0
  2. package/dist/scripts/copy-tinymce.js +32 -0
  3. package/dist/src/common/services/i18n/resources/en.json +13 -13
  4. package/dist/src/common/styles/theme.d.ts +1 -0
  5. package/dist/src/common/styles/theme.js +1 -1
  6. package/dist/src/desktop/components/Calendar/Calendar.js +51 -46
  7. package/dist/src/desktop/components/Calendar/CalendarContext.d.ts +1 -3
  8. package/dist/src/desktop/components/Calendar/CalendarContext.js +1 -2
  9. package/dist/src/desktop/components/Calendar/DailyView.d.ts +2 -8
  10. package/dist/src/desktop/components/Calendar/DailyView.js +5 -86
  11. package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +1 -2
  12. package/dist/src/desktop/components/Calendar/MonthlyView.js +6 -81
  13. package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +0 -3
  14. package/dist/src/desktop/components/Calendar/WeeklyView.js +6 -96
  15. package/dist/src/desktop/components/Calendar/calendarUtils.js +10 -20
  16. package/dist/src/desktop/components/Calendar/types.d.ts +4 -8
  17. package/dist/src/desktop/components/RichTextEditor/RichTextEditor.d.ts +34 -0
  18. package/dist/src/desktop/components/RichTextEditor/RichTextEditor.js +268 -0
  19. package/dist/src/desktop/components/RichTextEditor/index.d.ts +2 -0
  20. package/dist/src/desktop/components/RichTextEditor/index.js +8 -0
  21. package/dist/src/desktop/components/index.d.ts +2 -1
  22. package/dist/src/desktop/components/index.js +4 -2
  23. package/dist/src/desktop/index.d.ts +1 -1
  24. package/dist/src/desktop/index.js +3 -2
  25. package/dist/src/mobile/components/RichTextEditor/RichTextEditor.d.ts +34 -0
  26. package/dist/src/mobile/components/RichTextEditor/RichTextEditor.js +272 -0
  27. package/dist/src/mobile/components/RichTextEditor/index.d.ts +2 -0
  28. package/dist/src/mobile/components/RichTextEditor/index.js +8 -0
  29. package/dist/src/mobile/components/index.d.ts +2 -1
  30. package/dist/src/mobile/components/index.js +3 -1
  31. package/dist/src/mobile/index.d.ts +1 -1
  32. package/dist/src/mobile/index.js +2 -1
  33. package/dist/tinymce/CHANGELOG.md +3453 -0
  34. package/dist/tinymce/README.md +73 -0
  35. package/dist/tinymce/bower.json +27 -0
  36. package/dist/tinymce/composer.json +52 -0
  37. package/dist/tinymce/icons/default/icons.js +194 -0
  38. package/dist/tinymce/icons/default/icons.min.js +1 -0
  39. package/dist/tinymce/icons/default/index.js +7 -0
  40. package/dist/tinymce/license.txt +21 -0
  41. package/dist/tinymce/models/dom/index.js +7 -0
  42. package/dist/tinymce/models/dom/model.js +8040 -0
  43. package/dist/tinymce/models/dom/model.min.js +1 -0
  44. package/dist/tinymce/notices.txt +21 -0
  45. package/dist/tinymce/package.json +32 -0
  46. package/dist/tinymce/plugins/accordion/index.js +7 -0
  47. package/dist/tinymce/plugins/accordion/plugin.js +1054 -0
  48. package/dist/tinymce/plugins/accordion/plugin.min.js +5 -0
  49. package/dist/tinymce/plugins/advlist/index.js +7 -0
  50. package/dist/tinymce/plugins/advlist/plugin.js +259 -0
  51. package/dist/tinymce/plugins/advlist/plugin.min.js +5 -0
  52. package/dist/tinymce/plugins/anchor/index.js +7 -0
  53. package/dist/tinymce/plugins/anchor/plugin.js +214 -0
  54. package/dist/tinymce/plugins/anchor/plugin.min.js +5 -0
  55. package/dist/tinymce/plugins/autolink/index.js +7 -0
  56. package/dist/tinymce/plugins/autolink/plugin.js +228 -0
  57. package/dist/tinymce/plugins/autolink/plugin.min.js +5 -0
  58. package/dist/tinymce/plugins/autoresize/index.js +7 -0
  59. package/dist/tinymce/plugins/autoresize/plugin.js +192 -0
  60. package/dist/tinymce/plugins/autoresize/plugin.min.js +5 -0
  61. package/dist/tinymce/plugins/autosave/index.js +7 -0
  62. package/dist/tinymce/plugins/autosave/plugin.js +233 -0
  63. package/dist/tinymce/plugins/autosave/plugin.min.js +5 -0
  64. package/dist/tinymce/plugins/charmap/index.js +7 -0
  65. package/dist/tinymce/plugins/charmap/plugin.js +1658 -0
  66. package/dist/tinymce/plugins/charmap/plugin.min.js +5 -0
  67. package/dist/tinymce/plugins/code/index.js +7 -0
  68. package/dist/tinymce/plugins/code/plugin.js +85 -0
  69. package/dist/tinymce/plugins/code/plugin.min.js +5 -0
  70. package/dist/tinymce/plugins/codesample/index.js +7 -0
  71. package/dist/tinymce/plugins/codesample/plugin.js +2471 -0
  72. package/dist/tinymce/plugins/codesample/plugin.min.js +13 -0
  73. package/dist/tinymce/plugins/directionality/index.js +7 -0
  74. package/dist/tinymce/plugins/directionality/plugin.js +395 -0
  75. package/dist/tinymce/plugins/directionality/plugin.min.js +5 -0
  76. package/dist/tinymce/plugins/emoticons/index.js +7 -0
  77. package/dist/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
  78. package/dist/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
  79. package/dist/tinymce/plugins/emoticons/js/emojis.js +1 -0
  80. package/dist/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
  81. package/dist/tinymce/plugins/emoticons/plugin.js +595 -0
  82. package/dist/tinymce/plugins/emoticons/plugin.min.js +5 -0
  83. package/dist/tinymce/plugins/fullscreen/index.js +7 -0
  84. package/dist/tinymce/plugins/fullscreen/plugin.js +1249 -0
  85. package/dist/tinymce/plugins/fullscreen/plugin.min.js +5 -0
  86. package/dist/tinymce/plugins/help/index.js +7 -0
  87. package/dist/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
  88. package/dist/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  89. package/dist/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
  90. package/dist/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
  91. package/dist/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
  92. package/dist/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
  93. package/dist/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
  94. package/dist/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
  95. package/dist/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
  96. package/dist/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
  97. package/dist/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
  98. package/dist/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
  99. package/dist/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  100. package/dist/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  101. package/dist/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
  102. package/dist/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
  103. package/dist/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  104. package/dist/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
  105. package/dist/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
  106. package/dist/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
  107. package/dist/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
  108. package/dist/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  109. package/dist/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
  110. package/dist/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  111. package/dist/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
  112. package/dist/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
  113. package/dist/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  114. package/dist/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  115. package/dist/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
  116. package/dist/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
  117. package/dist/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
  118. package/dist/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  119. package/dist/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  120. package/dist/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  121. package/dist/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
  122. package/dist/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
  123. package/dist/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
  124. package/dist/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  125. package/dist/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  126. package/dist/tinymce/plugins/help/plugin.js +898 -0
  127. package/dist/tinymce/plugins/help/plugin.min.js +5 -0
  128. package/dist/tinymce/plugins/image/index.js +7 -0
  129. package/dist/tinymce/plugins/image/plugin.js +1505 -0
  130. package/dist/tinymce/plugins/image/plugin.min.js +5 -0
  131. package/dist/tinymce/plugins/importcss/index.js +7 -0
  132. package/dist/tinymce/plugins/importcss/plugin.js +344 -0
  133. package/dist/tinymce/plugins/importcss/plugin.min.js +5 -0
  134. package/dist/tinymce/plugins/insertdatetime/index.js +7 -0
  135. package/dist/tinymce/plugins/insertdatetime/plugin.js +187 -0
  136. package/dist/tinymce/plugins/insertdatetime/plugin.min.js +5 -0
  137. package/dist/tinymce/plugins/link/index.js +7 -0
  138. package/dist/tinymce/plugins/link/plugin.js +1242 -0
  139. package/dist/tinymce/plugins/link/plugin.min.js +5 -0
  140. package/dist/tinymce/plugins/lists/index.js +7 -0
  141. package/dist/tinymce/plugins/lists/plugin.js +2172 -0
  142. package/dist/tinymce/plugins/lists/plugin.min.js +5 -0
  143. package/dist/tinymce/plugins/media/index.js +7 -0
  144. package/dist/tinymce/plugins/media/plugin.js +1217 -0
  145. package/dist/tinymce/plugins/media/plugin.min.js +5 -0
  146. package/dist/tinymce/plugins/nonbreaking/index.js +7 -0
  147. package/dist/tinymce/plugins/nonbreaking/plugin.js +123 -0
  148. package/dist/tinymce/plugins/nonbreaking/plugin.min.js +5 -0
  149. package/dist/tinymce/plugins/pagebreak/index.js +7 -0
  150. package/dist/tinymce/plugins/pagebreak/plugin.js +117 -0
  151. package/dist/tinymce/plugins/pagebreak/plugin.min.js +5 -0
  152. package/dist/tinymce/plugins/preview/index.js +7 -0
  153. package/dist/tinymce/plugins/preview/plugin.js +97 -0
  154. package/dist/tinymce/plugins/preview/plugin.min.js +5 -0
  155. package/dist/tinymce/plugins/quickbars/index.js +7 -0
  156. package/dist/tinymce/plugins/quickbars/plugin.js +447 -0
  157. package/dist/tinymce/plugins/quickbars/plugin.min.js +5 -0
  158. package/dist/tinymce/plugins/save/index.js +7 -0
  159. package/dist/tinymce/plugins/save/plugin.js +118 -0
  160. package/dist/tinymce/plugins/save/plugin.min.js +5 -0
  161. package/dist/tinymce/plugins/searchreplace/index.js +7 -0
  162. package/dist/tinymce/plugins/searchreplace/plugin.js +1093 -0
  163. package/dist/tinymce/plugins/searchreplace/plugin.min.js +5 -0
  164. package/dist/tinymce/plugins/table/index.js +7 -0
  165. package/dist/tinymce/plugins/table/plugin.js +3462 -0
  166. package/dist/tinymce/plugins/table/plugin.min.js +5 -0
  167. package/dist/tinymce/plugins/template/index.js +7 -0
  168. package/dist/tinymce/plugins/template/plugin.js +567 -0
  169. package/dist/tinymce/plugins/template/plugin.min.js +5 -0
  170. package/dist/tinymce/plugins/visualblocks/index.js +7 -0
  171. package/dist/tinymce/plugins/visualblocks/plugin.js +98 -0
  172. package/dist/tinymce/plugins/visualblocks/plugin.min.js +5 -0
  173. package/dist/tinymce/plugins/visualchars/index.js +7 -0
  174. package/dist/tinymce/plugins/visualchars/plugin.js +560 -0
  175. package/dist/tinymce/plugins/visualchars/plugin.min.js +5 -0
  176. package/dist/tinymce/plugins/wordcount/index.js +7 -0
  177. package/dist/tinymce/plugins/wordcount/plugin.js +405 -0
  178. package/dist/tinymce/plugins/wordcount/plugin.min.js +5 -0
  179. package/dist/tinymce/skins/content/dark/content.css +79 -0
  180. package/dist/tinymce/skins/content/dark/content.js +15 -0
  181. package/dist/tinymce/skins/content/dark/content.min.css +14 -0
  182. package/dist/tinymce/skins/content/default/content.css +74 -0
  183. package/dist/tinymce/skins/content/default/content.js +15 -0
  184. package/dist/tinymce/skins/content/default/content.min.css +14 -0
  185. package/dist/tinymce/skins/content/document/content.css +79 -0
  186. package/dist/tinymce/skins/content/document/content.js +15 -0
  187. package/dist/tinymce/skins/content/document/content.min.css +14 -0
  188. package/dist/tinymce/skins/content/tinymce-5/content.css +74 -0
  189. package/dist/tinymce/skins/content/tinymce-5/content.js +15 -0
  190. package/dist/tinymce/skins/content/tinymce-5/content.min.css +14 -0
  191. package/dist/tinymce/skins/content/tinymce-5-dark/content.css +79 -0
  192. package/dist/tinymce/skins/content/tinymce-5-dark/content.js +15 -0
  193. package/dist/tinymce/skins/content/tinymce-5-dark/content.min.css +14 -0
  194. package/dist/tinymce/skins/content/writer/content.css +75 -0
  195. package/dist/tinymce/skins/content/writer/content.js +15 -0
  196. package/dist/tinymce/skins/content/writer/content.min.css +14 -0
  197. package/dist/tinymce/skins/ui/oxide/content.css +798 -0
  198. package/dist/tinymce/skins/ui/oxide/content.inline.css +792 -0
  199. package/dist/tinymce/skins/ui/oxide/content.inline.js +15 -0
  200. package/dist/tinymce/skins/ui/oxide/content.inline.min.css +14 -0
  201. package/dist/tinymce/skins/ui/oxide/content.js +15 -0
  202. package/dist/tinymce/skins/ui/oxide/content.min.css +14 -0
  203. package/dist/tinymce/skins/ui/oxide/skin.css +3763 -0
  204. package/dist/tinymce/skins/ui/oxide/skin.js +2 -0
  205. package/dist/tinymce/skins/ui/oxide/skin.min.css +1 -0
  206. package/dist/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  207. package/dist/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  208. package/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  209. package/dist/tinymce/skins/ui/oxide-dark/content.css +779 -0
  210. package/dist/tinymce/skins/ui/oxide-dark/content.inline.css +792 -0
  211. package/dist/tinymce/skins/ui/oxide-dark/content.inline.js +15 -0
  212. package/dist/tinymce/skins/ui/oxide-dark/content.inline.min.css +14 -0
  213. package/dist/tinymce/skins/ui/oxide-dark/content.js +15 -0
  214. package/dist/tinymce/skins/ui/oxide-dark/content.min.css +14 -0
  215. package/dist/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  216. package/dist/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  217. package/dist/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  218. package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  219. package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  220. package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  221. package/dist/tinymce/skins/ui/tinymce-5/content.css +798 -0
  222. package/dist/tinymce/skins/ui/tinymce-5/content.inline.css +792 -0
  223. package/dist/tinymce/skins/ui/tinymce-5/content.inline.js +15 -0
  224. package/dist/tinymce/skins/ui/tinymce-5/content.inline.min.css +14 -0
  225. package/dist/tinymce/skins/ui/tinymce-5/content.js +15 -0
  226. package/dist/tinymce/skins/ui/tinymce-5/content.min.css +14 -0
  227. package/dist/tinymce/skins/ui/tinymce-5/skin.css +3857 -0
  228. package/dist/tinymce/skins/ui/tinymce-5/skin.js +2 -0
  229. package/dist/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
  230. package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
  231. package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  232. package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  233. package/dist/tinymce/skins/ui/tinymce-5-dark/content.css +779 -0
  234. package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.css +792 -0
  235. package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.js +15 -0
  236. package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +14 -0
  237. package/dist/tinymce/skins/ui/tinymce-5-dark/content.js +15 -0
  238. package/dist/tinymce/skins/ui/tinymce-5-dark/content.min.css +14 -0
  239. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.css +3857 -0
  240. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
  241. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  242. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
  243. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  244. package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  245. package/dist/tinymce/themes/silver/index.js +7 -0
  246. package/dist/tinymce/themes/silver/theme.js +30775 -0
  247. package/dist/tinymce/themes/silver/theme.min.js +1 -0
  248. package/dist/tinymce/tinymce.d.ts +3238 -0
  249. package/dist/tinymce/tinymce.js +31779 -0
  250. package/dist/tinymce/tinymce.min.js +11 -0
  251. package/package.json +7 -2
  252. package/scripts/copy-tinymce.js +37 -0
@@ -51,12 +51,10 @@ var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
51
51
  var TimeBasedScheduleItem_1 = require("./TimeBasedScheduleItem");
52
52
  var timeFormatUtils_1 = require("./timeFormatUtils");
53
53
  var WeeklyView = function (_a) {
54
- var startOfWeek = _a.startOfWeek, schedules = _a.schedules, config = _a.config;
54
+ var startOfWeek = _a.startOfWeek;
55
55
  var _b = (0, react_i18next_1.useTranslation)(), t = _b.t, i18n = _b.i18n;
56
- var _c = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _c.selectedDate, selectedSchedules = _c.selectedSchedules, displayAllDayScheduleMode = _c.displayAllDayScheduleMode, getSchedulesForDate = _c.getSchedulesForDate, isToday = _c.isToday, isDragOverDate = _c.isDragOverDate, handleDateDragOver = _c.handleDateDragOver, handleDateDragLeave = _c.handleDateDragLeave, handleDateDrop = _c.handleDateDrop, handleDateClick = _c.handleDateClick, handleDateDrag = _c.handleDateDrag, handleScheduleDragStart = _c.handleScheduleDragStart, handleScheduleDragEnd = _c.handleScheduleDragEnd, isDraggable = _c.isDraggable, handleScheduleClick = _c.handleScheduleClick, getDayTextByDate = _c.getDayTextByDate;
57
- var _d = (0, react_1.useState)(null), timeSelectionStart = _d[0], setTimeSelectionStart = _d[1];
58
- var _e = (0, react_1.useState)(null), timeSelectionEnd = _e[0], setTimeSelectionEnd = _e[1];
59
- var _f = (0, react_1.useState)(false), isTimeDragging = _f[0], setIsTimeDragging = _f[1];
56
+ var _c = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _c.selectedDate, selectedSchedules = _c.selectedSchedules, displayAllDayScheduleMode = _c.displayAllDayScheduleMode, getSchedulesForDate = _c.getSchedulesForDate, isToday = _c.isToday, isDragOverDate = _c.isDragOverDate, handleDateDragOver = _c.handleDateDragOver, handleDateDragLeave = _c.handleDateDragLeave, handleDateDrop = _c.handleDateDrop, handleDateClick = _c.handleDateClick, handleScheduleDragStart = _c.handleScheduleDragStart, handleScheduleDragEnd = _c.handleScheduleDragEnd, isDraggable = _c.isDraggable, handleScheduleClick = _c.handleScheduleClick, getDayTextByDate = _c.getDayTextByDate;
57
+ // Generate calendar dates for weekly view
60
58
  var calendarDates = (0, react_1.useMemo)(function () {
61
59
  var dates = [];
62
60
  var startIndex = startOfWeek === 'monday' ? 1 : 0;
@@ -67,88 +65,6 @@ var WeeklyView = function (_a) {
67
65
  }
68
66
  return dates;
69
67
  }, [selectedDate, startOfWeek]);
70
- // 시간 드래그 시작
71
- var handleTimeMouseDown = (0, react_1.useCallback)(function (date, hour, e) {
72
- var _a;
73
- if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
74
- return;
75
- e.preventDefault();
76
- var selection = { date: date, hour: hour };
77
- setTimeSelectionStart(selection);
78
- setTimeSelectionEnd(selection);
79
- setIsTimeDragging(true);
80
- }, [config]);
81
- // 시간 드래그 중
82
- var handleTimeMouseEnter = (0, react_1.useCallback)(function (date, hour) {
83
- if (!isTimeDragging)
84
- return;
85
- setTimeSelectionEnd({ date: date, hour: hour });
86
- }, [isTimeDragging]);
87
- // 드래그 종료 시 콜백 호출
88
- (0, react_1.useEffect)(function () {
89
- var handleMouseUp = function () {
90
- var _a;
91
- if (isTimeDragging && timeSelectionStart && timeSelectionEnd && ((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
92
- // 선택된 시간 범위 계산
93
- var startDateTime = new Date(timeSelectionStart.date);
94
- startDateTime.setHours(timeSelectionStart.hour, 0, 0, 0);
95
- var endDateTime = new Date(timeSelectionEnd.date);
96
- endDateTime.setHours(timeSelectionEnd.hour, 59, 59, 999);
97
- // 실제 시작/종료 시간 (순서 보정)
98
- var actualStartTime_1 = new Date(Math.min(startDateTime.getTime(), endDateTime.getTime()));
99
- var actualEndTime_1 = new Date(Math.max(startDateTime.getTime(), endDateTime.getTime()));
100
- // 선택된 시간 범위에 포함되는 스케줄들 찾기
101
- var schedulesInRange_1 = [];
102
- schedules.forEach(function (schedule) {
103
- var scheduleStart = new Date(schedule.startDate);
104
- var scheduleEnd = new Date(schedule.endDate);
105
- // 스케줄이 선택된 시간 범위와 겹치는지 확인
106
- if (scheduleStart <= actualEndTime_1 && scheduleEnd >= actualStartTime_1) {
107
- schedulesInRange_1.push(schedule);
108
- }
109
- });
110
- // 선택된 날짜들 생성 (시간 범위에 포함된 모든 날짜)
111
- var selectedDates = [];
112
- var currentDate = new Date(actualStartTime_1);
113
- currentDate.setHours(0, 0, 0, 0);
114
- var endDate = new Date(actualEndTime_1);
115
- endDate.setHours(0, 0, 0, 0);
116
- while (currentDate <= endDate) {
117
- selectedDates.push(new Date(currentDate));
118
- currentDate.setDate(currentDate.getDate() + 1);
119
- }
120
- handleDateDrag({
121
- action: 'DRAG',
122
- target: 'DATE',
123
- dates: selectedDates,
124
- schedules: schedulesInRange_1,
125
- startDate: actualStartTime_1.toISOString(),
126
- endDate: actualEndTime_1.toISOString()
127
- });
128
- }
129
- setIsTimeDragging(false);
130
- setTimeSelectionStart(null);
131
- setTimeSelectionEnd(null);
132
- };
133
- if (isTimeDragging) {
134
- document.addEventListener('mouseup', handleMouseUp);
135
- return function () { return document.removeEventListener('mouseup', handleMouseUp); };
136
- }
137
- }, [isTimeDragging, timeSelectionStart, timeSelectionEnd, config, schedules]);
138
- // 선택한 시간이 드래그 범위에 포함되는지 확인
139
- var isTimeSlotInDragRange = (0, react_1.useCallback)(function (date, hour) {
140
- if (!timeSelectionStart || !timeSelectionEnd)
141
- return false;
142
- var slotDateTime = new Date(date);
143
- slotDateTime.setHours(hour, 0, 0, 0);
144
- var startDateTime = new Date(timeSelectionStart.date);
145
- startDateTime.setHours(timeSelectionStart.hour, 0, 0, 0);
146
- var endDateTime = new Date(timeSelectionEnd.date);
147
- endDateTime.setHours(timeSelectionEnd.hour, 0, 0, 0);
148
- var actualStartTime = Math.min(startDateTime.getTime(), endDateTime.getTime());
149
- var actualEndTime = Math.max(startDateTime.getTime(), endDateTime.getTime());
150
- return slotDateTime.getTime() >= actualStartTime && slotDateTime.getTime() <= actualEndTime;
151
- }, [timeSelectionStart, timeSelectionEnd]);
152
68
  return ((0, jsx_runtime_1.jsxs)(S_WeeklyContainer, { children: [(0, jsx_runtime_1.jsxs)(S_WeeklyHeader, { children: [(0, jsx_runtime_1.jsx)(S_TimeColumnHeader, {}), calendarDates.map(function (date, index) {
153
69
  var dayText = getDayTextByDate(date);
154
70
  var dateText = t('str_calendar_weekly_date', {
@@ -161,7 +77,7 @@ var WeeklyView = function (_a) {
161
77
  var timeSlotDate = new Date(date);
162
78
  timeSlotDate.setHours(hour, 0, 0, 0);
163
79
  var isDragOver = (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) === timeSlotDate.getTime();
164
- return ((0, jsx_runtime_1.jsx)(S_TimeSlot, __assign({ "$isDragOver": isDragOver, "$isDraggable": isDraggable, "$isInTimeDragRange": isTimeSlotInDragRange(date, hour), "$isTimeDragging": isTimeDragging, onClick: function () { return handleDateClick(date, {}); }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); }, onMouseDown: function (e) { return handleTimeMouseDown(date, hour, e); }, onMouseEnter: function () { return handleTimeMouseEnter(date, hour); } }, { children: hour === 0 && ((0, jsx_runtime_1.jsx)(TimeBasedScheduleItem_1.TimeBasedScheduleItem, { schedules: getSchedulesForDate(date), selectedSchedules: selectedSchedules, isDraggable: isDraggable, onClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd })) }), dayIndex));
80
+ return ((0, jsx_runtime_1.jsx)(S_TimeSlot, __assign({ "$isDragOver": isDragOver, "$isDraggable": isDraggable, onClick: function () { return handleDateClick(date, {}); }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); } }, { children: hour === 0 && ((0, jsx_runtime_1.jsx)(TimeBasedScheduleItem_1.TimeBasedScheduleItem, { schedules: getSchedulesForDate(date), selectedSchedules: selectedSchedules, isDraggable: isDraggable, onClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd })) }), dayIndex));
165
81
  }) })] }, hour)); })] }))] }));
166
82
  };
167
83
  exports.WeeklyView = WeeklyView;
@@ -185,19 +101,13 @@ var S_TimeLabel = styled_components_1.default.div(templateObject_8 || (templateO
185
101
  return theme.ui_cpnt_divider;
186
102
  });
187
103
  var S_TimeSlots = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: contents;\n"], ["\n display: contents;\n"])));
188
- var S_TimeSlot = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: ", ";\n min-width: 0;\n overflow: visible;\n position: relative;\n user-select: ", ";\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: ", ";\n min-width: 0;\n overflow: visible;\n position: relative;\n user-select: ", ";\n\n &:hover {\n background: ", ";\n }\n"])), function (props) {
189
- if (props.$isInTimeDragRange)
190
- return props.theme.ui_cpnt_sheet_base;
191
- if (props.$isDragOver)
192
- return props.theme.ui_cpnt_sheet_base;
193
- return 'transparent';
194
- }, function (_a) {
104
+ var S_TimeSlot = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: default;\n min-width: 0;\n overflow: visible;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n cursor: default;\n min-width: 0;\n overflow: visible;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_cpnt_sheet_base : 'transparent'); }, function (_a) {
195
105
  var theme = _a.theme;
196
106
  return theme.ui_cpnt_divider;
197
107
  }, function (_a) {
198
108
  var theme = _a.theme;
199
109
  return theme.ui_cpnt_divider;
200
- }, function (props) { return (props.$isTimeDragging ? 'grabbing' : 'default'); }, function (props) { return (props.$isTimeDragging ? 'none' : 'auto'); }, function (_a) {
110
+ }, function (_a) {
201
111
  var theme = _a.theme;
202
112
  return theme.ui_cpnt_sheet_base;
203
113
  });
@@ -1,12 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.toUTC = exports.getHeaderText = exports.calculateDateRange = exports.calculateIsAllDay = void 0;
7
- var i18n_1 = __importDefault(require("../../../common/services/i18n"));
8
4
  var dateHelper_1 = require("../../../common/utils/dateHelper");
9
- var constants_1 = require("./constants");
10
5
  /**
11
6
  * 일정이 종일 일정인지 확인하는 함수
12
7
  * @param startDate 시작 날짜
@@ -27,16 +22,16 @@ var calculateIsAllDay = function (startDate, endDate) {
27
22
  exports.calculateIsAllDay = calculateIsAllDay;
28
23
  var calculateDateRange = function (viewType, baseDate) {
29
24
  switch (viewType) {
30
- case 'str_fm_day':
25
+ case 'DAILY':
31
26
  return { startDate: baseDate, endDate: baseDate };
32
- case 'str_fm_week': {
27
+ case 'WEEKLY': {
33
28
  var start = new Date(baseDate);
34
29
  start.setDate(baseDate.getDate() - baseDate.getDay());
35
30
  var end = new Date(start);
36
31
  end.setDate(start.getDate() + 6);
37
32
  return { startDate: start, endDate: end };
38
33
  }
39
- case 'str_fm_month': {
34
+ case 'MONTHLY': {
40
35
  var startDate = new Date(baseDate.getFullYear(), baseDate.getMonth(), 1);
41
36
  // 실제 MonthlyView에서 보여지는 날짜 배열을 구함
42
37
  var days = dateHelper_1.DateHelper.getCalendarDatesForCalendar(startDate, 'sunday');
@@ -45,7 +40,7 @@ var calculateDateRange = function (viewType, baseDate) {
45
40
  endDate: days[days.length - 1]
46
41
  };
47
42
  }
48
- case 'str_fm_year':
43
+ case 'YEARLY':
49
44
  return {
50
45
  startDate: new Date(baseDate.getFullYear(), 0, 1),
51
46
  endDate: new Date(baseDate.getFullYear(), 11, 31)
@@ -68,21 +63,16 @@ var getHeaderText = function (viewType, selectedDate, t) {
68
63
  var year = selectedDate.getFullYear();
69
64
  var monthNumber = selectedDate.getMonth() + 1;
70
65
  var day = selectedDate.getDate();
71
- var locale = (0, constants_1.getLocaleFromLang)(i18n_1.default.language);
72
- // For English locale, use month names instead of numbers for WEEKLY and MONTHLY views
73
- var monthValue = locale === 'en-US' && (viewType === 'str_fm_week' || viewType === 'str_fm_month')
74
- ? t("calendar_month_".concat(monthNumber))
75
- : monthNumber;
76
- if (viewType === 'str_fm_day') {
66
+ if (viewType === 'DAILY') {
77
67
  return t('str_calendar_daily_header', { year: year, month: monthNumber, day: day });
78
68
  }
79
- if (viewType === 'str_fm_week') {
80
- return t('str_calendar_weekly_header', { year: year, month: monthValue });
69
+ if (viewType === 'WEEKLY') {
70
+ return t('str_calendar_weekly_header', { year: year, month: monthNumber });
81
71
  }
82
- if (viewType === 'str_fm_month') {
83
- return t('str_calendar_monthly_header', { year: year, month: monthValue });
72
+ if (viewType === 'MONTHLY') {
73
+ return t('str_calendar_monthly_header', { year: year, month: monthNumber });
84
74
  }
85
- if (viewType === 'str_fm_year') {
75
+ if (viewType === 'YEARLY') {
86
76
  return t('str_calendar_yearly_header', { year: year });
87
77
  }
88
78
  return '';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- export type CalendarViewType = 'str_fm_month' | 'str_fm_week' | 'str_fm_day' | 'str_fm_year';
2
+ export type CalendarViewType = 'MONTHLY' | 'WEEKLY' | 'DAILY' | 'YEARLY';
3
3
  export type displayAllDayScheduleMode = 'none' | 'use';
4
4
  export type StartOfWeek = 'sunday' | 'monday';
5
5
  export type TodayBtnMode = 'none' | 'use';
6
- export type ActionType = 'CLICK' | 'CLICK_WITH_SHIFT_KEY_DOWN' | 'DELETE_KEY_DOWN' | 'DRAG';
6
+ export type ActionType = 'CLICK' | 'CLICK_WITH_SHIFT_KEY_DOWN' | 'DELETE_KEY_DOWN' | 'DRAG' | 'DOUBLE_CLICK';
7
7
  export type TargetType = 'SCHEDULE' | 'DATE';
8
8
  export type Action = {
9
9
  action: ActionType;
@@ -40,8 +40,8 @@ export type CalendarAction = {
40
40
  };
41
41
  };
42
42
  export type CalendarProps = {
43
- defaultViewType?: CalendarViewType;
44
- viewTypes?: CalendarViewType[];
43
+ defaultViewType?: CalendarViewType | 'str_fm_month' | 'str_fm_week' | 'str_fm_day' | 'str_fm_year';
44
+ viewTypes?: (CalendarViewType | 'str_fm_month' | 'str_fm_week' | 'str_fm_day' | 'str_fm_year')[];
45
45
  displayAllDayScheduleMode?: displayAllDayScheduleMode;
46
46
  startOfWeek?: StartOfWeek;
47
47
  todayBtnMode?: TodayBtnMode;
@@ -59,7 +59,3 @@ export type EventItemProps = {
59
59
  onDoubleClick: (schedule: Schedule) => void;
60
60
  isSelected?: boolean;
61
61
  };
62
- export type TimeSelection = {
63
- date: Date;
64
- hour: number;
65
- };
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ export interface ImageUploadResult {
3
+ location?: string;
4
+ error?: unknown;
5
+ }
6
+ export type ImageUploadHandler = (file: File) => Promise<ImageUploadResult>;
7
+ /**
8
+ * NOTE
9
+ * toolbar에 사용하고싶은 옵션들을 배열 내부에 차례대로 작성해줍니다.
10
+ * toolbar 옵션은 아래 링크를 참고해주세요.
11
+ * https://www.tiny.cloud/docs/configure/editor-appearance/#toolbar
12
+ * ex) 'undo | redo' => ['undo', 'redo']
13
+ */
14
+ export type RichTextEditorProps = {
15
+ toolbar: string[];
16
+ defaultText?: string;
17
+ hintText?: string;
18
+ requirementMode?: 'none' | 'use';
19
+ maxLength?: number;
20
+ minLength?: number;
21
+ maxFileSize?: number;
22
+ lengthValidationText?: string;
23
+ requiredValidationText?: string;
24
+ fileSizeValidationText?: string;
25
+ height?: string | number;
26
+ tinymceScriptSrc?: string;
27
+ onChange?: (value: string) => void;
28
+ onBlur?: (value: string, count: number) => void;
29
+ onCountCharacter?: (count: number) => void;
30
+ onImageUpload?: ImageUploadHandler;
31
+ isLoadingUsed?: boolean;
32
+ };
33
+ declare function RichTextEditor({ toolbar, defaultText, hintText, maxLength, minLength, maxFileSize, requirementMode, lengthValidationText, requiredValidationText, fileSizeValidationText, height, tinymceScriptSrc, onChange, onBlur, onCountCharacter, onImageUpload, isLoadingUsed }: RichTextEditorProps): JSX.Element;
34
+ export default RichTextEditor;
@@ -0,0 +1,268 @@
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
30
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
31
+ return new (P || (P = Promise))(function (resolve, reject) {
32
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
33
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
34
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
35
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
36
+ });
37
+ };
38
+ var __generator = (this && this.__generator) || function (thisArg, body) {
39
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
40
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
41
+ function verb(n) { return function (v) { return step([n, v]); }; }
42
+ function step(op) {
43
+ if (f) throw new TypeError("Generator is already executing.");
44
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
45
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
46
+ if (y = 0, t) op = [op[0] & 2, t.value];
47
+ switch (op[0]) {
48
+ case 0: case 1: t = op; break;
49
+ case 4: _.label++; return { value: op[1], done: false };
50
+ case 5: _.label++; y = op[1]; op = [0]; continue;
51
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
52
+ default:
53
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
54
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
55
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
56
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
57
+ if (t[2]) _.ops.pop();
58
+ _.trys.pop(); continue;
59
+ }
60
+ op = body.call(thisArg, _);
61
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
62
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
63
+ }
64
+ };
65
+ Object.defineProperty(exports, "__esModule", { value: true });
66
+ var jsx_runtime_1 = require("react/jsx-runtime");
67
+ /* eslint-disable prefer-promise-reject-errors */
68
+ var tinymce_react_1 = require("@tinymce/tinymce-react");
69
+ var react_1 = require("react");
70
+ var react_i18next_1 = require("react-i18next");
71
+ var uuid_1 = require("uuid");
72
+ var components_1 = require("../../../common/components");
73
+ var styled_components_1 = __importStar(require("styled-components"));
74
+ var DesktopAlertDialog_1 = require("../DesktopAlertDialog");
75
+ function RichTextEditor(_a) {
76
+ var _this = this;
77
+ var _b;
78
+ var toolbar = _a.toolbar, defaultText = _a.defaultText, hintText = _a.hintText, maxLength = _a.maxLength, minLength = _a.minLength, maxFileSize = _a.maxFileSize, _c = _a.requirementMode, requirementMode = _c === void 0 ? 'none' : _c, lengthValidationText = _a.lengthValidationText, requiredValidationText = _a.requiredValidationText, fileSizeValidationText = _a.fileSizeValidationText, _d = _a.height, height = _d === void 0 ? 600 : _d, _e = _a.tinymceScriptSrc, tinymceScriptSrc = _e === void 0 ? '/tinymce/tinymce.min.js' : _e, onChange = _a.onChange, onBlur = _a.onBlur, onCountCharacter = _a.onCountCharacter, onImageUpload = _a.onImageUpload, _f = _a.isLoadingUsed, isLoadingUsed = _f === void 0 ? true : _f;
79
+ var t = (0, react_i18next_1.useTranslation)('translation').t;
80
+ var _g = (0, react_1.useState)(0), count = _g[0], setCount = _g[1];
81
+ var _h = (0, react_1.useState)(true), isEditorLoading = _h[0], setIsEditorLoading = _h[1];
82
+ var _j = (0, react_1.useState)(false), isFileValidationAlertDialogOpen = _j[0], setIsFilValidationAlertDialogOpen = _j[1];
83
+ var editorRef = (0, react_1.useRef)(null);
84
+ var isEditorDirty = (0, react_1.useRef)(false);
85
+ var editorContent = (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.getContent();
86
+ var theme = (0, styled_components_1.useTheme)();
87
+ var useDarkMode = theme.mode === 'dark';
88
+ var validationText = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
89
+ (0, react_1.useEffect)(function () {
90
+ if (defaultText && defaultText.length === 0) {
91
+ setCount(defaultText.length);
92
+ }
93
+ }, [defaultText]);
94
+ var handleInit = function (evt, editor) {
95
+ if (isLoadingUsed) {
96
+ setIsEditorLoading(false);
97
+ }
98
+ editorRef.current = editor;
99
+ var isSourceCodeToolActive = toolbar.some(function (group) {
100
+ var tools = group.split(' ');
101
+ return tools.includes('code');
102
+ });
103
+ if (isSourceCodeToolActive) {
104
+ var container = editor.getContainer();
105
+ var sourceCodeButton = container.querySelector('[aria-label="Source code"]');
106
+ if (sourceCodeButton instanceof HTMLElement) {
107
+ sourceCodeButton.style.width = 'fit-content';
108
+ sourceCodeButton.style.display = 'flex';
109
+ sourceCodeButton.style.alignItems = 'center';
110
+ var textElement = document.createElement('span');
111
+ textElement.innerHTML = 'HTML';
112
+ textElement.style.fontWeight = 'bold';
113
+ sourceCodeButton.append(textElement);
114
+ }
115
+ }
116
+ };
117
+ var handleEditorValueChange = function (value, editor) {
118
+ var wordCount = editor.plugins.wordcount;
119
+ if (wordCount) {
120
+ var charCount = wordCount.body.getCharacterCount();
121
+ onCountCharacter === null || onCountCharacter === void 0 ? void 0 : onCountCharacter(charCount);
122
+ setCount(charCount);
123
+ }
124
+ isEditorDirty.current = true;
125
+ onChange === null || onChange === void 0 ? void 0 : onChange(value);
126
+ };
127
+ var handleEditorBlur = function () {
128
+ var _a, _b;
129
+ var editorContent = (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.getContent();
130
+ var wordCount = (_b = editorRef.current) === null || _b === void 0 ? void 0 : _b.plugins.wordcount;
131
+ if (editorContent && onBlur) {
132
+ onBlur(editorContent, (wordCount === null || wordCount === void 0 ? void 0 : wordCount.body.getCharacterCount()) || 0);
133
+ }
134
+ };
135
+ var handleFileChangeByFilePicker = function (cb) {
136
+ var input = document.createElement('input');
137
+ input.setAttribute('type', 'file');
138
+ input.setAttribute('accept', 'image/*');
139
+ input.addEventListener('change', function () { return __awaiter(_this, void 0, void 0, function () {
140
+ var file, result, error_1;
141
+ return __generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0:
144
+ file = input === null || input === void 0 ? void 0 : input.files[0];
145
+ if (!file)
146
+ return [2 /*return*/];
147
+ if (maxFileSize && file.size > maxFileSize * 1024 * 1024) {
148
+ setIsFilValidationAlertDialogOpen(true);
149
+ return [2 /*return*/];
150
+ }
151
+ if (!onImageUpload) return [3 /*break*/, 4];
152
+ _a.label = 1;
153
+ case 1:
154
+ _a.trys.push([1, 3, , 4]);
155
+ return [4 /*yield*/, onImageUpload(file)];
156
+ case 2:
157
+ result = _a.sent();
158
+ if (result.location) {
159
+ cb(result.location, { title: file.name, alt: 'image' });
160
+ }
161
+ return [3 /*break*/, 4];
162
+ case 3:
163
+ error_1 = _a.sent();
164
+ return [2 /*return*/, Promise.reject(new Error('Request failed'))];
165
+ case 4: return [2 /*return*/];
166
+ }
167
+ });
168
+ }); });
169
+ input.click();
170
+ };
171
+ var handleUploadImageByDragAndDrop = function (blobInfo) { return __awaiter(_this, void 0, void 0, function () {
172
+ var convertedFile, result, error_2;
173
+ return __generator(this, function (_a) {
174
+ switch (_a.label) {
175
+ case 0:
176
+ if (maxFileSize && blobInfo.blob().size > maxFileSize * 1024 * 1024) {
177
+ setIsFilValidationAlertDialogOpen(true);
178
+ return [2 /*return*/, Promise.reject({ remove: true })];
179
+ }
180
+ if (blobInfo.blobUri().startsWith('blob')) {
181
+ convertedFile = new File([blobInfo.blob()], (0, uuid_1.v4)());
182
+ }
183
+ if (!(convertedFile && onImageUpload)) return [3 /*break*/, 5];
184
+ _a.label = 1;
185
+ case 1:
186
+ _a.trys.push([1, 3, , 4]);
187
+ return [4 /*yield*/, onImageUpload(convertedFile)];
188
+ case 2:
189
+ result = _a.sent();
190
+ if (result.location) {
191
+ return [2 /*return*/, Promise.resolve(result.location)];
192
+ }
193
+ return [2 /*return*/, Promise.reject({ remove: true })];
194
+ case 3:
195
+ error_2 = _a.sent();
196
+ return [2 /*return*/, Promise.reject({ remove: true })];
197
+ case 4: return [3 /*break*/, 6];
198
+ case 5: return [2 /*return*/, Promise.reject({ remove: true })];
199
+ case 6: return [2 /*return*/];
200
+ }
201
+ });
202
+ }); };
203
+ if (requirementMode === 'use' &&
204
+ isEditorDirty.current &&
205
+ (!editorContent || editorContent.length === 0)) {
206
+ validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: requiredValidationText });
207
+ }
208
+ if (minLength && count > 0 && count < minLength) {
209
+ validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
210
+ }
211
+ if (maxLength && count > 0 && count > maxLength) {
212
+ validationText = (0, jsx_runtime_1.jsx)(S_Error, { children: lengthValidationText });
213
+ }
214
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(S_Editor, { children: [isEditorLoading && isLoadingUsed && ((0, jsx_runtime_1.jsx)(S_LoadingWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.CircularProgress, {}) })), (0, jsx_runtime_1.jsx)(tinymce_react_1.Editor, { tinymceScriptSrc: tinymceScriptSrc, onInit: handleInit, onEditorChange: handleEditorValueChange, initialValue: defaultText, init: {
215
+ menubar: false,
216
+ promotion: false,
217
+ branding: false,
218
+ elementpath: false,
219
+ plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap emoticons',
220
+ editimage_cors_hosts: ['picsum.photos'],
221
+ toolbar: toolbar.join(' | '),
222
+ toolbar_sticky: false,
223
+ toolbar_sticky_offset: 108,
224
+ autosave_ask_before_unload: true,
225
+ placeholder: hintText,
226
+ autosave_interval: '30s',
227
+ autosave_prefix: '{path}{query}-{id}-',
228
+ autosave_restore_when_empty: false,
229
+ autosave_retention: '2m',
230
+ image_advtab: false,
231
+ image_title: true,
232
+ file_picker_types: 'image',
233
+ importcss_append: true,
234
+ file_picker_callback: handleFileChangeByFilePicker,
235
+ images_upload_handler: handleUploadImageByDragAndDrop,
236
+ height: height,
237
+ image_caption: true,
238
+ noneditable_class: 'mceNonEditable',
239
+ toolbar_mode: 'wrap',
240
+ skin: useDarkMode ? 'oxide-dark' : 'oxide',
241
+ content_css: useDarkMode ? 'dark' : 'default',
242
+ indent: false,
243
+ content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px } img { height: auto; max-width: 100%; } p, div { overflow: hidden; } pre { white-space: pre-wrap; }',
244
+ setup: function (editor) {
245
+ editor.on('blur', handleEditorBlur);
246
+ }
247
+ } }), validationText] }), isFileValidationAlertDialogOpen && ((0, jsx_runtime_1.jsx)(DesktopAlertDialog_1.DesktopAlertDialog, { contentText: fileSizeValidationText, tBtn1Text: t('str_confirm'), onClickTBtn1: function () { return setIsFilValidationAlertDialogOpen(false); } }))] }));
248
+ }
249
+ var S_Editor = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-height: 500px;\n position: relative;\n\n .tox-statusbar__wordcount {\n visibility: hidden;\n }\n"], ["\n min-height: 500px;\n position: relative;\n\n .tox-statusbar__wordcount {\n visibility: hidden;\n }\n"])));
250
+ var S_LoadingWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1000;\n"], ["\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translate(-50%, -50%);\n z-index: 1000;\n"])));
251
+ var S_Error = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n"])), function (_a) {
252
+ var theme = _a.theme;
253
+ return theme.ui_cpnt_textfield_text_error;
254
+ }, function (_a) {
255
+ var theme = _a.theme;
256
+ return theme.desktopFontSize.caption2;
257
+ }, function (_a) {
258
+ var theme = _a.theme;
259
+ return theme.fontWeight.normal;
260
+ }, function (_a) {
261
+ var theme = _a.theme;
262
+ return theme.desktopLineHeight.caption2;
263
+ }, function (_a) {
264
+ var theme = _a.theme;
265
+ return theme.spacing.spacingA;
266
+ });
267
+ exports.default = RichTextEditor;
268
+ var templateObject_1, templateObject_2, templateObject_3;
@@ -0,0 +1,2 @@
1
+ export { default as RichTextEditor } from './RichTextEditor';
2
+ export type { RichTextEditorProps, ImageUploadHandler, ImageUploadResult } from './RichTextEditor';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RichTextEditor = void 0;
7
+ var RichTextEditor_1 = require("./RichTextEditor");
8
+ Object.defineProperty(exports, "RichTextEditor", { enumerable: true, get: function () { return __importDefault(RichTextEditor_1).default; } });
@@ -37,6 +37,7 @@ import { PriceTextField } from './PriceTextField';
37
37
  import { PriceTextLabel } from './PriceTextLabel';
38
38
  import { Radio } from './Radio';
39
39
  import { ReactionButton } from './ReactionButton';
40
+ import { RichTextEditor } from './RichTextEditor';
40
41
  import { SegmentedButtonGroup } from './SegmentedButtonGroup';
41
42
  import { Select } from './Select';
42
43
  import { Slider } from './Slider';
@@ -51,4 +52,4 @@ import { UploadTextButton } from './UploadTextButton';
51
52
  import { UserDesktopNavBar } from './UserDesktopNavBar';
52
53
  import { UserDesktopSideTab } from './UserDesktopSideTab';
53
54
  import { UserDesktopTabBar } from './UserDesktopTabBar';
54
- export { AdminList, AdminListHeader, AdminListItem, BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, DesktopAlertDialog, DesktopHeaderBar, DesktopTabBar, Dropdown, DynamicDesktopNavBar, DynamicDesktopNavBarTemplates, EditApplyTextField, FilterBar, FloatingActionButton, Hero, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, PageTitleTextGroup, PriceTextField, Radio, ReactionButton, SegmentedButtonGroup, Select, Slider, Snackbar, StatusBlock, TextButton, TextField, TextLabel, PriceTextLabel, UploadIconButton, UploadMainButton, UploadTextButton, UserDesktopNavBar, UserDesktopTabBar, UserDesktopSideTab, Calendar };
55
+ export { AdminList, AdminListHeader, AdminListItem, BasicButtonGroup, BasicChatListItem, BasicFormGroup, BasicList, BasicListItem, BlogTextField, BodyTextGroup, BoxItem, Card, CardList, ChatBubbleListItem, ChatList, Checkbox, Chip, ContextMenu, ContextMenuItem, DesktopAlertDialog, DesktopHeaderBar, DesktopTabBar, Dropdown, DynamicDesktopNavBar, DynamicDesktopNavBarTemplates, EditApplyTextField, FilterBar, FloatingActionButton, Hero, HorizontalFormGroup, IconButton, ImageSlide, LottieReactionButton, MainButton, PageTitleTextGroup, PriceTextField, Radio, ReactionButton, RichTextEditor, SegmentedButtonGroup, Select, Slider, Snackbar, StatusBlock, TextButton, TextField, TextLabel, PriceTextLabel, UploadIconButton, UploadMainButton, UploadTextButton, UserDesktopNavBar, UserDesktopTabBar, UserDesktopSideTab, Calendar };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UploadTextButton = exports.UploadMainButton = exports.UploadIconButton = exports.PriceTextLabel = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.Snackbar = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.ReactionButton = exports.Radio = exports.PriceTextField = exports.PageTitleTextGroup = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.Hero = exports.FloatingActionButton = exports.FilterBar = exports.EditApplyTextField = exports.DynamicDesktopNavBarTemplates = exports.DynamicDesktopNavBar = exports.Dropdown = exports.DesktopTabBar = exports.DesktopHeaderBar = exports.DesktopAlertDialog = exports.ContextMenuItem = exports.ContextMenu = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BoxItem = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = exports.AdminListItem = exports.AdminListHeader = exports.AdminList = void 0;
4
- exports.Calendar = exports.UserDesktopSideTab = exports.UserDesktopTabBar = exports.UserDesktopNavBar = void 0;
3
+ exports.UploadMainButton = exports.UploadIconButton = exports.PriceTextLabel = exports.TextLabel = exports.TextField = exports.TextButton = exports.StatusBlock = exports.Snackbar = exports.Slider = exports.Select = exports.SegmentedButtonGroup = exports.RichTextEditor = exports.ReactionButton = exports.Radio = exports.PriceTextField = exports.PageTitleTextGroup = exports.MainButton = exports.LottieReactionButton = exports.ImageSlide = exports.IconButton = exports.HorizontalFormGroup = exports.Hero = exports.FloatingActionButton = exports.FilterBar = exports.EditApplyTextField = exports.DynamicDesktopNavBarTemplates = exports.DynamicDesktopNavBar = exports.Dropdown = exports.DesktopTabBar = exports.DesktopHeaderBar = exports.DesktopAlertDialog = exports.ContextMenuItem = exports.ContextMenu = exports.Chip = exports.Checkbox = exports.ChatList = exports.ChatBubbleListItem = exports.CardList = exports.Card = exports.BoxItem = exports.BodyTextGroup = exports.BlogTextField = exports.BasicListItem = exports.BasicList = exports.BasicFormGroup = exports.BasicChatListItem = exports.BasicButtonGroup = exports.AdminListItem = exports.AdminListHeader = exports.AdminList = void 0;
4
+ exports.Calendar = exports.UserDesktopSideTab = exports.UserDesktopTabBar = exports.UserDesktopNavBar = exports.UploadTextButton = void 0;
5
5
  var AdminList_1 = require("./AdminList");
6
6
  Object.defineProperty(exports, "AdminList", { enumerable: true, get: function () { return AdminList_1.AdminList; } });
7
7
  var AdminListHeader_1 = require("./AdminListHeader");
@@ -81,6 +81,8 @@ var Radio_1 = require("./Radio");
81
81
  Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
82
82
  var ReactionButton_1 = require("./ReactionButton");
83
83
  Object.defineProperty(exports, "ReactionButton", { enumerable: true, get: function () { return ReactionButton_1.ReactionButton; } });
84
+ var RichTextEditor_1 = require("./RichTextEditor");
85
+ Object.defineProperty(exports, "RichTextEditor", { enumerable: true, get: function () { return RichTextEditor_1.RichTextEditor; } });
84
86
  var SegmentedButtonGroup_1 = require("./SegmentedButtonGroup");
85
87
  Object.defineProperty(exports, "SegmentedButtonGroup", { enumerable: true, get: function () { return SegmentedButtonGroup_1.SegmentedButtonGroup; } });
86
88
  var Select_1 = require("./Select");
@@ -8,5 +8,5 @@ export { ContainersBox as WSContainersBox } from './layout/LayoutWS/ContainersBo
8
8
  export { LayoutWT } from './layout/LayoutWT';
9
9
  export { GlobalMenuContainer as WTGlobalMenuContainer } from './layout/LayoutWT/Containers';
10
10
  export { ContainersBox as WTContainersBox } from './layout/LayoutWT/ContainersBox';
11
- export { AdminList as D_AdminList, AdminListHeader as D_AdminListHeader, AdminListItem as D_AdminListItem, BasicButtonGroup as D_BasicButtonGroup, BasicChatListItem as D_BasicChatListItem, BasicFormGroup as D_BasicFormGroup, BasicList as D_BasicList, BasicListItem as D_BasicListItem, BlogTextField as D_BlogTextField, BodyTextGroup as D_BodyTextGroup, BoxItem as D_BoxItem, Card as D_Card, CardList as D_CardList, ChatBubbleListItem as D_ChatBubbleListItem, ChatList as D_ChatList, Checkbox as D_Checkbox, Chip as D_Chip, ContextMenu as D_ContextMenu, ContextMenuItem as D_ContextMenuItem, DesktopAlertDialog as D_DesktopAlertDialog, DesktopHeaderBar as D_DesktopHeaderBar, DesktopTabBar as D_DesktopTabBar, Dropdown as D_Dropdown, DynamicDesktopNavBar as D_DynamicDesktopNavBar, DynamicDesktopNavBarTemplates as D_DynamicDesktopNavBarTemplates, EditApplyTextField as D_EditApplyTextField, FilterBar as D_FilterBar, FloatingActionButton as D_FloatingActionButton, Hero as D_Hero, HorizontalFormGroup as D_HorizontalFormGroup, IconButton as D_IconButton, ImageSlide as D_ImageSlide, LottieReactionButton as D_LottieReactionButton, MainButton as D_MainButton, PageTitleTextGroup as D_PageTitleTextGroup, Radio as D_Radio, ReactionButton as D_ReactionButton, SegmentedButtonGroup as D_SegmentedButtonGroup, Select as D_Select, Slider as D_Slider, Snackbar as D_Snackbar, StatusBlock as D_StatusBlock, TextButton as D_TextButton, PriceTextField as D_PriceTextField, TextField as D_TextField, TextLabel as D_TextLabel, PriceTextLabel as D_PriceTextLabel, UploadIconButton as D_UploadIconButton, UploadMainButton as D_UploadMainButton, UploadTextButton as D_UploadTextButton, UserDesktopNavBar as D_UserDesktopNavBar, UserDesktopTabBar as D_UserDesktopTabBar, UserDesktopSideTab as D_UserDesktopSideTab, Calendar as D_Calendar } from './components';
11
+ export { AdminList as D_AdminList, AdminListHeader as D_AdminListHeader, AdminListItem as D_AdminListItem, BasicButtonGroup as D_BasicButtonGroup, BasicChatListItem as D_BasicChatListItem, BasicFormGroup as D_BasicFormGroup, BasicList as D_BasicList, BasicListItem as D_BasicListItem, BlogTextField as D_BlogTextField, BodyTextGroup as D_BodyTextGroup, BoxItem as D_BoxItem, Card as D_Card, CardList as D_CardList, ChatBubbleListItem as D_ChatBubbleListItem, ChatList as D_ChatList, Checkbox as D_Checkbox, Chip as D_Chip, ContextMenu as D_ContextMenu, ContextMenuItem as D_ContextMenuItem, DesktopAlertDialog as D_DesktopAlertDialog, DesktopHeaderBar as D_DesktopHeaderBar, DesktopTabBar as D_DesktopTabBar, Dropdown as D_Dropdown, DynamicDesktopNavBar as D_DynamicDesktopNavBar, DynamicDesktopNavBarTemplates as D_DynamicDesktopNavBarTemplates, EditApplyTextField as D_EditApplyTextField, FilterBar as D_FilterBar, FloatingActionButton as D_FloatingActionButton, Hero as D_Hero, HorizontalFormGroup as D_HorizontalFormGroup, IconButton as D_IconButton, ImageSlide as D_ImageSlide, LottieReactionButton as D_LottieReactionButton, MainButton as D_MainButton, PageTitleTextGroup as D_PageTitleTextGroup, Radio as D_Radio, ReactionButton as D_ReactionButton, RichTextEditor as D_RichTextEditor, SegmentedButtonGroup as D_SegmentedButtonGroup, Select as D_Select, Slider as D_Slider, Snackbar as D_Snackbar, StatusBlock as D_StatusBlock, TextButton as D_TextButton, PriceTextField as D_PriceTextField, TextField as D_TextField, TextLabel as D_TextLabel, PriceTextLabel as D_PriceTextLabel, UploadIconButton as D_UploadIconButton, UploadMainButton as D_UploadMainButton, UploadTextButton as D_UploadTextButton, UserDesktopNavBar as D_UserDesktopNavBar, UserDesktopTabBar as D_UserDesktopTabBar, UserDesktopSideTab as D_UserDesktopSideTab, Calendar as D_Calendar } from './components';
12
12
  export { AnnotationSheet as D_AnnotationSheet, ContentSheet as D_ContentSheet, DesktopBasicModal as D_DesktopBasicModal, DesktopBasicModalWithTab as D_DesktopBasicModalWithTab, DesktopBasicModalWithTabInfoType, DesktopHeadlessModal as D_DesktopHeadlessModal, DesktopTutorialModal as D_DesktopTutorialModal, DesktopTutorialModalInfoType, SectionSheet as D_SectionSheet } from './panels';