react-native-paper-dates 0.4.6 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -22
- package/lib/commonjs/Date/AnimatedCrossView.js +9 -8
- package/lib/commonjs/Date/AnimatedCrossView.js.map +1 -1
- package/lib/commonjs/Date/AutoSizer.js +6 -5
- package/lib/commonjs/Date/AutoSizer.js.map +1 -1
- package/lib/commonjs/Date/Calendar.js +46 -39
- package/lib/commonjs/Date/Calendar.js.map +1 -1
- package/lib/commonjs/Date/CalendarEdit.js +32 -111
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js +23 -12
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +93 -20
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModal.js +2 -2
- package/lib/commonjs/Date/DatePickerModalContent.js +7 -4
- package/lib/commonjs/Date/DatePickerModalContent.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +43 -34
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +12 -5
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js +6 -5
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/commonjs/Date/DateRangeInput.js +23 -24
- package/lib/commonjs/Date/DateRangeInput.js.map +1 -1
- package/lib/commonjs/Date/Day.js +7 -3
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js +6 -5
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/DayNames.js +7 -6
- package/lib/commonjs/Date/DayNames.js.map +1 -1
- package/lib/commonjs/Date/DayRange.js +9 -8
- package/lib/commonjs/Date/DayRange.js.map +1 -1
- package/lib/commonjs/Date/Month.js +59 -49
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/Swiper.js +35 -29
- package/lib/commonjs/Date/Swiper.js.map +1 -1
- package/lib/commonjs/Date/Swiper.native.js +29 -23
- package/lib/commonjs/Date/Swiper.native.js.map +1 -1
- package/lib/commonjs/Date/SwiperUtils.js +7 -6
- package/lib/commonjs/Date/SwiperUtils.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +30 -20
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Date/dateUtils.js +106 -37
- package/lib/commonjs/Date/dateUtils.js.map +1 -1
- package/lib/commonjs/Date/inputUtils.js +84 -0
- package/lib/commonjs/Date/inputUtils.js.map +1 -0
- package/lib/commonjs/TextInputMask.js +11 -10
- package/lib/commonjs/TextInputMask.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js +37 -19
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClock.js +25 -15
- package/lib/commonjs/Time/AnalogClock.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +17 -11
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js +7 -6
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/AnimatedClockSwitcher.js +8 -7
- package/lib/commonjs/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +16 -12
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +12 -11
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePicker.js +37 -15
- package/lib/commonjs/Time/TimePicker.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +19 -15
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/Time/timeUtils.js +14 -9
- package/lib/commonjs/Time/timeUtils.js.map +1 -1
- package/lib/commonjs/index.js +66 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/translations/en.js +25 -0
- package/lib/commonjs/translations/en.js.map +1 -0
- package/lib/commonjs/translations/enGB.js +25 -0
- package/lib/commonjs/translations/enGB.js.map +1 -0
- package/lib/commonjs/translations/nl.js +25 -0
- package/lib/commonjs/translations/nl.js.map +1 -0
- package/lib/commonjs/translations/pl.js +25 -0
- package/lib/commonjs/translations/pl.js.map +1 -0
- package/lib/commonjs/translations/utils.js +31 -0
- package/lib/commonjs/translations/utils.js.map +1 -0
- package/lib/commonjs/utils.js +19 -9
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/Date/AnimatedCrossView.js +7 -6
- package/lib/module/Date/AnimatedCrossView.js.map +1 -1
- package/lib/module/Date/AutoSizer.js +4 -3
- package/lib/module/Date/AutoSizer.js.map +1 -1
- package/lib/module/Date/Calendar.js +46 -39
- package/lib/module/Date/Calendar.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +28 -104
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js +19 -9
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +88 -18
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerModalContent.js +5 -2
- package/lib/module/Date/DatePickerModalContent.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +38 -30
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +9 -3
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js +4 -3
- package/lib/module/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/module/Date/DateRangeInput.js +22 -22
- package/lib/module/Date/DateRangeInput.js.map +1 -1
- package/lib/module/Date/Day.js +5 -1
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js +4 -3
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/DayNames.js +5 -4
- package/lib/module/Date/DayNames.js.map +1 -1
- package/lib/module/Date/DayRange.js +7 -6
- package/lib/module/Date/DayRange.js.map +1 -1
- package/lib/module/Date/Month.js +54 -45
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/Swiper.js +32 -26
- package/lib/module/Date/Swiper.js.map +1 -1
- package/lib/module/Date/Swiper.native.js +27 -21
- package/lib/module/Date/Swiper.native.js.map +1 -1
- package/lib/module/Date/SwiperUtils.js +5 -4
- package/lib/module/Date/SwiperUtils.js.map +1 -1
- package/lib/module/Date/YearPicker.js +28 -18
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Date/dateUtils.js +78 -29
- package/lib/module/Date/dateUtils.js.map +1 -1
- package/lib/module/Date/inputUtils.js +70 -0
- package/lib/module/Date/inputUtils.js.map +1 -0
- package/lib/module/TextInputMask.js +9 -8
- package/lib/module/TextInputMask.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js +35 -18
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClock.js +23 -14
- package/lib/module/Time/AnalogClock.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +14 -9
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js +5 -4
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js +6 -5
- package/lib/module/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/module/Time/TimeInput.js +14 -10
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +10 -9
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePicker.js +32 -12
- package/lib/module/Time/TimePicker.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +17 -13
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/Time/timeUtils.js +5 -1
- package/lib/module/Time/timeUtils.js.map +1 -1
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/translations/en.js +18 -0
- package/lib/module/translations/en.js.map +1 -0
- package/lib/module/translations/enGB.js +18 -0
- package/lib/module/translations/enGB.js.map +1 -0
- package/lib/module/translations/nl.js +18 -0
- package/lib/module/translations/nl.js.map +1 -0
- package/lib/module/translations/pl.js +18 -0
- package/lib/module/translations/pl.js.map +1 -0
- package/lib/module/translations/utils.js +22 -0
- package/lib/module/translations/utils.js.map +1 -0
- package/lib/module/utils.js +11 -5
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/{src/Date → Date}/AnimatedCrossView.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/AutoSizer.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/Calendar.d.ts +5 -3
- package/lib/typescript/{src/Date → Date}/CalendarEdit.d.ts +3 -3
- package/lib/typescript/{src/Date → Date}/CalendarHeader.d.ts +1 -1
- package/lib/typescript/Date/DatePickerInput.d.ts +18 -0
- package/lib/typescript/{src/Date → Date}/DatePickerModal.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/DatePickerModalContent.d.ts +2 -1
- package/lib/typescript/{src/Date → Date}/DatePickerModalContentHeader.d.ts +4 -4
- package/lib/typescript/{src/Date → Date}/DatePickerModalHeader.d.ts +1 -0
- package/lib/typescript/{src/Date → Date}/DatePickerModalHeaderBackground.d.ts +0 -0
- package/lib/typescript/Date/DateRangeInput.d.ts +3 -0
- package/lib/typescript/{src/Date → Date}/Day.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/DayName.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/DayNames.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/DayRange.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/Month.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/Swiper.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/Swiper.native.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/SwiperUtils.d.ts +1 -1
- package/lib/typescript/{src/Date → Date}/Week.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/YearPicker.d.ts +0 -0
- package/lib/typescript/{src/Date → Date}/dateUtils.d.ts +15 -0
- package/lib/typescript/{src/Date → Date}/dateUtils.test.d.ts +0 -0
- package/lib/typescript/Date/inputUtils.d.ts +14 -0
- package/lib/typescript/TextInputMask.d.ts +11 -0
- package/lib/typescript/Time/AmPmSwitcher.d.ts +4 -0
- package/lib/typescript/{src/Time → Time}/AnalogClock.d.ts +1 -1
- package/lib/typescript/{src/Time → Time}/AnalogClockHours.d.ts +0 -0
- package/lib/typescript/{src/Time → Time}/AnalogClockMinutes.d.ts +0 -0
- package/lib/typescript/{src/Time → Time}/AnimatedClockSwitcher.d.ts +0 -0
- package/lib/typescript/{src/Time → Time}/TimeInput.d.ts +0 -0
- package/lib/typescript/{src/Time → Time}/TimeInputs.d.ts +1 -1
- package/lib/typescript/{src/Time → Time}/TimePicker.d.ts +4 -0
- package/lib/typescript/{src/Time → Time}/TimePickerModal.d.ts +1 -1
- package/lib/typescript/{src/Time → Time}/timeUtils.d.ts +0 -0
- package/lib/typescript/index.d.ts +13 -0
- package/lib/typescript/translations/en.d.ts +3 -0
- package/lib/typescript/translations/enGB.d.ts +3 -0
- package/lib/typescript/translations/nl.d.ts +3 -0
- package/lib/typescript/translations/pl.d.ts +3 -0
- package/lib/typescript/translations/utils.d.ts +18 -0
- package/lib/typescript/utils.d.ts +58 -0
- package/package.json +39 -38
- package/src/.DS_Store +0 -0
- package/src/Date/Calendar.tsx +14 -13
- package/src/Date/CalendarEdit.tsx +17 -121
- package/src/Date/CalendarHeader.tsx +18 -3
- package/src/Date/DatePickerInput.tsx +103 -25
- package/src/Date/DatePickerModalContent.tsx +5 -1
- package/src/Date/DatePickerModalContentHeader.tsx +26 -12
- package/src/Date/DatePickerModalHeader.tsx +8 -1
- package/src/Date/DateRangeInput.tsx +26 -17
- package/src/Date/Day.tsx +4 -0
- package/src/Date/Month.tsx +20 -44
- package/src/Date/Swiper.tsx +1 -0
- package/src/Date/SwiperUtils.ts +1 -1
- package/src/Date/YearPicker.tsx +6 -1
- package/src/Date/dateUtils.tsx +70 -9
- package/src/Date/inputUtils.ts +94 -0
- package/src/TextInputMask.tsx +10 -3
- package/src/Time/AmPmSwitcher.tsx +20 -11
- package/src/Time/AnalogClock.tsx +12 -14
- package/src/Time/AnalogClockHours.tsx +14 -5
- package/src/Time/AnalogClockMinutes.tsx +4 -1
- package/src/Time/TimeInput.tsx +3 -0
- package/src/Time/TimeInputs.tsx +1 -5
- package/src/Time/TimePicker.tsx +44 -22
- package/src/Time/TimePickerModal.tsx +4 -1
- package/src/Time/timeUtils.ts +4 -1
- package/src/index.tsx +7 -0
- package/src/translations/en.ts +20 -0
- package/src/translations/enGB.ts +20 -0
- package/src/translations/nl.ts +20 -0
- package/src/translations/pl.ts +21 -0
- package/src/translations/utils.ts +47 -0
- package/src/utils.ts +13 -5
- package/lib/typescript/src/Date/DatePickerInput.d.ts +0 -1
- package/lib/typescript/src/Date/DateRangeInput.d.ts +0 -1
- package/lib/typescript/src/TextInputMask.d.ts +0 -3
- package/lib/typescript/src/Time/AmPmSwitcher.d.ts +0 -4
- package/lib/typescript/src/index.d.ts +0 -6
- package/lib/typescript/src/utils.d.ts +0 -7
package/lib/commonjs/index.js
CHANGED
|
@@ -8,7 +8,14 @@ var _exportNames = {
|
|
|
8
8
|
DatePickerModal: true,
|
|
9
9
|
DatePickerModalContent: true,
|
|
10
10
|
TimePickerModal: true,
|
|
11
|
-
TimePicker: true
|
|
11
|
+
TimePicker: true,
|
|
12
|
+
DatePickerInput: true,
|
|
13
|
+
registerTranslation: true,
|
|
14
|
+
getTranslation: true,
|
|
15
|
+
nl: true,
|
|
16
|
+
en: true,
|
|
17
|
+
pl: true,
|
|
18
|
+
enGB: true
|
|
12
19
|
};
|
|
13
20
|
Object.defineProperty(exports, "Calendar", {
|
|
14
21
|
enumerable: true,
|
|
@@ -16,6 +23,12 @@ Object.defineProperty(exports, "Calendar", {
|
|
|
16
23
|
return _Calendar.default;
|
|
17
24
|
}
|
|
18
25
|
});
|
|
26
|
+
Object.defineProperty(exports, "DatePickerInput", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _DatePickerInput.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
19
32
|
Object.defineProperty(exports, "DatePickerModal", {
|
|
20
33
|
enumerable: true,
|
|
21
34
|
get: function () {
|
|
@@ -28,16 +41,52 @@ Object.defineProperty(exports, "DatePickerModalContent", {
|
|
|
28
41
|
return _DatePickerModalContent.default;
|
|
29
42
|
}
|
|
30
43
|
});
|
|
44
|
+
Object.defineProperty(exports, "TimePicker", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return _TimePicker.default;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
31
50
|
Object.defineProperty(exports, "TimePickerModal", {
|
|
32
51
|
enumerable: true,
|
|
33
52
|
get: function () {
|
|
34
53
|
return _TimePickerModal.default;
|
|
35
54
|
}
|
|
36
55
|
});
|
|
37
|
-
Object.defineProperty(exports, "
|
|
56
|
+
Object.defineProperty(exports, "en", {
|
|
38
57
|
enumerable: true,
|
|
39
58
|
get: function () {
|
|
40
|
-
return
|
|
59
|
+
return _en.default;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "enGB", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () {
|
|
65
|
+
return _enGB.default;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "getTranslation", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return _utils.getTranslation;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "nl", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () {
|
|
77
|
+
return _nl.default;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "pl", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () {
|
|
83
|
+
return _pl.default;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "registerTranslation", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return _utils.registerTranslation;
|
|
41
90
|
}
|
|
42
91
|
});
|
|
43
92
|
|
|
@@ -63,9 +112,21 @@ var _TimePickerModal = _interopRequireDefault(require("./Time/TimePickerModal"))
|
|
|
63
112
|
|
|
64
113
|
var _TimePicker = _interopRequireDefault(require("./Time/TimePicker"));
|
|
65
114
|
|
|
66
|
-
|
|
115
|
+
var _DatePickerInput = _interopRequireDefault(require("./Date/DatePickerInput"));
|
|
116
|
+
|
|
117
|
+
var _utils = require("./translations/utils");
|
|
118
|
+
|
|
119
|
+
var _nl = _interopRequireDefault(require("./translations/nl"));
|
|
120
|
+
|
|
121
|
+
var _en = _interopRequireDefault(require("./translations/en"));
|
|
122
|
+
|
|
123
|
+
var _pl = _interopRequireDefault(require("./translations/pl"));
|
|
124
|
+
|
|
125
|
+
var _enGB = _interopRequireDefault(require("./translations/enGB"));
|
|
126
|
+
|
|
127
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
67
128
|
|
|
68
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
129
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
69
130
|
|
|
70
131
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
71
132
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { default as Calendar } from './Date/Calendar'\nexport { default as DatePickerModal } from './Date/DatePickerModal'\nexport * from './Date/DatePickerModal'\nexport { default as DatePickerModalContent } from './Date/DatePickerModalContent'\nexport { default as TimePickerModal } from './Time/TimePickerModal'\nexport { default as TimePicker } from './Time/TimePicker'\nexport { default as DatePickerInput } from './Date/DatePickerInput'\nexport type { TranslationsType } from './translations/utils'\nexport { registerTranslation, getTranslation } from './translations/utils'\nexport { default as nl } from './translations/nl'\nexport { default as en } from './translations/en'\nexport { default as pl } from './translations/pl'\nexport { default as enGB } from './translations/enGB'\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const en = {
|
|
8
|
+
save: 'Save',
|
|
9
|
+
selectSingle: 'Select date',
|
|
10
|
+
selectMultiple: 'Select dates',
|
|
11
|
+
selectRange: 'Select period',
|
|
12
|
+
notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
|
|
13
|
+
mustBeHigherThan: 'Must be later then',
|
|
14
|
+
mustBeLowerThan: 'Must be earlier then',
|
|
15
|
+
mustBeBetween: 'Must be between',
|
|
16
|
+
dateIsDisabled: 'Day is not allowed',
|
|
17
|
+
previous: 'Previous',
|
|
18
|
+
next: 'Next',
|
|
19
|
+
typeInDate: 'Type in date',
|
|
20
|
+
pickDateFromCalendar: 'Pick date from calendar',
|
|
21
|
+
close: 'Close'
|
|
22
|
+
};
|
|
23
|
+
var _default = en;
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["en.ts"],"names":["en","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":";;;;;;AAEA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,MADqB;AAE3BC,EAAAA,YAAY,EAAE,aAFa;AAG3BC,EAAAA,cAAc,EAAE,cAHW;AAI3BC,EAAAA,WAAW,EAAE,eAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,uBAAsBA,WAAY,EANV;AAO3BC,EAAAA,gBAAgB,EAAE,oBAPS;AAQ3BC,EAAAA,eAAe,EAAE,sBARU;AAS3BC,EAAAA,aAAa,EAAE,iBATY;AAU3BC,EAAAA,cAAc,EAAE,oBAVW;AAW3BC,EAAAA,QAAQ,EAAE,UAXiB;AAY3BC,EAAAA,IAAI,EAAE,MAZqB;AAa3BC,EAAAA,UAAU,EAAE,cAbe;AAc3BC,EAAAA,oBAAoB,EAAE,yBAdK;AAe3BC,EAAAA,KAAK,EAAE;AAfoB,CAA7B;eAiBef,E","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst en: TranslationsType = {\n save: 'Save',\n selectSingle: 'Select date',\n selectMultiple: 'Select dates',\n selectRange: 'Select period',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Date format must be ${inputFormat}`,\n mustBeHigherThan: 'Must be later then',\n mustBeLowerThan: 'Must be earlier then',\n mustBeBetween: 'Must be between',\n dateIsDisabled: 'Day is not allowed',\n previous: 'Previous',\n next: 'Next',\n typeInDate: 'Type in date',\n pickDateFromCalendar: 'Pick date from calendar',\n close: 'Close',\n}\nexport default en\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const enGB = {
|
|
8
|
+
save: 'Save',
|
|
9
|
+
selectSingle: 'Select date',
|
|
10
|
+
selectMultiple: 'Select dates',
|
|
11
|
+
selectRange: 'Select period',
|
|
12
|
+
notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
|
|
13
|
+
mustBeHigherThan: 'Must be later then',
|
|
14
|
+
mustBeLowerThan: 'Must be earlier then',
|
|
15
|
+
mustBeBetween: 'Must be between',
|
|
16
|
+
dateIsDisabled: 'Day is not allowed',
|
|
17
|
+
previous: 'Previous',
|
|
18
|
+
next: 'Next',
|
|
19
|
+
typeInDate: 'Type in date',
|
|
20
|
+
pickDateFromCalendar: 'Pick date from calendar',
|
|
21
|
+
close: 'Close'
|
|
22
|
+
};
|
|
23
|
+
var _default = enGB;
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=enGB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["enGB.ts"],"names":["enGB","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":";;;;;;AAEA,MAAMA,IAAsB,GAAG;AAC7BC,EAAAA,IAAI,EAAE,MADuB;AAE7BC,EAAAA,YAAY,EAAE,aAFe;AAG7BC,EAAAA,cAAc,EAAE,cAHa;AAI7BC,EAAAA,WAAW,EAAE,eAJgB;AAK7BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,uBAAsBA,WAAY,EANR;AAO7BC,EAAAA,gBAAgB,EAAE,oBAPW;AAQ7BC,EAAAA,eAAe,EAAE,sBARY;AAS7BC,EAAAA,aAAa,EAAE,iBATc;AAU7BC,EAAAA,cAAc,EAAE,oBAVa;AAW7BC,EAAAA,QAAQ,EAAE,UAXmB;AAY7BC,EAAAA,IAAI,EAAE,MAZuB;AAa7BC,EAAAA,UAAU,EAAE,cAbiB;AAc7BC,EAAAA,oBAAoB,EAAE,yBAdO;AAe7BC,EAAAA,KAAK,EAAE;AAfsB,CAA/B;eAiBef,I","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst enGB: TranslationsType = {\n save: 'Save',\n selectSingle: 'Select date',\n selectMultiple: 'Select dates',\n selectRange: 'Select period',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Date format must be ${inputFormat}`,\n mustBeHigherThan: 'Must be later then',\n mustBeLowerThan: 'Must be earlier then',\n mustBeBetween: 'Must be between',\n dateIsDisabled: 'Day is not allowed',\n previous: 'Previous',\n next: 'Next',\n typeInDate: 'Type in date',\n pickDateFromCalendar: 'Pick date from calendar',\n close: 'Close',\n}\nexport default enGB\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const nl = {
|
|
8
|
+
save: 'Opslaan',
|
|
9
|
+
selectSingle: 'Selecteer datum',
|
|
10
|
+
selectMultiple: 'Selecteer datums',
|
|
11
|
+
selectRange: 'Selecteer periode',
|
|
12
|
+
notAccordingToDateFormat: inputFormat => `Datumformaat moet ${inputFormat} zijn`,
|
|
13
|
+
mustBeHigherThan: 'Moet later dan',
|
|
14
|
+
mustBeLowerThan: 'Moet eerder dan',
|
|
15
|
+
mustBeBetween: 'Moet tussen',
|
|
16
|
+
dateIsDisabled: 'Deze dag mag niet',
|
|
17
|
+
previous: 'Vorige',
|
|
18
|
+
next: 'Volgende',
|
|
19
|
+
typeInDate: 'Typ datum',
|
|
20
|
+
pickDateFromCalendar: 'Kies datum van kalender',
|
|
21
|
+
close: 'Sluit'
|
|
22
|
+
};
|
|
23
|
+
var _default = nl;
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=nl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["nl.ts"],"names":["nl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":";;;;;;AAEA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,SADqB;AAE3BC,EAAAA,YAAY,EAAE,iBAFa;AAG3BC,EAAAA,cAAc,EAAE,kBAHW;AAI3BC,EAAAA,WAAW,EAAE,mBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,qBAAoBA,WAAY,OANR;AAO3BC,EAAAA,gBAAgB,EAAE,gBAPS;AAQ3BC,EAAAA,eAAe,EAAE,iBARU;AAS3BC,EAAAA,aAAa,EAAE,aATY;AAU3BC,EAAAA,cAAc,EAAE,mBAVW;AAW3BC,EAAAA,QAAQ,EAAE,QAXiB;AAY3BC,EAAAA,IAAI,EAAE,UAZqB;AAa3BC,EAAAA,UAAU,EAAE,WAbe;AAc3BC,EAAAA,oBAAoB,EAAE,yBAdK;AAe3BC,EAAAA,KAAK,EAAE;AAfoB,CAA7B;eAiBef,E","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst nl: TranslationsType = {\n save: 'Opslaan',\n selectSingle: 'Selecteer datum',\n selectMultiple: 'Selecteer datums',\n selectRange: 'Selecteer periode',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Datumformaat moet ${inputFormat} zijn`,\n mustBeHigherThan: 'Moet later dan',\n mustBeLowerThan: 'Moet eerder dan',\n mustBeBetween: 'Moet tussen',\n dateIsDisabled: 'Deze dag mag niet',\n previous: 'Vorige',\n next: 'Volgende',\n typeInDate: 'Typ datum',\n pickDateFromCalendar: 'Kies datum van kalender',\n close: 'Sluit',\n}\nexport default nl\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const pl = {
|
|
8
|
+
save: 'Zapisz',
|
|
9
|
+
selectSingle: 'Wybierz datę',
|
|
10
|
+
selectMultiple: 'Wybierz daty',
|
|
11
|
+
selectRange: 'Wybierz zakres',
|
|
12
|
+
notAccordingToDateFormat: inputFormat => `Data musi mieć format ${inputFormat}`,
|
|
13
|
+
mustBeHigherThan: 'Nie wcześniej niż',
|
|
14
|
+
mustBeLowerThan: 'Nie później niż',
|
|
15
|
+
mustBeBetween: 'Pomiędzy',
|
|
16
|
+
dateIsDisabled: 'Niedozwolona data',
|
|
17
|
+
previous: 'Poprzedni',
|
|
18
|
+
next: 'Dalej',
|
|
19
|
+
typeInDate: 'Wpisz datę',
|
|
20
|
+
pickDateFromCalendar: 'Wybierz datę z kalendarza',
|
|
21
|
+
close: 'Zamknij'
|
|
22
|
+
};
|
|
23
|
+
var _default = pl;
|
|
24
|
+
exports.default = _default;
|
|
25
|
+
//# sourceMappingURL=pl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["pl.ts"],"names":["pl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":";;;;;;AAEA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,QADqB;AAE3BC,EAAAA,YAAY,EAAE,cAFa;AAG3BC,EAAAA,cAAc,EAAE,cAHW;AAI3BC,EAAAA,WAAW,EAAE,gBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,yBAAwBA,WAAY,EANZ;AAO3BC,EAAAA,gBAAgB,EAAE,mBAPS;AAQ3BC,EAAAA,eAAe,EAAE,iBARU;AAS3BC,EAAAA,aAAa,EAAE,UATY;AAU3BC,EAAAA,cAAc,EAAE,mBAVW;AAY3BC,EAAAA,QAAQ,EAAE,WAZiB;AAa3BC,EAAAA,IAAI,EAAE,OAbqB;AAc3BC,EAAAA,UAAU,EAAE,YAde;AAe3BC,EAAAA,oBAAoB,EAAE,2BAfK;AAgB3BC,EAAAA,KAAK,EAAE;AAhBoB,CAA7B;eAkBef,E","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst pl: TranslationsType = {\n save: 'Zapisz',\n selectSingle: 'Wybierz datę',\n selectMultiple: 'Wybierz daty',\n selectRange: 'Wybierz zakres',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Data musi mieć format ${inputFormat}`,\n mustBeHigherThan: 'Nie wcześniej niż',\n mustBeLowerThan: 'Nie później niż',\n mustBeBetween: 'Pomiędzy',\n dateIsDisabled: 'Niedozwolona data',\n\n previous: 'Poprzedni',\n next: 'Dalej',\n typeInDate: 'Wpisz datę',\n pickDateFromCalendar: 'Wybierz datę z kalendarza',\n close: 'Zamknij',\n}\nexport default pl\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTranslation = getTranslation;
|
|
7
|
+
exports.registerTranslation = registerTranslation;
|
|
8
|
+
let translationsPerLocale = {};
|
|
9
|
+
|
|
10
|
+
function getTranslation(locale, key, fallback) {
|
|
11
|
+
const l = locale || 'en';
|
|
12
|
+
const translationForLocale = translationsPerLocale[l];
|
|
13
|
+
|
|
14
|
+
if (!translationForLocale) {
|
|
15
|
+
console.warn(`[react-native-paper-dates] ${locale} is not registered, key: ${key}`);
|
|
16
|
+
return fallback || key;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const translation = translationsPerLocale[l][key];
|
|
20
|
+
|
|
21
|
+
if (!translationForLocale) {
|
|
22
|
+
console.warn(`[react-native-paper-dates] ${locale} is registered, but ${key} is missing`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return translation || fallback || key;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function registerTranslation(locale, translations) {
|
|
29
|
+
translationsPerLocale[locale] = translations;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["utils.ts"],"names":["translationsPerLocale","getTranslation","locale","key","fallback","l","translationForLocale","console","warn","translation","registerTranslation","translations"],"mappings":";;;;;;;AAiBA,IAAIA,qBAAuD,GAAG,EAA9D;;AAEO,SAASC,cAAT,CACLC,MADK,EAELC,GAFK,EAGLC,QAHK,EAIL;AACA,QAAMC,CAAC,GAAGH,MAAM,IAAI,IAApB;AACA,QAAMI,oBAAoB,GAAGN,qBAAqB,CAACK,CAAD,CAAlD;;AACA,MAAI,CAACC,oBAAL,EAA2B;AACzBC,IAAAA,OAAO,CAACC,IAAR,CACG,8BAA6BN,MAAO,4BAA2BC,GAAI,EADtE;AAGA,WAAOC,QAAQ,IAAID,GAAnB;AACD;;AACD,QAAMM,WAAW,GAAGT,qBAAqB,CAACK,CAAD,CAArB,CAAyBF,GAAzB,CAApB;;AACA,MAAI,CAACG,oBAAL,EAA2B;AACzBC,IAAAA,OAAO,CAACC,IAAR,CACG,8BAA6BN,MAAO,uBAAsBC,GAAI,aADjE;AAGD;;AACD,SAAOM,WAAW,IAAIL,QAAf,IAA2BD,GAAlC;AACD;;AAEM,SAASO,mBAAT,CACLR,MADK,EAELS,YAFK,EAGL;AACAX,EAAAA,qBAAqB,CAACE,MAAD,CAArB,GAAgCS,YAAhC;AACD","sourcesContent":["export type TranslationsType = {\n selectSingle: string\n selectMultiple: string\n selectRange: string\n save: string\n notAccordingToDateFormat: (inputFormat: string) => string\n mustBeHigherThan: string\n mustBeLowerThan: string\n mustBeBetween: string\n dateIsDisabled: string\n previous: string\n next: string\n typeInDate: string\n pickDateFromCalendar: string\n close: string\n}\n\nlet translationsPerLocale: Record<string, TranslationsType> = {}\n\nexport function getTranslation(\n locale: string | undefined,\n key: keyof TranslationsType,\n fallback?: any\n) {\n const l = locale || 'en'\n const translationForLocale = translationsPerLocale[l]\n if (!translationForLocale) {\n console.warn(\n `[react-native-paper-dates] ${locale} is not registered, key: ${key}`\n )\n return fallback || key\n }\n const translation = translationsPerLocale[l][key]\n if (!translationForLocale) {\n console.warn(\n `[react-native-paper-dates] ${locale} is registered, but ${key} is missing`\n )\n }\n return translation || fallback || key\n}\n\nexport function registerTranslation(\n locale: string,\n translations: TranslationsType\n) {\n translationsPerLocale[locale] = translations\n}\n"]}
|
package/lib/commonjs/utils.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.darkenBy = darkenBy;
|
|
7
|
+
exports.lightenBy = lightenBy;
|
|
8
|
+
exports.range = range;
|
|
7
9
|
exports.useHeaderBackgroundColor = useHeaderBackgroundColor;
|
|
8
10
|
exports.useHeaderColorIsLight = useHeaderColorIsLight;
|
|
9
11
|
exports.useHeaderTextColor = useHeaderTextColor;
|
|
12
|
+
exports.useLatest = useLatest;
|
|
10
13
|
exports.useTextColorOnPrimary = useTextColorOnPrimary;
|
|
11
|
-
exports.range = range;
|
|
12
14
|
|
|
13
15
|
var React = _interopRequireWildcard(require("react"));
|
|
14
16
|
|
|
@@ -18,16 +20,14 @@ var _color = _interopRequireDefault(require("color"));
|
|
|
18
20
|
|
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
22
|
|
|
21
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
24
|
|
|
23
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
26
|
|
|
25
27
|
function useLatest(value) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [value]);
|
|
30
|
-
return valueRef;
|
|
28
|
+
const ref = React.useRef(value);
|
|
29
|
+
ref.current = value;
|
|
30
|
+
return ref;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function useHeaderBackgroundColor() {
|
|
@@ -55,4 +55,14 @@ function useTextColorOnPrimary() {
|
|
|
55
55
|
function range(start, end) {
|
|
56
56
|
return Array(end - start + 1).fill(null).map((_, i) => start + i);
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
function lightenBy(color, ratio) {
|
|
60
|
+
const lightness = color.lightness();
|
|
61
|
+
return color.lightness(lightness + (100 - lightness) * ratio);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function darkenBy(color, ratio) {
|
|
65
|
+
const lightness = color.lightness();
|
|
66
|
+
return color.lightness(lightness - lightness * ratio);
|
|
67
|
+
}
|
|
58
68
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils.ts"],"names":["useLatest","value","
|
|
1
|
+
{"version":3,"sources":["utils.ts"],"names":["useLatest","value","ref","React","useRef","current","useHeaderBackgroundColor","theme","dark","mode","colors","surface","primary","useHeaderColorIsLight","background","isLight","useHeaderTextColor","useTextColorOnPrimary","isDark","range","start","end","Array","fill","map","_","i","lightenBy","color","ratio","lightness","darkenBy"],"mappings":";;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAEO,SAASA,SAAT,CAAsBC,KAAtB,EAAgC;AACrC,QAAMC,GAAG,GAAGC,KAAK,CAACC,MAAN,CAAaH,KAAb,CAAZ;AACAC,EAAAA,GAAG,CAACG,OAAJ,GAAcJ,KAAd;AACA,SAAOC,GAAP;AACD;;AAEM,SAASI,wBAAT,GAAoC;AACzC,QAAMC,KAAK,GAAG,iCAAd;AACA,SAAOA,KAAK,CAACC,IAAN,IAAcD,KAAK,CAACE,IAAN,KAAe,UAA7B,GACH,+BAAQ,CAAR,EAAWF,KAAK,CAACG,MAAN,CAAaC,OAAxB,CADG,GAEHJ,KAAK,CAACG,MAAN,CAAaE,OAFjB;AAGD;;AAEM,SAASC,qBAAT,GAAiC;AACtC,QAAMN,KAAK,GAAG,iCAAd;AACA,QAAMO,UAAU,GACdP,KAAK,CAACC,IAAN,IAAcD,KAAK,CAACE,IAAN,KAAe,UAA7B,GACIF,KAAK,CAACG,MAAN,CAAaC,OADjB,GAEIJ,KAAK,CAACG,MAAN,CAAaE,OAHnB;AAIA,SAAO,oBAAME,UAAN,EAAkBC,OAAlB,EAAP;AACD;;AAEM,SAASC,kBAAT,GAA8B;AACnC,QAAMD,OAAO,GAAGF,qBAAqB,EAArC;AACA,SAAO,CAACE,OAAD,GAAW,MAAX,GAAoB,MAA3B;AACD;;AAEM,SAASE,qBAAT,GAAiC;AACtC,QAAMV,KAAK,GAAG,iCAAd;AACA,QAAMW,MAAM,GAAG,CAAC,oBAAMX,KAAK,CAACG,MAAN,CAAaE,OAAnB,EAA4BG,OAA5B,EAAhB;AACA,SAAOG,MAAM,GAAG,MAAH,GAAY,MAAzB;AACD;;AAEM,SAASC,KAAT,CAAeC,KAAf,EAA8BC,GAA9B,EAA2C;AAChD,SAAOC,KAAK,CAACD,GAAG,GAAGD,KAAN,GAAc,CAAf,CAAL,CACJG,IADI,CACC,IADD,EAEJC,GAFI,CAEA,CAACC,CAAD,EAAIC,CAAJ,KAAUN,KAAK,GAAGM,CAFlB,CAAP;AAGD;;AAEM,SAASC,SAAT,CAAmBC,KAAnB,EAAiCC,KAAjC,EAAgD;AACrD,QAAMC,SAAS,GAAGF,KAAK,CAACE,SAAN,EAAlB;AACA,SAAOF,KAAK,CAACE,SAAN,CAAgBA,SAAS,GAAG,CAAC,MAAMA,SAAP,IAAoBD,KAAhD,CAAP;AACD;;AAEM,SAASE,QAAT,CAAkBH,KAAlB,EAAgCC,KAAhC,EAA+C;AACpD,QAAMC,SAAS,GAAGF,KAAK,CAACE,SAAN,EAAlB;AACA,SAAOF,KAAK,CAACE,SAAN,CAAgBA,SAAS,GAAGA,SAAS,GAAGD,KAAxC,CAAP;AACD","sourcesContent":["import * as React from 'react'\nimport { overlay, useTheme } from 'react-native-paper'\nimport Color from 'color'\n\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value)\n ref.current = value\n return ref\n}\n\nexport function useHeaderBackgroundColor() {\n const theme = useTheme()\n return theme.dark && theme.mode === 'adaptive'\n ? overlay(4, theme.colors.surface)\n : theme.colors.primary\n}\n\nexport function useHeaderColorIsLight() {\n const theme = useTheme()\n const background =\n theme.dark && theme.mode === 'adaptive'\n ? theme.colors.surface\n : theme.colors.primary\n return Color(background).isLight()\n}\n\nexport function useHeaderTextColor() {\n const isLight = useHeaderColorIsLight()\n return !isLight ? '#fff' : '#000'\n}\n\nexport function useTextColorOnPrimary() {\n const theme = useTheme()\n const isDark = !Color(theme.colors.primary).isLight()\n return isDark ? '#fff' : '#000'\n}\n\nexport function range(start: number, end: number) {\n return Array(end - start + 1)\n .fill(null)\n .map((_, i) => start + i)\n}\n\nexport function lightenBy(color: Color, ratio: number) {\n const lightness = color.lightness()\n return color.lightness(lightness + (100 - lightness) * ratio)\n}\n\nexport function darkenBy(color: Color, ratio: number) {\n const lightness = color.lightness()\n return color.lightness(lightness - lightness * ratio)\n}\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Animated, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useTheme } from 'react-native-paper';
|
|
4
|
-
export default function AnimatedCrossView({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export default function AnimatedCrossView(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
// visible,
|
|
7
|
+
collapsed,
|
|
8
|
+
calendar,
|
|
9
|
+
calendarEdit
|
|
10
|
+
} = _ref;
|
|
10
11
|
const theme = useTheme();
|
|
11
12
|
const calendarOpacity = React.useRef(new Animated.Value(collapsed ? 1 : 0));
|
|
12
13
|
React.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AnimatedCrossView.tsx"],"names":["React","Animated","StyleSheet","View","useTheme","AnimatedCrossView","collapsed","calendar","calendarEdit","theme","calendarOpacity","useRef","Value","useEffect","timing","current","toValue","duration","useNativeDriver","start","styles","root","opacity","transform","scaleY","interpolate","inputRange","outputRange","scaleX","backgroundColor","colors","surface","scale","create","flex","position","left","right"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,QAAT,EAAmBC,UAAnB,EAA+BC,IAA/B,QAA2C,cAA3C;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA,eAAe,SAASC,iBAAT,
|
|
1
|
+
{"version":3,"sources":["AnimatedCrossView.tsx"],"names":["React","Animated","StyleSheet","View","useTheme","AnimatedCrossView","collapsed","calendar","calendarEdit","theme","calendarOpacity","useRef","Value","useEffect","timing","current","toValue","duration","useNativeDriver","start","styles","root","opacity","transform","scaleY","interpolate","inputRange","outputRange","scaleX","backgroundColor","colors","surface","scale","create","flex","position","left","right"],"mappings":"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","sourcesContent":["import * as React from 'react'\nimport { Animated, StyleSheet, View } from 'react-native'\nimport { useTheme } from 'react-native-paper'\n\nexport default function AnimatedCrossView({\n // visible,\n collapsed,\n calendar,\n calendarEdit,\n}: {\n calendar: any\n calendarEdit: any\n // visible: boolean\n collapsed: boolean\n}) {\n const theme = useTheme()\n const calendarOpacity = React.useRef<Animated.Value>(\n new Animated.Value(collapsed ? 1 : 0)\n )\n React.useEffect(() => {\n // if (visible) {\n Animated.timing(calendarOpacity.current, {\n toValue: collapsed ? 1 : 0,\n duration: 250,\n useNativeDriver: true,\n }).start()\n // }\n }, [collapsed])\n\n return (\n <View style={styles.root}>\n <Animated.View\n pointerEvents={collapsed ? 'auto' : 'none'}\n style={[\n styles.calendar,\n {\n opacity: calendarOpacity.current,\n transform: [\n {\n scaleY: calendarOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [0.85, 1],\n }),\n },\n {\n scaleX: calendarOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [0.95, 1],\n }),\n },\n ],\n },\n ]}\n >\n {calendar}\n </Animated.View>\n <Animated.View\n pointerEvents={collapsed ? 'none' : 'auto'}\n style={[\n styles.calendarEdit,\n {\n backgroundColor: theme.colors.surface,\n opacity: calendarOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [1, 0],\n }),\n transform: [\n {\n scale: calendarOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [1, 0.95],\n }),\n },\n ],\n },\n ]}\n >\n {calendarEdit}\n </Animated.View>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n root: { flex: 1 },\n calendarEdit: {\n position: 'absolute',\n\n left: 0,\n right: 0,\n },\n calendar: {\n flex: 1,\n },\n})\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
export default function AutoSizer({
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export default function AutoSizer(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
children
|
|
6
|
+
} = _ref;
|
|
6
7
|
const [layout, setLayout] = React.useState(null);
|
|
7
8
|
const onLayout = React.useCallback(event => {
|
|
8
9
|
const nl = event.nativeEvent.layout; // https://github.com/necolas/react-native-web/issues/1704
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AutoSizer.tsx"],"names":["React","StyleSheet","View","AutoSizer","children","layout","setLayout","useState","onLayout","useCallback","event","nl","nativeEvent","width","height","styles","autoSizer","create","flex","overflow"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAA4BC,UAA5B,EAAwCC,IAAxC,QAAoD,cAApD;AAOA,eAAe,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["AutoSizer.tsx"],"names":["React","StyleSheet","View","AutoSizer","children","layout","setLayout","useState","onLayout","useCallback","event","nl","nativeEvent","width","height","styles","autoSizer","create","flex","overflow"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAA4BC,UAA5B,EAAwCC,IAAxC,QAAoD,cAApD;AAOA,eAAe,SAASC,SAAT,OAIZ;AAAA,MAJ+B;AAChCC,IAAAA;AADgC,GAI/B;AACD,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsBN,KAAK,CAACO,QAAN,CAAsC,IAAtC,CAA5B;AACA,QAAMC,QAAQ,GAAGR,KAAK,CAACS,WAAN,CACdC,KAAD,IAA8B;AAC5B,UAAMC,EAAE,GAAGD,KAAK,CAACE,WAAN,CAAkBP,MAA7B,CAD4B,CAG5B;;AACA,QAAI,CAACA,MAAD,IAAWA,MAAM,CAACQ,KAAP,KAAiBF,EAAE,CAACE,KAA/B,IAAwCR,MAAM,CAACS,MAAP,KAAkBH,EAAE,CAACG,MAAjE,EAAyE;AACvER,MAAAA,SAAS,CAAC;AAAEO,QAAAA,KAAK,EAAEF,EAAE,CAACE,KAAZ;AAAmBC,QAAAA,MAAM,EAAEH,EAAE,CAACG;AAA9B,OAAD,CAAT;AACD;AACF,GARc,EASf,CAACT,MAAD,EAASC,SAAT,CATe,CAAjB;AAWA,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAE,CAACS,MAAM,CAACC,SAAR,EAAmBX,MAAM,IAAIA,MAA7B,CAAb;AAAmD,IAAA,QAAQ,EAAEG;AAA7D,KACGH,MAAM,GAAGD,QAAQ,CAACC,MAAD,CAAX,GAAsB,IAD/B,CADF;AAKD;AAED,MAAMU,MAAM,GAAGd,UAAU,CAACgB,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AACTE,IAAAA,IAAI,EAAE,CADG;AAETC,IAAAA,QAAQ,EAAE;AAFD;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react'\nimport { LayoutChangeEvent, StyleSheet, View } from 'react-native'\n\ntype WidthAndHeight = {\n width: number\n height: number\n}\n\nexport default function AutoSizer({\n children,\n}: {\n children: ({ width, height }: WidthAndHeight) => any\n}) {\n const [layout, setLayout] = React.useState<WidthAndHeight | null>(null)\n const onLayout = React.useCallback(\n (event: LayoutChangeEvent) => {\n const nl = event.nativeEvent.layout\n\n // https://github.com/necolas/react-native-web/issues/1704\n if (!layout || layout.width !== nl.width || layout.height !== nl.height) {\n setLayout({ width: nl.width, height: nl.height })\n }\n },\n [layout, setLayout]\n )\n return (\n <View style={[styles.autoSizer, layout && layout]} onLayout={onLayout}>\n {layout ? children(layout) : null}\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n autoSizer: {\n flex: 1,\n overflow: 'hidden',\n },\n})\n"]}
|
|
@@ -2,13 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import Swiper from './Swiper';
|
|
4
4
|
import Month from './Month';
|
|
5
|
-
import { areDatesOnSameDay, dateToUnix, getInitialIndex } from './dateUtils';
|
|
5
|
+
import { areDatesOnSameDay, dateToUnix, getEndOfDay, getInitialIndex } from './dateUtils';
|
|
6
6
|
import CalendarHeader from './CalendarHeader';
|
|
7
7
|
import { useCallback, useMemo } from 'react';
|
|
8
8
|
import YearPicker from './YearPicker';
|
|
9
9
|
import Color from 'color';
|
|
10
10
|
import { useTheme } from 'react-native-paper';
|
|
11
|
-
import { useLatest } from '../utils';
|
|
11
|
+
import { useLatest, lightenBy, darkenBy } from '../utils';
|
|
12
12
|
|
|
13
13
|
function Calendar(props) {
|
|
14
14
|
const {
|
|
@@ -20,15 +20,16 @@ function Calendar(props) {
|
|
|
20
20
|
date,
|
|
21
21
|
disableWeekDays,
|
|
22
22
|
dates,
|
|
23
|
-
validRange
|
|
23
|
+
validRange,
|
|
24
|
+
dateMode
|
|
24
25
|
} = props;
|
|
25
26
|
const theme = useTheme();
|
|
26
27
|
const selectColor = useMemo(() => {
|
|
27
28
|
if (theme.dark) {
|
|
28
|
-
return Color(theme.colors.primary).hex();
|
|
29
|
+
return darkenBy(Color(theme.colors.primary), 0.9).hex();
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
return Color(theme.colors.primary)
|
|
32
|
+
return lightenBy(Color(theme.colors.primary), 0.9).hex();
|
|
32
33
|
}, [theme]);
|
|
33
34
|
const scrollMode = mode === 'range' || mode === 'multiple' ? 'vertical' : 'horizontal';
|
|
34
35
|
const [selectedYear, setSelectedYear] = React.useState(undefined);
|
|
@@ -47,7 +48,7 @@ function Calendar(props) {
|
|
|
47
48
|
if (mode === 'single') {
|
|
48
49
|
;
|
|
49
50
|
onChangeRef.current({
|
|
50
|
-
date: d
|
|
51
|
+
date: dateMode === 'start' ? d : getEndOfDay(d)
|
|
51
52
|
});
|
|
52
53
|
} else if (mode === 'range') {
|
|
53
54
|
const sd = startDateRef.current;
|
|
@@ -61,7 +62,7 @@ function Calendar(props) {
|
|
|
61
62
|
;
|
|
62
63
|
onChangeRef.current({
|
|
63
64
|
startDate: isStart ? d : sd,
|
|
64
|
-
endDate: !isStart ?
|
|
65
|
+
endDate: !isStart ? getEndOfDay(d) : undefined
|
|
65
66
|
});
|
|
66
67
|
} else if (mode === 'multiple') {
|
|
67
68
|
datesRef.current = datesRef.current || [];
|
|
@@ -74,7 +75,7 @@ function Calendar(props) {
|
|
|
74
75
|
change: exists ? 'removed' : 'added'
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
|
-
}, [mode, onChangeRef, startDateRef, endDateRef, datesRef]);
|
|
78
|
+
}, [mode, dateMode, onChangeRef, startDateRef, endDateRef, datesRef]);
|
|
78
79
|
const firstDate = startDate || date || (dates === null || dates === void 0 ? void 0 : dates[0]);
|
|
79
80
|
return /*#__PURE__*/React.createElement(View, {
|
|
80
81
|
style: styles.root
|
|
@@ -82,37 +83,43 @@ function Calendar(props) {
|
|
|
82
83
|
initialIndex: getInitialIndex(firstDate),
|
|
83
84
|
selectedYear: selectedYear,
|
|
84
85
|
scrollMode: scrollMode,
|
|
85
|
-
renderItem:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
86
|
+
renderItem: _ref => {
|
|
87
|
+
let {
|
|
88
|
+
index
|
|
89
|
+
} = _ref;
|
|
90
|
+
return /*#__PURE__*/React.createElement(Month, {
|
|
91
|
+
locale: locale,
|
|
92
|
+
mode: mode,
|
|
93
|
+
key: index,
|
|
94
|
+
validRange: validRange,
|
|
95
|
+
index: index,
|
|
96
|
+
startDate: startDate,
|
|
97
|
+
endDate: endDate,
|
|
98
|
+
date: date,
|
|
99
|
+
dates: dates,
|
|
100
|
+
onPressYear: onPressYear,
|
|
101
|
+
selectingYear: selectingYear,
|
|
102
|
+
onPressDate: onPressDate,
|
|
103
|
+
scrollMode: scrollMode,
|
|
104
|
+
primaryColor: theme.colors.primary,
|
|
105
|
+
selectColor: selectColor,
|
|
106
|
+
roundness: theme.roundness,
|
|
107
|
+
disableWeekDays: disableWeekDays
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
renderHeader: _ref2 => {
|
|
111
|
+
let {
|
|
112
|
+
onPrev,
|
|
113
|
+
onNext
|
|
114
|
+
} = _ref2;
|
|
115
|
+
return /*#__PURE__*/React.createElement(CalendarHeader, {
|
|
116
|
+
locale: locale,
|
|
117
|
+
onPrev: onPrev,
|
|
118
|
+
onNext: onNext,
|
|
119
|
+
scrollMode: scrollMode,
|
|
120
|
+
disableWeekDays: disableWeekDays
|
|
121
|
+
});
|
|
122
|
+
}
|
|
116
123
|
}), scrollMode === 'horizontal' ? /*#__PURE__*/React.createElement(YearPicker, {
|
|
117
124
|
selectedYear: selectedYear,
|
|
118
125
|
selectingYear: selectingYear,
|