@pezeshk-book/modules 0.0.7 → 0.0.9
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/modules/calendar/calendar.js +10 -6
- package/dist/modules/calendar/calendar.js.map +1 -1
- package/dist/modules/calendar/config/daysIn-month.d.ts +3 -3
- package/dist/modules/calendar/config/daysIn-month.js +7 -6
- package/dist/modules/calendar/config/daysIn-month.js.map +1 -1
- package/dist/modules/calendar/config/week-day.js +1 -1
- package/dist/modules/calendar/config/week-day.js.map +1 -1
- package/dist/modules/calendar/icons/arrow-left-icon.d.ts +3 -0
- package/dist/modules/calendar/icons/arrow-left-icon.js +7 -0
- package/dist/modules/calendar/icons/arrow-left-icon.js.map +1 -0
- package/dist/modules/calendar/icons/arrow-right-icon.d.ts +3 -0
- package/dist/modules/calendar/icons/arrow-right-icon.js +7 -0
- package/dist/modules/calendar/icons/arrow-right-icon.js.map +1 -0
- package/dist/modules/calendar/icons/calendar-icon.d.ts +3 -0
- package/dist/modules/calendar/icons/calendar-icon.js +11 -0
- package/dist/modules/calendar/icons/calendar-icon.js.map +1 -0
- package/dist/modules/calendar/icons/index.d.ts +4 -4
- package/dist/modules/calendar/icons/index.js +4 -4
- package/dist/modules/calendar/icons/index.js.map +1 -1
- package/dist/modules/calendar/sub-components/day/day.js +3 -3
- package/dist/modules/calendar/sub-components/day/day.js.map +1 -1
- package/dist/modules/calendar/sub-components/day/day.props.d.ts +1 -1
- package/dist/modules/calendar/sub-components/days/days.js +5 -3
- package/dist/modules/calendar/sub-components/days/days.js.map +1 -1
- package/dist/modules/calendar/sub-components/days/days.props.d.ts +2 -2
- package/dist/modules/calendar/sub-components/days-head/days-head.js +15 -8
- package/dist/modules/calendar/sub-components/days-head/days-head.js.map +1 -1
- package/dist/modules/calendar/sub-components/days-head/days-head.props.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
|
3
3
|
import Days from "./sub-components/days/days";
|
|
4
|
-
import { daysInMonth } from "./config
|
|
4
|
+
import { daysInMonth } from "./config";
|
|
5
5
|
import formatDate from './shared/formatDate';
|
|
6
6
|
import { Div } from '@pezeshk-book/ui-kit';
|
|
7
7
|
import DateObject from "react-date-object";
|
|
@@ -18,14 +18,18 @@ var Calender = function (props) {
|
|
|
18
18
|
days: []
|
|
19
19
|
}), datepicker = _h[0], setDatepicker = _h[1];
|
|
20
20
|
useEffect(function () {
|
|
21
|
-
var _a = daysInMonth(datepicker.cloneDays), monthName = _a.monthName, month = _a.month, days = _a.days, year = _a.year;
|
|
21
|
+
var _a = daysInMonth(datepicker.cloneDays, dateFormat), monthName = _a.monthName, month = _a.month, days = _a.days, year = _a.year;
|
|
22
22
|
setDatepicker(__assign(__assign({}, datepicker), { year: year, monthName: monthName, month: month, days: days, initialValue: null }));
|
|
23
|
-
});
|
|
23
|
+
}, []);
|
|
24
24
|
var changeMonths = function (amount) {
|
|
25
|
-
setDatepicker(
|
|
25
|
+
setDatepicker(function (prevState) {
|
|
26
|
+
var updatedCloneDays = prevState.cloneDays.add(amount, "month");
|
|
27
|
+
var _a = daysInMonth(updatedCloneDays, dateFormat), monthName = _a.monthName, month = _a.month, days = _a.days, year = _a.year;
|
|
28
|
+
return __assign(__assign({}, prevState), { year: year, monthName: monthName, month: month, days: days, cloneDays: updatedCloneDays });
|
|
29
|
+
});
|
|
26
30
|
};
|
|
27
31
|
var selectDay = function (e) {
|
|
28
|
-
var faDate = e.target.dataset.
|
|
32
|
+
var faDate = e.target.dataset.jalaliDate;
|
|
29
33
|
setDatepicker(__assign(__assign({}, datepicker), { value: faDate }));
|
|
30
34
|
};
|
|
31
35
|
var daysEventListeners = function () {
|
|
@@ -35,7 +39,7 @@ var Calender = function (props) {
|
|
|
35
39
|
};
|
|
36
40
|
var startDateHandler = function (day) {
|
|
37
41
|
if (day) {
|
|
38
|
-
setStartDate(day.
|
|
42
|
+
setStartDate(day.jalaliDate);
|
|
39
43
|
}
|
|
40
44
|
else {
|
|
41
45
|
setStartDate('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../modules/calendar/calendar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../modules/calendar/calendar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACjD,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAErC,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AACxC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAY3C,IAAM,QAAQ,GAAG,UAAC,KAAoB;IAElC,IAAA,KAOE,KAAK,WAPkB,EAAzB,UAAU,mBAAG,YAAY,KAAA,EACzB,KAME,KAAK,aANkB,EAAzB,YAAY,mBAAG,IAAI,IAAI,EAAE,KAAA,EACzB,KAKE,KAAK,sBALsB,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,KAIE,KAAK,wBAJwB,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAC/B,KAGE,KAAK,oBAHoB,EAA3B,mBAAmB,mBAAG,KAAK,KAAA,EAC3B,KAEE,KAAK,sBAFsB,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,QAAQ,GACN,KAAK,SADC,CACA;IAEV,IAAM,IAAI,GAAG,IAAI,UAAU,CAAC,EAAC,IAAI,EAAE,YAAY,EAA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
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface IDays {
|
|
2
2
|
day: number;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
gregorianDate: string;
|
|
4
|
+
jalaliDate: string;
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface IDaysInMonth {
|
|
@@ -11,4 +11,4 @@ export interface IDaysInMonth {
|
|
|
11
11
|
today?: string;
|
|
12
12
|
year: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const daysInMonth: (date: any) => IDaysInMonth;
|
|
14
|
+
export declare const daysInMonth: (date: any, dateFormat: string) => IDaysInMonth;
|
|
@@ -2,7 +2,8 @@ import { __spreadArray } from "tslib";
|
|
|
2
2
|
import persian from "react-date-object/calendars/persian";
|
|
3
3
|
import persian_fa from "react-date-object/locales/persian_fa";
|
|
4
4
|
import DateObject from "react-date-object";
|
|
5
|
-
|
|
5
|
+
import gregorian from "react-date-object/calendars/gregorian";
|
|
6
|
+
export var daysInMonth = function (date, dateFormat) {
|
|
6
7
|
date.calendar = persian;
|
|
7
8
|
date.locale = persian_fa;
|
|
8
9
|
var monthName = date.month.name;
|
|
@@ -16,14 +17,14 @@ export var daysInMonth = function (date) {
|
|
|
16
17
|
// Create an array of day objects for the current month
|
|
17
18
|
var currentMonthDays = Array.from({ length: date.month.length }, function (_, i) {
|
|
18
19
|
var dayNumber = i + 1;
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
return { day: dayNumber,
|
|
20
|
+
var gregorianDate = new DateObject({ date: ("".concat(year, " ").concat(month, " ").concat(dayNumber)), calendar: persian }).convert(gregorian).format(dateFormat);
|
|
21
|
+
var jalaliDate = new DateObject({ date: ("".concat(year, " ").concat(month, " ").concat(dayNumber)), calendar: persian }).format(dateFormat);
|
|
22
|
+
return { day: dayNumber, gregorianDate: gregorianDate, jalaliDate: jalaliDate, disabled: false };
|
|
22
23
|
});
|
|
23
24
|
var allDays = __spreadArray(__spreadArray([], emptyDays.map(function (day) { return ({
|
|
24
25
|
day: day,
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
gregorianDate: new DateObject({ date: ("".concat(year, " ").concat(month, " ").concat(day)), calendar: persian }).convert(gregorian).format(dateFormat),
|
|
27
|
+
jalaliDate: new DateObject({ date: ("".concat(year, " ").concat(month, " ").concat(day)), calendar: persian }).format(dateFormat),
|
|
27
28
|
disabled: true
|
|
28
29
|
}); }), true), currentMonthDays, true);
|
|
29
30
|
return { monthName: monthName, month: month, days: allDays, year: year };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daysIn-month.js","sourceRoot":"","sources":["../../../../modules/calendar/config/daysIn-month.ts"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,qCAAqC,CAAC;AAC1D,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAC9D,OAAO,UAAU,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"daysIn-month.js","sourceRoot":"","sources":["../../../../modules/calendar/config/daysIn-month.ts"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,qCAAqC,CAAC;AAC1D,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAC9D,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,SAAS,MAAM,uCAAuC,CAAC;AAiB9D,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,IAAS,EAAE,UAAkB;IACvD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACvB,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;IACxB,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAA;IAC1B,IAAA,KAAK,GAAU,IAAI,MAAd,EAAE,IAAI,GAAI,IAAI,KAAR,CAAQ;IAC1B,IAAM,eAAe,GAAG,IAAI,UAAU,CAAC,EAAC,IAAI,EAAE,UAAG,IAAI,cAAI,KAAK,OAAI,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,OAAO,CAAC,MAA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AS,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC;QAC1C,GAAG,KAAA;QACH,aAAa,EAAE,IAAI,UAAU,CAAC,EAAC,IAAI,EAAE,CAAC,UAAG,IAAI,cAAI,KAAK,cAAI,GAAG,CAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;QAC3H,UAAU,EAAE,IAAI,UAAU,CAAC,EAAC,IAAI,EAAE,CAAC,UAAG,IAAI,cAAI,KAAK,cAAI,GAAG,CAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;QACrG,QAAQ,EAAE,IAAI;KACf,CAAC,EALyC,CAKzC,CAAC,SAAK,gBAAgB,OAAC,CAAC;IAE1B,OAAO,EAAC,SAAS,WAAA,EAAE,KAAK,OAAA,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,MAAA,EAAC,CAAC;AACjD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"week-day.js","sourceRoot":"","sources":["../../../../modules/calendar/config/week-day.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,EAAE,GAAG,UAAC,CAAM;IACvB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;QACnC,OAAO,CAAC,CAAC;KACV;IACD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE;QACpC,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"week-day.js","sourceRoot":"","sources":["../../../../modules/calendar/config/week-day.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,EAAE,GAAG,UAAC,CAAM;IACvB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE;QACnC,OAAO,CAAC,CAAC;KACV;IACD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE;QACpC,WAAW,EAAE,KAAK;KACnB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var ArrowLeftIcon = function () {
|
|
3
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "6", height: "12", viewBox: "0 0 6 12" },
|
|
4
|
+
React.createElement("path", { fill: 'currentColor', transform: "rotate(-90 6 6)", "data-name": "Path 28691", 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" })));
|
|
5
|
+
};
|
|
6
|
+
export default ArrowLeftIcon;
|
|
7
|
+
//# sourceMappingURL=arrow-left-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-left-icon.js","sourceRoot":"","sources":["../../../../modules/calendar/icons/arrow-left-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAM,aAAa,GAAG;IACpB,OAAO,CACL,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU;QAC9E,8BACE,IAAI,EAAE,cAAc,EACpB,SAAS,EAAC,iBAAiB,eACjB,YAAY,EACtB,CAAC,EAAC,mKAAmK,GACrK,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var ArrowRightIcon = function () {
|
|
3
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "6", height: "12", viewBox: "0 0 6 12" },
|
|
4
|
+
React.createElement("path", { fill: 'currentColor', transform: "rotate(-90 6 6)", "data-name": "Path 28692", 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" })));
|
|
5
|
+
};
|
|
6
|
+
export default ArrowRightIcon;
|
|
7
|
+
//# sourceMappingURL=arrow-right-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-right-icon.js","sourceRoot":"","sources":["../../../../modules/calendar/icons/arrow-right-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAM,cAAc,GAAG;IACrB,OAAO,CACL,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU;QAC9E,8BACE,IAAI,EAAE,cAAc,EACpB,SAAS,EAAC,iBAAiB,eACjB,YAAY,EACtB,CAAC,EAAC,mKAAmK,GACrK,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var CalendarIcon = function () {
|
|
3
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20.555", height: "22.673", viewBox: "0 0 20.555 22.673" },
|
|
4
|
+
React.createElement("g", { transform: "translate(.75 .75)" },
|
|
5
|
+
React.createElement("rect", { "data-name": "Rectangle 449", width: "19.055", height: "19.055", rx: "2", transform: "translate(0 2.117)", style: { fill: 'none', stroke: '#c9c9c9', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '1.5px' } }),
|
|
6
|
+
React.createElement("path", { "data-name": "Line 53", transform: "translate(13.762)", style: { fill: 'none', stroke: '#c9c9c9', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '1.5px' }, d: "M0 0v4.235" }),
|
|
7
|
+
React.createElement("path", { "data-name": "Line 54", transform: "translate(5.293)", style: { fill: 'none', stroke: '#c9c9c9', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '1.5px' }, d: "M0 0v4.235" }),
|
|
8
|
+
React.createElement("path", { "data-name": "Line 55", transform: "translate(0 8.469)", style: { fill: 'none', stroke: '#c9c9c9', strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: '1.5px' }, d: "M0 0h19.055" }))));
|
|
9
|
+
};
|
|
10
|
+
export default CalendarIcon;
|
|
11
|
+
//# sourceMappingURL=calendar-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-icon.js","sourceRoot":"","sources":["../../../../modules/calendar/icons/calendar-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAM,YAAY,GAAG;IACnB,OAAO,CACL,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,mBAAmB;QAChG,2BAAG,SAAS,EAAC,oBAAoB;YAC/B,2CAAgB,eAAe,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,EAAC,EAAE,EAAC,GAAG,EAAC,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAC,GAAG;YACvN,2CAAgB,SAAS,EAAC,SAAS,EAAC,mBAAmB,EAAC,KAAK,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAC,EAAE,CAAC,EAAC,YAAY,GAAE;YACzL,2CAAgB,SAAS,EAAC,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAC,EAAE,CAAC,EAAC,YAAY,GAAE;YACxL,2CAAgB,SAAS,EAAC,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAC,EAAE,CAAC,EAAC,aAAa,GAAE,CACzL,CACA,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ArrowLeftIcon from './arrow-left
|
|
2
|
-
import ArrowRightIcon from './arrow-right
|
|
3
|
-
import CalendarIcon from './calendar
|
|
4
|
-
export { CalendarIcon, ArrowLeftIcon, ArrowRightIcon };
|
|
1
|
+
import ArrowLeftIcon from './arrow-left-icon';
|
|
2
|
+
import ArrowRightIcon from './arrow-right-icon';
|
|
3
|
+
import CalendarIcon from './calendar-icon';
|
|
4
|
+
export { CalendarIcon, ArrowLeftIcon, ArrowRightIcon, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ArrowLeftIcon from './arrow-left
|
|
2
|
-
import ArrowRightIcon from './arrow-right
|
|
3
|
-
import CalendarIcon from './calendar
|
|
4
|
-
export { CalendarIcon, ArrowLeftIcon, ArrowRightIcon };
|
|
1
|
+
import ArrowLeftIcon from './arrow-left-icon';
|
|
2
|
+
import ArrowRightIcon from './arrow-right-icon';
|
|
3
|
+
import CalendarIcon from './calendar-icon';
|
|
4
|
+
export { CalendarIcon, ArrowLeftIcon, ArrowRightIcon, };
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/calendar/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/calendar/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,cAAc,GACf,CAAA"}
|
|
@@ -7,8 +7,8 @@ export var Day = function (props) {
|
|
|
7
7
|
if (!children) {
|
|
8
8
|
return React.createElement(Div, __assign({}, props));
|
|
9
9
|
}
|
|
10
|
-
var color = startDate ? 'success' : (disabledDay || holidays ? 'danger' : (selectedDay ? 'primary' : '
|
|
11
|
-
var variant = disabledDay || holidays ||
|
|
12
|
-
return (React.createElement(Button, __assign({ disabled: comingDay, variant: variant, rounded: selectedDay ? 'full' : 'medium', size: 'medium', shape: 'square', color: color, className: classNames(), onClick: handleDay }, props)));
|
|
10
|
+
var color = passedDay ? 'control' : startDate ? 'success' : (disabledDay || holidays ? 'danger' : (selectedDay ? 'primary' : 'inherit'));
|
|
11
|
+
var variant = disabledDay || holidays || selectedDay || startDate ? 'filled' : 'text';
|
|
12
|
+
return (React.createElement(Button, __assign({ disabled: comingDay || passedDay, variant: variant, rounded: selectedDay ? 'full' : 'medium', size: 'medium', shape: 'square', color: color, className: classNames(), onClick: handleDay }, props)));
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=day.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"day.js","sourceRoot":"","sources":["../../../../../modules/calendar/sub-components/day/day.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAC,MAAM,EAAE,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAEhD,MAAM,CAAC,IAAM,GAAG,GAAG,UAAC,KAAe;IAC1B,IAAA,QAAQ,GAAoF,KAAK,SAAzF,EAAE,WAAW,GAAuE,KAAK,YAA5E,EAAE,QAAQ,GAA6D,KAAK,SAAlE,EAAE,SAAS,GAAkD,KAAK,UAAvD,EAAE,SAAS,GAAuC,KAAK,UAA5C,EAAE,WAAW,GAA0B,KAAK,YAA/B,EAAE,SAAS,GAAe,KAAK,UAApB,EAAE,SAAS,GAAI,KAAK,UAAT,CAAU;IAEzG,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,oBAAC,GAAG,eAAK,KAAK,EAAG,CAAA;KACzB;IAED,IAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"day.js","sourceRoot":"","sources":["../../../../../modules/calendar/sub-components/day/day.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,UAAU,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAC,MAAM,EAAE,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAEhD,MAAM,CAAC,IAAM,GAAG,GAAG,UAAC,KAAe;IAC1B,IAAA,QAAQ,GAAoF,KAAK,SAAzF,EAAE,WAAW,GAAuE,KAAK,YAA5E,EAAE,QAAQ,GAA6D,KAAK,SAAlE,EAAE,SAAS,GAAkD,KAAK,UAAvD,EAAE,SAAS,GAAuC,KAAK,UAA5C,EAAE,WAAW,GAA0B,KAAK,YAA/B,EAAE,SAAS,GAAe,KAAK,UAApB,EAAE,SAAS,GAAI,KAAK,UAAT,CAAU;IAEzG,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,oBAAC,GAAG,eAAK,KAAK,EAAG,CAAA;KACzB;IAED,IAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3I,IAAM,OAAO,GAAG,WAAW,IAAI,QAAQ,IAAI,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IACxF,OAAO,CACL,oBAAC,MAAM,aACL,QAAQ,EAAE,SAAS,IAAI,SAAS,EAChC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EACxC,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,UAAU,EAAE,EACvB,OAAO,EAAE,SAAS,IACd,KAAK,EACT,CACH,CAAA;AACH,CAAC,CAAC"}
|
|
@@ -26,11 +26,13 @@ var Days = function (props) {
|
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
return (React.createElement(Div, { className: 'flex-1 w-[390px] md:w-[560px] flex-col self-center relative overflow-auto mx-1 bg-white' },
|
|
29
|
-
React.createElement(DaysHead, { year: year, monthName: monthName, disablePreviousMonths: disablePreviousMonths, disableSubsequentMonths: disableSubsequentMonths, increaseMonth: increaseMonth, decreaseMonth: decreaseMonth }),
|
|
29
|
+
React.createElement(DaysHead, { year: year, monthName: monthName, days: days, date: date, dateFormat: dateFormat, disablePreviousMonths: disablePreviousMonths, disableSubsequentMonths: disableSubsequentMonths, increaseMonth: increaseMonth, decreaseMonth: decreaseMonth }),
|
|
30
30
|
React.createElement(Div, { className: 'flex-col items-center flex-1 gap-4', "data-testid": "days-wrapper" },
|
|
31
|
-
React.createElement(Div, { className: 'grid grid-cols-7 w-full gap-x-7' }, weekDayNames.map(function (name) { return (React.createElement(Text, { type: "regular", color: "black", key: name }, name)); })),
|
|
31
|
+
React.createElement(Div, { className: 'grid grid-cols-7 w-full md:gap-x-7' }, weekDayNames.map(function (name) { return (React.createElement(Text, { typography: 'xs', type: "regular", color: "black", key: name }, name)); })),
|
|
32
32
|
React.createElement(Divider, { color: "control" }),
|
|
33
|
-
React.createElement(Div, { className: 'flex-col w-full gap-y-4' }, weeks.map(function (week, idx) { return (React.createElement(Div, { className: 'grid grid-cols-7 w-full gap-x-7', "data-testid": "days", key: "rdp-weeks-".concat(idx) }, week.map(function (day, id) {
|
|
33
|
+
React.createElement(Div, { className: 'flex-col w-full gap-y-4' }, weeks.map(function (week, idx) { return (React.createElement(Div, { className: 'grid grid-cols-7 w-full md:gap-x-7', "data-testid": "days", key: "rdp-weeks-".concat(idx) }, week.map(function (day, id) {
|
|
34
|
+
return (React.createElement(Day, __assign({ key: day.jalaliDate, passedDay: disablePreviousDays && day.jalaliDate < dates, comingDay: disableSubsequentDays && day.jalaliDate > dates, holidays: tempHolidays.indexOf(day.jalaliDate) !== -1, "data-testid": "day-".concat(idx * 7 + id + 1), "data-fadate": "".concat(day.jalaliDate), disabledDay: week.length === 7 && id === 6, selectedDay: selectedDay === day.jalaliDate, startDate: startDate === day.jalaliDate, handleDay: function () { return handleDayClick(day); } }, boolDataset(day.disabled)), !day.disabled ? fa(day.day) : null));
|
|
35
|
+
}))); })))));
|
|
34
36
|
};
|
|
35
37
|
Days.defaultProps = {
|
|
36
38
|
monthName: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"days.js","sourceRoot":"","sources":["../../../../../modules/calendar/sub-components/days/days.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,QAAQ,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAC,GAAG,EAAC,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAC,KAAK,EAAE,EAAE,EAAS,YAAY,EAAC,MAAM,cAAc,CAAA;AAC3D,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,OAAO,MAAM,qCAAqC,CAAC;AAC1D,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,sBAAsB,CAAA;AAEvD,IAAM,WAAW,GAAG,UAAC,GAAY;IAC/B,IAAI,GAAG,EAAE;QACP,OAAO;YACL,cAAc,EAAE,GAAG;SACpB,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,IAAM,YAAY,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;AAEjK,IAAM,IAAI,GAAG,UAAC,KAAgB;IAE1B,IAAA,IAAI,GAcF,KAAK,KAdH,EACJ,SAAS,GAaP,KAAK,UAbE,EACT,sBAAsB,GAYpB,KAAK,uBAZe,EACtB,SAAS,GAWP,KAAK,UAXE,EACT,qBAAqB,GAUnB,KAAK,sBAVc,EACrB,uBAAuB,GASrB,KAAK,wBATgB,EACvB,mBAAmB,GAQjB,KAAK,oBARY,EACnB,qBAAqB,GAOnB,KAAK,sBAPc,EACrB,aAAa,GAMX,KAAK,cANM,EACb,aAAa,GAKX,KAAK,cALM,EACb,WAAW,GAIT,KAAK,YAJI,EACX,IAAI,GAGF,KAA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U,CAAE,EAChC,WAAW,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAC1C,WAAW,EAAE,WAAW,KAAK,GAAG,CAAC,UAAU,EAC3C,SAAS,EAAE,SAAS,KAAK,GAAG,CAAC,UAAU,EACvC,SAAS,EAAE,cAAM,OAAA,cAAc,CAAC,GAAG,CAAC,EAAnB,CAAmB,IAChC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,GAC5B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC/B,CACP,CAAA;YACH,CAAC,CAAC,CACE,CACP,EArByB,CAqBzB,CAAC,CACE,CACF,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAGD,IAAI,CAAC,YAAY,GAAG;IAClB,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,EAAE;CAChB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -7,8 +7,8 @@ export interface DaysProps {
|
|
|
7
7
|
disablePreviousDays: boolean;
|
|
8
8
|
disableSubsequentDays: boolean;
|
|
9
9
|
daysEventListeners: any;
|
|
10
|
-
increaseMonth:
|
|
11
|
-
decreaseMonth:
|
|
10
|
+
increaseMonth: () => void;
|
|
11
|
+
decreaseMonth: () => void;
|
|
12
12
|
isDatePicker: boolean;
|
|
13
13
|
startDate: string;
|
|
14
14
|
selectStartDateHandler: any;
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Button, Div, Text } from '@pezeshk-book/ui-kit';
|
|
3
3
|
import { ArrowLeftIcon, ArrowRightIcon, CalendarIcon } from '../../icons';
|
|
4
|
+
import DateObject from "react-date-object";
|
|
5
|
+
import persian from "react-date-object/calendars/persian";
|
|
4
6
|
var DaysHead = function (props) {
|
|
5
|
-
var decreaseMonth = props.decreaseMonth, increaseMonth = props.increaseMonth, monthName = props.monthName, year = props.year, disablePreviousMonths = props.disablePreviousMonths, disableSubsequentMonths = props.disableSubsequentMonths;
|
|
7
|
+
var decreaseMonth = props.decreaseMonth, increaseMonth = props.increaseMonth, monthName = props.monthName, year = props.year, disablePreviousMonths = props.disablePreviousMonths, disableSubsequentMonths = props.disableSubsequentMonths, days = props.days, date = props.date, dateFormat = props.dateFormat;
|
|
8
|
+
var comparedFromCurrentMonth = function (amount) {
|
|
9
|
+
var sideDatesMonth = new DateObject({ date: date, calendar: persian }).add(amount, "month").setDay(31).format(dateFormat);
|
|
10
|
+
var lastDaySideMonthCalendarShow = new DateObject({ date: days.at(-1).jalaliDate, calendar: persian }).add(amount, "month").setDay(31).format(dateFormat);
|
|
11
|
+
return sideDatesMonth === lastDaySideMonthCalendarShow;
|
|
12
|
+
};
|
|
6
13
|
return (React.createElement(Div, { className: 'justify-center items-center bg-white w-full self-center mb-5' },
|
|
7
14
|
React.createElement(Div, { className: 'w-full items-center justify-between h-12 px-4' },
|
|
8
15
|
React.createElement(Div, { className: 'relative w-5 h-5' },
|
|
9
|
-
React.createElement(
|
|
10
|
-
React.createElement(Div, { className: 'items-center' },
|
|
11
|
-
React.createElement(Button, { variant: "text", size: 'small', className: 'flex items-center', onClick: decreaseMonth, shape: 'square', disabled: disablePreviousMonths },
|
|
16
|
+
React.createElement(CalendarIcon, null)),
|
|
17
|
+
React.createElement(Div, { className: 'flex items-center' },
|
|
18
|
+
React.createElement(Button, { variant: "text", size: 'small', color: "control", className: 'flex items-center', onClick: decreaseMonth, shape: 'square', disabled: disablePreviousMonths && comparedFromCurrentMonth(-1) },
|
|
12
19
|
React.createElement(Div, { className: 'h-3 w-2.5 relative' },
|
|
13
|
-
React.createElement(
|
|
14
|
-
React.createElement(Text, { className: '
|
|
15
|
-
React.createElement(Button, { variant: "text", size: 'small', className: 'flex items-center', onClick: increaseMonth, shape: 'square', disabled: disableSubsequentMonths },
|
|
20
|
+
React.createElement(ArrowRightIcon, null))),
|
|
21
|
+
React.createElement(Text, { className: 'w-36', color: "grey.900", type: 'bold', typography: "xxl" }, monthName),
|
|
22
|
+
React.createElement(Button, { variant: "text", size: 'small', color: "control", className: 'flex items-center', onClick: increaseMonth, shape: 'square', disabled: disableSubsequentMonths && comparedFromCurrentMonth(1) },
|
|
16
23
|
React.createElement(Div, { className: 'h-3 w-2.5 relative' },
|
|
17
|
-
React.createElement(
|
|
24
|
+
React.createElement(ArrowLeftIcon, null)))),
|
|
18
25
|
React.createElement(Div, null,
|
|
19
26
|
React.createElement(Text, { color: 'grey.900', type: "medium" },
|
|
20
27
|
"\u0633\u0627\u0644 ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"days-head.js","sourceRoot":"","sources":["../../../../../modules/calendar/sub-components/days-head/days-head.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAC,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,YAAY,EAAC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"days-head.js","sourceRoot":"","sources":["../../../../../modules/calendar/sub-components/days-head/days-head.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAC,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,YAAY,EAAC,MAAM,aAAa,CAAA;AACvE,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,OAAO,MAAM,qCAAqC,CAAC;AAE1D,IAAM,QAAQ,GAAG,UAAC,KAAoB;IAC7B,IAAA,aAAa,GAA4G,KAAK,cAAjH,EAAE,aAAa,GAA6F,KAAK,cAAlG,EAAE,SAAS,GAAkF,KAAK,UAAvF,EAAE,IAAI,GAA4E,KAAK,KAAjF,EAAE,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