@pezeshk-book/modules 0.2.8 → 0.2.10
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/calendar/calendar.d.ts +3 -0
- package/{dist/calendar → calendar}/calendar.js +32 -8
- package/calendar/calendar.js.map +1 -0
- package/{dist/calendar → calendar}/calendar.props.d.ts +5 -2
- package/package.json +1 -1
- package/.eslintrc.json +0 -133
- package/calendar/calendar.props.ts +0 -25
- package/calendar/calendar.tsx +0 -185
- package/calendar/config/chunk.ts +0 -42
- package/calendar/config/create-date-range.ts +0 -14
- package/calendar/config/days-in-month.en.ts +0 -47
- package/calendar/config/days-in-month.fa.ts +0 -37
- package/calendar/config/index.ts +0 -16
- package/calendar/config/months.ts +0 -29
- package/calendar/config/week-day.ts +0 -19
- package/calendar/icons/arrow-left-icon.tsx +0 -14
- package/calendar/icons/arrow-right-icon.tsx +0 -14
- package/calendar/icons/index.ts +0 -7
- package/calendar/index.ts +0 -3
- package/calendar/shared/formatDate.tsx +0 -12
- package/calendar/sub-components/day/day.props.ts +0 -27
- package/calendar/sub-components/day/day.tsx +0 -31
- package/calendar/sub-components/days/days.props.ts +0 -51
- package/calendar/sub-components/days/days.tsx +0 -142
- package/calendar/sub-components/days-head/days-head.props.ts +0 -27
- package/calendar/sub-components/days-head/days-head.tsx +0 -122
- package/countdown-timer/countdown.props.ts +0 -18
- package/countdown-timer/countdown.tsx +0 -79
- package/countdown-timer/index.ts +0 -3
- package/data-table/data-table.props.ts +0 -7
- package/data-table/data-table.tsx +0 -17
- package/data-table/default/default-data-table.props.ts +0 -47
- package/data-table/default/default-data-table.tsx +0 -427
- package/data-table/default/index.ts +0 -3
- package/data-table/hooks/use-window-dimensions.tsx +0 -33
- package/data-table/icons/add.tsx +0 -10
- package/data-table/icons/arrow-down.tsx +0 -11
- package/data-table/icons/index.ts +0 -9
- package/data-table/icons/sort.tsx +0 -16
- package/data-table/index.ts +0 -3
- package/data-table/simple/index.ts +0 -3
- package/data-table/simple/simple-data-table.props.ts +0 -23
- package/data-table/simple/simple-data-table.tsx +0 -258
- package/dist/calendar/calendar.d.ts +0 -3
- package/dist/calendar/calendar.js.map +0 -1
- package/index.ts +0 -13
- package/pagination/icons/arrow-Right.tsx +0 -22
- package/pagination/icons/arrow-left.tsx +0 -22
- package/pagination/icons/index.ts +0 -7
- package/pagination/index.ts +0 -3
- package/pagination/pagination.props.ts +0 -33
- package/pagination/pagination.tsx +0 -135
- package/pagination/use-pagination.ts +0 -49
- package/react-app-env.d.ts +0 -1
- package/slider/index.ts +0 -3
- package/slider/slider.props.ts +0 -39
- package/slider/slider.tsx +0 -292
- package/stories/calendar/calendar.stories.tsx +0 -25
- package/stories/calendar/calendar.tsx +0 -11
- package/stories/count-down/count-down.stories.tsx +0 -19
- package/stories/count-down/count-down.tsx +0 -11
- package/stories/data-table/data-table-columns.tsx +0 -70
- package/stories/data-table/default-data-table.stories.tsx +0 -22
- package/stories/data-table/default-data-table.tsx +0 -18
- package/stories/data-table/dummy-data.ts +0 -204
- package/stories/data-table/simple-data-table.stories.tsx +0 -22
- package/stories/data-table/simple-data-table.tsx +0 -18
- package/stories/pagination/pagination.stories.tsx +0 -35
- package/stories/pagination/pagination.tsx +0 -11
- package/stories/slider/slider.stories.tsx +0 -19
- package/stories/slider/slider.tsx +0 -45
- package/stories/wrapper.tsx +0 -11
- package/styles.css +0 -28
- package/utils/class-names.ts +0 -5
- package/utils/persian-to-english-number.ts +0 -4
- /package/{dist/calendar → calendar}/calendar.props.js +0 -0
- /package/{dist/calendar → calendar}/calendar.props.js.map +0 -0
- /package/{dist/calendar → calendar}/config/chunk.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/chunk.js +0 -0
- /package/{dist/calendar → calendar}/config/chunk.js.map +0 -0
- /package/{dist/calendar → calendar}/config/create-date-range.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/create-date-range.js +0 -0
- /package/{dist/calendar → calendar}/config/create-date-range.js.map +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.en.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.en.js +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.en.js.map +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.fa.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.fa.js +0 -0
- /package/{dist/calendar → calendar}/config/days-in-month.fa.js.map +0 -0
- /package/{dist/calendar → calendar}/config/index.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/index.js +0 -0
- /package/{dist/calendar → calendar}/config/index.js.map +0 -0
- /package/{dist/calendar → calendar}/config/months.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/months.js +0 -0
- /package/{dist/calendar → calendar}/config/months.js.map +0 -0
- /package/{dist/calendar → calendar}/config/week-day.d.ts +0 -0
- /package/{dist/calendar → calendar}/config/week-day.js +0 -0
- /package/{dist/calendar → calendar}/config/week-day.js.map +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-left-icon.d.ts +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-left-icon.js +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-left-icon.js.map +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-right-icon.d.ts +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-right-icon.js +0 -0
- /package/{dist/calendar → calendar}/icons/arrow-right-icon.js.map +0 -0
- /package/{dist/calendar → calendar}/icons/index.d.ts +0 -0
- /package/{dist/calendar → calendar}/icons/index.js +0 -0
- /package/{dist/calendar → calendar}/icons/index.js.map +0 -0
- /package/{dist/calendar → calendar}/index.d.ts +0 -0
- /package/{dist/calendar → calendar}/index.js +0 -0
- /package/{dist/calendar → calendar}/index.js.map +0 -0
- /package/{dist/calendar → calendar}/shared/formatDate.d.ts +0 -0
- /package/{dist/calendar → calendar}/shared/formatDate.js +0 -0
- /package/{dist/calendar → calendar}/shared/formatDate.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.props.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.props.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/day/day.props.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.props.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.props.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/days/days.props.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.js.map +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.props.d.ts +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.props.js +0 -0
- /package/{dist/calendar → calendar}/sub-components/days-head/days-head.props.js.map +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.d.ts +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.js +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.js.map +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.props.d.ts +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.props.js +0 -0
- /package/{dist/countdown-timer → countdown-timer}/countdown.props.js.map +0 -0
- /package/{dist/countdown-timer → countdown-timer}/index.d.ts +0 -0
- /package/{dist/countdown-timer → countdown-timer}/index.js +0 -0
- /package/{dist/countdown-timer → countdown-timer}/index.js.map +0 -0
- /package/{dist/data-table → data-table}/data-table.d.ts +0 -0
- /package/{dist/data-table → data-table}/data-table.js +0 -0
- /package/{dist/data-table → data-table}/data-table.js.map +0 -0
- /package/{dist/data-table → data-table}/data-table.props.d.ts +0 -0
- /package/{dist/data-table → data-table}/data-table.props.js +0 -0
- /package/{dist/data-table → data-table}/data-table.props.js.map +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.d.ts +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.js +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.js.map +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.props.d.ts +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.props.js +0 -0
- /package/{dist/data-table → data-table}/default/default-data-table.props.js.map +0 -0
- /package/{dist/data-table → data-table}/default/index.d.ts +0 -0
- /package/{dist/data-table → data-table}/default/index.js +0 -0
- /package/{dist/data-table → data-table}/default/index.js.map +0 -0
- /package/{dist/data-table → data-table}/hooks/use-window-dimensions.d.ts +0 -0
- /package/{dist/data-table → data-table}/hooks/use-window-dimensions.js +0 -0
- /package/{dist/data-table → data-table}/hooks/use-window-dimensions.js.map +0 -0
- /package/{dist/data-table → data-table}/icons/add.d.ts +0 -0
- /package/{dist/data-table → data-table}/icons/add.js +0 -0
- /package/{dist/data-table → data-table}/icons/add.js.map +0 -0
- /package/{dist/data-table → data-table}/icons/arrow-down.d.ts +0 -0
- /package/{dist/data-table → data-table}/icons/arrow-down.js +0 -0
- /package/{dist/data-table → data-table}/icons/arrow-down.js.map +0 -0
- /package/{dist/data-table → data-table}/icons/index.d.ts +0 -0
- /package/{dist/data-table → data-table}/icons/index.js +0 -0
- /package/{dist/data-table → data-table}/icons/index.js.map +0 -0
- /package/{dist/data-table → data-table}/icons/sort.d.ts +0 -0
- /package/{dist/data-table → data-table}/icons/sort.js +0 -0
- /package/{dist/data-table → data-table}/icons/sort.js.map +0 -0
- /package/{dist/data-table → data-table}/index.d.ts +0 -0
- /package/{dist/data-table → data-table}/index.js +0 -0
- /package/{dist/data-table → data-table}/index.js.map +0 -0
- /package/{dist/data-table → data-table}/simple/index.d.ts +0 -0
- /package/{dist/data-table → data-table}/simple/index.js +0 -0
- /package/{dist/data-table → data-table}/simple/index.js.map +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.d.ts +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.js +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.js.map +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.props.d.ts +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.props.js +0 -0
- /package/{dist/data-table → data-table}/simple/simple-data-table.props.js.map +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/index.js.map → index.js.map} +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-Right.d.ts +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-Right.js +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-Right.js.map +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-left.d.ts +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-left.js +0 -0
- /package/{dist/pagination → pagination}/icons/arrow-left.js.map +0 -0
- /package/{dist/pagination → pagination}/icons/index.d.ts +0 -0
- /package/{dist/pagination → pagination}/icons/index.js +0 -0
- /package/{dist/pagination → pagination}/icons/index.js.map +0 -0
- /package/{dist/pagination → pagination}/index.d.ts +0 -0
- /package/{dist/pagination → pagination}/index.js +0 -0
- /package/{dist/pagination → pagination}/index.js.map +0 -0
- /package/{dist/pagination → pagination}/pagination.d.ts +0 -0
- /package/{dist/pagination → pagination}/pagination.js +0 -0
- /package/{dist/pagination → pagination}/pagination.js.map +0 -0
- /package/{dist/pagination → pagination}/pagination.props.d.ts +0 -0
- /package/{dist/pagination → pagination}/pagination.props.js +0 -0
- /package/{dist/pagination → pagination}/pagination.props.js.map +0 -0
- /package/{dist/pagination → pagination}/use-pagination.d.ts +0 -0
- /package/{dist/pagination → pagination}/use-pagination.js +0 -0
- /package/{dist/pagination → pagination}/use-pagination.js.map +0 -0
- /package/{dist/slider → slider}/index.d.ts +0 -0
- /package/{dist/slider → slider}/index.js +0 -0
- /package/{dist/slider → slider}/index.js.map +0 -0
- /package/{dist/slider → slider}/slider.d.ts +0 -0
- /package/{dist/slider → slider}/slider.js +0 -0
- /package/{dist/slider → slider}/slider.js.map +0 -0
- /package/{dist/slider → slider}/slider.props.d.ts +0 -0
- /package/{dist/slider → slider}/slider.props.js +0 -0
- /package/{dist/slider → slider}/slider.props.js.map +0 -0
- /package/{dist/utils → utils}/class-names.d.ts +0 -0
- /package/{dist/utils → utils}/class-names.js +0 -0
- /package/{dist/utils → utils}/class-names.js.map +0 -0
- /package/{dist/utils → utils}/persian-to-english-number.d.ts +0 -0
- /package/{dist/utils → utils}/persian-to-english-number.js +0 -0
- /package/{dist/utils → utils}/persian-to-english-number.js.map +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const ArrowLeftIcon = () => {
|
|
2
|
-
return (
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="6" height="12" viewBox="0 0 6 12">
|
|
4
|
-
<path
|
|
5
|
-
fill={'currentColor'}
|
|
6
|
-
transform="rotate(-90 6 6)"
|
|
7
|
-
data-name="Path 28691"
|
|
8
|
-
d="M5.29.253a1.121 1.121 0 0 1 1.419 0l5 4.28a.775.775 0 0 1 0 1.215 1.126 1.126 0 0 1-1.419 0L6 2.068l-4.287 3.68a1.126 1.126 0 0 1-1.419 0 .775.775 0 0 1 0-1.215z"
|
|
9
|
-
/>
|
|
10
|
-
</svg>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default ArrowLeftIcon;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const ArrowRightIcon = () => {
|
|
2
|
-
return (
|
|
3
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="6" height="12" viewBox="0 0 6 12">
|
|
4
|
-
<path
|
|
5
|
-
fill={'currentColor'}
|
|
6
|
-
transform="rotate(-90 6 6)"
|
|
7
|
-
data-name="Path 28692"
|
|
8
|
-
d="M5.29 5.747a1.121 1.121 0 0 0 1.419 0l5-4.28a.775.775 0 0 0 0-1.215 1.126 1.126 0 0 0-1.419 0L6 3.932 1.713.252a1.126 1.126 0 0 0-1.419 0 .775.775 0 0 0 0 1.215z"
|
|
9
|
-
/>
|
|
10
|
-
</svg>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default ArrowRightIcon;
|
package/calendar/icons/index.ts
DELETED
package/calendar/index.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import DateObject from 'react-date-object';
|
|
2
|
-
import persian from 'react-date-object/calendars/persian';
|
|
3
|
-
import gregorian from 'react-date-object/calendars/gregorian';
|
|
4
|
-
|
|
5
|
-
export default function formatDate(data: Date | number | string, format: string = 'YYYY-MM-DD', type: 'gregorian' | 'jalali') {
|
|
6
|
-
if (data) {
|
|
7
|
-
const date = new DateObject(data);
|
|
8
|
-
date.calendar = type === 'gregorian' ? gregorian : persian;
|
|
9
|
-
return date.format(format);
|
|
10
|
-
}
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface DayProps {
|
|
2
|
-
isSelecting?: boolean;
|
|
3
|
-
|
|
4
|
-
selectedDay?: boolean;
|
|
5
|
-
|
|
6
|
-
selected: boolean;
|
|
7
|
-
|
|
8
|
-
handleDay: ((event: string) => void);
|
|
9
|
-
|
|
10
|
-
children: any;
|
|
11
|
-
|
|
12
|
-
disabledDay?: boolean;
|
|
13
|
-
|
|
14
|
-
holidays?: boolean;
|
|
15
|
-
|
|
16
|
-
passedDay?: boolean;
|
|
17
|
-
|
|
18
|
-
comingDay?: boolean;
|
|
19
|
-
|
|
20
|
-
isRange?: boolean
|
|
21
|
-
|
|
22
|
-
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge'
|
|
23
|
-
|
|
24
|
-
startRange?: boolean
|
|
25
|
-
|
|
26
|
-
endRange?: boolean
|
|
27
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DayProps } from './day.props';
|
|
2
|
-
import classNames from '../../../utils/class-names';
|
|
3
|
-
import { Button, Div } from '@pezeshk-book/ui-kit';
|
|
4
|
-
|
|
5
|
-
export const Day = (props: DayProps) => {
|
|
6
|
-
const { children, disabledDay, holidays, passedDay, comingDay, selectedDay, selected, handleDay, isRange, startRange, endRange } = props;
|
|
7
|
-
|
|
8
|
-
if (!children) {
|
|
9
|
-
return <Div {...props}/>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const color = passedDay ? 'control' : selected ? 'primary' : isRange ? 'slate' : selectedDay ? 'primary' : (disabledDay || holidays ? 'danger' : 'inherit');
|
|
13
|
-
const variant = selected ? 'filled' : (isRange ? 'outlined' : 'text');
|
|
14
|
-
return (
|
|
15
|
-
<Button
|
|
16
|
-
disabled={comingDay || passedDay}
|
|
17
|
-
variant={variant}
|
|
18
|
-
rounded={isRange ? 'none' : 'medium'}
|
|
19
|
-
size={'medium'}
|
|
20
|
-
shape={'square'}
|
|
21
|
-
color={color}
|
|
22
|
-
className={classNames(
|
|
23
|
-
isRange ? 'border-l-0 border-r-0 border-dashed' : '',
|
|
24
|
-
startRange && isRange ? 'rounded-r-lg rounded-l-none' : '',
|
|
25
|
-
endRange && isRange ? 'rounded-l-lg rounded-r-none' : '',
|
|
26
|
-
)}
|
|
27
|
-
onClick={handleDay}
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export interface DaysProps {
|
|
2
|
-
days: Array<object>;
|
|
3
|
-
|
|
4
|
-
monthName: string;
|
|
5
|
-
|
|
6
|
-
selectedDay: string;
|
|
7
|
-
|
|
8
|
-
disablePreviousMonths: boolean;
|
|
9
|
-
|
|
10
|
-
disableSubsequentMonths: boolean;
|
|
11
|
-
|
|
12
|
-
disablePreviousDays: boolean;
|
|
13
|
-
|
|
14
|
-
disableSubsequentDays: boolean;
|
|
15
|
-
|
|
16
|
-
daysEventListeners: any;
|
|
17
|
-
|
|
18
|
-
increaseMonth: () => void;
|
|
19
|
-
|
|
20
|
-
decreaseMonth: () => void;
|
|
21
|
-
|
|
22
|
-
isDatePicker: boolean;
|
|
23
|
-
|
|
24
|
-
selected: string | Date | undefined;
|
|
25
|
-
|
|
26
|
-
selectDateHandlers: any;
|
|
27
|
-
|
|
28
|
-
year: string;
|
|
29
|
-
|
|
30
|
-
date: any;
|
|
31
|
-
|
|
32
|
-
dateFormat: string;
|
|
33
|
-
|
|
34
|
-
type: 'gregorian' | 'jalali'
|
|
35
|
-
|
|
36
|
-
holidays?: Array<string>
|
|
37
|
-
|
|
38
|
-
variant: 'simple' | 'range'
|
|
39
|
-
|
|
40
|
-
selectDateRangeHandlers: any
|
|
41
|
-
|
|
42
|
-
rangeDate: any
|
|
43
|
-
|
|
44
|
-
rangeDates: Array<string>
|
|
45
|
-
|
|
46
|
-
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge'
|
|
47
|
-
|
|
48
|
-
changeMonth: (monthIndex: number) => void
|
|
49
|
-
|
|
50
|
-
changeYear: (year: string) => void
|
|
51
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { DaysProps } from './days.props';
|
|
2
|
-
import DaysHead from '../days-head/days-head';
|
|
3
|
-
import { Day } from '../day/day';
|
|
4
|
-
import { chunk, fa, IDays, weekDayNames } from '../../config';
|
|
5
|
-
import DateObject from 'react-date-object';
|
|
6
|
-
import persian from 'react-date-object/calendars/persian';
|
|
7
|
-
import gregorian from 'react-date-object/calendars/gregorian';
|
|
8
|
-
import { Div, Divider, Text } from '@pezeshk-book/ui-kit';
|
|
9
|
-
|
|
10
|
-
const boolDataset = (arg: boolean) => {
|
|
11
|
-
if (arg) {
|
|
12
|
-
return {
|
|
13
|
-
'data-disable': arg,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
return null;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const Days = (props: DaysProps) => {
|
|
20
|
-
const {
|
|
21
|
-
days,
|
|
22
|
-
selected,
|
|
23
|
-
selectDateHandlers,
|
|
24
|
-
monthName,
|
|
25
|
-
disablePreviousMonths,
|
|
26
|
-
disableSubsequentMonths,
|
|
27
|
-
disablePreviousDays,
|
|
28
|
-
disableSubsequentDays,
|
|
29
|
-
increaseMonth,
|
|
30
|
-
decreaseMonth,
|
|
31
|
-
selectedDay,
|
|
32
|
-
year,
|
|
33
|
-
date,
|
|
34
|
-
dateFormat,
|
|
35
|
-
type,
|
|
36
|
-
holidays,
|
|
37
|
-
variant,
|
|
38
|
-
selectDateRangeHandlers,
|
|
39
|
-
rangeDate,
|
|
40
|
-
rangeDates,
|
|
41
|
-
size,
|
|
42
|
-
changeMonth,
|
|
43
|
-
changeYear,
|
|
44
|
-
} = props;
|
|
45
|
-
|
|
46
|
-
const handleDayClick = (day: IDays): void => {
|
|
47
|
-
selectDateHandlers(day);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const handleRangeClick = (day: IDays): void => {
|
|
51
|
-
if (rangeDate.start && !rangeDate.end && rangeDate.start.gregorianDate < day.gregorianDate) {
|
|
52
|
-
selectDateRangeHandlers({ start: rangeDate.start, end: day });
|
|
53
|
-
} else if (rangeDate.start && !rangeDate.end && rangeDate.start.gregorianDate > day.gregorianDate) {
|
|
54
|
-
selectDateRangeHandlers({ start: day, end: rangeDate.start });
|
|
55
|
-
} else {
|
|
56
|
-
selectDateRangeHandlers({ start: day, end: null });
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const weeks = chunk(days, 7);
|
|
61
|
-
const dates = new DateObject({ date: date, calendar: type === 'gregorian' ? gregorian : persian }).format(dateFormat);
|
|
62
|
-
if (!days.length) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const weekDays = size === 'huge' || size === 'large' ? weekDayNames[type].normal : weekDayNames[type].short;
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<Div className={'flex-1 flex-col self-center relative overflow-auto mx-1 bg-white'}>
|
|
70
|
-
<DaysHead
|
|
71
|
-
year={year}
|
|
72
|
-
monthName={monthName}
|
|
73
|
-
days={days}
|
|
74
|
-
date={date}
|
|
75
|
-
dateFormat={dateFormat}
|
|
76
|
-
disablePreviousMonths={disablePreviousMonths}
|
|
77
|
-
disableSubsequentMonths={disableSubsequentMonths}
|
|
78
|
-
increaseMonth={increaseMonth}
|
|
79
|
-
decreaseMonth={decreaseMonth}
|
|
80
|
-
changeMonth={changeMonth}
|
|
81
|
-
changeYear={changeYear}
|
|
82
|
-
type={type}
|
|
83
|
-
size={size}
|
|
84
|
-
/>
|
|
85
|
-
<Div className={'flex-col items-center flex-1 gap-4'} data-testid="days-wrapper">
|
|
86
|
-
<Div dir={type === 'gregorian' ? 'ltr' : 'rtl'} className={'grid grid-cols-7 w-full'}>
|
|
87
|
-
{weekDays.map(name => (
|
|
88
|
-
<Text typography={'xs'} type={'regular'} color={'black'} key={name}>{name}</Text>
|
|
89
|
-
))}
|
|
90
|
-
</Div>
|
|
91
|
-
<Divider color={'control'}/>
|
|
92
|
-
<Div className={'flex-col w-full gap-y-4'}>
|
|
93
|
-
{weeks.map((week, idx) => {
|
|
94
|
-
return (
|
|
95
|
-
<Div dir={type === 'gregorian' ? 'ltr' : 'rtl'} className={'grid grid-flow-col grid-cols-7 w-full'} data-testid="days" key={`rdp-weeks-${idx}`}>
|
|
96
|
-
{week.map((day: IDays, id: any) => {
|
|
97
|
-
return (
|
|
98
|
-
<Day
|
|
99
|
-
key={type === 'gregorian' ? day.gregorianDate : day.jalaliDate}
|
|
100
|
-
passedDay={disablePreviousDays && (type === 'gregorian' ? day.gregorianDate : day.jalaliDate) < dates}
|
|
101
|
-
comingDay={disableSubsequentDays && (type === 'gregorian' ? day.gregorianDate : day.jalaliDate) > dates}
|
|
102
|
-
holidays={holidays && holidays.indexOf(day.gregorianDate) !== -1}
|
|
103
|
-
data-testid={`day-${idx * 7 + id + 1}`}
|
|
104
|
-
data-fadate={`${type === 'gregorian' ? day.gregorianDate : day.jalaliDate}`}
|
|
105
|
-
disabledDay={week.length === 7 && id === 6}
|
|
106
|
-
selectedDay={selectedDay === (type === 'gregorian' ? day.gregorianDate : day.jalaliDate)}
|
|
107
|
-
selected={
|
|
108
|
-
variant === 'simple' ? (selected === day.jalaliDate || selected === day.gregorianDate)
|
|
109
|
-
: (rangeDate.start?.jalaliDate === day.jalaliDate || rangeDate.start?.gregorianDate === day.gregorianDate) ||
|
|
110
|
-
(rangeDate.end?.jalaliDate === day.jalaliDate || rangeDate.end?.gregorianDate === day.gregorianDate)
|
|
111
|
-
}
|
|
112
|
-
isRange={rangeDates.indexOf(day.gregorianDate) !== -1}
|
|
113
|
-
startRange={type === 'jalali'
|
|
114
|
-
? rangeDate.start?.jalaliDate === day.jalaliDate || rangeDate.start?.gregorianDate === day.gregorianDate
|
|
115
|
-
: rangeDate.end?.jalaliDate === day.jalaliDate || rangeDate.end?.gregorianDate === day.gregorianDate
|
|
116
|
-
}
|
|
117
|
-
endRange={type === 'jalali'
|
|
118
|
-
? rangeDate.end?.jalaliDate === day.jalaliDate || rangeDate.end?.gregorianDate === day.gregorianDate
|
|
119
|
-
: rangeDate.start?.jalaliDate === day.jalaliDate || rangeDate.start?.gregorianDate === day.gregorianDate
|
|
120
|
-
}
|
|
121
|
-
handleDay={variant === 'simple' ? () => handleDayClick(day) : () => handleRangeClick(day)}
|
|
122
|
-
size={size}
|
|
123
|
-
{...boolDataset(day.disabled)}>
|
|
124
|
-
{!day.disabled ? fa(day.day) : null}
|
|
125
|
-
</Day>
|
|
126
|
-
);
|
|
127
|
-
})}
|
|
128
|
-
</Div>
|
|
129
|
-
);
|
|
130
|
-
})}
|
|
131
|
-
</Div>
|
|
132
|
-
</Div>
|
|
133
|
-
</Div>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
Days.defaultProps = {
|
|
138
|
-
monthName: '',
|
|
139
|
-
disableDays: [],
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export default Days;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface DaysHeadProps {
|
|
2
|
-
monthName: string;
|
|
3
|
-
|
|
4
|
-
increaseMonth?: () => void;
|
|
5
|
-
|
|
6
|
-
decreaseMonth?: () => void;
|
|
7
|
-
|
|
8
|
-
year: string;
|
|
9
|
-
|
|
10
|
-
disablePreviousMonths: boolean;
|
|
11
|
-
|
|
12
|
-
disableSubsequentMonths: boolean;
|
|
13
|
-
|
|
14
|
-
days: any;
|
|
15
|
-
|
|
16
|
-
date: string;
|
|
17
|
-
|
|
18
|
-
dateFormat: string;
|
|
19
|
-
|
|
20
|
-
type: 'gregorian' | 'jalali'
|
|
21
|
-
|
|
22
|
-
changeMonth: (monthIndex: number) => void
|
|
23
|
-
|
|
24
|
-
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge'
|
|
25
|
-
|
|
26
|
-
changeYear: (year: string) => void
|
|
27
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DaysHeadProps } from './days-head.props';
|
|
3
|
-
import { Button, Div, Text, Popper, PopperContent, PopperHandler, TextField } from '@pezeshk-book/ui-kit';
|
|
4
|
-
import { ArrowLeftIcon, ArrowRightIcon } from '../../icons';
|
|
5
|
-
import DateObject from 'react-date-object';
|
|
6
|
-
import persian from 'react-date-object/calendars/persian';
|
|
7
|
-
import gregorian from 'react-date-object/calendars/gregorian';
|
|
8
|
-
import { useState } from 'react';
|
|
9
|
-
import classNames from '../../../utils/class-names';
|
|
10
|
-
import { gregorianMonths, jalaliMonths } from '../../config/months';
|
|
11
|
-
import { persianToEnglish } from '../../../utils/persian-to-english-number';
|
|
12
|
-
|
|
13
|
-
const DaysHead = ({ decreaseMonth, increaseMonth, monthName, year, disablePreviousMonths, disableSubsequentMonths, days, date, dateFormat, type, changeMonth, size = 'medium', changeYear }: DaysHeadProps) => {
|
|
14
|
-
const [monthPopper, setMonthPopper] = useState<boolean>(false);
|
|
15
|
-
const [yearPopper, setYearPopper] = useState<boolean>(false);
|
|
16
|
-
|
|
17
|
-
const [selectedYear, setSelectedYear] = useState<string>('');
|
|
18
|
-
|
|
19
|
-
const handleMonthPoppers = () => {
|
|
20
|
-
setMonthPopper(!monthPopper);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const handleYearPoppers = () => {
|
|
24
|
-
setYearPopper(!yearPopper);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const handleSelectMonth = (value: number) => {
|
|
28
|
-
changeMonth(value);
|
|
29
|
-
handleMonthPoppers();
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const handleYearValue = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
33
|
-
setSelectedYear(e.target.value);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const handleChangeYear = () => {
|
|
37
|
-
changeYear(persianToEnglish(selectedYear));
|
|
38
|
-
handleYearPoppers();
|
|
39
|
-
handleMonthPoppers();
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const comparedFromCurrentMonth = (amount: number): boolean => {
|
|
43
|
-
const sideDatesMonth = new DateObject({ date: date, calendar: type === 'gregorian' ? gregorian : persian }).add(amount, 'month').setDay(31).format(dateFormat);
|
|
44
|
-
const lastDaySideMonthCalendarShow = new DateObject(type === 'gregorian' ? { date: days.at(-1).gregorianDate, calendar: gregorian } : { date: days.at(-1).jalaliDate, calendar: persian }).add(amount, 'month').setDay(31).format(dateFormat);
|
|
45
|
-
|
|
46
|
-
return sideDatesMonth === lastDaySideMonthCalendarShow;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<Div className={'justify-center items-center bg-white w-full self-center mb-5'}>
|
|
51
|
-
<Div className={'w-full items-center justify-between h-12'}>
|
|
52
|
-
<Button ariaLabel={'previousMonth'} variant={'text'} size={'small'} color={'control'} className={'flex items-center'} onClick={decreaseMonth} shape={'square'} disabled={disablePreviousMonths && comparedFromCurrentMonth(-1)}>
|
|
53
|
-
<Div className={'h-3 w-2.5 relative'}>
|
|
54
|
-
<ArrowRightIcon/>
|
|
55
|
-
</Div>
|
|
56
|
-
</Button>
|
|
57
|
-
<Div className={'flex items-center gap-2'}>
|
|
58
|
-
<Popper
|
|
59
|
-
handlePopper={handleMonthPoppers}
|
|
60
|
-
showPopper={monthPopper}
|
|
61
|
-
position={'bottom'}
|
|
62
|
-
className={'flex-1 z-20'}
|
|
63
|
-
>
|
|
64
|
-
<PopperHandler>
|
|
65
|
-
<Text className={'cursor-pointer'} color={'grey.900'} type={'bold'} typography={'lg'}>{monthName}</Text>
|
|
66
|
-
</PopperHandler>
|
|
67
|
-
<PopperContent className={'shadow-xl mr-10 md:mr-14'}>
|
|
68
|
-
<Div className={classNames(
|
|
69
|
-
'bg-white p-2 md:w-48 w-40 items-center justify-center',
|
|
70
|
-
size === 'medium' && 'w-56',
|
|
71
|
-
size === 'large' && 'w-64',
|
|
72
|
-
size === 'huge' && 'w-72',
|
|
73
|
-
)}>
|
|
74
|
-
{type === 'gregorian' ? (
|
|
75
|
-
<Div className={'grid grid-cols-3 gap-8 justify-between'}>
|
|
76
|
-
{gregorianMonths.map(month => (
|
|
77
|
-
<Button className={'!px-0'} onClick={() => handleSelectMonth(month.value)} variant={'text'} size={size}>{month.name}</Button>
|
|
78
|
-
))}
|
|
79
|
-
</Div>
|
|
80
|
-
) : (
|
|
81
|
-
<Div className={'grid grid-cols-3 gap-2'}>
|
|
82
|
-
{jalaliMonths.map(month => (
|
|
83
|
-
<Button className={'!px-0'} onClick={() => handleSelectMonth(month.value)} variant={'text'} size={size}>{month.name}</Button>
|
|
84
|
-
))}
|
|
85
|
-
</Div>
|
|
86
|
-
)}
|
|
87
|
-
</Div>
|
|
88
|
-
</PopperContent>
|
|
89
|
-
</Popper>
|
|
90
|
-
<Popper
|
|
91
|
-
handlePopper={handleYearPoppers}
|
|
92
|
-
showPopper={yearPopper}
|
|
93
|
-
position={'bottom'}
|
|
94
|
-
className={'flex-1 z-20'}
|
|
95
|
-
>
|
|
96
|
-
<PopperHandler>
|
|
97
|
-
<Text className={'cursor-pointer'} color={'grey.900'} type={'bold'} typography={'lg'}>{year}</Text>
|
|
98
|
-
</PopperHandler>
|
|
99
|
-
<PopperContent className={'shadow-xl md:ml-10 ml-8 rounded-lg'}>
|
|
100
|
-
<Div className={classNames(
|
|
101
|
-
'bg-white px-2 py-8 md:w-48 w-40 items-center justify-center flex-col gap-4 rounded-lg',
|
|
102
|
-
size === 'medium' && 'w-56',
|
|
103
|
-
size === 'large' && 'w-64',
|
|
104
|
-
size === 'huge' && 'w-72',
|
|
105
|
-
)}>
|
|
106
|
-
<TextField value={selectedYear} onChange={handleYearValue} label={'سال'} size={size === 'tiny' || size === 'small' ? 'tiny' : 'medium'} />
|
|
107
|
-
<Button onClick={handleChangeYear} size={size === 'tiny' || size === 'small' ? 'tiny' : 'medium'}>برو به سال</Button>
|
|
108
|
-
</Div>
|
|
109
|
-
</PopperContent>
|
|
110
|
-
</Popper>
|
|
111
|
-
</Div>
|
|
112
|
-
<Button ariaLabel={'nextMonth'} variant={'text'} size={'small'} color={'control'} className={'flex items-center'} onClick={increaseMonth} shape={'square'} disabled={disableSubsequentMonths && comparedFromCurrentMonth(1)}>
|
|
113
|
-
<Div className={'h-3 w-2.5 relative'}>
|
|
114
|
-
<ArrowLeftIcon/>
|
|
115
|
-
</Div>
|
|
116
|
-
</Button>
|
|
117
|
-
</Div>
|
|
118
|
-
</Div>
|
|
119
|
-
);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export default DaysHead;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TextProps } from '@pezeshk-book/ui-kit/text/text.props';
|
|
2
|
-
|
|
3
|
-
export interface CountdownProps {
|
|
4
|
-
|
|
5
|
-
sec: number
|
|
6
|
-
|
|
7
|
-
parentCallback?: any
|
|
8
|
-
|
|
9
|
-
reset?: boolean
|
|
10
|
-
|
|
11
|
-
variant?: 'contained' | 'outlined'
|
|
12
|
-
|
|
13
|
-
className?: string
|
|
14
|
-
|
|
15
|
-
textProps?: Omit<TextProps, 'children'>
|
|
16
|
-
|
|
17
|
-
initialColor?: 'primary' | 'success'
|
|
18
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { CountdownProps } from './countdown.props';
|
|
5
|
-
import { classNames, Div, Text } from '@pezeshk-book/ui-kit';
|
|
6
|
-
|
|
7
|
-
const CountDown = ({ sec, parentCallback, reset, variant = 'contained', className, textProps, initialColor = 'primary' }: CountdownProps) => {
|
|
8
|
-
const [timerSec, setTimerSec] = useState<number>(sec);
|
|
9
|
-
const [timerMin, setTimerMin] = useState<number>(0);
|
|
10
|
-
const [timerHour, setTimerHour] = useState<number>(0);
|
|
11
|
-
const [color, setColor] = useState<'success' | 'warning' | 'danger' | 'primary'>(initialColor);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (sec >= 3600) {
|
|
15
|
-
setTimerHour(Math.floor(sec / 3600));
|
|
16
|
-
setTimerMin(Math.floor((sec % 3600) / 60));
|
|
17
|
-
setTimerSec(Math.floor((sec % 3600) % 60));
|
|
18
|
-
} else {
|
|
19
|
-
setTimerMin(Math.floor(sec / 60));
|
|
20
|
-
setTimerSec(Math.floor(sec % 60));
|
|
21
|
-
}
|
|
22
|
-
}, [reset]);
|
|
23
|
-
|
|
24
|
-
const id = useRef(null);
|
|
25
|
-
const clear = () => {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
clearInterval(id.current);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
id.current = setInterval(() => {
|
|
33
|
-
setTimerSec((time) => time - 1);
|
|
34
|
-
}, 1000);
|
|
35
|
-
return () => clear();
|
|
36
|
-
}, [reset]);
|
|
37
|
-
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
if (timerSec === 0 && timerMin === 0 && timerHour === 0) {
|
|
40
|
-
parentCallback(true);
|
|
41
|
-
clear();
|
|
42
|
-
} else if (timerSec === -1 && timerMin !== 0) {
|
|
43
|
-
setTimerSec(59);
|
|
44
|
-
setTimerMin((time) => time - 1);
|
|
45
|
-
} else if (timerSec === -1 && timerMin === 0 && timerHour !== 0) {
|
|
46
|
-
setTimerSec(59);
|
|
47
|
-
setTimerMin(59);
|
|
48
|
-
setTimerHour((time) => time - 1);
|
|
49
|
-
}
|
|
50
|
-
const remainingTime = (timerSec + timerMin * 60 + timerHour * 3600);
|
|
51
|
-
setColor((remainingTime <= (sec / 10) ? 'danger' : (remainingTime <= (sec * 30 / 100) ? 'warning' : initialColor)));
|
|
52
|
-
}, [timerSec]);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Div dir={'rtl'} className={classNames(
|
|
56
|
-
'items-center justify-center h-full rounded',
|
|
57
|
-
variant === 'contained' ? 'bg-primary' : 'bg-transparent',
|
|
58
|
-
className,
|
|
59
|
-
)}>
|
|
60
|
-
<Text typography={'base'} color={variant === 'contained' ? 'white' : color} {...textProps}>
|
|
61
|
-
{timerSec < 10 ? '0' + timerSec : timerSec}
|
|
62
|
-
</Text>
|
|
63
|
-
<Text className={'mx-1'} typography={'base'} color={variant === 'contained' ? 'white' : color} {...textProps}>:</Text>
|
|
64
|
-
<Text typography={'base'} color={variant === 'contained' ? 'white' : color} {...textProps}>
|
|
65
|
-
{timerMin < 10 ? '0' + timerMin : timerMin}
|
|
66
|
-
</Text>
|
|
67
|
-
{sec >= 3600
|
|
68
|
-
? <>
|
|
69
|
-
<Text className={'mx-1'} typography={'base'} color={variant === 'contained' ? 'white' : color} {...textProps}>:</Text>
|
|
70
|
-
<Text typography={'base'} color={variant === 'contained' ? 'white' : color} {...textProps}>
|
|
71
|
-
{timerHour < 10 ? '0' + timerHour : timerHour}
|
|
72
|
-
</Text>
|
|
73
|
-
</> : null
|
|
74
|
-
}
|
|
75
|
-
</Div>
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export default CountDown;
|
package/countdown-timer/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DefaultDataTableProps } from './default/default-data-table.props';
|
|
2
|
-
import { SimpleDataTableProps } from './simple/simple-data-table.props';
|
|
3
|
-
|
|
4
|
-
export type TableVariant = 'simple' | 'default';
|
|
5
|
-
export type DataTableProps<T extends TableVariant> = T extends 'simple' ?
|
|
6
|
-
{ variant: 'simple' } & SimpleDataTableProps :
|
|
7
|
-
{ variant: 'default' } & DefaultDataTableProps;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { DataTableProps, TableVariant } from './data-table.props';
|
|
4
|
-
import DefaultDataTable from './default';
|
|
5
|
-
import SimpleDataTable from './simple';
|
|
6
|
-
import { DefaultDataTableProps } from './default/default-data-table.props';
|
|
7
|
-
import { SimpleDataTableProps } from './simple/simple-data-table.props';
|
|
8
|
-
|
|
9
|
-
const DataTable = <T extends TableVariant>(props: DataTableProps<T>) => {
|
|
10
|
-
if (props.variant === 'default') {
|
|
11
|
-
return <DefaultDataTable {...(props as DefaultDataTableProps)} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return <SimpleDataTable {...(props as SimpleDataTableProps)} />;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default DataTable;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
-
|
|
3
|
-
export interface DefaultDataTableProps {
|
|
4
|
-
data: Array<any>
|
|
5
|
-
|
|
6
|
-
header: any
|
|
7
|
-
|
|
8
|
-
column: Array<ColumnDef<any>>
|
|
9
|
-
|
|
10
|
-
mobileColumns?: Array<string>
|
|
11
|
-
|
|
12
|
-
expandable?: boolean
|
|
13
|
-
|
|
14
|
-
expandedComponent?: any
|
|
15
|
-
|
|
16
|
-
serverSideSorting?: (sort: any) => void
|
|
17
|
-
|
|
18
|
-
isLoading?: boolean
|
|
19
|
-
|
|
20
|
-
getCurrentPage: (n: number) => void
|
|
21
|
-
|
|
22
|
-
lastPage: number
|
|
23
|
-
|
|
24
|
-
perPage: number
|
|
25
|
-
|
|
26
|
-
currentPage: number
|
|
27
|
-
|
|
28
|
-
total: number
|
|
29
|
-
|
|
30
|
-
nextPage: any
|
|
31
|
-
|
|
32
|
-
previousPage: any
|
|
33
|
-
|
|
34
|
-
getLimit?: (event: string) => void
|
|
35
|
-
|
|
36
|
-
columnOrder?: boolean
|
|
37
|
-
|
|
38
|
-
updateData?: (value: string, info?: string | object) => void
|
|
39
|
-
|
|
40
|
-
select?: boolean
|
|
41
|
-
|
|
42
|
-
selectedRows?: (rows: Array<ColumnDef<any>>) => void
|
|
43
|
-
|
|
44
|
-
expandAll?: boolean
|
|
45
|
-
|
|
46
|
-
visitedRows?: Array<number>
|
|
47
|
-
}
|