react-native-timer-picker 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +35 -25
  2. package/package.json +143 -126
  3. package/dist/commonjs/components/DurationScroll/DurationScroll.js +0 -403
  4. package/dist/commonjs/components/DurationScroll/DurationScroll.js.map +0 -1
  5. package/dist/commonjs/components/DurationScroll/index.js +0 -27
  6. package/dist/commonjs/components/DurationScroll/index.js.map +0 -1
  7. package/dist/commonjs/components/DurationScroll/types.js +0 -6
  8. package/dist/commonjs/components/DurationScroll/types.js.map +0 -1
  9. package/dist/commonjs/components/Modal/Modal.js +0 -107
  10. package/dist/commonjs/components/Modal/Modal.js.map +0 -1
  11. package/dist/commonjs/components/Modal/index.js +0 -27
  12. package/dist/commonjs/components/Modal/index.js.map +0 -1
  13. package/dist/commonjs/components/Modal/styles.js +0 -25
  14. package/dist/commonjs/components/Modal/styles.js.map +0 -1
  15. package/dist/commonjs/components/Modal/types.js +0 -6
  16. package/dist/commonjs/components/Modal/types.js.map +0 -1
  17. package/dist/commonjs/components/PickerItem/PickerItem.js +0 -45
  18. package/dist/commonjs/components/PickerItem/PickerItem.js.map +0 -1
  19. package/dist/commonjs/components/PickerItem/index.js +0 -14
  20. package/dist/commonjs/components/PickerItem/index.js.map +0 -1
  21. package/dist/commonjs/components/TimerPicker/TimerPicker.js +0 -236
  22. package/dist/commonjs/components/TimerPicker/TimerPicker.js.map +0 -1
  23. package/dist/commonjs/components/TimerPicker/index.js +0 -39
  24. package/dist/commonjs/components/TimerPicker/index.js.map +0 -1
  25. package/dist/commonjs/components/TimerPicker/styles.js +0 -121
  26. package/dist/commonjs/components/TimerPicker/styles.js.map +0 -1
  27. package/dist/commonjs/components/TimerPicker/types.js +0 -6
  28. package/dist/commonjs/components/TimerPicker/types.js.map +0 -1
  29. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js +0 -153
  30. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  31. package/dist/commonjs/components/TimerPickerModal/index.js +0 -39
  32. package/dist/commonjs/components/TimerPickerModal/index.js.map +0 -1
  33. package/dist/commonjs/components/TimerPickerModal/styles.js +0 -89
  34. package/dist/commonjs/components/TimerPickerModal/styles.js.map +0 -1
  35. package/dist/commonjs/components/TimerPickerModal/types.js +0 -6
  36. package/dist/commonjs/components/TimerPickerModal/types.js.map +0 -1
  37. package/dist/commonjs/index.js +0 -57
  38. package/dist/commonjs/index.js.map +0 -1
  39. package/dist/commonjs/tests/DurationScroll.test.js +0 -163
  40. package/dist/commonjs/tests/DurationScroll.test.js.map +0 -1
  41. package/dist/commonjs/tests/Modal.test.js +0 -119
  42. package/dist/commonjs/tests/Modal.test.js.map +0 -1
  43. package/dist/commonjs/tests/TimerPicker.test.js +0 -169
  44. package/dist/commonjs/tests/TimerPicker.test.js.map +0 -1
  45. package/dist/commonjs/tests/TimerPickerModal.test.js +0 -276
  46. package/dist/commonjs/tests/TimerPickerModal.test.js.map +0 -1
  47. package/dist/commonjs/tests/colorToRgba.test.js +0 -176
  48. package/dist/commonjs/tests/colorToRgba.test.js.map +0 -1
  49. package/dist/commonjs/tests/generateNumbers.test.js +0 -350
  50. package/dist/commonjs/tests/generateNumbers.test.js.map +0 -1
  51. package/dist/commonjs/tests/getAdjustedLimit.test.js +0 -324
  52. package/dist/commonjs/tests/getAdjustedLimit.test.js.map +0 -1
  53. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js +0 -424
  54. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  55. package/dist/commonjs/tests/getInitialScrollIndex.test.js +0 -396
  56. package/dist/commonjs/tests/getInitialScrollIndex.test.js.map +0 -1
  57. package/dist/commonjs/tests/getSafeInitialValue.test.js +0 -497
  58. package/dist/commonjs/tests/getSafeInitialValue.test.js.map +0 -1
  59. package/dist/commonjs/tests/padNumber.test.js +0 -301
  60. package/dist/commonjs/tests/padNumber.test.js.map +0 -1
  61. package/dist/commonjs/utils/colorToRgba.js +0 -87
  62. package/dist/commonjs/utils/colorToRgba.js.map +0 -1
  63. package/dist/commonjs/utils/generateNumbers.js +0 -124
  64. package/dist/commonjs/utils/generateNumbers.js.map +0 -1
  65. package/dist/commonjs/utils/getAdjustedLimit.js +0 -58
  66. package/dist/commonjs/utils/getAdjustedLimit.js.map +0 -1
  67. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js +0 -62
  68. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  69. package/dist/commonjs/utils/getInitialScrollIndex.js +0 -57
  70. package/dist/commonjs/utils/getInitialScrollIndex.js.map +0 -1
  71. package/dist/commonjs/utils/getSafeInitialValue.js +0 -41
  72. package/dist/commonjs/utils/getSafeInitialValue.js.map +0 -1
  73. package/dist/commonjs/utils/padNumber.js +0 -40
  74. package/dist/commonjs/utils/padNumber.js.map +0 -1
  75. package/dist/module/components/DurationScroll/DurationScroll.js +0 -395
  76. package/dist/module/components/DurationScroll/DurationScroll.js.map +0 -1
  77. package/dist/module/components/DurationScroll/index.js +0 -3
  78. package/dist/module/components/DurationScroll/index.js.map +0 -1
  79. package/dist/module/components/DurationScroll/types.js +0 -2
  80. package/dist/module/components/DurationScroll/types.js.map +0 -1
  81. package/dist/module/components/Modal/Modal.js +0 -99
  82. package/dist/module/components/Modal/Modal.js.map +0 -1
  83. package/dist/module/components/Modal/index.js +0 -3
  84. package/dist/module/components/Modal/index.js.map +0 -1
  85. package/dist/module/components/Modal/styles.js +0 -19
  86. package/dist/module/components/Modal/styles.js.map +0 -1
  87. package/dist/module/components/Modal/types.js +0 -2
  88. package/dist/module/components/Modal/types.js.map +0 -1
  89. package/dist/module/components/PickerItem/PickerItem.js +0 -38
  90. package/dist/module/components/PickerItem/PickerItem.js.map +0 -1
  91. package/dist/module/components/PickerItem/index.js +0 -2
  92. package/dist/module/components/PickerItem/index.js.map +0 -1
  93. package/dist/module/components/TimerPicker/TimerPicker.js +0 -228
  94. package/dist/module/components/TimerPicker/TimerPicker.js.map +0 -1
  95. package/dist/module/components/TimerPicker/index.js +0 -4
  96. package/dist/module/components/TimerPicker/index.js.map +0 -1
  97. package/dist/module/components/TimerPicker/styles.js +0 -114
  98. package/dist/module/components/TimerPicker/styles.js.map +0 -1
  99. package/dist/module/components/TimerPicker/types.js +0 -2
  100. package/dist/module/components/TimerPicker/types.js.map +0 -1
  101. package/dist/module/components/TimerPickerModal/TimerPickerModal.js +0 -145
  102. package/dist/module/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  103. package/dist/module/components/TimerPickerModal/index.js +0 -4
  104. package/dist/module/components/TimerPickerModal/index.js.map +0 -1
  105. package/dist/module/components/TimerPickerModal/styles.js +0 -82
  106. package/dist/module/components/TimerPickerModal/styles.js.map +0 -1
  107. package/dist/module/components/TimerPickerModal/types.js +0 -2
  108. package/dist/module/components/TimerPickerModal/types.js.map +0 -1
  109. package/dist/module/index.js +0 -3
  110. package/dist/module/index.js.map +0 -1
  111. package/dist/module/tests/DurationScroll.test.js +0 -160
  112. package/dist/module/tests/DurationScroll.test.js.map +0 -1
  113. package/dist/module/tests/Modal.test.js +0 -116
  114. package/dist/module/tests/Modal.test.js.map +0 -1
  115. package/dist/module/tests/TimerPicker.test.js +0 -166
  116. package/dist/module/tests/TimerPicker.test.js.map +0 -1
  117. package/dist/module/tests/TimerPickerModal.test.js +0 -273
  118. package/dist/module/tests/TimerPickerModal.test.js.map +0 -1
  119. package/dist/module/tests/colorToRgba.test.js +0 -174
  120. package/dist/module/tests/colorToRgba.test.js.map +0 -1
  121. package/dist/module/tests/generateNumbers.test.js +0 -348
  122. package/dist/module/tests/generateNumbers.test.js.map +0 -1
  123. package/dist/module/tests/getAdjustedLimit.test.js +0 -322
  124. package/dist/module/tests/getAdjustedLimit.test.js.map +0 -1
  125. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js +0 -422
  126. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  127. package/dist/module/tests/getInitialScrollIndex.test.js +0 -394
  128. package/dist/module/tests/getInitialScrollIndex.test.js.map +0 -1
  129. package/dist/module/tests/getSafeInitialValue.test.js +0 -495
  130. package/dist/module/tests/getSafeInitialValue.test.js.map +0 -1
  131. package/dist/module/tests/padNumber.test.js +0 -299
  132. package/dist/module/tests/padNumber.test.js.map +0 -1
  133. package/dist/module/utils/colorToRgba.js +0 -80
  134. package/dist/module/utils/colorToRgba.js.map +0 -1
  135. package/dist/module/utils/generateNumbers.js +0 -117
  136. package/dist/module/utils/generateNumbers.js.map +0 -1
  137. package/dist/module/utils/getAdjustedLimit.js +0 -51
  138. package/dist/module/utils/getAdjustedLimit.js.map +0 -1
  139. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js +0 -55
  140. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  141. package/dist/module/utils/getInitialScrollIndex.js +0 -50
  142. package/dist/module/utils/getInitialScrollIndex.js.map +0 -1
  143. package/dist/module/utils/getSafeInitialValue.js +0 -34
  144. package/dist/module/utils/getSafeInitialValue.js.map +0 -1
  145. package/dist/module/utils/padNumber.js +0 -33
  146. package/dist/module/utils/padNumber.js.map +0 -1
  147. package/dist/typescript/components/DurationScroll/DurationScroll.d.ts +0 -4
  148. package/dist/typescript/components/DurationScroll/index.d.ts +0 -2
  149. package/dist/typescript/components/DurationScroll/types.d.ts +0 -66
  150. package/dist/typescript/components/Modal/Modal.d.ts +0 -5
  151. package/dist/typescript/components/Modal/index.d.ts +0 -2
  152. package/dist/typescript/components/Modal/styles.d.ts +0 -17
  153. package/dist/typescript/components/Modal/types.d.ts +0 -15
  154. package/dist/typescript/components/PickerItem/PickerItem.d.ts +0 -14
  155. package/dist/typescript/components/PickerItem/index.d.ts +0 -1
  156. package/dist/typescript/components/TimerPicker/TimerPicker.d.ts +0 -4
  157. package/dist/typescript/components/TimerPicker/index.d.ts +0 -3
  158. package/dist/typescript/components/TimerPicker/styles.d.ts +0 -1451
  159. package/dist/typescript/components/TimerPicker/types.d.ts +0 -90
  160. package/dist/typescript/components/TimerPickerModal/TimerPickerModal.d.ts +0 -4
  161. package/dist/typescript/components/TimerPickerModal/index.d.ts +0 -3
  162. package/dist/typescript/components/TimerPickerModal/styles.d.ts +0 -947
  163. package/dist/typescript/components/TimerPickerModal/types.d.ts +0 -55
  164. package/dist/typescript/index.d.ts +0 -2
  165. package/dist/typescript/utils/colorToRgba.d.ts +0 -38
  166. package/dist/typescript/utils/generateNumbers.d.ts +0 -80
  167. package/dist/typescript/utils/getAdjustedLimit.d.ts +0 -30
  168. package/dist/typescript/utils/getDurationAndIndexFromScrollOffset.d.ts +0 -49
  169. package/dist/typescript/utils/getInitialScrollIndex.d.ts +0 -46
  170. package/dist/typescript/utils/getSafeInitialValue.d.ts +0 -38
  171. package/dist/typescript/utils/padNumber.d.ts +0 -28
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_styles","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","Modal","props","animationDuration","children","contentStyle","isVisible","modalProps","onHide","onOverlayPress","overlayOpacity","overlayStyle","testID","height","screenHeight","width","screenWidth","useWindowDimensions","isMounted","useRef","animatedOpacity","Animated","Value","useEffect","current","show","backdropAnimatedStyle","opacity","interpolate","inputRange","outputRange","contentAnimatedStyle","transform","translateY","extrapolate","useCallback","timing","easing","Easing","inOut","quad","useNativeDriver","duration","toValue","start","hide","createElement","animationType","transparent","visible","TouchableWithoutFeedback","onPress","View","style","styles","backdrop","pointerEvents","content","exports","_default","React","memo"],"sources":["Modal.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\n\nimport {\n Animated,\n Easing,\n Modal as ReactNativeModal,\n TouchableWithoutFeedback,\n useWindowDimensions,\n} from \"react-native\";\n\nimport { styles } from \"./styles\";\nimport type { ModalProps } from \"./types\";\n\nexport const Modal = (props: ModalProps) => {\n const {\n animationDuration = 300,\n children,\n contentStyle,\n isVisible = false,\n modalProps,\n onHide,\n onOverlayPress,\n overlayOpacity = 0.4,\n overlayStyle,\n testID = \"modal\",\n } = props;\n\n const { height: screenHeight, width: screenWidth } = useWindowDimensions();\n\n const isMounted = useRef(false);\n const animatedOpacity = useRef(new Animated.Value(0));\n\n useEffect(() => {\n isMounted.current = true;\n if (isVisible) {\n show();\n }\n\n return () => {\n isMounted.current = false;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const backdropAnimatedStyle = {\n opacity: animatedOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [0, overlayOpacity],\n }),\n };\n const contentAnimatedStyle = {\n transform: [\n {\n translateY: animatedOpacity.current.interpolate({\n inputRange: [0, 1],\n outputRange: [screenHeight, 0],\n extrapolate: \"clamp\",\n }),\n },\n ],\n };\n\n const show = useCallback(() => {\n Animated.timing(animatedOpacity.current, {\n easing: Easing.inOut(Easing.quad),\n // Using native driver in the modal makes the content flash\n useNativeDriver: true,\n duration: animationDuration,\n toValue: 1,\n }).start();\n }, [animationDuration]);\n\n const hide = useCallback(() => {\n Animated.timing(animatedOpacity.current, {\n easing: Easing.inOut(Easing.quad),\n // Using native driver in the modal makes the content flash\n useNativeDriver: true,\n duration: animationDuration,\n toValue: 0,\n }).start(() => {\n if (isMounted.current) {\n onHide?.();\n }\n });\n }, [animationDuration, onHide]);\n\n useEffect(() => {\n if (isVisible) {\n show();\n } else {\n hide();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isVisible]);\n\n return (\n <ReactNativeModal\n animationType=\"fade\"\n transparent\n visible={isVisible}\n {...modalProps}\n testID={testID}>\n <TouchableWithoutFeedback\n onPress={onOverlayPress}\n testID=\"modal-backdrop\">\n <Animated.View\n style={[\n styles.backdrop,\n backdropAnimatedStyle,\n { width: screenWidth, height: screenHeight },\n overlayStyle,\n ]}\n />\n </TouchableWithoutFeedback>\n <Animated.View\n pointerEvents=\"box-none\"\n style={[styles.content, contentAnimatedStyle, contentStyle]}>\n {children}\n </Animated.View>\n </ReactNativeModal>\n );\n};\n\nexport default React.memo(Modal);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,OAAA,GAAAF,OAAA;AAAkC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAA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ACZ,IAAIjB,SAAS,EAAE;MACXmB,IAAI,CAAC,CAAC;IACV,CAAC,MAAM;MACHoB,IAAI,CAAC,CAAC;IACV;IACA;EACJ,CAAC,EAAE,CAACvC,SAAS,CAAC,CAAC;EAEf,oBACInC,MAAA,CAAAe,OAAA,CAAA4D,aAAA,CAACxE,YAAA,CAAA2B,KAAgB,EAAAN,QAAA;IACboD,aAAa,EAAC,MAAM;IACpBC,WAAW;IACXC,OAAO,EAAE3C;EAAU,GACfC,UAAU;IACdK,MAAM,EAAEA;EAAO,iBACfzC,MAAA,CAAAe,OAAA,CAAA4D,aAAA,CAACxE,YAAA,CAAA4E,wBAAwB;IACrBC,OAAO,EAAE1C,cAAe;IACxBG,MAAM,EAAC;EAAgB,gBACvBzC,MAAA,CAAAe,OAAA,CAAA4D,aAAA,CAACxE,YAAA,CAAA+C,QAAQ,CAAC+B,IAAI;IACVC,KAAK,EAAE,CACHC,cAAM,CAACC,QAAQ,EACf7B,qBAAqB,EACrB;MAAEX,KAAK,EAAEC,WAAW;MAAEH,MAAM,EAAEC;IAAa,CAAC,EAC5CH,YAAY;EACd,CACL,CACqB,CAAC,eAC3BxC,MAAA,CAAAe,OAAA,CAAA4D,aAAA,CAACxE,YAAA,CAAA+C,QAAQ,CAAC+B,IAAI;IACVI,aAAa,EAAC,UAAU;IACxBH,KAAK,EAAE,CAACC,cAAM,CAACG,OAAO,EAAE1B,oBAAoB,EAAE1B,YAAY;EAAE,GAC3DD,QACU,CACD,CAAC;AAE3B,CAAC;AAACsD,OAAA,CAAAzD,KAAA,GAAAA,KAAA;AAAA,IAAA0D,QAAA,GAAAD,OAAA,CAAAxE,OAAA,gBAEa0E,cAAK,CAACC,IAAI,CAAC5D,KAAK,CAAC","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _Modal.default;
11
- }
12
- });
13
- var _Modal = _interopRequireDefault(require("./Modal"));
14
- var _types = require("./types");
15
- Object.keys(_types).forEach(function (key) {
16
- if (key === "default" || key === "__esModule") return;
17
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
- if (key in exports && exports[key] === _types[key]) return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
26
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_Modal","_interopRequireDefault","require","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default } from \"./Modal\";\n\nexport * from \"./types\";\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAwB,SAAAN,uBAAAe,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.styles = void 0;
7
- var _reactNative = require("react-native");
8
- const styles = exports.styles = _reactNative.StyleSheet.create({
9
- backdrop: {
10
- position: "absolute",
11
- top: 0,
12
- bottom: 0,
13
- left: 0,
14
- right: 0,
15
- backgroundColor: "black",
16
- opacity: 0
17
- },
18
- content: {
19
- flex: 1,
20
- justifyContent: "center",
21
- alignItems: "center",
22
- zIndex: 1
23
- }
24
- });
25
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","styles","exports","StyleSheet","create","backdrop","position","top","bottom","left","right","backgroundColor","opacity","content","flex","justifyContent","alignItems","zIndex"],"sources":["styles.ts"],"sourcesContent":["import { StyleSheet } from \"react-native\";\n\nexport const styles = StyleSheet.create({\n backdrop: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n backgroundColor: \"black\",\n opacity: 0,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n zIndex: 1,\n },\n});"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,uBAAU,CAACC,MAAM,CAAC;EACpCC,QAAQ,EAAE;IACNC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACLC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE;EACZ;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ComponentProps } from \"react\";\n\nimport type { ViewStyle } from \"react-native\";\nimport type { Modal as ReactNativeModal } from \"react-native\";\n\nexport interface ModalProps {\n animationDuration?: number;\n children?: React.ReactElement;\n contentStyle?: ViewStyle;\n isVisible?: boolean;\n modalProps?: ComponentProps<typeof ReactNativeModal>;\n onHide?: () => void;\n onOverlayPress?: () => void;\n overlayOpacity?: number;\n overlayStyle?: ViewStyle;\n testID?: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- const PickerItem = /*#__PURE__*/_react.default.memo(({
11
- adjustedLimitedMax,
12
- adjustedLimitedMin,
13
- allowFontScaling,
14
- amLabel,
15
- is12HourPicker,
16
- item,
17
- pmLabel,
18
- styles
19
- }) => {
20
- let stringItem = item;
21
- let intItem;
22
- let isAm;
23
- if (!is12HourPicker) {
24
- intItem = parseInt(item);
25
- } else {
26
- isAm = item.includes("AM");
27
- stringItem = item.replace(/\s[AP]M/g, "");
28
- intItem = parseInt(stringItem);
29
- }
30
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
31
- key: item,
32
- style: styles.pickerItemContainer,
33
- testID: "picker-item"
34
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
35
- allowFontScaling: allowFontScaling,
36
- style: [styles.pickerItem, intItem > adjustedLimitedMax || intItem < adjustedLimitedMin ? styles.disabledPickerItem : {}]
37
- }, stringItem), is12HourPicker && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
38
- style: styles.pickerAmPmContainer
39
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
40
- allowFontScaling: allowFontScaling,
41
- style: styles.pickerAmPmLabel
42
- }, isAm ? amLabel : pmLabel)));
43
- });
44
- var _default = exports.default = PickerItem;
45
- //# sourceMappingURL=PickerItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","PickerItem","React","memo","adjustedLimitedMax","adjustedLimitedMin","allowFontScaling","amLabel","is12HourPicker","item","pmLabel","styles","stringItem","intItem","isAm","parseInt","includes","replace","createElement","View","key","style","pickerItemContainer","testID","Text","pickerItem","disabledPickerItem","pickerAmPmContainer","pickerAmPmLabel","_default","exports"],"sources":["PickerItem.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { View, Text } from \"react-native\";\n\nimport type { generateStyles } from \"../TimerPicker/styles\";\n\ninterface PickerItemProps {\n adjustedLimitedMax: number;\n adjustedLimitedMin: number;\n allowFontScaling: boolean;\n amLabel?: string;\n is12HourPicker?: boolean;\n item: string;\n pmLabel?: string;\n styles: ReturnType<typeof generateStyles>;\n}\n\nconst PickerItem = React.memo<PickerItemProps>(\n ({\n adjustedLimitedMax,\n adjustedLimitedMin,\n allowFontScaling,\n amLabel,\n is12HourPicker,\n item,\n pmLabel,\n styles,\n }) => {\n let stringItem = item;\n let intItem: number;\n let isAm: boolean | undefined;\n\n if (!is12HourPicker) {\n intItem = parseInt(item);\n } else {\n isAm = item.includes(\"AM\");\n stringItem = item.replace(/\\s[AP]M/g, \"\");\n intItem = parseInt(stringItem);\n }\n\n return (\n <View\n key={item}\n style={styles.pickerItemContainer}\n testID=\"picker-item\">\n <Text\n allowFontScaling={allowFontScaling}\n style={[\n styles.pickerItem,\n intItem > adjustedLimitedMax ||\n intItem < adjustedLimitedMin\n ? styles.disabledPickerItem\n : {},\n ]}>\n {stringItem}\n </Text>\n {is12HourPicker && (\n <View style={styles.pickerAmPmContainer}>\n <Text\n allowFontScaling={allowFontScaling}\n style={styles.pickerAmPmLabel}>\n {isAm ? amLabel : pmLabel}\n </Text>\n </View>\n )}\n </View>\n );\n }\n);\n\nexport default PickerItem;\n"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A,CAAAsB,IAAI;IAACE,KAAK,EAAEV,MAAM,CAACgB;EAAoB,gBACpCjC,MAAA,CAAAM,OAAA,CAAAkB,aAAA,CAACrB,YAAA,CAAA2B,IAAI;IACDlB,gBAAgB,EAAEA,gBAAiB;IACnCe,KAAK,EAAEV,MAAM,CAACiB;EAAgB,GAC7Bd,IAAI,GAAGP,OAAO,GAAGG,OAChB,CACJ,CAER,CAAC;AAEf,CACJ,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEaC,UAAU","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function () {
9
- return _PickerItem.default;
10
- }
11
- });
12
- var _PickerItem = _interopRequireDefault(require("./PickerItem"));
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_PickerItem","_interopRequireDefault","require","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default } from \"./PickerItem\";\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,236 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _getSafeInitialValue = require("../../utils/getSafeInitialValue");
10
- var _DurationScroll = _interopRequireDefault(require("../DurationScroll"));
11
- var _styles = require("./styles");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
15
- const TimerPicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
16
- const {
17
- aggressivelyGetLatestDuration = false,
18
- allowFontScaling = false,
19
- amLabel = "am",
20
- dayInterval = 1,
21
- dayLabel,
22
- dayLimit,
23
- daysPickerIsDisabled = false,
24
- decelerationRate = 0.88,
25
- disableInfiniteScroll = false,
26
- hideDays = true,
27
- hideHours = false,
28
- hideMinutes = false,
29
- hideSeconds = false,
30
- hourInterval = 1,
31
- hourLabel,
32
- hourLimit,
33
- hoursPickerIsDisabled = false,
34
- initialValue,
35
- maximumDays = 30,
36
- maximumHours = 23,
37
- maximumMinutes = 59,
38
- maximumSeconds = 59,
39
- minuteInterval = 1,
40
- minuteLabel,
41
- minuteLimit,
42
- minutesPickerIsDisabled = false,
43
- onDurationChange,
44
- padDaysWithZero = false,
45
- padHoursWithZero = false,
46
- padMinutesWithZero = true,
47
- padSecondsWithZero = true,
48
- padWithNItems = 1,
49
- pickerContainerProps,
50
- pmLabel = "pm",
51
- repeatDayNumbersNTimes = 3,
52
- repeatHourNumbersNTimes = 8,
53
- repeatMinuteNumbersNTimes = 3,
54
- repeatSecondNumbersNTimes = 3,
55
- secondInterval = 1,
56
- secondLabel,
57
- secondLimit,
58
- secondsPickerIsDisabled = false,
59
- styles: customStyles,
60
- use12HourPicker = false,
61
- ...otherProps
62
- } = props;
63
- (0, _react.useEffect)(() => {
64
- if (otherProps.Audio) {
65
- console.warn('The "Audio" prop is deprecated and will be removed in a future version. Please use the "pickerFeedback" prop instead.');
66
- }
67
- if (otherProps.Haptics) {
68
- console.warn('The "Haptics" prop is deprecated and will be removed in a future version. Please use the "pickerFeedback" prop instead.');
69
- }
70
- if (otherProps.clickSoundAsset) {
71
- console.warn('The "clickSoundAsset" prop is deprecated and will be removed in a future version. Please use the "pickerFeedback" prop instead.');
72
- }
73
- }, [otherProps.Audio, otherProps.Haptics, otherProps.clickSoundAsset]);
74
- const safePadWithNItems = (0, _react.useMemo)(() => {
75
- if (padWithNItems < 0 || isNaN(padWithNItems)) {
76
- return 0;
77
- }
78
- const maxPadWithNItems = hideHours ? 15 : 6;
79
- if (padWithNItems > maxPadWithNItems) {
80
- return maxPadWithNItems;
81
- }
82
- return Math.round(padWithNItems);
83
- }, [hideHours, padWithNItems]);
84
- const safeInitialValue = (0, _react.useMemo)(() => (0, _getSafeInitialValue.getSafeInitialValue)({
85
- days: initialValue === null || initialValue === void 0 ? void 0 : initialValue.days,
86
- hours: initialValue === null || initialValue === void 0 ? void 0 : initialValue.hours,
87
- minutes: initialValue === null || initialValue === void 0 ? void 0 : initialValue.minutes,
88
- seconds: initialValue === null || initialValue === void 0 ? void 0 : initialValue.seconds
89
- }), [initialValue === null || initialValue === void 0 ? void 0 : initialValue.days, initialValue === null || initialValue === void 0 ? void 0 : initialValue.hours, initialValue === null || initialValue === void 0 ? void 0 : initialValue.minutes, initialValue === null || initialValue === void 0 ? void 0 : initialValue.seconds]);
90
- const styles = (0, _react.useMemo)(() => (0, _styles.generateStyles)(customStyles), [customStyles]);
91
- const [selectedDays, setSelectedDays] = (0, _react.useState)(safeInitialValue.days);
92
- const [selectedHours, setSelectedHours] = (0, _react.useState)(safeInitialValue.hours);
93
- const [selectedMinutes, setSelectedMinutes] = (0, _react.useState)(safeInitialValue.minutes);
94
- const [selectedSeconds, setSelectedSeconds] = (0, _react.useState)(safeInitialValue.seconds);
95
- (0, _react.useEffect)(() => {
96
- onDurationChange === null || onDurationChange === void 0 || onDurationChange({
97
- days: selectedDays,
98
- hours: selectedHours,
99
- minutes: selectedMinutes,
100
- seconds: selectedSeconds
101
- });
102
- // eslint-disable-next-line react-hooks/exhaustive-deps
103
- }, [selectedDays, selectedHours, selectedMinutes, selectedSeconds]);
104
- const daysDurationScrollRef = (0, _react.useRef)(null);
105
- const hoursDurationScrollRef = (0, _react.useRef)(null);
106
- const minutesDurationScrollRef = (0, _react.useRef)(null);
107
- const secondsDurationScrollRef = (0, _react.useRef)(null);
108
- (0, _react.useImperativeHandle)(ref, () => {
109
- var _daysDurationScrollRe3, _hoursDurationScrollR3, _minutesDurationScrol3, _secondsDurationScrol3;
110
- return {
111
- reset: options => {
112
- var _daysDurationScrollRe, _hoursDurationScrollR, _minutesDurationScrol, _secondsDurationScrol;
113
- setSelectedDays(safeInitialValue.days);
114
- setSelectedHours(safeInitialValue.hours);
115
- setSelectedMinutes(safeInitialValue.minutes);
116
- setSelectedSeconds(safeInitialValue.seconds);
117
- (_daysDurationScrollRe = daysDurationScrollRef.current) === null || _daysDurationScrollRe === void 0 || _daysDurationScrollRe.reset(options);
118
- (_hoursDurationScrollR = hoursDurationScrollRef.current) === null || _hoursDurationScrollR === void 0 || _hoursDurationScrollR.reset(options);
119
- (_minutesDurationScrol = minutesDurationScrollRef.current) === null || _minutesDurationScrol === void 0 || _minutesDurationScrol.reset(options);
120
- (_secondsDurationScrol = secondsDurationScrollRef.current) === null || _secondsDurationScrol === void 0 || _secondsDurationScrol.reset(options);
121
- },
122
- setValue: (value, options) => {
123
- if (value.days) {
124
- var _daysDurationScrollRe2;
125
- setSelectedDays(value.days);
126
- (_daysDurationScrollRe2 = daysDurationScrollRef.current) === null || _daysDurationScrollRe2 === void 0 || _daysDurationScrollRe2.setValue(value.days, options);
127
- }
128
- if (value.hours) {
129
- var _hoursDurationScrollR2;
130
- setSelectedHours(value.hours);
131
- (_hoursDurationScrollR2 = hoursDurationScrollRef.current) === null || _hoursDurationScrollR2 === void 0 || _hoursDurationScrollR2.setValue(value.hours, options);
132
- }
133
- if (value.minutes) {
134
- var _minutesDurationScrol2;
135
- setSelectedMinutes(value.minutes);
136
- (_minutesDurationScrol2 = minutesDurationScrollRef.current) === null || _minutesDurationScrol2 === void 0 || _minutesDurationScrol2.setValue(value.minutes, options);
137
- }
138
- if (value.seconds) {
139
- var _secondsDurationScrol2;
140
- setSelectedSeconds(value.seconds);
141
- (_secondsDurationScrol2 = secondsDurationScrollRef.current) === null || _secondsDurationScrol2 === void 0 || _secondsDurationScrol2.setValue(value.seconds, options);
142
- }
143
- },
144
- latestDuration: {
145
- days: (_daysDurationScrollRe3 = daysDurationScrollRef.current) === null || _daysDurationScrollRe3 === void 0 ? void 0 : _daysDurationScrollRe3.latestDuration,
146
- hours: (_hoursDurationScrollR3 = hoursDurationScrollRef.current) === null || _hoursDurationScrollR3 === void 0 ? void 0 : _hoursDurationScrollR3.latestDuration,
147
- minutes: (_minutesDurationScrol3 = minutesDurationScrollRef.current) === null || _minutesDurationScrol3 === void 0 ? void 0 : _minutesDurationScrol3.latestDuration,
148
- seconds: (_secondsDurationScrol3 = secondsDurationScrollRef.current) === null || _secondsDurationScrol3 === void 0 ? void 0 : _secondsDurationScrol3.latestDuration
149
- }
150
- };
151
- });
152
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, pickerContainerProps, {
153
- style: styles.pickerContainer,
154
- testID: "timer-picker"
155
- }), !hideDays ? /*#__PURE__*/_react.default.createElement(_DurationScroll.default, _extends({
156
- ref: daysDurationScrollRef,
157
- aggressivelyGetLatestDuration: aggressivelyGetLatestDuration,
158
- allowFontScaling: allowFontScaling,
159
- disableInfiniteScroll: disableInfiniteScroll,
160
- initialValue: safeInitialValue.days,
161
- interval: dayInterval,
162
- isDisabled: daysPickerIsDisabled,
163
- label: dayLabel ?? "d",
164
- limit: dayLimit,
165
- maximumValue: maximumDays,
166
- onDurationChange: setSelectedDays,
167
- padNumbersWithZero: padDaysWithZero,
168
- padWithNItems: safePadWithNItems,
169
- repeatNumbersNTimes: repeatDayNumbersNTimes,
170
- repeatNumbersNTimesNotExplicitlySet: (props === null || props === void 0 ? void 0 : props.repeatDayNumbersNTimes) === undefined,
171
- styles: styles,
172
- testID: "duration-scroll-day"
173
- }, otherProps)) : null, !hideHours ? /*#__PURE__*/_react.default.createElement(_DurationScroll.default, _extends({
174
- ref: hoursDurationScrollRef,
175
- aggressivelyGetLatestDuration: aggressivelyGetLatestDuration,
176
- allowFontScaling: allowFontScaling,
177
- amLabel: amLabel,
178
- decelerationRate: decelerationRate,
179
- disableInfiniteScroll: disableInfiniteScroll,
180
- initialValue: safeInitialValue.hours,
181
- interval: hourInterval,
182
- is12HourPicker: use12HourPicker,
183
- isDisabled: hoursPickerIsDisabled,
184
- label: hourLabel ?? (!use12HourPicker ? "h" : undefined),
185
- limit: hourLimit,
186
- maximumValue: maximumHours,
187
- onDurationChange: setSelectedHours,
188
- padNumbersWithZero: padHoursWithZero,
189
- padWithNItems: safePadWithNItems,
190
- pmLabel: pmLabel,
191
- repeatNumbersNTimes: repeatHourNumbersNTimes,
192
- repeatNumbersNTimesNotExplicitlySet: (props === null || props === void 0 ? void 0 : props.repeatHourNumbersNTimes) === undefined,
193
- styles: styles,
194
- testID: "duration-scroll-hour"
195
- }, otherProps)) : null, !hideMinutes ? /*#__PURE__*/_react.default.createElement(_DurationScroll.default, _extends({
196
- ref: minutesDurationScrollRef,
197
- aggressivelyGetLatestDuration: aggressivelyGetLatestDuration,
198
- allowFontScaling: allowFontScaling,
199
- decelerationRate: decelerationRate,
200
- disableInfiniteScroll: disableInfiniteScroll,
201
- initialValue: safeInitialValue.minutes,
202
- interval: minuteInterval,
203
- isDisabled: minutesPickerIsDisabled,
204
- label: minuteLabel ?? "m",
205
- limit: minuteLimit,
206
- maximumValue: maximumMinutes,
207
- onDurationChange: setSelectedMinutes,
208
- padNumbersWithZero: padMinutesWithZero,
209
- padWithNItems: safePadWithNItems,
210
- repeatNumbersNTimes: repeatMinuteNumbersNTimes,
211
- repeatNumbersNTimesNotExplicitlySet: (props === null || props === void 0 ? void 0 : props.repeatMinuteNumbersNTimes) === undefined,
212
- styles: styles,
213
- testID: "duration-scroll-minute"
214
- }, otherProps)) : null, !hideSeconds ? /*#__PURE__*/_react.default.createElement(_DurationScroll.default, _extends({
215
- ref: secondsDurationScrollRef,
216
- aggressivelyGetLatestDuration: aggressivelyGetLatestDuration,
217
- allowFontScaling: allowFontScaling,
218
- decelerationRate: decelerationRate,
219
- disableInfiniteScroll: disableInfiniteScroll,
220
- initialValue: safeInitialValue.seconds,
221
- interval: secondInterval,
222
- isDisabled: secondsPickerIsDisabled,
223
- label: secondLabel ?? "s",
224
- limit: secondLimit,
225
- maximumValue: maximumSeconds,
226
- onDurationChange: setSelectedSeconds,
227
- padNumbersWithZero: padSecondsWithZero,
228
- padWithNItems: safePadWithNItems,
229
- repeatNumbersNTimes: repeatSecondNumbersNTimes,
230
- repeatNumbersNTimesNotExplicitlySet: (props === null || props === void 0 ? void 0 : props.repeatSecondNumbersNTimes) === undefined,
231
- styles: styles,
232
- testID: "duration-scroll-second"
233
- }, otherProps)) : null);
234
- });
235
- var _default = exports.default = /*#__PURE__*/_react.default.memo(TimerPicker);
236
- //# sourceMappingURL=TimerPicker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_getSafeInitialValue","_DurationScroll","_interopRequireDefault","_styles","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","TimerPicker","forwardRef","props","ref","aggressivelyGetLatestDuration","allowFontScaling","amLabel","dayInterval","dayLabel","dayLimit","daysPickerIsDisabled","decelerationRate","disableInfiniteScroll","hideDays","hideHours","hideMinutes","hideSeconds","hourInterval","hourLabel","hourLimit","hoursPickerIsDisabled","initialValue","maximumDays","maximumHours","maximumMinutes","maximumSeconds","minuteInterval","minuteLabel","minuteLimit","minutesPickerIsDisabled","onDurationChange","padDaysWithZero","padHoursWithZero","padMinutesWithZero","padSecondsWithZero","padWithNItems","pickerContainerProps","pmLabel","repeatDayNumbersNTimes","repeatHourNumbersNTimes","repeatMinuteNumbersNTimes","repeatSecondNumbersNTimes","secondInterval","secondLabel","secondLimit","secondsPickerIsDisabled","styles","customStyles","use12HourPicker","otherProps","useEffect","Audio","console","warn","Haptics","clickSoundAsset","safePadWithNItems","useMemo","isNaN","maxPadWithNItems","Math","round","safeInitialValue","getSafeInitialValue","days","hours","minutes","seconds","generateStyles","selectedDays","setSelectedDays","useState","selectedHours","setSelectedHours","selectedMinutes","setSelectedMinutes","selectedSeconds","setSelectedSeconds","daysDurationScrollRef","useRef","hoursDurationScrollRef","minutesDurationScrollRef","secondsDurationScrollRef","useImperativeHandle","_daysDurationScrollRe3","_hoursDurationScrollR3","_minutesDurationScrol3","_secondsDurationScrol3","reset","options","_daysDurationScrollRe","_hoursDurationScrollR","_minutesDurationScrol","_secondsDurationScrol","current","setValue","value","_daysDurationScrollRe2","_hoursDurationScrollR2","_minutesDurationScrol2","_secondsDurationScrol2","latestDuration","createElement","View","style","pickerContainer","testID","interval","isDisabled","label","limit","maximumValue","padNumbersWithZero","repeatNumbersNTimes","repeatNumbersNTimesNotExplicitlySet","undefined","is12HourPicker","_default","exports","React","memo"],"sources":["TimerPicker.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { View } from \"react-native\";\n\nimport { getSafeInitialValue } from \"../../utils/getSafeInitialValue\";\nimport DurationScroll from \"../DurationScroll\";\nimport type { DurationScrollRef } from \"../DurationScroll\";\n\nimport { generateStyles } from \"./styles\";\nimport type { TimerPickerProps, TimerPickerRef } from \"./types\";\n\nconst TimerPicker = forwardRef<TimerPickerRef, TimerPickerProps>(\n (props, ref) => {\n const {\n aggressivelyGetLatestDuration = false,\n allowFontScaling = false,\n amLabel = \"am\",\n dayInterval = 1,\n dayLabel,\n dayLimit,\n daysPickerIsDisabled = false,\n decelerationRate = 0.88,\n disableInfiniteScroll = false,\n hideDays = true,\n hideHours = false,\n hideMinutes = false,\n hideSeconds = false,\n hourInterval = 1,\n hourLabel,\n hourLimit,\n hoursPickerIsDisabled = false,\n initialValue,\n maximumDays = 30,\n maximumHours = 23,\n maximumMinutes = 59,\n maximumSeconds = 59,\n minuteInterval = 1,\n minuteLabel,\n minuteLimit,\n minutesPickerIsDisabled = false,\n onDurationChange,\n padDaysWithZero = false,\n padHoursWithZero = false,\n padMinutesWithZero = true,\n padSecondsWithZero = true,\n padWithNItems = 1,\n pickerContainerProps,\n pmLabel = \"pm\",\n repeatDayNumbersNTimes = 3,\n repeatHourNumbersNTimes = 8,\n repeatMinuteNumbersNTimes = 3,\n repeatSecondNumbersNTimes = 3,\n secondInterval = 1,\n secondLabel,\n secondLimit,\n secondsPickerIsDisabled = false,\n styles: customStyles,\n use12HourPicker = false,\n ...otherProps\n } = props;\n\n useEffect(() => {\n if (otherProps.Audio) {\n console.warn(\n 'The \"Audio\" prop is deprecated and will be removed in a future version. Please use the \"pickerFeedback\" prop instead.'\n );\n }\n if (otherProps.Haptics) {\n console.warn(\n 'The \"Haptics\" prop is deprecated and will be removed in a future version. Please use the \"pickerFeedback\" prop instead.'\n );\n }\n if (otherProps.clickSoundAsset) {\n console.warn(\n 'The \"clickSoundAsset\" prop is deprecated and will be removed in a future version. Please use the \"pickerFeedback\" prop instead.'\n );\n }\n }, [otherProps.Audio, otherProps.Haptics, otherProps.clickSoundAsset]);\n\n const safePadWithNItems = useMemo(() => {\n if (padWithNItems < 0 || isNaN(padWithNItems)) {\n return 0;\n }\n\n const maxPadWithNItems = hideHours ? 15 : 6;\n\n if (padWithNItems > maxPadWithNItems) {\n return maxPadWithNItems;\n }\n\n return Math.round(padWithNItems);\n }, [hideHours, padWithNItems]);\n\n const safeInitialValue = useMemo(\n () =>\n getSafeInitialValue({\n days: initialValue?.days,\n hours: initialValue?.hours,\n minutes: initialValue?.minutes,\n seconds: initialValue?.seconds,\n }),\n [\n initialValue?.days,\n initialValue?.hours,\n initialValue?.minutes,\n initialValue?.seconds,\n ]\n );\n\n const styles = useMemo(\n () => generateStyles(customStyles),\n\n [customStyles]\n );\n\n const [selectedDays, setSelectedDays] = useState(safeInitialValue.days);\n const [selectedHours, setSelectedHours] = useState(\n safeInitialValue.hours\n );\n const [selectedMinutes, setSelectedMinutes] = useState(\n safeInitialValue.minutes\n );\n const [selectedSeconds, setSelectedSeconds] = useState(\n safeInitialValue.seconds\n );\n\n useEffect(() => {\n onDurationChange?.({\n days: selectedDays,\n hours: selectedHours,\n minutes: selectedMinutes,\n seconds: selectedSeconds,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedDays, selectedHours, selectedMinutes, selectedSeconds]);\n\n const daysDurationScrollRef = useRef<DurationScrollRef>(null);\n const hoursDurationScrollRef = useRef<DurationScrollRef>(null);\n const minutesDurationScrollRef = useRef<DurationScrollRef>(null);\n const secondsDurationScrollRef = useRef<DurationScrollRef>(null);\n\n useImperativeHandle(ref, () => ({\n reset: (options) => {\n setSelectedDays(safeInitialValue.days);\n setSelectedHours(safeInitialValue.hours);\n setSelectedMinutes(safeInitialValue.minutes);\n setSelectedSeconds(safeInitialValue.seconds);\n daysDurationScrollRef.current?.reset(options);\n hoursDurationScrollRef.current?.reset(options);\n minutesDurationScrollRef.current?.reset(options);\n secondsDurationScrollRef.current?.reset(options);\n },\n setValue: (value, options) => {\n if (value.days) {\n setSelectedDays(value.days);\n daysDurationScrollRef.current?.setValue(\n value.days,\n options\n );\n }\n if (value.hours) {\n setSelectedHours(value.hours);\n hoursDurationScrollRef.current?.setValue(\n value.hours,\n options\n );\n }\n if (value.minutes) {\n setSelectedMinutes(value.minutes);\n minutesDurationScrollRef.current?.setValue(\n value.minutes,\n options\n );\n }\n if (value.seconds) {\n setSelectedSeconds(value.seconds);\n secondsDurationScrollRef.current?.setValue(\n value.seconds,\n options\n );\n }\n },\n latestDuration: {\n days: daysDurationScrollRef.current?.latestDuration,\n hours: hoursDurationScrollRef.current?.latestDuration,\n minutes: minutesDurationScrollRef.current?.latestDuration,\n seconds: secondsDurationScrollRef.current?.latestDuration,\n },\n }));\n\n return (\n <View\n {...pickerContainerProps}\n style={styles.pickerContainer}\n testID=\"timer-picker\">\n {!hideDays ? (\n <DurationScroll\n ref={daysDurationScrollRef}\n aggressivelyGetLatestDuration={\n aggressivelyGetLatestDuration\n }\n allowFontScaling={allowFontScaling}\n disableInfiniteScroll={disableInfiniteScroll}\n initialValue={safeInitialValue.days}\n interval={dayInterval}\n isDisabled={daysPickerIsDisabled}\n label={dayLabel ?? \"d\"}\n limit={dayLimit}\n maximumValue={maximumDays}\n onDurationChange={setSelectedDays}\n padNumbersWithZero={padDaysWithZero}\n padWithNItems={safePadWithNItems}\n repeatNumbersNTimes={repeatDayNumbersNTimes}\n repeatNumbersNTimesNotExplicitlySet={\n props?.repeatDayNumbersNTimes === undefined\n }\n styles={styles}\n testID=\"duration-scroll-day\"\n {...otherProps}\n />\n ) : null}\n {!hideHours ? (\n <DurationScroll\n ref={hoursDurationScrollRef}\n aggressivelyGetLatestDuration={\n aggressivelyGetLatestDuration\n }\n allowFontScaling={allowFontScaling}\n amLabel={amLabel}\n decelerationRate={decelerationRate}\n disableInfiniteScroll={disableInfiniteScroll}\n initialValue={safeInitialValue.hours}\n interval={hourInterval}\n is12HourPicker={use12HourPicker}\n isDisabled={hoursPickerIsDisabled}\n label={\n hourLabel ?? (!use12HourPicker ? \"h\" : undefined)\n }\n limit={hourLimit}\n maximumValue={maximumHours}\n onDurationChange={setSelectedHours}\n padNumbersWithZero={padHoursWithZero}\n padWithNItems={safePadWithNItems}\n pmLabel={pmLabel}\n repeatNumbersNTimes={repeatHourNumbersNTimes}\n repeatNumbersNTimesNotExplicitlySet={\n props?.repeatHourNumbersNTimes === undefined\n }\n styles={styles}\n testID=\"duration-scroll-hour\"\n {...otherProps}\n />\n ) : null}\n {!hideMinutes ? (\n <DurationScroll\n ref={minutesDurationScrollRef}\n aggressivelyGetLatestDuration={\n aggressivelyGetLatestDuration\n }\n allowFontScaling={allowFontScaling}\n decelerationRate={decelerationRate}\n disableInfiniteScroll={disableInfiniteScroll}\n initialValue={safeInitialValue.minutes}\n interval={minuteInterval}\n isDisabled={minutesPickerIsDisabled}\n label={minuteLabel ?? \"m\"}\n limit={minuteLimit}\n maximumValue={maximumMinutes}\n onDurationChange={setSelectedMinutes}\n padNumbersWithZero={padMinutesWithZero}\n padWithNItems={safePadWithNItems}\n repeatNumbersNTimes={repeatMinuteNumbersNTimes}\n repeatNumbersNTimesNotExplicitlySet={\n props?.repeatMinuteNumbersNTimes === undefined\n }\n styles={styles}\n testID=\"duration-scroll-minute\"\n {...otherProps}\n />\n ) : null}\n {!hideSeconds ? (\n <DurationScroll\n ref={secondsDurationScrollRef}\n aggressivelyGetLatestDuration={\n aggressivelyGetLatestDuration\n }\n allowFontScaling={allowFontScaling}\n decelerationRate={decelerationRate}\n disableInfiniteScroll={disableInfiniteScroll}\n initialValue={safeInitialValue.seconds}\n interval={secondInterval}\n isDisabled={secondsPickerIsDisabled}\n label={secondLabel ?? \"s\"}\n limit={secondLimit}\n maximumValue={maximumSeconds}\n onDurationChange={setSelectedSeconds}\n padNumbersWithZero={padSecondsWithZero}\n padWithNItems={safePadWithNItems}\n repeatNumbersNTimes={repeatSecondNumbersNTimes}\n repeatNumbersNTimesNotExplicitlySet={\n props?.repeatSecondNumbersNTimes === undefined\n }\n styles={styles}\n testID=\"duration-scroll-second\"\n {...otherProps}\n />\n ) : null}\n </View>\n );\n }\n);\n\nexport default React.memo(TimerPicker);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA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8I,cAAK,CAACC,IAAI,CAACxH,WAAW,CAAC","ignoreList":[]}
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _TimerPicker.default;
11
- }
12
- });
13
- var _TimerPicker = _interopRequireDefault(require("./TimerPicker"));
14
- var _types = require("./types");
15
- Object.keys(_types).forEach(function (key) {
16
- if (key === "default" || key === "__esModule") return;
17
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
- if (key in exports && exports[key] === _types[key]) return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
26
- var _styles = require("./styles");
27
- Object.keys(_styles).forEach(function (key) {
28
- if (key === "default" || key === "__esModule") return;
29
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
30
- if (key in exports && exports[key] === _styles[key]) return;
31
- Object.defineProperty(exports, key, {
32
- enumerable: true,
33
- get: function () {
34
- return _styles[key];
35
- }
36
- });
37
- });
38
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_TimerPicker","_interopRequireDefault","require","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_styles","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default } from \"./TimerPicker\";\n\nexport * from \"./types\";\n\nexport * from \"./styles\";\n\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,OAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,OAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,OAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAAyB,SAAAN,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,121 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.generateStyles = void 0;
7
- var _reactNative = require("react-native");
8
- const DARK_MODE_BACKGROUND_COLOR = "#232323";
9
- const DARK_MODE_TEXT_COLOR = "#E9E9E9";
10
- const LIGHT_MODE_BACKGROUND_COLOR = "#F1F1F1";
11
- const LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
12
- const generateStyles = customStyles => {
13
- var _customStyles$pickerL, _customStyles$text, _customStyles$pickerA, _customStyles$pickerL2, _customStyles$text2, _customStyles$pickerI, _customStyles$text3;
14
- const backgroundColor = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.backgroundColor) ?? ((customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_BACKGROUND_COLOR : LIGHT_MODE_BACKGROUND_COLOR);
15
- const textColor = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : LIGHT_MODE_TEXT_COLOR;
16
- const pickerLabelFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerL = customStyles.pickerLabel) === null || _customStyles$pickerL === void 0 ? void 0 : _customStyles$pickerL.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text = customStyles.text) === null || _customStyles$text === void 0 ? void 0 : _customStyles$text.fontSize) ?? 18;
17
- const pickerAmPmFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerA = customStyles.pickerAmPmLabel) === null || _customStyles$pickerA === void 0 ? void 0 : _customStyles$pickerA.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$pickerL2 = customStyles.pickerLabel) === null || _customStyles$pickerL2 === void 0 ? void 0 : _customStyles$pickerL2.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text2 = customStyles.text) === null || _customStyles$text2 === void 0 ? void 0 : _customStyles$text2.fontSize) ?? 18;
18
- const pickerItemFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerI = customStyles.pickerItem) === null || _customStyles$pickerI === void 0 ? void 0 : _customStyles$pickerI.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text3 = customStyles.text) === null || _customStyles$text3 === void 0 ? void 0 : _customStyles$text3.fontSize) ?? 25;
19
-
20
- // This offset makes the picker label appear to be aligned with the picker item
21
- // despite them having different font sizes
22
- const pickerLabelVerticalOffset = pickerItemFontSize - pickerLabelFontSize - 1;
23
- const pickerAmPmVerticalOffset = pickerItemFontSize - pickerAmPmFontSize - 1;
24
-
25
- // The label is absolutely positioned, so we need to offset it for it to appear
26
- // in the correct position. We offset it to the left of the container so that
27
- // the width of the label doesn't impact its position.
28
- const extraLabelOffsetPercentage = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.labelOffsetPercentage) ?? 8;
29
- const baseLeftOffsetPercentage = 70;
30
- const labelOffsetPercentage = baseLeftOffsetPercentage + extraLabelOffsetPercentage;
31
- return _reactNative.StyleSheet.create({
32
- pickerContainer: {
33
- flexDirection: "row",
34
- backgroundColor,
35
- width: "100%",
36
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerContainer)
37
- },
38
- pickerLabelContainer: {
39
- position: "absolute",
40
- top: 0,
41
- bottom: 0,
42
- left: `${labelOffsetPercentage}%`,
43
- justifyContent: "center",
44
- marginTop: pickerLabelVerticalOffset,
45
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabelContainer)
46
- },
47
- pickerLabel: {
48
- fontSize: 18,
49
- fontWeight: "bold",
50
- color: textColor,
51
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
52
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabel)
53
- },
54
- pickerItemContainer: {
55
- flexDirection: "row",
56
- height: 50,
57
- justifyContent: "center",
58
- alignItems: "center",
59
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItemContainer)
60
- },
61
- pickerItem: {
62
- textAlignVertical: "center",
63
- fontSize: 25,
64
- overflow: "visible",
65
- color: textColor,
66
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
67
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem)
68
- },
69
- pickerAmPmContainer: {
70
- position: "absolute",
71
- top: 0,
72
- bottom: 0,
73
- left: `${labelOffsetPercentage}%`,
74
- justifyContent: "center",
75
- marginTop: pickerAmPmVerticalOffset,
76
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabelContainer),
77
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerAmPmContainer)
78
- },
79
- pickerAmPmLabel: {
80
- fontSize: 18,
81
- fontWeight: "bold",
82
- color: textColor,
83
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
84
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabel),
85
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerAmPmLabel)
86
- },
87
- disabledPickerContainer: {
88
- opacity: 0.4,
89
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.disabledPickerContainer)
90
- },
91
- disabledPickerItem: {
92
- opacity: 0.2,
93
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.disabledPickerItem)
94
- },
95
- maskedView: {
96
- flex: 1
97
- },
98
- pickerGradientOverlay: {
99
- position: "absolute",
100
- width: "100%",
101
- height: "100%",
102
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerGradientOverlay)
103
- },
104
- durationScrollFlatListContainer: {
105
- flex: 1,
106
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatListContainer)
107
- },
108
- durationScrollFlatList: {
109
- // These paddings allow the inner am/pm label to
110
- // spill out of the flatlist
111
- paddingRight: "25%",
112
- marginRight: "-25%",
113
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatList)
114
- },
115
- durationScrollFlatListContentContainer: {
116
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatListContentContainer)
117
- }
118
- });
119
- };
120
- exports.generateStyles = generateStyles;
121
- //# sourceMappingURL=styles.js.map