sapp-common-package-test-final 1.0.12 → 1.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.
@@ -4,6 +4,7 @@ interface IProps {
4
4
  filter: IFilter;
5
5
  setFilter: Dispatch<SetStateAction<IFilter>>;
6
6
  courses?: ICourse[];
7
+ onRefetchAPI: (filterDate: Date) => void;
7
8
  }
8
- declare const FilterCalendar: ({ filter, setFilter, courses }: IProps) => React.JSX.Element;
9
+ declare const FilterCalendar: ({ filter, setFilter, courses, onRefetchAPI }: IProps) => React.JSX.Element;
9
10
  export default FilterCalendar;
@@ -10,6 +10,7 @@ interface IHeaderCalendarProps {
10
10
  setCalendarMode: Dispatch<SetStateAction<CalendarMode>>;
11
11
  toggleTurnOnFilter: () => void;
12
12
  filter: IFilter;
13
+ hasFilter: boolean;
13
14
  }
14
- declare const LMSHeaderCalendar: ({ title, showTeacherName, currentDate, setCurrentDate, calendarMode, setCalendarMode, toggleTurnOnFilter, filter }: IHeaderCalendarProps) => React.JSX.Element;
15
+ declare const LMSHeaderCalendar: ({ title, showTeacherName, currentDate, setCurrentDate, calendarMode, setCalendarMode, toggleTurnOnFilter, filter, hasFilter }: IHeaderCalendarProps) => React.JSX.Element;
15
16
  export default LMSHeaderCalendar;
@@ -10,6 +10,7 @@ interface IWeeklyCalendarProps {
10
10
  onOpenCreate: (date: Date) => void;
11
11
  onEventDetail?: (event: IEvent) => void;
12
12
  loading?: boolean;
13
+ type?: 'OPS' | 'LMS';
13
14
  }
14
15
  declare const LMSWeeklyCalendar: ({ startDate, events, onOpenDetail, onOpenCreate, onEventDetail, loading }: IWeeklyCalendarProps) => React.JSX.Element;
15
16
  export default LMSWeeklyCalendar;
@@ -8,5 +8,5 @@ interface IWeeklyCellProps {
8
8
  onOpenCreate: (date: Date) => void;
9
9
  onEventDetail?: (event: IEvent) => void;
10
10
  }
11
- declare const LMSWeeklyCell: ({ events, date, onOpenDetail, onOpenCreate, onEventDetail }: IWeeklyCellProps) => React.JSX.Element;
11
+ declare const LMSWeeklyCell: ({ events, date, onOpenDetail, onOpenCreate, onEventDetail, }: IWeeklyCellProps) => React.JSX.Element;
12
12
  export default LMSWeeklyCell;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IWeeklyCalendarProps } from '../WeeklyCalendar/WeeklyCalendar';
