react-native-paper-dates 0.8.6 → 0.9.1
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 +30 -1
- package/lib/commonjs/Date/AnimatedCrossView.js.map +1 -1
- package/lib/commonjs/Date/AutoSizer.js.map +1 -1
- package/lib/commonjs/Date/Calendar.js +6 -2
- package/lib/commonjs/Date/Calendar.js.map +1 -1
- package/lib/commonjs/Date/CalendarEdit.js +4 -4
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +33 -87
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.shared.js +6 -0
- package/lib/commonjs/Date/DatePickerInput.shared.js.map +1 -0
- package/lib/commonjs/Date/DatePickerInputWithoutModal.js +117 -0
- package/lib/commonjs/Date/DatePickerInputWithoutModal.js.map +1 -0
- package/lib/commonjs/Date/DatePickerModal.js +1 -1
- package/lib/commonjs/Date/DatePickerModal.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContent.js +14 -8
- package/lib/commonjs/Date/DatePickerModalContent.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +5 -3
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +5 -5
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/commonjs/Date/DateRangeInput.js +3 -2
- package/lib/commonjs/Date/DateRangeInput.js.map +1 -1
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/DayNames.js.map +1 -1
- package/lib/commonjs/Date/DayRange.js.map +1 -1
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/Swiper.js.map +1 -1
- package/lib/commonjs/Date/Swiper.native.js +2 -1
- package/lib/commonjs/Date/Swiper.native.js.map +1 -1
- package/lib/commonjs/Date/SwiperUtils.js.map +1 -1
- package/lib/commonjs/Date/Week.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +5 -5
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Date/dateUtils.js.map +1 -1
- package/lib/commonjs/Date/dateUtils.test.js.map +1 -1
- package/lib/commonjs/Date/inputUtils.js +1 -1
- package/lib/commonjs/Date/inputUtils.js.map +1 -1
- package/lib/commonjs/TextInputMask.js +1 -1
- package/lib/commonjs/TextInputMask.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClock.js +6 -4
- package/lib/commonjs/Time/AnalogClock.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +1 -1
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +2 -2
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePicker.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +7 -2
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/Time/timeUtils.js +7 -1
- package/lib/commonjs/Time/timeUtils.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/translations/ar.js +25 -0
- package/lib/commonjs/translations/ar.js.map +1 -0
- package/lib/commonjs/translations/de.js.map +1 -1
- package/lib/commonjs/translations/en.js.map +1 -1
- package/lib/commonjs/translations/enGB.js.map +1 -1
- package/lib/commonjs/translations/fr.js +25 -0
- package/lib/commonjs/translations/fr.js.map +1 -0
- package/lib/commonjs/translations/ko.js +25 -0
- package/lib/commonjs/translations/ko.js.map +1 -0
- package/lib/commonjs/translations/nl.js.map +1 -1
- package/lib/commonjs/translations/pl.js.map +1 -1
- package/lib/commonjs/translations/pt.js.map +1 -1
- package/lib/commonjs/translations/utils.js +1 -1
- package/lib/commonjs/translations/utils.js.map +1 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/Date/AnimatedCrossView.js.map +1 -1
- package/lib/module/Date/AutoSizer.js.map +1 -1
- package/lib/module/Date/Calendar.js +6 -2
- package/lib/module/Date/Calendar.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +4 -4
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +34 -87
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerInput.shared.js +2 -0
- package/lib/module/Date/DatePickerInput.shared.js.map +1 -0
- package/lib/module/Date/DatePickerInputWithoutModal.js +97 -0
- package/lib/module/Date/DatePickerInputWithoutModal.js.map +1 -0
- package/lib/module/Date/DatePickerModal.js +1 -1
- package/lib/module/Date/DatePickerModal.js.map +1 -1
- package/lib/module/Date/DatePickerModalContent.js +14 -8
- package/lib/module/Date/DatePickerModalContent.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +5 -3
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +5 -5
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/module/Date/DateRangeInput.js +3 -2
- package/lib/module/Date/DateRangeInput.js.map +1 -1
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/DayNames.js.map +1 -1
- package/lib/module/Date/DayRange.js.map +1 -1
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/Swiper.js.map +1 -1
- package/lib/module/Date/Swiper.native.js +2 -1
- package/lib/module/Date/Swiper.native.js.map +1 -1
- package/lib/module/Date/SwiperUtils.js.map +1 -1
- package/lib/module/Date/Week.js.map +1 -1
- package/lib/module/Date/YearPicker.js +5 -5
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Date/dateUtils.js.map +1 -1
- package/lib/module/Date/dateUtils.test.js.map +1 -1
- package/lib/module/Date/inputUtils.js +1 -1
- package/lib/module/Date/inputUtils.js.map +1 -1
- package/lib/module/TextInputMask.js +1 -1
- package/lib/module/TextInputMask.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClock.js +7 -5
- package/lib/module/Time/AnalogClock.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +1 -1
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/module/Time/TimeInput.js +1 -1
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +2 -2
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePicker.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +8 -3
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/Time/timeUtils.js +3 -0
- package/lib/module/Time/timeUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/translations/ar.js +18 -0
- package/lib/module/translations/ar.js.map +1 -0
- package/lib/module/translations/de.js.map +1 -1
- package/lib/module/translations/en.js.map +1 -1
- package/lib/module/translations/enGB.js.map +1 -1
- package/lib/module/translations/fr.js +18 -0
- package/lib/module/translations/fr.js.map +1 -0
- package/lib/module/translations/ko.js +18 -0
- package/lib/module/translations/ko.js.map +1 -0
- package/lib/module/translations/nl.js.map +1 -1
- package/lib/module/translations/pl.js.map +1 -1
- package/lib/module/translations/pt.js.map +1 -1
- package/lib/module/translations/utils.js +1 -1
- package/lib/module/translations/utils.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/Date/Calendar.d.ts +2 -0
- package/lib/typescript/Date/DatePickerInput.d.ts +2 -16
- package/lib/typescript/Date/DatePickerInput.shared.d.ts +13 -0
- package/lib/typescript/Date/DatePickerInputWithoutModal.d.ts +51 -0
- package/lib/typescript/Date/DatePickerModalContent.d.ts +1 -0
- package/lib/typescript/Date/DatePickerModalContentHeader.d.ts +3 -0
- package/lib/typescript/Date/DatePickerModalHeader.d.ts +2 -0
- package/lib/typescript/Date/DateRangeInput.d.ts +2 -1
- package/lib/typescript/Date/YearPicker.d.ts +3 -1
- package/lib/typescript/TextInputMask.d.ts +31 -6
- package/lib/typescript/Time/TimePickerModal.d.ts +3 -1
- package/lib/typescript/Time/timeUtils.d.ts +1 -0
- package/lib/typescript/translations/ar.d.ts +3 -0
- package/lib/typescript/translations/fr.d.ts +3 -0
- package/lib/typescript/translations/ko.d.ts +3 -0
- package/package.json +26 -25
- package/src/Date/Calendar.tsx +7 -1
- package/src/Date/CalendarEdit.tsx +4 -4
- package/src/Date/DatePickerInput.shared.tsx +17 -0
- package/src/Date/DatePickerInput.tsx +32 -102
- package/src/Date/DatePickerInputWithoutModal.tsx +110 -0
- package/src/Date/DatePickerModalContent.tsx +10 -1
- package/src/Date/DatePickerModalContentHeader.tsx +13 -2
- package/src/Date/DatePickerModalHeader.tsx +5 -2
- package/src/Date/DateRangeInput.tsx +8 -2
- package/src/Date/Swiper.native.tsx +1 -0
- package/src/Date/YearPicker.tsx +5 -4
- package/src/Date/inputUtils.ts +1 -1
- package/src/Time/AnalogClock.tsx +12 -18
- package/src/Time/AnalogClockHours.tsx +1 -1
- package/src/Time/TimeInputs.tsx +2 -2
- package/src/Time/TimePickerModal.tsx +9 -2
- package/src/Time/timeUtils.ts +10 -0
- package/src/translations/ar.ts +21 -0
- package/src/translations/fr.ts +23 -0
- package/src/translations/ko.ts +21 -0
- package/src/translations/utils.ts +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const fr = {
|
|
2
|
+
save: 'Enregistrer',
|
|
3
|
+
selectSingle: 'Sélectionner une date',
|
|
4
|
+
selectMultiple: 'Sélectionner plusieurs dates',
|
|
5
|
+
selectRange: 'Sélectionner une période',
|
|
6
|
+
notAccordingToDateFormat: inputFormat => `La date doit être au format ${inputFormat}`,
|
|
7
|
+
mustBeHigherThan: date => `La date doit être après le ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `La date doit être avant le ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `La date doit être en le ${startDate} et le ${endDate}`,
|
|
10
|
+
dateIsDisabled: 'Le jour n\'est pas autorisé',
|
|
11
|
+
previous: 'Précédent',
|
|
12
|
+
next: 'Suivant',
|
|
13
|
+
typeInDate: 'Entrer la date',
|
|
14
|
+
pickDateFromCalendar: 'Sélectionner une date dans le calendrier',
|
|
15
|
+
close: 'Fermer'
|
|
16
|
+
};
|
|
17
|
+
export default fr;
|
|
18
|
+
//# sourceMappingURL=fr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fr","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"sources":["fr.ts"],"sourcesContent":["\n \nimport type { TranslationsType } from './utils'\n\nconst fr: TranslationsType = {\n save: 'Enregistrer',\n selectSingle: 'Sélectionner une date',\n selectMultiple: 'Sélectionner plusieurs dates',\n selectRange: 'Sélectionner une période',\n notAccordingToDateFormat: (inputFormat) =>\n `La date doit être au format ${inputFormat}`,\n mustBeHigherThan: (date) => `La date doit être après le ${date}`,\n mustBeLowerThan: (date) => `La date doit être avant le ${date}`,\n mustBeBetween: (startDate, endDate) =>\n `La date doit être en le ${startDate} et le ${endDate}`,\n dateIsDisabled: 'Le jour n\\'est pas autorisé',\n previous: 'Précédent',\n next: 'Suivant',\n typeInDate: 'Entrer la date',\n pickDateFromCalendar: 'Sélectionner une date dans le calendrier',\n close: 'Fermer',\n}\nexport default fr\n"],"mappings":"AAIA,MAAMA,EAAoB,GAAG;EACzBC,IAAI,EAAE,aADmB;EAEzBC,YAAY,EAAE,uBAFW;EAGzBC,cAAc,EAAE,8BAHS;EAIzBC,WAAW,EAAE,0BAJY;EAKzBC,wBAAwB,EAAGC,WAAD,IACrB,+BAA8BA,WAAY,EANtB;EAOzBC,gBAAgB,EAAGC,IAAD,IAAW,8BAA6BA,IAAK,EAPtC;EAQzBC,eAAe,EAAGD,IAAD,IAAW,8BAA6BA,IAAK,EARrC;EASzBE,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACV,2BAA0BD,SAAU,UAASC,OAAQ,EAVjC;EAWzBC,cAAc,EAAE,6BAXS;EAYzBC,QAAQ,EAAE,WAZe;EAazBC,IAAI,EAAE,SAbmB;EAczBC,UAAU,EAAE,gBAda;EAezBC,oBAAoB,EAAE,0CAfG;EAgBzBC,KAAK,EAAE;AAhBkB,CAA7B;AAkBA,eAAelB,EAAf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const ko = {
|
|
2
|
+
save: '저장',
|
|
3
|
+
selectSingle: '날짜 선택',
|
|
4
|
+
selectMultiple: '여러 날짜 선택',
|
|
5
|
+
selectRange: '기간 선택',
|
|
6
|
+
notAccordingToDateFormat: inputFormat => `날짜 형식은 ${inputFormat}가 되어야 합니다`,
|
|
7
|
+
mustBeHigherThan: date => `${date} 보다 커야 합니다`,
|
|
8
|
+
mustBeLowerThan: date => `${date} 보다 작아야 합니다`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `${startDate} - ${endDate} 사이여야 합니다`,
|
|
10
|
+
dateIsDisabled: '날짜는 허용되지 않습니다',
|
|
11
|
+
previous: '이전',
|
|
12
|
+
next: '다음',
|
|
13
|
+
typeInDate: '날짜 입력',
|
|
14
|
+
pickDateFromCalendar: '달력에서 날짜 선택',
|
|
15
|
+
close: '닫기'
|
|
16
|
+
};
|
|
17
|
+
export default ko;
|
|
18
|
+
//# sourceMappingURL=ko.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ko","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"sources":["ko.ts"],"sourcesContent":["import type { TranslationsType } from './utils'\n\nconst ko: TranslationsType = {\n save: '저장',\n selectSingle: '날짜 선택',\n selectMultiple: '여러 날짜 선택',\n selectRange: '기간 선택',\n notAccordingToDateFormat: (inputFormat) =>\n `날짜 형식은 ${inputFormat}가 되어야 합니다`,\n mustBeHigherThan: (date) => `${date} 보다 커야 합니다`,\n mustBeLowerThan: (date) => `${date} 보다 작아야 합니다`,\n mustBeBetween: (startDate, endDate) =>\n `${startDate} - ${endDate} 사이여야 합니다`,\n dateIsDisabled: '날짜는 허용되지 않습니다',\n previous: '이전',\n next: '다음',\n typeInDate: '날짜 입력',\n pickDateFromCalendar: '달력에서 날짜 선택',\n close: '닫기',\n}\nexport default ko\n"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;EAC3BC,IAAI,EAAE,IADqB;EAE3BC,YAAY,EAAE,OAFa;EAG3BC,cAAc,EAAE,UAHW;EAI3BC,WAAW,EAAE,OAJc;EAK3BC,wBAAwB,EAAGC,WAAD,IACvB,UAASA,WAAY,WANG;EAO3BC,gBAAgB,EAAGC,IAAD,IAAW,GAAEA,IAAK,YAPT;EAQ3BC,eAAe,EAAGD,IAAD,IAAW,GAAEA,IAAK,aARR;EAS3BE,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,GAAED,SAAU,MAAKC,OAAQ,WAVD;EAW3BC,cAAc,EAAE,eAXW;EAY3BC,QAAQ,EAAE,IAZiB;EAa3BC,IAAI,EAAE,IAbqB;EAc3BC,UAAU,EAAE,OAde;EAe3BC,oBAAoB,EAAE,YAfK;EAgB3BC,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["nl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"sources":["nl.ts"],"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) =>\n `Datumformaat moet ${inputFormat} zijn`,\n mustBeHigherThan: (date) => `Moet later dan ${date}`,\n mustBeLowerThan: (date) => `Moet eerder dan ${date}`,\n mustBeBetween: (startDate, endDate) =>\n `Moet tussen ${startDate} - ${endDate}`,\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"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;EAC3BC,IAAI,EAAE,SADqB;EAE3BC,YAAY,EAAE,iBAFa;EAG3BC,cAAc,EAAE,kBAHW;EAI3BC,WAAW,EAAE,mBAJc;EAK3BC,wBAAwB,EAAGC,WAAD,IACvB,qBAAoBA,WAAY,OANR;EAO3BC,gBAAgB,EAAGC,IAAD,IAAW,kBAAiBA,IAAK,EAPxB;EAQ3BC,eAAe,EAAGD,IAAD,IAAW,mBAAkBA,IAAK,EARxB;EAS3BE,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,eAAcD,SAAU,MAAKC,OAAQ,EAVb;EAW3BC,cAAc,EAAE,mBAXW;EAY3BC,QAAQ,EAAE,QAZiB;EAa3BC,IAAI,EAAE,UAbqB;EAc3BC,UAAU,EAAE,WAde;EAe3BC,oBAAoB,EAAE,yBAfK;EAgB3BC,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["pl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"sources":["pl.ts"],"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) =>\n `Data musi mieć format ${inputFormat}`,\n mustBeHigherThan: (date) => `Nie wcześniej niżn ${date}`,\n mustBeLowerThan: (date) => `Nie później niż ${date}`,\n mustBeBetween: (startDate, endDate) => `Pomiędzy ${startDate} - ${endDate}`,\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"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;EAC3BC,IAAI,EAAE,QADqB;EAE3BC,YAAY,EAAE,cAFa;EAG3BC,cAAc,EAAE,cAHW;EAI3BC,WAAW,EAAE,gBAJc;EAK3BC,wBAAwB,EAAGC,WAAD,IACvB,yBAAwBA,WAAY,EANZ;EAO3BC,gBAAgB,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP5B;EAQ3BC,eAAe,EAAGD,IAAD,IAAW,mBAAkBA,IAAK,EARxB;EAS3BE,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KAAyB,YAAWD,SAAU,MAAKC,OAAQ,EAT/C;EAU3BC,cAAc,EAAE,mBAVW;EAY3BC,QAAQ,EAAE,WAZiB;EAa3BC,IAAI,EAAE,OAbqB;EAc3BC,UAAU,EAAE,YAde;EAe3BC,oBAAoB,EAAE,2BAfK;EAgB3BC,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["pt","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"sources":["pt.ts"],"sourcesContent":["import type { TranslationsType } from './utils'\n\nconst pt: TranslationsType = {\n save: 'Salvar',\n selectSingle: 'Selecione a data',\n selectMultiple: 'Selecione as datas',\n selectRange: 'Selecione o período',\n notAccordingToDateFormat: (inputFormat: string) =>\n `O formato da data deve ser ${inputFormat}`,\n mustBeHigherThan: (date) => `Deve ser depois de ${date}`,\n mustBeLowerThan: (date) => `Deve ser antes de ${date}`,\n mustBeBetween: (startDate, endDate) =>\n `Deve estar entre ${startDate} - ${endDate}`,\n dateIsDisabled: 'Data não é permitida',\n previous: 'Anterior',\n next: 'Próximo',\n typeInDate: 'Digite a data',\n pickDateFromCalendar: 'Escolha a data do calendário',\n close: 'Fechar',\n}\nexport default pt\n"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;EAC3BC,IAAI,EAAE,QADqB;EAE3BC,YAAY,EAAE,kBAFa;EAG3BC,cAAc,EAAE,oBAHW;EAI3BC,WAAW,EAAE,qBAJc;EAK3BC,wBAAwB,EAAGC,WAAD,IACvB,8BAA6BA,WAAY,EANjB;EAO3BC,gBAAgB,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP5B;EAQ3BC,eAAe,EAAGD,IAAD,IAAW,qBAAoBA,IAAK,EAR1B;EAS3BE,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,oBAAmBD,SAAU,MAAKC,OAAQ,EAVlB;EAW3BC,cAAc,EAAE,sBAXW;EAY3BC,QAAQ,EAAE,UAZiB;EAa3BC,IAAI,EAAE,SAbqB;EAc3BC,UAAU,EAAE,eAde;EAe3BC,oBAAoB,EAAE,8BAfK;EAgB3BC,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf"}
|
|
@@ -10,7 +10,7 @@ export function getTranslation(locale, key, fallback) {
|
|
|
10
10
|
|
|
11
11
|
const translation = translationsPerLocale[l][key];
|
|
12
12
|
|
|
13
|
-
if (!
|
|
13
|
+
if (!translation) {
|
|
14
14
|
console.warn(`[react-native-paper-dates] ${locale} is registered, but ${key} is missing`);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["translationsPerLocale","getTranslation","locale","key","fallback","l","translationForLocale","console","warn","translation","registerTranslation","translations"],"sources":["utils.ts"],"sourcesContent":["export type TranslationsType = {\n selectSingle: string\n selectMultiple: string\n selectRange: string\n save: string\n notAccordingToDateFormat: (inputFormat: string) => string\n mustBeHigherThan: (date: string) => string\n mustBeLowerThan: (date: string) => string\n mustBeBetween: (startDate: string, endDate: string) => 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<K extends keyof TranslationsType>(\n locale: string | undefined,\n key: K,\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 (!translation) {\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"],"mappings":"AAiBA,IAAIA,qBAAuD,GAAG,EAA9D;AAEA,OAAO,SAASC,cAAT,CACLC,MADK,EAELC,GAFK,EAGLC,QAHK,EAIL;EACA,MAAMC,CAAC,GAAGH,MAAM,IAAI,IAApB;EACA,MAAMI,oBAAoB,GAAGN,qBAAqB,CAACK,CAAD,CAAlD;;EACA,IAAI,CAACC,oBAAL,EAA2B;IACzBC,OAAO,CAACC,IAAR,CACG,8BAA6BN,MAAO,4BAA2BC,GAAI,EADtE;IAGA,OAAOC,QAAQ,IAAID,GAAnB;EACD;;EACD,MAAMM,WAAW,GAAGT,qBAAqB,CAACK,CAAD,CAArB,CAAyBF,GAAzB,CAApB;;EACA,IAAI,CAACM,WAAL,EAAkB;IAChBF,OAAO,CAACC,IAAR,CACG,8BAA6BN,MAAO,uBAAsBC,GAAI,aADjE;EAGD;;EACD,OAAOM,WAAW,IAAIL,QAAf,IAA2BD,GAAlC;AACD;AAED,OAAO,SAASO,mBAAT,CACLR,MADK,EAELS,YAFK,EAGL;EACAX,qBAAqB,CAACE,MAAD,CAArB,GAAgCS,YAAhC;AACD"}
|
package/lib/module/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","overlay","useTheme","Color","useLatest","value","ref","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"],"sources":["utils.ts"],"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"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,OAAT,EAAkBC,QAAlB,QAAkC,oBAAlC;AACA,OAAOC,KAAP,MAAkB,OAAlB;AAEA,OAAO,SAASC,SAAT,CAAsBC,KAAtB,EAAgC;EACrC,MAAMC,GAAG,GAAGN,KAAK,CAACO,MAAN,CAAaF,KAAb,CAAZ;EACAC,GAAG,CAACE,OAAJ,GAAcH,KAAd;EACA,OAAOC,GAAP;AACD;AAED,OAAO,SAASG,wBAAT,GAAoC;EACzC,MAAMC,KAAK,GAAGR,QAAQ,EAAtB;EACA,OAAOQ,KAAK,CAACC,IAAN,IAAcD,KAAK,CAACE,IAAN,KAAe,UAA7B,GACHX,OAAO,CAAC,CAAD,EAAIS,KAAK,CAACG,MAAN,CAAaC,OAAjB,CADJ,GAEHJ,KAAK,CAACG,MAAN,CAAaE,OAFjB;AAGD;AAED,OAAO,SAASC,qBAAT,GAAiC;EACtC,MAAMN,KAAK,GAAGR,QAAQ,EAAtB;EACA,MAAMe,UAAU,GACdP,KAAK,CAACC,IAAN,IAAcD,KAAK,CAACE,IAAN,KAAe,UAA7B,GACIF,KAAK,CAACG,MAAN,CAAaC,OADjB,GAEIJ,KAAK,CAACG,MAAN,CAAaE,OAHnB;EAIA,OAAOZ,KAAK,CAACc,UAAD,CAAL,CAAkBC,OAAlB,EAAP;AACD;AAED,OAAO,SAASC,kBAAT,GAA8B;EACnC,MAAMD,OAAO,GAAGF,qBAAqB,EAArC;EACA,OAAO,CAACE,OAAD,GAAW,MAAX,GAAoB,MAA3B;AACD;AAED,OAAO,SAASE,qBAAT,GAAiC;EACtC,MAAMV,KAAK,GAAGR,QAAQ,EAAtB;EACA,MAAMmB,MAAM,GAAG,CAAClB,KAAK,CAACO,KAAK,CAACG,MAAN,CAAaE,OAAd,CAAL,CAA4BG,OAA5B,EAAhB;EACA,OAAOG,MAAM,GAAG,MAAH,GAAY,MAAzB;AACD;AAED,OAAO,SAASC,KAAT,CAAeC,KAAf,EAA8BC,GAA9B,EAA2C;EAChD,OAAOC,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;AAED,OAAO,SAASC,SAAT,CAAmBC,KAAnB,EAAiCC,KAAjC,EAAgD;EACrD,MAAMC,SAAS,GAAGF,KAAK,CAACE,SAAN,EAAlB;EACA,OAAOF,KAAK,CAACE,SAAN,CAAgBA,SAAS,GAAG,CAAC,MAAMA,SAAP,IAAoBD,KAAhD,CAAP;AACD;AAED,OAAO,SAASE,QAAT,CAAkBH,KAAlB,EAAgCC,KAAhC,EAA+C;EACpD,MAAMC,SAAS,GAAGF,KAAK,CAACE,SAAN,EAAlB;EACA,OAAOF,KAAK,CAACE,SAAN,CAAgBA,SAAS,GAAGA,SAAS,GAAGD,KAAxC,CAAP;AACD"}
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<
|
|
4
|
-
inputMode: "end" | "start";
|
|
5
|
-
locale: string;
|
|
6
|
-
onChange: (date: Date | undefined) => void;
|
|
7
|
-
value: Date | undefined;
|
|
8
|
-
validRange?: ValidRangeType | undefined;
|
|
9
|
-
withModal?: boolean | undefined;
|
|
10
|
-
withDateFormatInLabel?: boolean | undefined;
|
|
11
|
-
} & Omit<(Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
12
|
-
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
13
|
-
}) | (Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
14
|
-
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
}), "onChange" | "onChangeText" | "value">, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "theme" | "locale" | "validRange" | "inputMode" | "withModal" | "withDateFormatInLabel"> & React.RefAttributes<unknown>>;
|
|
2
|
+
import type { DatePickerInputProps } from './DatePickerInput.shared';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<DatePickerInputProps, "label" | "style" | "children" | "pointerEvents" | "allowFontScaling" | "numberOfLines" | "onLayout" | "onPressIn" | "onPressOut" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "left" | "right" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "value" | "mode" | "textAlign" | "render" | "textAlignVertical" | "disabled" | "onBlur" | "onFocus" | "multiline" | "error" | "placeholder" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "onChange" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "theme" | "locale" | "validRange" | "calendarIcon" | "inputMode" | "withDateFormatInLabel" | "withModal"> & React.RefAttributes<unknown>>;
|
|
18
4
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ValidRangeType } from './Calendar';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import type { TextInput } from 'react-native-paper';
|
|
4
|
+
export declare type DatePickerInputProps = {
|
|
5
|
+
inputMode: 'start' | 'end';
|
|
6
|
+
locale: string;
|
|
7
|
+
onChange: (date: Date | undefined) => void;
|
|
8
|
+
value: Date | undefined;
|
|
9
|
+
validRange?: ValidRangeType | undefined;
|
|
10
|
+
withModal?: boolean;
|
|
11
|
+
withDateFormatInLabel?: boolean;
|
|
12
|
+
calendarIcon?: string;
|
|
13
|
+
} & Omit<React.ComponentProps<typeof TextInput>, 'value' | 'onChange' | 'onChangeText'>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<{
|
|
3
|
+
inputMode: "end" | "start";
|
|
4
|
+
locale: string;
|
|
5
|
+
onChange: (date: Date | undefined) => void;
|
|
6
|
+
value: Date | undefined;
|
|
7
|
+
validRange?: import("./Calendar").ValidRangeType | undefined;
|
|
8
|
+
withModal?: boolean | undefined;
|
|
9
|
+
withDateFormatInLabel?: boolean | undefined;
|
|
10
|
+
calendarIcon?: string | undefined;
|
|
11
|
+
} & Omit<Pick<import("react-native").TextInputProps & React.RefAttributes<import("react-native").TextInput> & {
|
|
12
|
+
mode?: "flat" | "outlined" | undefined;
|
|
13
|
+
left?: React.ReactNode;
|
|
14
|
+
right?: React.ReactNode;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
label?: import("react-native-paper/lib/typescript/components/TextInput/types").TextInputLabelProp | undefined;
|
|
17
|
+
placeholder?: string | undefined;
|
|
18
|
+
error?: boolean | undefined;
|
|
19
|
+
onChangeText?: Function | undefined;
|
|
20
|
+
selectionColor?: string | undefined;
|
|
21
|
+
underlineColor?: string | undefined;
|
|
22
|
+
activeUnderlineColor?: string | undefined;
|
|
23
|
+
outlineColor?: string | undefined;
|
|
24
|
+
activeOutlineColor?: string | undefined;
|
|
25
|
+
dense?: boolean | undefined;
|
|
26
|
+
multiline?: boolean | undefined;
|
|
27
|
+
numberOfLines?: number | undefined;
|
|
28
|
+
onFocus?: ((args: any) => void) | undefined;
|
|
29
|
+
onBlur?: ((args: any) => void) | undefined;
|
|
30
|
+
render?: ((props: import("react-native-paper/lib/typescript/components/TextInput/types").RenderProps) => React.ReactNode) | undefined;
|
|
31
|
+
value?: string | undefined;
|
|
32
|
+
style?: import("react-native").StyleProp<import("react-native").TextStyle>;
|
|
33
|
+
theme: ReactNativePaper.Theme;
|
|
34
|
+
} & React.RefAttributes<{
|
|
35
|
+
focus: () => void;
|
|
36
|
+
clear: () => void;
|
|
37
|
+
blur: () => void;
|
|
38
|
+
isFocused: () => boolean;
|
|
39
|
+
setNativeProps: (nativeProps: object) => void;
|
|
40
|
+
}>, "label" | "style" | "children" | "pointerEvents" | "allowFontScaling" | "numberOfLines" | "onLayout" | "onPressIn" | "onPressOut" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "left" | "right" | "ref" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "value" | "mode" | "textAlign" | "render" | "textAlignVertical" | "disabled" | "onBlur" | "onFocus" | "multiline" | "error" | "placeholder" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "onChange" | "onChangeText" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
41
|
+
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
42
|
+
}, "value" | "onChange" | "onChangeText"> & {
|
|
43
|
+
modal?: ((params: {
|
|
44
|
+
value: Date | undefined;
|
|
45
|
+
locale: string;
|
|
46
|
+
inputMode: "end" | "start";
|
|
47
|
+
validRange: import("./Calendar").ValidRangeType | undefined;
|
|
48
|
+
}) => any) | undefined;
|
|
49
|
+
inputButtons?: any;
|
|
50
|
+
}, "label" | "style" | "children" | "pointerEvents" | "allowFontScaling" | "numberOfLines" | "onLayout" | "onPressIn" | "onPressOut" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "left" | "right" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "value" | "mode" | "textAlign" | "render" | "textAlignVertical" | "disabled" | "onBlur" | "onFocus" | "multiline" | "error" | "placeholder" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "onChange" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "theme" | "locale" | "validRange" | "calendarIcon" | "inputMode" | "withDateFormatInLabel" | "modal" | "inputButtons" | "withModal"> & React.RefAttributes<unknown>>;
|
|
51
|
+
export default _default;
|
|
@@ -12,6 +12,7 @@ interface DatePickerModalContentBaseProps {
|
|
|
12
12
|
locale: string;
|
|
13
13
|
onDismiss: () => any;
|
|
14
14
|
disableSafeTop?: boolean;
|
|
15
|
+
saveLabelDisabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface DatePickerModalContentRangeProps extends HeaderPickProps, BaseCalendarProps, DatePickerModalContentBaseProps {
|
|
17
18
|
mode: 'range';
|
|
@@ -9,6 +9,9 @@ export interface HeaderPickProps {
|
|
|
9
9
|
headerSeparator?: string;
|
|
10
10
|
startLabel?: string;
|
|
11
11
|
endLabel?: string;
|
|
12
|
+
editIcon?: string;
|
|
13
|
+
calendarIcon?: string;
|
|
14
|
+
closeIcon?: string;
|
|
12
15
|
}
|
|
13
16
|
export interface HeaderContentProps extends HeaderPickProps {
|
|
14
17
|
state: LocalState;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface DatePickerModalHeaderProps {
|
|
2
2
|
disableSafeTop?: boolean;
|
|
3
3
|
saveLabel?: string;
|
|
4
|
+
saveLabelDisabled?: boolean;
|
|
4
5
|
uppercase?: boolean;
|
|
5
6
|
onDismiss: () => void;
|
|
6
7
|
onSave: () => void;
|
|
7
8
|
locale: string | undefined;
|
|
9
|
+
closeIcon?: string;
|
|
8
10
|
}
|
|
9
11
|
export default function DatePickerModalHeader(props: DatePickerModalHeaderProps): JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export default function YearPicker({ selectedYear, selectingYear, onPressYear, }: {
|
|
1
|
+
export default function YearPicker({ selectedYear, selectingYear, onPressYear, startYear, endYear, }: {
|
|
2
2
|
selectedYear: number | undefined;
|
|
3
3
|
selectingYear: boolean;
|
|
4
4
|
onPressYear: (year: number) => any;
|
|
5
|
+
startYear: number;
|
|
6
|
+
endYear: number;
|
|
5
7
|
}): JSX.Element;
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<import("react-native").TextInputProps & React.RefAttributes<import("react-native").TextInput> & {
|
|
3
|
+
mode?: "flat" | "outlined" | undefined;
|
|
4
|
+
left?: React.ReactNode;
|
|
5
|
+
right?: React.ReactNode;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
label?: import("react-native-paper/lib/typescript/components/TextInput/types").TextInputLabelProp | undefined;
|
|
8
|
+
placeholder?: string | undefined;
|
|
9
|
+
error?: boolean | undefined;
|
|
10
|
+
onChangeText?: Function | undefined;
|
|
11
|
+
selectionColor?: string | undefined;
|
|
12
|
+
underlineColor?: string | undefined;
|
|
13
|
+
activeUnderlineColor?: string | undefined;
|
|
14
|
+
outlineColor?: string | undefined;
|
|
15
|
+
activeOutlineColor?: string | undefined;
|
|
16
|
+
dense?: boolean | undefined;
|
|
17
|
+
multiline?: boolean | undefined;
|
|
18
|
+
numberOfLines?: number | undefined;
|
|
19
|
+
onFocus?: ((args: any) => void) | undefined;
|
|
20
|
+
onBlur?: ((args: any) => void) | undefined;
|
|
21
|
+
render?: ((props: import("react-native-paper/lib/typescript/components/TextInput/types").RenderProps) => React.ReactNode) | undefined;
|
|
22
|
+
value?: string | undefined;
|
|
23
|
+
style?: import("react-native").StyleProp<import("react-native").TextStyle>;
|
|
24
|
+
theme: ReactNativePaper.Theme;
|
|
25
|
+
} & React.RefAttributes<{
|
|
26
|
+
focus: () => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
blur: () => void;
|
|
29
|
+
isFocused: () => boolean;
|
|
30
|
+
setNativeProps: (nativeProps: object) => void;
|
|
31
|
+
}>, "label" | "style" | "children" | "pointerEvents" | "allowFontScaling" | "numberOfLines" | "onLayout" | "onPressIn" | "onPressOut" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "left" | "right" | "ref" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "value" | "mode" | "textAlign" | "render" | "textAlignVertical" | "disabled" | "onBlur" | "onFocus" | "multiline" | "error" | "placeholder" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "onChange" | "onChangeText" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
5
32
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
6
33
|
} & {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
})) & {
|
|
9
34
|
mask: string;
|
|
10
|
-
}, "
|
|
35
|
+
}, "label" | "style" | "children" | "pointerEvents" | "allowFontScaling" | "numberOfLines" | "onLayout" | "onPressIn" | "onPressOut" | "testID" | "nativeID" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "left" | "right" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "value" | "mode" | "textAlign" | "render" | "textAlignVertical" | "disabled" | "onBlur" | "onFocus" | "multiline" | "error" | "placeholder" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "onChange" | "onChangeText" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "mask" | "theme"> & React.RefAttributes<unknown>>;
|
|
11
36
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours, minutes, label, uppercase, cancelLabel, confirmLabel, animationType, locale, }: {
|
|
2
|
+
export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours, minutes, label, uppercase, cancelLabel, confirmLabel, animationType, locale, keyboardIcon, clockIcon, }: {
|
|
3
3
|
locale?: undefined | string;
|
|
4
4
|
label?: string;
|
|
5
5
|
uppercase?: boolean;
|
|
@@ -14,6 +14,8 @@ export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours,
|
|
|
14
14
|
minutes: number;
|
|
15
15
|
}) => any;
|
|
16
16
|
animationType?: 'slide' | 'fade' | 'none';
|
|
17
|
+
keyboardIcon?: string;
|
|
18
|
+
clockIcon?: string;
|
|
17
19
|
}): JSX.Element;
|
|
18
20
|
declare const _default: React.MemoExoticComponent<typeof TimePickerModal>;
|
|
19
21
|
export default _default;
|
|
@@ -15,6 +15,7 @@ declare type InputIconMap = {
|
|
|
15
15
|
[inputType in PossibleInputTypes]: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const inputTypeIcons: InputIconMap;
|
|
18
|
+
export declare const getTimeInputTypeIcon: (inputType: PossibleInputTypes, inputIconMap?: InputIconMap) => string;
|
|
18
19
|
export declare type PossibleClockTypes = 'hours' | 'minutes';
|
|
19
20
|
export declare type ClockTypeMap = {
|
|
20
21
|
[clockType in PossibleClockTypes]: PossibleClockTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-paper-dates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Performant Date Picker for React Native Paper",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "jest",
|
|
26
26
|
"typescript": "tsc --noEmit",
|
|
27
27
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
28
|
-
"prepare": "bob build",
|
|
28
|
+
"prepare": "husky install && bob build",
|
|
29
29
|
"release": "release-it",
|
|
30
30
|
"example": "yarn --cwd example",
|
|
31
31
|
"pods": "cd example && pod-install --quiet",
|
|
@@ -47,29 +47,29 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@commitlint/config-conventional": "^
|
|
51
|
-
"@react-native-community/eslint-config": "^3.0
|
|
52
|
-
"@release-it/conventional-changelog": "^
|
|
53
|
-
"@types/color": "^3.0.
|
|
54
|
-
"@types/jest": "^
|
|
55
|
-
"@types/react": "^
|
|
56
|
-
"@types/react-native": "^0.
|
|
57
|
-
"babel-loader": "^8.2.
|
|
58
|
-
"commitlint": "^
|
|
59
|
-
"eslint": "^
|
|
60
|
-
"eslint-config-prettier": "^8.
|
|
61
|
-
"eslint-plugin-prettier": "^4.
|
|
62
|
-
"expo-cli": "^
|
|
63
|
-
"husky": "^
|
|
64
|
-
"jest": "^
|
|
65
|
-
"pod-install": "^0.1.
|
|
66
|
-
"prettier": "^2.
|
|
67
|
-
"react": "
|
|
68
|
-
"react-native": "^0.
|
|
69
|
-
"react-native-builder-bob": "
|
|
70
|
-
"react-native-paper": "^4.
|
|
71
|
-
"release-it": "^
|
|
72
|
-
"typescript": "^4.
|
|
50
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
51
|
+
"@react-native-community/eslint-config": "^3.1.0",
|
|
52
|
+
"@release-it/conventional-changelog": "^5.1.0",
|
|
53
|
+
"@types/color": "^3.0.3",
|
|
54
|
+
"@types/jest": "^28.1.8",
|
|
55
|
+
"@types/react": "^18.0.17",
|
|
56
|
+
"@types/react-native": "^0.69.5",
|
|
57
|
+
"babel-loader": "^8.2.5",
|
|
58
|
+
"commitlint": "^17.0.3",
|
|
59
|
+
"eslint": "^8.22.0",
|
|
60
|
+
"eslint-config-prettier": "^8.5.0",
|
|
61
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
62
|
+
"expo-cli": "^6.0.5",
|
|
63
|
+
"husky": "^8.0.1",
|
|
64
|
+
"jest": "^29.0.0",
|
|
65
|
+
"pod-install": "^0.1.38",
|
|
66
|
+
"prettier": "^2.7.1",
|
|
67
|
+
"react": "^18.2.0",
|
|
68
|
+
"react-native": "^0.69.5",
|
|
69
|
+
"react-native-builder-bob": "^0.18.3",
|
|
70
|
+
"react-native-paper": "^4.12.4",
|
|
71
|
+
"release-it": "^15.4.0",
|
|
72
|
+
"typescript": "^4.7.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"react": "*",
|
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
]
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
|
+
"caniuse-lite": "^1.0.30001383",
|
|
157
158
|
"color": "^3.2.1"
|
|
158
159
|
}
|
|
159
160
|
}
|
package/src/Date/Calendar.tsx
CHANGED
|
@@ -31,6 +31,8 @@ export type BaseCalendarProps = {
|
|
|
31
31
|
locale: string
|
|
32
32
|
disableWeekDays?: DisableWeekDaysType
|
|
33
33
|
validRange?: ValidRangeType
|
|
34
|
+
startYear?: number
|
|
35
|
+
endYear?: number
|
|
34
36
|
|
|
35
37
|
// here they are optional but in final implemenation they are required
|
|
36
38
|
date?: CalendarDate
|
|
@@ -88,6 +90,8 @@ function Calendar(
|
|
|
88
90
|
endDate,
|
|
89
91
|
date,
|
|
90
92
|
disableWeekDays,
|
|
93
|
+
startYear,
|
|
94
|
+
endYear,
|
|
91
95
|
dates,
|
|
92
96
|
validRange,
|
|
93
97
|
dateMode,
|
|
@@ -136,7 +140,7 @@ function Calendar(
|
|
|
136
140
|
const sd = startDateRef.current
|
|
137
141
|
const ed = endDateRef.current
|
|
138
142
|
let isStart: boolean = true
|
|
139
|
-
if (sd && !ed && dateToUnix(d)
|
|
143
|
+
if (sd && !ed && dateToUnix(d) >= dateToUnix(sd!)) {
|
|
140
144
|
isStart = false
|
|
141
145
|
}
|
|
142
146
|
;(onChangeRef.current as RangeChange)({
|
|
@@ -206,6 +210,8 @@ function Calendar(
|
|
|
206
210
|
selectedYear={selectedYear}
|
|
207
211
|
selectingYear={selectingYear}
|
|
208
212
|
onPressYear={onPressYear}
|
|
213
|
+
startYear={startYear || 1800}
|
|
214
|
+
endYear={endYear || 2200}
|
|
209
215
|
/>
|
|
210
216
|
) : null}
|
|
211
217
|
</View>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import type { ModeType, ValidRangeType } from './Calendar'
|
|
10
10
|
import type { LocalState } from './DatePickerModalContent'
|
|
11
11
|
|
|
12
|
-
import
|
|
12
|
+
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
|
|
13
13
|
|
|
14
14
|
function CalendarEdit({
|
|
15
15
|
mode,
|
|
@@ -77,7 +77,7 @@ function CalendarEdit({
|
|
|
77
77
|
return (
|
|
78
78
|
<View style={styles.root}>
|
|
79
79
|
{mode === 'single' ? (
|
|
80
|
-
<
|
|
80
|
+
<DatePickerInputWithoutModal
|
|
81
81
|
inputMode="start"
|
|
82
82
|
ref={dateInput}
|
|
83
83
|
label={label}
|
|
@@ -92,7 +92,7 @@ function CalendarEdit({
|
|
|
92
92
|
) : null}
|
|
93
93
|
{mode === 'range' ? (
|
|
94
94
|
<View style={styles.inner}>
|
|
95
|
-
<
|
|
95
|
+
<DatePickerInputWithoutModal
|
|
96
96
|
inputMode="start"
|
|
97
97
|
ref={startInput}
|
|
98
98
|
label={startLabel}
|
|
@@ -106,7 +106,7 @@ function CalendarEdit({
|
|
|
106
106
|
autoComplete={'off'}
|
|
107
107
|
/>
|
|
108
108
|
<View style={styles.separator} />
|
|
109
|
-
<
|
|
109
|
+
<DatePickerInputWithoutModal
|
|
110
110
|
inputMode="end"
|
|
111
111
|
ref={endInput}
|
|
112
112
|
label={endLabel}
|