@dotss/tictoccroc 0.4.1 → 0.5.0
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/Calendar-BOLCHnjh.js +97 -0
- package/dist/TimePicker-BwACyeBR.js +120 -0
- package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
- package/dist/index.mjs +105 -200
- package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
- package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
- package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
- package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
- package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
- package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
- package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
- package/dist/parent/b2b/components/NameField/index.mjs +5 -4
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
- package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
- package/dist/parent/b2b/components/Title/Title.mjs +22 -16
- package/dist/parent/b2b/components/Title/index.mjs +4 -3
- package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
- package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
- package/dist/parent/b2b/components/index.mjs +9 -19
- package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
- package/dist/parent/b2b/utils/index.mjs +2 -4
- package/dist/parent/notification/components/NotificationCard/NotificationCard.d.ts +3 -1
- package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -105
- package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
- package/dist/parent/notification/components/index.mjs +2 -4
- package/dist/parent/notification/utils/index.mjs +2 -4
- package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
- package/dist/purify.es-D3W4zDrg.js +549 -0
- package/dist/shared/components/Calendar/Calendar.mjs +2 -80
- package/dist/shared/components/Calendar/index.mjs +5 -4
- package/dist/shared/components/Carousel/Carousel.mjs +184 -210
- package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
- package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
- package/dist/shared/components/Carousel/index.mjs +6 -6
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
- package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
- package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
- package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
- package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
- package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
- package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
- package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
- package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
- package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
- package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
- package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
- package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
- package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
- package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
- package/dist/shared/components/ChatKit/index.mjs +13 -29
- package/dist/shared/components/Image/Image.d.ts +2 -0
- package/dist/shared/components/Image/Image.error.mjs +34 -40
- package/dist/shared/components/Image/Image.mjs +247 -289
- package/dist/shared/components/Image/index.mjs +6 -6
- package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
- package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
- package/dist/shared/components/Masonry/Masonry.mjs +240 -276
- package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
- package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
- package/dist/shared/components/Masonry/index.mjs +6 -6
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
- package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
- package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
- package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
- package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/index.mjs +9 -12
- package/dist/shared/components/Roller/Roller.mjs +99 -132
- package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
- package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
- package/dist/shared/components/Roller/index.mjs +6 -6
- package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
- package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
- package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
- package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
- package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
- package/dist/shared/components/Scheduler/index.mjs +8 -10
- package/dist/shared/components/Swiper/Swiper.mjs +238 -283
- package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
- package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
- package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
- package/dist/shared/components/Swiper/index.mjs +6 -6
- package/dist/shared/components/TextField/TextField.mjs +44 -55
- package/dist/shared/components/TextField/index.mjs +5 -4
- package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
- package/dist/shared/components/TimePicker/index.mjs +5 -4
- package/dist/shared/components/index.mjs +36 -75
- package/dist/shared/hooks/index.mjs +4 -8
- package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
- package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
- package/dist/shared/hooks/useInView/index.mjs +5 -4
- package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
- package/dist/shared/hooks/useInView/useInView.mjs +37 -47
- package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
- package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
- package/dist/shared/typings/common.mjs +6 -4
- package/dist/shared/typings/index.mjs +2 -4
- package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
- package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
- package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
- package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
- package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
- package/dist/shared/utils/combineRef/index.mjs +5 -4
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
- package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
- package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
- package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
- package/dist/shared/utils/getDateRange/index.mjs +5 -4
- package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
- package/dist/shared/utils/getImageUrl/index.mjs +5 -6
- package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
- package/dist/shared/utils/getTimeRange/index.mjs +5 -4
- package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
- package/dist/shared/utils/getVimeoId/index.mjs +5 -4
- package/dist/shared/utils/index.mjs +18 -36
- package/dist/shared/utils/isAndroid/index.mjs +5 -4
- package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
- package/dist/shared/utils/isApp/index.mjs +5 -4
- package/dist/shared/utils/isApp/isApp.mjs +4 -4
- package/dist/shared/utils/isDesktop/index.mjs +5 -4
- package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
- package/dist/shared/utils/isIos/index.mjs +5 -4
- package/dist/shared/utils/isIos/isIos.mjs +5 -5
- package/dist/shared/utils/isServer/index.mjs +4 -3
- package/dist/shared/utils/isServer/isServer.mjs +4 -4
- package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
- package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
- package/dist/shared/utils/parseQueryString/index.mjs +4 -3
- package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
- package/dist/shared/utils/share/index.mjs +5 -4
- package/dist/shared/utils/share/share.mjs +12 -14
- package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
- package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
- package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
- package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
- package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
- package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
- package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
- package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
- package/dist/teacher/home/components/index.mjs +9 -18
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
- package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
- package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
- package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
- package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
- package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
- package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
- package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
- package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
- package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +11 -12
- package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
- package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
- package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
- package/dist/teacher/profile/components/index.mjs +24 -48
- package/dist/teacher/profile/utils/index.mjs +2 -4
- package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
- package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
- package/package.json +1 -1
- package/dist/purify.es-BGaRrCfO.js +0 -553
|
@@ -1,108 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import e from "../../utils/dayFlagToDay/index.mjs";
|
|
2
|
+
import t from "../../utils/getDateRange/index.mjs";
|
|
3
|
+
import n from "../../utils/getTimeRange/index.mjs";
|
|
4
|
+
import r from "dayjs";
|
|
5
|
+
//#region shared/components/Scheduler/Scheduler.utils.ts
|
|
6
|
+
function i(e, t = []) {
|
|
7
|
+
let n = Array.from({ length: 7 }, (t, n) => e.add(n, "day")), i = e, a = e.add(6, "day").endOf("day"), o = t.map((e) => {
|
|
8
|
+
let t = r(e.startDate), n = r(e.endDate).endOf("day"), o = t.isBefore(i) ? i : t, s = n.isAfter(a) ? a : n, c = o.diff(i, "day"), l = s.diff(o, "day") + 1;
|
|
9
|
+
return {
|
|
10
|
+
...e,
|
|
11
|
+
start: c,
|
|
12
|
+
end: c + l - 1
|
|
13
|
+
};
|
|
14
|
+
}).filter((e) => e.start <= 6 && e.end >= 0);
|
|
15
|
+
return {
|
|
16
|
+
days: n.map((e) => e),
|
|
17
|
+
scheduleEvents: o
|
|
18
|
+
};
|
|
15
19
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
(u) => s(u.startDate).isBefore(e.endOf("day")) && s(u.endDate).isAfter(e.startOf("day"))
|
|
19
|
-
);
|
|
20
|
+
function a(e, t) {
|
|
21
|
+
return e.filter((e) => r(e.startDate).isBefore(t.endOf("day")) && r(e.endDate).isAfter(t.startOf("day")));
|
|
20
22
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
_end: Math.min(
|
|
31
|
-
s(t.endDate).minute() + s(t.endDate).hour() * 60,
|
|
32
|
-
i.minute() + i.hour() * 60
|
|
33
|
-
)
|
|
34
|
-
}))].sort((t, r) => t._start - r._start), c = [];
|
|
35
|
-
let n = [], f = -1;
|
|
36
|
-
for (const t of m)
|
|
37
|
-
n.length === 0 || t._start < f ? (n.push(t), f = Math.max(f, t._end)) : (c.push(...D(n)), n = [t], f = t._end);
|
|
38
|
-
return n.length > 0 && c.push(...D(n)), c;
|
|
23
|
+
function o(e, t) {
|
|
24
|
+
let n = t.startOf("day"), i = t.endOf("day"), a = [...e.filter((e) => r(e.startDate).isBefore(i) && r(e.endDate).isAfter(n)).map((e) => ({
|
|
25
|
+
...e,
|
|
26
|
+
_start: Math.max(r(e.startDate).minute() + r(e.startDate).hour() * 60, n.minute() + n.hour() * 60),
|
|
27
|
+
_end: Math.min(r(e.endDate).minute() + r(e.endDate).hour() * 60, i.minute() + i.hour() * 60)
|
|
28
|
+
}))].sort((e, t) => e._start - t._start), o = [], c = [], l = -1;
|
|
29
|
+
for (let e of a) c.length === 0 || e._start < l ? (c.push(e), l = Math.max(l, e._end)) : (o.push(...s(c)), c = [e], l = e._end);
|
|
30
|
+
return c.length > 0 && o.push(...s(c)), o;
|
|
39
31
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const i = e.length;
|
|
64
|
-
return u.forEach((a) => a.totalColumns = i), u;
|
|
32
|
+
function s(e) {
|
|
33
|
+
let t = [], n = [];
|
|
34
|
+
for (let r of e) {
|
|
35
|
+
let e = !1;
|
|
36
|
+
for (let i = 0; i < t.length; i++) {
|
|
37
|
+
let a = t[i];
|
|
38
|
+
if (!a.some((e) => !(e._end <= e._start || e._end <= e._start))) {
|
|
39
|
+
a.push(r), n.push({
|
|
40
|
+
...r,
|
|
41
|
+
columnIndex: i,
|
|
42
|
+
totalColumns: 0
|
|
43
|
+
}), e = !0;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
e || (t.push([r]), n.push({
|
|
48
|
+
...r,
|
|
49
|
+
columnIndex: t.length - 1,
|
|
50
|
+
totalColumns: 0
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
let r = t.length;
|
|
54
|
+
return n.forEach((e) => e.totalColumns = r), n;
|
|
65
55
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
function c(e) {
|
|
57
|
+
let t = r(e);
|
|
58
|
+
return t.hour() * 60 + t.minute();
|
|
69
59
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return t.map(([{ id: r, value: d }, { value: l }]) => ({
|
|
91
|
-
id: r || `${m}-${d}-${l}`,
|
|
92
|
-
startDate: s(a).hour(Math.floor(d)).minute(d % 1 * 60).format("YYYY-MM-DD HH:mm"),
|
|
93
|
-
endDate: s(a).hour(Math.floor(l)).minute(l % 1 * 60).format("YYYY-MM-DD HH:mm")
|
|
94
|
-
}));
|
|
95
|
-
});
|
|
60
|
+
function l(i, a, { schedules: o, mergedTimeBlocks: s = !1 }) {
|
|
61
|
+
return t(i, a).flatMap(({ value: t }, i) => {
|
|
62
|
+
let a = o.filter(({ startDate: n, endDate: i, dayFlag: a }) => {
|
|
63
|
+
let o = r(n), s = r(i);
|
|
64
|
+
return o.isAfter(t) || s.isBefore(t) ? !1 : a.some((n) => e(n) === r(t).day());
|
|
65
|
+
}).filter(({ oneDayDate: e }) => e ? r(e).isSame(t, "date") : !0).flatMap(({ id: e, startTime: t, endTime: r }) => n(Number(t), Number(r), {
|
|
66
|
+
step: s ? r - t : void 0,
|
|
67
|
+
pairs: !s
|
|
68
|
+
}).map(({ value: t, label: n }) => ({
|
|
69
|
+
id: e,
|
|
70
|
+
value: t,
|
|
71
|
+
label: n
|
|
72
|
+
}))), c = [];
|
|
73
|
+
for (let e = 0; e < a.length; e += 2) c.push(a.slice(e, e + 2));
|
|
74
|
+
return c.map(([{ id: e, value: n }, { value: a }]) => ({
|
|
75
|
+
id: e || `${i}-${n}-${a}`,
|
|
76
|
+
startDate: r(t).hour(Math.floor(n)).minute(n % 1 * 60).format("YYYY-MM-DD HH:mm"),
|
|
77
|
+
endDate: r(t).hour(Math.floor(a)).minute(a % 1 * 60).format("YYYY-MM-DD HH:mm")
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
96
80
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
81
|
+
function u(e, t) {
|
|
82
|
+
return !(t.minDate && e.isBefore(t.minDate) || t.maxDate && e.isAfter(t.maxDate));
|
|
99
83
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
B as checkIsDateInRange,
|
|
103
|
-
Y as generateWeek,
|
|
104
|
-
b as getAvailableDateRange,
|
|
105
|
-
A as getDayScheduleEvents,
|
|
106
|
-
O as getMinutesFromMidnight,
|
|
107
|
-
C as resolvePositionedScheduleEventsForDate
|
|
108
|
-
};
|
|
84
|
+
//#endregion
|
|
85
|
+
export { s as assignColumnsToGroup, u as checkIsDateInRange, i as generateWeek, l as getAvailableDateRange, a as getDayScheduleEvents, c as getMinutesFromMidnight, o as resolvePositionedScheduleEventsForDate };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
u as getAvailableDateRange
|
|
10
|
-
};
|
|
1
|
+
import e from "./ScheduleEvent/index.mjs";
|
|
2
|
+
import { getAvailableDateRange as t } from "./Scheduler.utils.mjs";
|
|
3
|
+
import n from "./Scheduler.mjs";
|
|
4
|
+
import r from "./ScheduleBlock/index.mjs";
|
|
5
|
+
//#region shared/components/Scheduler/index.ts
|
|
6
|
+
var i = n;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as ScheduleBlock, e as ScheduleEvent, i as default, t as getAvailableDateRange };
|