@originallyus/feedback-rn-sdk 1.0.6 → 1.0.8

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/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 20-present, OUS Group Pte Ltd.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,7 +4,12 @@ A cross-platform Feedback component for React Native.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add package:
7
+ Install the package using either Yarn:
8
+
9
+ ```sh
10
+ yarn add @originallyus/feedback-rn-sdk
11
+ ```
12
+ or npm:
8
13
 
9
14
  ```sh
10
15
  npm install @originallyus/feedback-rn-sdk
@@ -12,10 +17,22 @@ npm install @originallyus/feedback-rn-sdk
12
17
 
13
18
  ## Install Peer Dependencies
14
19
 
15
- These packages are specified as peerDependencies and need to be installed separatedly.
20
+ These packages are specified as peerDependencies and need to be installed separately.
16
21
 
22
+ ```bash
23
+ yarn add axios crypto-js \
24
+ react-native-encrypted-storage \
25
+ react-native-device-info \
26
+ react-native-rate
17
27
  ```
18
- yarn add axios crypto-js react-native-encrypted-storage react-native-device-info react-native-rate
28
+
29
+ or using npm:
30
+
31
+ ```sh
32
+ npm install axios crypto-js \
33
+ react-native-encrypted-storage \
34
+ react-native-device-info \
35
+ react-native-rate
19
36
  ```
20
37
 
21
38
  ## Install Custom Fonts
@@ -23,10 +40,6 @@ yarn add axios crypto-js react-native-encrypted-storage react-native-device-info
23
40
  Package requires custom fonts found in `fonts` folder:
24
41
 
25
42
  ```sh
26
- AIAEverestBold.ttf
27
- AIAEverest-Regular.ttf
28
- AIAEverest-Medium.ttf
29
- AIAEverest-CondensedMedium.ttf
30
43
  OpenSans-Bold.ttf
31
44
  OpenSans-Light.ttf
32
45
  OpenSans-Regular.ttf
@@ -41,8 +54,10 @@ Please do not change the filenames as Android are using those to identify fonts.
41
54
 
42
55
  Please initalize the SDK once in App.js. The mounting point of the SDK should be placed directly in your App.js for it to stay on top of all other views.
43
56
 
57
+ Note: **XXXXXXXXXXX** is to be replaced with correct class name. Please refer to the full documentation provided separately by us.
58
+
44
59
  ```js
45
- import AIAFeedback from '@originallyus/feedback-rn-sdk';
60
+ import XXXXXXXXXXX from '@originallyus/feedback-rn-sdk';
46
61
 
47
62
  const App = (props) => {
48
63
  // This initialization should done once inside App.js
@@ -57,7 +72,7 @@ return (
57
72
 
58
73
  {/* Please insert this mount point directly in your App.js,
59
74
  preferably at the bottom of your root view tree for it to stay on top of all other views */}
60
- <AIAFeedback ref={feedbackRef} />
75
+ <XXXXXXXXXXX ref={feedbackRef} />
61
76
  </View>
62
77
  );
63
78
  ```
