@draftbit/core 49.4.4-7c77a4.2 → 49.4.4-c6829d.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Provider.js +1 -1
- package/lib/commonjs/components/AccordionGroup.js +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheet.js +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js +1 -1
- package/lib/commonjs/components/ActionSheet/index.js +1 -1
- package/lib/commonjs/components/AspectRatio.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/BottomSheet/index.js +1 -1
- package/lib/commonjs/components/Button.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/index.js +1 -1
- package/lib/commonjs/components/Config.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +1 -1
- package/lib/commonjs/components/DeckSwiper/index.js +1 -1
- package/lib/commonjs/components/Divider.js +1 -1
- package/lib/commonjs/components/Elevation.js +1 -1
- package/lib/commonjs/components/FormRow.js +1 -1
- package/lib/commonjs/components/IconButton.js +1 -1
- package/lib/commonjs/components/Image.js +1 -1
- package/lib/commonjs/components/KeyboardAvoidingView.js +1 -1
- package/lib/commonjs/components/Layout/AspectRatio.js +1 -1
- package/lib/commonjs/components/Layout/Center.js +1 -1
- package/lib/commonjs/components/Layout/Circle.js +1 -1
- package/lib/commonjs/components/Layout/HStack.js +1 -1
- package/lib/commonjs/components/Layout/LayoutCommon.js +1 -1
- package/lib/commonjs/components/Layout/Spacer.js +1 -1
- package/lib/commonjs/components/Layout/Square.js +1 -1
- package/lib/commonjs/components/Layout/VStack.js +1 -1
- package/lib/commonjs/components/Layout/ZStack.js +1 -1
- package/lib/commonjs/components/Layout/index.js +1 -1
- package/lib/commonjs/components/Markdown.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/index.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlaybackWrapper.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlayerCommon.js +1 -1
- package/lib/commonjs/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
- package/lib/commonjs/components/MediaPlayer/VideoPlayer/index.js +1 -1
- package/lib/commonjs/components/NumberInput.js +1 -1
- package/lib/commonjs/components/Picker/NativePicker.js +1 -1
- package/lib/commonjs/components/Picker/PickerCommon.js +1 -1
- package/lib/commonjs/components/Picker/PickerInputContainer.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/DropDownPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/PickerItem.js +1 -1
- package/lib/commonjs/components/Picker/index.js +1 -1
- package/lib/commonjs/components/PinInput/CustomPinInputCell.js +1 -1
- package/lib/commonjs/components/PinInput/PinInput.js +1 -1
- package/lib/commonjs/components/PinInput/PinInputText.js +1 -1
- package/lib/commonjs/components/PinInput/index.js +1 -1
- package/lib/commonjs/components/Portal/Portal.js +1 -1
- package/lib/commonjs/components/Portal/PortalConsumer.js +1 -1
- package/lib/commonjs/components/Portal/PortalHost.js +1 -1
- package/lib/commonjs/components/Portal/PortalManager.js +1 -1
- package/lib/commonjs/components/Pressable.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/index.js +1 -1
- package/lib/commonjs/components/Progress/IndeterminateProgress.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/index.js +1 -1
- package/lib/commonjs/components/Progress/ProgressCommon.js +1 -1
- package/lib/commonjs/components/ProgressIndicator.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/RadioButton/index.js +1 -1
- package/lib/commonjs/components/Row.js +1 -1
- package/lib/commonjs/components/SVG.js +1 -1
- package/lib/commonjs/components/SVG.native.js +1 -1
- package/lib/commonjs/components/ScreenContainer.js +1 -1
- package/lib/commonjs/components/SectionList/SectionHeader.js +1 -1
- package/lib/commonjs/components/SectionList/SectionList.js +1 -1
- package/lib/commonjs/components/SectionList/index.js +1 -1
- package/lib/commonjs/components/Shadow.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +1 -1
- package/lib/commonjs/components/Slider.js +1 -1
- package/lib/commonjs/components/StarRating.js +1 -1
- package/lib/commonjs/components/StepIndicator.js +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Surface.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItem.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItemButton.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItemCommon.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableList.js +1 -1
- package/lib/commonjs/components/SwipeableItem/index.js +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js +1 -1
- package/lib/commonjs/components/Swiper/index.js +1 -1
- package/lib/commonjs/components/Switch.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js +1 -1
- package/lib/commonjs/components/TabView/TabViewItem.js +1 -1
- package/lib/commonjs/components/TabView/index.js +1 -1
- package/lib/commonjs/components/Table/Table.js +1 -1
- package/lib/commonjs/components/Table/TableCell.js +1 -1
- package/lib/commonjs/components/Table/TableCommon.js +1 -1
- package/lib/commonjs/components/Table/TableRow.js +1 -1
- package/lib/commonjs/components/Table/index.js +1 -1
- package/lib/commonjs/components/Text.js +1 -1
- package/lib/commonjs/components/TextField.js +1 -1
- package/lib/commonjs/components/TextInput.js +1 -1
- package/lib/commonjs/components/Touchable.js +1 -1
- package/lib/commonjs/components/Touchable.web.js +1 -1
- package/lib/commonjs/components/Typography.js +1 -1
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.js +1 -1
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.native.js +2 -2
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayerProps.js +1 -1
- package/lib/commonjs/components/YoutubePlayer/index.js +1 -1
- package/lib/commonjs/components/useAuthState.js +1 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/deprecated-components/AccordionItem.js +1 -1
- package/lib/commonjs/deprecated-components/AnimatedCircularProgress.js +1 -1
- package/lib/commonjs/deprecated-components/AvatarEdit.js +1 -1
- package/lib/commonjs/deprecated-components/AvoidKeyboardView.js +1 -1
- package/lib/commonjs/deprecated-components/Banner.js +1 -1
- package/lib/commonjs/deprecated-components/Card.js +1 -1
- package/lib/commonjs/deprecated-components/CheckboxGroup.js +1 -1
- package/lib/commonjs/deprecated-components/CircleImage.js +1 -1
- package/lib/commonjs/deprecated-components/CircularProgress.js +1 -1
- package/lib/commonjs/deprecated-components/Container.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedButton.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedFAB.js +1 -1
- package/lib/commonjs/deprecated-components/FAB.js +1 -1
- package/lib/commonjs/deprecated-components/FieldSearchBarFull.js +1 -1
- package/lib/commonjs/deprecated-components/Layout.js +1 -1
- package/lib/commonjs/deprecated-components/ProgressBar.js +1 -1
- package/lib/commonjs/deprecated-components/ProgressCircle.js +1 -1
- package/lib/commonjs/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/lib/commonjs/deprecated-components/RowBodyIcon.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageCaption.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageIcon.js +1 -1
- package/lib/commonjs/deprecated-components/ToggleButton.js +1 -1
- package/lib/commonjs/hooks.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/interfaces/Icon.js +1 -1
- package/lib/commonjs/styles/DarkTheme.js +1 -1
- package/lib/commonjs/styles/DefaultTheme.js +1 -1
- package/lib/commonjs/styles/fonts.js +1 -1
- package/lib/commonjs/styles/overlay.js +1 -1
- package/lib/commonjs/styles/shadow.js +1 -1
- package/lib/commonjs/theming.js +1 -1
- package/lib/commonjs/utilities.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["reversed","children","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Layout/ZStack.tsx";import React from"react";import{View}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";var ZStack=function ZStack(_ref){var reversed=_ref.reversed,children=_ref.children,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var childSizes=React.useRef(new Map());var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),maxChildWidth=_React$useState2[0],setMaxChildWidth=_React$useState2[1];var _React$useState3=React.useState(),_React$useState4=_slicedToArray(_React$useState3,2),maxChildHeight=_React$useState4[0],setMaxChildHeight=_React$useState4[1];var onChildLayout=React.useCallback(function(index,width,height){childSizes.current.set(index,{width:width,height:height});var maxWidth=0;var maxHeight=0;for(var _ref2 of childSizes.current.values()){var _width=_ref2.width;var _height=_ref2.height;if(_width>maxWidth){maxWidth=_width;}if(_height>maxHeight){maxHeight=_height;}}setMaxChildWidth(maxWidth);setMaxChildHeight(maxHeight);},[setMaxChildWidth,setMaxChildHeight]);var absoluteChildren=React.useMemo(function(){var childrenArray=React.Children.toArray(children);if(reversed){childrenArray=childrenArray.reverse();}return childrenArray.map(function(child,index){var props=child.props||{};return React.cloneElement(child,Object.assign({},props,{onLayout:function onLayout(event){var layout=event.nativeEvent.layout;var fullWidth=layout.x+layout.width;var fullHeight=layout.y+layout.height;onChildLayout(index,fullWidth,fullHeight);props.onLayout==null?void 0:props.onLayout(event);},key:index,style:Object.assign({position:"absolute",zIndex:index+1},props.style)}),props.children);});},[children,reversed,onChildLayout]);React.useEffect(function(){childSizes.current.clear();},[absoluteChildren.length]);return _jsx(View,Object.assign({style:[maxChildWidth&&maxChildHeight?{width:maxChildWidth,height:maxChildHeight}:{},style]},rest,{children:absoluteChildren}));};export default ZStack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{default as AspectRatio}from"./AspectRatio";export{default as Circle}from"./Circle";export{default as Center}from"./Center";export{default as HStack}from"./HStack";export{default as VStack}from"./VStack";export{default as ZStack}from"./ZStack";export{default as Spacer}from"./Spacer";export{default as Square}from"./Square";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Markdown.tsx";import*as React from"react";import{StyleSheet}from"react-native";import MarkdownComponent from"react-native-markdown-display";import{jsx as _jsx}from"react/jsx-runtime";var childToString=function childToString(child){if(typeof child==="undefined"||child===null||typeof child==="boolean"){return"";}if(JSON.stringify(child)==="{}"){return"";}return child.toString();};var Markdown=function Markdown(_ref){var childrenProp=_ref.children,style=_ref.style;var children=React.Children.toArray(childrenProp);var text=children.map(childToString).join("");return _jsx(MarkdownComponent,{style:{body:StyleSheet.flatten(style)},children:text});};export default Markdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","theme","thumbColor","completedTrackColor","remainingTrackColor","togglePlaybackIconSize","togglePlaybackIconColor","onPlaybackStatusUpdate","onPlaybackFinish","hidePlaybackIcon","hideDuration","hideSlider"],_excluded2=["color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx";import*as React from"react";import{Text,View,StyleSheet}from"react-native";import{AntDesign}from"@expo/vector-icons";import{withTheme}from"../../../theming";import Slider from"@react-native-community/slider";import HeadlessAudioPlayer from"./HeadlessAudioPlayer";import Pressable from"../../Pressable";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var AudioPlayerWithInterface=React.forwardRef(function(_ref,ref){var style=_ref.style,theme=_ref.theme,_ref$thumbColor=_ref.thumbColor,thumbColor=_ref$thumbColor===void 0?theme.colors.primary:_ref$thumbColor,_ref$completedTrackCo=_ref.completedTrackColor,completedTrackColor=_ref$completedTrackCo===void 0?theme.colors.primary:_ref$completedTrackCo,_ref$remainingTrackCo=_ref.remainingTrackColor,remainingTrackColor=_ref$remainingTrackCo===void 0?theme.colors.divider:_ref$remainingTrackCo,_ref$togglePlaybackIc=_ref.togglePlaybackIconSize,togglePlaybackIconSize=_ref$togglePlaybackIc===void 0?24:_ref$togglePlaybackIc,_ref$togglePlaybackIc2=_ref.togglePlaybackIconColor,togglePlaybackIconColor=_ref$togglePlaybackIc2===void 0?theme.colors.primary:_ref$togglePlaybackIc2,onPlaybackStatusUpdateProp=_ref.onPlaybackStatusUpdate,onPlaybackFinishProp=_ref.onPlaybackFinish,_ref$hidePlaybackIcon=_ref.hidePlaybackIcon,hidePlaybackIcon=_ref$hidePlaybackIcon===void 0?false:_ref$hidePlaybackIcon,_ref$hideDuration=_ref.hideDuration,hideDuration=_ref$hideDuration===void 0?false:_ref$hideDuration,_ref$hideSlider=_ref.hideSlider,hideSlider=_ref$hideSlider===void 0?false:_ref$hideSlider,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPlaying=_React$useState2[0],setIsPlaying=_React$useState2[1];var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isLoading=_React$useState4[0],setIsLoading=_React$useState4[1];var _React$useState5=React.useState(1),_React$useState6=_slicedToArray(_React$useState5,2),durationMillis=_React$useState6[0],setDurationMillis=_React$useState6[1];var _React$useState7=React.useState(false),_React$useState8=_slicedToArray(_React$useState7,2),isDraggingSlider=_React$useState8[0],setIsDraggingSlider=_React$useState8[1];var _React$useState9=React.useState(0),_React$useState10=_slicedToArray(_React$useState9,2),sliderPositionMillis=_React$useState10[0],setSliderPositionMillis=_React$useState10[1];var newHeadlessAudioPlayerRef=React.useRef(null);var headlessAudioPlayerRef=ref?ref:newHeadlessAudioPlayerRef;var _StyleSheet$flatten=StyleSheet.flatten(style||{}),color=_StyleSheet$flatten.color,fontFamily=_StyleSheet$flatten.fontFamily,fontWeight=_StyleSheet$flatten.fontWeight,fontSize=_StyleSheet$flatten.fontSize,lineHeight=_StyleSheet$flatten.lineHeight,letterSpacing=_StyleSheet$flatten.letterSpacing,textTransform=_StyleSheet$flatten.textTransform,textAlign=_StyleSheet$flatten.textAlign,textDecorationLine=_StyleSheet$flatten.textDecorationLine,textDecorationColor=_StyleSheet$flatten.textDecorationColor,textDecorationStyle=_StyleSheet$flatten.textDecorationStyle,viewStyles=_objectWithoutProperties(_StyleSheet$flatten,_excluded2);var textStyles={color:color,fontFamily:fontFamily,fontWeight:fontWeight,fontSize:fontSize,lineHeight:lineHeight,letterSpacing:letterSpacing,textTransform:textTransform,textAlign:textAlign,textDecorationLine:textDecorationLine,textDecorationColor:textDecorationColor,textDecorationStyle:textDecorationStyle};var onPlaybackStatusUpdate=function onPlaybackStatusUpdate(status){setIsLoading(status.isLoading);setDurationMillis(status.durationMillis);setSliderPositionMillis(status.currentPositionMillis);setIsPlaying(status.isPlaying);onPlaybackStatusUpdateProp==null?void 0:onPlaybackStatusUpdateProp(status);};var onPlaybackFinish=function onPlaybackFinish(){var _headlessAudioPlayerR,_headlessAudioPlayerR2;setIsPlaying(false);setSliderPositionMillis(0);(_headlessAudioPlayerR=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR.togglePlayback();(_headlessAudioPlayerR2=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR2.seekToPosition(0);onPlaybackFinishProp==null?void 0:onPlaybackFinishProp();};var onSlidingComplete=function onSlidingComplete(sliderValue){var _headlessAudioPlayerR3;if(isDraggingSlider){setIsDraggingSlider(false);}(_headlessAudioPlayerR3=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR3.seekToPosition(sliderValue);};var onSliderChange=function onSliderChange(){if(!isDraggingSlider){setIsDraggingSlider(true);}};var iconName;if(isLoading){iconName="loading1";}else if(isPlaying){iconName="pause";}else{iconName="play";}return _jsxs(_Fragment,{children:[_jsx(HeadlessAudioPlayer,Object.assign({},rest,{ref:headlessAudioPlayerRef,onPlaybackStatusUpdate:onPlaybackStatusUpdate,onPlaybackFinish:onPlaybackFinish})),_jsxs(View,{testID:"audio-player-interface",style:[{backgroundColor:theme.colors.background,borderColor:theme.colors.divider},styles.container,viewStyles],children:[!hidePlaybackIcon&&_jsx(Pressable,{testID:"audio-player-playback-icon",onPress:function onPress(){var _headlessAudioPlayerR4;return(_headlessAudioPlayerR4=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR4.togglePlayback();},style:styles.spacingEnd,children:_jsx(AntDesign,{name:iconName,size:togglePlaybackIconSize,color:togglePlaybackIconColor})}),!hideDuration&&_jsxs(Text,{testID:"audio-player-duration",style:[{color:theme.colors.strong},styles.spacingEnd,Object.assign({},textStyles)],children:[formatDuration(sliderPositionMillis!=null?sliderPositionMillis:0)," /"," ",formatDuration(durationMillis||0)]}),!hideSlider&&_jsx(Slider,{testID:"audio-player-slider",style:styles.slider,minimumTrackTintColor:completedTrackColor,maximumTrackTintColor:remainingTrackColor,thumbTintColor:thumbColor,minimumValue:0,value:sliderPositionMillis,maximumValue:durationMillis,onValueChange:onSliderChange,onSlidingComplete:onSlidingComplete})]})]});});var styles=StyleSheet.create({container:{padding:8,flexDirection:"row",alignItems:"center",borderRadius:8,borderWidth:1},spacingEnd:{marginEnd:8},slider:{flex:1}});function formatDuration(duration){if(duration===0)return"00:00";var seconds=Math.floor(duration/1000%60);var minutes=Math.floor(duration/(1000*60)%60);var hours=Math.floor(duration/(1000*60*60)%24);var renderedHours=hours<10?"0"+hours:hours;var renderedMinutes=minutes<10?"0"+minutes:minutes;var renderedSeconds=seconds<10?"0"+seconds:seconds;if(hours>0){return renderedHours+":"+renderedMinutes+":"+renderedSeconds;}return renderedMinutes+":"+renderedSeconds;}export default withTheme(AudioPlayerWithInterface);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.tsx";import*as React from"react";import{Audio,InterruptionModeIOS,InterruptionModeAndroid}from"expo-av";import{mapToMediaPlayerStatus}from"../MediaPlayerCommon";import MediaPlaybackWrapper from"../MediaPlaybackWrapper";import{jsx as _jsx}from"react/jsx-runtime";var HeadlessAudioPlayer=React.forwardRef(function(_ref,ref){var source=_ref.source,_ref$interruptionMode=_ref.interruptionMode,interruptionMode=_ref$interruptionMode===void 0?"lower volume":_ref$interruptionMode,_ref$playsInBackgroun=_ref.playsInBackground,playsInBackground=_ref$playsInBackgroun===void 0?false:_ref$playsInBackgroun,_ref$playsInSilentMod=_ref.playsInSilentModeIOS,playsInSilentModeIOS=_ref$playsInSilentMod===void 0?false:_ref$playsInSilentMod,_ref$playThroughEarpi=_ref.playThroughEarpieceAndroid,playThroughEarpieceAndroid=_ref$playThroughEarpi===void 0?false:_ref$playThroughEarpi,onPlaybackStatusUpdateProp=_ref.onPlaybackStatusUpdate,onPlaybackFinish=_ref.onPlaybackFinish;var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),currentSound=_React$useState2[0],setCurrentSound=_React$useState2[1];var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isPlaying=_React$useState4[0],setIsPlaying=_React$useState4[1];var updateAudioMode=React.useCallback(_asyncToGenerator(function*(){try{yield Audio.setAudioModeAsync({staysActiveInBackground:playsInBackground,interruptionModeIOS:interruptionMode==="lower volume"?InterruptionModeIOS.DuckOthers:InterruptionModeIOS.DoNotMix,interruptionModeAndroid:interruptionMode==="lower volume"?InterruptionModeAndroid.DuckOthers:InterruptionModeAndroid.DoNotMix,playsInSilentModeIOS:playsInSilentModeIOS,playThroughEarpieceAndroid:playThroughEarpieceAndroid});}catch(e){console.error("Failed to set audio mode. interruptionMode, playsInBackground, playsInSilentModeIOS, playThroughEarpieceAndroid might not be set. Failed with",e);}}),[interruptionMode,playsInBackground,playsInSilentModeIOS,playThroughEarpieceAndroid]);var onPlaybackStatusUpdate=function onPlaybackStatusUpdate(status){var mappedStatus=mapToMediaPlayerStatus(status);onPlaybackStatusUpdateProp==null?void 0:onPlaybackStatusUpdateProp(mappedStatus);if(status.isLoaded){if(status.didJustFinish){onPlaybackFinish==null?void 0:onPlaybackFinish();}setIsPlaying(status.isPlaying);}};var onTogglePlayback=function onTogglePlayback(){updateAudioMode();};var loadAudio=function(){var _ref3=_asyncToGenerator(function*(){onPlaybackStatusUpdateProp==null?void 0:onPlaybackStatusUpdateProp({isPlaying:false,isLoading:true,isBuffering:false,currentPositionMillis:0,durationMillis:0,bufferedDurationMillis:0,isError:false});var _yield$Audio$Sound$cr=yield Audio.Sound.createAsync(source),sound=_yield$Audio$Sound$cr.sound;setCurrentSound(sound);sound.setOnPlaybackStatusUpdate(onPlaybackStatusUpdate);});return function loadAudio(){return _ref3.apply(this,arguments);};}();useSourceDeepCompareEffect(function(){loadAudio();},[source]);return _jsx(MediaPlaybackWrapper,{ref:ref,isPlaying:isPlaying,media:currentSound,onTogglePlayback:onTogglePlayback});});function sourceDeepCompareEquals(a,b){if(a!=null&&a.uri&&b!=null&&b.uri){return a.uri===b.uri;}return a===b;}function useSourceDeepCompareMemoize(value){var ref=React.useRef();if(!sourceDeepCompareEquals(value,ref.current)){ref.current=value;}return ref.current;}function useSourceDeepCompareEffect(callback,dependencies){React.useEffect(callback,dependencies.map(useSourceDeepCompareMemoize));}export default HeadlessAudioPlayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/index.tsx";import*as React from"react";import{withTheme}from"../../../theming";import HeadlessAudioPlayer from"./HeadlessAudioPlayer";import AudioPlayerWithInterface from"./AudioPlayerWithInterface";import{jsx as _jsx}from"react/jsx-runtime";var AudioPlayer=React.forwardRef(function(_ref,ref){var _ref$mode=_ref.mode,mode=_ref$mode===void 0?"interface":_ref$mode,rest=_objectWithoutProperties(_ref,_excluded);switch(mode){case"headless":return _jsx(HeadlessAudioPlayer,Object.assign({ref:ref},rest));case"interface":return _jsx(AudioPlayerWithInterface,Object.assign({ref:ref},rest));}});export default withTheme(AudioPlayer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import*as React from"react";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsx as _jsx}from"react/jsx-runtime";var MediaPlaybackWrapper=React.forwardRef(function(_ref,ref){var media=_ref.media,isPlaying=_ref.isPlaying,onTogglePlayback=_ref.onTogglePlayback,children=_ref.children;var togglePlayback=React.useCallback(_asyncToGenerator(function*(){onTogglePlayback==null?void 0:onTogglePlayback();if(isPlaying){yield media==null?void 0:media.pauseAsync();}else{yield media==null?void 0:media.playAsync();}}),[media,isPlaying,onTogglePlayback]);var pause=React.useCallback(_asyncToGenerator(function*(){onTogglePlayback==null?void 0:onTogglePlayback();yield media==null?void 0:media.pauseAsync();}),[media,onTogglePlayback]);var play=React.useCallback(_asyncToGenerator(function*(){onTogglePlayback==null?void 0:onTogglePlayback();yield media==null?void 0:media.playAsync();}),[media,onTogglePlayback]);var seekToPosition=React.useCallback(function(){var _ref5=_asyncToGenerator(function*(positionMillis){yield media==null?void 0:media.setPositionAsync(positionMillis);});return function(_x){return _ref5.apply(this,arguments);};}(),[media]);React.useEffect(function(){return media?function(){media.unloadAsync();}:undefined;},[media]);React.useImperativeHandle(ref,function(){return{seekToPosition:seekToPosition,togglePlayback:togglePlayback,pause:pause,play:play};},[seekToPosition,togglePlayback,pause,play]);return _jsx(_Fragment,{children:children});});export default MediaPlaybackWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export function mapToMediaPlayerStatus(status){if(status.isLoaded){return{isPlaying:status.isPlaying,isLoading:false,isBuffering:status.isBuffering,currentPositionMillis:status.positionMillis||0,durationMillis:status.durationMillis||0,bufferedDurationMillis:status.playableDurationMillis||0,isError:false};}return{isPlaying:false,isLoading:false,isBuffering:false,currentPositionMillis:0,durationMillis:0,bufferedDurationMillis:0,isError:true,error:status.error};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","resizeMode","posterResizeMode","onPlaybackStatusUpdate","onPlaybackFinish"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx";import React from"react";import{Video as VideoPlayerComponent,ResizeMode as ExpoResizeMode,VideoFullscreenUpdate}from"expo-av";import{extractSizeStyles}from"../../../utilities";import MediaPlaybackWrapper from"../MediaPlaybackWrapper";import{mapToMediaPlayerStatus}from"../MediaPlayerCommon";import{jsx as _jsx}from"react/jsx-runtime";var VideoPlayer=React.forwardRef(function(_ref,ref){var style=_ref.style,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?"contain":_ref$resizeMode,_ref$posterResizeMode=_ref.posterResizeMode,posterResizeMode=_ref$posterResizeMode===void 0?"cover":_ref$posterResizeMode,onPlaybackStatusUpdateProp=_ref.onPlaybackStatusUpdate,onPlaybackFinish=_ref.onPlaybackFinish,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(),_React$useState2=_slicedToArray(_React$useState,2),videoMediaObject=_React$useState2[0],setVideoMediaObject=_React$useState2[1];var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isPlaying=_React$useState4[0],setIsPlaying=_React$useState4[1];var _React$useState5=React.useState(false),_React$useState6=_slicedToArray(_React$useState5,2),isFullscreen=_React$useState6[0],setIsFullscreen=_React$useState6[1];var mediaPlaybackWrapperRef=React.useRef(null);var sizeStyles=extractSizeStyles(style);var mappedResizeMode;switch(resizeMode){case"contain":mappedResizeMode=ExpoResizeMode.CONTAIN;break;case"cover":mappedResizeMode=ExpoResizeMode.COVER;break;case"stretch":mappedResizeMode=ExpoResizeMode.STRETCH;break;}var onPlaybackStatusUpdate=function onPlaybackStatusUpdate(status){var mappedStatus=mapToMediaPlayerStatus(status);onPlaybackStatusUpdateProp==null?void 0:onPlaybackStatusUpdateProp(mappedStatus);if(status.isLoaded){if(status.didJustFinish){onPlaybackFinish==null?void 0:onPlaybackFinish();}setIsPlaying(status.isPlaying);}};var _onFullscreenUpdate=function onFullscreenUpdate(fullscreenUpdate){switch(fullscreenUpdate){case VideoFullscreenUpdate.PLAYER_DID_PRESENT:case VideoFullscreenUpdate.PLAYER_WILL_PRESENT:setIsFullscreen(true);break;case VideoFullscreenUpdate.PLAYER_DID_DISMISS:case VideoFullscreenUpdate.PLAYER_WILL_DISMISS:setIsFullscreen(false);break;}};var toggleFullscreen=React.useCallback(_asyncToGenerator(function*(){if(isFullscreen){yield videoMediaObject==null?void 0:videoMediaObject.dismissFullscreenPlayer();}else{yield videoMediaObject==null?void 0:videoMediaObject.presentFullscreenPlayer();}}),[isFullscreen,videoMediaObject]);React.useImperativeHandle(ref,function(){var _mediaPlaybackWrapper,_mediaPlaybackWrapper2,_mediaPlaybackWrapper3,_mediaPlaybackWrapper4;return{toggleFullscreen:toggleFullscreen,seekToPosition:((_mediaPlaybackWrapper=mediaPlaybackWrapperRef.current)==null?void 0:_mediaPlaybackWrapper.seekToPosition)||function(){},togglePlayback:((_mediaPlaybackWrapper2=mediaPlaybackWrapperRef.current)==null?void 0:_mediaPlaybackWrapper2.togglePlayback)||function(){},pause:((_mediaPlaybackWrapper3=mediaPlaybackWrapperRef.current)==null?void 0:_mediaPlaybackWrapper3.pause)||function(){},play:((_mediaPlaybackWrapper4=mediaPlaybackWrapperRef.current)==null?void 0:_mediaPlaybackWrapper4.play)||function(){}};},[toggleFullscreen,isPlaying]);return _jsx(MediaPlaybackWrapper,{media:videoMediaObject,isPlaying:isPlaying,ref:mediaPlaybackWrapperRef,children:_jsx(VideoPlayerComponent,Object.assign({ref:function ref(component){return setVideoMediaObject(component);},style:style,videoStyle:sizeStyles,resizeMode:mappedResizeMode,posterStyle:[sizeStyles,{resizeMode:posterResizeMode}],onPlaybackStatusUpdate:onPlaybackStatusUpdate,onFullscreenUpdate:function onFullscreenUpdate(e){return _onFullscreenUpdate(e.fullscreenUpdate);}},rest))});});export default VideoPlayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{default}from"./VideoPlayer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["onChangeText","onChangeTextDelayed","changeTextDelay","value","defaultValue"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/NumberInput.tsx";import React,{useEffect,useState}from"react";import{TextInput as NativeTextInput}from"react-native";import{isString,isNumber,isNaN}from"lodash";import{useDebounce,useOnUpdate}from"../hooks";import{jsx as _jsx}from"react/jsx-runtime";var NumberInput=React.forwardRef(function(_ref,ref){var onChangeText=_ref.onChangeText,onChangeTextDelayed=_ref.onChangeTextDelayed,_ref$changeTextDelay=_ref.changeTextDelay,changeTextDelay=_ref$changeTextDelay===void 0?500:_ref$changeTextDelay,value=_ref.value,defaultValue=_ref.defaultValue,props=_objectWithoutProperties(_ref,_excluded);var _useState=useState(""),_useState2=_slicedToArray(_useState,2),currentStringNumberValue=_useState2[0],setCurrentStringNumberValue=_useState2[1];var delayedValue=useDebounce(value,changeTextDelay);var formatValueToStringNumber=function formatValueToStringNumber(valueToFormat){if(valueToFormat!=null){if(isString(valueToFormat)&&valueToFormat!==""){if(/^0[1-9]$/.test(valueToFormat)){return valueToFormat.slice(1);}else if(/^[+-]?([0-9]+\.?[0-9]*|\.[0-9]+)$/.test(valueToFormat)){return valueToFormat;}else{return currentStringNumberValue;}}else if(isNumber(valueToFormat)&&!isNaN(valueToFormat)){return valueToFormat.toString();}}return"";};var handleChangeText=function handleChangeText(newValue){var newStringNumberValue=formatValueToStringNumber(newValue);var number=parseFloat(newStringNumberValue);setCurrentStringNumberValue(newStringNumberValue);onChangeText==null?void 0:onChangeText(number);};useEffect(function(){var nextStringNumberValue=formatValueToStringNumber(value);if(currentStringNumberValue!==nextStringNumberValue){handleChangeText(nextStringNumberValue);}},[value]);useEffect(function(){var defaultStringNumberValue=formatValueToStringNumber(defaultValue);if(currentStringNumberValue!==defaultStringNumberValue){setCurrentStringNumberValue(defaultStringNumberValue);}},[]);useOnUpdate(function(){if(delayedValue!==undefined){var newStringNumberValue=formatValueToStringNumber(delayedValue);var number=parseFloat(newStringNumberValue);onChangeTextDelayed==null?void 0:onChangeTextDelayed(number);}},[delayedValue]);return _jsx(NativeTextInput,Object.assign({testID:"native-text-input",ref:ref,keyboardType:"numeric",value:currentStringNumberValue,onChangeText:handleChangeText},props));});export default NumberInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","theme","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/NativePicker.tsx";import*as React from"react";import{StyleSheet,Platform,Keyboard}from"react-native";import{SafeAreaView}from"react-native-safe-area-context";import{Picker as NativePickerComponent}from"@react-native-picker/picker";import Portal from"../Portal/Portal";import{Button}from"../Button";import{useDeepCompareMemo}from"../../utilities";import{normalizeToPickerOptions}from"./PickerCommon";import PickerInputContainer from"./PickerInputContainer";import{withTheme}from"../../theming";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var isIos=Platform.OS==="ios";var isWeb=Platform.OS==="web";var NativePicker=function NativePicker(_ref){var _ref$options=_ref.options,optionsProp=_ref$options===void 0?[]:_ref$options,_onValueChange=_ref.onValueChange,Icon=_ref.Icon,placeholder=_ref.placeholder,value=_ref.value,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,theme=_ref.theme,disabled=_ref.disabled,rest=_objectWithoutProperties(_ref,_excluded);var pickerRef=React.useRef(null);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),pickerVisible=_React$useState2[0],setPickerVisible=_React$useState2[1];var options=useDeepCompareMemo(function(){var normalizedOptions=normalizeToPickerOptions(optionsProp);if(placeholder){return[{label:placeholder,value:placeholder}].concat(_toConsumableArray(normalizedOptions));}else{return normalizedOptions;}},[placeholder,optionsProp]);if(!placeholder&&options.length&&!value&&value!==options[0].value){_onValueChange==null?void 0:_onValueChange(options[0].value);}var renderNativePicker=function renderNativePicker(){return _jsx(NativePickerComponent,{ref:pickerRef,testID:"native-picker-component",selectedValue:value,onValueChange:function onValueChange(newValue){if(newValue!==placeholder){_onValueChange==null?void 0:_onValueChange(newValue);}else if(newValue===placeholder){_onValueChange==null?void 0:_onValueChange("");}},style:isIos?styles.iosNativePicker:styles.nativePicker,onBlur:function onBlur(){return setPickerVisible(false);},children:options.map(function(option){return _jsx(NativePickerComponent.Item,{testID:"native-picker-item",label:option.label.toString(),value:option.value},option.value);})});};var renderPicker=function renderPicker(){if(isIos){return _jsx(Portal,{children:_jsxs(SafeAreaView,{style:styles.iosPickerContent,children:[_jsx(Button,{Icon:Icon,onPress:function onPress(){return setPickerVisible(!pickerVisible);},style:[styles.iosButton,{color:theme.colors.primary}],title:"Close"}),renderNativePicker()]})});}else{return renderNativePicker();}};React.useEffect(function(){if(pickerVisible&&pickerRef.current){var _pickerRef$current;pickerRef==null?void 0:(_pickerRef$current=pickerRef.current)==null?void 0:_pickerRef$current.focus();}},[pickerVisible,pickerRef]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);return _jsx(PickerInputContainer,Object.assign({testID:"native-picker",Icon:Icon,placeholder:placeholder,selectedValue:value,options:options,onPress:function onPress(){return setPickerVisible(!pickerVisible);},disabled:disabled},rest,{children:(pickerVisible||isWeb)&&!disabled&&renderPicker()}));};var styles=StyleSheet.create({nativePicker:Object.assign({position:"absolute",bottom:0,left:0,right:0,flexDirection:"row",justifyContent:"center",width:"100%",backgroundColor:"white",opacity:0},Platform.select({web:{height:"100%"}})),iosNativePicker:{backgroundColor:"white"},iosPickerContent:{width:"100%",position:"absolute",bottom:0,backgroundColor:"white"},iosButton:{backgroundColor:"transparent",borderWidth:0}});export default withTheme(NativePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{isObject}from"lodash";export function normalizeToPickerOptions(options){if(options.length===0){return[];}var firstOption=options[0];if(typeof firstOption==="string"||typeof firstOption==="number"){return options.map(function(option){return{label:option,value:option};});}if(isObject(firstOption)&&firstOption.value!==undefined&&firstOption.label!==undefined){return options.map(function(option){return{label:option.label,value:option.value};});}throw new Error('Picker options must be either an array of strings, numbers, or an array of { "label": string | number; "value": string | number; } objects.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["options","onPress","Icon","style","selectedValue","disabled","zIndex","children","testID"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/PickerInputContainer.tsx";import React from"react";import{View,StyleSheet}from"react-native";import omit from"lodash.omit";import{extractSizeStyles,extractPositionStyles,extractFlexItemStyles,extractBorderAndMarginStyles}from"../../utilities";import TextField from"../TextField";import Touchable from"../Touchable";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var PickerInputContainer=function PickerInputContainer(_ref){var _selectedLabel;var _ref$options=_ref.options,options=_ref$options===void 0?[]:_ref$options,onPress=_ref.onPress,Icon=_ref.Icon,style=_ref.style,selectedValue=_ref.selectedValue,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,zIndex=_ref.zIndex,children=_ref.children,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var containerStyle=StyleSheet.flatten([extractSizeStyles(style),extractPositionStyles(style),extractFlexItemStyles(style),extractBorderAndMarginStyles(style).marginStyles]);var textFieldStyle=omit(StyleSheet.flatten(style),Object.keys(containerStyle));var selectedLabel="";if(Array.isArray(selectedValue)){selectedLabel=selectedValue.map(function(value){var _options$find;return((_options$find=options.find(function(option){return option.value.toString()===value.toString();}))==null?void 0:_options$find.label.toString())||value;}).join(", ");}else{var _options$find2;selectedLabel=((_options$find2=options.find(function(option){return option.value.toString()===(selectedValue==null?void 0:selectedValue.toString());}))==null?void 0:_options$find2.label.toString())||selectedValue;}return _jsxs(View,{testID:testID,style:[containerStyle,{zIndex:zIndex}],children:[_jsx(TextField,Object.assign({Icon:Icon,numberOfLines:1,onChangeText:function onChangeText(){},value:(_selectedLabel=selectedLabel)==null?void 0:_selectedLabel.toString(),editable:false,disabled:disabled,style:textFieldStyle},rest)),_jsx(Touchable,{style:StyleSheet.absoluteFillObject,disabled:disabled,onPress:onPress,onLongPress:onPress}),children]});};export default PickerInputContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","selectedIconName","selectedIconColor","selectedIconSize","dropDownBackgroundColor","dropDownBorderColor","dropDownTextColor","dropDownBorderWidth","dropDownBorderRadius","children","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/DropDownPicker.tsx";import*as React from"react";import{Keyboard}from"react-native";import{extractStyles,flattenReactFragments,useDeepCompareMemo}from"../../../utilities";import{normalizeToPickerOptions}from"../PickerCommon";import PickerInputContainer from"../PickerInputContainer";import DropDownPickerComponent from"react-native-dropdown-picker";import{withTheme}from"../../../theming";import PickerItem from"./PickerItem";import{useOnUpdate}from"../../../hooks";import{jsx as _jsx}from"react/jsx-runtime";var DropDownPicker=function DropDownPicker(_ref){var theme=_ref.theme,_ref$options=_ref.options,optionsProp=_ref$options===void 0?[]:_ref$options,onValueChange=_ref.onValueChange,Icon=_ref.Icon,placeholder=_ref.placeholder,value=_ref.value,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,_ref$selectedIconName=_ref.selectedIconName,selectedIconName=_ref$selectedIconName===void 0?"Feather/check":_ref$selectedIconName,_ref$selectedIconColo=_ref.selectedIconColor,selectedIconColor=_ref$selectedIconColo===void 0?theme.colors.strong:_ref$selectedIconColo,_ref$selectedIconSize=_ref.selectedIconSize,selectedIconSize=_ref$selectedIconSize===void 0?20:_ref$selectedIconSize,_ref$dropDownBackgrou=_ref.dropDownBackgroundColor,dropDownBackgroundColor=_ref$dropDownBackgrou===void 0?theme.colors.background:_ref$dropDownBackgrou,_ref$dropDownBorderCo=_ref.dropDownBorderColor,dropDownBorderColor=_ref$dropDownBorderCo===void 0?theme.colors.divider:_ref$dropDownBorderCo,_ref$dropDownTextColo=_ref.dropDownTextColor,dropDownTextColor=_ref$dropDownTextColo===void 0?theme.colors.strong:_ref$dropDownTextColo,_ref$dropDownBorderWi=_ref.dropDownBorderWidth,dropDownBorderWidth=_ref$dropDownBorderWi===void 0?1:_ref$dropDownBorderWi,_ref$dropDownBorderRa=_ref.dropDownBorderRadius,dropDownBorderRadius=_ref$dropDownBorderRa===void 0?8:_ref$dropDownBorderRa,childrenProp=_ref.children,disabled=_ref.disabled,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),pickerVisible=_React$useState2[0],setPickerVisible=_React$useState2[1];var _React$useState3=React.useState(value),_React$useState4=_slicedToArray(_React$useState3,2),internalValue=_React$useState4[0],setInternalValue=_React$useState4[1];var isMultiSelect=Array.isArray(value);var pickerItemProps=React.useMemo(function(){var children=flattenReactFragments(React.Children.toArray(childrenProp));var firstPickerItem=children.find(function(child){return child.type===PickerItem;});return(firstPickerItem==null?void 0:firstPickerItem.props)||{};},[childrenProp]);var _extractStyles=extractStyles(pickerItemProps.style),pickerItemViewStyles=_extractStyles.viewStyles,pickerItemTextStyles=_extractStyles.textStyles;var options=useDeepCompareMemo(function(){return normalizeToPickerOptions(optionsProp).map(function(option){return{label:option.label.toString(),value:option.value};});},[optionsProp]);useOnUpdate(function(){onValueChange==null?void 0:onValueChange(isMultiSelect?internalValue!=null?internalValue:[]:internalValue!=null?internalValue:"");},[internalValue]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);React.useEffect(function(){if(disabled){setPickerVisible(false);}},[disabled]);return _jsx(PickerInputContainer,Object.assign({testID:"dropdown-picker",Icon:Icon,placeholder:placeholder,selectedValue:value,options:options,onPress:function onPress(){return setPickerVisible(!pickerVisible);},zIndex:pickerVisible?100:undefined,disabled:disabled},rest,{children:_jsx(DropDownPickerComponent,{open:pickerVisible,setOpen:setPickerVisible,value:value||null,setValue:setInternalValue,items:options,placeholder:placeholder,listMode:"SCROLLVIEW",multiple:isMultiSelect,style:{display:"none"},listItemLabelStyle:[{color:dropDownTextColor,fontSize:14},pickerItemTextStyles],selectedItemLabelStyle:[pickerItemProps.selectedTextColor?{color:pickerItemProps.selectedTextColor}:{},pickerItemProps.selectedTextSize?{fontSize:pickerItemProps.selectedTextSize}:{}],listItemContainerStyle:pickerItemViewStyles,selectedItemContainerStyle:pickerItemProps.selectedBackgroundColor?{backgroundColor:pickerItemProps.selectedBackgroundColor}:{},dropDownContainerStyle:{borderColor:dropDownBorderColor,borderWidth:dropDownBorderWidth,borderRadius:dropDownBorderRadius,backgroundColor:dropDownBackgroundColor},TickIconComponent:function TickIconComponent(){return _jsx(Icon,{name:selectedIconName,size:selectedIconSize,color:selectedIconColor});}})}));};export default withTheme(DropDownPicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/MultiSelectPicker.tsx";import*as React from"react";import DropDownPicker from"./DropDownPicker";import{withTheme}from"../../../theming";import{jsx as _jsx}from"react/jsx-runtime";var MultiSelectPicker=function MultiSelectPicker(_ref){var value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(DropDownPicker,Object.assign({value:value||[]},rest));};export default withTheme(MultiSelectPicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export var PickerItem=function PickerItem(){return null;};export default PickerItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/index.tsx";import React from"react";import NativePicker from"./NativePicker";import DropDownPicker from"./dropdown/DropDownPicker";import{withTheme}from"../../theming";import{jsx as _jsx}from"react/jsx-runtime";var SinglePicker=function SinglePicker(_ref){var _ref$mode=_ref.mode,mode=_ref$mode===void 0?"native":_ref$mode,rest=_objectWithoutProperties(_ref,_excluded);switch(mode){case"native":return _jsx(NativePicker,Object.assign({},rest));case"dropdown":return _jsx(DropDownPicker,Object.assign({},rest));}};export var Picker=withTheme(SinglePicker);export{default as MultiSelectPicker}from"./dropdown/MultiSelectPicker";export{default as PickerItem}from"./dropdown/PickerItem";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/CustomPinInputCell.tsx";import React from"react";import{View}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";var CustomPinInputCell=function CustomPinInputCell(props){return _jsx(View,Object.assign({},props));};export default CustomPinInputCell;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","secureTextEntry","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";import React from"react";import{View,StyleSheet,Platform}from"react-native";import TextInput from"../TextInput";import{CodeField,useClearByFocusCell}from"react-native-confirmation-code-field";import{withTheme}from"../../theming";import PinInputText from"./PinInputText";import{extractStyles}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";var PinInput=React.forwardRef(function(_ref,ref){var theme=_ref.theme,onInputFull=_ref.onInputFull,_ref$cellCount=_ref.cellCount,cellCount=_ref$cellCount===void 0?4:_ref$cellCount,_ref$clearOnCellFocus=_ref.clearOnCellFocus,clearOnCellFocus=_ref$clearOnCellFocus===void 0?true:_ref$clearOnCellFocus,_ref$blurOnFull=_ref.blurOnFull,blurOnFull=_ref$blurOnFull===void 0?true:_ref$blurOnFull,renderItem=_ref.renderItem,value=_ref.value,onChangeText=_ref.onChangeText,_ref$focusedBorderCol=_ref.focusedBorderColor,focusedBorderColor=_ref$focusedBorderCol===void 0?theme.colors.primary:_ref$focusedBorderCol,focusedBackgroundColor=_ref.focusedBackgroundColor,focusedBorderWidth=_ref.focusedBorderWidth,focusedTextColor=_ref.focusedTextColor,secureTextEntry=_ref.secureTextEntry,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var newPinInputRef=React.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=extractStyles(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=useClearByFocusCell({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=_slicedToArray(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];React.useEffect(function(){if((value==null?void 0:value.length)===cellCount){if(blurOnFull){var _pinInputRef$current;(_pinInputRef$current=pinInputRef.current)==null?void 0:_pinInputRef$current.blur();}onInputFull==null?void 0:onInputFull(value);}},[value,cellCount,blurOnFull,pinInputRef]);var _renderCell=function renderCell(cellValue,index,isFocused){if(secureTextEntry&&cellValue){cellValue="•";}var cell=(renderItem==null?void 0:renderItem({cellValue:cellValue,index:index,isFocused:isFocused}))||_jsx(View,{testID:"default-code-input-cell",style:[styles.cell,{borderColor:theme.colors.disabled},viewStyles,isFocused&&focusedBorderWidth?{borderWidth:focusedBorderWidth}:undefined,isFocused&&focusedBorderColor?{borderColor:focusedBorderColor}:undefined,isFocused&&focusedBackgroundColor?{backgroundColor:focusedBackgroundColor}:undefined],children:_jsx(PinInputText,{style:[styles.cellText,{color:theme.colors.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return React.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return _jsx(CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:[{height:"100%"},Platform.OS==="web"?{outlineWidth:0}:{}],InputComponent:TextInput,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return _jsx(React.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);},secureTextEntry:secureTextEntry},rest));});var styles=StyleSheet.create({rootContainer:{justifyContent:"center"},cell:{marginLeft:5,marginRight:5,padding:5,borderRadius:5,justifyContent:"center",alignItems:"center",aspectRatio:1,maxWidth:70,maxHeight:70,borderWidth:1,flex:1},cellText:{fontSize:25}});export default withTheme(PinInput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["isFocused","cursorBlinkDuration","cursorText","style","theme","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInputText.tsx";import React from"react";import{Text}from"react-native";import{withTheme}from"../../theming";import{Cursor}from"react-native-confirmation-code-field";import{jsx as _jsx}from"react/jsx-runtime";var CustomPinInputText=function CustomPinInputText(_ref){var isFocused=_ref.isFocused,cursorBlinkDuration=_ref.cursorBlinkDuration,cursorText=_ref.cursorText,style=_ref.style,theme=_ref.theme,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(Text,Object.assign({style:[{color:theme.colors.strong},style]},rest,{children:children||(isFocused?_jsx(Cursor,{cursorSymbol:cursorText,delay:cursorBlinkDuration}):null)}));};export default withTheme(CustomPinInputText);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{default as PinInput}from"./PinInput";export{default as CustomPinInputCell}from"./CustomPinInputCell";export{default as PinInputText}from"./PinInputText";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Portal/Portal.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";import PortalConsumer from"./PortalConsumer";import PortalHost,{PortalContext}from"./PortalHost";import{ThemeProvider,withTheme}from"../../theming";import{jsx as _jsx}from"react/jsx-runtime";var Portal=function(_React$Component){_inherits(Portal,_React$Component);var _super=_createSuper(Portal);function Portal(){_classCallCheck(this,Portal);return _super.apply(this,arguments);}_createClass(Portal,[{key:"render",value:function render(){var _this=this;var _this$props=this.props,_children=_this$props.children,theme=_this$props.theme;return _jsx(PortalContext.Consumer,{children:function children(manager){return _jsx(PortalConsumer,{manager:manager,children:_jsx(ThemeProvider,{theme:theme,children:_children})});}});}}]);return Portal;}(React.Component);Portal.Host=PortalHost;export default withTheme(Portal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";var PortalConsumer=function(_React$Component){_inherits(PortalConsumer,_React$Component);var _super=_createSuper(PortalConsumer);function PortalConsumer(){_classCallCheck(this,PortalConsumer);return _super.apply(this,arguments);}_createClass(PortalConsumer,[{key:"componentDidMount",value:function(){var _componentDidMount=_asyncToGenerator(function*(){this.checkManager();yield Promise.resolve();this.key=this.props.manager.mount(this.props.children);});function componentDidMount(){return _componentDidMount.apply(this,arguments);}return componentDidMount;}()},{key:"componentDidUpdate",value:function componentDidUpdate(){this.checkManager();this.props.manager.update(this.key,this.props.children);}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.checkManager();this.props.manager.unmount(this.key);}},{key:"checkManager",value:function checkManager(){if(!this.props.manager){throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n"+"Please read our getting-started guide and make sure you've followed all the required steps.\n\n"+"https://callstack.github.io/react-native-paper/getting-started.html");}}},{key:"render",value:function render(){return null;}}]);return PortalConsumer;}(React.Component);export{PortalConsumer as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Portal/PortalHost.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";import{View,StyleSheet}from"react-native";import PortalManager from"./PortalManager";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var PortalContext=React.createContext(null);var PortalHost=function(_React$Component){_inherits(PortalHost,_React$Component);var _super=_createSuper(PortalHost);function PortalHost(){var _this;_classCallCheck(this,PortalHost);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.setManager=function(manager){_this.manager=manager;};_this.mount=function(children){var key=_this.nextKey++;if(_this.manager){_this.manager.mount(key,children);}else{_this.queue.push({type:"mount",key:key,children:children});}return key;};_this.update=function(key,children){if(_this.manager){_this.manager.update(key,children);}else{var op={type:"mount",key:key,children:children};var index=_this.queue.findIndex(function(o){return o.type==="mount"||o.type==="update"&&o.key===key;});if(index>-1){_this.queue[index]=op;}else{_this.queue.push(op);}}};_this.unmount=function(key){if(_this.manager){_this.manager.unmount(key);}else{_this.queue.push({type:"unmount",key:key});}};_this.nextKey=0;_this.queue=[];return _this;}_createClass(PortalHost,[{key:"componentDidMount",value:function componentDidMount(){var manager=this.manager;var queue=this.queue;while(queue.length&&manager){var action=queue.pop();if(action){switch(action.type){case"mount":manager.mount(action.key,action.children);break;case"update":manager.update(action.key,action.children);break;case"unmount":manager.unmount(action.key);break;}}}}},{key:"render",value:function render(){return _jsxs(PortalContext.Provider,{value:{mount:this.mount,update:this.update,unmount:this.unmount},children:[_jsx(View,{style:styles.container,collapsable:false,pointerEvents:"box-none",children:this.props.children}),_jsx(PortalManager,{ref:this.setManager})]});}}]);return PortalHost;}(React.Component);PortalHost.displayName="Portal.Host";export{PortalHost as default};var styles=StyleSheet.create({container:{flex:1}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Portal/PortalManager.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";import{View,StyleSheet}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";var PortalManager=function(_React$PureComponent){_inherits(PortalManager,_React$PureComponent);var _super=_createSuper(PortalManager);function PortalManager(){var _this;_classCallCheck(this,PortalManager);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.state={portals:[]};_this.mount=function(key,children){_this.setState(function(state){return{portals:[].concat(_toConsumableArray(state.portals),[{key:key,children:children}])};});};_this.update=function(key,children){return _this.setState(function(state){return{portals:state.portals.map(function(item){if(item.key===key){return Object.assign({},item,{children:children});}return item;})};});};_this.unmount=function(key){return _this.setState(function(state){return{portals:state.portals.filter(function(item){return item.key!==key;})};});};return _this;}_createClass(PortalManager,[{key:"render",value:function render(){var _this2=this;return this.state.portals.map(function(_ref){var key=_ref.key,children=_ref.children;return _jsx(View,{collapsable:false,pointerEvents:"box-none",style:StyleSheet.absoluteFill,children:children},key);});}}]);return PortalManager;}(React.PureComponent);export{PortalManager as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Pressable.tsx";var _excluded=["children","disabled","onPress","activeOpacity","disabledOpacity","delayLongPress","hitSlop","androidRippleColor","androidRippleBorderless","androidRippleRadius","androidRippleForeground","style"];import React from"react";import{Pressable as NativePressable}from"react-native";import{jsx as _jsx}from"react/jsx-runtime";export default function Pressable(_ref){var children=_ref.children,disabled=_ref.disabled,onPress=_ref.onPress,_ref$activeOpacity=_ref.activeOpacity,activeOpacity=_ref$activeOpacity===void 0?0.8:_ref$activeOpacity,_ref$disabledOpacity=_ref.disabledOpacity,disabledOpacity=_ref$disabledOpacity===void 0?0.8:_ref$disabledOpacity,delayLongPress=_ref.delayLongPress,hitSlop=_ref.hitSlop,androidRippleColor=_ref.androidRippleColor,androidRippleBorderless=_ref.androidRippleBorderless,androidRippleRadius=_ref.androidRippleRadius,androidRippleForeground=_ref.androidRippleForeground,_style=_ref.style,props=_objectWithoutProperties(_ref,_excluded);return _jsx(NativePressable,Object.assign({onPress:onPress,disabled:disabled,delayLongPress:delayLongPress?delayLongPress:500,hitSlop:hitSlop?hitSlop:8,style:function style(_ref2){var pressed=_ref2.pressed;return[{opacity:pressed?activeOpacity:disabled?disabledOpacity:1},_style];},android_ripple:androidRippleColor||androidRippleBorderless||androidRippleColor||androidRippleForeground?{radius:androidRippleRadius,borderless:androidRippleBorderless,color:androidRippleColor,foreground:androidRippleForeground}:null},props,{children:children}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.CircularProgress=exports.AnimatedPath=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireDefault(require("react"));var _reactNativeSvg=_interopRequireWildcard(require("react-native-svg"));var _reactNative=require("react-native");var _reactNativeReanimated=_interopRequireWildcard(require("react-native-reanimated"));var _ProgressCommon=require("../ProgressCommon");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var AnimatedPath=_reactNativeReanimated.default.createAnimatedComponent(_reactNativeSvg.Path);exports.AnimatedPath=AnimatedPath;var _worklet_16562771247151_init_data={code:"function anonymous() {\n const {\n currentAngle,\n startAngle,\n circlePath,\n radius,\n thicknessOffset\n } = this._closure;\n const isBelowMinAngle = currentAngle.value <= startAngle;\n return {\n d: circlePath(radius, radius, radius - thicknessOffset, startAngle, Math.min(currentAngle.value, startAngle + 360)),\n strokeOpacity: isBelowMinAngle ? 0.0 : 1.0\n };\n}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentAngle\",\"startAngle\",\"circlePath\",\"radius\",\"thicknessOffset\",\"_closure\",\"isBelowMinAngle\",\"value\",\"d\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoFgE,SAAAA,SAAMA,CAAA;EAAA;IAAAC,YAAA;IAAAC,UAAA;IAAAC,UAAA;IAAAC,MAAA;IAAAC;EAAA,SAAAC,QAAA;EAClE,MAAMC,eAAe,GAAGN,YAAY,CAACO,KAAK,IAAIN,UAAU;EACxD,OAAO;IACLO,CAAC,EAAEN,UAAU,CACXC,MAAM,EACNA,MAAM,EACNA,MAAM,GAAGC,eAAe,EACxBH,UAAU,EACVQ,IAAI,CAACC,GAAG,CAACV,YAAY,CAACO,KAAK,EAAEN,UAAU,GAAG,GAAG,CAC/C,CAAC;IACDU,aAAa,EAAEL,eAAe,GAAG,GAAG,GAAG;EACzC,CAAC;AACH\"}"};var CircularProgress=function CircularProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.divider:_ref$trackColor,_ref$trackOpacity=_ref.trackOpacity,trackOpacity=_ref$trackOpacity===void 0?1:_ref$trackOpacity,_ref$showTrack=_ref.showTrack,showTrack=_ref$showTrack===void 0?true:_ref$showTrack,_ref$animationDuratio=_ref.animationDuration,animationDuration=_ref$animationDuratio===void 0?_ProgressCommon.DEFAULT_ANIMATION_DURATION:_ref$animationDuratio,_ref$isAnimated=_ref.isAnimated,isAnimated=_ref$isAnimated===void 0?true:_ref$isAnimated,_ref$lineCap=_ref.lineCap,lineCap=_ref$lineCap===void 0?"round":_ref$lineCap,_ref$trackLineCap=_ref.trackLineCap,trackLineCap=_ref$trackLineCap===void 0?lineCap:_ref$trackLineCap,dashWidth=_ref.dashWidth,trackDashWidth=_ref.trackDashWidth,dashGap=_ref.dashGap,trackDashGap=_ref.trackDashGap,dashOffset=_ref.dashOffset,trackDashOffset=_ref.trackDashOffset,customDashArray=_ref.customDashArray,trackCustomDashArray=_ref.trackCustomDashArray,onFullPathWidth=_ref.onFullPathWidth,_ref$startPosition=_ref.startPosition,startPosition=_ref$startPosition===void 0?"top":_ref$startPosition,style=_ref.style,testID=_ref.testID;var _React$useState=_react.default.useState(0),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),svgContainerWidth=_React$useState2[0],setSvgContainerWidth=_React$useState2[1];var _React$useState3=_react.default.useState(0),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),circumfrence=_React$useState4[0],setCircumefrence=_React$useState4[1];var dashArray=dashWidth!==undefined?`${dashWidth} ${dashGap||dashWidth}`:undefined;var trackDashArray=trackDashWidth!==undefined?`${trackDashWidth} ${trackDashGap||trackDashWidth}`:undefined;var maxThickness=Math.max(thickness,trackThickness);var thicknessOffset=maxThickness/2;var radius=svgContainerWidth/2;var c=2*Math.PI*radius;if(c!==circumfrence){setCircumefrence(c);}var startAngle=_react.default.useMemo(function(){switch(startPosition){case"top":return 0;case"right":return 90;case"bottom":return 180;case"left":return 270;}},[startPosition]);var currentFillPercentage=value/(maximumValue+minimumValue);var currentAngle=(0,_reactNativeReanimated.useSharedValue)(startAngle);var progressPathAnimatedProps=(0,_reactNativeReanimated.useAnimatedProps)(function(){var _e=[new global.Error(),-6,-27];var _f=function _f(){var isBelowMinAngle=currentAngle.value<=startAngle;return{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,Math.min(currentAngle.value,startAngle+360)),strokeOpacity:isBelowMinAngle?0.0:1.0};};_f._closure={currentAngle:currentAngle,startAngle:startAngle,circlePath:circlePath,radius:radius,thicknessOffset:thicknessOffset};_f.__initData=_worklet_16562771247151_init_data;_f.__workletHash=16562771247151;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}());_react.default.useEffect(function(){currentAngle.value=(0,_reactNativeReanimated.withTiming)(startAngle+currentFillPercentage*360,{duration:isAnimated?animationDuration:0});},[value,currentFillPercentage,animationDuration,currentAngle,maximumValue,minimumValue,isAnimated,startAngle]);_react.default.useEffect(function(){onFullPathWidth==null?void 0:onFullPathWidth(circumfrence);},[circumfrence,onFullPathWidth]);return(0,_jsxRuntime.jsx)(_reactNative.View,{onLayout:function onLayout(event){var width=event.nativeEvent.layout.width;setSvgContainerWidth(width);},style:[{height:svgContainerWidth},style],children:(0,_jsxRuntime.jsxs)(_reactNativeSvg.default,{testID:testID!=null?testID:"circular-progress-component",style:{flex:1},children:[showTrack&&(0,_jsxRuntime.jsx)(_reactNativeSvg.Path,{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,startAngle+360),stroke:trackColor,strokeWidth:trackThickness,strokeOpacity:trackOpacity,strokeLinecap:trackLineCap,strokeDasharray:trackCustomDashArray||trackDashArray,strokeDashoffset:trackDashOffset,fill:"rgba(0,0,0,0)"}),(0,_jsxRuntime.jsx)(AnimatedPath,{animatedProps:progressPathAnimatedProps,stroke:color,strokeWidth:thickness,strokeLinecap:lineCap,strokeDasharray:customDashArray||dashArray,strokeDashoffset:dashOffset,fill:"rgba(0,0,0,0)",onPress:function onPress(){}})]})});};exports.CircularProgress=CircularProgress;var _worklet_13438583604277_init_data={code:"function circlePath(x, y, radius, startAngle, endAngle) {\n function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n }\n var start = polarToCartesian(x, y, radius, endAngle * 0.9999);\n var end = polarToCartesian(x, y, radius, startAngle);\n var largeArcFlag = endAngle - startAngle <= 180 ? \"0\" : \"1\";\n var d = [\"M\", start.x, start.y, \"A\", radius, radius, 0, largeArcFlag, 0, end.x, end.y];\n return d.join(\" \");\n}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"circlePath\",\"x\",\"y\",\"radius\",\"startAngle\",\"endAngle\",\"polarToCartesian\",\"centerX\",\"centerY\",\"angleInDegrees\",\"Math\",\"cos\",\"angleInRadians\",\"sin\",\"start\",\"end\",\"largeArcFlag\",\"d\",\"join\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoKA,SAAAA,WAAAC,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAC,UAAA,EAAAC,QAAA;EAQa,SAAAC,iBAAAC,OAAA,EAAAC,OAAA,EAAAL,MAAA,EAAAM,cAAA;;IAEX,OAAS;MAMPR,CAAA,EAAIM,OAAA,GAAAJ,MAAkB,GAACO,IAAA,CAAAC,GAAA,CAAAC,cAAuB;MAC9CV,CAAA,EAAAM,OAAO,GAAAL,MAAA,GAAAO,IAAA,CAAAG,GAAA,CAAAD,cAAA;;;MAGNE,KAAA,GAAAR,gBAAA,CAAAL,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAE,QAAA;EACH,IAAAU,GAAA,GAAAT,gBAAA,CAAAL,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAC,UAAA;EAEA,IAAIY,YAAQ,GAAAX,QAAA,GAAkBD,UAAK,IAAQ,SAAQ,GAAG;EACtD,IAAIa,CAAA,GAAG,IAAG,EAAAH,KAAA,CAAAb,CAAA,EAAAa,KAAkB,CAAAZ,CAAE,EAAC,GAAE,EAAAC,MAAQ,EAAAA,MAAU,EAAC,GAAAa,YAAA,KAAAD,GAAA,CAAAd,CAAA,EAAAc,GAAA,CAAAb,CAAA;EACpD,OAAIe,CAAA,CAAAC,IAAA,IAAY\"}"};var circlePath=function(){var _e=[new global.Error(),1,-27];var _f=function _f(x,y,radius,startAngle,endAngle){function polarToCartesian(centerX,centerY,radius,angleInDegrees){var angleInRadians=(angleInDegrees-90)*Math.PI/180.0;return{x:centerX+radius*Math.cos(angleInRadians),y:centerY+radius*Math.sin(angleInRadians)};}var start=polarToCartesian(x,y,radius,endAngle*0.9999);var end=polarToCartesian(x,y,radius,startAngle);var largeArcFlag=endAngle-startAngle<=180?"0":"1";var d=["M",start.x,start.y,"A",radius,radius,0,largeArcFlag,0,end.x,end.y];return d.join(" ");};_f._closure={};_f.__initData=_worklet_13438583604277_init_data;_f.__workletHash=13438583604277;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}();
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx";import React from"react";import Svg,{Path}from"react-native-svg";import{View}from"react-native";import Animated,{useAnimatedProps,useSharedValue,withTiming}from"react-native-reanimated";import{DEFAULT_ANIMATION_DURATION}from"../ProgressCommon";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var AnimatedPath=Animated.createAnimatedComponent(Path);var _worklet_16562771247151_init_data={code:"function anonymous() {\n const {\n currentAngle,\n startAngle,\n circlePath,\n radius,\n thicknessOffset\n } = this._closure;\n const isBelowMinAngle = currentAngle.value <= startAngle;\n return {\n d: circlePath(radius, radius, radius - thicknessOffset, startAngle, Math.min(currentAngle.value, startAngle + 360)),\n strokeOpacity: isBelowMinAngle ? 0.0 : 1.0\n };\n}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentAngle\",\"startAngle\",\"circlePath\",\"radius\",\"thicknessOffset\",\"_closure\",\"isBelowMinAngle\",\"value\",\"d\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoFgE,SAAAA,SAAMA,CAAA;EAAA;IAAAC,YAAA;IAAAC,UAAA;IAAAC,UAAA;IAAAC,MAAA;IAAAC;EAAA,SAAAC,QAAA;EAClE,MAAMC,eAAe,GAAGN,YAAY,CAACO,KAAK,IAAIN,UAAU;EACxD,OAAO;IACLO,CAAC,EAAEN,UAAU,CACXC,MAAM,EACNA,MAAM,EACNA,MAAM,GAAGC,eAAe,EACxBH,UAAU,EACVQ,IAAI,CAACC,GAAG,CAACV,YAAY,CAACO,KAAK,EAAEN,UAAU,GAAG,GAAG,CAC/C,CAAC;IACDU,aAAa,EAAEL,eAAe,GAAG,GAAG,GAAG;EACzC,CAAC;AACH\"}"};export var CircularProgress=function CircularProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.divider:_ref$trackColor,_ref$trackOpacity=_ref.trackOpacity,trackOpacity=_ref$trackOpacity===void 0?1:_ref$trackOpacity,_ref$showTrack=_ref.showTrack,showTrack=_ref$showTrack===void 0?true:_ref$showTrack,_ref$animationDuratio=_ref.animationDuration,animationDuration=_ref$animationDuratio===void 0?DEFAULT_ANIMATION_DURATION:_ref$animationDuratio,_ref$isAnimated=_ref.isAnimated,isAnimated=_ref$isAnimated===void 0?true:_ref$isAnimated,_ref$lineCap=_ref.lineCap,lineCap=_ref$lineCap===void 0?"round":_ref$lineCap,_ref$trackLineCap=_ref.trackLineCap,trackLineCap=_ref$trackLineCap===void 0?lineCap:_ref$trackLineCap,dashWidth=_ref.dashWidth,trackDashWidth=_ref.trackDashWidth,dashGap=_ref.dashGap,trackDashGap=_ref.trackDashGap,dashOffset=_ref.dashOffset,trackDashOffset=_ref.trackDashOffset,customDashArray=_ref.customDashArray,trackCustomDashArray=_ref.trackCustomDashArray,onFullPathWidth=_ref.onFullPathWidth,_ref$startPosition=_ref.startPosition,startPosition=_ref$startPosition===void 0?"top":_ref$startPosition,style=_ref.style,testID=_ref.testID;var _React$useState=React.useState(0),_React$useState2=_slicedToArray(_React$useState,2),svgContainerWidth=_React$useState2[0],setSvgContainerWidth=_React$useState2[1];var _React$useState3=React.useState(0),_React$useState4=_slicedToArray(_React$useState3,2),circumfrence=_React$useState4[0],setCircumefrence=_React$useState4[1];var dashArray=dashWidth!==undefined?`${dashWidth} ${dashGap||dashWidth}`:undefined;var trackDashArray=trackDashWidth!==undefined?`${trackDashWidth} ${trackDashGap||trackDashWidth}`:undefined;var maxThickness=Math.max(thickness,trackThickness);var thicknessOffset=maxThickness/2;var radius=svgContainerWidth/2;var c=2*Math.PI*radius;if(c!==circumfrence){setCircumefrence(c);}var startAngle=React.useMemo(function(){switch(startPosition){case"top":return 0;case"right":return 90;case"bottom":return 180;case"left":return 270;}},[startPosition]);var currentFillPercentage=value/(maximumValue+minimumValue);var currentAngle=useSharedValue(startAngle);var progressPathAnimatedProps=useAnimatedProps(function(){var _e=[new global.Error(),-6,-27];var _f=function _f(){var isBelowMinAngle=currentAngle.value<=startAngle;return{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,Math.min(currentAngle.value,startAngle+360)),strokeOpacity:isBelowMinAngle?0.0:1.0};};_f._closure={currentAngle:currentAngle,startAngle:startAngle,circlePath:circlePath,radius:radius,thicknessOffset:thicknessOffset};_f.__initData=_worklet_16562771247151_init_data;_f.__workletHash=16562771247151;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}());React.useEffect(function(){currentAngle.value=withTiming(startAngle+currentFillPercentage*360,{duration:isAnimated?animationDuration:0});},[value,currentFillPercentage,animationDuration,currentAngle,maximumValue,minimumValue,isAnimated,startAngle]);React.useEffect(function(){onFullPathWidth==null?void 0:onFullPathWidth(circumfrence);},[circumfrence,onFullPathWidth]);return _jsx(View,{onLayout:function onLayout(event){var width=event.nativeEvent.layout.width;setSvgContainerWidth(width);},style:[{height:svgContainerWidth},style],children:_jsxs(Svg,{testID:testID!=null?testID:"circular-progress-component",style:{flex:1},children:[showTrack&&_jsx(Path,{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,startAngle+360),stroke:trackColor,strokeWidth:trackThickness,strokeOpacity:trackOpacity,strokeLinecap:trackLineCap,strokeDasharray:trackCustomDashArray||trackDashArray,strokeDashoffset:trackDashOffset,fill:"rgba(0,0,0,0)"}),_jsx(AnimatedPath,{animatedProps:progressPathAnimatedProps,stroke:color,strokeWidth:thickness,strokeLinecap:lineCap,strokeDasharray:customDashArray||dashArray,strokeDashoffset:dashOffset,fill:"rgba(0,0,0,0)",onPress:function onPress(){}})]})});};var _worklet_13438583604277_init_data={code:"function circlePath(x, y, radius, startAngle, endAngle) {\n function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n }\n var start = polarToCartesian(x, y, radius, endAngle * 0.9999);\n var end = polarToCartesian(x, y, radius, startAngle);\n var largeArcFlag = endAngle - startAngle <= 180 ? \"0\" : \"1\";\n var d = [\"M\", start.x, start.y, \"A\", radius, radius, 0, largeArcFlag, 0, end.x, end.y];\n return d.join(\" \");\n}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"circlePath\",\"x\",\"y\",\"radius\",\"startAngle\",\"endAngle\",\"polarToCartesian\",\"centerX\",\"centerY\",\"angleInDegrees\",\"Math\",\"cos\",\"angleInRadians\",\"sin\",\"start\",\"end\",\"largeArcFlag\",\"d\",\"join\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoKA,SAAAA,WAAAC,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAC,UAAA,EAAAC,QAAA;EAQa,SAAAC,iBAAAC,OAAA,EAAAC,OAAA,EAAAL,MAAA,EAAAM,cAAA;;IAEX,OAAS;MAMPR,CAAA,EAAIM,OAAA,GAAAJ,MAAkB,GAACO,IAAA,CAAAC,GAAA,CAAAC,cAAuB;MAC9CV,CAAA,EAAAM,OAAO,GAAAL,MAAA,GAAAO,IAAA,CAAAG,GAAA,CAAAD,cAAA;;;MAGNE,KAAA,GAAAR,gBAAA,CAAAL,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAE,QAAA;EACH,IAAAU,GAAA,GAAAT,gBAAA,CAAAL,CAAA,EAAAC,CAAA,EAAAC,MAAA,EAAAC,UAAA;EAEA,IAAIY,YAAQ,GAAAX,QAAA,GAAkBD,UAAK,IAAQ,SAAQ,GAAG;EACtD,IAAIa,CAAA,GAAG,IAAG,EAAAH,KAAA,CAAAb,CAAA,EAAAa,KAAkB,CAAAZ,CAAE,EAAC,GAAE,EAAAC,MAAQ,EAAAA,MAAU,EAAC,GAAAa,YAAA,KAAAD,GAAA,CAAAd,CAAA,EAAAc,GAAA,CAAAb,CAAA;EACpD,OAAIe,CAAA,CAAAC,IAAA,IAAY\"}"};var circlePath=function(){var _e=[new global.Error(),1,-27];var _f=function _f(x,y,radius,startAngle,endAngle){function polarToCartesian(centerX,centerY,radius,angleInDegrees){var angleInRadians=(angleInDegrees-90)*Math.PI/180.0;return{x:centerX+radius*Math.cos(angleInRadians),y:centerY+radius*Math.sin(angleInRadians)};}var start=polarToCartesian(x,y,radius,endAngle*0.9999);var end=polarToCartesian(x,y,radius,startAngle);var largeArcFlag=endAngle-startAngle<=180?"0":"1";var d=["M",start.x,start.y,"A",radius,radius,0,largeArcFlag,0,end.x,end.y];return d.join(" ");};_f._closure={};_f.__initData=_worklet_13438583604277_init_data;_f.__workletHash=13438583604277;_f.__stackDetails=_e;_f.__version="3.3.0";return _f;}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/index.tsx";import React from"react";import IndeterminateProgress from"../IndeterminateProgress";import{CircularProgress as CircularProgressComponent}from"./CircularProgress";import{withTheme}from"../../../theming";import{jsx as _jsx}from"react/jsx-runtime";var CircularProgress=function CircularProgress(props){if(props.indeterminate){return _jsx(IndeterminateProgress,Object.assign({ProgressComponent:CircularProgressComponent},props));}else{return _jsx(CircularProgressComponent,Object.assign({},props));}};export default withTheme(CircularProgress);
|