@react-fabric/date 1.0.0-beta.6 → 1.0.0-beta.61
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/README.md +2 -9
- package/{src/components/Date.module.css → css/_date.css} +5 -5
- package/{src/superdate/SuperDate.module.css → css/styles.css} +2 -8
- package/dist/cjs/components/DateHeader.js +16 -8
- package/dist/cjs/components/DatePage.js +2 -3
- package/dist/cjs/components/TimeSliders.js +5 -6
- package/dist/cjs/display/DateDisplay.js +24 -2
- package/dist/cjs/display/DateDuration.js +143 -0
- package/dist/cjs/hijri/DateConverter.js +154 -0
- package/dist/cjs/hijri/FormatDate.js +116 -0
- package/dist/cjs/hijri/HijriDate.js +531 -0
- package/dist/cjs/hijri/StringDateParser.js +74 -0
- package/dist/cjs/hijri/index.js +17 -1025
- package/dist/cjs/hijri/initializer.js +113 -0
- package/dist/cjs/hijri/locales.js +19 -0
- package/dist/cjs/hijri/safe.js +17 -0
- package/dist/cjs/i18n/ar.json.js +191 -3
- package/dist/cjs/i18n/en.json.js +63 -1
- package/dist/cjs/i18n/index.js +0 -6
- package/dist/cjs/index.js +13 -2
- package/dist/cjs/panels/DatePanel.js +26 -0
- package/dist/cjs/{superdate → panels}/EventPanel.js +2 -1
- package/dist/cjs/panels/RangePanel.js +23 -0
- package/dist/cjs/utils/dateUtil.js +1 -4
- package/dist/esm/components/DateHeader.js +17 -9
- package/dist/esm/components/DatePage.js +2 -3
- package/dist/esm/components/TimeSliders.js +5 -6
- package/dist/esm/display/DateDisplay.js +24 -2
- package/dist/esm/display/DateDuration.js +143 -0
- package/dist/esm/hijri/DateConverter.js +152 -0
- package/dist/esm/hijri/FormatDate.js +113 -0
- package/dist/esm/hijri/HijriDate.js +528 -0
- package/dist/esm/hijri/StringDateParser.js +74 -0
- package/dist/esm/hijri/index.js +17 -1025
- package/dist/esm/hijri/initializer.js +113 -0
- package/dist/esm/hijri/locales.js +18 -0
- package/dist/esm/hijri/safe.js +14 -0
- package/dist/esm/i18n/ar.json.js +191 -3
- package/dist/esm/i18n/en.json.js +63 -2
- package/dist/esm/i18n/index.js +0 -6
- package/dist/esm/index.js +6 -1
- package/dist/esm/panels/DatePanel.js +26 -0
- package/dist/esm/{superdate → panels}/EventPanel.js +2 -1
- package/dist/esm/panels/RangePanel.js +23 -0
- package/dist/esm/utils/dateUtil.js +1 -4
- package/dist/types/display/DateDisplay.d.ts +21 -3
- package/dist/types/display/DateDuration.d.ts +31 -0
- package/dist/types/hijri/DateConverter.d.ts +13 -0
- package/dist/types/hijri/FormatDate.d.ts +19 -0
- package/dist/types/hijri/HijriDate.d.ts +214 -0
- package/dist/types/hijri/StringDateParser.d.ts +11 -0
- package/dist/types/hijri/index.d.ts +2 -2
- package/dist/types/hijri/initializer.d.ts +129 -0
- package/dist/types/hijri/locales.d.ts +19 -0
- package/dist/types/hijri/safe.d.ts +3 -0
- package/dist/types/index.d.ts +6 -1
- package/dist/types/panels/DatePanel.d.ts +26 -0
- package/dist/types/panels/EventPanel.d.ts +17 -0
- package/dist/types/panels/RangePanel.d.ts +22 -0
- package/dist/types/types/index.d.ts +8 -40
- package/package.json +13 -16
- package/src/components/DateHeader.tsx +5 -9
- package/src/components/DatePage.tsx +2 -3
- package/src/components/TimeSliders.tsx +5 -6
- package/src/display/DateDisplay.tsx +32 -4
- package/src/display/DateDuration.tsx +180 -0
- package/src/hijri/DateConverter.js +175 -0
- package/src/hijri/FormatDate.js +134 -0
- package/src/hijri/HijriDate.js +477 -0
- package/src/hijri/StringDateParser.js +68 -0
- package/src/hijri/index.js +16 -1535
- package/src/hijri/initializer.js +96 -0
- package/src/hijri/locales.js +109 -0
- package/src/hijri/safe.js +16 -0
- package/src/i18n/ar.json +190 -1
- package/src/i18n/en.json +60 -0
- package/src/i18n/index.ts +0 -3
- package/src/index.ts +7 -1
- package/src/panels/DatePanel.tsx +26 -0
- package/src/{superdate → panels}/EventPanel.tsx +21 -3
- package/src/panels/RangePanel.tsx +23 -0
- package/src/types/index.ts +8 -43
- package/src/utils/dateUtil.ts +1 -5
- package/dist/cjs/components/Date.module.css +0 -1
- package/dist/cjs/i18n/superdate/ar.json.js +0 -86
- package/dist/cjs/i18n/superdate/en.json.js +0 -93
- package/dist/cjs/superdate/QuickSelect.js +0 -134
- package/dist/cjs/superdate/RelativeInput.js +0 -79
- package/dist/cjs/superdate/RelativePanel.js +0 -91
- package/dist/cjs/superdate/SuperDate.module.css +0 -1
- package/dist/cjs/superdate/Superdate.js +0 -177
- package/dist/esm/components/Date.module.css +0 -1
- package/dist/esm/i18n/superdate/ar.json.js +0 -79
- package/dist/esm/i18n/superdate/en.json.js +0 -85
- package/dist/esm/superdate/QuickSelect.js +0 -134
- package/dist/esm/superdate/RelativeInput.js +0 -79
- package/dist/esm/superdate/RelativePanel.js +0 -91
- package/dist/esm/superdate/SuperDate.module.css +0 -1
- package/dist/esm/superdate/Superdate.js +0 -176
- package/dist/types/superdate/EventPanel.d.ts +0 -4
- package/dist/types/superdate/QuickSelect.d.ts +0 -1
- package/dist/types/superdate/RelativeInput.d.ts +0 -1
- package/dist/types/superdate/RelativePanel.d.ts +0 -1
- package/dist/types/superdate/Superdate.d.ts +0 -17
- package/src/i18n/superdate/ar.json +0 -70
- package/src/i18n/superdate/en.json +0 -75
- package/src/superdate/QuickSelect.tsx +0 -121
- package/src/superdate/RelativeInput.tsx +0 -64
- package/src/superdate/RelativePanel.tsx +0 -103
- package/src/superdate/Superdate.tsx +0 -198
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
4
|
+
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
5
|
+
var DateConverter = require('./DateConverter.js');
|
|
6
|
+
var StringDateParser = require('./StringDateParser.js');
|
|
7
|
+
|
|
8
|
+
var defaultFormat = 'yyyy/mm/dd';
|
|
9
|
+
var defaultProps = {
|
|
10
|
+
month: 1,
|
|
11
|
+
date: 1,
|
|
12
|
+
hours: 0,
|
|
13
|
+
minutes: 0,
|
|
14
|
+
seconds: 0,
|
|
15
|
+
milliseconds: 0
|
|
16
|
+
};
|
|
17
|
+
var Initializer = /*#__PURE__*/function () {
|
|
18
|
+
function Initializer() {
|
|
19
|
+
_classCallCheck(this, Initializer);
|
|
20
|
+
}
|
|
21
|
+
return _createClass(Initializer, null, [{
|
|
22
|
+
key: "initDefault",
|
|
23
|
+
value: function initDefault() {
|
|
24
|
+
return DateConverter.GregToHijri(new Date());
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
key: "init_number",
|
|
28
|
+
value: function init_number(number) {
|
|
29
|
+
return DateConverter.GregToHijri(new Date(number));
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "init_number_number",
|
|
33
|
+
value: function init_number_number(year, month) {
|
|
34
|
+
return this.init_number_number_number(year, month, 1);
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "init_number_number_number",
|
|
38
|
+
value: function init_number_number_number() {
|
|
39
|
+
return this.initFromNumbers.apply(this, arguments);
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "init_number_number_number_number",
|
|
43
|
+
value: function init_number_number_number_number() {
|
|
44
|
+
return this.initFromNumbers.apply(this, arguments);
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
key: "init_number_number_number_number_number",
|
|
48
|
+
value: function init_number_number_number_number_number() {
|
|
49
|
+
return this.initFromNumbers.apply(this, arguments);
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "init_number_number_number_number_number_number",
|
|
53
|
+
value: function init_number_number_number_number_number_number() {
|
|
54
|
+
return this.initFromNumbers.apply(this, arguments);
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "init_number_number_number_number_number_number_number",
|
|
58
|
+
value: function init_number_number_number_number_number_number_number() {
|
|
59
|
+
return this.initFromNumbers.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "init_string",
|
|
63
|
+
value: function init_string() {
|
|
64
|
+
return this.initFromStrings.apply(this, arguments);
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "init_string_string",
|
|
68
|
+
value: function init_string_string() {
|
|
69
|
+
return this.initFromStrings.apply(this, arguments);
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "init_object",
|
|
73
|
+
value: function init_object(object) {
|
|
74
|
+
return Object.assign({}, defaultProps, object);
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: "initFromNumbers",
|
|
78
|
+
value: function initFromNumbers(year, month, date) {
|
|
79
|
+
var _arguments = arguments;
|
|
80
|
+
var hours = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
81
|
+
var minutes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
82
|
+
var seconds = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
|
83
|
+
var milliseconds = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
|
|
84
|
+
Array.from(arguments).forEach(function (arg, index) {
|
|
85
|
+
_arguments[index] = parseInt(arg);
|
|
86
|
+
});
|
|
87
|
+
return {
|
|
88
|
+
year: year,
|
|
89
|
+
month: month,
|
|
90
|
+
date: date,
|
|
91
|
+
hours: hours,
|
|
92
|
+
minutes: minutes,
|
|
93
|
+
seconds: seconds,
|
|
94
|
+
milliseconds: milliseconds
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//TODO
|
|
99
|
+
}, {
|
|
100
|
+
key: "initFromStrings",
|
|
101
|
+
value: function initFromStrings(dateString) {
|
|
102
|
+
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultFormat;
|
|
103
|
+
var props = {};
|
|
104
|
+
props.year = StringDateParser.extractYear(dateString, format);
|
|
105
|
+
props.month = StringDateParser.extractMonth(dateString, format);
|
|
106
|
+
props.date = StringDateParser.extractDate(dateString, format);
|
|
107
|
+
return Object.assign({}, defaultProps, props);
|
|
108
|
+
}
|
|
109
|
+
}]);
|
|
110
|
+
}();
|
|
111
|
+
Initializer.defaultFormat = defaultFormat;
|
|
112
|
+
|
|
113
|
+
module.exports = Initializer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ar = {
|
|
4
|
+
dayNames: ["ح", "ن", "ث", "ر", "خ", "ج", "س", "أحد", "اثن", "ثلا", "ارب", "خم", "جم", "سبت", "الأحد", "الإثنين", "الثلاثاء", "الإربعاء", "الخميس", "الجمعة", "السبت"],
|
|
5
|
+
monthNames: ["مح", "صف", "ربع١", "ربع٢", "جم١", "جم٢", "رجب", "شعب", "رمض", "شو", "ذو ق", "ذو ح", "محرّم", "صفر", "ربيع أول", "ربيع الآخر", "جمادى أولى", "جمادى الآخرة", "رجب", "شعبان", "رمضان", "شوال", "ذو القعدة", "ذو الحجّة"],
|
|
6
|
+
separator: "عند",
|
|
7
|
+
am: "ص",
|
|
8
|
+
pm: "م"
|
|
9
|
+
};
|
|
10
|
+
var en = {
|
|
11
|
+
dayNames: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
12
|
+
monthNames: ["Muha", "Saf", "Rab1", "Rab2", "Jumd1", "Jumd2", "Rajb", "Shbn", "Rmdn", "Shwl", "Qada", "Hija", "Muharram", "Safar", "Rabi'ul Awwal", "Rabi'ul Akhir", "Jumadal Ula", "Jumadal Akhira", "Rajab", "Sha'ban", "Ramadan", "Shawwal", "Dhul Qa'ada", "Dhul Hijja"],
|
|
13
|
+
separator: "at",
|
|
14
|
+
am: "am",
|
|
15
|
+
pm: "pm"
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ar = ar;
|
|
19
|
+
exports.en = en;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var HijriDate = require('./HijriDate.js');
|
|
6
|
+
var DateConverter = require('./DateConverter.js');
|
|
7
|
+
|
|
8
|
+
var toHijri = function toHijri(gregDate) {
|
|
9
|
+
var _GregToHijri = DateConverter.GregToHijri(gregDate),
|
|
10
|
+
year = _GregToHijri.year,
|
|
11
|
+
month = _GregToHijri.month,
|
|
12
|
+
date = _GregToHijri.date;
|
|
13
|
+
return new HijriDate.default(year, month, date, gregDate.getHours(), gregDate.getMinutes(), gregDate.getSeconds(), gregDate.getMilliseconds());
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.default = HijriDate.default;
|
|
17
|
+
exports.toHijri = toHijri;
|
package/dist/cjs/i18n/ar.json.js
CHANGED
|
@@ -13,13 +13,201 @@ var label = {
|
|
|
13
13
|
hijri: "هجري",
|
|
14
14
|
gregorian: "ميلادي"
|
|
15
15
|
};
|
|
16
|
-
var
|
|
16
|
+
var relative = {
|
|
17
|
+
before: {
|
|
18
|
+
now: "الآن",
|
|
19
|
+
years: "{{count}} منذ عام",
|
|
20
|
+
months: "{{count}} منذ شهر",
|
|
21
|
+
weeks: "{{count}} قبل أسبوع",
|
|
22
|
+
days: "{{count}} منذ يوم",
|
|
23
|
+
hours: "{{count}} منذ ساعة",
|
|
24
|
+
minutes: "{{count}} منذ دقيقة",
|
|
25
|
+
seconds: "{{count}} قبل الثاني",
|
|
26
|
+
yearsX: "بالكاد {{count}} منذ عام",
|
|
27
|
+
monthsX: "بالكاد {{count}} منذ شهر",
|
|
28
|
+
weeksX: "بالكاد {{count}} قبل أسبوع",
|
|
29
|
+
daysX: "بالكاد {{count}} منذ يوم",
|
|
30
|
+
hoursX: "بالكاد {{count}} منذ ساعة",
|
|
31
|
+
minutesX: "بالكاد {{count}} منذ دقيقة",
|
|
32
|
+
years_zero: "{{count}} منذ سنوات",
|
|
33
|
+
years_one: "{{count}} منذ عام",
|
|
34
|
+
years_two: "{{count}} منذ سنوات",
|
|
35
|
+
years_few: "{{count}} منذ سنوات",
|
|
36
|
+
years_many: "{{count}} منذ سنوات",
|
|
37
|
+
years_other: "{{count}} منذ سنوات",
|
|
38
|
+
months_zero: "{{count}} منذ أشهر",
|
|
39
|
+
months_one: "{{count}} منذ شهر",
|
|
40
|
+
months_two: "{{count}} منذ أشهر",
|
|
41
|
+
months_few: "{{count}} منذ أشهر",
|
|
42
|
+
months_many: "{{count}} منذ أشهر",
|
|
43
|
+
months_other: "{{count}} منذ أشهر",
|
|
44
|
+
weeks_zero: "{{count}} منذ أسابيع",
|
|
45
|
+
weeks_one: "{{count}} قبل أسبوع",
|
|
46
|
+
weeks_two: "{{count}} منذ أسابيع",
|
|
47
|
+
weeks_few: "{{count}} منذ أسابيع",
|
|
48
|
+
weeks_many: "{{count}} منذ أسابيع",
|
|
49
|
+
weeks_other: "{{count}} منذ أسابيع",
|
|
50
|
+
days_zero: "{{count}} منذ أيام",
|
|
51
|
+
days_one: "{{count}} منذ يوم",
|
|
52
|
+
days_two: "{{count}} منذ أيام",
|
|
53
|
+
days_few: "{{count}} منذ أيام",
|
|
54
|
+
days_many: "{{count}} منذ أيام",
|
|
55
|
+
days_other: "{{count}} منذ أيام",
|
|
56
|
+
hours_zero: "{{count}} منذ ساعات",
|
|
57
|
+
hours_one: "{{count}} منذ ساعة",
|
|
58
|
+
hours_two: "{{count}} منذ ساعات",
|
|
59
|
+
hours_few: "{{count}} منذ ساعات",
|
|
60
|
+
hours_many: "{{count}} منذ ساعات",
|
|
61
|
+
hours_other: "{{count}} منذ ساعات",
|
|
62
|
+
minutes_zero: "{{count}} منذ دقائق",
|
|
63
|
+
minutes_one: "{{count}} منذ دقيقة",
|
|
64
|
+
minutes_two: "{{count}} منذ دقائق",
|
|
65
|
+
minutes_few: "{{count}} منذ دقائق",
|
|
66
|
+
minutes_many: "{{count}} منذ دقائق",
|
|
67
|
+
minutes_other: "{{count}} منذ دقائق",
|
|
68
|
+
seconds_zero: "{{count}} قبل ثوان",
|
|
69
|
+
seconds_one: "{{count}} قبل الثاني",
|
|
70
|
+
seconds_two: "{{count}} قبل ثوان",
|
|
71
|
+
seconds_few: "{{count}} قبل ثوان",
|
|
72
|
+
seconds_many: "{{count}} قبل ثوان",
|
|
73
|
+
seconds_other: "{{count}} قبل ثوان",
|
|
74
|
+
yearsX_zero: "بالكاد {{count}} منذ سنوات",
|
|
75
|
+
yearsX_one: "بالكاد {{count}} منذ عام",
|
|
76
|
+
yearsX_two: "بالكاد {{count}} منذ سنوات",
|
|
77
|
+
yearsX_few: "بالكاد {{count}} منذ سنوات",
|
|
78
|
+
yearsX_many: "بالكاد {{count}} منذ سنوات",
|
|
79
|
+
yearsX_other: "بالكاد {{count}} منذ سنوات",
|
|
80
|
+
monthsX_zero: "بالكاد {{count}} منذ أشهر",
|
|
81
|
+
monthsX_one: "بالكاد {{count}} منذ شهر",
|
|
82
|
+
monthsX_two: "بالكاد {{count}} منذ أشهر",
|
|
83
|
+
monthsX_few: "بالكاد {{count}} منذ أشهر",
|
|
84
|
+
monthsX_many: "بالكاد {{count}} منذ أشهر",
|
|
85
|
+
monthsX_other: "بالكاد {{count}} منذ أشهر",
|
|
86
|
+
weeksX_zero: "بالكاد {{count}} منذ أسابيع",
|
|
87
|
+
weeksX_one: "بالكاد {{count}} قبل أسبوع",
|
|
88
|
+
weeksX_two: "بالكاد {{count}} منذ أسابيع",
|
|
89
|
+
weeksX_few: "بالكاد {{count}} منذ أسابيع",
|
|
90
|
+
weeksX_many: "بالكاد {{count}} منذ أسابيع",
|
|
91
|
+
weeksX_other: "بالكاد {{count}} منذ أسابيع",
|
|
92
|
+
daysX_zero: "بالكاد {{count}} منذ أيام",
|
|
93
|
+
daysX_one: "بالكاد {{count}} منذ يوم",
|
|
94
|
+
daysX_two: "بالكاد {{count}} منذ أيام",
|
|
95
|
+
daysX_few: "بالكاد {{count}} منذ أيام",
|
|
96
|
+
daysX_many: "بالكاد {{count}} منذ أيام",
|
|
97
|
+
daysX_other: "بالكاد {{count}} منذ أيام",
|
|
98
|
+
hoursX_zero: "بالكاد {{count}} منذ ساعات",
|
|
99
|
+
hoursX_one: "بالكاد {{count}} منذ ساعة",
|
|
100
|
+
hoursX_two: "بالكاد {{count}} منذ ساعات",
|
|
101
|
+
hoursX_few: "بالكاد {{count}} منذ ساعات",
|
|
102
|
+
hoursX_many: "بالكاد {{count}} منذ ساعات",
|
|
103
|
+
hoursX_other: "بالكاد {{count}} منذ ساعات",
|
|
104
|
+
minutesX_zero: "بالكاد {{count}} منذ دقائق",
|
|
105
|
+
minutesX_one: "بالكاد {{count}} منذ دقيقة",
|
|
106
|
+
minutesX_two: "بالكاد {{count}} منذ دقائق",
|
|
107
|
+
minutesX_few: "بالكاد {{count}} منذ دقائق",
|
|
108
|
+
minutesX_many: "بالكاد {{count}} منذ دقائق",
|
|
109
|
+
minutesX_other: "بالكاد {{count}} منذ دقائق"
|
|
110
|
+
},
|
|
111
|
+
after: {
|
|
112
|
+
now: "قريباً",
|
|
113
|
+
years: "{{count}} بعد عام",
|
|
114
|
+
months: "{{count}} بعد شهر",
|
|
115
|
+
weeks: "{{count}} بعد أسبوع",
|
|
116
|
+
days: "{{count}} بعد يوم",
|
|
117
|
+
hours: "{{count}} بعد ساعة",
|
|
118
|
+
minutes: "{{count}} بعد دقيقة",
|
|
119
|
+
seconds: "{{count}} الثاني في وقت لاحق",
|
|
120
|
+
yearsX: "بالكاد {{count}} بعد عام",
|
|
121
|
+
monthsX: "بالكاد {{count}} بعد شهر",
|
|
122
|
+
weeksX: "بالكاد {{count}} بعد أسبوع",
|
|
123
|
+
daysX: "بالكاد {{count}} بعد يوم",
|
|
124
|
+
hoursX: "بالكاد {{count}} بعد ساعة",
|
|
125
|
+
minutesX: "بالكاد {{count}} بعد دقيقة",
|
|
126
|
+
years_zero: "{{count}} بعد سنوات",
|
|
127
|
+
years_one: "{{count}} بعد عام",
|
|
128
|
+
years_two: "{{count}} بعد سنوات",
|
|
129
|
+
years_few: "{{count}} بعد سنوات",
|
|
130
|
+
years_many: "{{count}} بعد سنوات",
|
|
131
|
+
years_other: "{{count}} بعد سنوات",
|
|
132
|
+
months_zero: "{{count}} بعد أشهر",
|
|
133
|
+
months_one: "{{count}} بعد شهر",
|
|
134
|
+
months_two: "{{count}} بعد أشهر",
|
|
135
|
+
months_few: "{{count}} بعد أشهر",
|
|
136
|
+
months_many: "{{count}} بعد أشهر",
|
|
137
|
+
months_other: "{{count}} بعد أشهر",
|
|
138
|
+
weeks_zero: "{{count}} بعد أسابيع",
|
|
139
|
+
weeks_one: "{{count}} بعد أسبوع",
|
|
140
|
+
weeks_two: "{{count}} بعد أسابيع",
|
|
141
|
+
weeks_few: "{{count}} بعد أسابيع",
|
|
142
|
+
weeks_many: "{{count}} بعد أسابيع",
|
|
143
|
+
weeks_other: "{{count}} بعد أسابيع",
|
|
144
|
+
days_zero: "{{count}} بعد أيام",
|
|
145
|
+
days_one: "{{count}} بعد يوم",
|
|
146
|
+
days_two: "{{count}} بعد أيام",
|
|
147
|
+
days_few: "{{count}} بعد أيام",
|
|
148
|
+
days_many: "{{count}} بعد أيام",
|
|
149
|
+
days_other: "{{count}} بعد أيام",
|
|
150
|
+
hours_zero: "{{count}} بعد ساعات",
|
|
151
|
+
hours_one: "{{count}} بعد ساعة",
|
|
152
|
+
hours_two: "{{count}} بعد ساعات",
|
|
153
|
+
hours_few: "{{count}} بعد ساعات",
|
|
154
|
+
hours_many: "{{count}} بعد ساعات",
|
|
155
|
+
hours_other: "{{count}} بعد ساعات",
|
|
156
|
+
minutes_zero: "{{count}} بعد دقائق",
|
|
157
|
+
minutes_one: "{{count}} بعد دقيقة",
|
|
158
|
+
minutes_two: "{{count}} بعد دقائق",
|
|
159
|
+
minutes_few: "{{count}} بعد دقائق",
|
|
160
|
+
minutes_many: "{{count}} بعد دقائق",
|
|
161
|
+
minutes_other: "{{count}} بعد دقائق",
|
|
162
|
+
seconds_zero: "{{count}} بعد ثوان",
|
|
163
|
+
seconds_one: "{{count}} الثاني في وقت لاحق",
|
|
164
|
+
seconds_two: "{{count}} بعد ثوان",
|
|
165
|
+
seconds_few: "{{count}} بعد ثوان",
|
|
166
|
+
seconds_many: "{{count}} بعد ثوان",
|
|
167
|
+
seconds_other: "{{count}} بعد ثوان",
|
|
168
|
+
yearsX_zero: "بالكاد {{count}} بعد سنوات",
|
|
169
|
+
yearsX_one: "بالكاد {{count}} بعد عام",
|
|
170
|
+
yearsX_two: "بالكاد {{count}} بعد سنوات",
|
|
171
|
+
yearsX_few: "بالكاد {{count}} بعد سنوات",
|
|
172
|
+
yearsX_many: "بالكاد {{count}} بعد سنوات",
|
|
173
|
+
yearsX_other: "بالكاد {{count}} بعد سنوات",
|
|
174
|
+
monthsX_zero: "بالكاد {{count}} بعد أشهر",
|
|
175
|
+
monthsX_one: "بالكاد {{count}} بعد شهر",
|
|
176
|
+
monthsX_two: "بالكاد {{count}} بعد أشهر",
|
|
177
|
+
monthsX_few: "بالكاد {{count}} بعد أشهر",
|
|
178
|
+
monthsX_many: "بالكاد {{count}} بعد أشهر",
|
|
179
|
+
monthsX_other: "بالكاد {{count}} بعد أشهر",
|
|
180
|
+
weeksX_zero: "بالكاد {{count}} بعد أسابيع",
|
|
181
|
+
weeksX_one: "بالكاد {{count}} بعد أسبوع",
|
|
182
|
+
weeksX_two: "بالكاد {{count}} بعد أسابيع",
|
|
183
|
+
weeksX_few: "بالكاد {{count}} بعد أسابيع",
|
|
184
|
+
weeksX_many: "بالكاد {{count}} بعد أسابيع",
|
|
185
|
+
weeksX_other: "بالكاد {{count}} بعد أسابيع",
|
|
186
|
+
daysX_zero: "بالكاد {{count}} بعد أيام",
|
|
187
|
+
daysX_one: "بالكاد {{count}} بعد يوم",
|
|
188
|
+
daysX_two: "بالكاد {{count}} بعد أيام",
|
|
189
|
+
daysX_few: "بالكاد {{count}} بعد أيام",
|
|
190
|
+
daysX_many: "بالكاد {{count}} بعد أيام",
|
|
191
|
+
daysX_other: "بالكاد {{count}} بعد أيام",
|
|
192
|
+
hoursX_zero: "بالكاد {{count}} بعد ساعات",
|
|
193
|
+
hoursX_one: "بالكاد {{count}} بعد ساعة",
|
|
194
|
+
hoursX_two: "بالكاد {{count}} بعد ساعات",
|
|
195
|
+
hoursX_few: "بالكاد {{count}} بعد ساعات",
|
|
196
|
+
hoursX_many: "بالكاد {{count}} بعد ساعات",
|
|
197
|
+
hoursX_other: "بالكاد {{count}} بعد ساعات",
|
|
198
|
+
minutesX_zero: "بالكاد {{count}} بعد دقائق",
|
|
199
|
+
minutesX_one: "بالكاد {{count}} بعد دقيقة",
|
|
200
|
+
minutesX_two: "بالكاد {{count}} بعد دقائق",
|
|
201
|
+
minutesX_few: "بالكاد {{count}} بعد دقائق",
|
|
202
|
+
minutesX_many: "بالكاد {{count}} بعد دقائق",
|
|
203
|
+
minutesX_other: "بالكاد {{count}} بعد دقائق"
|
|
204
|
+
}
|
|
17
205
|
};
|
|
18
206
|
var ar = {
|
|
19
207
|
label: label,
|
|
20
|
-
|
|
208
|
+
relative: relative
|
|
21
209
|
};
|
|
22
210
|
|
|
23
211
|
exports.default = ar;
|
|
24
212
|
exports.label = label;
|
|
25
|
-
exports.
|
|
213
|
+
exports.relative = relative;
|
package/dist/cjs/i18n/en.json.js
CHANGED
|
@@ -13,9 +13,71 @@ var label = {
|
|
|
13
13
|
hijri: "Hijri",
|
|
14
14
|
gregorian: "Gregorian"
|
|
15
15
|
};
|
|
16
|
+
var relative = {
|
|
17
|
+
before: {
|
|
18
|
+
now: "Just now",
|
|
19
|
+
years: "Last year",
|
|
20
|
+
years_other: "{{count}} years ago",
|
|
21
|
+
months: "Last month",
|
|
22
|
+
months_other: "{{count}} months ago",
|
|
23
|
+
weeks: "Last week",
|
|
24
|
+
weeks_other: "{{count}} weeks ago",
|
|
25
|
+
days: "Yesterday",
|
|
26
|
+
days_other: "{{count}} days ago",
|
|
27
|
+
hours: "{{count}} hour ago",
|
|
28
|
+
hours_other: "{{count}} hours ago",
|
|
29
|
+
minutes: "{{count}} minute ago",
|
|
30
|
+
minutes_other: "{{count}} minutes ago",
|
|
31
|
+
seconds: "{{count}} second ago",
|
|
32
|
+
seconds_other: "{{count}} seconds ago",
|
|
33
|
+
yearsX: "Almost {{count}} year ago",
|
|
34
|
+
yearsX_other: "Almost {{count}} years ago",
|
|
35
|
+
monthsX: "Almost {{count}} month ago",
|
|
36
|
+
monthsX_other: "Almost {{count}} months ago",
|
|
37
|
+
weeksX: "Almost {{count}} week ago",
|
|
38
|
+
weeksX_other: "Almost {{count}} weeks ago",
|
|
39
|
+
daysX: "Almost {{count}} day ago",
|
|
40
|
+
daysX_other: "Almost {{count}} days ago",
|
|
41
|
+
hoursX: "Almost {{count}} hour ago",
|
|
42
|
+
hoursX_other: "Almost {{count}} hours ago",
|
|
43
|
+
minutesX: "Almost {{count}} minute ago",
|
|
44
|
+
minutesX_other: "Almost {{count}} minutes ago"
|
|
45
|
+
},
|
|
46
|
+
after: {
|
|
47
|
+
now: "Soon",
|
|
48
|
+
years: "Next year",
|
|
49
|
+
years_other: "{{count}} years later",
|
|
50
|
+
months: "Next month",
|
|
51
|
+
months_other: "{{count}} months later",
|
|
52
|
+
weeks: "Next week",
|
|
53
|
+
weeks_other: "{{count}} weeks later",
|
|
54
|
+
days: "Tomorrow",
|
|
55
|
+
days_other: "{{count}} days later",
|
|
56
|
+
hours: "{{count}} hour later",
|
|
57
|
+
hours_other: "{{count}} hours later",
|
|
58
|
+
minutes: "{{count}} minute later",
|
|
59
|
+
minutes_other: "{{count}} minutes later",
|
|
60
|
+
seconds: "{{count}} second later",
|
|
61
|
+
seconds_other: "{{count}} seconds later",
|
|
62
|
+
yearsX: "Almost {{count}} year later",
|
|
63
|
+
yearsX_other: "Almost {{count}} years later",
|
|
64
|
+
monthsX: "Almost {{count}} month later",
|
|
65
|
+
monthsX_other: "Almost {{count}} months later",
|
|
66
|
+
weeksX: "Almost {{count}} week later",
|
|
67
|
+
weeksX_other: "Almost {{count}} weeks later",
|
|
68
|
+
daysX: "Almost {{count}} day later",
|
|
69
|
+
daysX_other: "Almost {{count}} days later",
|
|
70
|
+
hoursX: "Almost {{count}} hour later",
|
|
71
|
+
hoursX_other: "Almost {{count}} hours later",
|
|
72
|
+
minutesX: "Almost {{count}} minute later",
|
|
73
|
+
minutesX_other: "Almost {{count}} minutes later"
|
|
74
|
+
}
|
|
75
|
+
};
|
|
16
76
|
var en = {
|
|
17
|
-
label: label
|
|
77
|
+
label: label,
|
|
78
|
+
relative: relative
|
|
18
79
|
};
|
|
19
80
|
|
|
20
81
|
exports.default = en;
|
|
21
82
|
exports.label = label;
|
|
83
|
+
exports.relative = relative;
|
package/dist/cjs/i18n/index.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
var core = require('@react-fabric/core');
|
|
4
4
|
var ar = require('./ar.json.js');
|
|
5
5
|
var en = require('./en.json.js');
|
|
6
|
-
var ar$1 = require('./superdate/ar.json.js');
|
|
7
|
-
var en$1 = require('./superdate/en.json.js');
|
|
8
6
|
|
|
9
7
|
/*
|
|
10
8
|
* React Fabric
|
|
@@ -33,7 +31,3 @@ core.addTranslationBundle("date", {
|
|
|
33
31
|
en: en.default,
|
|
34
32
|
ar: ar.default
|
|
35
33
|
});
|
|
36
|
-
core.addTranslationBundle("superdate", {
|
|
37
|
-
en: en$1.default,
|
|
38
|
-
ar: ar$1.default
|
|
39
|
-
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,19 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
require('./hijri/index.js');
|
|
4
4
|
require('./i18n/index.js');
|
|
5
|
+
var DateHeader = require('./components/DateHeader.js');
|
|
6
|
+
var DecadePage = require('./components/DecadePage.js');
|
|
7
|
+
var YearPage = require('./components/YearPage.js');
|
|
5
8
|
var DateDisplay = require('./display/DateDisplay.js');
|
|
9
|
+
var DateDuration = require('./display/DateDuration.js');
|
|
6
10
|
var DatePanel = require('./panels/DatePanel.js');
|
|
11
|
+
var EventPanel = require('./panels/EventPanel.js');
|
|
7
12
|
var RangePanel = require('./panels/RangePanel.js');
|
|
8
|
-
var Superdate = require('./superdate/Superdate.js');
|
|
9
13
|
var dateUtil = require('./utils/dateUtil.js');
|
|
14
|
+
var index = require('./types/index.js');
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
|
|
18
|
+
exports.DateHeader = DateHeader.DateHeader;
|
|
19
|
+
exports.DecadePage = DecadePage.DecadePage;
|
|
20
|
+
exports.YearPage = YearPage.YearPage;
|
|
13
21
|
exports.DateDisplay = DateDisplay.DateDisplay;
|
|
22
|
+
exports.DateDuration = DateDuration.DateDuration;
|
|
14
23
|
exports.DatePanel = DatePanel.DatePanel;
|
|
24
|
+
exports.EventPanel = EventPanel.EventPanel;
|
|
15
25
|
exports.RangePanel = RangePanel.RangePanel;
|
|
16
|
-
exports.SuperDate = Superdate.SuperDate;
|
|
17
26
|
Object.defineProperty(exports, "DateUtil", {
|
|
18
27
|
enumerable: true,
|
|
19
28
|
get: function () { return dateUtil.DateUtil; }
|
|
20
29
|
});
|
|
30
|
+
exports.DatePart = index.DatePart;
|
|
31
|
+
exports.PageType = index.PageType;
|
|
@@ -17,6 +17,32 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
17
17
|
var _excluded = ["className", "max", "min", "dateDisabled", "onChange", "showHijriToggle", "value", "withTime"];
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
/**
|
|
21
|
+
* DatePanel component to display a date picker with options for selecting a date and time.
|
|
22
|
+
* It allows switching between Gregorian and Hijri calendars, and includes buttons for selecting today or canceling the selection.
|
|
23
|
+
* It uses the current calendar and locale from the global context.
|
|
24
|
+
* It handles date selection, time changes, and page navigation within the date picker.
|
|
25
|
+
* It also supports disabling specific dates and setting minimum and maximum date limits.
|
|
26
|
+
*
|
|
27
|
+
* @param {DateProps} props - The properties for the DatePanel component.
|
|
28
|
+
* @return {JSX.Element} The rendered DatePanel component.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```jsx
|
|
32
|
+
* <DatePanel
|
|
33
|
+
* className="my-date-panel"
|
|
34
|
+
* max="2025-12-31"
|
|
35
|
+
* min="2020-01-01"
|
|
36
|
+
* dateDisabled={["2023-01-01", "2023-12-25"]}
|
|
37
|
+
* onChange={(date) => console.log("Selected date:", date)}
|
|
38
|
+
* showHijriToggle={true}
|
|
39
|
+
* value={new Date()}
|
|
40
|
+
* withTime={true}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/date-date-panel--datepanels}
|
|
45
|
+
*/
|
|
20
46
|
var DatePanel = function DatePanel(_ref) {
|
|
21
47
|
var className = _ref.className,
|
|
22
48
|
max = _ref.max,
|
|
@@ -82,7 +82,7 @@ var EventPanel = function EventPanel(_ref) {
|
|
|
82
82
|
if (action.type === "changePageDate") {
|
|
83
83
|
resetList = true;
|
|
84
84
|
state.pageDate = action.date;
|
|
85
|
-
if (action.changePage
|
|
85
|
+
if (action.changePage) {
|
|
86
86
|
state.page = Math.max(state.page - 1, index.PageType.MONTH);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -141,6 +141,7 @@ var EventPanel = function EventPanel(_ref) {
|
|
|
141
141
|
children: state.events.map(function (evt) {
|
|
142
142
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
143
143
|
role: "none",
|
|
144
|
+
"data-dropdown-dismiss": "true",
|
|
144
145
|
onClick: function onClick() {
|
|
145
146
|
onChange === null || onChange === void 0 || onChange("".concat(evt.start.toISOString(), "|").concat(evt.end.toISOString()), [evt.start.toISOString(), evt.end.toISOString()]);
|
|
146
147
|
},
|
|
@@ -17,6 +17,28 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
17
17
|
var _excluded = ["className", "max", "min", "dateDisabled", "onChange", "showHijriToggle", "value", "withTime", "showApply"];
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
/**
|
|
21
|
+
* RangePanel component to display a date range picker with options for selecting a start and end date.
|
|
22
|
+
* It allows switching between Gregorian and Hijri calendars, and includes buttons for applying or canceling the selection.
|
|
23
|
+
* It uses the current calendar and locale from the global context.
|
|
24
|
+
* It handles date selection, time changes, and page navigation within the date picker.
|
|
25
|
+
* It also supports disabling specific dates and setting minimum and maximum date limits.
|
|
26
|
+
*
|
|
27
|
+
* @param {RangeProps} props - The properties for the RangePanel component.
|
|
28
|
+
* @return {JSX.Element} The rendered RangePanel component.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```jsx
|
|
32
|
+
* <RangePanel
|
|
33
|
+
* className="my-range-panel"
|
|
34
|
+
* max="2025-12-31"
|
|
35
|
+
* min="2020-01-01"
|
|
36
|
+
* dateDisabled={["2023-01-01", "2023-12-25"]}
|
|
37
|
+
* onChange={(dateRange) => console.log("Selected date range:", dateRange)}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/story/date-date-panel--range-panel}
|
|
41
|
+
*/
|
|
20
42
|
var RangePanel = function RangePanel(_ref) {
|
|
21
43
|
var className = _ref.className,
|
|
22
44
|
max = _ref.max,
|
|
@@ -326,6 +348,7 @@ var RangePanel = function RangePanel(_ref) {
|
|
|
326
348
|
variant: "solid",
|
|
327
349
|
color: "primary",
|
|
328
350
|
disabled: !state.selected,
|
|
351
|
+
"data-dropdown-dismiss": "true",
|
|
329
352
|
className: "my-1",
|
|
330
353
|
onClick: function onClick() {
|
|
331
354
|
var _state$selected, _state$selected2;
|
|
@@ -21,8 +21,6 @@ var Locales = {
|
|
|
21
21
|
ru: locale.ru,
|
|
22
22
|
zh: locale.zhCN
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
26
24
|
exports.DateUtil = void 0;
|
|
27
25
|
(function (_DateUtil) {
|
|
28
26
|
var translateNumber = function translateNumber(d) {
|
|
@@ -433,5 +431,4 @@ exports.DateUtil = void 0;
|
|
|
433
431
|
}
|
|
434
432
|
return new Date(dt);
|
|
435
433
|
};
|
|
436
|
-
})(exports.DateUtil || (exports.DateUtil = {}));
|
|
437
|
-
window.DateUtil = exports.DateUtil;
|
|
434
|
+
})(exports.DateUtil || (exports.DateUtil = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from '@react-fabric/core';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { addDays, isBefore, isAfter } from 'date-fns';
|
|
7
7
|
import i18next from 'i18next';
|
|
@@ -85,8 +85,10 @@ var DateHeader = function DateHeader(props) {
|
|
|
85
85
|
className: "flex flex-nowrap items-center area-head",
|
|
86
86
|
"data-page": page,
|
|
87
87
|
children: [startPage !== undefined && /*#__PURE__*/jsx(Button, {
|
|
88
|
-
icon:
|
|
89
|
-
|
|
88
|
+
icon: {
|
|
89
|
+
icon: "icon-[mdi--chevron-double-left]",
|
|
90
|
+
rtlFlip: true
|
|
91
|
+
},
|
|
90
92
|
size: "sm",
|
|
91
93
|
variant: "link",
|
|
92
94
|
"aria-label": "start",
|
|
@@ -96,8 +98,10 @@ var DateHeader = function DateHeader(props) {
|
|
|
96
98
|
return startPage && (changePageDate === null || changePageDate === void 0 ? void 0 : changePageDate(startPage));
|
|
97
99
|
}
|
|
98
100
|
}), /*#__PURE__*/jsx(Button, {
|
|
99
|
-
icon:
|
|
100
|
-
|
|
101
|
+
icon: {
|
|
102
|
+
icon: "icon-[mdi--chevron-left]",
|
|
103
|
+
rtlFlip: true
|
|
104
|
+
},
|
|
101
105
|
size: "sm",
|
|
102
106
|
variant: "link",
|
|
103
107
|
"aria-label": "prev",
|
|
@@ -114,8 +118,10 @@ var DateHeader = function DateHeader(props) {
|
|
|
114
118
|
className: classNames("flex-1 px-2 py-1 text-primary-600 text-center text-sm font-medium truncate", page === PageType.DECADE ? "pointer-events-none" : "cursor-pointer"),
|
|
115
119
|
children: headLabel
|
|
116
120
|
}), /*#__PURE__*/jsx(Button, {
|
|
117
|
-
icon:
|
|
118
|
-
|
|
121
|
+
icon: {
|
|
122
|
+
icon: "icon-[mdi--chevron-right]",
|
|
123
|
+
rtlFlip: true
|
|
124
|
+
},
|
|
119
125
|
size: "sm",
|
|
120
126
|
variant: "link",
|
|
121
127
|
"aria-label": "next",
|
|
@@ -125,8 +131,10 @@ var DateHeader = function DateHeader(props) {
|
|
|
125
131
|
return nextPage && (changePageDate === null || changePageDate === void 0 ? void 0 : changePageDate(nextPage));
|
|
126
132
|
}
|
|
127
133
|
}), endPage !== undefined && /*#__PURE__*/jsx(Button, {
|
|
128
|
-
icon:
|
|
129
|
-
|
|
134
|
+
icon: {
|
|
135
|
+
icon: "icon-[mdi--chevron-double-right]",
|
|
136
|
+
rtlFlip: true
|
|
137
|
+
},
|
|
130
138
|
size: "sm",
|
|
131
139
|
variant: "link",
|
|
132
140
|
"aria-label": "end",
|
|
@@ -9,7 +9,6 @@ import { DateUtil } from '../utils/dateUtil.js';
|
|
|
9
9
|
import { DateCell } from './DateCell.js';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { PageType } from '../types/index.js';
|
|
12
|
-
import classes from './Date.module.css';
|
|
13
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
13
|
|
|
15
14
|
var _excluded = ["pageDate", "isHijri"];
|
|
@@ -29,11 +28,11 @@ var DatePage = function DatePage(_ref) {
|
|
|
29
28
|
return /*#__PURE__*/jsxs("div", {
|
|
30
29
|
className: classNames("grid grid-cols-8 area-content", props.page !== PageType.DATE && "invisible"),
|
|
31
30
|
children: [/*#__PURE__*/jsx("div", {
|
|
32
|
-
className: classNames(
|
|
31
|
+
className: classNames("fabric-dateHeader", "px-1 text-center bg-tint-50 h-7")
|
|
33
32
|
}), cols.map(function (col) {
|
|
34
33
|
var dt = DateUtil.addDays(startDate, col, isHijri);
|
|
35
34
|
return /*#__PURE__*/jsx("div", {
|
|
36
|
-
className: classNames(
|
|
35
|
+
className: classNames("fabric-dateHeader", "font-medium text-sm p-1 mx-px text-center text-muted bg-tint-50 h-7"),
|
|
37
36
|
children: DateUtil.format(dt, "eeeeee", i18next.language, isHijri)
|
|
38
37
|
}, dt.toISOString());
|
|
39
38
|
}), rows.map(function (row) {
|