react-native-paper-dates 0.8.1 → 0.8.2
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 +15 -5
- package/lib/commonjs/Date/CalendarEdit.js +3 -3
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js +2 -8
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +7 -7
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +1 -4
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +1 -4
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DateRangeInput.js +1 -4
- package/lib/commonjs/Date/DateRangeInput.js.map +1 -1
- package/lib/commonjs/Date/Day.js +1 -4
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/Month.js +2 -8
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +1 -4
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Date/inputUtils.js +1 -1
- package/lib/commonjs/Date/inputUtils.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +1 -4
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +1 -4
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/translations/de.js +25 -0
- package/lib/commonjs/translations/de.js.map +1 -0
- package/lib/commonjs/translations/en.js +3 -3
- package/lib/commonjs/translations/en.js.map +1 -1
- package/lib/commonjs/translations/enGB.js +3 -3
- package/lib/commonjs/translations/enGB.js.map +1 -1
- package/lib/commonjs/translations/nl.js +3 -3
- package/lib/commonjs/translations/nl.js.map +1 -1
- package/lib/commonjs/translations/pl.js +3 -3
- package/lib/commonjs/translations/pl.js.map +1 -1
- package/lib/commonjs/translations/pt.js +3 -3
- package/lib/commonjs/translations/pt.js.map +1 -1
- package/lib/commonjs/translations/utils.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +3 -3
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js +2 -8
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +7 -7
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +1 -4
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +1 -4
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DateRangeInput.js +1 -4
- package/lib/module/Date/DateRangeInput.js.map +1 -1
- package/lib/module/Date/Day.js +1 -4
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/Month.js +2 -8
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/YearPicker.js +1 -4
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Date/inputUtils.js +1 -1
- package/lib/module/Date/inputUtils.js.map +1 -1
- package/lib/module/Time/TimeInput.js +1 -4
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +1 -4
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/translations/de.js +18 -0
- package/lib/module/translations/de.js.map +1 -0
- package/lib/module/translations/en.js +3 -3
- package/lib/module/translations/en.js.map +1 -1
- package/lib/module/translations/enGB.js +3 -3
- package/lib/module/translations/enGB.js.map +1 -1
- package/lib/module/translations/nl.js +3 -3
- package/lib/module/translations/nl.js.map +1 -1
- package/lib/module/translations/pl.js +3 -3
- package/lib/module/translations/pl.js.map +1 -1
- package/lib/module/translations/pt.js +3 -3
- package/lib/module/translations/pt.js.map +1 -1
- package/lib/module/translations/utils.js.map +1 -1
- package/lib/typescript/Date/DatePickerInput.d.ts +3 -3
- package/lib/typescript/TextInputMask.d.ts +3 -3
- package/lib/typescript/translations/de.d.ts +3 -0
- package/lib/typescript/translations/utils.d.ts +4 -4
- package/package.json +3 -1
- package/src/Date/CalendarEdit.tsx +3 -3
- package/src/Date/CalendarHeader.tsx +0 -6
- package/src/Date/DatePickerInput.tsx +8 -5
- package/src/Date/DatePickerModalContentHeader.tsx +0 -3
- package/src/Date/DatePickerModalHeader.tsx +0 -3
- package/src/Date/DateRangeInput.tsx +1 -7
- package/src/Date/Day.tsx +0 -3
- package/src/Date/Month.tsx +0 -6
- package/src/Date/YearPicker.tsx +0 -3
- package/src/Date/inputUtils.ts +13 -9
- package/src/Time/TimeInput.tsx +0 -3
- package/src/Time/TimePickerModal.tsx +0 -3
- package/src/translations/de.ts +20 -0
- package/src/translations/en.ts +5 -4
- package/src/translations/enGB.ts +5 -4
- package/src/translations/nl.ts +5 -4
- package/src/translations/pl.ts +4 -4
- package/src/translations/pt.ts +4 -3
- package/src/translations/utils.ts +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["YearPicker.tsx"],"names":["React","FlatList","StyleSheet","View","Text","TouchableRipple","useTheme","range","ITEM_HEIGHT","startYear","endYear","years","YearPicker","selectedYear","selectingYear","onPressYear","theme","flatList","useRef","useEffect","current","indexToGo","scrollToOffset","offset","animated","absoluteFill","styles","root","backgroundColor","colors","surface","opacity1","opacity0","list","item","YearPure","year","selected","String","yearButton","
|
|
1
|
+
{"version":3,"sources":["YearPicker.tsx"],"names":["React","FlatList","StyleSheet","View","Text","TouchableRipple","useTheme","range","ITEM_HEIGHT","startYear","endYear","years","YearPicker","selectedYear","selectingYear","onPressYear","theme","flatList","useRef","useEffect","current","indexToGo","scrollToOffset","offset","animated","absoluteFill","styles","root","backgroundColor","colors","surface","opacity1","opacity0","list","item","YearPure","year","selected","String","yearButton","yearInner","primary","yearLabel","Year","memo","create","flex","top","zIndex","marginLeft","marginR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heet, View } from 'react-native'\nimport { Text, TouchableRipple, useTheme } from 'react-native-paper'\nimport { range } from '../utils'\n\nconst ITEM_HEIGHT = 62\n\nconst startYear = 1800\nconst endYear = 2200\nconst years = range(startYear, endYear)\n\nexport default function YearPicker({\n selectedYear,\n selectingYear,\n onPressYear,\n}: {\n selectedYear: number | undefined\n selectingYear: boolean\n onPressYear: (year: number) => any\n}) {\n const theme = useTheme()\n const flatList = React.useRef<FlatList<number> | null>(null)\n\n // scroll to selected year\n React.useEffect(() => {\n if (flatList.current && selectedYear) {\n const indexToGo = selectedYear - startYear\n flatList.current.scrollToOffset({\n offset: (indexToGo / 3) * ITEM_HEIGHT - ITEM_HEIGHT,\n animated: false,\n })\n }\n }, [flatList, selectedYear])\n\n return (\n <View\n style={[\n StyleSheet.absoluteFill,\n styles.root,\n { backgroundColor: theme.colors.surface },\n selectingYear ? styles.opacity1 : styles.opacity0,\n ]}\n pointerEvents={selectingYear ? 'auto' : 'none'}\n >\n <FlatList<number>\n ref={flatList}\n style={styles.list}\n data={years}\n renderItem={({ item }) => (\n <Year\n year={item}\n selected={selectedYear === item}\n onPressYear={onPressYear}\n />\n )}\n keyExtractor={(item) => `${item}`}\n numColumns={3}\n />\n </View>\n )\n}\n\nfunction YearPure({\n year,\n selected,\n onPressYear,\n}: {\n year: number\n selected: boolean\n onPressYear: (newYear: number) => any\n}) {\n const theme = useTheme()\n return (\n <View style={styles.year}>\n <TouchableRipple\n onPress={() => onPressYear(year)}\n accessibilityRole=\"button\"\n accessibilityLabel={String(year)}\n style={styles.yearButton}\n >\n <View\n style={[\n styles.yearInner,\n selected ? { backgroundColor: theme.colors.primary } : null,\n ]}\n >\n <Text\n style={[styles.yearLabel, selected ? styles.selectedYear : null]}\n selectable={false}\n >\n {year}\n </Text>\n </View>\n </TouchableRipple>\n </View>\n )\n}\nconst Year = React.memo(YearPure)\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n top: 56,\n zIndex: 100,\n },\n\n list: {\n flex: 1,\n },\n year: {\n flex: 1,\n marginLeft: 16,\n marginRight: 16,\n height: ITEM_HEIGHT,\n justifyContent: 'center',\n },\n selectedYear: { color: '#fff' },\n yearButton: {\n borderRadius: 46 / 2,\n overflow: 'hidden',\n },\n yearInner: {\n borderRadius: 46 / 2,\n height: 46,\n alignItems: 'center',\n justifyContent: 'center',\n },\n yearLabel: {\n fontSize: 16,\n },\n opacity0: {\n opacity: 0,\n },\n opacity1: {\n opacity: 1,\n },\n})\n"]}
|
|
@@ -45,7 +45,7 @@ export default function useDateInput(_ref) {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (!isWithinValidRange(finalDate)) {
|
|
48
|
-
let errors = validStart && validEnd ? [`${getTranslation(locale, 'mustBeBetween')
|
|
48
|
+
let errors = validStart && validEnd ? [`${getTranslation(locale, 'mustBeBetween', () => 'mustBeBetween')(formatter.format(validStart), formatter.format(validEnd))}`] : [validStart ? getTranslation(locale, 'mustBeHigherThan', () => 'mustBeHigherThan')(formatter.format(validStart)) : '', validEnd ? getTranslation(locale, 'mustBeLowerThan', () => 'mustBeLowerThan')(formatter.format(validEnd)) : ''];
|
|
49
49
|
setError(errors.filter(n => n).join(' '));
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["inputUtils.ts"],"names":["useInputFormat","useInputFormatter","useRangeChecker","React","getTranslation","useDateInput","locale","value","validRange","inputMode","onChange","isDisabled","isWithinValidRange","validStart","validEnd","error","setError","useState","formatter","inputFormat","formattedValue","format","onChangeText","date","dayIndex","indexOf","monthIndex","yearIndex","day","Number","slice","year","month","isNaN","finalDate","Date","errors","filter","n","join"],"mappings":"AAAA,SAASA,cAAT,EAAyBC,iBAAzB,EAA4CC,eAA5C,QAAmE,aAAnE;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AAEA,SAASC,cAAT,QAA+B,0BAA/B;AAEA,eAAe,SAASC,YAAT,OAYZ;AAAA,MAZkC;A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D,KAAb,CAA/C,EAAoE;AAClEhB,MAAAA,QAAQ,CACNZ,cAAc,CACZE,MADY,EAEZ,0BAFY,EAGZ,MAAM,0BAHM,CAAd,CAIEa,WAJF,CADM,CAAR;AAOA;AACD;;AAED,UAAMe,SAAS,GACbzB,SAAS,KAAK,KAAd,GACI,IAAI0B,IAAJ,CAASJ,IAAT,EAAeC,KAAK,GAAG,CAAvB,EAA0BJ,GAA1B,EAA+B,EAA/B,EAAmC,EAAnC,EAAuC,EAAvC,CADJ,GAEI,IAAIO,IAAJ,CAASJ,IAAT,EAAeC,KAAK,GAAG,CAAvB,EAA0BJ,GAA1B,CAHN;;AAKA,QAAIjB,UAAU,CAACuB,SAAD,CAAd,EAA2B;AACzBlB,MAAAA,QAAQ,CAACZ,cAAc,CAACE,MAAD,EAAS,gBAAT,CAAf,CAAR;AACA;AACD;;AACD,QAAI,CAACM,kBAAkB,CAACsB,SAAD,CAAvB,EAAoC;AAClC,UAAIE,MAAM,GACRvB,UAAU,IAAIC,QAAd,GACI,CACG,GAAEV,cAAc,
|
|
1
|
+
{"version":3,"sources":["inputUtils.ts"],"names":["useInputFormat","useInputFormatter","useRangeChecker","React","getTranslation","useDateInput","locale","value","validRange","inputMode","onChange","isDisabled","isWithinValidRange","validStart","validEnd","error","setError","useState","formatter","inputFormat","formattedValue","format","onChangeText","date","dayIndex","indexOf","monthIndex","yearIndex","day","Number","slice","year","month","isNaN","finalDate","Date","errors","filter","n","join"],"mappings":"AAAA,SAASA,cAAT,EAAyBC,iBAAzB,EAA4CC,eAA5C,QAAmE,aAAnE;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AAEA,SAASC,cAAT,QAA+B,0BAA/B;AAEA,eAAe,SAASC,YAAT,OAYZ;AAAA,MAZkC;AACnCC,IAAAA,MADmC;AAEnCC,IAAAA,KAFmC;AAGnCC,IAAAA,UAHmC;AAInCC,IAAAA,SAJmC;AAKnCC,IAAAA;AALmC,GAYlC;AACD,QAAM;AAAEC,IAA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,MAEO;AACLxB,MAAAA,QAAQ,CAACwB,SAAD,CAAR;AACD;AACF,GAjED;;AAkEA,SAAO;AACLxB,IAAAA,QADK;AAELK,IAAAA,KAFK;AAGLK,IAAAA,cAHK;AAILE,IAAAA,YAJK;AAKLH,IAAAA;AALK,GAAP;AAOD","sourcesContent":["import { useInputFormat, useInputFormatter, useRangeChecker } from './dateUtils'\nimport * as React from 'react'\nimport type { ValidRangeType } from './Calendar'\nimport { getTranslation } from 'react-native-paper-dates'\n\nexport default function useDateInput({\n locale,\n value,\n validRange,\n inputMode,\n onChange,\n}: {\n onChange: (d: Date) => void\n locale: undefined | string\n value: Date | undefined\n validRange: ValidRangeType | undefined\n inputMode: 'start' | 'end'\n}) {\n const { isDisabled, isWithinValidRange, validStart, validEnd } =\n useRangeChecker(validRange)\n const [error, setError] = React.useState<null | string>(null)\n const formatter = useInputFormatter({ locale })\n const inputFormat = useInputFormat({ formatter })\n const formattedValue = formatter.format(value)\n const onChangeText = (date: string) => {\n const dayIndex = inputFormat.indexOf('DD')\n const monthIndex = inputFormat.indexOf('MM')\n const yearIndex = inputFormat.indexOf('YYYY')\n\n const day = Number(date.slice(dayIndex, dayIndex + 2))\n const year = Number(date.slice(yearIndex, yearIndex + 4))\n const month = Number(date.slice(monthIndex, monthIndex + 2))\n\n if (Number.isNaN(day) || Number.isNaN(year) || Number.isNaN(month)) {\n setError(\n getTranslation(\n locale,\n 'notAccordingToDateFormat',\n () => 'notAccordingToDateFormat'\n )(inputFormat)\n )\n return\n }\n\n const finalDate =\n inputMode === 'end'\n ? new Date(year, month - 1, day, 23, 59, 59)\n : new Date(year, month - 1, day)\n\n if (isDisabled(finalDate)) {\n setError(getTranslation(locale, 'dateIsDisabled'))\n return\n }\n if (!isWithinValidRange(finalDate)) {\n let errors =\n validStart && validEnd\n ? [\n `${getTranslation(\n locale,\n 'mustBeBetween',\n () => 'mustBeBetween'\n )(formatter.format(validStart), formatter.format(validEnd))}`,\n ]\n : [\n validStart\n ? getTranslation(\n locale,\n 'mustBeHigherThan',\n () => 'mustBeHigherThan'\n )(formatter.format(validStart))\n : '',\n validEnd\n ? getTranslation(\n locale,\n 'mustBeLowerThan',\n () => 'mustBeLowerThan'\n )(formatter.format(validEnd))\n : '',\n ]\n setError(errors.filter((n) => n).join(' '))\n return\n }\n\n setError(null)\n if (inputMode === 'end') {\n onChange(finalDate)\n } else {\n onChange(finalDate)\n }\n }\n return {\n onChange,\n error,\n formattedValue,\n onChangeText,\n inputFormat,\n }\n}\n"]}
|
|
@@ -65,10 +65,7 @@ function TimeInput(_ref, ref) {
|
|
|
65
65
|
}],
|
|
66
66
|
rippleColor: Color(theme.colors.primary).fade(0.7).hex(),
|
|
67
67
|
onPress: () => onPress(clockType),
|
|
68
|
-
borderless: true
|
|
69
|
-
,
|
|
70
|
-
hasTVPreferredFocus: undefined,
|
|
71
|
-
tvParallaxProperties: undefined
|
|
68
|
+
borderless: true
|
|
72
69
|
}, /*#__PURE__*/React.createElement(View, null)) : null);
|
|
73
70
|
}
|
|
74
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TimeInput.tsx"],"names":["React","View","TextInput","StyleSheet","useTheme","TouchableRipple","Color","inputTypes","useInputColors","TimeInput","ref","value","clockType","pressed","onPress","onChanged","inputType","rest","controlledValue","setControlledValue","useState","onInnerChange","text","Number","useEffect","theme","inputFocused","setInputFocused","highlighted","picker","color","backgroundColor","formattedValue","length","styles","root","input","borderRadius","roundness","dark","absoluteFill","buttonOverlay","colors","primary","fade","hex","
|
|
1
|
+
{"version":3,"sources":["TimeInput.tsx"],"names":["React","View","TextInput","StyleSheet","useTheme","TouchableRipple","Color","inputTypes","useInputColors","TimeInput","ref","value","clockType","pressed","onPress","onChanged","inputType","rest","controlledValue","setControlledValue","useState","onInnerChange","text","Number","useEffect","theme","inputFocused","setInputFocused","highlighted","picker","color","backgroundColor","formattedValue","length","styles","root","input","borderRadius","roundness","dark","absoluteFill","buttonOverlay","colors","primary","fade","hex","create","position","height","width","fontSize","textAlign","textAlignVertical","overflow","forwardRef"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,SAAf,EAA0CC,UAA1C,QAA4D,cAA5D;AACA,SAASC,QAAT,EAAmBC,eAAnB,QAA0C,oBAA1C;AAEA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SACEC,UADF,EAIEC,cAJF,QAKO,aALP;;AAiBA,SAASC,SAAT,OAUEC,GAVF,EAWE;AAAA,MAVA;AACEC,IAAAA,KADF;AAEEC,IAAAA,SAFF;AAGEC,IAAAA,OAHF;AAIEC,IAAAA,OAJF;AAKEC,IAAAA,SALF;AAMEC,IAAAA,SANF;AAOE,OAAGC;AAPL,GAUA;AACA,QAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCnB,KAAK,CAACoB,QAAN,CAC3C,GAAET,KAAM,EADmC,CAA9C;;AAIA,QAAMU,aAAa,GAAIC,IAAD,IAAkB;AACtCH,IAAAA,kBAAkB,CAACG,IAAD,CAAlB;;AACA,QAAIA,IAAI,KAAK,EAAT,IAAeA,IAAI,KAAK,GAA5B,EAAiC;AAC/BP,MAAAA,SAAS,CAACQ,MAAM,CAACD,IAAD,CAAP,CAAT;AACD;AACF,GALD;;AAOAtB,EAAAA,KAAK,CAACwB,SAAN,CAAgB,MAAM;AACpBL,IAAAA,kBAAkB,CAAE,GAAER,KAAM,EAAV,CAAlB;AACD,GAFD,EAEG,CAACA,KAAD,CAFH;AAIA,QAAMc,KAAK,GAAGrB,QAAQ,EAAtB;AACA,QAAM,CAACsB,YAAD,EAAeC,eAAf,IAAkC3B,KAAK,CAACoB,QAAN,CAAwB,KAAxB,CAAxC;AAEA,QAAMQ,WAAW,GAAGZ,SAAS,KAAKT,UAAU,CAACsB,MAAzB,GAAkChB,OAAlC,GAA4Ca,YAAhE;AAEA,QAAM;AAAEI,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAA6BvB,cAAc,CAACoB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AaE,oBAAC,IAAD,OAbF,CADD,GAgBG,IApCN,CADF;AAwCD;;AAED,MAAMsB,MAAM,GAAG/B,UAAU,CAAC2C,MAAX,CAAkB;AAC/BX,EAAAA,IAAI,EAAE;AAAEY,IAAAA,QAAQ,EAAE,UAAZ;AAAwBC,IAAAA,MAAM,EAAE,EAAhC;AAAoCC,IAAAA,KAAK,EAAE;AAA3C,GADyB;AAE/Bb,EAAAA,KAAK,EAAE;AACLc,IAAAA,QAAQ,EAAE,EADL;AAELC,IAAAA,SAAS,EAAE,QAFN;AAGLC,IAAAA,iBAAiB,EAAE,QAHd;AAILH,IAAAA,KAAK,EAAE,EAJF;AAKLD,IAAAA,MAAM,EAAE;AALH,GAFwB;AAS/BP,EAAAA,aAAa,EAAE;AAAEY,IAAAA,QAAQ,EAAE;AAAZ;AATgB,CAAlB,CAAf;AAYA,4BAAerD,KAAK,CAACsD,UAAN,CAAiB7C,SAAjB,CAAf","sourcesContent":["import * as React from 'react'\nimport { View, TextInput, TextInputProps, StyleSheet } from 'react-native'\nimport { useTheme, TouchableRipple } from 'react-native-paper'\n\nimport Color from 'color'\nimport {\n inputTypes,\n PossibleClockTypes,\n PossibleInputTypes,\n useInputColors,\n} from './timeUtils'\n\ninterface TimeInputProps\n extends Omit<Omit<TextInputProps, 'value'>, 'onFocus'> {\n value: number\n clockType: PossibleClockTypes\n onPress?: (type: PossibleClockTypes) => any\n pressed: boolean\n onChanged: (n: number) => any\n inputType: PossibleInputTypes\n}\n\nfunction TimeInput(\n {\n value,\n clockType,\n pressed,\n onPress,\n onChanged,\n inputType,\n ...rest\n }: TimeInputProps,\n ref: any\n) {\n const [controlledValue, setControlledValue] = React.useState<string>(\n `${value}`\n )\n\n const onInnerChange = (text: string) => {\n setControlledValue(text)\n if (text !== '' && text !== '0') {\n onChanged(Number(text))\n }\n }\n\n React.useEffect(() => {\n setControlledValue(`${value}`)\n }, [value])\n\n const theme = useTheme()\n const [inputFocused, setInputFocused] = React.useState<boolean>(false)\n\n const highlighted = inputType === inputTypes.picker ? pressed : inputFocused\n\n const { color, backgroundColor } = useInputColors(highlighted)\n\n let formattedValue = controlledValue\n if (!inputFocused) {\n formattedValue =\n controlledValue.length === 1\n ? `0${controlledValue}`\n : `${controlledValue}`\n }\n\n return (\n <View style={styles.root}>\n <TextInput\n ref={ref}\n style={[\n styles.input,\n {\n color,\n backgroundColor,\n borderRadius: theme.roundness,\n },\n ]}\n value={formattedValue}\n maxLength={2}\n onFocus={() => setInputFocused(true)}\n onBlur={() => setInputFocused(false)}\n keyboardAppearance={theme.dark ? 'dark' : 'default'}\n keyboardType=\"number-pad\"\n onChangeText={onInnerChange}\n {...rest}\n />\n {onPress && inputType === inputTypes.picker ? (\n <TouchableRipple\n style={[\n StyleSheet.absoluteFill,\n styles.buttonOverlay,\n {\n // backgroundColor: 'blue',\n borderRadius: theme.roundness,\n },\n ]}\n rippleColor={Color(theme.colors.primary).fade(0.7).hex()}\n onPress={() => onPress(clockType)}\n borderless={true}\n >\n <View />\n </TouchableRipple>\n ) : null}\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n root: { position: 'relative', height: 80, width: 96 },\n input: {\n fontSize: 50,\n textAlign: 'center',\n textAlignVertical: 'center',\n width: 96,\n height: 80,\n },\n buttonOverlay: { overflow: 'hidden' },\n})\n\nexport default React.forwardRef(TimeInput)\n"]}
|
|
@@ -87,10 +87,7 @@ export function TimePickerModal(_ref) {
|
|
|
87
87
|
onPress: () => setInputType(reverseInputTypes[inputType]),
|
|
88
88
|
size: 24,
|
|
89
89
|
style: styles.inputTypeToggle,
|
|
90
|
-
accessibilityLabel: "toggle keyboard"
|
|
91
|
-
,
|
|
92
|
-
hasTVPreferredFocus: undefined,
|
|
93
|
-
tvParallaxProperties: undefined
|
|
90
|
+
accessibilityLabel: "toggle keyboard"
|
|
94
91
|
}), /*#__PURE__*/React.createElement(View, {
|
|
95
92
|
style: styles.fill
|
|
96
93
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TimePickerModal.tsx"],"names":["React","Modal","StyleSheet","View","Text","Animated","TouchableWithoutFeedback","KeyboardAvoidingView","Button","IconButton","overlay","useTheme","TimePicker","clockTypes","inputTypeIcons","inputTypes","reverseInputTypes","supportedOrientations","TimePickerModal","visible","onDismiss","onConfirm","hours","minutes","label","uppercase","cancelLabel","confirmLabel","animationType","locale","theme","inputType","setInputType","useState","picker","focused","setFocused","localHours","setLocalHours","getHours","localMinutes","setLocalMinutes","getMinutes","useEffect","onFocusInput","useCallback","type","onChange","params","absoluteFill","styles","modalBackground","backgroundColor","colors","backdrop","modalRoot","keyboardView","modalContent","dark","surface","borderRadius","roundness","labelContainer","color","text","toUpperCase","timePickerContainer","bottom","inputTypeToggle","undefined","fill","Date","create","justifyContent","alignItems","flex","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","minWidth","paddingLeft","paddingRight","letterSpacing","fontSize","padding","flexDirection","margin","memo"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,KADF,EAEEC,UAFF,EAGEC,IAHF,EAIEC,IAJF,EAKEC,QALF,EAMEC,wBANF,EAOEC,oBAPF,QAQO,cARP;AAUA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,OAA7B,EAAsCC,QAAtC,QAAsD,oBAAtD;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SACEC,UADF,EAEEC,cAFF,EAGEC,UAHF,EAMEC,iBANF,QAOO,aAPP;AASA,MAAMC,qBAA4B,GAAG,CACnC,UADmC,EAEnC,sBAFmC,EAGnC,WAHmC,EAInC,gBAJmC,EAKnC,iBALmC,CAArC;AAQA,OAAO,SAASC,eAAT,OAwBJ;AAAA,MAxB6B;AAC9BC,IAAAA,OAD8B;AAE9BC,IAAAA,SAF8B;AAG9BC,IAAAA,SAH8B;AAI9BC,IAAAA,KAJ8B;AAK9BC,IAAAA,OAL8B;AAM9BC,IAAAA,KA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,cAAc,EAAE;AACdiB,IAAAA,MAAM,EAAE,EADM;AAEdN,IAAAA,cAAc,EAAE,UAFF;AAGdW,IAAAA,WAAW,EAAE,EAHC;AAIdC,IAAAA,YAAY,EAAE;AAJA,GAzBe;AA+B/B7D,EAAAA,KAAK,EAAE;AACL8D,IAAAA,aAAa,EAAE,CADV;AAELC,IAAAA,QAAQ,EAAE;AAFL,GA/BwB;AAmC/BrB,EAAAA,mBAAmB,EAAE;AAAEsB,IAAAA,OAAO,EAAE;AAAX,GAnCU;AAoC/BrB,EAAAA,MAAM,EAAE;AACNsB,IAAAA,aAAa,EAAE,KADT;AAENf,IAAAA,UAAU,EAAE,QAFN;AAGNc,IAAAA,OAAO,EAAE;AAHH,GApCuB;AAyC/BpB,EAAAA,eAAe,EAAE;AAAEsB,IAAAA,MAAM,EAAE;AAAV,GAzCc;AA0C/BpB,EAAAA,IAAI,EAAE;AAAEK,IAAAA,IAAI,EAAE;AAAR;AA1CyB,CAAlB,CAAf;AA6CA,4BAAe3E,KAAK,CAAC2F,IAAN,CAAWzE,eAAX,CAAf","sourcesContent":["import * as React from 'react'\nimport {\n Modal,\n StyleSheet,\n View,\n Text,\n Animated,\n TouchableWithoutFeedback,\n KeyboardAvoidingView,\n} from 'react-native'\n\nimport { Button, IconButton, overlay, useTheme } from 'react-native-paper'\nimport TimePicker from './TimePicker'\nimport {\n clockTypes,\n inputTypeIcons,\n inputTypes,\n PossibleClockTypes,\n PossibleInputTypes,\n reverseInputTypes,\n} from './timeUtils'\n\nconst supportedOrientations: any[] = [\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n]\n\nexport function TimePickerModal({\n visible,\n onDismiss,\n onConfirm,\n hours,\n minutes,\n label = 'Select time',\n uppercase = true,\n cancelLabel = 'Cancel',\n confirmLabel = 'Ok',\n animationType = 'none',\n locale,\n}: {\n locale?: undefined | string\n label?: string\n uppercase?: boolean\n cancelLabel?: string\n confirmLabel?: string\n hours?: number | undefined\n minutes?: number | undefined\n visible: boolean | undefined\n onDismiss: () => any\n onConfirm: (hoursAndMinutes: { hours: number; minutes: number }) => any\n animationType?: 'slide' | 'fade' | 'none'\n}) {\n const theme = useTheme()\n\n const [inputType, setInputType] = React.useState<PossibleInputTypes>(\n inputTypes.picker\n )\n const [focused, setFocused] = React.useState<PossibleClockTypes>(\n clockTypes.hours\n )\n const [localHours, setLocalHours] = React.useState<number>(getHours(hours))\n const [localMinutes, setLocalMinutes] = React.useState<number>(\n getMinutes(minutes)\n )\n\n React.useEffect(() => {\n setLocalHours(getHours(hours))\n }, [setLocalHours, hours])\n\n React.useEffect(() => {\n setLocalMinutes(getMinutes(minutes))\n }, [setLocalMinutes, minutes])\n\n const onFocusInput = React.useCallback(\n (type: PossibleClockTypes) => setFocused(type),\n []\n )\n const onChange = React.useCallback(\n (params: {\n focused?: PossibleClockTypes | undefined\n hours: number\n minutes: number\n }) => {\n if (params.focused) {\n setFocused(params.focused)\n }\n\n setLocalHours(params.hours)\n setLocalMinutes(params.minutes)\n },\n [setFocused, setLocalHours, setLocalMinutes]\n )\n return (\n <Modal\n animationType={animationType}\n transparent={true}\n visible={visible}\n onRequestClose={onDismiss}\n presentationStyle=\"overFullScreen\"\n supportedOrientations={supportedOrientations}\n //@ts-ignore\n statusBarTranslucent={true}\n >\n <>\n <TouchableWithoutFeedback onPress={onDismiss}>\n <View\n style={[\n StyleSheet.absoluteFill,\n styles.modalBackground,\n { backgroundColor: theme.colors.backdrop },\n ]}\n />\n </TouchableWithoutFeedback>\n\n <View\n style={[StyleSheet.absoluteFill, styles.modalRoot]}\n pointerEvents=\"box-none\"\n >\n <KeyboardAvoidingView\n style={styles.keyboardView}\n behavior={'padding'}\n >\n <Animated.View\n style={[\n styles.modalContent,\n {\n backgroundColor: theme.dark\n ? overlay(10, theme.colors.surface)\n : theme.colors.surface,\n borderRadius: theme.roundness,\n },\n ]}\n >\n <View style={styles.labelContainer}>\n <Text style={[styles.label, { color: theme.colors.text }]}>\n {uppercase ? label.toUpperCase() : label}\n </Text>\n </View>\n <View style={styles.timePickerContainer}>\n <TimePicker\n locale={locale}\n inputType={inputType}\n focused={focused}\n hours={localHours}\n minutes={localMinutes}\n onChange={onChange}\n onFocusInput={onFocusInput}\n />\n </View>\n <View style={styles.bottom}>\n <IconButton\n icon={inputTypeIcons[reverseInputTypes[inputType]]}\n onPress={() => setInputType(reverseInputTypes[inputType])}\n size={24}\n style={styles.inputTypeToggle}\n accessibilityLabel=\"toggle keyboard\"\n // RN types bug\n hasTVPreferredFocus={undefined}\n tvParallaxProperties={undefined}\n />\n <View style={styles.fill} />\n <Button onPress={onDismiss} uppercase={uppercase}>\n {cancelLabel}\n </Button>\n <Button\n onPress={() =>\n onConfirm({ hours: localHours, minutes: localMinutes })\n }\n uppercase={uppercase}\n >\n {confirmLabel}\n </Button>\n </View>\n </Animated.View>\n </KeyboardAvoidingView>\n </View>\n </>\n </Modal>\n )\n}\n\nfunction getMinutes(minutes: number | undefined | null): number {\n return minutes === undefined || minutes === null\n ? new Date().getMinutes()\n : minutes\n}\nfunction getHours(hours: number | undefined | null): number {\n return hours === undefined || hours === null ? new Date().getHours() : hours\n}\n\nconst styles = StyleSheet.create({\n modalRoot: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n keyboardView: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n modalBackground: {\n flex: 1,\n },\n modalContent: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 5,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n elevation: 10,\n minWidth: 287,\n },\n labelContainer: {\n height: 28,\n justifyContent: 'flex-end',\n paddingLeft: 24,\n paddingRight: 24,\n },\n label: {\n letterSpacing: 1,\n fontSize: 13,\n },\n timePickerContainer: { padding: 24 },\n bottom: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n inputTypeToggle: { margin: 4 },\n fill: { flex: 1 },\n})\n\nexport default React.memo(TimePickerModal)\n"]}
|
|
1
|
+
{"version":3,"sources":["TimePickerModal.tsx"],"names":["React","Modal","StyleSheet","View","Text","Animated","TouchableWithoutFeedback","KeyboardAvoidingView","Button","IconButton","overlay","useTheme","TimePicker","clockTypes","inputTypeIcons","inputTypes","reverseInputTypes","supportedOrientations","TimePickerModal","visible","onDismiss","onConfirm","hours","minutes","label","uppercase","cancelLabel","confirmLabel","animationType","locale","theme","inputType","setInputType","useState","picker","focused","setFocused","localHours","setLocalHours","getHours","localMinutes","setLocalMinutes","getMinutes","useEffect","onFocusInput","useCallback","type","onChange","params","absoluteFill","styles","modalBackground","backgroundColor","colors","backdrop","modalRoot","keyboardView","modalContent","dark","surface","borderRadius","roundness","labelContainer","color","text","toUpperCase","timePickerContainer","bottom","inputTypeToggle","fill","undefined","Date","create","justifyContent","alignItems","flex","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","minWidth","paddingLeft","paddingRight","letterSpacing","fontSize","padding","flexDirection","margin","memo"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,KADF,EAEEC,UAFF,EAGEC,IAHF,EAIEC,IAJF,EAKEC,QALF,EAMEC,wBANF,EAOEC,oBAPF,QAQO,cARP;AAUA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,OAA7B,EAAsCC,QAAtC,QAAsD,oBAAtD;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SACEC,UADF,EAEEC,cAFF,EAGEC,UAHF,EAMEC,iBANF,QAOO,aAPP;AASA,MAAMC,qBAA4B,GAAG,CACnC,UADmC,EAEnC,sBAFmC,EAGnC,WAHmC,EAInC,gBAJmC,EAKnC,iBALmC,CAArC;AAQA,OAAO,SAASC,eAAT,OAwBJ;AAAA,MAxB6B;AAC9BC,IAAAA,OAD8B;AAE9BC,IAAAA,SAF8B;AAG9BC,IAAAA,SAH8B;AAI9BC,IAAAA,KAJ8B;AAK9BC,IAAAA,OAL8B;AAM9BC,IAAAA,KAA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IAAAA,WAAW,EAAE,EAHC;AAIdC,IAAAA,YAAY,EAAE;AAJA,GAzBe;AA+B/B7D,EAAAA,KAAK,EAAE;AACL8D,IAAAA,aAAa,EAAE,CADV;AAELC,IAAAA,QAAQ,EAAE;AAFL,GA/BwB;AAmC/BrB,EAAAA,mBAAmB,EAAE;AAAEsB,IAAAA,OAAO,EAAE;AAAX,GAnCU;AAoC/BrB,EAAAA,MAAM,EAAE;AACNsB,IAAAA,aAAa,EAAE,KADT;AAENf,IAAAA,UAAU,EAAE,QAFN;AAGNc,IAAAA,OAAO,EAAE;AAHH,GApCuB;AAyC/BpB,EAAAA,eAAe,EAAE;AAAEsB,IAAAA,MAAM,EAAE;AAAV,GAzCc;AA0C/BrB,EAAAA,IAAI,EAAE;AAAEM,IAAAA,IAAI,EAAE;AAAR;AA1CyB,CAAlB,CAAf;AA6CA,4BAAe3E,KAAK,CAAC2F,IAAN,CAAWzE,eAAX,CAAf","sourcesContent":["import * as React from 'react'\nimport {\n Modal,\n StyleSheet,\n View,\n Text,\n Animated,\n TouchableWithoutFeedback,\n KeyboardAvoidingView,\n} from 'react-native'\n\nimport { Button, IconButton, overlay, useTheme } from 'react-native-paper'\nimport TimePicker from './TimePicker'\nimport {\n clockTypes,\n inputTypeIcons,\n inputTypes,\n PossibleClockTypes,\n PossibleInputTypes,\n reverseInputTypes,\n} from './timeUtils'\n\nconst supportedOrientations: any[] = [\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n]\n\nexport function TimePickerModal({\n visible,\n onDismiss,\n onConfirm,\n hours,\n minutes,\n label = 'Select time',\n uppercase = true,\n cancelLabel = 'Cancel',\n confirmLabel = 'Ok',\n animationType = 'none',\n locale,\n}: {\n locale?: undefined | string\n label?: string\n uppercase?: boolean\n cancelLabel?: string\n confirmLabel?: string\n hours?: number | undefined\n minutes?: number | undefined\n visible: boolean | undefined\n onDismiss: () => any\n onConfirm: (hoursAndMinutes: { hours: number; minutes: number }) => any\n animationType?: 'slide' | 'fade' | 'none'\n}) {\n const theme = useTheme()\n\n const [inputType, setInputType] = React.useState<PossibleInputTypes>(\n inputTypes.picker\n )\n const [focused, setFocused] = React.useState<PossibleClockTypes>(\n clockTypes.hours\n )\n const [localHours, setLocalHours] = React.useState<number>(getHours(hours))\n const [localMinutes, setLocalMinutes] = React.useState<number>(\n getMinutes(minutes)\n )\n\n React.useEffect(() => {\n setLocalHours(getHours(hours))\n }, [setLocalHours, hours])\n\n React.useEffect(() => {\n setLocalMinutes(getMinutes(minutes))\n }, [setLocalMinutes, minutes])\n\n const onFocusInput = React.useCallback(\n (type: PossibleClockTypes) => setFocused(type),\n []\n )\n const onChange = React.useCallback(\n (params: {\n focused?: PossibleClockTypes | undefined\n hours: number\n minutes: number\n }) => {\n if (params.focused) {\n setFocused(params.focused)\n }\n\n setLocalHours(params.hours)\n setLocalMinutes(params.minutes)\n },\n [setFocused, setLocalHours, setLocalMinutes]\n )\n return (\n <Modal\n animationType={animationType}\n transparent={true}\n visible={visible}\n onRequestClose={onDismiss}\n presentationStyle=\"overFullScreen\"\n supportedOrientations={supportedOrientations}\n //@ts-ignore\n statusBarTranslucent={true}\n >\n <>\n <TouchableWithoutFeedback onPress={onDismiss}>\n <View\n style={[\n StyleSheet.absoluteFill,\n styles.modalBackground,\n { backgroundColor: theme.colors.backdrop },\n ]}\n />\n </TouchableWithoutFeedback>\n\n <View\n style={[StyleSheet.absoluteFill, styles.modalRoot]}\n pointerEvents=\"box-none\"\n >\n <KeyboardAvoidingView\n style={styles.keyboardView}\n behavior={'padding'}\n >\n <Animated.View\n style={[\n styles.modalContent,\n {\n backgroundColor: theme.dark\n ? overlay(10, theme.colors.surface)\n : theme.colors.surface,\n borderRadius: theme.roundness,\n },\n ]}\n >\n <View style={styles.labelContainer}>\n <Text style={[styles.label, { color: theme.colors.text }]}>\n {uppercase ? label.toUpperCase() : label}\n </Text>\n </View>\n <View style={styles.timePickerContainer}>\n <TimePicker\n locale={locale}\n inputType={inputType}\n focused={focused}\n hours={localHours}\n minutes={localMinutes}\n onChange={onChange}\n onFocusInput={onFocusInput}\n />\n </View>\n <View style={styles.bottom}>\n <IconButton\n icon={inputTypeIcons[reverseInputTypes[inputType]]}\n onPress={() => setInputType(reverseInputTypes[inputType])}\n size={24}\n style={styles.inputTypeToggle}\n accessibilityLabel=\"toggle keyboard\"\n />\n <View style={styles.fill} />\n <Button onPress={onDismiss} uppercase={uppercase}>\n {cancelLabel}\n </Button>\n <Button\n onPress={() =>\n onConfirm({ hours: localHours, minutes: localMinutes })\n }\n uppercase={uppercase}\n >\n {confirmLabel}\n </Button>\n </View>\n </Animated.View>\n </KeyboardAvoidingView>\n </View>\n </>\n </Modal>\n )\n}\n\nfunction getMinutes(minutes: number | undefined | null): number {\n return minutes === undefined || minutes === null\n ? new Date().getMinutes()\n : minutes\n}\nfunction getHours(hours: number | undefined | null): number {\n return hours === undefined || hours === null ? new Date().getHours() : hours\n}\n\nconst styles = StyleSheet.create({\n modalRoot: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n keyboardView: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n modalBackground: {\n flex: 1,\n },\n modalContent: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 5,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n elevation: 10,\n minWidth: 287,\n },\n labelContainer: {\n height: 28,\n justifyContent: 'flex-end',\n paddingLeft: 24,\n paddingRight: 24,\n },\n label: {\n letterSpacing: 1,\n fontSize: 13,\n },\n timePickerContainer: { padding: 24 },\n bottom: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n inputTypeToggle: { margin: 4 },\n fill: { flex: 1 },\n})\n\nexport default React.memo(TimePickerModal)\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const de = {
|
|
2
|
+
save: 'Speichern',
|
|
3
|
+
selectSingle: 'Wähle Datum',
|
|
4
|
+
selectMultiple: 'Wähle Daten',
|
|
5
|
+
selectRange: 'Wähle Zeitspanne',
|
|
6
|
+
notAccordingToDateFormat: inputFormat => `Das Format sollte ${inputFormat} sein`,
|
|
7
|
+
mustBeHigherThan: date => `Muss nach dem ${date} sein`,
|
|
8
|
+
mustBeLowerThan: date => `Muss vor dem ${date} sein`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Muss in dieser Zeitspanne liegen ${startDate} - ${endDate}`,
|
|
10
|
+
dateIsDisabled: 'Datum nicht wählbar',
|
|
11
|
+
previous: 'Vorheriges',
|
|
12
|
+
next: 'Nächstes',
|
|
13
|
+
typeInDate: 'Datum eingeben',
|
|
14
|
+
pickDateFromCalendar: 'Datum vom Kalender auswählen',
|
|
15
|
+
close: 'Schliessen'
|
|
16
|
+
};
|
|
17
|
+
export default de;
|
|
18
|
+
//# sourceMappingURL=de.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["de.ts"],"names":["de","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":"AACA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,WADqB;AAE3BC,EAAAA,YAAY,EAAE,aAFa;AAG3BC,EAAAA,cAAc,EAAE,aAHW;AAI3BC,EAAAA,WAAW,EAAE,kBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,qBAAoBA,WAAY,OANR;AAO3BC,EAAAA,gBAAgB,EAAGC,IAAD,IAAW,iBAAgBA,IAAK,OAPvB;AAQ3BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,gBAAeA,IAAK,OARrB;AAS3BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,oCAAmCD,SAAU,MAAKC,OAAQ,EAVlC;AAW3BC,EAAAA,cAAc,EAAE,qBAXW;AAY3BC,EAAAA,QAAQ,EAAE,YAZiB;AAa3BC,EAAAA,IAAI,EAAE,UAbqB;AAc3BC,EAAAA,UAAU,EAAE,gBAde;AAe3BC,EAAAA,oBAAoB,EAAE,8BAfK;AAgB3BC,EAAAA,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf","sourcesContent":["import type { TranslationsType } from './utils'\nconst de: TranslationsType = {\n save: 'Speichern',\n selectSingle: 'Wähle Datum',\n selectMultiple: 'Wähle Daten',\n selectRange: 'Wähle Zeitspanne',\n notAccordingToDateFormat: (inputFormat) =>\n `Das Format sollte ${inputFormat} sein`,\n mustBeHigherThan: (date) => `Muss nach dem ${date} sein`,\n mustBeLowerThan: (date) => `Muss vor dem ${date} sein`,\n mustBeBetween: (startDate, endDate) =>\n `Muss in dieser Zeitspanne liegen ${startDate} - ${endDate}`,\n dateIsDisabled: 'Datum nicht wählbar',\n previous: 'Vorheriges',\n next: 'Nächstes',\n typeInDate: 'Datum eingeben',\n pickDateFromCalendar: 'Datum vom Kalender auswählen',\n close: 'Schliessen',\n}\nexport default de\n"]}
|
|
@@ -4,9 +4,9 @@ const en = {
|
|
|
4
4
|
selectMultiple: 'Select dates',
|
|
5
5
|
selectRange: 'Select period',
|
|
6
6
|
notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
|
|
7
|
-
mustBeHigherThan:
|
|
8
|
-
mustBeLowerThan:
|
|
9
|
-
mustBeBetween:
|
|
7
|
+
mustBeHigherThan: date => `Must be later then ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `Must be earlier then ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Must be between ${startDate} - ${endDate}`,
|
|
10
10
|
dateIsDisabled: 'Day is not allowed',
|
|
11
11
|
previous: 'Previous',
|
|
12
12
|
next: 'Next',
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"sources":["en.ts"],"names":["en","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","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,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP5B;AAQ3BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,wBAAuBA,IAAK,EAR7B;AAS3BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,mBAAkBD,SAAU,MAAKC,OAAQ,EAVjB;AAW3BC,EAAAA,cAAc,EAAE,oBAXW;AAY3BC,EAAAA,QAAQ,EAAE,UAZiB;AAa3BC,EAAAA,IAAI,EAAE,MAbqB;AAc3BC,EAAAA,UAAU,EAAE,cAde;AAe3BC,EAAAA,oBAAoB,EAAE,yBAfK;AAgB3BC,EAAAA,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf","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) =>\n `Date format must be ${inputFormat}`,\n mustBeHigherThan: (date) => `Must be later then ${date}`,\n mustBeLowerThan: (date) => `Must be earlier then ${date}`,\n mustBeBetween: (startDate, endDate) =>\n `Must be between ${startDate} - ${endDate}`,\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"]}
|
|
@@ -4,9 +4,9 @@ const enGB = {
|
|
|
4
4
|
selectMultiple: 'Select dates',
|
|
5
5
|
selectRange: 'Select period',
|
|
6
6
|
notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
|
|
7
|
-
mustBeHigherThan:
|
|
8
|
-
mustBeLowerThan:
|
|
9
|
-
mustBeBetween:
|
|
7
|
+
mustBeHigherThan: date => `Must be later then ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `Must be earlier then ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Must be between ${startDate} - ${endDate}`,
|
|
10
10
|
dateIsDisabled: 'Day is not allowed',
|
|
11
11
|
previous: 'Previous',
|
|
12
12
|
next: 'Next',
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"sources":["enGB.ts"],"names":["enGB","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","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,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP1B;AAQ7BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,wBAAuBA,IAAK,EAR3B;AAS7BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,mBAAkBD,SAAU,MAAKC,OAAQ,EAVf;AAW7BC,EAAAA,cAAc,EAAE,oBAXa;AAY7BC,EAAAA,QAAQ,EAAE,UAZmB;AAa7BC,EAAAA,IAAI,EAAE,MAbuB;AAc7BC,EAAAA,UAAU,EAAE,cAdiB;AAe7BC,EAAAA,oBAAoB,EAAE,yBAfO;AAgB7BC,EAAAA,KAAK,EAAE;AAhBsB,CAA/B;AAkBA,eAAelB,IAAf","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) =>\n `Date format must be ${inputFormat}`,\n mustBeHigherThan: (date) => `Must be later then ${date}`,\n mustBeLowerThan: (date) => `Must be earlier then ${date}`,\n mustBeBetween: (startDate, endDate) =>\n `Must be between ${startDate} - ${endDate}`,\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"]}
|
|
@@ -4,9 +4,9 @@ const nl = {
|
|
|
4
4
|
selectMultiple: 'Selecteer datums',
|
|
5
5
|
selectRange: 'Selecteer periode',
|
|
6
6
|
notAccordingToDateFormat: inputFormat => `Datumformaat moet ${inputFormat} zijn`,
|
|
7
|
-
mustBeHigherThan:
|
|
8
|
-
mustBeLowerThan:
|
|
9
|
-
mustBeBetween:
|
|
7
|
+
mustBeHigherThan: date => `Moet later dan ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `Moet eerder dan ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Moet tussen ${startDate} - ${endDate}`,
|
|
10
10
|
dateIsDisabled: 'Deze dag mag niet',
|
|
11
11
|
previous: 'Vorige',
|
|
12
12
|
next: 'Volgende',
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"sources":["nl.ts"],"names":["nl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","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,EAAGC,IAAD,IAAW,kBAAiBA,IAAK,EAPxB;AAQ3BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,mBAAkBA,IAAK,EARxB;AAS3BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,eAAcD,SAAU,MAAKC,OAAQ,EAVb;AAW3BC,EAAAA,cAAc,EAAE,mBAXW;AAY3BC,EAAAA,QAAQ,EAAE,QAZiB;AAa3BC,EAAAA,IAAI,EAAE,UAbqB;AAc3BC,EAAAA,UAAU,EAAE,WAde;AAe3BC,EAAAA,oBAAoB,EAAE,yBAfK;AAgB3BC,EAAAA,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf","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"]}
|
|
@@ -4,9 +4,9 @@ const pl = {
|
|
|
4
4
|
selectMultiple: 'Wybierz daty',
|
|
5
5
|
selectRange: 'Wybierz zakres',
|
|
6
6
|
notAccordingToDateFormat: inputFormat => `Data musi mieć format ${inputFormat}`,
|
|
7
|
-
mustBeHigherThan:
|
|
8
|
-
mustBeLowerThan:
|
|
9
|
-
mustBeBetween:
|
|
7
|
+
mustBeHigherThan: date => `Nie wcześniej niżn ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `Nie później niż ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Pomiędzy ${startDate} - ${endDate}`,
|
|
10
10
|
dateIsDisabled: 'Niedozwolona data',
|
|
11
11
|
previous: 'Poprzedni',
|
|
12
12
|
next: 'Dalej',
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"sources":["pl.ts"],"names":["pl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","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,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP5B;AAQ3BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,mBAAkBA,IAAK,EARxB;AAS3BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KAAyB,YAAWD,SAAU,MAAKC,OAAQ,EAT/C;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;AAkBA,eAAelB,EAAf","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"]}
|
|
@@ -4,9 +4,9 @@ const pt = {
|
|
|
4
4
|
selectMultiple: 'Selecione as datas',
|
|
5
5
|
selectRange: 'Selecione o período',
|
|
6
6
|
notAccordingToDateFormat: inputFormat => `O formato da data deve ser ${inputFormat}`,
|
|
7
|
-
mustBeHigherThan:
|
|
8
|
-
mustBeLowerThan:
|
|
9
|
-
mustBeBetween:
|
|
7
|
+
mustBeHigherThan: date => `Deve ser depois de ${date}`,
|
|
8
|
+
mustBeLowerThan: date => `Deve ser antes de ${date}`,
|
|
9
|
+
mustBeBetween: (startDate, endDate) => `Deve estar entre ${startDate} - ${endDate}`,
|
|
10
10
|
dateIsDisabled: 'Data não é permitida',
|
|
11
11
|
previous: 'Anterior',
|
|
12
12
|
next: 'Próximo',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["pt.ts"],"names":["pt","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,kBAFa;AAG3BC,EAAAA,cAAc,EAAE,oBAHW;AAI3BC,EAAAA,WAAW,EAAE,qBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,8BAA6BA,WAAY,EANjB;AAO3BC,EAAAA,gBAAgB,
|
|
1
|
+
{"version":3,"sources":["pt.ts"],"names":["pt","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","date","mustBeLowerThan","mustBeBetween","startDate","endDate","dateIsDisabled","previous","next","typeInDate","pickDateFromCalendar","close"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,QADqB;AAE3BC,EAAAA,YAAY,EAAE,kBAFa;AAG3BC,EAAAA,cAAc,EAAE,oBAHW;AAI3BC,EAAAA,WAAW,EAAE,qBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,8BAA6BA,WAAY,EANjB;AAO3BC,EAAAA,gBAAgB,EAAGC,IAAD,IAAW,sBAAqBA,IAAK,EAP5B;AAQ3BC,EAAAA,eAAe,EAAGD,IAAD,IAAW,qBAAoBA,IAAK,EAR1B;AAS3BE,EAAAA,aAAa,EAAE,CAACC,SAAD,EAAYC,OAAZ,KACZ,oBAAmBD,SAAU,MAAKC,OAAQ,EAVlB;AAW3BC,EAAAA,cAAc,EAAE,sBAXW;AAY3BC,EAAAA,QAAQ,EAAE,UAZiB;AAa3BC,EAAAA,IAAI,EAAE,SAbqB;AAc3BC,EAAAA,UAAU,EAAE,eAde;AAe3BC,EAAAA,oBAAoB,EAAE,8BAfK;AAgB3BC,EAAAA,KAAK,EAAE;AAhBoB,CAA7B;AAkBA,eAAelB,EAAf","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"]}
|
|
@@ -1 +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;AAEA,OAAO,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;AAED,OAAO,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:
|
|
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;AAEA,OAAO,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;AAED,OAAO,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: (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 (!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"]}
|
|
@@ -8,11 +8,11 @@ declare const _default: React.ForwardRefExoticComponent<Pick<{
|
|
|
8
8
|
validRange?: ValidRangeType | undefined;
|
|
9
9
|
withModal?: boolean | undefined;
|
|
10
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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
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
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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
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
14
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
15
15
|
} & {
|
|
16
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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
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>>;
|
|
18
18
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<((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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<((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"> & {
|
|
3
3
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
4
|
-
}) | (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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
4
|
+
}) | (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"> & {
|
|
5
5
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
6
6
|
} & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
})) & {
|
|
9
9
|
mask: string;
|
|
10
|
-
}, "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" | "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" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "
|
|
10
|
+
}, "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" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "mask" | "theme"> & React.RefAttributes<unknown>>;
|
|
11
11
|
export default _default;
|
|
@@ -4,9 +4,9 @@ export declare type TranslationsType = {
|
|
|
4
4
|
selectRange: string;
|
|
5
5
|
save: string;
|
|
6
6
|
notAccordingToDateFormat: (inputFormat: string) => string;
|
|
7
|
-
mustBeHigherThan: string;
|
|
8
|
-
mustBeLowerThan: string;
|
|
9
|
-
mustBeBetween: string;
|
|
7
|
+
mustBeHigherThan: (date: string) => string;
|
|
8
|
+
mustBeLowerThan: (date: string) => string;
|
|
9
|
+
mustBeBetween: (startDate: string, endDate: string) => string;
|
|
10
10
|
dateIsDisabled: string;
|
|
11
11
|
previous: string;
|
|
12
12
|
next: string;
|
|
@@ -14,5 +14,5 @@ export declare type TranslationsType = {
|
|
|
14
14
|
pickDateFromCalendar: string;
|
|
15
15
|
close: string;
|
|
16
16
|
};
|
|
17
|
-
export declare function getTranslation(locale: string | undefined, key:
|
|
17
|
+
export declare function getTranslation<K extends keyof TranslationsType>(locale: string | undefined, key: K, fallback?: any): any;
|
|
18
18
|
export declare function registerTranslation(locale: string, translations: TranslationsType): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-paper-dates",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Performant Date Picker for React Native Paper",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -54,10 +54,12 @@
|
|
|
54
54
|
"@types/jest": "^26.0.24",
|
|
55
55
|
"@types/react": "^16.14.20",
|
|
56
56
|
"@types/react-native": "^0.66.1",
|
|
57
|
+
"babel-loader": "^8.2.3",
|
|
57
58
|
"commitlint": "^11.0.0",
|
|
58
59
|
"eslint": "^7.32.0",
|
|
59
60
|
"eslint-config-prettier": "^8.3.0",
|
|
60
61
|
"eslint-plugin-prettier": "^4.0.0",
|
|
62
|
+
"expo-cli": "^5.0.3",
|
|
61
63
|
"husky": "^4.2.5",
|
|
62
64
|
"jest": "^26.0.1",
|
|
63
65
|
"pod-install": "^0.1.28",
|