react-native-paper-dates 0.8.0 → 0.8.4
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 +19 -5
- package/lib/commonjs/Date/CalendarEdit.js +7 -7
- 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/index.js +19 -1
- package/lib/commonjs/index.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 +25 -0
- package/lib/commonjs/translations/pt.js.map +1 -0
- package/lib/commonjs/translations/utils.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +7 -7
- 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/index.js +2 -0
- package/lib/module/index.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 +18 -0
- package/lib/module/translations/pt.js.map +1 -0
- 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/index.d.ts +2 -0
- package/lib/typescript/translations/de.d.ts +3 -0
- package/lib/typescript/translations/pt.d.ts +3 -0
- package/lib/typescript/translations/utils.d.ts +4 -4
- package/package.json +3 -1
- package/src/Date/CalendarEdit.tsx +38 -40
- 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/index.tsx +2 -0
- 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 +21 -0
- package/src/translations/utils.ts +5 -5
|
@@ -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;
|
|
@@ -10,4 +10,6 @@ export { registerTranslation, getTranslation } from './translations/utils';
|
|
|
10
10
|
export { default as nl } from './translations/nl';
|
|
11
11
|
export { default as en } from './translations/en';
|
|
12
12
|
export { default as pl } from './translations/pl';
|
|
13
|
+
export { default as pt } from './translations/pt';
|
|
13
14
|
export { default as enGB } from './translations/enGB';
|
|
15
|
+
export { default as de } from './translations/de';
|
|
@@ -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.4",
|
|
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",
|
|
@@ -76,52 +76,50 @@ function CalendarEdit({
|
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
78
|
<View style={styles.root}>
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
{mode === 'single' ? (
|
|
80
|
+
<DatePickerInput
|
|
81
|
+
inputMode="start"
|
|
82
|
+
ref={dateInput}
|
|
83
|
+
label={label}
|
|
84
|
+
value={state.date}
|
|
85
|
+
onChange={(date) => onChange({ ...state, date })}
|
|
86
|
+
onSubmitEditing={onSubmitInput}
|
|
87
|
+
validRange={validRange}
|
|
88
|
+
locale={locale}
|
|
89
|
+
withModal={false}
|
|
90
|
+
autoComplete={'off'}
|
|
91
|
+
/>
|
|
92
|
+
) : null}
|
|
93
|
+
{mode === 'range' ? (
|
|
94
|
+
<View style={styles.inner}>
|
|
81
95
|
<DatePickerInput
|
|
82
96
|
inputMode="start"
|
|
83
|
-
ref={
|
|
84
|
-
label={
|
|
85
|
-
value={state.
|
|
86
|
-
onChange={(
|
|
87
|
-
|
|
97
|
+
ref={startInput}
|
|
98
|
+
label={startLabel}
|
|
99
|
+
value={state.startDate}
|
|
100
|
+
onChange={(startDate) => onChange({ ...state, startDate })}
|
|
101
|
+
returnKeyType={'next'}
|
|
102
|
+
onSubmitEditing={onSubmitStartInput}
|
|
88
103
|
validRange={validRange}
|
|
89
104
|
locale={locale}
|
|
90
105
|
withModal={false}
|
|
91
|
-
|
|
106
|
+
autoComplete={'off'}
|
|
92
107
|
/>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/>
|
|
109
|
-
<View style={styles.separator} />
|
|
110
|
-
<DatePickerInput
|
|
111
|
-
inputMode="end"
|
|
112
|
-
ref={endInput}
|
|
113
|
-
label={endLabel}
|
|
114
|
-
value={state.endDate}
|
|
115
|
-
onChange={(endDate) => onChange({ ...state, endDate })}
|
|
116
|
-
onSubmitEditing={onSubmitEndInput}
|
|
117
|
-
validRange={validRange}
|
|
118
|
-
locale={locale}
|
|
119
|
-
withModal={false}
|
|
120
|
-
autoCompleteType={'off'}
|
|
121
|
-
/>
|
|
122
|
-
</>
|
|
123
|
-
) : null}
|
|
124
|
-
</View>
|
|
108
|
+
<View style={styles.separator} />
|
|
109
|
+
<DatePickerInput
|
|
110
|
+
inputMode="end"
|
|
111
|
+
ref={endInput}
|
|
112
|
+
label={endLabel}
|
|
113
|
+
value={state.endDate}
|
|
114
|
+
onChange={(endDate) => onChange({ ...state, endDate })}
|
|
115
|
+
onSubmitEditing={onSubmitEndInput}
|
|
116
|
+
validRange={validRange}
|
|
117
|
+
locale={locale}
|
|
118
|
+
withModal={false}
|
|
119
|
+
autoComplete="off"
|
|
120
|
+
/>
|
|
121
|
+
</View>
|
|
122
|
+
) : null}
|
|
125
123
|
</View>
|
|
126
124
|
)
|
|
127
125
|
}
|
|
@@ -51,9 +51,6 @@ function CalendarHeader({
|
|
|
51
51
|
icon="chevron-left"
|
|
52
52
|
accessibilityLabel={getTranslation(locale, 'previous')}
|
|
53
53
|
onPress={onPrev}
|
|
54
|
-
// RN types bug
|
|
55
|
-
hasTVPreferredFocus={undefined}
|
|
56
|
-
tvParallaxProperties={undefined}
|
|
57
54
|
/>
|
|
58
55
|
</View>
|
|
59
56
|
|
|
@@ -67,9 +64,6 @@ function CalendarHeader({
|
|
|
67
64
|
icon="chevron-right"
|
|
68
65
|
accessibilityLabel={getTranslation(locale, 'next')}
|
|
69
66
|
onPress={onNext}
|
|
70
|
-
// RN types bug
|
|
71
|
-
hasTVPreferredFocus={undefined}
|
|
72
|
-
tvParallaxProperties={undefined}
|
|
73
67
|
/>
|
|
74
68
|
</View>
|
|
75
69
|
</View>
|
|
@@ -62,7 +62,12 @@ function DatePickerInput(
|
|
|
62
62
|
<TextInputWithMask
|
|
63
63
|
{...rest}
|
|
64
64
|
ref={ref}
|
|
65
|
-
label={getLabel({
|
|
65
|
+
label={getLabel({
|
|
66
|
+
// TODO: support label components?
|
|
67
|
+
label: label as any,
|
|
68
|
+
inputFormat,
|
|
69
|
+
withDateFormatInLabel,
|
|
70
|
+
})}
|
|
66
71
|
value={formattedValue}
|
|
67
72
|
keyboardType={'number-pad'}
|
|
68
73
|
placeholder={inputFormat}
|
|
@@ -78,9 +83,6 @@ function DatePickerInput(
|
|
|
78
83
|
style={styles.calendarButton}
|
|
79
84
|
icon="calendar"
|
|
80
85
|
onPress={() => setVisible(true)}
|
|
81
|
-
// RN types bug
|
|
82
|
-
hasTVPreferredFocus={undefined}
|
|
83
|
-
tvParallaxProperties={undefined}
|
|
84
86
|
/>
|
|
85
87
|
) : null}
|
|
86
88
|
</View>
|
|
@@ -97,6 +99,7 @@ function DatePickerInput(
|
|
|
97
99
|
onConfirm={onInnerConfirm}
|
|
98
100
|
locale={locale}
|
|
99
101
|
dateMode={inputMode}
|
|
102
|
+
validRange={validRange}
|
|
100
103
|
/>
|
|
101
104
|
) : null}
|
|
102
105
|
</>
|
|
@@ -129,6 +132,6 @@ const styles = StyleSheet.create({
|
|
|
129
132
|
input: {
|
|
130
133
|
flexGrow: 1,
|
|
131
134
|
},
|
|
132
|
-
calendarButton: { position: 'absolute', right: 0 },
|
|
135
|
+
calendarButton: { position: 'absolute', right: 0, zIndex: 10 },
|
|
133
136
|
})
|
|
134
137
|
export default React.forwardRef(DatePickerInput)
|
|
@@ -36,9 +36,6 @@ export default function DatePickerModalHeader(
|
|
|
36
36
|
onPress={props.onDismiss}
|
|
37
37
|
color={color}
|
|
38
38
|
testID="react-native-paper-dates-close"
|
|
39
|
-
// RN types bug
|
|
40
|
-
hasTVPreferredFocus={undefined}
|
|
41
|
-
tvParallaxProperties={undefined}
|
|
42
39
|
/>
|
|
43
40
|
<Appbar.Content title={''} />
|
|
44
41
|
<Button
|
|
@@ -50,13 +50,7 @@ export default function DateRangeInput({ locale }: { locale: string }) {
|
|
|
50
50
|
<Text>Tot</Text>
|
|
51
51
|
</View>
|
|
52
52
|
<View>
|
|
53
|
-
<IconButton
|
|
54
|
-
icon="calendar"
|
|
55
|
-
onPress={() => setVisible(true)}
|
|
56
|
-
// RN types bug
|
|
57
|
-
hasTVPreferredFocus={undefined}
|
|
58
|
-
tvParallaxProperties={undefined}
|
|
59
|
-
/>
|
|
53
|
+
<IconButton icon="calendar" onPress={() => setVisible(true)} />
|
|
60
54
|
<Text style={{ opacity: 0 }} accessible={false}>
|
|
61
55
|
tot
|
|
62
56
|
</Text>
|
package/src/Date/Day.tsx
CHANGED
package/src/Date/Month.tsx
CHANGED
|
@@ -268,9 +268,6 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
|
|
|
268
268
|
borderRadius: roundness,
|
|
269
269
|
},
|
|
270
270
|
]}
|
|
271
|
-
// RN types bug
|
|
272
|
-
hasTVPreferredFocus={undefined}
|
|
273
|
-
tvParallaxProperties={undefined}
|
|
274
271
|
>
|
|
275
272
|
<View
|
|
276
273
|
style={[
|
|
@@ -290,9 +287,6 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
|
|
|
290
287
|
<IconButton
|
|
291
288
|
onPress={isHorizontal ? () => onPressYear(year) : undefined}
|
|
292
289
|
icon={selectingYear ? 'chevron-up' : 'chevron-down'}
|
|
293
|
-
// RN types bug
|
|
294
|
-
hasTVPreferredFocus={undefined}
|
|
295
|
-
tvParallaxProperties={undefined}
|
|
296
290
|
/>
|
|
297
291
|
</View>
|
|
298
292
|
</View>
|
package/src/Date/YearPicker.tsx
CHANGED
package/src/Date/inputUtils.ts
CHANGED
|
@@ -55,22 +55,26 @@ export default function useDateInput({
|
|
|
55
55
|
let errors =
|
|
56
56
|
validStart && validEnd
|
|
57
57
|
? [
|
|
58
|
-
`${getTranslation(
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
`${getTranslation(
|
|
59
|
+
locale,
|
|
60
|
+
'mustBeBetween',
|
|
61
|
+
() => 'mustBeBetween'
|
|
62
|
+
)(formatter.format(validStart), formatter.format(validEnd))}`,
|
|
61
63
|
]
|
|
62
64
|
: [
|
|
63
65
|
validStart
|
|
64
|
-
?
|
|
66
|
+
? getTranslation(
|
|
65
67
|
locale,
|
|
66
|
-
'mustBeHigherThan'
|
|
67
|
-
|
|
68
|
+
'mustBeHigherThan',
|
|
69
|
+
() => 'mustBeHigherThan'
|
|
70
|
+
)(formatter.format(validStart))
|
|
68
71
|
: '',
|
|
69
72
|
validEnd
|
|
70
|
-
?
|
|
73
|
+
? getTranslation(
|
|
71
74
|
locale,
|
|
72
|
-
'mustBeLowerThan'
|
|
73
|
-
|
|
75
|
+
'mustBeLowerThan',
|
|
76
|
+
() => 'mustBeLowerThan'
|
|
77
|
+
)(formatter.format(validEnd))
|
|
74
78
|
: '',
|
|
75
79
|
]
|
|
76
80
|
setError(errors.filter((n) => n).join(' '))
|
package/src/Time/TimeInput.tsx
CHANGED
|
@@ -96,9 +96,6 @@ function TimeInput(
|
|
|
96
96
|
rippleColor={Color(theme.colors.primary).fade(0.7).hex()}
|
|
97
97
|
onPress={() => onPress(clockType)}
|
|
98
98
|
borderless={true}
|
|
99
|
-
// RN types bug
|
|
100
|
-
hasTVPreferredFocus={undefined}
|
|
101
|
-
tvParallaxProperties={undefined}
|
|
102
99
|
>
|
|
103
100
|
<View />
|
|
104
101
|
</TouchableRipple>
|
|
@@ -157,9 +157,6 @@ export function TimePickerModal({
|
|
|
157
157
|
size={24}
|
|
158
158
|
style={styles.inputTypeToggle}
|
|
159
159
|
accessibilityLabel="toggle keyboard"
|
|
160
|
-
// RN types bug
|
|
161
|
-
hasTVPreferredFocus={undefined}
|
|
162
|
-
tvParallaxProperties={undefined}
|
|
163
160
|
/>
|
|
164
161
|
<View style={styles.fill} />
|
|
165
162
|
<Button onPress={onDismiss} uppercase={uppercase}>
|
package/src/index.tsx
CHANGED
|
@@ -10,4 +10,6 @@ export { registerTranslation, getTranslation } from './translations/utils'
|
|
|
10
10
|
export { default as nl } from './translations/nl'
|
|
11
11
|
export { default as en } from './translations/en'
|
|
12
12
|
export { default as pl } from './translations/pl'
|
|
13
|
+
export { default as pt } from './translations/pt'
|
|
13
14
|
export { default as enGB } from './translations/enGB'
|
|
15
|
+
export { default as de } from './translations/de'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TranslationsType } from './utils'
|
|
2
|
+
const de: TranslationsType = {
|
|
3
|
+
save: 'Speichern',
|
|
4
|
+
selectSingle: 'Wähle Datum',
|
|
5
|
+
selectMultiple: 'Wähle Daten',
|
|
6
|
+
selectRange: 'Wähle Zeitspanne',
|
|
7
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
8
|
+
`Das Format sollte ${inputFormat} sein`,
|
|
9
|
+
mustBeHigherThan: (date) => `Muss nach dem ${date} sein`,
|
|
10
|
+
mustBeLowerThan: (date) => `Muss vor dem ${date} sein`,
|
|
11
|
+
mustBeBetween: (startDate, endDate) =>
|
|
12
|
+
`Muss in dieser Zeitspanne liegen ${startDate} - ${endDate}`,
|
|
13
|
+
dateIsDisabled: 'Datum nicht wählbar',
|
|
14
|
+
previous: 'Vorheriges',
|
|
15
|
+
next: 'Nächstes',
|
|
16
|
+
typeInDate: 'Datum eingeben',
|
|
17
|
+
pickDateFromCalendar: 'Datum vom Kalender auswählen',
|
|
18
|
+
close: 'Schliessen',
|
|
19
|
+
}
|
|
20
|
+
export default de
|
package/src/translations/en.ts
CHANGED
|
@@ -5,11 +5,12 @@ const en: TranslationsType = {
|
|
|
5
5
|
selectSingle: 'Select date',
|
|
6
6
|
selectMultiple: 'Select dates',
|
|
7
7
|
selectRange: 'Select period',
|
|
8
|
-
notAccordingToDateFormat: (inputFormat
|
|
8
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
9
9
|
`Date format must be ${inputFormat}`,
|
|
10
|
-
mustBeHigherThan:
|
|
11
|
-
mustBeLowerThan:
|
|
12
|
-
mustBeBetween:
|
|
10
|
+
mustBeHigherThan: (date) => `Must be later then ${date}`,
|
|
11
|
+
mustBeLowerThan: (date) => `Must be earlier then ${date}`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) =>
|
|
13
|
+
`Must be between ${startDate} - ${endDate}`,
|
|
13
14
|
dateIsDisabled: 'Day is not allowed',
|
|
14
15
|
previous: 'Previous',
|
|
15
16
|
next: 'Next',
|
package/src/translations/enGB.ts
CHANGED
|
@@ -5,11 +5,12 @@ const enGB: TranslationsType = {
|
|
|
5
5
|
selectSingle: 'Select date',
|
|
6
6
|
selectMultiple: 'Select dates',
|
|
7
7
|
selectRange: 'Select period',
|
|
8
|
-
notAccordingToDateFormat: (inputFormat
|
|
8
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
9
9
|
`Date format must be ${inputFormat}`,
|
|
10
|
-
mustBeHigherThan:
|
|
11
|
-
mustBeLowerThan:
|
|
12
|
-
mustBeBetween:
|
|
10
|
+
mustBeHigherThan: (date) => `Must be later then ${date}`,
|
|
11
|
+
mustBeLowerThan: (date) => `Must be earlier then ${date}`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) =>
|
|
13
|
+
`Must be between ${startDate} - ${endDate}`,
|
|
13
14
|
dateIsDisabled: 'Day is not allowed',
|
|
14
15
|
previous: 'Previous',
|
|
15
16
|
next: 'Next',
|
package/src/translations/nl.ts
CHANGED
|
@@ -5,11 +5,12 @@ const nl: TranslationsType = {
|
|
|
5
5
|
selectSingle: 'Selecteer datum',
|
|
6
6
|
selectMultiple: 'Selecteer datums',
|
|
7
7
|
selectRange: 'Selecteer periode',
|
|
8
|
-
notAccordingToDateFormat: (inputFormat
|
|
8
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
9
9
|
`Datumformaat moet ${inputFormat} zijn`,
|
|
10
|
-
mustBeHigherThan:
|
|
11
|
-
mustBeLowerThan:
|
|
12
|
-
mustBeBetween:
|
|
10
|
+
mustBeHigherThan: (date) => `Moet later dan ${date}`,
|
|
11
|
+
mustBeLowerThan: (date) => `Moet eerder dan ${date}`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) =>
|
|
13
|
+
`Moet tussen ${startDate} - ${endDate}`,
|
|
13
14
|
dateIsDisabled: 'Deze dag mag niet',
|
|
14
15
|
previous: 'Vorige',
|
|
15
16
|
next: 'Volgende',
|
package/src/translations/pl.ts
CHANGED
|
@@ -5,11 +5,11 @@ const pl: TranslationsType = {
|
|
|
5
5
|
selectSingle: 'Wybierz datę',
|
|
6
6
|
selectMultiple: 'Wybierz daty',
|
|
7
7
|
selectRange: 'Wybierz zakres',
|
|
8
|
-
notAccordingToDateFormat: (inputFormat
|
|
8
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
9
9
|
`Data musi mieć format ${inputFormat}`,
|
|
10
|
-
mustBeHigherThan:
|
|
11
|
-
mustBeLowerThan:
|
|
12
|
-
mustBeBetween:
|
|
10
|
+
mustBeHigherThan: (date) => `Nie wcześniej niżn ${date}`,
|
|
11
|
+
mustBeLowerThan: (date) => `Nie później niż ${date}`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) => `Pomiędzy ${startDate} - ${endDate}`,
|
|
13
13
|
dateIsDisabled: 'Niedozwolona data',
|
|
14
14
|
|
|
15
15
|
previous: 'Poprzedni',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TranslationsType } from './utils'
|
|
2
|
+
|
|
3
|
+
const pt: TranslationsType = {
|
|
4
|
+
save: 'Salvar',
|
|
5
|
+
selectSingle: 'Selecione a data',
|
|
6
|
+
selectMultiple: 'Selecione as datas',
|
|
7
|
+
selectRange: 'Selecione o período',
|
|
8
|
+
notAccordingToDateFormat: (inputFormat: string) =>
|
|
9
|
+
`O formato da data deve ser ${inputFormat}`,
|
|
10
|
+
mustBeHigherThan: (date) => `Deve ser depois de ${date}`,
|
|
11
|
+
mustBeLowerThan: (date) => `Deve ser antes de ${date}`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) =>
|
|
13
|
+
`Deve estar entre ${startDate} - ${endDate}`,
|
|
14
|
+
dateIsDisabled: 'Data não é permitida',
|
|
15
|
+
previous: 'Anterior',
|
|
16
|
+
next: 'Próximo',
|
|
17
|
+
typeInDate: 'Digite a data',
|
|
18
|
+
pickDateFromCalendar: 'Escolha a data do calendário',
|
|
19
|
+
close: 'Fechar',
|
|
20
|
+
}
|
|
21
|
+
export default pt
|
|
@@ -4,9 +4,9 @@ export 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
|
|
@@ -17,9 +17,9 @@ export type TranslationsType = {
|
|
|
17
17
|
|
|
18
18
|
let translationsPerLocale: Record<string, TranslationsType> = {}
|
|
19
19
|
|
|
20
|
-
export function getTranslation(
|
|
20
|
+
export function getTranslation<K extends keyof TranslationsType>(
|
|
21
21
|
locale: string | undefined,
|
|
22
|
-
key:
|
|
22
|
+
key: K,
|
|
23
23
|
fallback?: any
|
|
24
24
|
) {
|
|
25
25
|
const l = locale || 'en'
|