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.
- package/dist/scripts/copy-tinymce.d.ts +1 -0
- package/dist/scripts/copy-tinymce.js +32 -0
- package/dist/src/common/services/i18n/resources/en.json +13 -13
- package/dist/src/common/styles/theme.d.ts +1 -0
- package/dist/src/common/styles/theme.js +1 -1
- package/dist/src/desktop/components/Calendar/Calendar.js +51 -46
- package/dist/src/desktop/components/Calendar/CalendarContext.d.ts +1 -3
- package/dist/src/desktop/components/Calendar/CalendarContext.js +1 -2
- package/dist/src/desktop/components/Calendar/DailyView.d.ts +2 -8
- package/dist/src/desktop/components/Calendar/DailyView.js +5 -86
- package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +1 -2
- package/dist/src/desktop/components/Calendar/MonthlyView.js +6 -81
- package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +0 -3
- package/dist/src/desktop/components/Calendar/WeeklyView.js +6 -96
- package/dist/src/desktop/components/Calendar/calendarUtils.js +10 -20
- package/dist/src/desktop/components/Calendar/types.d.ts +4 -8
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.d.ts +34 -0
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.js +268 -0
- package/dist/src/desktop/components/RichTextEditor/index.d.ts +2 -0
- package/dist/src/desktop/components/RichTextEditor/index.js +8 -0
- package/dist/src/desktop/components/index.d.ts +2 -1
- package/dist/src/desktop/components/index.js +4 -2
- package/dist/src/desktop/index.d.ts +1 -1
- package/dist/src/desktop/index.js +3 -2
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.d.ts +34 -0
- package/dist/src/mobile/components/RichTextEditor/RichTextEditor.js +272 -0
- package/dist/src/mobile/components/RichTextEditor/index.d.ts +2 -0
- package/dist/src/mobile/components/RichTextEditor/index.js +8 -0
- package/dist/src/mobile/components/index.d.ts +2 -1
- package/dist/src/mobile/components/index.js +3 -1
- package/dist/src/mobile/index.d.ts +1 -1
- package/dist/src/mobile/index.js +2 -1
- package/dist/tinymce/CHANGELOG.md +3453 -0
- package/dist/tinymce/README.md +73 -0
- package/dist/tinymce/bower.json +27 -0
- package/dist/tinymce/composer.json +52 -0
- package/dist/tinymce/icons/default/icons.js +194 -0
- package/dist/tinymce/icons/default/icons.min.js +1 -0
- package/dist/tinymce/icons/default/index.js +7 -0
- package/dist/tinymce/license.txt +21 -0
- package/dist/tinymce/models/dom/index.js +7 -0
- package/dist/tinymce/models/dom/model.js +8040 -0
- package/dist/tinymce/models/dom/model.min.js +1 -0
- package/dist/tinymce/notices.txt +21 -0
- package/dist/tinymce/package.json +32 -0
- package/dist/tinymce/plugins/accordion/index.js +7 -0
- package/dist/tinymce/plugins/accordion/plugin.js +1054 -0
- package/dist/tinymce/plugins/accordion/plugin.min.js +5 -0
- package/dist/tinymce/plugins/advlist/index.js +7 -0
- package/dist/tinymce/plugins/advlist/plugin.js +259 -0
- package/dist/tinymce/plugins/advlist/plugin.min.js +5 -0
- package/dist/tinymce/plugins/anchor/index.js +7 -0
- package/dist/tinymce/plugins/anchor/plugin.js +214 -0
- package/dist/tinymce/plugins/anchor/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autolink/index.js +7 -0
- package/dist/tinymce/plugins/autolink/plugin.js +228 -0
- package/dist/tinymce/plugins/autolink/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autoresize/index.js +7 -0
- package/dist/tinymce/plugins/autoresize/plugin.js +192 -0
- package/dist/tinymce/plugins/autoresize/plugin.min.js +5 -0
- package/dist/tinymce/plugins/autosave/index.js +7 -0
- package/dist/tinymce/plugins/autosave/plugin.js +233 -0
- package/dist/tinymce/plugins/autosave/plugin.min.js +5 -0
- package/dist/tinymce/plugins/charmap/index.js +7 -0
- package/dist/tinymce/plugins/charmap/plugin.js +1658 -0
- package/dist/tinymce/plugins/charmap/plugin.min.js +5 -0
- package/dist/tinymce/plugins/code/index.js +7 -0
- package/dist/tinymce/plugins/code/plugin.js +85 -0
- package/dist/tinymce/plugins/code/plugin.min.js +5 -0
- package/dist/tinymce/plugins/codesample/index.js +7 -0
- package/dist/tinymce/plugins/codesample/plugin.js +2471 -0
- package/dist/tinymce/plugins/codesample/plugin.min.js +13 -0
- package/dist/tinymce/plugins/directionality/index.js +7 -0
- package/dist/tinymce/plugins/directionality/plugin.js +395 -0
- package/dist/tinymce/plugins/directionality/plugin.min.js +5 -0
- package/dist/tinymce/plugins/emoticons/index.js +7 -0
- package/dist/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/dist/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
- package/dist/tinymce/plugins/emoticons/plugin.js +595 -0
- package/dist/tinymce/plugins/emoticons/plugin.min.js +5 -0
- package/dist/tinymce/plugins/fullscreen/index.js +7 -0
- package/dist/tinymce/plugins/fullscreen/plugin.js +1249 -0
- package/dist/tinymce/plugins/fullscreen/plugin.min.js +5 -0
- package/dist/tinymce/plugins/help/index.js +7 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/dist/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/dist/tinymce/plugins/help/plugin.js +898 -0
- package/dist/tinymce/plugins/help/plugin.min.js +5 -0
- package/dist/tinymce/plugins/image/index.js +7 -0
- package/dist/tinymce/plugins/image/plugin.js +1505 -0
- package/dist/tinymce/plugins/image/plugin.min.js +5 -0
- package/dist/tinymce/plugins/importcss/index.js +7 -0
- package/dist/tinymce/plugins/importcss/plugin.js +344 -0
- package/dist/tinymce/plugins/importcss/plugin.min.js +5 -0
- package/dist/tinymce/plugins/insertdatetime/index.js +7 -0
- package/dist/tinymce/plugins/insertdatetime/plugin.js +187 -0
- package/dist/tinymce/plugins/insertdatetime/plugin.min.js +5 -0
- package/dist/tinymce/plugins/link/index.js +7 -0
- package/dist/tinymce/plugins/link/plugin.js +1242 -0
- package/dist/tinymce/plugins/link/plugin.min.js +5 -0
- package/dist/tinymce/plugins/lists/index.js +7 -0
- package/dist/tinymce/plugins/lists/plugin.js +2172 -0
- package/dist/tinymce/plugins/lists/plugin.min.js +5 -0
- package/dist/tinymce/plugins/media/index.js +7 -0
- package/dist/tinymce/plugins/media/plugin.js +1217 -0
- package/dist/tinymce/plugins/media/plugin.min.js +5 -0
- package/dist/tinymce/plugins/nonbreaking/index.js +7 -0
- package/dist/tinymce/plugins/nonbreaking/plugin.js +123 -0
- package/dist/tinymce/plugins/nonbreaking/plugin.min.js +5 -0
- package/dist/tinymce/plugins/pagebreak/index.js +7 -0
- package/dist/tinymce/plugins/pagebreak/plugin.js +117 -0
- package/dist/tinymce/plugins/pagebreak/plugin.min.js +5 -0
- package/dist/tinymce/plugins/preview/index.js +7 -0
- package/dist/tinymce/plugins/preview/plugin.js +97 -0
- package/dist/tinymce/plugins/preview/plugin.min.js +5 -0
- package/dist/tinymce/plugins/quickbars/index.js +7 -0
- package/dist/tinymce/plugins/quickbars/plugin.js +447 -0
- package/dist/tinymce/plugins/quickbars/plugin.min.js +5 -0
- package/dist/tinymce/plugins/save/index.js +7 -0
- package/dist/tinymce/plugins/save/plugin.js +118 -0
- package/dist/tinymce/plugins/save/plugin.min.js +5 -0
- package/dist/tinymce/plugins/searchreplace/index.js +7 -0
- package/dist/tinymce/plugins/searchreplace/plugin.js +1093 -0
- package/dist/tinymce/plugins/searchreplace/plugin.min.js +5 -0
- package/dist/tinymce/plugins/table/index.js +7 -0
- package/dist/tinymce/plugins/table/plugin.js +3462 -0
- package/dist/tinymce/plugins/table/plugin.min.js +5 -0
- package/dist/tinymce/plugins/template/index.js +7 -0
- package/dist/tinymce/plugins/template/plugin.js +567 -0
- package/dist/tinymce/plugins/template/plugin.min.js +5 -0
- package/dist/tinymce/plugins/visualblocks/index.js +7 -0
- package/dist/tinymce/plugins/visualblocks/plugin.js +98 -0
- package/dist/tinymce/plugins/visualblocks/plugin.min.js +5 -0
- package/dist/tinymce/plugins/visualchars/index.js +7 -0
- package/dist/tinymce/plugins/visualchars/plugin.js +560 -0
- package/dist/tinymce/plugins/visualchars/plugin.min.js +5 -0
- package/dist/tinymce/plugins/wordcount/index.js +7 -0
- package/dist/tinymce/plugins/wordcount/plugin.js +405 -0
- package/dist/tinymce/plugins/wordcount/plugin.min.js +5 -0
- package/dist/tinymce/skins/content/dark/content.css +79 -0
- package/dist/tinymce/skins/content/dark/content.js +15 -0
- package/dist/tinymce/skins/content/dark/content.min.css +14 -0
- package/dist/tinymce/skins/content/default/content.css +74 -0
- package/dist/tinymce/skins/content/default/content.js +15 -0
- package/dist/tinymce/skins/content/default/content.min.css +14 -0
- package/dist/tinymce/skins/content/document/content.css +79 -0
- package/dist/tinymce/skins/content/document/content.js +15 -0
- package/dist/tinymce/skins/content/document/content.min.css +14 -0
- package/dist/tinymce/skins/content/tinymce-5/content.css +74 -0
- package/dist/tinymce/skins/content/tinymce-5/content.js +15 -0
- package/dist/tinymce/skins/content/tinymce-5/content.min.css +14 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.css +79 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.js +15 -0
- package/dist/tinymce/skins/content/tinymce-5-dark/content.min.css +14 -0
- package/dist/tinymce/skins/content/writer/content.css +75 -0
- package/dist/tinymce/skins/content/writer/content.js +15 -0
- package/dist/tinymce/skins/content/writer/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/content.css +798 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/oxide/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/content.js +15 -0
- package/dist/tinymce/skins/ui/oxide/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide/skin.css +3763 -0
- package/dist/tinymce/skins/ui/oxide/skin.js +2 -0
- package/dist/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.css +779 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.js +15 -0
- package/dist/tinymce/skins/ui/oxide-dark/content.min.css +14 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.css +798 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5/content.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.css +3857 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.css +779 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.css +792 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.js +15 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/content.min.css +14 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.css +3857 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/dist/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/dist/tinymce/themes/silver/index.js +7 -0
- package/dist/tinymce/themes/silver/theme.js +30775 -0
- package/dist/tinymce/themes/silver/theme.min.js +1 -0
- package/dist/tinymce/tinymce.d.ts +3238 -0
- package/dist/tinymce/tinymce.js +31779 -0
- package/dist/tinymce/tinymce.min.js +11 -0
- package/package.json +7 -2
- package/scripts/copy-tinymce.js +37 -0
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
2
|
+
var fs = require('fs');
|
3
|
+
var path = require('path');
|
4
|
+
var sourceDir = path.join(__dirname, '../node_modules/tinymce');
|
5
|
+
var targetDir = path.join(__dirname, '../dist/tinymce');
|
6
|
+
function copyDir(src, dest) {
|
7
|
+
if (!fs.existsSync(dest)) {
|
8
|
+
fs.mkdirSync(dest, { recursive: true });
|
9
|
+
}
|
10
|
+
var items = fs.readdirSync(src);
|
11
|
+
items.forEach(function (item) {
|
12
|
+
var srcPath = path.join(src, item);
|
13
|
+
var destPath = path.join(dest, item);
|
14
|
+
if (fs.statSync(srcPath).isDirectory()) {
|
15
|
+
copyDir(srcPath, destPath);
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
fs.copyFileSync(srcPath, destPath);
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
console.log('Copying TinyMCE static files to dist...');
|
23
|
+
if (fs.existsSync(sourceDir)) {
|
24
|
+
copyDir(sourceDir, targetDir);
|
25
|
+
console.log('TinyMCE static files copied successfully!');
|
26
|
+
console.log("Files copied to: ".concat(targetDir));
|
27
|
+
}
|
28
|
+
else {
|
29
|
+
console.error('TinyMCE source directory not found:', sourceDir);
|
30
|
+
console.log('Make sure tinymce is installed: npm install tinymce');
|
31
|
+
process.exit(1);
|
32
|
+
}
|
@@ -37,18 +37,18 @@
|
|
37
37
|
"str_calendar_all_day": "All day",
|
38
38
|
"str_calendar_schedule_more": "{{count}} more",
|
39
39
|
"str_calendar_today": "Today",
|
40
|
-
"calendar_month_1": "
|
41
|
-
"calendar_month_2": "
|
42
|
-
"calendar_month_3": "
|
43
|
-
"calendar_month_4": "
|
40
|
+
"calendar_month_1": "Jan",
|
41
|
+
"calendar_month_2": "Feb",
|
42
|
+
"calendar_month_3": "Mar",
|
43
|
+
"calendar_month_4": "Apr",
|
44
44
|
"calendar_month_5": "May",
|
45
|
-
"calendar_month_6": "
|
46
|
-
"calendar_month_7": "
|
47
|
-
"calendar_month_8": "
|
48
|
-
"calendar_month_9": "
|
49
|
-
"calendar_month_10": "
|
50
|
-
"calendar_month_11": "
|
51
|
-
"calendar_month_12": "
|
45
|
+
"calendar_month_6": "Jun",
|
46
|
+
"calendar_month_7": "Jul",
|
47
|
+
"calendar_month_8": "Aug",
|
48
|
+
"calendar_month_9": "Sep",
|
49
|
+
"calendar_month_10": "Oct",
|
50
|
+
"calendar_month_11": "Nov",
|
51
|
+
"calendar_month_12": "Dec",
|
52
52
|
"str_fm_datetime_am": "{{hour}} AM",
|
53
53
|
"str_fm_datetime_pm": "{{hour}} PM",
|
54
54
|
"str_fm_am": "AM",
|
@@ -60,8 +60,8 @@
|
|
60
60
|
"calendar_header_weekly_same_month": "{{month}} {{startDay}} - {{endDay}}",
|
61
61
|
"calendar_header_weekly_diff_month": "{{startMonth}} {{startDay}} - {{endMonth}} {{endDay}}",
|
62
62
|
"str_calendar_yearly_header": "{{year}}",
|
63
|
-
"str_calendar_monthly_header": "{{month}}
|
64
|
-
"str_calendar_weekly_header": "{{month}}
|
63
|
+
"str_calendar_monthly_header": "{{month}}.{{year}}",
|
64
|
+
"str_calendar_weekly_header": "{{month}}.{{year}}",
|
65
65
|
"calendar_view_monthly": "Monthly",
|
66
66
|
"calendar_view_weekly": "Weekly",
|
67
67
|
"calendar_view_daily": "Daily",
|
@@ -113,4 +113,5 @@ export declare const language = "ko";
|
|
113
113
|
declare const theme: DefaultTheme;
|
114
114
|
type ToneType = 'DARK' | 'LIGHT';
|
115
115
|
export declare const themeByGivenTone: (tone: ToneType) => any;
|
116
|
+
export type AppTheme = ReturnType<typeof themeByGivenTone>;
|
116
117
|
export default theme;
|
@@ -125,6 +125,6 @@ exports.spacing = {
|
|
125
125
|
};
|
126
126
|
exports.language = 'ko';
|
127
127
|
var theme = __assign({ fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language }, (0, ui_colors_1.customTheme)(window.PdsUtils ? window.PdsUtils.tone : 'DARK', window.PdsUtils ? window.PdsUtils.palette : {}));
|
128
|
-
var themeByGivenTone = function (tone) { return (__assign(__assign({}, (0, ui_colors_1.customTheme)(tone)), { fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language })); };
|
128
|
+
var themeByGivenTone = function (tone) { return (__assign(__assign({}, (0, ui_colors_1.customTheme)(tone)), { fontWeight: exports.fontWeight, desktopFontSize: exports.desktopFontSize, desktopLineHeight: exports.desktopLineHeight, desktopEditorFontSize: exports.desktopEditorFontSize, desktopEditorLineHeight: exports.desktopEditorLineHeight, mobileFontSize: exports.mobileFontSize, mobileLineHeight: exports.mobileLineHeight, mobileEditorFontSize: exports.mobileEditorFontSize, mobileEditorLineHeight: exports.mobileEditorLineHeight, boxShadow: exports.boxShadow, spacing: exports.spacing, language: exports.language, mode: tone === 'DARK' ? 'dark' : 'light' })); };
|
129
129
|
exports.themeByGivenTone = themeByGivenTone;
|
130
130
|
exports.default = theme;
|
@@ -44,9 +44,27 @@ var WeeklyView_1 = require("./WeeklyView");
|
|
44
44
|
var YearlyView_1 = require("./YearlyView");
|
45
45
|
var Calendar = function (_a) {
|
46
46
|
var _b;
|
47
|
-
var _c = _a.defaultViewType, defaultViewType = _c === void 0 ? '
|
47
|
+
var _c = _a.defaultViewType, defaultViewType = _c === void 0 ? 'MONTHLY' : _c, _d = _a.viewTypes, viewTypes = _d === void 0 ? ['MONTHLY', 'WEEKLY', 'DAILY', 'YEARLY'] : _d, _e = _a.displayAllDayScheduleMode, displayAllDayScheduleMode = _e === void 0 ? 'none' : _e, _f = _a.startOfWeek, startOfWeek = _f === void 0 ? 'sunday' : _f, _g = _a.todayBtnMode, todayBtnMode = _g === void 0 ? 'use' : _g, _h = _a.schedules, schedules = _h === void 0 ? [] : _h, config = _a.config, onActionDispatch = _a.onActionDispatch;
|
48
|
+
// 다국어 키를 CalendarViewType으로 매핑하는 함수
|
49
|
+
var mapI18nKeyToViewType = function (key) {
|
50
|
+
switch (key) {
|
51
|
+
case 'str_fm_month':
|
52
|
+
return 'MONTHLY';
|
53
|
+
case 'str_fm_week':
|
54
|
+
return 'WEEKLY';
|
55
|
+
case 'str_fm_day':
|
56
|
+
return 'DAILY';
|
57
|
+
case 'str_fm_year':
|
58
|
+
return 'YEARLY';
|
59
|
+
default:
|
60
|
+
return key;
|
61
|
+
}
|
62
|
+
};
|
63
|
+
// 다국어 키를 받아서 내부적으로 매핑
|
64
|
+
var actualDefaultViewType = mapI18nKeyToViewType(defaultViewType);
|
65
|
+
var actualViewTypes = viewTypes.map(mapI18nKeyToViewType);
|
48
66
|
var t = (0, react_i18next_1.useTranslation)().t;
|
49
|
-
var _j = (0, react_1.useState)(
|
67
|
+
var _j = (0, react_1.useState)(actualDefaultViewType), currentViewType = _j[0], setCurrentViewType = _j[1];
|
50
68
|
var _k = (0, react_1.useState)(new Date()), selectedDate = _k[0], setSelectedDate = _k[1];
|
51
69
|
var _l = (0, react_1.useState)(null), dragStartDate = _l[0], setDragStartDate = _l[1];
|
52
70
|
var _m = (0, react_1.useState)(null), dragEndDate = _m[0], setDragEndDate = _m[1];
|
@@ -97,13 +115,13 @@ var Calendar = function (_a) {
|
|
97
115
|
var increment = direction === 'next' ? 1 : -1;
|
98
116
|
var getNewDateByViewType = function (viewType) {
|
99
117
|
switch (viewType) {
|
100
|
-
case '
|
118
|
+
case 'DAILY':
|
101
119
|
return dateHelper_1.DateHelper.addDays(selectedDate, increment);
|
102
|
-
case '
|
120
|
+
case 'WEEKLY':
|
103
121
|
return dateHelper_1.DateHelper.addDays(selectedDate, increment * 7);
|
104
|
-
case '
|
122
|
+
case 'MONTHLY':
|
105
123
|
return dateHelper_1.DateHelper.addMonths(selectedDate, increment);
|
106
|
-
case '
|
124
|
+
case 'YEARLY':
|
107
125
|
return new Date(selectedDate.getFullYear() + increment, selectedDate.getMonth(), selectedDate.getDate());
|
108
126
|
default:
|
109
127
|
return selectedDate;
|
@@ -175,21 +193,6 @@ var Calendar = function (_a) {
|
|
175
193
|
setDragStartDate(null);
|
176
194
|
setDragEndDate(null);
|
177
195
|
}, [isDragging, dragStartDate, dragEndDate]);
|
178
|
-
// 날짜 드래그 이벤트 처리
|
179
|
-
var handleDateDrag = (0, react_1.useCallback)(function (action) {
|
180
|
-
var _a, _b;
|
181
|
-
if (action.action === 'DRAG' && action.target === 'DATE') {
|
182
|
-
// 선택된 스케줄들을 selectedSchedules state에 반영
|
183
|
-
if (action.schedules && action.schedules.length > 0) {
|
184
|
-
setSelectedSchedules(action.schedules);
|
185
|
-
}
|
186
|
-
else {
|
187
|
-
setSelectedSchedules([]);
|
188
|
-
}
|
189
|
-
// 원래 config.DATE.DRAG 콜백이 있다면 호출
|
190
|
-
(_b = (_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG) === null || _b === void 0 ? void 0 : _b.call(_a, action);
|
191
|
-
}
|
192
|
-
}, [config]);
|
193
196
|
// 이벤트 드래그 핸들러
|
194
197
|
var handleScheduleDragStart = (0, react_1.useCallback)(function (schedule, e) {
|
195
198
|
setDraggedSchedule(schedule);
|
@@ -221,24 +224,20 @@ var Calendar = function (_a) {
|
|
221
224
|
}, []);
|
222
225
|
// 삭제 키 이벤트 처리
|
223
226
|
var handleKeyDown = (0, react_1.useCallback)(function (e) {
|
224
|
-
var _a, _b;
|
225
|
-
if (
|
226
|
-
|
227
|
-
|
228
|
-
(
|
227
|
+
var _a, _b, _c;
|
228
|
+
if (e.key === 'Backspace' &&
|
229
|
+
selectedSchedules.length > 0 &&
|
230
|
+
((_a = config === null || config === void 0 ? void 0 : config.SCHEDULE) === null || _a === void 0 ? void 0 : _a.DELETE_KEY_DOWN)) {
|
231
|
+
(_c = (_b = config === null || config === void 0 ? void 0 : config.SCHEDULE) === null || _b === void 0 ? void 0 : _b.DELETE_KEY_DOWN) === null || _c === void 0 ? void 0 : _c.call(_b, {
|
229
232
|
action: 'DELETE_KEY_DOWN',
|
230
233
|
target: 'SCHEDULE',
|
231
234
|
schedules: selectedSchedules,
|
232
235
|
startDate: (0, calendarUtils_1.toUTC)(startDate),
|
233
236
|
endDate: (0, calendarUtils_1.toUTC)(endDate)
|
234
237
|
});
|
235
|
-
// 항상 선택된 스케줄들 해제
|
236
238
|
setSelectedSchedules([]);
|
237
|
-
setSelectedDates([]);
|
238
|
-
// 브라우저 기본 동작 방지 (뒤로가기 등)
|
239
|
-
e.preventDefault();
|
240
239
|
}
|
241
|
-
}, [config, selectedSchedules
|
240
|
+
}, [config, selectedSchedules]);
|
242
241
|
// 날짜 드래그 놓기
|
243
242
|
var handleDateDrop = (0, react_1.useCallback)(function (date, e) {
|
244
243
|
var _a, _b, _c;
|
@@ -254,7 +253,7 @@ var Calendar = function (_a) {
|
|
254
253
|
var duration = originalEndDate.getTime() - originalStartDate.getTime();
|
255
254
|
var getAdjustedStartDate = function () {
|
256
255
|
var baseDate = new Date(date);
|
257
|
-
if (currentViewType === '
|
256
|
+
if (currentViewType === 'MONTHLY') {
|
258
257
|
var target = e.target;
|
259
258
|
var gridContainer = target.closest('[data-calendar-grid]');
|
260
259
|
if (gridContainer) {
|
@@ -300,11 +299,17 @@ var Calendar = function (_a) {
|
|
300
299
|
};
|
301
300
|
// 뷰 타입을 위한 드롭다운 옵션 생성
|
302
301
|
var viewTypeOptions = (0, react_1.useMemo)(function () {
|
303
|
-
|
304
|
-
|
302
|
+
var viewTypeTextMap = {
|
303
|
+
MONTHLY: t('str_fm_month'),
|
304
|
+
WEEKLY: t('str_fm_week'),
|
305
|
+
DAILY: t('str_fm_day'),
|
306
|
+
YEARLY: t('str_fm_year')
|
307
|
+
};
|
308
|
+
return actualViewTypes.map(function (viewType) { return ({
|
309
|
+
text: viewTypeTextMap[viewType] || viewType,
|
305
310
|
value: viewType
|
306
311
|
}); });
|
307
|
-
}, [
|
312
|
+
}, [actualViewTypes, t]);
|
308
313
|
// 특정 월의 캘린더 날짜 생성 (연간 보기용)
|
309
314
|
var getMonthDates = (0, react_1.useCallback)(function (year, month) {
|
310
315
|
var monthDate = new Date(year, month, 1);
|
@@ -345,14 +350,14 @@ var Calendar = function (_a) {
|
|
345
350
|
};
|
346
351
|
// 주간 뷰로 전환하는 핸들러
|
347
352
|
var handleSwitchToWeeklyView = (0, react_1.useCallback)(function (date) {
|
348
|
-
setCurrentViewType('
|
353
|
+
setCurrentViewType('WEEKLY');
|
349
354
|
setSelectedDate(date);
|
350
355
|
// 주간 뷰로 전환할 때의 startDate와 endDate 계산
|
351
|
-
var _a = (0, calendarUtils_1.calculateDateRange)('
|
356
|
+
var _a = (0, calendarUtils_1.calculateDateRange)('WEEKLY', date), newStartDate = _a.startDate, newEndDate = _a.endDate;
|
352
357
|
onActionDispatch === null || onActionDispatch === void 0 ? void 0 : onActionDispatch({
|
353
358
|
type: 'CALENDAR_TYPE_CHANGE',
|
354
359
|
payload: {
|
355
|
-
type: '
|
360
|
+
type: 'WEEKLY',
|
356
361
|
startDate: (0, calendarUtils_1.toUTC)(newStartDate),
|
357
362
|
endDate: (0, calendarUtils_1.toUTC)(newEndDate)
|
358
363
|
}
|
@@ -361,13 +366,13 @@ var Calendar = function (_a) {
|
|
361
366
|
// 뷰 타입에 따른 캘린더 콘텐츠 렌더링
|
362
367
|
var renderCalendarContent = function () {
|
363
368
|
switch (currentViewType) {
|
364
|
-
case '
|
365
|
-
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, schedules: schedules, getSchedulesForDate: getSchedulesForDate, isToday: isToday, isPastDate: isPastDate, handleDateClick: handleDateClick, handleScheduleClick: handleScheduleClick, handleMouseUp: handleMouseUp, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd, isDraggable: isDraggable, onSwitchToWeeklyView: handleSwitchToWeeklyView
|
366
|
-
case '
|
367
|
-
return (0, jsx_runtime_1.jsx)(WeeklyView_1.WeeklyView, { startOfWeek: startOfWeek
|
368
|
-
case '
|
369
|
-
return (0, jsx_runtime_1.jsx)(DailyView_1.DailyView, {
|
370
|
-
case '
|
369
|
+
case 'MONTHLY':
|
370
|
+
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, schedules: schedules, getSchedulesForDate: getSchedulesForDate, isToday: isToday, isPastDate: isPastDate, handleDateClick: handleDateClick, handleScheduleClick: handleScheduleClick, handleMouseUp: handleMouseUp, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd, isDraggable: isDraggable, onSwitchToWeeklyView: handleSwitchToWeeklyView }));
|
371
|
+
case 'WEEKLY':
|
372
|
+
return (0, jsx_runtime_1.jsx)(WeeklyView_1.WeeklyView, { startOfWeek: startOfWeek });
|
373
|
+
case 'DAILY':
|
374
|
+
return (0, jsx_runtime_1.jsx)(DailyView_1.DailyView, {});
|
375
|
+
case 'YEARLY':
|
371
376
|
return ((0, jsx_runtime_1.jsx)(YearlyView_1.YearlyView, { selectedDate: selectedDate, getMonthDates: getMonthDates, getDayTextByDate: getDayTextByDate, startOfWeek: startOfWeek, isToday: isToday, handleDateClick: handleDateClick, getSchedulesForDate: getSchedulesForDate }));
|
372
377
|
default:
|
373
378
|
return null;
|
@@ -379,7 +384,7 @@ var Calendar = function (_a) {
|
|
379
384
|
// 스케줄 관련
|
380
385
|
selectedSchedules: selectedSchedules, isDraggable: isDraggable, handleScheduleClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd,
|
381
386
|
// 날짜 관련
|
382
|
-
handleDateClick: handleDateClick,
|
387
|
+
handleDateClick: handleDateClick, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop,
|
383
388
|
// 유틸리티 함수
|
384
389
|
getSchedulesForDate: getSchedulesForDate, isToday: isToday, isPastDate: isPastDate, getDayTextByDate: getDayTextByDate,
|
385
390
|
// 상태값
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type { Schedule, displayAllDayScheduleMode
|
2
|
+
import type { Schedule, displayAllDayScheduleMode } from './types';
|
3
3
|
export interface ScheduleItemExtraProps {
|
4
4
|
onDragStart?: (e: React.DragEvent) => void;
|
5
5
|
onDragEnd?: () => void;
|
@@ -14,7 +14,6 @@ interface CalendarContextValue {
|
|
14
14
|
handleScheduleDragStart: (schedule: Schedule, e: React.DragEvent) => void;
|
15
15
|
handleScheduleDragEnd: () => void;
|
16
16
|
handleDateClick: (date: Date, e: React.MouseEvent) => void;
|
17
|
-
handleDateDrag: (action: Action) => void;
|
18
17
|
handleDateDragOver: (date: Date, e: React.DragEvent) => void;
|
19
18
|
handleDateDragLeave: () => void;
|
20
19
|
handleDateDrop: (date: Date, e: React.DragEvent) => void;
|
@@ -37,7 +36,6 @@ interface CalendarProviderProps {
|
|
37
36
|
handleScheduleDragStart: (schedule: Schedule, e: React.DragEvent) => void;
|
38
37
|
handleScheduleDragEnd: () => void;
|
39
38
|
handleDateClick: (date: Date, e: React.MouseEvent) => void;
|
40
|
-
handleDateDrag: (action: Action) => void;
|
41
39
|
handleDateDragOver: (date: Date, e: React.DragEvent) => void;
|
42
40
|
handleDateDragLeave: () => void;
|
43
41
|
handleDateDrop: (date: Date, e: React.DragEvent) => void;
|
@@ -30,7 +30,7 @@ var CalendarProvider = function (_a) {
|
|
30
30
|
// 스케줄 관련
|
31
31
|
selectedSchedules = _a.selectedSchedules, isDraggable = _a.isDraggable, handleScheduleClick = _a.handleScheduleClick, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd,
|
32
32
|
// 날짜 관련
|
33
|
-
handleDateClick = _a.handleDateClick,
|
33
|
+
handleDateClick = _a.handleDateClick, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop,
|
34
34
|
// 유틸리티 함수
|
35
35
|
getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isPastDate = _a.isPastDate, getDayTextByDate = _a.getDayTextByDate,
|
36
36
|
// 상태값
|
@@ -56,7 +56,6 @@ var CalendarProvider = function (_a) {
|
|
56
56
|
handleScheduleDragEnd: handleScheduleDragEnd,
|
57
57
|
// 날짜 이벤트 핸들러
|
58
58
|
handleDateClick: handleDateClick,
|
59
|
-
handleDateDrag: handleDateDrag,
|
60
59
|
handleDateDragOver: handleDateDragOver,
|
61
60
|
handleDateDragLeave: handleDateDragLeave,
|
62
61
|
handleDateDrop: handleDateDrop,
|
@@ -1,8 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
interface DailyViewProps {
|
4
|
-
schedules: Schedule[];
|
5
|
-
config?: any;
|
6
|
-
}
|
7
|
-
export declare const DailyView: React.FC<DailyViewProps>;
|
8
|
-
export {};
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const DailyView: () => JSX.Element;
|
@@ -40,7 +40,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
exports.DailyView = void 0;
|
42
42
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
43
|
-
var react_1 = require("react");
|
44
43
|
var react_i18next_1 = require("react-i18next");
|
45
44
|
var styled_components_1 = __importStar(require("styled-components"));
|
46
45
|
var TextLabel_1 = require("../TextLabel");
|
@@ -49,14 +48,9 @@ var CalendarContext_1 = require("./CalendarContext");
|
|
49
48
|
var CurrentTimeIndicator_1 = require("./CurrentTimeIndicator");
|
50
49
|
var TimeBasedScheduleItem_1 = require("./TimeBasedScheduleItem");
|
51
50
|
var timeFormatUtils_1 = require("./timeFormatUtils");
|
52
|
-
var DailyView = function (
|
53
|
-
var schedules = _a.schedules, config = _a.config;
|
51
|
+
var DailyView = function () {
|
54
52
|
var i18n = (0, react_i18next_1.useTranslation)().i18n;
|
55
|
-
var
|
56
|
-
// 시간 드래그 상태
|
57
|
-
var _c = (0, react_1.useState)(null), timeSelectionStart = _c[0], setTimeSelectionStart = _c[1];
|
58
|
-
var _d = (0, react_1.useState)(null), timeSelectionEnd = _d[0], setTimeSelectionEnd = _d[1];
|
59
|
-
var _e = (0, react_1.useState)(false), isTimeDragging = _e[0], setIsTimeDragging = _e[1];
|
53
|
+
var _a = (0, CalendarContext_1.useCalendarContext)(), selectedDate = _a.selectedDate, selectedSchedules = _a.selectedSchedules, displayAllDayScheduleMode = _a.displayAllDayScheduleMode, getSchedulesForDate = _a.getSchedulesForDate, isDragOverDate = _a.isDragOverDate, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleDateClick = _a.handleDateClick, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, handleScheduleClick = _a.handleScheduleClick;
|
60
54
|
var currentDateForDaily = [selectedDate][0];
|
61
55
|
var HOURS_IN_DAY = Array.from({ length: 24 }, function (_, i) { return i; });
|
62
56
|
var getTimeSlotDate = function (baseDate, hour) {
|
@@ -64,79 +58,10 @@ var DailyView = function (_a) {
|
|
64
58
|
date.setHours(hour, 0, 0, 0);
|
65
59
|
return date;
|
66
60
|
};
|
67
|
-
// 시간 드래그 시작
|
68
|
-
var handleTimeMouseDown = (0, react_1.useCallback)(function (hour, e) {
|
69
|
-
var _a;
|
70
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
71
|
-
return;
|
72
|
-
e.preventDefault();
|
73
|
-
setTimeSelectionStart(hour);
|
74
|
-
setTimeSelectionEnd(hour);
|
75
|
-
setIsTimeDragging(true);
|
76
|
-
}, [config]);
|
77
|
-
// 시간 드래그 중
|
78
|
-
var handleTimeMouseEnter = (0, react_1.useCallback)(function (hour) {
|
79
|
-
if (!isTimeDragging)
|
80
|
-
return;
|
81
|
-
setTimeSelectionEnd(hour);
|
82
|
-
}, [isTimeDragging]);
|
83
|
-
// 드래그 종료 시 콜백 호출
|
84
|
-
(0, react_1.useEffect)(function () {
|
85
|
-
var handleMouseUp = function () {
|
86
|
-
var _a;
|
87
|
-
if (isTimeDragging &&
|
88
|
-
timeSelectionStart !== null &&
|
89
|
-
timeSelectionEnd !== null &&
|
90
|
-
((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
|
91
|
-
// 선택된 시간 범위 계산
|
92
|
-
var startHour = Math.min(timeSelectionStart, timeSelectionEnd);
|
93
|
-
var endHour = Math.max(timeSelectionStart, timeSelectionEnd);
|
94
|
-
var startDateTime_1 = new Date(selectedDate);
|
95
|
-
startDateTime_1.setHours(startHour, 0, 0, 0);
|
96
|
-
var endDateTime_1 = new Date(selectedDate);
|
97
|
-
endDateTime_1.setHours(endHour, 59, 59, 999);
|
98
|
-
// 선택된 시간 범위에 포함되는 스케줄들 찾기
|
99
|
-
var schedulesInRange_1 = [];
|
100
|
-
schedules.forEach(function (schedule) {
|
101
|
-
var scheduleStart = new Date(schedule.startDate);
|
102
|
-
var scheduleEnd = new Date(schedule.endDate);
|
103
|
-
// 스케줄이 선택된 시간 범위와 겹치는지 확인
|
104
|
-
if (scheduleStart <= endDateTime_1 && scheduleEnd >= startDateTime_1) {
|
105
|
-
schedulesInRange_1.push(schedule);
|
106
|
-
}
|
107
|
-
});
|
108
|
-
// 선택된 날짜 (현재 날짜만)
|
109
|
-
var selectedDates = [new Date(selectedDate)];
|
110
|
-
handleDateDrag({
|
111
|
-
action: 'DRAG',
|
112
|
-
target: 'DATE',
|
113
|
-
dates: selectedDates,
|
114
|
-
schedules: schedulesInRange_1,
|
115
|
-
startDate: startDateTime_1.toISOString(),
|
116
|
-
endDate: endDateTime_1.toISOString()
|
117
|
-
});
|
118
|
-
}
|
119
|
-
setIsTimeDragging(false);
|
120
|
-
setTimeSelectionStart(null);
|
121
|
-
setTimeSelectionEnd(null);
|
122
|
-
};
|
123
|
-
if (isTimeDragging) {
|
124
|
-
document.addEventListener('mouseup', handleMouseUp);
|
125
|
-
return function () { return document.removeEventListener('mouseup', handleMouseUp); };
|
126
|
-
}
|
127
|
-
}, [isTimeDragging, timeSelectionStart, timeSelectionEnd, config, schedules, selectedDate]);
|
128
|
-
// 선택한 시간이 드래그 범위에 포함되는지 확인
|
129
|
-
var isTimeSlotInDragRange = (0, react_1.useCallback)(function (hour) {
|
130
|
-
if (timeSelectionStart === null || timeSelectionEnd === null)
|
131
|
-
return false;
|
132
|
-
var startHour = Math.min(timeSelectionStart, timeSelectionEnd);
|
133
|
-
var endHour = Math.max(timeSelectionStart, timeSelectionEnd);
|
134
|
-
return hour >= startHour && hour <= endHour;
|
135
|
-
}, [timeSelectionStart, timeSelectionEnd]);
|
136
61
|
return ((0, jsx_runtime_1.jsxs)(S_DailyContainer, { children: [(0, jsx_runtime_1.jsx)(AllDaySchedulesSection_1.AllDaySchedulesSection, { calendarDates: [selectedDate], displayAllDayScheduleMode: displayAllDayScheduleMode, getSchedulesForDate: getSchedulesForDate, handleDateDragOver: handleDateDragOver, handleDateDragLeave: handleDateDragLeave, handleDateDrop: handleDateDrop }), (0, jsx_runtime_1.jsxs)(S_DailyTimeGrid, __assign({ "$displayAllDayScheduleMode": displayAllDayScheduleMode }, { children: [(0, jsx_runtime_1.jsx)(CurrentTimeIndicator_1.CurrentTimeIndicator, { show: true, leftOffset: "80px" }), HOURS_IN_DAY.map(function (hour) {
|
137
62
|
var timeSlotDate = getTimeSlotDate(currentDateForDaily, hour);
|
138
63
|
var isDragOver = (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.getTime()) === timeSlotDate.getTime();
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(S_DailyTimeRow, { children: [(0, jsx_runtime_1.jsx)(S_DailyTimeLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", text: (0, timeFormatUtils_1.formatHour)(hour, 0, i18n.language), colorTheme: "sysTextTertiary" }) }), (0, jsx_runtime_1.jsx)(S_DailyTimeSlot, __assign({ "$isDragOver": isDragOver,
|
64
|
+
return ((0, jsx_runtime_1.jsxs)(S_DailyTimeRow, { children: [(0, jsx_runtime_1.jsx)(S_DailyTimeLabel, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: "caption2Bold", text: (0, timeFormatUtils_1.formatHour)(hour, 0, i18n.language), colorTheme: "sysTextTertiary" }) }), (0, jsx_runtime_1.jsx)(S_DailyTimeSlot, __assign({ "$isDragOver": isDragOver, onClick: function () { return handleDateClick(timeSlotDate, {}); }, onDragOver: function (e) { return handleDateDragOver(timeSlotDate, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(timeSlotDate, e); } }, { children: hour === 0 && ((0, jsx_runtime_1.jsx)(TimeBasedScheduleItem_1.TimeBasedScheduleItem, { schedules: getSchedulesForDate(currentDateForDaily), selectedSchedules: selectedSchedules, onClick: handleScheduleClick, handleScheduleDragStart: handleScheduleDragStart, handleScheduleDragEnd: handleScheduleDragEnd })) }))] }, hour));
|
140
65
|
})] }))] }));
|
141
66
|
};
|
142
67
|
exports.DailyView = DailyView;
|
@@ -156,16 +81,10 @@ var S_DailyTimeLabel = styled_components_1.default.div(templateObject_5 || (temp
|
|
156
81
|
var theme = _a.theme;
|
157
82
|
return theme.ui_cpnt_divider;
|
158
83
|
});
|
159
|
-
var S_DailyTimeSlot = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor:
|
160
|
-
if (props.$isInTimeDragRange)
|
161
|
-
return props.theme.ui_72;
|
162
|
-
if (props.$isDragOver)
|
163
|
-
return props.theme.ui_72;
|
164
|
-
return 'transparent';
|
165
|
-
}, function (_a) {
|
84
|
+
var S_DailyTimeSlot = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor: pointer;\n flex: 1;\n min-width: 0;\n overflow: visible;\n padding: 4px;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"], ["\n background: ", ";\n border-bottom: 1px solid ", ";\n cursor: pointer;\n flex: 1;\n min-width: 0;\n overflow: visible;\n padding: 4px;\n position: relative;\n\n &:hover {\n background: ", ";\n }\n"])), function (props) { return (props.$isDragOver ? props.theme.ui_72 : 'transparent'); }, function (_a) {
|
166
85
|
var theme = _a.theme;
|
167
86
|
return theme.ui_cpnt_divider;
|
168
|
-
}, function (
|
87
|
+
}, function (_a) {
|
169
88
|
var theme = _a.theme;
|
170
89
|
return theme.ui_72;
|
171
90
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Schedule
|
1
|
+
import type { Schedule } from './types';
|
2
2
|
import type React from 'react';
|
3
3
|
interface MonthlyViewProps {
|
4
4
|
getDayTextByDate: (date: Date) => string;
|
@@ -23,7 +23,6 @@ interface MonthlyViewProps {
|
|
23
23
|
handleScheduleDragEnd?: () => void;
|
24
24
|
isDraggable?: boolean;
|
25
25
|
onSwitchToWeeklyView?: (date: Date) => void;
|
26
|
-
config?: Config;
|
27
26
|
}
|
28
27
|
export declare const MonthlyView: React.FC<MonthlyViewProps>;
|
29
28
|
export {};
|
@@ -41,85 +41,17 @@ var CalendarContext_1 = require("./CalendarContext");
|
|
41
41
|
var calendarUtils_1 = require("./calendarUtils");
|
42
42
|
var MultiWeekSchedulesLayer_1 = require("./MultiWeekSchedulesLayer");
|
43
43
|
var MonthlyView = function (_a) {
|
44
|
-
var getDayTextByDate = _a.getDayTextByDate, startOfWeek = _a.startOfWeek, selectedDate = _a.selectedDate, selectedDates = _a.selectedDates, selectedSchedules = _a.selectedSchedules, dragStartDate = _a.dragStartDate, dragEndDate = _a.dragEndDate, isDragOverDate = _a.isDragOverDate, schedules = _a.schedules, getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isPastDate = _a.isPastDate, handleDateClick = _a.handleDateClick, handleScheduleClick = _a.handleScheduleClick, handleMouseUp = _a.handleMouseUp, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, _b = _a.isDraggable, isDraggable = _b === void 0 ? false : _b, onSwitchToWeeklyView = _a.onSwitchToWeeklyView
|
44
|
+
var getDayTextByDate = _a.getDayTextByDate, startOfWeek = _a.startOfWeek, selectedDate = _a.selectedDate, selectedDates = _a.selectedDates, selectedSchedules = _a.selectedSchedules, dragStartDate = _a.dragStartDate, dragEndDate = _a.dragEndDate, isDragOverDate = _a.isDragOverDate, schedules = _a.schedules, getSchedulesForDate = _a.getSchedulesForDate, isToday = _a.isToday, isPastDate = _a.isPastDate, handleDateClick = _a.handleDateClick, handleScheduleClick = _a.handleScheduleClick, handleMouseUp = _a.handleMouseUp, handleDateDragOver = _a.handleDateDragOver, handleDateDragLeave = _a.handleDateDragLeave, handleDateDrop = _a.handleDateDrop, handleScheduleDragStart = _a.handleScheduleDragStart, handleScheduleDragEnd = _a.handleScheduleDragEnd, _b = _a.isDraggable, isDraggable = _b === void 0 ? false : _b, onSwitchToWeeklyView = _a.onSwitchToWeeklyView;
|
45
45
|
var t = (0, react_i18next_1.useTranslation)().t;
|
46
|
-
var
|
46
|
+
var renderScheduleItem = (0, CalendarContext_1.useCalendarContext)().renderScheduleItem;
|
47
47
|
var height = (0, useWindowSize_1.useWindowSize)().height;
|
48
48
|
var calendarCellRef = (0, react_1.useRef)(null);
|
49
|
-
var
|
49
|
+
var _c = (0, react_1.useState)(3), maxSchedulesPerDay = _c[0], setMaxSchedulesPerDay = _c[1];
|
50
50
|
var scheduleItemHeight = 22; // 스케줄 아이템 대략 높이
|
51
|
-
// 날짜 드래그 상태
|
52
|
-
var _e = (0, react_1.useState)(null), dateSelectionStart = _e[0], setDateSelectionStart = _e[1];
|
53
|
-
var _f = (0, react_1.useState)(null), dateSelectionEnd = _f[0], setDateSelectionEnd = _f[1];
|
54
|
-
var _g = (0, react_1.useState)(false), isDateDragging = _g[0], setIsDateDragging = _g[1];
|
55
51
|
var days = (0, react_1.useMemo)(function () {
|
56
52
|
var monthDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1);
|
57
53
|
return dateHelper_1.DateHelper.getCalendarDatesForCalendar(monthDate, startOfWeek);
|
58
54
|
}, [selectedDate, startOfWeek]);
|
59
|
-
// 날짜 드래그 시작
|
60
|
-
var handleDateMouseDown = function (date, e) {
|
61
|
-
var _a;
|
62
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
63
|
-
return;
|
64
|
-
e.preventDefault(); // 텍스트 선택 방지
|
65
|
-
setDateSelectionStart(date);
|
66
|
-
setDateSelectionEnd(date);
|
67
|
-
setIsDateDragging(true);
|
68
|
-
};
|
69
|
-
// 날짜 드래그 중
|
70
|
-
var handleDateMouseEnter = function (date) {
|
71
|
-
var _a;
|
72
|
-
if (!((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG))
|
73
|
-
return;
|
74
|
-
if (!isDateDragging)
|
75
|
-
return;
|
76
|
-
setDateSelectionEnd(date);
|
77
|
-
};
|
78
|
-
// 드래그 종료 시 콜백 호출
|
79
|
-
(0, react_1.useEffect)(function () {
|
80
|
-
var handleMouseUp = function () {
|
81
|
-
var _a;
|
82
|
-
if (isDateDragging && dateSelectionStart && dateSelectionEnd && ((_a = config === null || config === void 0 ? void 0 : config.DATE) === null || _a === void 0 ? void 0 : _a.DRAG)) {
|
83
|
-
var startDate_1 = new Date(Math.min(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
84
|
-
var endDate_1 = new Date(Math.max(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
85
|
-
// 선택된 날짜 구간의 모든 날짜를 생성
|
86
|
-
var selectedDates_1 = [];
|
87
|
-
var current = new Date(startDate_1);
|
88
|
-
while (current <= endDate_1) {
|
89
|
-
selectedDates_1.push(new Date(current));
|
90
|
-
current.setDate(current.getDate() + 1);
|
91
|
-
}
|
92
|
-
// 선택된 날짜 구간에 포함되는 스케줄들 찾기
|
93
|
-
var schedulesInRange_1 = [];
|
94
|
-
schedules.forEach(function (schedule) {
|
95
|
-
var scheduleStartDate = new Date(schedule.startDate);
|
96
|
-
scheduleStartDate.setHours(0, 0, 0, 0);
|
97
|
-
var scheduleEndDate = new Date(schedule.endDate);
|
98
|
-
scheduleEndDate.setHours(0, 0, 0, 0);
|
99
|
-
// 스케줄과 선택된 구간이 겹치는지 확인
|
100
|
-
// 스케줄 시작 <= 선택된 구간 끝 && 스케줄 끝 >= 선택된 구간 시작
|
101
|
-
if (scheduleStartDate <= endDate_1 && scheduleEndDate >= startDate_1) {
|
102
|
-
schedulesInRange_1.push(schedule);
|
103
|
-
}
|
104
|
-
});
|
105
|
-
handleDateDrag({
|
106
|
-
action: 'DRAG',
|
107
|
-
target: 'DATE',
|
108
|
-
dates: selectedDates_1,
|
109
|
-
schedules: schedulesInRange_1,
|
110
|
-
startDate: startDate_1.toISOString(),
|
111
|
-
endDate: endDate_1.toISOString()
|
112
|
-
});
|
113
|
-
}
|
114
|
-
setIsDateDragging(false);
|
115
|
-
setDateSelectionStart(null);
|
116
|
-
setDateSelectionEnd(null);
|
117
|
-
};
|
118
|
-
if (isDateDragging) {
|
119
|
-
document.addEventListener('mouseup', handleMouseUp);
|
120
|
-
return function () { return document.removeEventListener('mouseup', handleMouseUp); };
|
121
|
-
}
|
122
|
-
}, [isDateDragging, dateSelectionStart, dateSelectionEnd, config, schedules]);
|
123
55
|
// 셀 높이 기반으로 최대 스케줄 개수 계산
|
124
56
|
var calculateMaxSchedules = (0, react_1.useCallback)(function () {
|
125
57
|
if (!calendarCellRef.current)
|
@@ -412,14 +344,10 @@ var MonthlyView = function (_a) {
|
|
412
344
|
!!(dragStartDate &&
|
413
345
|
dragEndDate &&
|
414
346
|
date.getTime() >= Math.min(dragStartDate.getTime(), dragEndDate.getTime()) &&
|
415
|
-
date.getTime() <= Math.max(dragStartDate.getTime(), dragEndDate.getTime()))
|
416
|
-
!!(dateSelectionStart &&
|
417
|
-
dateSelectionEnd &&
|
418
|
-
date.getTime() >= Math.min(dateSelectionStart.getTime(), dateSelectionEnd.getTime()) &&
|
419
|
-
date.getTime() <= Math.max(dateSelectionStart.getTime(), dateSelectionEnd.getTime()));
|
347
|
+
date.getTime() <= Math.max(dragStartDate.getTime(), dragEndDate.getTime()));
|
420
348
|
return ((0, jsx_runtime_1.jsxs)(S_CalendarCell, __assign({ ref: date.getMonth() === selectedDate.getMonth() && date.getDate() === 1
|
421
349
|
? calendarCellRef
|
422
|
-
: undefined, "data-calendar-cell": true, "$isCurrentMonth": date.getMonth() === selectedDate.getMonth(), "$isToday": isToday(date), "$isSelected": isCellSelected, "$isPast": isPastDate(date), "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.toDateString()) === date.toDateString(),
|
350
|
+
: undefined, "data-calendar-cell": true, "$isCurrentMonth": date.getMonth() === selectedDate.getMonth(), "$isToday": isToday(date), "$isSelected": isCellSelected, "$isPast": isPastDate(date), "$isDragOver": (isDragOverDate === null || isDragOverDate === void 0 ? void 0 : isDragOverDate.toDateString()) === date.toDateString(), onClick: function (e) { return handleDateClick(date, e); }, onMouseUp: handleMouseUp, onDragOver: function (e) { return handleDateDragOver(date, e); }, onDragLeave: handleDateDragLeave, onDrop: function (e) { return handleDateDrop(date, e); } }, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { styleTheme: isToday(date) ? 'caption2Bold' : 'caption2Regular', textAlign: "center", colorTheme: isToday(date) ? 'sysTextBrandPrimary' : 'sysTextSecondary', text: date.getDate().toString() }), (0, jsx_runtime_1.jsxs)(S_SchedulesContainer, __assign({ "$multiWeekSchedulesCount": visibleRows.length, id: "schedule container" }, { children: [visibleRows.map(function (_a) {
|
423
351
|
var rowIndex = _a.rowIndex, items = _a.items;
|
424
352
|
return items.map(function (item) {
|
425
353
|
var schedule = item.data;
|
@@ -449,7 +377,7 @@ var S_DayHeader = styled_components_1.default.div(templateObject_2 || (templateO
|
|
449
377
|
var theme = _a.theme;
|
450
378
|
return theme.ui_cpnt_divider;
|
451
379
|
});
|
452
|
-
var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n
|
380
|
+
var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n &:nth-child(7n + 1) {\n border-left: 1px solid ", ";\n }\n\n &:nth-child(-n + 7) {\n border-top: 1px solid ", ";\n }\n"], ["\n background-color: ", ";\n border-bottom: 1px solid ", ";\n border-right: 1px solid ", ";\n min-height: 80px;\n min-width: 0;\n overflow: hidden;\n padding: 4px;\n position: relative;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n &:nth-child(7n + 1) {\n border-left: 1px solid ", ";\n }\n\n &:nth-child(-n + 7) {\n border-top: 1px solid ", ";\n }\n"])), function (_a) {
|
453
381
|
var $isSelected = _a.$isSelected, theme = _a.theme;
|
454
382
|
if ($isSelected)
|
455
383
|
return theme.ui_cpnt_sheet_base;
|
@@ -460,9 +388,6 @@ var S_CalendarCell = styled_components_1.default.div(templateObject_3 || (templa
|
|
460
388
|
}, function (_a) {
|
461
389
|
var theme = _a.theme;
|
462
390
|
return theme.ui_cpnt_divider;
|
463
|
-
}, function (_a) {
|
464
|
-
var $isDateDragging = _a.$isDateDragging;
|
465
|
-
return ($isDateDragging ? 'none' : 'auto');
|
466
391
|
}, function (_a) {
|
467
392
|
var theme = _a.theme;
|
468
393
|
return theme.ui_cpnt_sheet_base;
|