@@ -65,7 +80,7 @@ return (
65
80
  All other functions to be invoked on feedbackRef.current can be done anywhere in your application code (can also be inside App.js)
66
81
 
67
82
  ```js
68
- import AIAFeedback from '@originallyus/feedback-rn-sdk';
83
+ import XXXXXXXXXXX from '@originallyus/feedback-rn-sdk';
69
84
 
70
85
  const OtherComponent = (props) => {
71
86
  // This is a singleton. The initialization should have already been done inside App.js
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.sendSubmit=exports.sendRequest=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _NetworkHelper=require("../utils/NetworkHelper");var _reactNative=require("react-native");(function(a,b){var f=a0b,c=a();while(!![]){try{var d=-parseInt(f(0x12d))/0x1+parseInt(f(0x134))/0x2+-parseInt(f(0x12b))/0x3+-parseInt(f(0x132))/0x4+-parseInt(f(0x129))/0x5+-parseInt(f(0x133))/0x6*(-parseInt(f(0x125))/0x7)+parseInt(f(0x122))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0xd11e9);function a0a(){var i=['1454674onOpAz','alert','20509288gdteUG','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x208417','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x202373','44996HqqoBW','log','FeedbackSDK\x20Error','data','4230840RqohlV','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x207451','2424210vAVjJQ','error','56026XxxHnZ','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x209373','/8vs2qwFD1rlSFWIa13Wc','debug_message','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x202370','6059300LmQNoX','738ktKalc'];a0a=function a0a(){return i;};return a0a();}var sendRequest=exports.sendRequest=function(){var _ref=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var g=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(g(0x12f),a,b);if(!c)return console[g(0x126)]('FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x209370'),null;if(!c[g(0x128)])return console[g(0x126)](g(0x12e)),c['data'];c[g(0x128)][g(0x130)]&&console[g(0x126)]('FeedbackSDK\x20Debug:',c[g(0x128)][g(0x130)]);if(c[g(0x128)][g(0x12c)])return _reactNative.Alert[g(0x121)](g(0x127),c[g(0x128)][g(0x12c)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[g(0x128)];}catch(d){console[g(0x126)](g(0x12a),d);}});return function sendRequest(_x){return _ref.apply(this,arguments);};}();function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x121;var f=c[d];return f;},a0b(a,b);}var sendSubmit=exports.sendSubmit=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var h=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)('/LXvcFSTTOqxxmJX9qQar',a,b);if(!c)return console['log'](h(0x131)),null;if(!c[h(0x128)])return console[h(0x126)](h(0x124)),c[h(0x128)];if(c[h(0x128)][h(0x12c)])return _reactNative.Alert[h(0x121)]('FeedbackSDK\x20Error',c[h(0x128)][h(0x12c)],[{'text':'OK'}],{'cancelable':!![]}),c;return c['data'];}catch(d){console[h(0x126)](h(0x123),d);}});return function sendSubmit(_x2){return _ref2.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.sendSubmit=exports.sendRequest=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _NetworkHelper=require("../utils/NetworkHelper");var _reactNative=require("react-native");(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x174))/0x1+-parseInt(f(0x177))/0x2+parseInt(f(0x17f))/0x3*(-parseInt(f(0x17e))/0x4)+-parseInt(f(0x175))/0x5+parseInt(f(0x171))/0x6+-parseInt(f(0x17a))/0x7+parseInt(f(0x179))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x2e4b1);function a0a(){var i=['error','130288LpBWEM','1306290iDapJx','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x209373','148542QyNYfj','log','7376488YKDybw','1589490ZUuGtw','data','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x202370','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x208417','148KxNcCs','30333WiWYqs','FeedbackSDK\x20Error','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x202373','debug_message','alert','FeedbackSDK\x20Debug:','/8vs2qwFD1rlSFWIa13Wc','443844gvRcIj','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x207451'];a0a=function a0a(){return i;};return a0a();}var sendRequest=exports.sendRequest=function(){var _ref=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var g=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(g(0x170),a,b);if(!c)return console[g(0x178)]('FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x209370'),null;if(!c['data'])return console['log'](g(0x176)),c[g(0x17b)];c[g(0x17b)][g(0x182)]&&console[g(0x178)](g(0x16f),c['data']['debug_message']);if(c[g(0x17b)]['error'])return _reactNative.Alert['alert'](g(0x180),c[g(0x17b)][g(0x173)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[g(0x17b)];}catch(d){console[g(0x178)](g(0x172),d);}});return function sendRequest(_x){return _ref.apply(this,arguments);};}();function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x16f;var f=c[d];return f;},a0b(a,b);}var sendSubmit=exports.sendSubmit=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var h=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)('/LXvcFSTTOqxxmJX9qQar',a,b);if(!c)return console[h(0x178)](h(0x17c)),null;if(!c['data'])return console['log'](h(0x181)),c['data'];if(c[h(0x17b)][h(0x173)])return _reactNative.Alert[h(0x183)]('FeedbackSDK\x20Error',c['data'][h(0x173)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[h(0x17b)];}catch(d){console['log'](h(0x17d),d);}});return function sendSubmit(_x2){return _ref2.apply(this,arguments);};}();
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _=require("./");var _const=require("../utils/const");var _ui=require("../ui");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/contentUI.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var heightToLowUI=["question","show_rating","instruction","options","secondary_question","show_comment","fineprint","submit_btn"];var NonInstrusiveUI=function NonInstrusiveUI(_ref){var didSubmitted=_ref.didSubmitted,form=_ref.form,animatedValues=_ref.animatedValues,animations=_ref.animations,states=_ref.states,functions=_ref.functions;var theme=form.theme,question=form.question,title=form.title,options=form.options,options_multiselect=form.options_multiselect,instruction=form.instruction,comment_placeholder=form.comment_placeholder,fineprint=form.fineprint,button_text=form.button_text,rating_max=form.rating_max,rating_min=form.rating_min,show_rating_star=form.show_rating_star,show_rating_number=form.show_rating_number,read_only_rating=form.read_only_rating,show_comment=form.show_comment,comment_mandatory=form.comment_mandatory,secondary_question=form.secondary_question,image_file_url=form.image_file_url,instrusive_style=form.instrusive_style,alignment=form.alignment,auto_submit=form.auto_submit;var submitForm=functions.submitForm,handleButtonClose=functions.handleButtonClose,handlePressRating=functions.handlePressRating,handleChangeText=functions.handleChangeText,handleSelectOption=functions.handleSelectOption,handleMultiSelectOption=functions.handleMultiSelectOption,scrollViewInputRef=functions.scrollViewInputRef;var animaginSelectBtn=animations.animaginSelectBtn,animationInSideApp=animations.animationInSideApp;var numStar=states.numStar,inputValue=states.inputValue,listActiveSelect=states.listActiveSelect,loading=states.loading,isShowingExtraForm=states.isShowingExtraForm;var keyboardHeight=animatedValues.keyboardHeight;var multipleSelectAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var secondaryQuestionAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var textAreaAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var fineprintAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var submitBtnAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var _useState=(0,_react.useState)(new Array(heightToLowUI.length).fill(false)),_useState2=(0,_slicedToArray2.default)(_useState,2),showHeightToLowUI=_useState2[0],setShowHeightToLowUI=_useState2[1];var _useState3=(0,_react.useState)(""),_useState4=(0,_slicedToArray2.default)(_useState3,2),showSlug=_useState4[0],setShowSlug=_useState4[1];(0,_react.useEffect)(function(){if(_reactNative.Platform.OS==="android"&&_reactNative.UIManager.setLayoutAnimationEnabledExperimental){_reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);}var showIndex=-1;if(show_rating_number||show_rating_star||auto_submit){showIndex=heightToLowUI.findIndex(function(value){return value==="show_rating";});setShowSlug("show_rating");}else if((options==null?void 0:options.length)!==0&&options){showIndex=heightToLowUI.findIndex(function(value){return value==="options";});setShowSlug("options");}else if(show_comment){setShowSlug("show_comment");}if(showIndex!==-1){var _showUI=new Array(showIndex+1).fill(true).concat(new Array(heightToLowUI.length-showIndex+1).fill(false));setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI));return;}var showUI=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(showUI));},[]);(0,_react.useEffect)(function(){setTimeout(function(){if((options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]){_reactNative.Animated.timing(multipleSelectAni,{toValue:1,useNativeDriver:false}).start();}if(secondary_question&&showHeightToLowUI[4]){_reactNative.Animated.timing(secondaryQuestionAni,{toValue:1,useNativeDriver:false}).start();}if(show_comment&&showHeightToLowUI[5]){_reactNative.Animated.timing(textAreaAni,{toValue:1,useNativeDriver:false}).start();}if(fineprint&&showHeightToLowUI[6]){_reactNative.Animated.timing(fineprintAni,{toValue:1,useNativeDriver:false}).start();}if(showHeightToLowUI[7]){_reactNative.Animated.timing(submitBtnAni,{toValue:1,useNativeDriver:false}).start();}},300);},[showHeightToLowUI]);(0,_react.useEffect)(function(){if(auto_submit!=null&&auto_submit.includes(numStar))return;if(numStar!==0&&showSlug==="show_rating"){var _showUI2=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI2));}},[numStar]);(0,_react.useEffect)(function(){if(listActiveSelect.length>0&&showSlug==="options"){var _showUI3=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI3));}},[listActiveSelect]);(0,_react.useEffect)(function(){if(didSubmitted){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);var _showUI4=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI4));}},[didSubmitted]);var showUI=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;(0,_react.useEffect)(function(){if(isShowingExtraForm){_reactNative.Animated.sequence([_reactNative.Animated.timing(showUI,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(showUI,{toValue:1,duration:350,useNativeDriver:false})]).start(function(){});}},[isShowingExtraForm]);var opacitySecondaryQuestion=secondaryQuestionAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityTextArea=textAreaAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityFineprint=fineprintAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacitySubmitBtn=submitBtnAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var disableSumitBtn=false;if(comment_mandatory==1&&!inputValue.trim()){disableSumitBtn=true;}if(show_rating_star==1||show_rating_number==1)if(numStar==0)disableSumitBtn=true;var appWidth=f.getAppWidth(instrusive_style);var isTabletInstrusive=false;if(_const.isTablet&&!!instrusive_style)isTabletInstrusive=true;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:{paddingHorizontal:isTabletInstrusive?22:f.w_p21(appWidth),paddingTop:isTabletInstrusive?22:f.w_p16(appWidth),marginTop:_reactNative.Platform.OS==="android"&&!_const.isTablet&&!!instrusive_style?_reactNative.StatusBar.currentHeight:0},children:(0,_jsxRuntime.jsx)(_.Header,Object.assign({},theme,{handleButtonClose:handleButtonClose,title:title,image_file_url:image_file_url,instrusive_style:instrusive_style,alignment:alignment,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))})}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,pagingEnabled:true,style:{flex:1},contentContainerStyle:{flexGrow:1},scrollEnabled:false,keyboardShouldPersistTaps:"always",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.ratingContainer,{width:appWidth,marginTop:isTabletInstrusive?22:f.w_p16(appWidth)}],children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{ref:function ref(_ref2){return scrollViewInputRef(_ref2);},style:{flex:1,width:"100%"},contentContainerStyle:{flexGrow:1,alignItems:"center",paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},showsVerticalScrollIndicator:false,showsHorizontalScrollIndicator:false,children:[question&&showHeightToLowUI[0]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Question,Object.assign({},theme,{question:question,alignment:alignment}))}),(show_rating_number==1||show_rating_star==1)&&showHeightToLowUI[1]&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:[show_rating_number==1&&(0,_jsxRuntime.jsx)(_ui.RatingNumber,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,appWidth:appWidth})),show_rating_star==1&&(0,_jsxRuntime.jsx)(_ui.RatingStar,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,disable:!!read_only_rating||false}))]}),(instruction&&showHeightToLowUI[2]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Instruction,Object.assign({},theme,{instruction:form[`instruction_${numStar}_star`]||instruction,alignment:alignment}))}),(options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.MultipleSelectInput,{theme:theme,options:options,animaginSelectBtn:animaginSelectBtn,listActiveSelect:listActiveSelect,handleSelectOption:handleSelectOption,handleMultiSelectOption:handleMultiSelectOption,options_multiselect:options_multiselect,animated:multipleSelectAni,appWidth:appWidth})}),secondary_question&&showHeightToLowUI[4]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySecondaryQuestion,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.SecondaryQuestion,Object.assign({},theme,{secondary_question:form[`secondary_question_${numStar}_star`]||secondary_question,alignment:alignment}))}),show_comment&&showHeightToLowUI[5]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:opacityTextArea,width:"100%",height:_const.isTablet?110:94,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.TextArea,Object.assign({},theme,{inputValue:inputValue,numStar:numStar,handleChangeText:handleChangeText,comment_placeholder:form[`comment_placeholder_${numStar}_star`]||comment_placeholder,animated:textAreaAni,appWidth:appWidth}))}),fineprint&&showHeightToLowUI[6]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacityFineprint},children:(0,_jsxRuntime.jsx)(_ui.Fineprint,Object.assign({},theme,{fineprint:fineprint,alignment:alignment}))})]}),(showHeightToLowUI[7]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySubmitBtn,paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:button_text,onPress:function onPress(){return submitForm();},disabled:disableSumitBtn,loading:loading,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{paddingBottom:animationInSideApp,width:appWidth}})]})})]});};var _default=exports.default=NonInstrusiveUI;var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var styles=_reactNative.StyleSheet.create({ratingContainer:{flex:1,alignItems:"center"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _=require("./");var _const=require("../utils/const");var _ui=require("../ui");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/component/contentUI.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var heightToLowUI=["question","show_rating","instruction","options","secondary_question","show_comment","fineprint","submit_btn"];var NonInstrusiveUI=function NonInstrusiveUI(_ref){var didSubmitted=_ref.didSubmitted,form=_ref.form,animatedValues=_ref.animatedValues,animations=_ref.animations,states=_ref.states,functions=_ref.functions;var theme=form.theme,question=form.question,title=form.title,options=form.options,options_multiselect=form.options_multiselect,instruction=form.instruction,comment_placeholder=form.comment_placeholder,fineprint=form.fineprint,button_text=form.button_text,rating_max=form.rating_max,rating_min=form.rating_min,show_rating_star=form.show_rating_star,show_rating_number=form.show_rating_number,read_only_rating=form.read_only_rating,show_comment=form.show_comment,comment_mandatory=form.comment_mandatory,secondary_question=form.secondary_question,image_file_url=form.image_file_url,instrusive_style=form.instrusive_style,alignment=form.alignment,auto_submit=form.auto_submit;var submitForm=functions.submitForm,handleButtonClose=functions.handleButtonClose,handlePressRating=functions.handlePressRating,handleChangeText=functions.handleChangeText,handleSelectOption=functions.handleSelectOption,handleMultiSelectOption=functions.handleMultiSelectOption,scrollViewInputRef=functions.scrollViewInputRef;var animaginSelectBtn=animations.animaginSelectBtn,animationInSideApp=animations.animationInSideApp;var numStar=states.numStar,inputValue=states.inputValue,listActiveSelect=states.listActiveSelect,loading=states.loading,isShowingExtraForm=states.isShowingExtraForm;var keyboardHeight=animatedValues.keyboardHeight;var multipleSelectAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var secondaryQuestionAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var textAreaAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var fineprintAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var submitBtnAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var _useState=(0,_react.useState)(new Array(heightToLowUI.length).fill(false)),_useState2=(0,_slicedToArray2.default)(_useState,2),showHeightToLowUI=_useState2[0],setShowHeightToLowUI=_useState2[1];var _useState3=(0,_react.useState)(""),_useState4=(0,_slicedToArray2.default)(_useState3,2),showSlug=_useState4[0],setShowSlug=_useState4[1];(0,_react.useEffect)(function(){if(_reactNative.Platform.OS==="android"&&_reactNative.UIManager.setLayoutAnimationEnabledExperimental){_reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);}var showIndex=-1;if(show_rating_number||show_rating_star||auto_submit){showIndex=heightToLowUI.findIndex(function(value){return value==="show_rating";});setShowSlug("show_rating");}else if((options==null?void 0:options.length)!==0&&options){showIndex=heightToLowUI.findIndex(function(value){return value==="options";});setShowSlug("options");}else if(show_comment){setShowSlug("show_comment");}if(showIndex!==-1){var _showUI=new Array(showIndex+1).fill(true).concat(new Array(heightToLowUI.length-showIndex+1).fill(false));setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI));return;}var showUI=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(showUI));},[]);(0,_react.useEffect)(function(){setTimeout(function(){if((options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]){_reactNative.Animated.timing(multipleSelectAni,{toValue:1,useNativeDriver:false}).start();}if(secondary_question&&showHeightToLowUI[4]){_reactNative.Animated.timing(secondaryQuestionAni,{toValue:1,useNativeDriver:false}).start();}if(show_comment&&showHeightToLowUI[5]){_reactNative.Animated.timing(textAreaAni,{toValue:1,useNativeDriver:false}).start();}if(fineprint&&showHeightToLowUI[6]){_reactNative.Animated.timing(fineprintAni,{toValue:1,useNativeDriver:false}).start();}if(showHeightToLowUI[7]){_reactNative.Animated.timing(submitBtnAni,{toValue:1,useNativeDriver:false}).start();}},300);},[showHeightToLowUI]);(0,_react.useEffect)(function(){if(auto_submit!=null&&auto_submit.includes(numStar))return;if(numStar!==0&&showSlug==="show_rating"){var _showUI2=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI2));}},[numStar]);(0,_react.useEffect)(function(){if(listActiveSelect.length>0&&showSlug==="options"){var _showUI3=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI3));}},[listActiveSelect]);(0,_react.useEffect)(function(){if(didSubmitted){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);var _showUI4=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI4));}},[didSubmitted]);var showUI=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;(0,_react.useEffect)(function(){if(isShowingExtraForm){_reactNative.Animated.sequence([_reactNative.Animated.timing(showUI,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(showUI,{toValue:1,duration:350,useNativeDriver:false})]).start(function(){});}},[isShowingExtraForm]);var opacitySecondaryQuestion=secondaryQuestionAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityTextArea=textAreaAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityFineprint=fineprintAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacitySubmitBtn=submitBtnAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var disableSumitBtn=false;if(comment_mandatory==1&&!inputValue.trim()){disableSumitBtn=true;}if(show_rating_star==1||show_rating_number==1)if(numStar==0)disableSumitBtn=true;var appWidth=f.getAppWidth(instrusive_style);var isTabletInstrusive=false;if(_const.isTablet&&!!instrusive_style)isTabletInstrusive=true;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:{paddingHorizontal:isTabletInstrusive?22:f.w_p21(appWidth),paddingTop:isTabletInstrusive?22:f.w_p16(appWidth),marginTop:_reactNative.Platform.OS==="android"&&!_const.isTablet&&!!instrusive_style?_reactNative.StatusBar.currentHeight:0},children:(0,_jsxRuntime.jsx)(_.Header,Object.assign({},theme,{handleButtonClose:handleButtonClose,title:title,image_file_url:image_file_url,instrusive_style:instrusive_style,alignment:alignment,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))})}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,pagingEnabled:true,style:{flex:1},contentContainerStyle:{flexGrow:1},scrollEnabled:false,keyboardShouldPersistTaps:"always",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.ratingContainer,{width:appWidth,marginTop:isTabletInstrusive?22:f.w_p16(appWidth)}],children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{ref:function ref(_ref2){return scrollViewInputRef(_ref2);},style:{flex:1,width:"100%"},contentContainerStyle:{flexGrow:1,alignItems:"center",paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},showsVerticalScrollIndicator:false,showsHorizontalScrollIndicator:false,children:[question&&showHeightToLowUI[0]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Question,Object.assign({},theme,{question:question,alignment:alignment}))}),(show_rating_number==1||show_rating_star==1)&&showHeightToLowUI[1]&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:[show_rating_number==1&&(0,_jsxRuntime.jsx)(_ui.RatingNumber,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,appWidth:appWidth})),show_rating_star==1&&(0,_jsxRuntime.jsx)(_ui.RatingStar,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,disable:!!read_only_rating||false}))]}),(instruction&&showHeightToLowUI[2]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Instruction,Object.assign({},theme,{instruction:form[`instruction_${numStar}_star`]||instruction,alignment:alignment}))}),(options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.MultipleSelectInput,{theme:theme,options:options,animaginSelectBtn:animaginSelectBtn,listActiveSelect:listActiveSelect,handleSelectOption:handleSelectOption,handleMultiSelectOption:handleMultiSelectOption,options_multiselect:options_multiselect,animated:multipleSelectAni,appWidth:appWidth})}),secondary_question&&showHeightToLowUI[4]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySecondaryQuestion,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.SecondaryQuestion,Object.assign({},theme,{secondary_question:form[`secondary_question_${numStar}_star`]||secondary_question,alignment:alignment}))}),show_comment&&showHeightToLowUI[5]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:opacityTextArea,width:"100%",height:_const.isTablet?110:94,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.TextArea,Object.assign({},theme,{inputValue:inputValue,numStar:numStar,handleChangeText:handleChangeText,comment_placeholder:form[`comment_placeholder_${numStar}_star`]||comment_placeholder,animated:textAreaAni,appWidth:appWidth}))}),fineprint&&showHeightToLowUI[6]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacityFineprint},children:(0,_jsxRuntime.jsx)(_ui.Fineprint,Object.assign({},theme,{fineprint:fineprint,alignment:alignment}))})]}),(showHeightToLowUI[7]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySubmitBtn,paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:button_text,onPress:function onPress(){return submitForm();},disabled:disableSumitBtn,loading:loading,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{paddingBottom:animationInSideApp,width:appWidth}})]})})]});};var _default=exports.default=NonInstrusiveUI;var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var styles=_reactNative.StyleSheet.create({ratingContainer:{flex:1,alignItems:"center"}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _assets=require("../assets");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/header.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Header=exports.Header=function Header(_ref){var title=_ref.title,title_color=_ref.title_color,title_font=_ref.title_font,title_fontsize=_ref.title_fontsize,image_file_url=_ref.image_file_url,handleButtonClose=_ref.handleButtonClose,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment,appWidth=_ref.appWidth,isTabletInstrusive=_ref.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.headerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{hitSlop:styles.hitSlop,onPress:handleButtonClose,style:Object.assign({},styles.btnCloseHeader,{marginBottom:isTabletInstrusive?0:f.w_p(appWidth,10)}),children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgCloseAsset,style:{width:isTabletInstrusive?28:f.w_p(appWidth,24),height:isTabletInstrusive?28:f.w_p(appWidth,24),tintColor:title_color},resizeMode:"contain"})}),image_file_url&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{justifyContent:'center',alignItems:'center'},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:image_file_url},style:{width:isTabletInstrusive?244:f.w_p(appWidth,200),height:isTabletInstrusive?244:f.w_p(appWidth,200)}})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:alignment,fontFamily:title_font,color:title_color,fontSize:title_fontsize}],children:title||'Help us get better'})]})});};var styles=_reactNative.StyleSheet.create({headerContainer:{flexDirection:'column'},hitSlop:{top:10,left:10,right:10,bottom:10},btnCloseHeader:{marginLeft:'auto'}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _assets=require("../assets");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/component/header.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Header=exports.Header=function Header(_ref){var title=_ref.title,title_color=_ref.title_color,title_font=_ref.title_font,title_fontsize=_ref.title_fontsize,image_file_url=_ref.image_file_url,handleButtonClose=_ref.handleButtonClose,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment,appWidth=_ref.appWidth,isTabletInstrusive=_ref.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.headerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{hitSlop:styles.hitSlop,onPress:handleButtonClose,style:Object.assign({},styles.btnCloseHeader,{marginBottom:isTabletInstrusive?0:f.w_p(appWidth,10)}),children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgCloseAsset,style:{width:isTabletInstrusive?28:f.w_p(appWidth,24),height:isTabletInstrusive?28:f.w_p(appWidth,24),tintColor:title_color},resizeMode:"contain"})}),image_file_url&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{justifyContent:'center',alignItems:'center'},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:image_file_url},style:{width:isTabletInstrusive?244:f.w_p(appWidth,200),height:isTabletInstrusive?244:f.w_p(appWidth,200)}})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:alignment,fontFamily:title_font,color:title_color,fontSize:title_fontsize}],children:title||'Help us get better'})]})});};var styles=_reactNative.StyleSheet.create({headerContainer:{flexDirection:'column'},hitSlop:{top:10,left:10,right:10,bottom:10},btnCloseHeader:{marginLeft:'auto'}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _reactNativeRate=_interopRequireWildcard(require("react-native-rate"));var _component=require("./component");var _api=require("./api");var _const=require("./utils/const");var _StatusBarHeight=require("./utils/StatusBarHeight");var _=_interopRequireWildcard(require("./utils/MyFunction"));var _reactNativeAndroidKeyboardAdjustOriginallyus=_interopRequireDefault(require("react-native-android-keyboard-adjust-originallyus"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/index.jsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var _Dimensions$get=_reactNative.Dimensions.get('window'),height=_Dimensions$get.height;var requestFormTimestamp=null;var submitFormTimestamp=null;var AIAFeedback=function(_React$Component){(0,_inherits2.default)(AIAFeedback,_React$Component);function AIAFeedback(props){var _this;(0,_classCallCheck2.default)(this,AIAFeedback);_this=_callSuper(this,AIAFeedback,[props]);_this.getKeyboardInputMode=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS=='android'){var inputMode=yield _reactNativeAndroidKeyboardAdjustOriginallyus.default.getCurrentSoftInputMode();_this.setState(Object.assign({},_this.state,{defaultNumberSoftInputMode:inputMode}));}return null;});_this.restoreKeyboardInputMode=function(){switch(_this.state.defaultNumberSoftInputMode){case 48:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustNothing();console.log('AndroidKeyboardAdjust.setAdjustNothing()');break;case 32:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustPan();console.log('AndroidKeyboardAdjust.setAdjustPan()');break;case 16:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.log('AndroidKeyboardAdjust.setAdjustResize()');break;case 0:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setStateUnspecified();console.log('AndroidKeyboardAdjust.setStateUnspecified()');break;default:break;}};_this.onKeyboardDidShow=function(e){if(!_this.state.isVisible)return;var form=_this.state.form;_this.isShowingKeyboard=true;var customKeyboardHeight=e.endCoordinates.height;if(_const.isTablet&&form!=null&&form.instrusive_style)customKeyboardHeight=e.endCoordinates.height;if(!_const.isTablet&&form!=null&&form.instrusive_style&&_reactNative.Platform.OS==='android')customKeyboardHeight=1;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:customKeyboardHeight,duration:300,easing:_reactNative.Easing.ease,useNativeDriver:false}).start(function(){if(_this.scrollViewInputRef){_this.scrollViewInputRef.scrollToEnd({duration:350,animated:true});}});};_this.onKeyboardDidHide=function(){if(!_this.state.isVisible)return;_this.isShowingKeyboard=false;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:0,duration:350,useNativeDriver:false}).start();};_this.getVersion=function(){return _const.XVersion;};_this.setFormSlug=function(formSlug){if(!formSlug)return;if(formSlug.trim().length<2)return;_this.formSlug=formSlug.trim();};_this.setAppSecret=function(appSecret){_this.appSecret=appSecret;};_this.setAppUserId=function(){var userId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';try{if(typeof userId==='object'&&userId!==null){var userIdObject=Object.keys(userId).length===0?'':JSON.stringify(userId);_this.appUserId=userIdObject;return;}var userIdString=userId?userId.toString():'';_this.appUserId=userIdString;}catch(error){console.log('FeedbackSDK setAppUserId error:',error);_this.appUserId='';}};_this.setLanguage=function(language){if(!language||language.length<2){language='en';}language=language.toLowerCase();_this.language=language;};_this.setMetadata=function(metadata){if(!metadata)return;_this.metadata={metadata:metadata};};_this.testRatingForm=function(eventTag,callbackFn){_this.requestForm(true,eventTag,callbackFn);};_this.showRatingForm=function(eventTag,callbackFn){_this.requestForm(false,eventTag,callbackFn);};_this.hideRatingForm=function(){_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto'});_this.performCallbackFunction();_this.sdkCallbackFunction=null;_this.animatedValue=new _reactNative.Animated.Value(0);_this.isShowingKeyboard=false;_this.keyboardHeight=new _reactNative.Animated.Value(0);};_this.performCallbackFunction=function(){if(_this.sdkCallbackFunction&&typeof _this.sdkCallbackFunction==='function'){_this.sdkCallbackFunction(_this.formDidShow);}_this.restoreKeyboardInputMode();_this.sdkCallbackFunction=null;};_this.requestForm=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(debug){var eventTag=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var callbackFn=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(_this.state.isVisible)return;console.log({bundleId:_reactNativeDeviceInfo.default.getBundleId()});_this.formDidShow=false;_this.sdkCallbackFunction=null;if(callbackFn&&typeof callbackFn==='function'){_this.sdkCallbackFunction=callbackFn;}if(requestFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-requestFormTimestamp<3000)return;}requestFormTimestamp=Date.now();_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],didSubmitted:false,isShowingExtraForm:false});_this.eventTag=eventTag;_this.debug=debug?1:0;var build_number=yield _.getBuildNumber();var storage_key=`dk3@sq8_${build_number}`;var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem(storage_key);if(!install_timestamp)_reactNativeEncryptedStorage.default.setItem(storage_key,`${Math.floor(Date.now()/1000)}`);var bodyData={slug:_this.formSlug,debug:debug,event_tag:eventTag,install_timestamp:install_timestamp||0,metadata:_this.metadata||null};var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendRequest)(bodyData,{headers:headers});if(res!=null&&res.error){if(debug)Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.performCallbackFunction();return;}if(!(res!=null&&res.title)||!(res!=null&&res.theme)){_this.performCallbackFunction();return;}_this.formDidShow=true;_this.setState({form:res,isVisible:true},function(){setTimeout(function(){_reactNative.Animated.timing(_this.animatedValue,{toValue:1,useNativeDriver:false}).start();},350);});});return function(_x){return _ref2.apply(this,arguments);};}();_this.handleButtonClose=function(){_reactNative.Animated.timing(_this.isVisibleValue,{toValue:0,useNativeDriver:false}).start(function(){_this.hideRatingForm();});};_this.handleChangeText=function(value){_this.setState({inputValue:value});};_this.handleMultiSelectOption=function(index){var listActiveSelect=_this.state.listActiveSelect;var indexActive=listActiveSelect.indexOf(index);if(indexActive===-1){listActiveSelect.push(index);_this.setState({listActiveSelect:(0,_toConsumableArray2.default)(listActiveSelect)});}else{_this.setState({listActiveSelect:listActiveSelect.filter(function(element,i){return element!==index;})});}};_this.handleSelectOption=function(index){_this.setState({listActiveSelect:[index]});};_this.handlePressRating=function(numberValue){_this.setState({numStar:numberValue},function(){var _this$state$form,_this$state$form2,_this$state$form2$aut,_this$state$form3,_this$state$form3$aut;if((_this$state$form=_this.state.form)!=null&&_this$state$form.auto_submit&&(_this$state$form2=_this.state.form)!=null&&(_this$state$form2$aut=_this$state$form2.auto_submit)!=null&&_this$state$form2$aut.length&&(_this$state$form3=_this.state.form)!=null&&(_this$state$form3$aut=_this$state$form3.auto_submit)!=null&&_this$state$form3$aut.includes(numberValue)){_this.submitForm(true);}});};_this.blinkAnimation=function(){_reactNative.Animated.sequence([_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:1,duration:350,useNativeDriver:false})]).start();};_this.submitForm=(0,_asyncToGenerator2.default)(function*(){var _form$url;var isAutoSubmit=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var _this$state=_this.state,numStar=_this$state.numStar,inputValue=_this$state.inputValue,listActiveSelect=_this$state.listActiveSelect,form=_this$state.form,isShowingExtraForm=_this$state.isShowingExtraForm,originalFormModel=_this$state.originalFormModel,didSubmitted=_this$state.didSubmitted;if(submitFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-submitFormTimestamp<1000)return;}submitFormTimestamp=Date.now();if(form!=null&&form.url&&(form==null?void 0:(_form$url=form.url)==null?void 0:_form$url.length)>5){_reactNative.Linking.canOpenURL(form==null?void 0:form.url).then(function(supported){supported&&_reactNative.Linking.openURL(form==null?void 0:form.url);},function(err){return console.log('FeedbackSDK Error:',err);});}if(form&&!form.auto_store_review){var url=_reactNative.Platform.OS==='ios'?form==null?void 0:form.ios_review_url:form==null?void 0:form.android_review_url;if(url){_reactNative.Linking.canOpenURL(url).then(function(supported){supported&&_reactNative.Linking.openURL(url);},function(err){return console.log('FeedbackSDK Error:',err);});}}if(isShowingExtraForm){_this.handleSubmitFormResponse(originalFormModel);return;}if(didSubmitted){_this.handleButtonClose();return;}_this.setState({loading:true});var bodyData={slug:_this.formSlug,rating:numStar,event_tag:_this.eventTag,debug:_this.debug,request_id:form==null?void 0:form.id,selected_options:listActiveSelect.join(','),free_text:inputValue,auto:isAutoSubmit,metadata:_this.metadata||null};var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem('@opkjnbvfdxc');if(!install_timestamp)yield _reactNativeEncryptedStorage.default.setItem('@opkjnbvfdxc',`${Math.floor(Date.now()/1000)}`);var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendSubmit)(bodyData,{headers:headers});if(res!=null&&res.error){Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.hideRatingForm();return;}_this.setState({didSubmitted:true});_this.setState({loading:false});if(res!=null&&res.auto_store_review){var options={AppleAppID:`${res==null?void 0:res.ios_store_app_id}`,OtherAndroidURL:res==null?void 0:res.android_review_url,preferredAndroidMarket:_reactNativeRate.AndroidMarket.Google,preferInApp:true,openAppStoreIfInAppFails:false};_reactNativeRate.default.rate(options,function(success){console.log('success',success);});}if(res!=null&&res.extra_form){_this.handleExtraFormResponse(res);return;}_this.handleSubmitFormResponse(res);return;});_this.handleExtraFormResponse=function(res){_this.setState({isShowingExtraForm:true},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:res,form:res.extra_form});},350);});};_this.handleSubmitFormResponse=function(res){_this.setState({isShowingExtraForm:false},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:null,form:res});},350);});};_this.state={form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto',defaultNumberSoftInputMode:null};_this.animatedValue=new _reactNative.Animated.Value(0);_this.keyboardHeight=new _reactNative.Animated.Value(0);_this.formSlug='native_rating_form';_this.scrollViewInputRef=null;_this.isShowingKeyboard=false;_this.timeout=null;_this.formDidShow=true;_this.eventTag=null;_this.showKeyboardSub=null;_this.hideKeyboardSub=null;_this.heightParentView=0;_this.isVisibleValue=new _reactNative.Animated.Value(0);_this.opacityAnimatedValue=new _reactNative.Animated.Value(1);_this.metadata=null;_this.sdkCallbackFunction=null;_this.appUserId='',_this.appSecret='',_this.language='en';return _this;}(0,_createClass2.default)(AIAFeedback,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){var isVisible=this.state.isVisible;if(isVisible!==prevState.isVisible){if(isVisible){_reactNative.Animated.timing(this.isVisibleValue,{toValue:1,useNativeDriver:false}).start();}}}},{key:"componentDidMount",value:function componentDidMount(){this.getKeyboardInputMode();if(_reactNative.Platform.OS==='ios'){this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillHide',this.onKeyboardDidHide);return;}this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidHide',this.onKeyboardDidHide);}},{key:"componentWillUnmount",value:function componentWillUnmount(){try{var _this$showKeyboardSub,_this$hideKeyboardSub;if(this.timeout)clearTimeout(this.timeout);if((_this$showKeyboardSub=this.showKeyboardSub)!=null&&_this$showKeyboardSub.remove&&(_this$hideKeyboardSub=this.hideKeyboardSub)!=null&&_this$hideKeyboardSub.remove){this.showKeyboardSub.remove();this.hideKeyboardSub.remove();return;}if(_reactNative.Platform.OS==='ios'){if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardWillShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardWillHide',this.onKeyboardDidHide);}return;}if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardDidShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardDidHide',this.onKeyboardDidHide);}}catch(error){console.log('FeedbackSDK Error:',error);}}},{key:"render",value:function render(){var _this$props,_this2=this;var _this$state2=this.state,form=_this$state2.form,numStar=_this$state2.numStar,inputValue=_this$state2.inputValue,listActiveSelect=_this$state2.listActiveSelect,didSubmitted=_this$state2.didSubmitted,loading=_this$state2.loading,isShowingExtraForm=_this$state2.isShowingExtraForm,heightScreenTablet=_this$state2.heightScreenTablet;if(!form)return null;if(!form.theme)return null;var theme=form.theme;var heightParentViewAni=this.isVisibleValue.interpolate({inputRange:[0,1],outputRange:[height,0]});var animaginSelectBtn=this.keyboardHeight.interpolate({inputRange:[0,200],outputRange:[16/667*_const.heightScreen,10/667*_const.heightScreen]});var cmtTranslateY=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[150,0]});var cmtAniOpacity=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityUI=this.opacityAnimatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var widthStyle=_const.widthScreen;var translateX=-(widthStyle/2);var bottomStyle='auto';var rightStyle='auto';var leftStyle='50%';if(!!!form.instrusive_style){bottomStyle=0;}if(!!!form.instrusive_style&&_const.isTablet){widthStyle=_const.widthScreenNonIntr;rightStyle='15%';translateX=0;leftStyle='auto';}var heightUI;if(_const.isTablet)heightUI=heightScreenTablet;else{heightUI=heightScreenTablet==='auto'?'auto':_const.heightScreen-40;}var heightNonIntrusCondition=_const.heightScreen-40;if(_const.isTablet)heightNonIntrusCondition=_const.heightScreen/1.5;var animationOutSideApp=0;var animationInSideApp=0;if(_const.isTablet||!_const.isTablet&&!form.instrusive_style&&_reactNative.Platform.OS!=='android')animationOutSideApp=this.keyboardHeight;if(!_const.isTablet&&form.instrusive_style)animationInSideApp=this.keyboardHeight;var isSoftInputModeResize=_reactNative.Platform.OS==='android'&&!!form.instrusive_style;if(isSoftInputModeResize){_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.warn('keyboard show on full screen');}var finalHeight=_const.isTablet?heightScreenTablet:_const.heightScreen;if(this!=null&&(_this$props=this.props)!=null&&_this$props.translucent)finalHeight=_const.heightScreen+(_reactNative.StatusBar==null?void 0:_reactNative.StatusBar.currentHeight);return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:{position:'absolute',transform:[{translateY:heightParentViewAni},{translateX:translateX}],paddingBottom:animationOutSideApp,width:widthStyle,bottom:bottomStyle,right:rightStyle,left:leftStyle,zIndex:9999999,elevation:9999999},children:[JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='android'&&(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:'height',style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='ios'&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1,marginHorizontal:_const.isTablet?20:0},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!!form.instrusive_style&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{borderTopLeftRadius:16/375*_const.widthScreenNonIntr,borderTopRightRadius:16/375*_const.widthScreenNonIntr,backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff'}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>heightNonIntrusCondition&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:heightNonIntrusCondition});}},style:[{flex:1,height:heightUI,opacity:opacityUI,paddingBottom:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})})]});}}]);return AIAFeedback;}(_react.default.Component);var _default=exports.default=AIAFeedback;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _reactNativeRate=_interopRequireWildcard(require("react-native-rate"));var _component=require("./component");var _api=require("./api");var _const=require("./utils/const");var _StatusBarHeight=require("./utils/StatusBarHeight");var _=_interopRequireWildcard(require("./utils/MyFunction"));var _reactNativeAndroidKeyboardAdjustOriginallyus=_interopRequireDefault(require("react-native-android-keyboard-adjust-originallyus"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/index.jsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var _Dimensions$get=_reactNative.Dimensions.get('window'),height=_Dimensions$get.height;var requestFormTimestamp=null;var submitFormTimestamp=null;var AIAFeedback=function(_React$Component){(0,_inherits2.default)(AIAFeedback,_React$Component);function AIAFeedback(props){var _this;(0,_classCallCheck2.default)(this,AIAFeedback);_this=_callSuper(this,AIAFeedback,[props]);_this.getKeyboardInputMode=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS=='android'){var inputMode=yield _reactNativeAndroidKeyboardAdjustOriginallyus.default.getCurrentSoftInputMode();_this.setState(Object.assign({},_this.state,{defaultNumberSoftInputMode:inputMode}));}return null;});_this.restoreKeyboardInputMode=function(){switch(_this.state.defaultNumberSoftInputMode){case 48:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustNothing();console.log('AndroidKeyboardAdjust.setAdjustNothing()');break;case 32:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustPan();console.log('AndroidKeyboardAdjust.setAdjustPan()');break;case 16:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.log('AndroidKeyboardAdjust.setAdjustResize()');break;case 0:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setStateUnspecified();console.log('AndroidKeyboardAdjust.setStateUnspecified()');break;default:break;}};_this.onKeyboardDidShow=function(e){if(!_this.state.isVisible)return;var form=_this.state.form;_this.isShowingKeyboard=true;var customKeyboardHeight=e.endCoordinates.height;if(_const.isTablet&&form!=null&&form.instrusive_style)customKeyboardHeight=e.endCoordinates.height;if(!_const.isTablet&&form!=null&&form.instrusive_style&&_reactNative.Platform.OS==='android')customKeyboardHeight=1;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:customKeyboardHeight,duration:300,easing:_reactNative.Easing.ease,useNativeDriver:false}).start(function(){if(_this.scrollViewInputRef){_this.scrollViewInputRef.scrollToEnd({duration:350,animated:true});}});};_this.onKeyboardDidHide=function(){if(!_this.state.isVisible)return;_this.isShowingKeyboard=false;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:0,duration:350,useNativeDriver:false}).start();};_this.getVersion=function(){return _const.XVersion;};_this.setFormSlug=function(formSlug){if(!formSlug)return;if(formSlug.trim().length<2)return;_this.formSlug=formSlug.trim();};_this.setAppSecret=function(appSecret){_this.appSecret=appSecret;};_this.setAppUserId=function(){var userId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';try{if(typeof userId==='object'&&userId!==null){var userIdObject=Object.keys(userId).length===0?'':JSON.stringify(userId);_this.appUserId=userIdObject;return;}var userIdString=userId?userId.toString():'';_this.appUserId=userIdString;}catch(error){console.log('FeedbackSDK setAppUserId error:',error);_this.appUserId='';}};_this.setLanguage=function(language){if(!language||language.length<2){language='en';}language=language.toLowerCase();_this.language=language;};_this.setMetadata=function(metadata){if(!metadata)return;_this.metadata={metadata:metadata};};_this.testRatingForm=function(eventTag,callbackFn){_this.requestForm(true,eventTag,callbackFn);};_this.showRatingForm=function(eventTag,callbackFn){_this.requestForm(false,eventTag,callbackFn);};_this.hideRatingForm=function(){_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto'});_this.performCallbackFunction();_this.sdkCallbackFunction=null;_this.animatedValue=new _reactNative.Animated.Value(0);_this.isShowingKeyboard=false;_this.keyboardHeight=new _reactNative.Animated.Value(0);};_this.performCallbackFunction=function(){if(_this.sdkCallbackFunction&&typeof _this.sdkCallbackFunction==='function'){_this.sdkCallbackFunction(_this.formDidShow);}_this.restoreKeyboardInputMode();_this.sdkCallbackFunction=null;};_this.requestForm=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(debug){var eventTag=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var callbackFn=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(_this.state.isVisible)return;console.log({bundleId:_reactNativeDeviceInfo.default.getBundleId()});_this.formDidShow=false;_this.sdkCallbackFunction=null;if(callbackFn&&typeof callbackFn==='function'){_this.sdkCallbackFunction=callbackFn;}if(requestFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-requestFormTimestamp<3000)return;}requestFormTimestamp=Date.now();_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],didSubmitted:false,isShowingExtraForm:false});_this.eventTag=eventTag;_this.debug=debug?1:0;var build_number=yield _.getBuildNumber();var storage_key=`dk3@sq8_${build_number}`;var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem(storage_key);if(!install_timestamp)_reactNativeEncryptedStorage.default.setItem(storage_key,`${Math.floor(Date.now()/1000)}`);var bodyData={slug:_this.formSlug,debug:debug,event_tag:eventTag,install_timestamp:install_timestamp||0,metadata:_this.metadata||null};var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendRequest)(bodyData,{headers:headers});if(res!=null&&res.error){if(debug)Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.performCallbackFunction();return;}if(!(res!=null&&res.title)||!(res!=null&&res.theme)){_this.performCallbackFunction();return;}_this.formDidShow=true;_this.setState({form:res,isVisible:true},function(){setTimeout(function(){_reactNative.Animated.timing(_this.animatedValue,{toValue:1,useNativeDriver:false}).start();},350);});});return function(_x){return _ref2.apply(this,arguments);};}();_this.handleButtonClose=function(){_reactNative.Animated.timing(_this.isVisibleValue,{toValue:0,useNativeDriver:false}).start(function(){_this.hideRatingForm();});};_this.handleChangeText=function(value){_this.setState({inputValue:value});};_this.handleMultiSelectOption=function(index){var listActiveSelect=_this.state.listActiveSelect;var indexActive=listActiveSelect.indexOf(index);if(indexActive===-1){listActiveSelect.push(index);_this.setState({listActiveSelect:(0,_toConsumableArray2.default)(listActiveSelect)});}else{_this.setState({listActiveSelect:listActiveSelect.filter(function(element,i){return element!==index;})});}};_this.handleSelectOption=function(index){_this.setState({listActiveSelect:[index]});};_this.handlePressRating=function(numberValue){_this.setState({numStar:numberValue},function(){var _this$state$form,_this$state$form2,_this$state$form2$aut,_this$state$form3,_this$state$form3$aut;if((_this$state$form=_this.state.form)!=null&&_this$state$form.auto_submit&&(_this$state$form2=_this.state.form)!=null&&(_this$state$form2$aut=_this$state$form2.auto_submit)!=null&&_this$state$form2$aut.length&&(_this$state$form3=_this.state.form)!=null&&(_this$state$form3$aut=_this$state$form3.auto_submit)!=null&&_this$state$form3$aut.includes(numberValue)){_this.submitForm(true);}});};_this.blinkAnimation=function(){_reactNative.Animated.sequence([_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:1,duration:350,useNativeDriver:false})]).start();};_this.submitForm=(0,_asyncToGenerator2.default)(function*(){var _form$url;var isAutoSubmit=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var _this$state=_this.state,numStar=_this$state.numStar,inputValue=_this$state.inputValue,listActiveSelect=_this$state.listActiveSelect,form=_this$state.form,isShowingExtraForm=_this$state.isShowingExtraForm,originalFormModel=_this$state.originalFormModel,didSubmitted=_this$state.didSubmitted;if(submitFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-submitFormTimestamp<1000)return;}submitFormTimestamp=Date.now();if(form!=null&&form.url&&(form==null?void 0:(_form$url=form.url)==null?void 0:_form$url.length)>5){_reactNative.Linking.canOpenURL(form==null?void 0:form.url).then(function(supported){supported&&_reactNative.Linking.openURL(form==null?void 0:form.url);},function(err){return console.log('FeedbackSDK Error:',err);});}if(form&&!form.auto_store_review){var url=_reactNative.Platform.OS==='ios'?form==null?void 0:form.ios_review_url:form==null?void 0:form.android_review_url;if(url){_reactNative.Linking.canOpenURL(url).then(function(supported){supported&&_reactNative.Linking.openURL(url);},function(err){return console.log('FeedbackSDK Error:',err);});}}if(isShowingExtraForm){_this.handleSubmitFormResponse(originalFormModel);return;}if(didSubmitted){_this.handleButtonClose();return;}_this.setState({loading:true});var bodyData={slug:_this.formSlug,rating:numStar,event_tag:_this.eventTag,debug:_this.debug,request_id:form==null?void 0:form.id,selected_options:listActiveSelect.join(','),free_text:inputValue,auto:isAutoSubmit,metadata:_this.metadata||null};var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem('@opkjnbvfdxc');if(!install_timestamp)yield _reactNativeEncryptedStorage.default.setItem('@opkjnbvfdxc',`${Math.floor(Date.now()/1000)}`);var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendSubmit)(bodyData,{headers:headers});if(res!=null&&res.error){Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.hideRatingForm();return;}_this.setState({didSubmitted:true});_this.setState({loading:false});if(res!=null&&res.auto_store_review){var options={AppleAppID:`${res==null?void 0:res.ios_store_app_id}`,OtherAndroidURL:res==null?void 0:res.android_review_url,preferredAndroidMarket:_reactNativeRate.AndroidMarket.Google,preferInApp:true,openAppStoreIfInAppFails:false};_reactNativeRate.default.rate(options,function(success){console.log('success',success);});}if(res!=null&&res.extra_form){_this.handleExtraFormResponse(res);return;}_this.handleSubmitFormResponse(res);return;});_this.handleExtraFormResponse=function(res){_this.setState({isShowingExtraForm:true},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:res,form:res.extra_form});},350);});};_this.handleSubmitFormResponse=function(res){_this.setState({isShowingExtraForm:false},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:null,form:res});},350);});};_this.state={form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto',defaultNumberSoftInputMode:null};_this.animatedValue=new _reactNative.Animated.Value(0);_this.keyboardHeight=new _reactNative.Animated.Value(0);_this.formSlug='native_rating_form';_this.scrollViewInputRef=null;_this.isShowingKeyboard=false;_this.timeout=null;_this.formDidShow=true;_this.eventTag=null;_this.showKeyboardSub=null;_this.hideKeyboardSub=null;_this.heightParentView=0;_this.isVisibleValue=new _reactNative.Animated.Value(0);_this.opacityAnimatedValue=new _reactNative.Animated.Value(1);_this.metadata=null;_this.sdkCallbackFunction=null;_this.appUserId='',_this.appSecret='',_this.language='en';return _this;}(0,_createClass2.default)(AIAFeedback,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){var isVisible=this.state.isVisible;if(isVisible!==prevState.isVisible){if(isVisible){_reactNative.Animated.timing(this.isVisibleValue,{toValue:1,useNativeDriver:false}).start();}}}},{key:"componentDidMount",value:function componentDidMount(){this.getKeyboardInputMode();if(_reactNative.Platform.OS==='ios'){this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillHide',this.onKeyboardDidHide);return;}this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidHide',this.onKeyboardDidHide);}},{key:"componentWillUnmount",value:function componentWillUnmount(){try{var _this$showKeyboardSub,_this$hideKeyboardSub;if(this.timeout)clearTimeout(this.timeout);if((_this$showKeyboardSub=this.showKeyboardSub)!=null&&_this$showKeyboardSub.remove&&(_this$hideKeyboardSub=this.hideKeyboardSub)!=null&&_this$hideKeyboardSub.remove){this.showKeyboardSub.remove();this.hideKeyboardSub.remove();return;}if(_reactNative.Platform.OS==='ios'){if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardWillShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardWillHide',this.onKeyboardDidHide);}return;}if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardDidShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardDidHide',this.onKeyboardDidHide);}}catch(error){console.log('FeedbackSDK Error:',error);}}},{key:"render",value:function render(){var _this$props,_this2=this;var _this$state2=this.state,form=_this$state2.form,numStar=_this$state2.numStar,inputValue=_this$state2.inputValue,listActiveSelect=_this$state2.listActiveSelect,didSubmitted=_this$state2.didSubmitted,loading=_this$state2.loading,isShowingExtraForm=_this$state2.isShowingExtraForm,heightScreenTablet=_this$state2.heightScreenTablet;if(!form)return null;if(!form.theme)return null;var theme=form.theme;var heightParentViewAni=this.isVisibleValue.interpolate({inputRange:[0,1],outputRange:[height,0]});var animaginSelectBtn=this.keyboardHeight.interpolate({inputRange:[0,200],outputRange:[16/667*_const.heightScreen,10/667*_const.heightScreen]});var cmtTranslateY=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[150,0]});var cmtAniOpacity=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityUI=this.opacityAnimatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var widthStyle=_const.widthScreen;var translateX=-(widthStyle/2);var bottomStyle='auto';var rightStyle='auto';var leftStyle='50%';if(!!!form.instrusive_style){bottomStyle=0;}if(!!!form.instrusive_style&&_const.isTablet){widthStyle=_const.widthScreenNonIntr;rightStyle='15%';translateX=0;leftStyle='auto';}var heightUI;if(_const.isTablet)heightUI=heightScreenTablet;else{heightUI=heightScreenTablet==='auto'?'auto':_const.heightScreen-40;}var heightNonIntrusCondition=_const.heightScreen-40;if(_const.isTablet)heightNonIntrusCondition=_const.heightScreen/1.5;var animationOutSideApp=0;var animationInSideApp=0;if(_const.isTablet||!_const.isTablet&&!form.instrusive_style&&_reactNative.Platform.OS!=='android')animationOutSideApp=this.keyboardHeight;if(!_const.isTablet&&form.instrusive_style)animationInSideApp=this.keyboardHeight;var isSoftInputModeResize=_reactNative.Platform.OS==='android'&&!!form.instrusive_style;if(isSoftInputModeResize){_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.warn('keyboard show on full screen');}var finalHeight=_const.isTablet?heightScreenTablet:_const.heightScreen;if(this!=null&&(_this$props=this.props)!=null&&_this$props.translucent)finalHeight=_const.heightScreen+(_reactNative.StatusBar==null?void 0:_reactNative.StatusBar.currentHeight);return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:{position:'absolute',transform:[{translateY:heightParentViewAni},{translateX:translateX}],paddingBottom:animationOutSideApp,width:widthStyle,bottom:bottomStyle,right:rightStyle,left:leftStyle,zIndex:9999999,elevation:9999999},children:[JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='android'&&(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:'height',style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='ios'&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1,marginHorizontal:_const.isTablet?20:0},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!!form.instrusive_style&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{borderTopLeftRadius:16/375*_const.widthScreenNonIntr,borderTopRightRadius:16/375*_const.widthScreenNonIntr,backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff'}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>heightNonIntrusCondition&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:heightNonIntrusCondition});}},style:[{flex:1,height:heightUI,opacity:opacityUI,paddingBottom:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})})]});}}]);return AIAFeedback;}(_react.default.Component);var _default=exports.default=AIAFeedback;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/ButtonSubmit.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ButtonSubmit=function ButtonSubmit(props){var onPress=props.onPress,title=props.title,_props$disabled=props.disabled,disabled=_props$disabled===void 0?false:_props$disabled,_props$loading=props.loading,loading=_props$loading===void 0?false:_props$loading,button_text_color=props.button_text_color,button_bg_color=props.button_bg_color,button_font=props.button_font,button_fontsize=props.button_fontsize,customStyle=props.customStyle,appWidth=props.appWidth,isTabletInstrusive=props.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.safeAreaViewContainer,Object.assign({marginTop:f.w_p(appWidth,10)},customStyle)],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewWrap,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:disabled||loading?function(){return null;}:onPress,style:[styles.btnContainer,{width:isTabletInstrusive?200:"100%",opacity:disabled?0.5:1,backgroundColor:button_bg_color,borderRadius:8,paddingVertical:12}],disabled:disabled,children:[loading&&(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{style:{position:"absolute"},color:button_text_color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:button_fontsize,color:button_text_color,fontFamily:button_font,opacity:loading?0:1},children:title})]})})});};var styles=_reactNative.StyleSheet.create({safeAreaViewContainer:{width:"100%"},btnContainer:{justifyContent:"center",alignItems:"center"},viewWrap:{justifyContent:"center",alignItems:"center"}});var _default=exports.default=ButtonSubmit;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/ButtonSubmit.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ButtonSubmit=function ButtonSubmit(props){var onPress=props.onPress,title=props.title,_props$disabled=props.disabled,disabled=_props$disabled===void 0?false:_props$disabled,_props$loading=props.loading,loading=_props$loading===void 0?false:_props$loading,button_text_color=props.button_text_color,button_bg_color=props.button_bg_color,button_font=props.button_font,button_fontsize=props.button_fontsize,customStyle=props.customStyle,appWidth=props.appWidth,isTabletInstrusive=props.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.safeAreaViewContainer,Object.assign({marginTop:f.w_p(appWidth,10)},customStyle)],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewWrap,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:disabled||loading?function(){return null;}:onPress,style:[styles.btnContainer,{width:isTabletInstrusive?200:"100%",opacity:disabled?0.5:1,backgroundColor:button_bg_color,borderRadius:8,paddingVertical:12}],disabled:disabled,children:[loading&&(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{style:{position:"absolute"},color:button_text_color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:button_fontsize,color:button_text_color,fontFamily:button_font,opacity:loading?0:1},children:title})]})})});};var styles=_reactNative.StyleSheet.create({safeAreaViewContainer:{width:"100%"},btnContainer:{justifyContent:"center",alignItems:"center"},viewWrap:{justifyContent:"center",alignItems:"center"}});var _default=exports.default=ButtonSubmit;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Fineprint.js";var Fineprint=function Fineprint(_ref){var fineprint_color=_ref.fineprint_color,fineprint_font=_ref.fineprint_font,fineprint_fontsize=_ref.fineprint_fontsize,fineprint=_ref.fineprint,_ref$nonIntrusive=_ref.nonIntrusive,nonIntrusive=_ref$nonIntrusive===void 0?false:_ref$nonIntrusive,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;var paddingHorizontal=_const.mainPaddingHorizontal;if(nonIntrusive&&_const.isTablet)paddingHorizontal=22;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.textComment,{fontSize:fineprint_fontsize,fontFamily:fineprint_font,color:fineprint_color,textAlign:alignment}],children:fineprint});};var _default=exports.default=Fineprint;var styles=_reactNative.StyleSheet.create({textComment:{marginTop:4/375*_const.widthScreen,paddingTop:4/375*_const.widthScreen,paddingBottom:12/375*_const.widthScreen}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Fineprint.js";var Fineprint=function Fineprint(_ref){var fineprint_color=_ref.fineprint_color,fineprint_font=_ref.fineprint_font,fineprint_fontsize=_ref.fineprint_fontsize,fineprint=_ref.fineprint,_ref$nonIntrusive=_ref.nonIntrusive,nonIntrusive=_ref$nonIntrusive===void 0?false:_ref$nonIntrusive,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;var paddingHorizontal=_const.mainPaddingHorizontal;if(nonIntrusive&&_const.isTablet)paddingHorizontal=22;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.textComment,{fontSize:fineprint_fontsize,fontFamily:fineprint_font,color:fineprint_color,textAlign:alignment}],children:fineprint});};var _default=exports.default=Fineprint;var styles=_reactNative.StyleSheet.create({textComment:{marginTop:4/375*_const.widthScreen,paddingTop:4/375*_const.widthScreen,paddingBottom:12/375*_const.widthScreen}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Instruction.js";var Instruction=function Instruction(_ref){var instruction_color=_ref.instruction_color,instruction_font=_ref.instruction_font,instruction_fontsize=_ref.instruction_fontsize,instruction=_ref.instruction,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:instruction_fontsize,fontFamily:instruction_font,color:instruction_color,textAlign:alignment},children:instruction});};var _default=exports.default=Instruction;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Instruction.js";var Instruction=function Instruction(_ref){var instruction_color=_ref.instruction_color,instruction_font=_ref.instruction_font,instruction_fontsize=_ref.instruction_fontsize,instruction=_ref.instruction,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:instruction_fontsize,fontFamily:instruction_font,color:instruction_color,textAlign:alignment},children:instruction});};var _default=exports.default=Instruction;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/MultipleSelectInput.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var delayValue=10;var AnimatedTouchableOpacity=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var MultipleSelectInput=function MultipleSelectInput(_ref){var theme=_ref.theme,options=_ref.options,listActiveSelect=_ref.listActiveSelect,handleSelectOption=_ref.handleSelectOption,handleMultiSelectOption=_ref.handleMultiSelectOption,options_multiselect=_ref.options_multiselect,animated=_ref.animated,appWidth=_ref.appWidth;var option_bg_color=theme.option_bg_color,option_border_color=theme.option_border_color,option_font=theme.option_font,option_fontsize=theme.option_fontsize,option_selected_bg_color=theme.option_selected_bg_color,option_selected_border_color=theme.option_selected_border_color,option_selected_text_color=theme.option_selected_text_color,option_text_color=theme.option_text_color;(0,_react.useEffect)(function(){delayValue=10;},[]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewOptionsContainer,children:options==null?void 0:options.map(function(_ref2){var slug=_ref2.slug,title=_ref2.title;var activeSelect=false;if(listActiveSelect.indexOf(slug)!==-1){activeSelect=true;}var borderColor=activeSelect?option_selected_border_color:option_border_color;var backgroundColor=activeSelect?option_selected_bg_color:option_bg_color;var color=activeSelect?option_selected_text_color:option_text_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{children:(0,_jsxRuntime.jsx)(AnimatedTouchableOpacity,{onPress:function onPress(){return options_multiselect?handleMultiSelectOption(slug):handleSelectOption(slug);},style:[styles.btnSelectContainer,{borderColor:borderColor,backgroundColor:backgroundColor,borderRadius:f.w_p(appWidth,16),paddingVertical:6,paddingHorizontal:16,marginHorizontal:6,marginVertical:8}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:option_font,fontSize:option_fontsize,textAlign:"center",color:color},children:title})})},`option-${slug}`);})});};MultipleSelectInput.defaultProps={options:[]};var _default=exports.default=MultipleSelectInput;var styles=_reactNative.StyleSheet.create({btnSelectContainer:{borderWidth:1,justifyContent:"center",alignItems:"center"},viewOptionsContainer:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"}});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/MultipleSelectInput.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var delayValue=10;var AnimatedTouchableOpacity=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var MultipleSelectInput=function MultipleSelectInput(_ref){var theme=_ref.theme,options=_ref.options,listActiveSelect=_ref.listActiveSelect,handleSelectOption=_ref.handleSelectOption,handleMultiSelectOption=_ref.handleMultiSelectOption,options_multiselect=_ref.options_multiselect,animated=_ref.animated,appWidth=_ref.appWidth;var option_bg_color=theme.option_bg_color,option_border_color=theme.option_border_color,option_font=theme.option_font,option_fontsize=theme.option_fontsize,option_selected_bg_color=theme.option_selected_bg_color,option_selected_border_color=theme.option_selected_border_color,option_selected_text_color=theme.option_selected_text_color,option_text_color=theme.option_text_color;(0,_react.useEffect)(function(){delayValue=10;},[]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewOptionsContainer,children:options==null?void 0:options.map(function(_ref2){var slug=_ref2.slug,title=_ref2.title;var activeSelect=false;if(listActiveSelect.indexOf(slug)!==-1){activeSelect=true;}var borderColor=activeSelect?option_selected_border_color:option_border_color;var backgroundColor=activeSelect?option_selected_bg_color:option_bg_color;var color=activeSelect?option_selected_text_color:option_text_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{children:(0,_jsxRuntime.jsx)(AnimatedTouchableOpacity,{onPress:function onPress(){return options_multiselect?handleMultiSelectOption(slug):handleSelectOption(slug);},style:[styles.btnSelectContainer,{borderColor:borderColor,backgroundColor:backgroundColor,borderRadius:f.w_p(appWidth,16),paddingVertical:6,paddingHorizontal:16,marginHorizontal:6,marginVertical:8}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:option_font,fontSize:option_fontsize,textAlign:"center",color:color},children:title})})},`option-${slug}`);})});};MultipleSelectInput.defaultProps={options:[]};var _default=exports.default=MultipleSelectInput;var styles=_reactNative.StyleSheet.create({btnSelectContainer:{borderWidth:1,justifyContent:"center",alignItems:"center"},viewOptionsContainer:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Question.js";var Question=function Question(_ref){var question_color=_ref.question_color,question_font=_ref.question_font,question_fontsize=_ref.question_fontsize,question=_ref.question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:question_font,color:question_color,fontSize:question_fontsize,textAlign:alignment},children:question});};var _default=exports.default=Question;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Question.js";var Question=function Question(_ref){var question_color=_ref.question_color,question_font=_ref.question_font,question_fontsize=_ref.question_fontsize,question=_ref.question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:question_font,color:question_color,fontSize:question_fontsize,textAlign:alignment},children:question});};var _default=exports.default=Question;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/RatingNumber.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var AnimatedTouchable=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var RatingNumber=function RatingNumber(props){var scale_label_color=props.scale_label_color,scale_label_left=props.scale_label_left,scale_label_right=props.scale_label_right,scale_label_font=props.scale_label_font,scale_label_fontsize=props.scale_label_fontsize,_handlePressRating=props.handlePressRating,numStar=props.numStar,rating_min=props.rating_min,rating_max=props.rating_max,appWidth=props.appWidth;var renderRating=function renderRating(){var listStar=[];var _loop=function _loop(i){listStar.push((0,_jsxRuntime.jsx)(ButtonNumber,Object.assign({},props,{handlePressRating:function handlePressRating(){_handlePressRating(i);},number:i,active:numStar===i,isStart:i===rating_min,isEnd:i===rating_max}),`rating-number-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingContainer,children:renderRating()}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:Object.assign({},styles.ratingLabelContainer,{marginTop:f.w_p(appWidth,12)}),children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_left||"Strongly disagree"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_right||"Strongly agree"})]})]});};var ButtonNumber=function ButtonNumber(_ref){var handlePressRating=_ref.handlePressRating,active=_ref.active,isStart=_ref.isStart,isEnd=_ref.isEnd,number=_ref.number,rating_number_font=_ref.rating_number_font,rating_number_fontsize=_ref.rating_number_fontsize,rating_number_bg_color=_ref.rating_number_bg_color,rating_number_border_color=_ref.rating_number_border_color,rating_number_selected_bg_color=_ref.rating_number_selected_bg_color,rating_number_selected_border_color=_ref.rating_number_selected_border_color,rating_number_selected_text_color=_ref.rating_number_selected_text_color,rating_number_text_color=_ref.rating_number_text_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;(0,_react.useEffect)(function(){if(active){_reactNative.Animated.timing(springAnimated,{toValue:1,useNativeDriver:false}).start();}else{_reactNative.Animated.timing(springAnimated,{toValue:0,useNativeDriver:false}).start();}},[active]);var backgroundColorAni=springAnimated.interpolate({inputRange:[0,1],outputRange:[rating_number_bg_color,rating_number_selected_bg_color]});return(0,_jsxRuntime.jsx)(AnimatedTouchable,{style:[styles.buttonNumberContainer,{borderColor:active?rating_number_selected_border_color:rating_number_border_color,borderRightWidth:isEnd?2*_reactNative.StyleSheet.hairlineWidth:0,borderTopLeftRadius:isStart?8:0,borderBottomLeftRadius:isStart?8:0,borderTopRightRadius:isEnd?8:0,borderBottomRightRadius:isEnd?8:0,backgroundColor:backgroundColorAni}],onPress:handlePressRating,activeOpacity:1,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:active?rating_number_selected_text_color:rating_number_text_color,fontSize:rating_number_fontsize,fontFamily:rating_number_font},children:number})});};var _default=exports.default=RatingNumber;var styles=_reactNative.StyleSheet.create({ratingContainer:{flexDirection:"row",flex:1},ratingLabelContainer:{flex:1,flexDirection:"row",justifyContent:"space-between"},buttonNumberContainer:{flex:1,paddingVertical:12,justifyContent:"center",alignItems:"center",borderWidth:1}});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/RatingNumber.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var AnimatedTouchable=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var RatingNumber=function RatingNumber(props){var scale_label_color=props.scale_label_color,scale_label_left=props.scale_label_left,scale_label_right=props.scale_label_right,scale_label_font=props.scale_label_font,scale_label_fontsize=props.scale_label_fontsize,_handlePressRating=props.handlePressRating,numStar=props.numStar,rating_min=props.rating_min,rating_max=props.rating_max,appWidth=props.appWidth;var renderRating=function renderRating(){var listStar=[];var _loop=function _loop(i){listStar.push((0,_jsxRuntime.jsx)(ButtonNumber,Object.assign({},props,{handlePressRating:function handlePressRating(){_handlePressRating(i);},number:i,active:numStar===i,isStart:i===rating_min,isEnd:i===rating_max}),`rating-number-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingContainer,children:renderRating()}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:Object.assign({},styles.ratingLabelContainer,{marginTop:f.w_p(appWidth,12)}),children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_left||"Strongly disagree"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_right||"Strongly agree"})]})]});};var ButtonNumber=function ButtonNumber(_ref){var handlePressRating=_ref.handlePressRating,active=_ref.active,isStart=_ref.isStart,isEnd=_ref.isEnd,number=_ref.number,rating_number_font=_ref.rating_number_font,rating_number_fontsize=_ref.rating_number_fontsize,rating_number_bg_color=_ref.rating_number_bg_color,rating_number_border_color=_ref.rating_number_border_color,rating_number_selected_bg_color=_ref.rating_number_selected_bg_color,rating_number_selected_border_color=_ref.rating_number_selected_border_color,rating_number_selected_text_color=_ref.rating_number_selected_text_color,rating_number_text_color=_ref.rating_number_text_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;(0,_react.useEffect)(function(){if(active){_reactNative.Animated.timing(springAnimated,{toValue:1,useNativeDriver:false}).start();}else{_reactNative.Animated.timing(springAnimated,{toValue:0,useNativeDriver:false}).start();}},[active]);var backgroundColorAni=springAnimated.interpolate({inputRange:[0,1],outputRange:[rating_number_bg_color,rating_number_selected_bg_color]});return(0,_jsxRuntime.jsx)(AnimatedTouchable,{style:[styles.buttonNumberContainer,{borderColor:active?rating_number_selected_border_color:rating_number_border_color,borderRightWidth:isEnd?2*_reactNative.StyleSheet.hairlineWidth:0,borderTopLeftRadius:isStart?8:0,borderBottomLeftRadius:isStart?8:0,borderTopRightRadius:isEnd?8:0,borderBottomRightRadius:isEnd?8:0,backgroundColor:backgroundColorAni}],onPress:handlePressRating,activeOpacity:1,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:active?rating_number_selected_text_color:rating_number_text_color,fontSize:rating_number_fontsize,fontFamily:rating_number_font},children:number})});};var _default=exports.default=RatingNumber;var styles=_reactNative.StyleSheet.create({ratingContainer:{flexDirection:"row",flex:1},ratingLabelContainer:{flex:1,flexDirection:"row",justifyContent:"space-between"},buttonNumberContainer:{flex:1,paddingVertical:12,justifyContent:"center",alignItems:"center",borderWidth:1}});
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _assets=require("../assets");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/RatingStar.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var pressRatingTimestamp=null;var RatingStar=function RatingStar(_ref){var rating_min=_ref.rating_min,rating_max=_ref.rating_max,numStar=_ref.numStar,_handlePressRating=_ref.handlePressRating,normal_star_color=_ref.normal_star_color,selected_star_color=_ref.selected_star_color,_ref$disable=_ref.disable,disable=_ref$disable===void 0?false:_ref$disable;var renderAllStars=function renderAllStars(){var listStar=[];var _loop=function _loop(i){var isDisable=!!disable||numStar===i;listStar.push((0,_jsxRuntime.jsx)(ButtonStar,{normal_star_color:normal_star_color,selected_star_color:selected_star_color,disabled:isDisable,handlePressRating:function handlePressRating(){_handlePressRating(i);},active:i<=numStar},`ButtonStar-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:renderAllStars()});};var _default=exports.default=RatingStar;var ButtonStar=(0,_react.memo)(function(props){var disabled=props.disabled,handlePressRating=props.handlePressRating,_props$active=props.active,active=_props$active===void 0?false:_props$active,normal_star_color=props.normal_star_color,selected_star_color=props.selected_star_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var onPressStar=function onPressStar(){if(pressRatingTimestamp){var nowTimestamp=Math.floor(Date.now());if(nowTimestamp-pressRatingTimestamp<500)return;}pressRatingTimestamp=Math.floor(Date.now());_reactNative.Animated.sequence([_reactNative.Animated.spring(springAnimated,{toValue:1,tension:50,useNativeDriver:true}),_reactNative.Animated.spring(springAnimated,{toValue:0,tension:50,useNativeDriver:true})]).start();handlePressRating();};var scaleStar=springAnimated.interpolate({inputRange:[0,1],outputRange:[1,1.5]});var tintColor=active?selected_star_color:normal_star_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{transform:[{scale:scaleStar}]},children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:!!disabled,onPress:onPressStar,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgStarAsset,style:[{width:_const.isTablet?42:34,height:_const.isTablet?42:34,marginHorizontal:_const.isTablet?12:8,tintColor:tintColor}],resizeMode:"contain"})})});});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _assets=require("../assets");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/RatingStar.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var pressRatingTimestamp=null;var RatingStar=function RatingStar(_ref){var rating_min=_ref.rating_min,rating_max=_ref.rating_max,numStar=_ref.numStar,_handlePressRating=_ref.handlePressRating,normal_star_color=_ref.normal_star_color,selected_star_color=_ref.selected_star_color,_ref$disable=_ref.disable,disable=_ref$disable===void 0?false:_ref$disable;var renderAllStars=function renderAllStars(){var listStar=[];var _loop=function _loop(i){var isDisable=!!disable||numStar===i;listStar.push((0,_jsxRuntime.jsx)(ButtonStar,{normal_star_color:normal_star_color,selected_star_color:selected_star_color,disabled:isDisable,handlePressRating:function handlePressRating(){_handlePressRating(i);},active:i<=numStar},`ButtonStar-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:renderAllStars()});};var _default=exports.default=RatingStar;var ButtonStar=(0,_react.memo)(function(props){var disabled=props.disabled,handlePressRating=props.handlePressRating,_props$active=props.active,active=_props$active===void 0?false:_props$active,normal_star_color=props.normal_star_color,selected_star_color=props.selected_star_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var onPressStar=function onPressStar(){if(pressRatingTimestamp){var nowTimestamp=Math.floor(Date.now());if(nowTimestamp-pressRatingTimestamp<500)return;}pressRatingTimestamp=Math.floor(Date.now());_reactNative.Animated.sequence([_reactNative.Animated.spring(springAnimated,{toValue:1,tension:50,useNativeDriver:true}),_reactNative.Animated.spring(springAnimated,{toValue:0,tension:50,useNativeDriver:true})]).start();handlePressRating();};var scaleStar=springAnimated.interpolate({inputRange:[0,1],outputRange:[1,1.5]});var tintColor=active?selected_star_color:normal_star_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{transform:[{scale:scaleStar}]},children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:!!disabled,onPress:onPressStar,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgStarAsset,style:[{width:_const.isTablet?42:34,height:_const.isTablet?42:34,marginHorizontal:_const.isTablet?12:8,tintColor:tintColor}],resizeMode:"contain"})})});});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/SecondaryQuestion.js";var SecondaryQuestion=function SecondaryQuestion(_ref){var secondary_question_color=_ref.secondary_question_color,secondary_question_font=_ref.secondary_question_font,secondary_question_fontsize=_ref.secondary_question_fontsize,secondary_question=_ref.secondary_question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:secondary_question_font,color:secondary_question_color,fontSize:secondary_question_fontsize,textAlign:alignment},children:secondary_question});};var _default=exports.default=SecondaryQuestion;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/SecondaryQuestion.js";var SecondaryQuestion=function SecondaryQuestion(_ref){var secondary_question_color=_ref.secondary_question_color,secondary_question_font=_ref.secondary_question_font,secondary_question_fontsize=_ref.secondary_question_fontsize,secondary_question=_ref.secondary_question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:secondary_question_font,color:secondary_question_color,fontSize:secondary_question_fontsize,textAlign:alignment},children:secondary_question});};var _default=exports.default=SecondaryQuestion;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/TextArea.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var TextArea=function TextArea(_ref){var inputValue=_ref.inputValue,comment_placeholder=_ref.comment_placeholder,handleChangeText=_ref.handleChangeText,textarea_bg_color=_ref.textarea_bg_color,textarea_border_color=_ref.textarea_border_color,textarea_focus_bg_color=_ref.textarea_focus_bg_color,textarea_focus_border_color=_ref.textarea_focus_border_color,textarea_font=_ref.textarea_font,textarea_fontsize=_ref.textarea_fontsize,textarea_placeholder_color=_ref.textarea_placeholder_color,textarea_text_color=_ref.textarea_text_color,appWidth=_ref.appWidth;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),onFocusInput=_useState2[0],setOnFocusInput=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.TextInput,{placeholder:comment_placeholder,placeholderTextColor:textarea_placeholder_color,style:[styles.viewImproveInput,{borderWidth:1,padding:f.w_p(appWidth,8),borderRadius:_const.isTablet?6:4,backgroundColor:onFocusInput?textarea_focus_bg_color:textarea_bg_color,fontFamily:textarea_font,color:textarea_text_color,borderColor:onFocusInput?textarea_focus_border_color:textarea_border_color,fontSize:textarea_fontsize}],multiline:true,value:inputValue,onChangeText:handleChangeText,onFocus:function onFocus(){return setOnFocusInput(true);},onBlur:function onBlur(){return setOnFocusInput(false);},autoCorrect:false});};var _default=exports.default=TextArea;var styles=_reactNative.StyleSheet.create({viewImproveInput:{flex:1,textAlignVertical:"top"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/TextArea.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var TextArea=function TextArea(_ref){var inputValue=_ref.inputValue,comment_placeholder=_ref.comment_placeholder,handleChangeText=_ref.handleChangeText,textarea_bg_color=_ref.textarea_bg_color,textarea_border_color=_ref.textarea_border_color,textarea_focus_bg_color=_ref.textarea_focus_bg_color,textarea_focus_border_color=_ref.textarea_focus_border_color,textarea_font=_ref.textarea_font,textarea_fontsize=_ref.textarea_fontsize,textarea_placeholder_color=_ref.textarea_placeholder_color,textarea_text_color=_ref.textarea_text_color,appWidth=_ref.appWidth;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),onFocusInput=_useState2[0],setOnFocusInput=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.TextInput,{placeholder:comment_placeholder,placeholderTextColor:textarea_placeholder_color,style:[styles.viewImproveInput,{borderWidth:1,padding:f.w_p(appWidth,8),borderRadius:_const.isTablet?6:4,backgroundColor:onFocusInput?textarea_focus_bg_color:textarea_bg_color,fontFamily:textarea_font,color:textarea_text_color,borderColor:onFocusInput?textarea_focus_border_color:textarea_border_color,fontSize:textarea_fontsize}],multiline:true,value:inputValue,onChangeText:handleChangeText,onFocus:function onFocus(){return setOnFocusInput(true);},onBlur:function onBlur(){return setOnFocusInput(false);},autoCorrect:false});};var _default=exports.default=TextArea;var styles=_reactNative.StyleSheet.create({viewImproveInput:{flex:1,textAlignVertical:"top"}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppHeight=getAppHeight;exports.getAppWidth=getAppWidth;exports.getVersion=exports.getUniqueID=exports.getSystemVersion=exports.getModel=exports.getManufacturer=exports.getDeviceType=exports.getDeviceId=exports.getBundleId=exports.getBuildNumber=exports.getBrand=void 0;exports.h_p16=h_p16;exports.h_p21=h_p21;exports.isNil=isNil;exports.isObject=isObject;exports.sample=sample;exports.w_p=w_p;exports.w_p16=w_p16;exports.w_p21=w_p21;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x1fa))/0x1*(-parseInt(f(0x1f9))/0x2)+-parseInt(f(0x1ee))/0x3+-parseInt(f(0x1e7))/0x4+-parseInt(f(0x1f6))/0x5*(-parseInt(f(0x1ec))/0x6)+parseInt(f(0x1ea))/0x7+-parseInt(f(0x1f2))/0x8*(-parseInt(f(0x1fb))/0x9)+parseInt(f(0x1f3))/0xa*(parseInt(f(0x1eb))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x90ed3);var isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x1e4)]()===a0g(0x1ed)?![]:_reactNativeDeviceInfo.default[a0g(0x1e4)](),_Dimensions$a0g=_reactNative.Dimensions[a0g(0x1e8)]('window'),width=_Dimensions$a0g.width,height=_Dimensions$a0g.height;function isObject(a){var h=a0g,b=typeof a;return a!=null&&(b==='object'||b===h(0x1ef));}function sample(a){var i=a0g,b=a==null?0x0:a[i(0x1e6)],c=Math[i(0x1fe)](Date[i(0x1fd)]()/0x3e8);return b?a[c%b]:undefined;}function isNil(a){return a==null;}function w_p(a,b){return b/0x177*a;}function w_p21(a){return 0x15/0x177*a;}function w_p16(a){return 0x10/0x177*a;}function h_p21(a){return 0x15/0x29b*a;}function h_p16(a){return 0x10/0x29b*a;}function getAppWidth(a){var b=width;return isTablet&&(b=a?0x300:0x177),b;}function getAppHeight(a){var b=height;return isTablet&&(b=a?height*0x3/0x4:0x1c2),b;}var getUniqueID=exports.getUniqueID=function(){var _ref=(0,_asyncToGenerator2.default)(function*(){var j=a0g;if(_reactNativeDeviceInfo.default['getUniqueID'])return typeof _reactNativeDeviceInfo.default['getUniqueID']()===j(0x1ed)?yield _reactNativeDeviceInfo.default['getUniqueID']():_reactNativeDeviceInfo.default['getUniqueID']();return typeof _reactNativeDeviceInfo.default[j(0x1f5)]()==='object'?yield _reactNativeDeviceInfo.default['getUniqueId']():_reactNativeDeviceInfo.default['getUniqueId']();});return function getUniqueID(){return _ref.apply(this,arguments);};}();var getSystemVersion=exports.getSystemVersion=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var k=a0g;return typeof _reactNativeDeviceInfo.default['getSystemVersion']()==='object'?yield _reactNativeDeviceInfo.default['getSystemVersion']():_reactNativeDeviceInfo.default[k(0x1fc)]();});return function getSystemVersion(){return _ref2.apply(this,arguments);};}();var getVersion=exports.getVersion=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){var l=a0g;return typeof _reactNativeDeviceInfo.default[l(0x1f0)]()===l(0x1ed)?yield _reactNativeDeviceInfo.default['getVersion']():_reactNativeDeviceInfo.default['getVersion']();});return function getVersion(){return _ref3.apply(this,arguments);};}();var getBuildNumber=exports.getBuildNumber=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(){var m=a0g;return typeof _reactNativeDeviceInfo.default['getBuildNumber']()===m(0x1ed)?yield _reactNativeDeviceInfo.default[m(0x1e3)]():_reactNativeDeviceInfo.default[m(0x1e3)]();});return function getBuildNumber(){return _ref4.apply(this,arguments);};}();function a0a(){var t=['function','getVersion','getManufacturer','320600soIMby','8237120DrpYBL','getDeviceId','getUniqueId','7545qWJvLt','getBundleId','getDeviceType','157116JvzZCp','8xMERWz','54jDwGYS','getSystemVersion','now','floor','getBuildNumber','isTablet','getBrand','length','4123364zeBauI','get','getModel','2053212dAppws','22sCOowU','2154BBUTov','object','1409991PtZYyI'];a0a=function a0a(){return t;};return a0a();}var getModel=exports.getModel=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(){var n=a0g;return typeof _reactNativeDeviceInfo.default[n(0x1e9)]()===n(0x1ed)?yield _reactNativeDeviceInfo.default[n(0x1e9)]():_reactNativeDeviceInfo.default['getModel']();});return function getModel(){return _ref5.apply(this,arguments);};}();function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x1e3;var f=c[d];return f;},a0b(a,b);}var getBundleId=exports.getBundleId=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){var o=a0g;return typeof _reactNativeDeviceInfo.default[o(0x1f7)]()==='object'?yield _reactNativeDeviceInfo.default[o(0x1f7)]():_reactNativeDeviceInfo.default[o(0x1f7)]();});return function getBundleId(){return _ref6.apply(this,arguments);};}();var getManufacturer=exports.getManufacturer=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(){var p=a0g;return typeof _reactNativeDeviceInfo.default[p(0x1f1)]()===p(0x1ed)?yield _reactNativeDeviceInfo.default['getManufacturer']():_reactNativeDeviceInfo.default[p(0x1f1)]();});return function getManufacturer(){return _ref7.apply(this,arguments);};}();var getDeviceType=exports.getDeviceType=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){var q=a0g;return typeof _reactNativeDeviceInfo.default['getDeviceType']()===q(0x1ed)?yield _reactNativeDeviceInfo.default[q(0x1f8)]():_reactNativeDeviceInfo.default[q(0x1f8)]();});return function getDeviceType(){return _ref8.apply(this,arguments);};}();var getDeviceId=exports.getDeviceId=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(){var r=a0g;return typeof _reactNativeDeviceInfo.default[r(0x1f4)]()===r(0x1ed)?yield _reactNativeDeviceInfo.default[r(0x1f4)]():_reactNativeDeviceInfo.default[r(0x1f4)]();});return function getDeviceId(){return _ref9.apply(this,arguments);};}();var getBrand=exports.getBrand=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(){var s=a0g;return typeof _reactNativeDeviceInfo.default[s(0x1e5)]()===s(0x1ed)?yield _reactNativeDeviceInfo.default[s(0x1e5)]():_reactNativeDeviceInfo.default[s(0x1e5)]();});return function getBrand(){return _ref10.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppHeight=getAppHeight;exports.getAppWidth=getAppWidth;exports.getVersion=exports.getUniqueID=exports.getSystemVersion=exports.getModel=exports.getManufacturer=exports.getDeviceType=exports.getDeviceId=exports.getBundleId=exports.getBuildNumber=exports.getBrand=void 0;exports.h_p16=h_p16;exports.h_p21=h_p21;exports.isNil=isNil;exports.isObject=isObject;exports.sample=sample;exports.w_p=w_p;exports.w_p16=w_p16;exports.w_p21=w_p21;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x13c;var f=c[d];return f;},a0b(a,b);}(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x155))/0x1+parseInt(f(0x14c))/0x2+-parseInt(f(0x146))/0x3*(parseInt(f(0x152))/0x4)+-parseInt(f(0x14b))/0x5*(-parseInt(f(0x154))/0x6)+-parseInt(f(0x151))/0x7+-parseInt(f(0x13e))/0x8+-parseInt(f(0x14f))/0x9*(-parseInt(f(0x142))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0xabc94);var isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x141)]()===a0g(0x143)?![]:_reactNativeDeviceInfo.default[a0g(0x141)](),_Dimensions$get=_reactNative.Dimensions['get']('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;function isObject(a){var h=a0g,b=typeof a;return a!=null&&(b==='object'||b===h(0x149));}function sample(a){var i=a0g,b=a==null?0x0:a['length'],c=Math[i(0x13f)](Date[i(0x14a)]()/0x3e8);return b?a[c%b]:undefined;}function isNil(a){return a==null;}function w_p(a,b){return b/0x177*a;}function w_p21(a){return 0x15/0x177*a;}function w_p16(a){return 0x10/0x177*a;}function h_p21(a){return 0x15/0x29b*a;}function h_p16(a){return 0x10/0x29b*a;}function getAppWidth(a){var b=width;return isTablet&&(b=a?0x300:0x177),b;}function getAppHeight(a){var b=height;return isTablet&&(b=a?height*0x3/0x4:0x1c2),b;}function a0a(){var t=['getVersion','getManufacturer','57492FQzwmB','getUniqueId','3323509Hpyate','5884xOWvuM','getBrand','895938PPaKMg','20123sKRotL','getBundleId','getBuildNumber','3722552STHKXS','floor','getSystemVersion','isTablet','2400VfvoyR','object','getDeviceType','getDeviceId','645hKdvHS','getUniqueID','getModel','function','now','5ThRSQK','514882acMxoO'];a0a=function a0a(){return t;};return a0a();}var getUniqueID=exports.getUniqueID=function(){var _ref=(0,_asyncToGenerator2.default)(function*(){var j=a0g;if(_reactNativeDeviceInfo.default[j(0x147)])return typeof _reactNativeDeviceInfo.default[j(0x147)]()==='object'?yield _reactNativeDeviceInfo.default['getUniqueID']():_reactNativeDeviceInfo.default[j(0x147)]();return typeof _reactNativeDeviceInfo.default['getUniqueId']()===j(0x143)?yield _reactNativeDeviceInfo.default[j(0x150)]():_reactNativeDeviceInfo.default[j(0x150)]();});return function getUniqueID(){return _ref.apply(this,arguments);};}();var getSystemVersion=exports.getSystemVersion=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var k=a0g;return typeof _reactNativeDeviceInfo.default[k(0x140)]()===k(0x143)?yield _reactNativeDeviceInfo.default[k(0x140)]():_reactNativeDeviceInfo.default[k(0x140)]();});return function getSystemVersion(){return _ref2.apply(this,arguments);};}();var getVersion=exports.getVersion=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){var l=a0g;return typeof _reactNativeDeviceInfo.default['getVersion']()===l(0x143)?yield _reactNativeDeviceInfo.default[l(0x14d)]():_reactNativeDeviceInfo.default[l(0x14d)]();});return function getVersion(){return _ref3.apply(this,arguments);};}();var getBuildNumber=exports.getBuildNumber=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(){var m=a0g;return typeof _reactNativeDeviceInfo.default[m(0x13d)]()===m(0x143)?yield _reactNativeDeviceInfo.default[m(0x13d)]():_reactNativeDeviceInfo.default[m(0x13d)]();});return function getBuildNumber(){return _ref4.apply(this,arguments);};}();var getModel=exports.getModel=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(){var n=a0g;return typeof _reactNativeDeviceInfo.default[n(0x148)]()===n(0x143)?yield _reactNativeDeviceInfo.default[n(0x148)]():_reactNativeDeviceInfo.default[n(0x148)]();});return function getModel(){return _ref5.apply(this,arguments);};}();var getBundleId=exports.getBundleId=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){var o=a0g;return typeof _reactNativeDeviceInfo.default[o(0x13c)]()===o(0x143)?yield _reactNativeDeviceInfo.default[o(0x13c)]():_reactNativeDeviceInfo.default[o(0x13c)]();});return function getBundleId(){return _ref6.apply(this,arguments);};}();var getManufacturer=exports.getManufacturer=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(){var p=a0g;return typeof _reactNativeDeviceInfo.default[p(0x14e)]()===p(0x143)?yield _reactNativeDeviceInfo.default[p(0x14e)]():_reactNativeDeviceInfo.default[p(0x14e)]();});return function getManufacturer(){return _ref7.apply(this,arguments);};}();var getDeviceType=exports.getDeviceType=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){var q=a0g;return typeof _reactNativeDeviceInfo.default['getDeviceType']()==='object'?yield _reactNativeDeviceInfo.default[q(0x144)]():_reactNativeDeviceInfo.default[q(0x144)]();});return function getDeviceType(){return _ref8.apply(this,arguments);};}();var getDeviceId=exports.getDeviceId=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(){var r=a0g;return typeof _reactNativeDeviceInfo.default['getDeviceId']()===r(0x143)?yield _reactNativeDeviceInfo.default[r(0x145)]():_reactNativeDeviceInfo.default['getDeviceId']();});return function getDeviceId(){return _ref9.apply(this,arguments);};}();var getBrand=exports.getBrand=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(){var s=a0g;return typeof _reactNativeDeviceInfo.default['getBrand']()===s(0x143)?yield _reactNativeDeviceInfo.default[s(0x153)]():_reactNativeDeviceInfo.default[s(0x153)]();});return function getBrand(){return _ref10.apply(this,arguments);};}();
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.widthScreenNonIntr=exports.widthScreen=exports.shuffle=exports.mainPaddingVertical=exports.mainPaddingHorizontal=exports.isTablet=exports.heightScreenNonIntr=exports.heightScreen=exports.fontSizePlus=exports.XVersion=exports.Fonts=void 0;var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x113))/0x1+-parseInt(f(0x105))/0x2+-parseInt(f(0x103))/0x3*(-parseInt(f(0x10e))/0x4)+-parseInt(f(0x109))/0x5+-parseInt(f(0x110))/0x6+parseInt(f(0x10d))/0x7+parseInt(f(0x112))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0xb9b81);function a0a(){var i=['AIAEverestBold','floor','1312948aKefNd','12wivrFe','length','6297588UXwWhp','AIAEverest-Regular','11570896yNRMFi','955408YOhEXR','207978lInztE','object','1101062ciKNkb','AIAEverest-CondensedMedium','random','isTablet','2182390vQGhaV','AIAEverest-Medium'];a0a=function a0a(){return i;};return a0a();}var _Dimensions$get=_reactNative.Dimensions['get']('window'),width=_Dimensions$get.width,height=_Dimensions$get.height,isTablet=exports.isTablet=typeof _reactNativeDeviceInfo.default['isTablet']()===a0g(0x104)?![]:_reactNativeDeviceInfo.default[a0g(0x108)](),widthScreen=exports.widthScreen=isTablet?0x300:width,heightScreen=exports.heightScreen=isTablet?height*0x3/0x4:height,widthScreenNonIntr=exports.widthScreenNonIntr=isTablet?0x177:width,heightScreenNonIntr=exports.heightScreenNonIntr=isTablet?0x177:height,fontSizePlus=exports.fontSizePlus=0x6;var mainPaddingVertical=exports.mainPaddingVertical=0x10/0x29b*heightScreen,mainPaddingHorizontal=exports.mainPaddingHorizontal=0x15/0x177*widthScreen;height<=0x238&&(exports.mainPaddingVertical=mainPaddingVertical=0xa/0x29b*height);function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x103;var f=c[d];return f;},a0b(a,b);}width<=0x140&&(exports.mainPaddingHorizontal=mainPaddingHorizontal=0xe/0x177*width);var shuffle=exports.shuffle=function shuffle(a){var h=a0g;var b=a[h(0x10f)],c,d;while(b!==0x0){d=Math[h(0x10c)](Math[h(0x107)]()*b),b-=0x1,c=a[b],a[b]=a[d],a[d]=c;}return a;};var Fonts=exports.Fonts={'CondensedMedium':{'fontFamily':a0g(0x106)},'Medium':{'fontFamily':a0g(0x10a)},'Regular':{'fontFamily':a0g(0x111)},'Bold':{'fontFamily':a0g(0x10b)}};var XVersion=exports.XVersion='20230502';
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.widthScreenNonIntr=exports.widthScreen=exports.shuffle=exports.mainPaddingVertical=exports.mainPaddingHorizontal=exports.isTablet=exports.heightScreenNonIntr=exports.heightScreen=exports.fontSizePlus=exports.XVersion=exports.Fonts=void 0;var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x13b))/0x1*(-parseInt(f(0x131))/0x2)+-parseInt(f(0x13a))/0x3+-parseInt(f(0x134))/0x4+parseInt(f(0x143))/0x5*(parseInt(f(0x135))/0x6)+parseInt(f(0x13e))/0x7*(parseInt(f(0x137))/0x8)+parseInt(f(0x140))/0x9+parseInt(f(0x139))/0xa*(parseInt(f(0x13f))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x80ae5);function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x131;var f=c[d];return f;},a0b(a,b);}var _Dimensions$a0g=_reactNative.Dimensions[a0g(0x141)]('window'),width=_Dimensions$a0g.width,height=_Dimensions$a0g.height,isTablet=exports.isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x133)]()===a0g(0x132)?![]:_reactNativeDeviceInfo.default[a0g(0x133)](),widthScreen=exports.widthScreen=isTablet?0x300:width,heightScreen=exports.heightScreen=isTablet?height*0x3/0x4:height,widthScreenNonIntr=exports.widthScreenNonIntr=isTablet?0x177:width,heightScreenNonIntr=exports.heightScreenNonIntr=isTablet?0x177:height,fontSizePlus=exports.fontSizePlus=0x6;var mainPaddingVertical=exports.mainPaddingVertical=0x10/0x29b*heightScreen,mainPaddingHorizontal=exports.mainPaddingHorizontal=0x15/0x177*widthScreen;height<=0x238&&(exports.mainPaddingVertical=mainPaddingVertical=0xa/0x29b*height);function a0a(){var i=['828860tehhYX','random','AIAEverest-Regular','42vdOsPn','object','isTablet','1813004gnOpDD','12wXpyKN','AIAEverest-Medium','37144njZfBv','AIAEverest-CondensedMedium','10UivusG','3130275CnMYpc','49791oRpHKO','floor','20230502','511JfnBCQ','15648501MLbzpE','8786610HXKnZO','get','AIAEverestBold'];a0a=function a0a(){return i;};return a0a();}width<=0x140&&(exports.mainPaddingHorizontal=mainPaddingHorizontal=0xe/0x177*width);var shuffle=exports.shuffle=function shuffle(a){var h=a0g;var b=a['length'],c,d;while(b!==0x0){d=Math[h(0x13c)](Math[h(0x144)]()*b),b-=0x1,c=a[b],a[b]=a[d],a[d]=c;}return a;};var Fonts=exports.Fonts={'CondensedMedium':{'fontFamily':a0g(0x138)},'Medium':{'fontFamily':a0g(0x136)},'Regular':{'fontFamily':a0g(0x145)},'Bold':{'fontFamily':a0g(0x142)}};var XVersion=exports.XVersion=a0g(0x13d);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originallyus/feedback-rn-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A cross-platform Feedback component for React Native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "react-native": "lib/commonjs/index",
@@ -9,128 +9,15 @@
9
9
  "lib",
10
10
  "fonts"
11
11
  ],
12
- "scripts": {
13
- "example": "yarn workspace @originallyus/feedback-rn-sdk-example",
14
- "test": "jest",
15
- "typecheck": "tsc --noEmit",
16
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
17
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
18
- "prepare": "bob build",
19
- "build": "sh build.sh",
20
- "release": "release-it"
21
- },
22
- "keywords": [
23
- "react-native",
24
- "ios",
25
- "android"
26
- ],
27
12
  "author": "Originally US <hello@originallyus.us>",
13
+ "license": "MIT",
28
14
  "bugs": {
29
15
  "email": "hello@originallyus.us"
30
16
  },
31
- "homepage": null,
32
- "publishConfig": {
33
- "registry": "https://registry.npmjs.org/"
34
- },
35
17
  "devDependencies": {
36
- "@commitlint/config-conventional": "^17.0.2",
37
- "@evilmartians/lefthook": "^1.5.0",
38
- "@react-native/eslint-config": "^0.72.2",
39
- "@release-it/conventional-changelog": "^5.0.0",
40
- "@types/jest": "^28.1.2",
41
- "@types/react": "~17.0.21",
42
- "@types/react-native": "0.70.0",
43
- "commitlint": "^17.0.2",
44
- "del-cli": "^5.0.0",
45
- "eslint": "^8.4.1",
46
- "eslint-config-prettier": "^8.5.0",
47
- "eslint-plugin-prettier": "^4.0.0",
48
- "jest": "^28.1.1",
49
- "pod-install": "^0.1.0",
50
- "prettier": "^2.0.5",
51
- "react": "18.2.0",
52
- "react-native": "0.73.2",
53
- "react-native-builder-bob": "^0.20.0",
54
- "release-it": "^15.0.0",
55
- "turbo": "^1.10.7",
56
- "typescript": "^5.0.2"
57
- },
58
- "resolutions": {
59
- "@types/react": "17.0.21"
60
- },
61
- "workspaces": [
62
- "example"
63
- ],
64
- "packageManager": "yarn@3.6.1",
65
- "engines": {
66
- "node": ">= 18.0.0"
67
- },
68
- "jest": {
69
- "preset": "react-native",
70
- "modulePathIgnorePatterns": [
71
- "<rootDir>/example/node_modules",
72
- "<rootDir>/lib/"
73
- ]
74
- },
75
- "release-it": {
76
- "git": {
77
- "commitMessage": "chore: release ${version}",
78
- "tagName": "v${version}"
79
- },
80
- "npm": {
81
- "publish": true
82
- },
83
- "github": {
84
- "release": false
85
- },
86
- "plugins": {
87
- "@release-it/conventional-changelog": {
88
- "preset": "angular"
89
- }
90
- }
91
- },
92
- "eslintConfig": {
93
- "root": true,
94
- "extends": [
95
- "@react-native",
96
- "prettier"
97
- ],
98
- "rules": {
99
- "prettier/prettier": [
100
- "error",
101
- {
102
- "quoteProps": "consistent",
103
- "singleQuote": true,
104
- "tabWidth": 2,
105
- "trailingComma": "es5",
106
- "useTabs": false
107
- }
108
- ]
109
- }
110
- },
111
- "eslintIgnore": [
112
- "node_modules/",
113
- "lib/"
114
- ],
115
- "prettier": {
116
- "quoteProps": "consistent",
117
- "singleQuote": true,
118
- "tabWidth": 2,
119
- "trailingComma": "es5",
120
- "useTabs": false
121
- },
122
- "react-native-builder-bob": {
123
- "source": "src_uglifyjs",
124
- "output": "lib",
125
- "targets": [
126
- [
127
- "commonjs",
128
- {
129
- "sourceMaps": false,
130
- "configFile": true
131
- }
132
- ]
133
- ]
18
+ "babel-preset-react-native": "^4.0.0",
19
+ "react": "^16.2.0",
20
+ "react-native": "^0.53.0"
134
21
  },
135
22
  "peerDependencies": {
136
23
  "axios": "*",