3
+ export default function LMSModeWeeklyCalendar({ startDate, endDate, events, norms, showWeeklyNorm, onOpenDetail, onOpenCreate, onEventDetail, loading }: IWeeklyCalendarProps): React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ICourse, IEvent, IFilter, INorm } from '../../types';
3
+ import { CALENDAR_TYPE } from '../../constants';
3
4
  interface IAntdCalendarProps {
4
5
  events: IEvent[];
5
6
  norms?: INorm[];
@@ -11,9 +12,11 @@ interface IAntdCalendarProps {
11
12
  onRefetchAPI: (startDate: Date, endDate: Date) => Promise<void>;
12
13
  onEventDetail?: (event: IEvent) => void;
13
14
  loading?: boolean;
14
- type?: 'normal' | 'filter';
15
- onFilter?: (filter: IFilter) => void;
15
+ type?: string;
16
16
  courses?: ICourse[];
17
+ onfilter?: (filter: IFilter) => void;
18
+ hasFilter?: boolean;
19
+ headerType?: CALENDAR_TYPE.OPS | CALENDAR_TYPE.LMS;
17
20
  }
18
- declare const SAPPCalendar: ({ teacherName, events, norms, showTeacherName, showWeeklyNorm, onOpenDetail, onOpenCreate, onRefetchAPI, onEventDetail, loading, type, courses, onFilter }: IAntdCalendarProps) => React.JSX.Element;
21
+ declare const SAPPCalendar: ({ teacherName, events, norms, showTeacherName, showWeeklyNorm, onOpenDetail, onOpenCreate, onRefetchAPI, onEventDetail, loading, type, courses, onfilter, hasFilter, headerType }: IAntdCalendarProps) => React.JSX.Element;
19
22
  export default SAPPCalendar;
@@ -1,7 +1,7 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import React from 'react';
3
3
  import { IEvent, INorm } from '../../../types';
4
- interface IWeeklyCalendarProps {
4
+ export interface IWeeklyCalendarProps {
5
5
  startDate: Dayjs;
6
6
  endDate: Dayjs;
7
7
  events: IEvent[];
@@ -11,6 +11,7 @@ interface IWeeklyCalendarProps {
11
11
  onOpenCreate: (date: Date) => void;
12
12
  onEventDetail?: (event: IEvent) => void;
13
13
  loading?: boolean;
14
+ type?: 'LMS' | 'OPS';
14
15
  }
15
- declare const WeeklyCalendar: ({ startDate, endDate, events, norms, showWeeklyNorm, onOpenDetail, onOpenCreate, onEventDetail, loading }: IWeeklyCalendarProps) => React.JSX.Element;
16
+ declare const WeeklyCalendar: ({ startDate, endDate, events, norms, showWeeklyNorm, onOpenDetail, onOpenCreate, onEventDetail, loading, type }: IWeeklyCalendarProps) => React.JSX.Element;
16
17
  export default WeeklyCalendar;
@@ -4,6 +4,7 @@ interface IWeeklyEventProps {
4
4
  event: IEvent;
5
5
  onOpenDetail: (date: Date, events: IEvent[]) => void;
6
6
  onEventDetail?: (event: IEvent) => void;
7
+ zIndex: number;
7
8
  }
8
- declare const WeeklyEvent: ({ event, onOpenDetail, onEventDetail }: IWeeklyEventProps) => React.JSX.Element;
9
+ declare const WeeklyEvent: ({ event, onOpenDetail, onEventDetail, zIndex }: IWeeklyEventProps) => React.JSX.Element;
9
10
  export default WeeklyEvent;
@@ -2,8 +2,7 @@ import React from 'react';
2
2
  interface IIconProps {
3
3
  icon: React.ReactNode;
4
4
  onClick?: () => void;
5
- iconStyle?: any;
6
- className?: any;
5
+ className?: string;
7
6
  }
8
7
  declare const Icon: ({ icon, onClick, className }: IIconProps) => React.JSX.Element;
9
8
  export default Icon;
@@ -1,6 +1,10 @@
1
1
  export declare const HOURS_PER_DAY = 24;
2
2
  export declare const MINUTES_PER_HOUR = 60;
3
3
  export declare const TIME_FORMAT = "HH:mm";
4
+ export declare const MIN_HEIGHT_HIDE_DETAILS = 140;
5
+ export declare const MIN_HEIGHT_HIDE_ALL = 105;
6
+ export declare const MIN_HEIGHT_EVENT = 50;
7
+ export declare const BORDER_WEEKLY_CELL = 1;
4
8
  export declare enum DAYS_OF_WEEK {
5
9
  Monday = "Monday",
6
10
  Tuesday = "Tuesday",
@@ -42,13 +46,14 @@ export declare enum HOUR_OF_DAY {
42
46
  export declare enum EVENT_TYPES {
43
47
  TEACHING = "TEACHING",
44
48
  BUSY = "BUSY",
45
- TIME_OFF = "TIME_OFF",
46
- OTHER = "OTHER"
49
+ HOLIDAY = "HOLIDAY",
50
+ OTHER = "OTHER",
51
+ LIVE_ONLINE = "LIVE_ONLINE"
52
+ }
53
+ export declare enum FORMAT_DATE_CARLENDA {
54
+ MONTH_AND_WEEK = "MMMM DD",
55
+ DATE = "DD"
47
56
  }
48
- export declare const FORMAT_DATE_CARLENDA: {
49
- MONTH_AND_WEEK: string;
50
- DATE: string;
51
- };
52
57
  export declare enum LEARNING_MODE {
53
58
  ONLINE = "ONLINE",
54
59
  LIVE_ONLINE = "LIVE_ONLINE",
@@ -56,5 +61,10 @@ export declare enum LEARNING_MODE {
56
61
  CASE_STUDY = "CASE_STUDY",
57
62
  HOLIDAY = "HOLIDAY",
58
63
  OVERDUE = "OVERDUE",
59
- TEST = "TEST"
64
+ TEST = "TEST",
65
+ KEY_BEFORE_CONTENT = "KEY_BEFORE_CONTENT"
66
+ }
67
+ export declare enum CALENDAR_TYPE {
68
+ OPS = "OPS",
69
+ LMS = "LMS"
60
70
  }
@@ -1,16 +1,19 @@
1
1
  import React from 'react';
2
+ import { IEvent } from '../types';
2
3
  export declare const Left: () => React.JSX.Element;
3
4
  export declare const Right: () => React.JSX.Element;
4
5
  export declare const Book: () => React.JSX.Element;
5
6
  export declare const CalendarDelete: () => React.JSX.Element;
6
7
  export declare const CalendarAccept: () => React.JSX.Element;
7
8
  export declare const Star: () => React.JSX.Element;
8
- export declare const LeftArrowIcon: () => React.JSX.Element;
9
- export declare const RightArrowIcon: () => React.JSX.Element;
10
- export declare const FilterIcon: () => React.JSX.Element;
9
+ export declare const TestIcon: () => React.JSX.Element;
10
+ export declare const HiddenEyeIcon: () => React.JSX.Element;
11
+ export declare const EyeIcon: () => React.JSX.Element;
12
+ export declare const FlagIcon: () => React.JSX.Element;
13
+ export declare const GoldStarIcon: () => React.JSX.Element;
11
14
  export declare const TagIcon: () => React.JSX.Element;
12
15
  export declare const EducationIcon: () => React.JSX.Element;
13
- export declare const BookIcon: () => React.JSX.Element;
14
- export declare const GoldStarIcon: () => React.JSX.Element;
15
- export declare const EyeIcon: () => React.JSX.Element;
16
- export declare const HiddenEyeIcon: () => React.JSX.Element;
16
+ export declare const FilterIcon: () => React.JSX.Element;
17
+ export declare const LeftArrowIcon: () => React.JSX.Element;
18
+ export declare const RightArrowIcon: () => React.JSX.Element;
19
+ export declare const getIconforEvent: (event: IEvent) => "" | React.JSX.Element | React.JSX.Element[];