@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
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CalendarProps } from './calendar.props';
|
|
2
|
+
declare const Calender: ({ dateFormat, disablePreviousMonths, disableSubsequentMonths, disablePreviousDays, disableSubsequentDays, selected, onChange, type, holidays, variant, size, initialDateRange, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Calender;
|
|
@@ -12,11 +12,39 @@ var react_date_object_1 = tslib_1.__importDefault(require("react-date-object"));
|
|
|
12
12
|
var persian_1 = tslib_1.__importDefault(require("react-date-object/calendars/persian"));
|
|
13
13
|
var persian_fa_1 = tslib_1.__importDefault(require("react-date-object/locales/persian_fa"));
|
|
14
14
|
var create_date_range_1 = tslib_1.__importDefault(require("./config/create-date-range"));
|
|
15
|
-
var Calender = function (
|
|
16
|
-
var
|
|
17
|
-
|
|
15
|
+
var Calender = function (_a) {
|
|
16
|
+
var _b = _a.dateFormat, dateFormat = _b === void 0 ? 'YYYY-MM-DD' : _b, _c = _a.disablePreviousMonths, disablePreviousMonths = _c === void 0 ? false : _c, _d = _a.disableSubsequentMonths, disableSubsequentMonths = _d === void 0 ? false : _d, _e = _a.disablePreviousDays, disablePreviousDays = _e === void 0 ? false : _e, _f = _a.disableSubsequentDays, disableSubsequentDays = _f === void 0 ? false : _f, selected = _a.selected, onChange = _a.onChange, _g = _a.type, type = _g === void 0 ? 'jalali' : _g, holidays = _a.holidays, _h = _a.variant, variant = _h === void 0 ? 'range' : _h, _j = _a.size, size = _j === void 0 ? 'medium' : _j, initialDateRange = _a.initialDateRange;
|
|
17
|
+
(0, react_1.useEffect)(function () {
|
|
18
|
+
if (initialDateRange && variant === 'range') {
|
|
19
|
+
var startDate = new react_date_object_1["default"]({ date: initialDateRange.startDate });
|
|
20
|
+
var startPoint = type === 'gregorian' ? (0, config_1.daysInMonthEn)(startDate, dateFormat) : (0, config_1.daysInMonthFa)(startDate, dateFormat);
|
|
21
|
+
var endDate = new react_date_object_1["default"]({ date: initialDateRange.endDate });
|
|
22
|
+
var endPoint = type === 'gregorian' ? (0, config_1.daysInMonthEn)(endDate, dateFormat) : (0, config_1.daysInMonthFa)(endDate, dateFormat);
|
|
23
|
+
var end = endPoint.days.find(function (value) {
|
|
24
|
+
return type === 'gregorian' ? value.gregorianDate === (0, formatDate_1["default"])(initialDateRange.endDate, dateFormat, type)
|
|
25
|
+
: value.jalaliDate === (0, formatDate_1["default"])(initialDateRange.endDate, dateFormat, type);
|
|
26
|
+
});
|
|
27
|
+
var start = startPoint.days.find(function (value) {
|
|
28
|
+
return type === 'gregorian' ? value.gregorianDate === (0, formatDate_1["default"])(initialDateRange.startDate, dateFormat, type)
|
|
29
|
+
: value.jalaliDate === (0, formatDate_1["default"])(initialDateRange.startDate, dateFormat, type);
|
|
30
|
+
});
|
|
31
|
+
var range = (0, create_date_range_1["default"])({ startDate: initialDateRange.startDate, stopDate: initialDateRange.endDate });
|
|
32
|
+
setRangeDates(range);
|
|
33
|
+
setDateRangePicker({
|
|
34
|
+
start: start,
|
|
35
|
+
end: end
|
|
36
|
+
});
|
|
37
|
+
setDatepicker(tslib_1.__assign(tslib_1.__assign({}, datepicker), { value: (0, formatDate_1["default"])(new Date(), dateFormat, type), year: startPoint.year, monthName: startPoint.monthName, month: startPoint.month, days: startPoint.days, initialValue: null }));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
var initialDate = new react_date_object_1["default"]({ date: selected });
|
|
41
|
+
var _a = type === 'gregorian' ? (0, config_1.daysInMonthEn)(initialDate, dateFormat) : (0, config_1.daysInMonthFa)(initialDate, dateFormat), monthName = _a.monthName, month = _a.month, days = _a.days, year = _a.year;
|
|
42
|
+
setDatepicker(tslib_1.__assign(tslib_1.__assign({}, datepicker), { value: (0, formatDate_1["default"])(new Date(), dateFormat, type), year: year, monthName: monthName, month: month, days: days, initialValue: null }));
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
45
|
+
var date = new react_date_object_1["default"]({ date: selected });
|
|
18
46
|
var _k = (0, react_1.useState)({
|
|
19
|
-
value: (0, formatDate_1["default"])(
|
|
47
|
+
value: (0, formatDate_1["default"])(selected, dateFormat, type),
|
|
20
48
|
cloneDays: date,
|
|
21
49
|
monthName: '',
|
|
22
50
|
month: '',
|
|
@@ -29,10 +57,6 @@ var Calender = function (props) {
|
|
|
29
57
|
}), dateRangePicker = _l[0], setDateRangePicker = _l[1];
|
|
30
58
|
var _m = (0, react_1.useState)([]), rangeDates = _m[0], setRangeDates = _m[1];
|
|
31
59
|
var _o = (0, react_1.useState)(), holidayList = _o[0], setHolidayList = _o[1];
|
|
32
|
-
(0, react_1.useEffect)(function () {
|
|
33
|
-
var _a = type === 'gregorian' ? (0, config_1.daysInMonthEn)(datepicker.cloneDays, dateFormat) : (0, config_1.daysInMonthFa)(datepicker.cloneDays, dateFormat), monthName = _a.monthName, month = _a.month, days = _a.days, year = _a.year;
|
|
34
|
-
setDatepicker(tslib_1.__assign(tslib_1.__assign({}, datepicker), { year: year, monthName: monthName, month: month, days: days, initialValue: null }));
|
|
35
|
-
}, [type]);
|
|
36
60
|
(0, react_1.useEffect)(function () {
|
|
37
61
|
if (holidays && holidays.length) {
|
|
38
62
|
var holidaysFormatList = holidays.map(function (item) { return new react_date_object_1["default"](item).format(dateFormat); });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../calendar/calendar.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,+BAAmD;AACnD,4EAA8C;AAC9C,mCAA+D;AAE/D,2EAA6C;AAC7C,+CAA2C;AAC3C,gFAA2C;AAC3C,wFAA0D;AAC1D,4FAA6D;AAC7D,yFAAyD;AAYzD,IAAM,QAAQ,GAAG,UAAC,EAaF;QAZd,kBAAyB,EAAzB,UAAU,mBAAG,YAAY,KAAA,EACzB,6BAA6B,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,+BAA+B,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAC/B,2BAA2B,EAA3B,mBAAmB,mBAAG,KAAK,KAAA,EAC3B,6BAA6B,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,QAAQ,cAAA,EACR,eAAiB,EAAjB,OAAO,mBAAG,OAAO,KAAA,EACjB,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,gBAAgB,sBAAA;IAEhB,IAAA,iBAAS,EAAC;QACR,IAAI,gBAAgB,IAAI,OAAO,KAAK,OAAO,EAAE;YAC3C,IAAM,SAAS,GAAG,IAAI,8BAAU,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC;YACvE,IAAM,UAAU,GAAG,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,sBAAa,EAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAA,sBAAa,EAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAEtH,IAAM,OAAO,GAAG,IAAI,8BAAU,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,OAAO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qB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,iBAAiB,EACrC,uBAAuB,EAAE,sBAAsB,EAC/C,QAAQ,EAAE,IAAI,8BAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,EAC/D,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,cAAM,OAAA,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,EAAtB,CAAsB,EAC3C,aAAa,EAAE,cAAM,OAAA,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAvB,CAAuB,EAC5C,WAAW,EAAE,UAAC,UAAmB,IAAK,OAAA,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAlC,CAAkC,EACxE,YAAY,EAAE,IAAI,EAClB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,GACtB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,QAAQ,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export interface CalendarProps {
|
|
2
2
|
dateFormat?: string;
|
|
3
|
-
selectedDate?: string | Date;
|
|
4
3
|
disablePreviousMonths?: boolean;
|
|
5
4
|
disableSubsequentMonths?: boolean;
|
|
6
5
|
disablePreviousDays?: boolean;
|
|
7
6
|
disableSubsequentDays?: boolean;
|
|
8
7
|
onChange: (e: any) => void;
|
|
9
|
-
selected
|
|
8
|
+
selected: string | Date;
|
|
10
9
|
type?: 'gregorian' | 'jalali';
|
|
11
10
|
holidays?: Array<string>;
|
|
12
11
|
variant?: 'range' | 'simple';
|
|
13
12
|
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge';
|
|
13
|
+
initialDateRange?: {
|
|
14
|
+
startDate: string;
|
|
15
|
+
endDate: string;
|
|
16
|
+
};
|
|
14
17
|
}
|
package/package.json
CHANGED
package/.eslintrc.json
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": [
|
|
3
|
-
"react-hooks"
|
|
4
|
-
],
|
|
5
|
-
"root": true,
|
|
6
|
-
"rules": {
|
|
7
|
-
"react-hooks/rules-of-hooks": "off",
|
|
8
|
-
"react-hooks/exhaustive-deps": "off",
|
|
9
|
-
"@next/next/no-img-element": "off",
|
|
10
|
-
|
|
11
|
-
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
|
|
12
|
-
"object-curly-spacing": ["error", "always"],
|
|
13
|
-
"semi": ["error", "always", {"omitLastInOneLineClassBody": true}],
|
|
14
|
-
"semi-style": ["error", "last"],
|
|
15
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
16
|
-
"arrow-spacing": ["error", { "before": true, "after": true }],
|
|
17
|
-
"block-spacing": ["error", "always"],
|
|
18
|
-
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
|
|
19
|
-
"camelcase": ["error", { "properties": "never" }],
|
|
20
|
-
"comma-spacing": ["error", { "before": false, "after": true }],
|
|
21
|
-
"comma-style": ["error", "last"],
|
|
22
|
-
"constructor-super": "error",
|
|
23
|
-
"curly": ["error"],
|
|
24
|
-
"dot-location": ["error", "property"],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"eol-last": 2,
|
|
28
|
-
"eqeqeq": [2, "allow-null"],
|
|
29
|
-
"func-call-spacing": [2, "never"],
|
|
30
|
-
"handle-callback-err": [2, "^(err|error)$" ],
|
|
31
|
-
"indent": [2, 2, { "SwitchCase": 1 }],
|
|
32
|
-
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
|
|
33
|
-
"keyword-spacing": [2, { "before": true, "after": true }],
|
|
34
|
-
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
|
|
35
|
-
"new-parens": 2,
|
|
36
|
-
"no-array-constructor": 2,
|
|
37
|
-
"no-caller": 2,
|
|
38
|
-
"no-class-assign": 2,
|
|
39
|
-
"no-cond-assign": 2,
|
|
40
|
-
"no-const-assign": 2,
|
|
41
|
-
"no-constant-condition": [2, { "checkLoops": false }],
|
|
42
|
-
"no-control-regex": 2,
|
|
43
|
-
"no-debugger": 2,
|
|
44
|
-
"no-delete-var": 2,
|
|
45
|
-
"no-dupe-args": 2,
|
|
46
|
-
"no-dupe-class-members": 2,
|
|
47
|
-
"no-dupe-keys": 2,
|
|
48
|
-
"no-duplicate-case": 2,
|
|
49
|
-
"no-duplicate-imports": 2,
|
|
50
|
-
"no-empty-character-class": 2,
|
|
51
|
-
"no-empty-pattern": 2,
|
|
52
|
-
"no-eval": 2,
|
|
53
|
-
"no-ex-assign": 2,
|
|
54
|
-
"no-extend-native": 2,
|
|
55
|
-
"no-extra-bind": 2,
|
|
56
|
-
"no-extra-parens": [2, "functions"],
|
|
57
|
-
"no-fallthrough": 2,
|
|
58
|
-
"no-floating-decimal": 2,
|
|
59
|
-
"no-func-assign": 2,
|
|
60
|
-
"no-global-assign": 2,
|
|
61
|
-
"no-implied-eval": 2,
|
|
62
|
-
"no-inner-declarations": [2, "functions"],
|
|
63
|
-
"no-invalid-regexp": 2,
|
|
64
|
-
"no-irregular-whitespace": 2,
|
|
65
|
-
"no-iterator": 2,
|
|
66
|
-
"no-label-var": 2,
|
|
67
|
-
"no-labels": [2, { "allowLoop": false, "allowSwitch": false }],
|
|
68
|
-
"no-lone-blocks": 2,
|
|
69
|
-
"no-mixed-spaces-and-tabs": 2,
|
|
70
|
-
"no-multi-spaces": 2,
|
|
71
|
-
"no-multi-str": 2,
|
|
72
|
-
"no-multiple-empty-lines": [2, { "max": 1 }],
|
|
73
|
-
"no-native-reassign": 2,
|
|
74
|
-
"no-negated-in-lhs": 2,
|
|
75
|
-
"no-new": 2,
|
|
76
|
-
"no-new-func": 2,
|
|
77
|
-
"no-new-object": 2,
|
|
78
|
-
"no-new-require": 2,
|
|
79
|
-
"no-new-symbol": 2,
|
|
80
|
-
"no-new-wrappers": 2,
|
|
81
|
-
"no-obj-calls": 2,
|
|
82
|
-
"no-octal": 2,
|
|
83
|
-
"no-octal-escape": 2,
|
|
84
|
-
"no-path-concat": 2,
|
|
85
|
-
"no-proto": 2,
|
|
86
|
-
"no-redeclare": 2,
|
|
87
|
-
"no-regex-spaces": 2,
|
|
88
|
-
"no-return-assign": [2, "except-parens"],
|
|
89
|
-
"no-self-assign": 2,
|
|
90
|
-
"no-self-compare": 2,
|
|
91
|
-
"no-sequences": 2,
|
|
92
|
-
"no-shadow-restricted-names": 2,
|
|
93
|
-
"no-sparse-arrays": 2,
|
|
94
|
-
"no-tabs": 2,
|
|
95
|
-
"no-template-curly-in-string": 2,
|
|
96
|
-
"no-this-before-super": 2,
|
|
97
|
-
"no-throw-literal": 2,
|
|
98
|
-
"no-trailing-spaces": 2,
|
|
99
|
-
"no-unexpected-multiline": 2,
|
|
100
|
-
"no-unmodified-loop-condition": 2,
|
|
101
|
-
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
|
|
102
|
-
"no-unreachable": 2,
|
|
103
|
-
"no-unsafe-finally": 2,
|
|
104
|
-
"no-unsafe-negation": 2,
|
|
105
|
-
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
|
|
106
|
-
"no-useless-call": 2,
|
|
107
|
-
"no-useless-computed-key": 2,
|
|
108
|
-
"no-useless-constructor": 2,
|
|
109
|
-
"no-useless-escape": 2,
|
|
110
|
-
"no-useless-rename": 2,
|
|
111
|
-
"no-whitespace-before-property": 2,
|
|
112
|
-
"no-with": 2,
|
|
113
|
-
"object-property-newline": [2, { "allowMultiplePropertiesPerLine": true }],
|
|
114
|
-
"one-var": [2, { "initialized": "never" }],
|
|
115
|
-
"operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
|
|
116
|
-
"padded-blocks": [2, "never"],
|
|
117
|
-
"rest-spread-spacing": [2, "never"],
|
|
118
|
-
"semi-spacing": [2, { "before": false, "after": true }],
|
|
119
|
-
"space-before-blocks": [2, "always"],
|
|
120
|
-
"space-infix-ops": 2,
|
|
121
|
-
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
|
122
|
-
"template-curly-spacing": [2, "never"],
|
|
123
|
-
"unicode-bom": [2, "never"],
|
|
124
|
-
"use-isnan": 2,
|
|
125
|
-
"valid-typeof": 2,
|
|
126
|
-
"wrap-iife": [2, "any", { "functionPrototypeMethods": true }],
|
|
127
|
-
"yield-star-spacing": [2, "both"],
|
|
128
|
-
"yoda": [2, "never"]
|
|
129
|
-
},
|
|
130
|
-
"extends": [
|
|
131
|
-
"react-app"
|
|
132
|
-
]
|
|
133
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface CalendarProps {
|
|
2
|
-
dateFormat?: string
|
|
3
|
-
|
|
4
|
-
selectedDate?: string | Date;
|
|
5
|
-
|
|
6
|
-
disablePreviousMonths?: boolean;
|
|
7
|
-
|
|
8
|
-
disableSubsequentMonths?: boolean;
|
|
9
|
-
|
|
10
|
-
disablePreviousDays?: boolean;
|
|
11
|
-
|
|
12
|
-
disableSubsequentDays?: boolean;
|
|
13
|
-
|
|
14
|
-
onChange: (e: any) => void;
|
|
15
|
-
|
|
16
|
-
selected?: string | Date
|
|
17
|
-
|
|
18
|
-
type?: 'gregorian' | 'jalali'
|
|
19
|
-
|
|
20
|
-
holidays?: Array<string>
|
|
21
|
-
|
|
22
|
-
variant?: 'range' | 'simple'
|
|
23
|
-
|
|
24
|
-
size?: 'tiny' | 'small' | 'medium' | 'large' | 'huge'
|
|
25
|
-
}
|
package/calendar/calendar.tsx
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import Days from './sub-components/days/days';
|
|
5
|
-
import { daysInMonthEn, daysInMonthFa, IDays } from './config';
|
|
6
|
-
import { CalendarProps } from './calendar.props';
|
|
7
|
-
import formatDate from './shared/formatDate';
|
|
8
|
-
import { Div } from '@pezeshk-book/ui-kit';
|
|
9
|
-
import DateObject from 'react-date-object';
|
|
10
|
-
import persian from 'react-date-object/calendars/persian';
|
|
11
|
-
import persianFa from 'react-date-object/locales/persian_fa';
|
|
12
|
-
import createDateRange from './config/create-date-range';
|
|
13
|
-
|
|
14
|
-
interface IState {
|
|
15
|
-
value: any
|
|
16
|
-
initialValue?: any
|
|
17
|
-
cloneDays: any
|
|
18
|
-
monthName: string
|
|
19
|
-
month: number | string
|
|
20
|
-
year: string
|
|
21
|
-
days: IDays[]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const Calender = (props: CalendarProps) => {
|
|
25
|
-
const {
|
|
26
|
-
dateFormat = 'YYYY-MM-DD',
|
|
27
|
-
selectedDate = new Date(),
|
|
28
|
-
disablePreviousMonths = false,
|
|
29
|
-
disableSubsequentMonths = false,
|
|
30
|
-
disablePreviousDays = false,
|
|
31
|
-
disableSubsequentDays = false,
|
|
32
|
-
selected,
|
|
33
|
-
onChange,
|
|
34
|
-
type = 'jalali',
|
|
35
|
-
holidays,
|
|
36
|
-
variant = 'simple',
|
|
37
|
-
size = 'medium',
|
|
38
|
-
} = props;
|
|
39
|
-
|
|
40
|
-
const date = new DateObject({ date: selectedDate });
|
|
41
|
-
const [datepicker, setDatepicker] = useState<IState>({
|
|
42
|
-
value: formatDate(selectedDate, dateFormat, type),
|
|
43
|
-
cloneDays: date,
|
|
44
|
-
monthName: '',
|
|
45
|
-
month: '',
|
|
46
|
-
year: '',
|
|
47
|
-
days: [],
|
|
48
|
-
});
|
|
49
|
-
const [dateRangePicker, setDateRangePicker] = useState<{start: any, end: any}>({
|
|
50
|
-
start: null,
|
|
51
|
-
end: null,
|
|
52
|
-
});
|
|
53
|
-
const [rangeDates, setRangeDates] = useState<Array<string>>([]);
|
|
54
|
-
const [holidayList, setHolidayList] = useState<Array<string>>();
|
|
55
|
-
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
const { monthName, month, days, year } = type === 'gregorian' ? daysInMonthEn(datepicker.cloneDays, dateFormat) : daysInMonthFa(datepicker.cloneDays, dateFormat);
|
|
58
|
-
setDatepicker({
|
|
59
|
-
...datepicker,
|
|
60
|
-
year: year,
|
|
61
|
-
monthName: monthName,
|
|
62
|
-
month: month,
|
|
63
|
-
days: days,
|
|
64
|
-
initialValue: null,
|
|
65
|
-
});
|
|
66
|
-
}, [type]);
|
|
67
|
-
|
|
68
|
-
useEffect(() => {
|
|
69
|
-
if (holidays && holidays.length) {
|
|
70
|
-
const holidaysFormatList = holidays.map((item) => new DateObject(item).format(dateFormat));
|
|
71
|
-
setHolidayList(holidaysFormatList);
|
|
72
|
-
}
|
|
73
|
-
}, [holidays, dateFormat]);
|
|
74
|
-
|
|
75
|
-
const changeMonths = (amount: number, changeType: 'inc' | 'select'): void => {
|
|
76
|
-
setDatepicker(prevState => {
|
|
77
|
-
const updatedCloneDays = changeType === 'inc' ? prevState.cloneDays.add(amount, 'month') : prevState.cloneDays.setMonth(amount);
|
|
78
|
-
const { monthName, month, days, year } = type === 'gregorian' ? daysInMonthEn(updatedCloneDays, dateFormat) : daysInMonthFa(updatedCloneDays, dateFormat);
|
|
79
|
-
|
|
80
|
-
return {
|
|
81
|
-
...prevState,
|
|
82
|
-
year,
|
|
83
|
-
monthName,
|
|
84
|
-
month,
|
|
85
|
-
days,
|
|
86
|
-
cloneDays: updatedCloneDays,
|
|
87
|
-
};
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const changeYear = (selectedYear: string): void => {
|
|
92
|
-
setDatepicker(prevState => {
|
|
93
|
-
const updatedCloneDays = prevState.cloneDays.setYear(parseInt(selectedYear));
|
|
94
|
-
const { monthName, month, days, year } = type === 'gregorian' ? daysInMonthEn(updatedCloneDays, dateFormat) : daysInMonthFa(updatedCloneDays, dateFormat);
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
...prevState,
|
|
98
|
-
year,
|
|
99
|
-
monthName,
|
|
100
|
-
month,
|
|
101
|
-
days,
|
|
102
|
-
cloneDays: updatedCloneDays,
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const selectDay = (e: React.SyntheticEvent<EventTarget>) => {
|
|
108
|
-
const faDate = (e.target as HTMLHtmlElement).dataset.jalaliDate;
|
|
109
|
-
setDatepicker({
|
|
110
|
-
...datepicker,
|
|
111
|
-
value: faDate,
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const daysEventListeners = () => {
|
|
116
|
-
return {
|
|
117
|
-
onClick: selectDay,
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const selectDateHandler = (day: any): void => {
|
|
122
|
-
const clickedDate = new DateObject({ date: day.gregorianDate, calendar: persian, locale: persianFa });
|
|
123
|
-
const jalaliDate = new DateObject({ date: day.jalaliDate, calendar: persian }).format(dateFormat);
|
|
124
|
-
const gregorianDate = new DateObject({ date: day.gregorianDate }).format(dateFormat);
|
|
125
|
-
onChange({ calendarDate: clickedDate, gregorianDate, jalaliDate });
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
const selectDateRangeHandler = ({ start, end } : {start: any, end: any}): void => {
|
|
129
|
-
setDateRangePicker({ start: start, end: end });
|
|
130
|
-
|
|
131
|
-
const clickedStartDate = new DateObject({ date: start?.gregorianDate, calendar: persian, locale: persianFa });
|
|
132
|
-
const jalaliStartDate = new DateObject({ date: start?.jalaliDate, calendar: persian }).format(dateFormat);
|
|
133
|
-
const gregorianStartDate = new DateObject({ date: start?.gregorianDate }).format(dateFormat);
|
|
134
|
-
|
|
135
|
-
const clickedEndDate = new DateObject({ date: end?.gregorianDate, calendar: persian, locale: persianFa });
|
|
136
|
-
const jalaliEndDate = new DateObject({ date: end?.jalaliDate, calendar: persian }).format(dateFormat);
|
|
137
|
-
const gregorianEndDate = new DateObject({ date: end?.gregorianDate }).format(dateFormat);
|
|
138
|
-
|
|
139
|
-
onChange({
|
|
140
|
-
start: start ? { calendarDate: clickedStartDate, gregorianStartDate, jalaliStartDate } : null,
|
|
141
|
-
end: end ? { calendarDate: clickedEndDate, gregorianEndDate, jalaliEndDate } : null,
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
if (start && end) {
|
|
145
|
-
const range = createDateRange({ startDate: start.gregorianDate, stopDate: end.gregorianDate });
|
|
146
|
-
setRangeDates(range);
|
|
147
|
-
} else {
|
|
148
|
-
setRangeDates([]);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
return (
|
|
153
|
-
<Div dir={'rtl'} className={'items-center flex flex-col justify-center bg-white rounded py-4 !w-full'}>
|
|
154
|
-
<Days
|
|
155
|
-
days={datepicker.days}
|
|
156
|
-
monthName={datepicker.monthName}
|
|
157
|
-
year={datepicker.year}
|
|
158
|
-
selectedDay={datepicker.value}
|
|
159
|
-
disablePreviousMonths={disablePreviousMonths}
|
|
160
|
-
disableSubsequentMonths={disableSubsequentMonths}
|
|
161
|
-
disablePreviousDays={disablePreviousDays}
|
|
162
|
-
disableSubsequentDays={disableSubsequentDays}
|
|
163
|
-
daysEventListeners={daysEventListeners}
|
|
164
|
-
selectDateHandlers={selectDateHandler}
|
|
165
|
-
selectDateRangeHandlers={selectDateRangeHandler}
|
|
166
|
-
selected={new DateObject({ date: selected }).format(dateFormat)}
|
|
167
|
-
date={date}
|
|
168
|
-
increaseMonth={() => changeMonths(1, 'inc')}
|
|
169
|
-
decreaseMonth={() => changeMonths(-1, 'inc')}
|
|
170
|
-
changeMonth={(monthIndex : number) => changeMonths(monthIndex, 'select')}
|
|
171
|
-
isDatePicker={true}
|
|
172
|
-
dateFormat={dateFormat}
|
|
173
|
-
type={type}
|
|
174
|
-
holidays={holidayList}
|
|
175
|
-
variant={variant}
|
|
176
|
-
rangeDate={dateRangePicker}
|
|
177
|
-
rangeDates={rangeDates}
|
|
178
|
-
size={size}
|
|
179
|
-
changeYear={changeYear}
|
|
180
|
-
/>
|
|
181
|
-
</Div>
|
|
182
|
-
);
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
export default Calender;
|
package/calendar/config/chunk.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
function slice(array: [], start: number, end: number) {
|
|
2
|
-
let length = array == null ? 0 : array.length;
|
|
3
|
-
if (!length) {
|
|
4
|
-
return [];
|
|
5
|
-
}
|
|
6
|
-
start = start == null ? 0 : start;
|
|
7
|
-
end = end === undefined ? length : end;
|
|
8
|
-
|
|
9
|
-
if (start < 0) {
|
|
10
|
-
start = -start > length ? 0 : length + start;
|
|
11
|
-
}
|
|
12
|
-
end = end > length ? length : end;
|
|
13
|
-
if (end < 0) {
|
|
14
|
-
end += length;
|
|
15
|
-
}
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
length = start > end ? 0 : (end - start) >>> 0;
|
|
18
|
-
start >>>= 0;
|
|
19
|
-
|
|
20
|
-
let index = -1;
|
|
21
|
-
const result = new Array(length);
|
|
22
|
-
while (++index < length) {
|
|
23
|
-
result[index] = array[index + start];
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function chunk(array: any, size: any) {
|
|
29
|
-
size = Math.max(size, 0);
|
|
30
|
-
const length = array == null ? 0 : array.length;
|
|
31
|
-
if (!length || size < 1) {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
let index = 0;
|
|
35
|
-
let resIndex = 0;
|
|
36
|
-
const result = new Array(Math.ceil(length / size));
|
|
37
|
-
|
|
38
|
-
while (index < length) {
|
|
39
|
-
result[resIndex++] = slice(array, index, (index += size));
|
|
40
|
-
}
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DateObject from 'react-date-object';
|
|
2
|
-
|
|
3
|
-
const createDateRange = ({ startDate, stopDate } : {startDate: string, stopDate: string}): Array<string> => {
|
|
4
|
-
const dateArray = [];
|
|
5
|
-
let start = new DateObject(startDate);
|
|
6
|
-
const end = new DateObject(stopDate);
|
|
7
|
-
while (start <= end) {
|
|
8
|
-
dateArray.push( new DateObject(start).format('YYYY-MM-DD') );
|
|
9
|
-
start = new DateObject(start).add(1, 'days');
|
|
10
|
-
}
|
|
11
|
-
return dateArray;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default createDateRange;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import persian from 'react-date-object/calendars/persian';
|
|
2
|
-
import gregorianEn from 'react-date-object/locales/gregorian_en';
|
|
3
|
-
import DateObject from 'react-date-object';
|
|
4
|
-
import gregorian from 'react-date-object/calendars/gregorian';
|
|
5
|
-
|
|
6
|
-
export interface IDays {
|
|
7
|
-
day: number;
|
|
8
|
-
gregorianDate: string;
|
|
9
|
-
jalaliDate: string;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IDaysInMonth {
|
|
14
|
-
days: IDays[];
|
|
15
|
-
monthName: string;
|
|
16
|
-
month: number;
|
|
17
|
-
today?: string;
|
|
18
|
-
year: string
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const daysInMonthEn = (date: any, dateFormat: string): IDaysInMonth => {
|
|
22
|
-
date.calendar = gregorian;
|
|
23
|
-
date.locale = gregorianEn;
|
|
24
|
-
const monthName = date.month.name;
|
|
25
|
-
const { month, year } = date;
|
|
26
|
-
const firstDayWeekDay = new DateObject({ date: `${year} ${month} 1`, calendar: gregorian }).weekDay.number;
|
|
27
|
-
// Calculate the number of empty cells needed before the first day of the month
|
|
28
|
-
const emptyCellsCount = (firstDayWeekDay + 7) % 7;
|
|
29
|
-
const lastDayOfPreviousMonth = new DateObject({date: `${year} ${month - 1} 31`, calendar: gregorian});
|
|
30
|
-
// Calculate the empty days from the previous month
|
|
31
|
-
const emptyDays = [...Array(emptyCellsCount)].map((_, i) => lastDayOfPreviousMonth.month.length - emptyCellsCount + i + 1);
|
|
32
|
-
// Create an array of day objects for the current month
|
|
33
|
-
const currentMonthDays = Array.from({ length: date.month.length }, (_, i) => {
|
|
34
|
-
const dayNumber = i + 1;
|
|
35
|
-
const gregorianDate = new DateObject({ date: (`${year} ${month} ${dayNumber}`), calendar: gregorian }).format(dateFormat);
|
|
36
|
-
const jalaliDate = new DateObject({ date: (`${year} ${month} ${dayNumber}`), calendar: gregorian }).convert(persian).format(dateFormat);
|
|
37
|
-
return { day: dayNumber, gregorianDate, jalaliDate, disabled: false };
|
|
38
|
-
});
|
|
39
|
-
const allDays = [...emptyDays.map((day) => ({
|
|
40
|
-
day,
|
|
41
|
-
gregorianDate: new DateObject({date: (`${year} ${month} ${day}`), calendar: gregorian}).format(dateFormat),
|
|
42
|
-
jalaliDate: new DateObject({date: (`${year} ${month} ${day}`), calendar: gregorian}).convert(persian).format(dateFormat),
|
|
43
|
-
disabled: true
|
|
44
|
-
})), ...currentMonthDays];
|
|
45
|
-
|
|
46
|
-
return { monthName, month, days: allDays, year };
|
|
47
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import persian from 'react-date-object/calendars/persian';
|
|
2
|
-
import persianFa from 'react-date-object/locales/persian_fa';
|
|
3
|
-
import DateObject from 'react-date-object';
|
|
4
|
-
import gregorian from 'react-date-object/calendars/gregorian';
|
|
5
|
-
import { IDaysInMonth } from './days-in-month.en';
|
|
6
|
-
export const daysInMonthFa = (date: any, dateFormat: string): IDaysInMonth => {
|
|
7
|
-
date.calendar = persian;
|
|
8
|
-
date.locale = persianFa;
|
|
9
|
-
const monthName = date.month.name;
|
|
10
|
-
const { month, year } = date;
|
|
11
|
-
const firstDayWeekDay = new DateObject({ date: `${year} ${month} 1`, calendar: persian }).weekDay.number;
|
|
12
|
-
|
|
13
|
-
// Calculate the number of empty cells needed before the first day of the month
|
|
14
|
-
const emptyCellsCount = (firstDayWeekDay + 6) % 7;
|
|
15
|
-
|
|
16
|
-
const lastDayOfPreviousMonth = new DateObject({ date: `${year} ${month - 1} 31`, calendar: persian });
|
|
17
|
-
|
|
18
|
-
// Calculate the empty days from the previous month
|
|
19
|
-
const emptyDays = [...Array(emptyCellsCount)].map((_, i) => lastDayOfPreviousMonth.month.length - emptyCellsCount + i + 1);
|
|
20
|
-
|
|
21
|
-
// Create an array of day objects for the current month
|
|
22
|
-
const currentMonthDays = Array.from({ length: date.month.length }, (_, i) => {
|
|
23
|
-
const dayNumber = i + 1;
|
|
24
|
-
const gregorianDate = new DateObject({ date: (`${year} ${month} ${dayNumber}`), calendar: persian }).convert(gregorian).format(dateFormat);
|
|
25
|
-
const jalaliDate = new DateObject({ date: (`${year} ${month} ${dayNumber}`), calendar: persian }).format(dateFormat);
|
|
26
|
-
return { day: dayNumber, gregorianDate, jalaliDate, disabled: false };
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const allDays = [...emptyDays.map((day) => ({
|
|
30
|
-
day,
|
|
31
|
-
gregorianDate: new DateObject({ date: (`${year} ${month} ${day}`), calendar: persian }).convert(gregorian).format(dateFormat),
|
|
32
|
-
jalaliDate: new DateObject({ date: (`${year} ${month} ${day}`), calendar: persian }).format(dateFormat),
|
|
33
|
-
disabled: true,
|
|
34
|
-
})), ...currentMonthDays];
|
|
35
|
-
|
|
36
|
-
return { monthName, month, days: allDays, year };
|
|
37
|
-
};
|
package/calendar/config/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { fa, weekDayNames } from './week-day';
|
|
2
|
-
import { chunk } from './chunk';
|
|
3
|
-
import { daysInMonthEn, IDays, IDaysInMonth } from './days-in-month.en';
|
|
4
|
-
import { daysInMonthFa } from './days-in-month.fa';
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
daysInMonthEn,
|
|
8
|
-
daysInMonthFa,
|
|
9
|
-
fa,
|
|
10
|
-
weekDayNames,
|
|
11
|
-
chunk,
|
|
12
|
-
};
|
|
13
|
-
export type {
|
|
14
|
-
IDaysInMonth,
|
|
15
|
-
IDays,
|
|
16
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const jalaliMonths = [
|
|
2
|
-
{ name: 'فروردین', value: 1 },
|
|
3
|
-
{ name: 'اردیبهشت', value: 2 },
|
|
4
|
-
{ name: 'خرداد', value: 3 },
|
|
5
|
-
{ name: 'تیر', value: 4 },
|
|
6
|
-
{ name: 'مرداد', value: 5 },
|
|
7
|
-
{ name: 'شهریور', value: 6 },
|
|
8
|
-
{ name: 'مهر', value: 7 },
|
|
9
|
-
{ name: 'آبان', value: 8 },
|
|
10
|
-
{ name: 'آذر', value: 9 },
|
|
11
|
-
{ name: 'دی', value: 10 },
|
|
12
|
-
{ name: 'بهمن', value: 11 },
|
|
13
|
-
{ name: 'اسفند', value: 12 },
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export const gregorianMonths = [
|
|
17
|
-
{ name: 'Jan', value: 1 },
|
|
18
|
-
{ name: 'Feb', value: 2 },
|
|
19
|
-
{ name: 'Mar', value: 3 },
|
|
20
|
-
{ name: 'Apr', value: 4 },
|
|
21
|
-
{ name: 'May', value: 5 },
|
|
22
|
-
{ name: 'Jun', value: 6 },
|
|
23
|
-
{ name: 'Jul', value: 7 },
|
|
24
|
-
{ name: 'Aug', value: 8 },
|
|
25
|
-
{ name: 'Sep', value: 9 },
|
|
26
|
-
{ name: 'Oct', value: 10 },
|
|
27
|
-
{ name: 'Nov', value: 11 },
|
|
28
|
-
{ name: 'Dec', value: 12 },
|
|
29
|
-
];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const fa = (n: any) => {
|
|
2
|
-
if (process.env.NODE_ENV === 'test') {
|
|
3
|
-
return n;
|
|
4
|
-
}
|
|
5
|
-
return Number(n).toLocaleString('fa', {
|
|
6
|
-
useGrouping: false,
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const weekDayNames = {
|
|
11
|
-
jalali: {
|
|
12
|
-
normal: ['شنبه', 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه'],
|
|
13
|
-
short: ['ش', 'ی', 'د', 'س', 'چ', 'پ', 'ج'],
|
|
14
|
-
},
|
|
15
|
-
gregorian: {
|
|
16
|
-
normal: ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
|
|
17
|
-
short: ['Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
|
|
18
|
-
},
|
|
19
|
-
};
|