posthog-react-native 4.46.14 → 4.46.16
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/dist/surveys/components/BottomSection.js +1 -1
- package/dist/surveys/components/BottomSection.js.map +1 -1
- package/dist/surveys/components/Cancel.js +1 -1
- package/dist/surveys/components/Cancel.js.map +1 -1
- package/dist/surveys/components/ConfirmationMessage.js +1 -1
- package/dist/surveys/components/ConfirmationMessage.js.map +1 -1
- package/dist/surveys/components/QuestionHeader.js +1 -1
- package/dist/surveys/components/QuestionHeader.js.map +1 -1
- package/dist/surveys/components/QuestionTypes.js +1 -1
- package/dist/surveys/components/QuestionTypes.js.map +1 -1
- package/dist/surveys/components/SurveyModal.js +1 -1
- package/dist/surveys/components/SurveyModal.js.map +1 -1
- package/dist/surveys/icons.js +1 -1
- package/dist/surveys/icons.js.map +1 -1
- package/dist/surveys/safeStyleSheet.d.ts +8 -0
- package/dist/surveys/safeStyleSheet.js +1 -0
- package/dist/surveys/safeStyleSheet.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.BottomSection=BottomSection;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/BottomSection.js";function BottomSection(_ref){var text=_ref.text,submitDisabled=_ref.submitDisabled,appearance=_ref.appearance,onSubmit=_ref.onSubmit,link=_ref.link,skipSubmitButton=_ref.skipSubmitButton;if(skipSubmitButton){return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{});}return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.bottomSection,children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,{backgroundColor:appearance.submitButtonColor},submitDisabled&&styles.buttonDisabled],disabled:submitDisabled,onPress:function onPress(){onSubmit();if(link){_reactNative.Linking.canOpenURL(link).then(function(supported){if(supported){_reactNative.Linking.openURL(link);}});}},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.buttonText,{color:appearance.submitButtonTextColor}],children:text})})});}var styles=
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.BottomSection=BottomSection;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _safeStyleSheet=require("../safeStyleSheet");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/BottomSection.js";function BottomSection(_ref){var text=_ref.text,submitDisabled=_ref.submitDisabled,appearance=_ref.appearance,onSubmit=_ref.onSubmit,link=_ref.link,skipSubmitButton=_ref.skipSubmitButton;if(skipSubmitButton){return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{});}return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.bottomSection,children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,{backgroundColor:appearance.submitButtonColor},submitDisabled&&styles.buttonDisabled],disabled:submitDisabled,onPress:function onPress(){onSubmit();if(link){_reactNative.Linking.canOpenURL(link).then(function(supported){if(supported){_reactNative.Linking.openURL(link);}});}},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.buttonText,{color:appearance.submitButtonTextColor}],children:text})})});}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({bottomSection:{padding:10},button:{padding:10,borderRadius:5,alignItems:'center'},buttonText:{fontSize:16},buttonDisabled:{opacity:0.5}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSection.js","sourceRoot":"","sources":["../../../src/surveys/components/BottomSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM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CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAC7F;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAClC,aAAa,EAAE;QACb,OAAO,EAAE,EAAE;KACZ;IACD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;KACb;IACD,cAAc,EAAE;QACd,OAAO,EAAE,GAAG;KACb;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Cancel=Cancel;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _icons=require("../icons");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/Cancel.js";function Cancel(_ref){var onPress=_ref.onPress,appearance=_ref.appearance;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.cancelBtnWrapper,{borderColor:appearance.borderColor}],onPress:onPress,children:(0,_jsxRuntime.jsx)(_icons.CancelSVG,{})});}var styles=
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Cancel=Cancel;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _icons=require("../icons");var _safeStyleSheet=require("../safeStyleSheet");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/Cancel.js";function Cancel(_ref){var onPress=_ref.onPress,appearance=_ref.appearance;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.cancelBtnWrapper,{borderColor:appearance.borderColor}],onPress:onPress,children:(0,_jsxRuntime.jsx)(_icons.CancelSVG,{})});}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({cancelBtnWrapper:{width:40,height:40,borderRadius:20,borderWidth:1,justifyContent:'center',alignItems:'center',backgroundColor:'white'}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cancel.js","sourceRoot":"","sources":["../../../src/surveys/components/Cancel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Cancel.js","sourceRoot":"","sources":["../../../src/surveys/components/Cancel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAGxD,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,EACP,UAAU,GAIX;IACC,OAAO,CACL,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,WAAW,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAC5G;MAAA,CAAC,SAAS,CAAC,AAAD,EACZ;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAClC,gBAAgB,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,OAAO;KACzB;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ConfirmationMessage=ConfirmationMessage;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _surveysUtils=require("../surveys-utils");var _BottomSection=require("./BottomSection");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/ConfirmationMessage.js";function ConfirmationMessage(_ref){var appearance=_ref.appearance,header=_ref.header,description=_ref.description,contentType=_ref.contentType,onClose=_ref.onClose,styleOverrides=_ref.styleOverrides,isModal=_ref.isModal;var textColor=(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styleOverrides,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.thankYouMessageContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.thankYouMessageHeader,{color:textColor}],children:header}),(0,_surveysUtils.shouldRenderDescription)(description,contentType)&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor,opacity:_surveysUtils.defaultDescriptionOpacity},children:description})]}),isModal&&(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:appearance.thankYouMessageCloseButtonText,submitDisabled:false,appearance:appearance,onSubmit:onClose})]});}var styles=
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ConfirmationMessage=ConfirmationMessage;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _safeStyleSheet=require("../safeStyleSheet");var _surveysUtils=require("../surveys-utils");var _BottomSection=require("./BottomSection");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/ConfirmationMessage.js";function ConfirmationMessage(_ref){var appearance=_ref.appearance,header=_ref.header,description=_ref.description,contentType=_ref.contentType,onClose=_ref.onClose,styleOverrides=_ref.styleOverrides,isModal=_ref.isModal;var textColor=(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styleOverrides,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.thankYouMessageContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.thankYouMessageHeader,{color:textColor}],children:header}),(0,_surveysUtils.shouldRenderDescription)(description,contentType)&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor,opacity:_surveysUtils.defaultDescriptionOpacity},children:description})]}),isModal&&(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:appearance.thankYouMessageCloseButtonText,submitDisabled:false,appearance:appearance,onSubmit:onClose})]});}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({thankYouMessageContainer:{padding:10},thankYouMessageHeader:{fontSize:18,fontWeight:'bold'}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationMessage.js","sourceRoot":"","sources":["../../../src/surveys/components/ConfirmationMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ConfirmationMessage.js","sourceRoot":"","sources":["../../../src/surveys/components/ConfirmationMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,GAExB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,UAAU,mBAAmB,CAAC,EAClC,UAAU,EACV,MAAM,EACN,WAAW,EACX,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,GASR;IACC,MAAM,SAAS,GAAG,uBAAuB,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IAErE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAC1B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAC3C;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CACjF;QAAA,CAAC,uBAAuB,CAAC,WAAW,EAAE,WAAW,CAAC,IAAI,CACpD,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAC5F,CACH;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,aAAa,CACZ,IAAI,CAAC,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAChD,cAAc,CAAC,CAAC,KAAK,CAAC,CACtB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,OAAO,CAAC,EAClB,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAClC,wBAAwB,EAAE;QACxB,OAAO,EAAE,EAAE;KACZ;IACD,qBAAqB,EAAE;QACrB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.QuestionHeader=QuestionHeader;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _surveysUtils=require("../surveys-utils");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionHeader.js";function QuestionHeader(_ref){var question=_ref.question,description=_ref.description,descriptionContentType=_ref.descriptionContentType,appearance=_ref.appearance;var _a;var textColor=(_a=appearance.textColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.question,{color:textColor}],children:question}),(0,_surveysUtils.shouldRenderDescription)(description,descriptionContentType)&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.description,{color:textColor,opacity:_surveysUtils.defaultDescriptionOpacity}],children:description})]});}var styles=
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.QuestionHeader=QuestionHeader;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _safeStyleSheet=require("../safeStyleSheet");var _surveysUtils=require("../surveys-utils");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionHeader.js";function QuestionHeader(_ref){var question=_ref.question,description=_ref.description,descriptionContentType=_ref.descriptionContentType,appearance=_ref.appearance;var _a;var textColor=(_a=appearance.textColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.question,{color:textColor}],children:question}),(0,_surveysUtils.shouldRenderDescription)(description,descriptionContentType)&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.description,{color:textColor,opacity:_surveysUtils.defaultDescriptionOpacity}],children:description})]});}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({container:{padding:10},question:{fontSize:18,fontWeight:'bold'},description:{fontSize:14,marginTop:5}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionHeader.js","sourceRoot":"","sources":["../../../src/surveys/components/QuestionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"QuestionHeader.js","sourceRoot":"","sources":["../../../src/surveys/components/QuestionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,GAExB,MAAM,kBAAkB,CAAA;AAEzB,MAAM,UAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,sBAAsB,EACtB,UAAU,GAMX;;IACC,+EAA+E;IAC/E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,SAAS,mCAAI,uBAAuB,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;IAE7F,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CACtE;MAAA,CAAC,uBAAuB,CAAC,WAAW,EAAE,sBAAsB,CAAC,IAAI,CAC/D,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAC1F;UAAA,CAAC,WAAW,CACd;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAClC,SAAS,EAAE;QACT,OAAO,EAAE,EAAE;KACZ;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACnB;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.LinkQuestion=LinkQuestion;exports.MultipleChoiceQuestion=MultipleChoiceQuestion;exports.OpenTextQuestion=OpenTextQuestion;exports.RatingButton=RatingButton;exports.RatingQuestion=RatingQuestion;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 _icons=require("../icons");var _surveysUtils=require("../surveys-utils");var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var _BottomSection=require("./BottomSection");var _QuestionHeader=require("./QuestionHeader");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionTypes.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function QuestionLayout(_ref){var children=_ref.children,footer=_ref.footer;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:questionLayoutStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:questionLayoutStyles.scroll,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,children:children}),footer]});}var questionLayoutStyles=_reactNative.StyleSheet.create({container:{flexShrink:1},scroll:{flexShrink:1}});function OpenTextQuestion(_ref2){var question=_ref2.question,appearance=_ref2.appearance,onSubmit=_ref2.onSubmit;var _a,_b,_c,_d;var _useState=(0,_react.useState)(''),_useState2=(0,_slicedToArray2["default"])(_useState,2),text=_useState2[0],setText=_useState2[1];var validationError=(0,_react.useMemo)(function(){return(0,_surveys.getValidationError)(text,question.validation,question.optional);},[text,question.validation,question.optional]);var minLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MinLength);var maxLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MaxLength);var requirementsHint=(0,_react.useMemo)(function(){return(0,_surveys.getRequirementsHint)(minLength,maxLength);},[minLength,maxLength]);var handleSubmit=function handleSubmit(){if(validationError){return;}onSubmit(text.trim());};return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!!validationError,appearance:appearance,onSubmit:handleSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.textInputContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:[styles.textInput,{backgroundColor:appearance.inputBackground,color:(_b=appearance.inputTextColor)!==null&&_b!==void 0?_b:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground),borderColor:appearance.borderColor}],multiline:true,numberOfLines:4,placeholder:appearance.placeholder,placeholderTextColor:(0,_surveysUtils.getContrastingTextColor)((_c=appearance.inputTextColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground))==='white'?'rgba(0, 0, 0, 0.5)':'rgba(255, 255, 255, 0.5)',onChangeText:setText,value:text}),requirementsHint&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.validationHint,{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}],children:requirementsHint})]})]});}function LinkQuestion(_ref3){var question=_ref3.question,appearance=_ref3.appearance,_onSubmit=_ref3.onSubmit;var _a,_b;question=question;return(0,_jsxRuntime.jsx)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_b=(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText)!==null&&_b!==void 0?_b:'Submit',submitDisabled:false,link:question.link,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit('link clicked');}}),children:(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance})});}function RatingQuestion(_ref4){var _this=this;var question=_ref4.question,appearance=_ref4.appearance,_onSubmit2=_ref4.onSubmit;var _a,_b,_c,_d;var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2["default"])(_useState3,2),rating=_useState4[0],setRating=_useState4[1];question=question;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:rating===null&&!question.optional,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit2(rating);},skipSubmitButton:question.skipSubmitButton}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingSection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingOptions,children:[question.display===_core.SurveyRatingDisplay.Emoji&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingOptionsEmoji,children:(_b=emojiScaleLists[question.scale])===null||_b===void 0?void 0:_b.map(function(Emoji,idx){var active=idx+1===rating;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.ratingsEmoji,onPress:function onPress(){var response=idx+1;setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}},children:(0,_jsxRuntime.jsx)(Emoji,{fill:active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor})},idx);})}),question.display===_core.SurveyRatingDisplay.Number&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.ratingOptionsNumber,{borderColor:appearance.borderColor}],children:getScaleNumbers(question.scale).map(function(number,idx){var active=rating===number;return(0,_jsxRuntime.jsx)(RatingButton,{index:idx,active:active,appearance:appearance,num:number,setActiveNumber:function setActiveNumber(response){setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}}},idx);})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingText,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_c=appearance.textColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.lowerBoundLabel}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.upperBoundLabel})]})]})]});}function RatingButton(_ref5){var index=_ref5.index,num=_ref5.num,active=_ref5.active,appearance=_ref5.appearance,setActiveNumber=_ref5.setActiveNumber;var _a;var backgroundColor=active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor;var textColor=active?(0,_surveysUtils.getContrastingTextColor)(backgroundColor):(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(backgroundColor);return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.ratingsNumber,index===0&&{borderLeftWidth:0},{backgroundColor:backgroundColor,borderColor:appearance.borderColor}],onPress:function onPress(){return setActiveNumber(num);},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor},children:num})});}function MultipleChoiceQuestion(_ref6){var _this2=this;var question=_ref6.question,appearance=_ref6.appearance,_onSubmit3=_ref6.onSubmit;var _a;question=question;var isSingleChoice=question.type===_core.SurveyQuestionType.SingleChoice;var allowMultiple=question.type===_core.SurveyQuestionType.MultipleChoice;var openChoice=question.hasOpenChoice?question.choices[question.choices.length-1]:null;var choices=(0,_react.useMemo)(function(){return(0,_surveysUtils.getDisplayOrderChoices)(question);},[question]);var _useState5=(0,_react.useState)([]),_useState6=(0,_slicedToArray2["default"])(_useState5,2),selectedChoices=_useState6[0],setSelectedChoices=_useState6[1];var _useState7=(0,_react.useState)(''),_useState8=(0,_slicedToArray2["default"])(_useState7,2),openEndedInput=_useState8[0],setOpenEndedInput=_useState8[1];var shouldSkipSubmit=question.skipSubmitButton&&isSingleChoice&&!question.hasOpenChoice;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!question.optional&&(selectedChoices.length===0||openChoice!==null&&selectedChoices.includes(openChoice)&&openEndedInput.length===0),appearance:appearance,onSubmit:function onSubmit(){var result=selectedChoices.map(function(c){return c===openChoice?openEndedInput:c;});_onSubmit3(allowMultiple?result:result[0]);},skipSubmitButton:shouldSkipSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.multipleChoiceOptions,children:choices.map(function(choice,idx){var _a;var isOpenChoice=choice===openChoice;var isSelected=selectedChoices.includes(choice);var choiceTextColor=(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground);return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{style:[styles.choiceOption,{backgroundColor:appearance.inputBackground},isSelected?{borderColor:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}:{}],onPress:function onPress(){if(allowMultiple){setSelectedChoices(isSelected?selectedChoices.filter(function(c){return c!==choice;}):[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]));}else{setSelectedChoices([choice]);if(shouldSkipSubmit&&!isOpenChoice){_onSubmit3(choice);}}},children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.choiceText,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{flexGrow:1,color:choiceTextColor},children:[choice,isOpenChoice?':':'']}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.rightCheckArea,children:isSelected&&(0,_jsxRuntime.jsx)(_icons.CheckSVG,{})})]}),isOpenChoice&&(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.openEndedInput,onChangeText:function onChangeText(userValue){setOpenEndedInput(userValue);if(!isSelected){setSelectedChoices(allowMultiple?[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]):[choice]);}}})]},idx);})})]});}var emojiScaleLists={2:[_icons.ThumbsUpEmoji,_icons.ThumbsDownEmoji],3:[_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji],5:[_icons.VeryDissatisfiedEmoji,_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji,_icons.VerySatisfiedEmoji]};var fiveScaleNumbers=[1,2,3,4,5];var sevenScaleNumbers=[1,2,3,4,5,6,7];var tenScaleNumbers=[0,1,2,3,4,5,6,7,8,9,10];function getScaleNumbers(scale){switch(scale){case 5:return fiveScaleNumbers;case 7:return sevenScaleNumbers;case 10:return tenScaleNumbers;default:return fiveScaleNumbers;}}var styles=_reactNative.StyleSheet.create({textInputContainer:{padding:10},textInput:{borderColor:'#ccc',borderWidth:1,padding:10,marginVertical:10,fontSize:16,height:80,textAlignVertical:'top'},ratingSection:{marginVertical:10},ratingOptions:{flexDirection:'row',justifyContent:'space-between'},ratingOptionsEmoji:{flexDirection:'row',justifyContent:'space-around',flexWrap:'nowrap',flex:1},ratingsEmoji:{padding:4},ratingOptionsNumber:{margin:10,flexGrow:1,flexDirection:'row',justifyContent:'space-between',borderRadius:5,borderWidth:1,overflow:'hidden'},ratingsNumber:{flex:1,paddingVertical:10,alignItems:'center',borderLeftWidth:1},ratingText:{flexDirection:'row',justifyContent:'space-between',padding:10},multipleChoiceOptions:{padding:10},choiceOption:{flexDirection:'column',marginVertical:5,borderWidth:1,borderColor:'grey',borderRadius:5,padding:10},choiceText:{flexDirection:'row'},rightCheckArea:{flexGrow:0},openEndedInput:{padding:5},validationHint:{fontSize:12,opacity:0.7,marginTop:4}});
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.LinkQuestion=LinkQuestion;exports.MultipleChoiceQuestion=MultipleChoiceQuestion;exports.OpenTextQuestion=OpenTextQuestion;exports.RatingButton=RatingButton;exports.RatingQuestion=RatingQuestion;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 _safeStyleSheet=require("../safeStyleSheet");var _icons=require("../icons");var _surveysUtils=require("../surveys-utils");var _core=require("@posthog/core");var _surveys=require("@posthog/core/surveys");var _BottomSection=require("./BottomSection");var _QuestionHeader=require("./QuestionHeader");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/QuestionTypes.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}function QuestionLayout(_ref){var children=_ref.children,footer=_ref.footer;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:questionLayoutStyles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:questionLayoutStyles.scroll,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,children:children}),footer]});}var questionLayoutStyles=(0,_safeStyleSheet.createSafeStyleSheet)({container:{flexShrink:1},scroll:{flexShrink:1}});function OpenTextQuestion(_ref2){var question=_ref2.question,appearance=_ref2.appearance,onSubmit=_ref2.onSubmit;var _a,_b,_c,_d;var _useState=(0,_react.useState)(''),_useState2=(0,_slicedToArray2["default"])(_useState,2),text=_useState2[0],setText=_useState2[1];var validationError=(0,_react.useMemo)(function(){return(0,_surveys.getValidationError)(text,question.validation,question.optional);},[text,question.validation,question.optional]);var minLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MinLength);var maxLength=(0,_surveys.getLengthFromRules)(question.validation,_core.SurveyValidationType.MaxLength);var requirementsHint=(0,_react.useMemo)(function(){return(0,_surveys.getRequirementsHint)(minLength,maxLength);},[minLength,maxLength]);var handleSubmit=function handleSubmit(){if(validationError){return;}onSubmit(text.trim());};return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!!validationError,appearance:appearance,onSubmit:handleSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.textInputContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:[styles.textInput,{backgroundColor:appearance.inputBackground,color:(_b=appearance.inputTextColor)!==null&&_b!==void 0?_b:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground),borderColor:appearance.borderColor}],multiline:true,numberOfLines:4,placeholder:appearance.placeholder,placeholderTextColor:(0,_surveysUtils.getContrastingTextColor)((_c=appearance.inputTextColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground))==='white'?'rgba(0, 0, 0, 0.5)':'rgba(255, 255, 255, 0.5)',onChangeText:setText,value:text}),requirementsHint&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.validationHint,{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}],children:requirementsHint})]})]});}function LinkQuestion(_ref3){var question=_ref3.question,appearance=_ref3.appearance,_onSubmit=_ref3.onSubmit;var _a,_b;question=question;return(0,_jsxRuntime.jsx)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_b=(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText)!==null&&_b!==void 0?_b:'Submit',submitDisabled:false,link:question.link,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit('link clicked');}}),children:(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance})});}function RatingQuestion(_ref4){var _this=this;var question=_ref4.question,appearance=_ref4.appearance,_onSubmit2=_ref4.onSubmit;var _a,_b,_c,_d;var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2["default"])(_useState3,2),rating=_useState4[0],setRating=_useState4[1];question=question;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:rating===null&&!question.optional,appearance:appearance,onSubmit:function onSubmit(){return _onSubmit2(rating);},skipSubmitButton:question.skipSubmitButton}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingSection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingOptions,children:[question.display===_core.SurveyRatingDisplay.Emoji&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingOptionsEmoji,children:(_b=emojiScaleLists[question.scale])===null||_b===void 0?void 0:_b.map(function(Emoji,idx){var active=idx+1===rating;return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.ratingsEmoji,onPress:function onPress(){var response=idx+1;setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}},children:(0,_jsxRuntime.jsx)(Emoji,{fill:active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor})},idx);})}),question.display===_core.SurveyRatingDisplay.Number&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.ratingOptionsNumber,{borderColor:appearance.borderColor}],children:getScaleNumbers(question.scale).map(function(number,idx){var active=rating===number;return(0,_jsxRuntime.jsx)(RatingButton,{index:idx,active:active,appearance:appearance,num:number,setActiveNumber:function setActiveNumber(response){setRating(response);if(question.skipSubmitButton){_onSubmit2(response);}}},idx);})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.ratingText,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_c=appearance.textColor)!==null&&_c!==void 0?_c:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.lowerBoundLabel}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:(_d=appearance.textColor)!==null&&_d!==void 0?_d:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor),opacity:_surveysUtils.defaultRatingLabelOpacity},children:question.upperBoundLabel})]})]})]});}function RatingButton(_ref5){var index=_ref5.index,num=_ref5.num,active=_ref5.active,appearance=_ref5.appearance,setActiveNumber=_ref5.setActiveNumber;var _a;var backgroundColor=active?appearance.ratingButtonActiveColor:appearance.ratingButtonColor;var textColor=active?(0,_surveysUtils.getContrastingTextColor)(backgroundColor):(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(backgroundColor);return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.ratingsNumber,index===0&&{borderLeftWidth:0},{backgroundColor:backgroundColor,borderColor:appearance.borderColor}],onPress:function onPress(){return setActiveNumber(num);},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:textColor},children:num})});}function MultipleChoiceQuestion(_ref6){var _this2=this;var question=_ref6.question,appearance=_ref6.appearance,_onSubmit3=_ref6.onSubmit;var _a;question=question;var isSingleChoice=question.type===_core.SurveyQuestionType.SingleChoice;var allowMultiple=question.type===_core.SurveyQuestionType.MultipleChoice;var openChoice=question.hasOpenChoice?question.choices[question.choices.length-1]:null;var choices=(0,_react.useMemo)(function(){return(0,_surveysUtils.getDisplayOrderChoices)(question);},[question]);var _useState5=(0,_react.useState)([]),_useState6=(0,_slicedToArray2["default"])(_useState5,2),selectedChoices=_useState6[0],setSelectedChoices=_useState6[1];var _useState7=(0,_react.useState)(''),_useState8=(0,_slicedToArray2["default"])(_useState7,2),openEndedInput=_useState8[0],setOpenEndedInput=_useState8[1];var shouldSkipSubmit=question.skipSubmitButton&&isSingleChoice&&!question.hasOpenChoice;return(0,_jsxRuntime.jsxs)(QuestionLayout,{footer:(0,_jsxRuntime.jsx)(_BottomSection.BottomSection,{text:(_a=question.buttonText)!==null&&_a!==void 0?_a:appearance.submitButtonText,submitDisabled:!question.optional&&(selectedChoices.length===0||openChoice!==null&&selectedChoices.includes(openChoice)&&openEndedInput.length===0),appearance:appearance,onSubmit:function onSubmit(){var result=selectedChoices.map(function(c){return c===openChoice?openEndedInput:c;});_onSubmit3(allowMultiple?result:result[0]);},skipSubmitButton:shouldSkipSubmit}),children:[(0,_jsxRuntime.jsx)(_QuestionHeader.QuestionHeader,{question:question.question,description:question.description,descriptionContentType:question.descriptionContentType,appearance:appearance}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.multipleChoiceOptions,children:choices.map(function(choice,idx){var _a;var isOpenChoice=choice===openChoice;var isSelected=selectedChoices.includes(choice);var choiceTextColor=(_a=appearance.inputTextColor)!==null&&_a!==void 0?_a:(0,_surveysUtils.getContrastingTextColor)(appearance.inputBackground);return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{style:[styles.choiceOption,{backgroundColor:appearance.inputBackground},isSelected?{borderColor:(0,_surveysUtils.getContrastingTextColor)(appearance.backgroundColor)}:{}],onPress:function onPress(){if(allowMultiple){setSelectedChoices(isSelected?selectedChoices.filter(function(c){return c!==choice;}):[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]));}else{setSelectedChoices([choice]);if(shouldSkipSubmit&&!isOpenChoice){_onSubmit3(choice);}}},children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.choiceText,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:{flexGrow:1,color:choiceTextColor},children:[choice,isOpenChoice?':':'']}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.rightCheckArea,children:isSelected&&(0,_jsxRuntime.jsx)(_icons.CheckSVG,{})})]}),isOpenChoice&&(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.openEndedInput,onChangeText:function onChangeText(userValue){setOpenEndedInput(userValue);if(!isSelected){setSelectedChoices(allowMultiple?[].concat((0,_toConsumableArray2["default"])(selectedChoices),[choice]):[choice]);}}})]},idx);})})]});}var emojiScaleLists={2:[_icons.ThumbsUpEmoji,_icons.ThumbsDownEmoji],3:[_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji],5:[_icons.VeryDissatisfiedEmoji,_icons.DissatisfiedEmoji,_icons.NeutralEmoji,_icons.SatisfiedEmoji,_icons.VerySatisfiedEmoji]};var fiveScaleNumbers=[1,2,3,4,5];var sevenScaleNumbers=[1,2,3,4,5,6,7];var tenScaleNumbers=[0,1,2,3,4,5,6,7,8,9,10];function getScaleNumbers(scale){switch(scale){case 5:return fiveScaleNumbers;case 7:return sevenScaleNumbers;case 10:return tenScaleNumbers;default:return fiveScaleNumbers;}}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({textInputContainer:{padding:10},textInput:{borderColor:'#ccc',borderWidth:1,padding:10,marginVertical:10,fontSize:16,height:80,textAlignVertical:'top'},ratingSection:{marginVertical:10},ratingOptions:{flexDirection:'row',justifyContent:'space-between'},ratingOptionsEmoji:{flexDirection:'row',justifyContent:'space-around',flexWrap:'nowrap',flex:1},ratingsEmoji:{padding:4},ratingOptionsNumber:{margin:10,flexGrow:1,flexDirection:'row',justifyContent:'space-between',borderRadius:5,borderWidth:1,overflow:'hidden'},ratingsNumber:{flex:1,paddingVertical:10,alignItems:'center',borderLeftWidth:1},ratingText:{flexDirection:'row',justifyContent:'space-between',padding:10},multipleChoiceOptions:{padding:10},choiceOption:{flexDirection:'column',marginVertical:5,borderWidth:1,borderColor:'grey',borderRadius:5,padding:10},choiceText:{flexDirection:'row'},rightCheckArea:{flexGrow:0},openEndedInput:{padding:5},validationHint:{fontSize:12,opacity:0.7,marginTop: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W,EAAE,CAAC;QACd,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,EAAE;KACZ;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"QuestionTypes.js","sourceRoot":"","sources":["../../../src/surveys/components/QuestionTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,GAEvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAEL,mBAAmB,EACnB,kBAAkB,EAIlB,oBAAoB,GACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAOjD,4EAA4E;AAC5E,wEAAwE;AACxE,uEAAuE;AACvE,iEAAiE;AACjE,SAAS,cAAc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aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,OAAO,EAAE,EAAE;KACZ;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,EAAE;KACZ;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,CAAC;QACjB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,EAAE;KACZ;IACD,UAAU,EAAE;QACV,aAAa,EAAE,KAAK;KACrB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,CAAC;KACZ;IACD,cAAc,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.SurveyModal=SurveyModal;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Cancel=require("./Cancel");var _ConfirmationMessage=require("./ConfirmationMessage");var _surveysUtils=require("../surveys-utils");var _OptionalReactNativeSafeArea=require("../../optional/OptionalReactNativeSafeArea");var _Surveys=require("./Surveys");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/SurveyModal.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var VIEWPORT_BUFFER=0;var MODAL_FADE_DURATION_MS=250;function SurveyModal(props){var survey=props.survey,surveyLanguage=props.surveyLanguage,appearance=props.appearance,onShow=props.onShow,onCloseProp=props.onClose,_props$androidKeyboar=props.androidKeyboardBehavior,androidKeyboardBehavior=_props$androidKeyboar===void 0?'height':_props$androidKeyboar;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isSurveySent=_useState2[0],setIsSurveySent=_useState2[1];var _useState3=(0,_react.useState)({}),_useState4=(0,_slicedToArray2["default"])(_useState3,2),responses=_useState4[0],setResponses=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2["default"])(_useState5,2),isVisible=_useState6[0],setIsVisible=_useState6[1];var _useState7=(0,_react.useState)(true),_useState8=(0,_slicedToArray2["default"])(_useState7,2),contentMounted=_useState8[0],setContentMounted=_useState8[1];var isClosingRef=(0,_react.useRef)(false);var closeNotifiedRef=(0,_react.useRef)(false);var notifyParentClosed=(0,_react.useCallback)(function(){if(closeNotifiedRef.current)return;closeNotifiedRef.current=true;onCloseProp(isSurveySent,responses);},[isSurveySent,onCloseProp,responses]);var onClose=(0,_react.useCallback)(function(){if(isClosingRef.current)return;isClosingRef.current=true;setContentMounted(false);requestAnimationFrame(function(){setIsVisible(false);if(_reactNative.Platform.OS!=='ios'){setTimeout(notifyParentClosed,MODAL_FADE_DURATION_MS);}});},[notifyParentClosed]);var insets=(0,_OptionalReactNativeSafeArea.useOptionalSafeAreaInsets)();var _useWindowDimensions=(0,_reactNative.useWindowDimensions)(),windowHeight=_useWindowDimensions.height;var _useState9=(0,_react.useState)(0),_useState0=(0,_slicedToArray2["default"])(_useState9,2),keyboardHeight=_useState0[0],setKeyboardHeight=_useState0[1];var _resolveSurveyAlignme=(0,_surveysUtils.resolveSurveyAlignment)(appearance.position),vertical=_resolveSurveyAlignme.vertical,horizontal=_resolveSurveyAlignme.horizontal;var isBottom=vertical==='flex-end';var shouldShowConfirmation=isSurveySent&&appearance.thankYouMessageHeader;(0,_react.useEffect)(function(){if(isVisible){onShow();}},[isVisible,onShow]);(0,_react.useEffect)(function(){var showEvent=_reactNative.Platform.OS==='ios'?'keyboardWillShow':'keyboardDidShow';var hideEvent=_reactNative.Platform.OS==='ios'?'keyboardWillHide':'keyboardDidHide';var showSub=_reactNative.Keyboard.addListener(showEvent,function(e){return setKeyboardHeight(e.endCoordinates.height);});var hideSub=_reactNative.Keyboard.addListener(hideEvent,function(){return setKeyboardHeight(0);});return function(){showSub.remove();hideSub.remove();};},[]);var maxModalHeight=Math.max(windowHeight-keyboardHeight-insets.top-insets.bottom-VIEWPORT_BUFFER,200);var keyboardBehavior=_reactNative.Platform.OS==='ios'?'padding':androidKeyboardBehavior;return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:isVisible,animationType:"fade",transparent:true,onRequestClose:onClose,onDismiss:_reactNative.Platform.OS==='ios'?notifyParentClosed:undefined,statusBarTranslucent:true,children:contentMounted&&(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:keyboardBehavior,style:styles.fill,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.fill,{justifyContent:vertical}],onTouchStart:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.modalRow,{justifyContent:horizontal}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.modalContent,pointerEvents:"box-none",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.modalContentInner,{borderColor:appearance.borderColor,backgroundColor:appearance.backgroundColor,marginTop:vertical==='flex-start'?insets.top+10:0,marginBottom:isBottom?keyboardHeight>0?0:insets.bottom+10:0,marginHorizontal:10,maxHeight:maxModalHeight}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.topIconContainer,children:(0,_jsxRuntime.jsx)(_Cancel.Cancel,{onPress:onClose,appearance:appearance})}),isSurveySent?shouldShowConfirmation?(0,_jsxRuntime.jsx)(_ConfirmationMessage.ConfirmationMessage,{appearance:appearance,header:appearance.thankYouMessageHeader,description:appearance.thankYouMessageDescription,contentType:appearance.thankYouMessageDescriptionContentType,onClose:onClose,isModal:true}):null:(0,_jsxRuntime.jsx)(_Surveys.Questions,{survey:survey,surveyLanguage:surveyLanguage,appearance:appearance,responses:responses,onResponsesChange:setResponses,onSubmit:function onSubmit(){return setIsSurveySent(true);}})]})})})})})});}var styles=
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports.SurveyModal=SurveyModal;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Cancel=require("./Cancel");var _ConfirmationMessage=require("./ConfirmationMessage");var _safeStyleSheet=require("../safeStyleSheet");var _surveysUtils=require("../surveys-utils");var _OptionalReactNativeSafeArea=require("../../optional/OptionalReactNativeSafeArea");var _Surveys=require("./Surveys");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/components/SurveyModal.js";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t2 in e)"default"!==_t2&&{}.hasOwnProperty.call(e,_t2)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t2))&&(i.get||i.set)?o(f,_t2,i):f[_t2]=e[_t2]);return f;})(e,t);}var VIEWPORT_BUFFER=0;var MODAL_FADE_DURATION_MS=250;function SurveyModal(props){var survey=props.survey,surveyLanguage=props.surveyLanguage,appearance=props.appearance,onShow=props.onShow,onCloseProp=props.onClose,_props$androidKeyboar=props.androidKeyboardBehavior,androidKeyboardBehavior=_props$androidKeyboar===void 0?'height':_props$androidKeyboar;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isSurveySent=_useState2[0],setIsSurveySent=_useState2[1];var _useState3=(0,_react.useState)({}),_useState4=(0,_slicedToArray2["default"])(_useState3,2),responses=_useState4[0],setResponses=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2["default"])(_useState5,2),isVisible=_useState6[0],setIsVisible=_useState6[1];var _useState7=(0,_react.useState)(true),_useState8=(0,_slicedToArray2["default"])(_useState7,2),contentMounted=_useState8[0],setContentMounted=_useState8[1];var isClosingRef=(0,_react.useRef)(false);var closeNotifiedRef=(0,_react.useRef)(false);var notifyParentClosed=(0,_react.useCallback)(function(){if(closeNotifiedRef.current)return;closeNotifiedRef.current=true;onCloseProp(isSurveySent,responses);},[isSurveySent,onCloseProp,responses]);var onClose=(0,_react.useCallback)(function(){if(isClosingRef.current)return;isClosingRef.current=true;setContentMounted(false);requestAnimationFrame(function(){setIsVisible(false);if(_reactNative.Platform.OS!=='ios'){setTimeout(notifyParentClosed,MODAL_FADE_DURATION_MS);}});},[notifyParentClosed]);var insets=(0,_OptionalReactNativeSafeArea.useOptionalSafeAreaInsets)();var _useWindowDimensions=(0,_reactNative.useWindowDimensions)(),windowHeight=_useWindowDimensions.height;var _useState9=(0,_react.useState)(0),_useState0=(0,_slicedToArray2["default"])(_useState9,2),keyboardHeight=_useState0[0],setKeyboardHeight=_useState0[1];var _resolveSurveyAlignme=(0,_surveysUtils.resolveSurveyAlignment)(appearance.position),vertical=_resolveSurveyAlignme.vertical,horizontal=_resolveSurveyAlignme.horizontal;var isBottom=vertical==='flex-end';var shouldShowConfirmation=isSurveySent&&appearance.thankYouMessageHeader;(0,_react.useEffect)(function(){if(isVisible){onShow();}},[isVisible,onShow]);(0,_react.useEffect)(function(){var showEvent=_reactNative.Platform.OS==='ios'?'keyboardWillShow':'keyboardDidShow';var hideEvent=_reactNative.Platform.OS==='ios'?'keyboardWillHide':'keyboardDidHide';var showSub=_reactNative.Keyboard.addListener(showEvent,function(e){return setKeyboardHeight(e.endCoordinates.height);});var hideSub=_reactNative.Keyboard.addListener(hideEvent,function(){return setKeyboardHeight(0);});return function(){showSub.remove();hideSub.remove();};},[]);var maxModalHeight=Math.max(windowHeight-keyboardHeight-insets.top-insets.bottom-VIEWPORT_BUFFER,200);var keyboardBehavior=_reactNative.Platform.OS==='ios'?'padding':androidKeyboardBehavior;return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:isVisible,animationType:"fade",transparent:true,onRequestClose:onClose,onDismiss:_reactNative.Platform.OS==='ios'?notifyParentClosed:undefined,statusBarTranslucent:true,children:contentMounted&&(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:keyboardBehavior,style:styles.fill,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.fill,{justifyContent:vertical}],onTouchStart:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.modalRow,{justifyContent:horizontal}],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.modalContent,pointerEvents:"box-none",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.modalContentInner,{borderColor:appearance.borderColor,backgroundColor:appearance.backgroundColor,marginTop:vertical==='flex-start'?insets.top+10:0,marginBottom:isBottom?keyboardHeight>0?0:insets.bottom+10:0,marginHorizontal:10,maxHeight:maxModalHeight}],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.topIconContainer,children:(0,_jsxRuntime.jsx)(_Cancel.Cancel,{onPress:onClose,appearance:appearance})}),isSurveySent?shouldShowConfirmation?(0,_jsxRuntime.jsx)(_ConfirmationMessage.ConfirmationMessage,{appearance:appearance,header:appearance.thankYouMessageHeader,description:appearance.thankYouMessageDescription,contentType:appearance.thankYouMessageDescriptionContentType,onClose:onClose,isModal:true}):null:(0,_jsxRuntime.jsx)(_Surveys.Questions,{survey:survey,surveyLanguage:surveyLanguage,appearance:appearance,responses:responses,onResponsesChange:setResponses,onSubmit:function onSubmit(){return setIsSurveySent(true);}})]})})})})})});}var styles=(0,_safeStyleSheet.createSafeStyleSheet)({fill:{flex:1},modalRow:{flexDirection:'row'},modalContent:{width:'90%',maxWidth:400},modalContentInner:{borderRadius:10,borderWidth:1,padding:20},topIconContainer:{position:'absolute',right:8,top:8,zIndex:1}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurveyModal.js","sourceRoot":"","sources":["../../../src/surveys/components/SurveyModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"SurveyModal.js","sourceRoot":"","sources":["../../../src/surveys/components/SurveyModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEzG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU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AAM,EAAE,CAAC;KACV;CACF,CAAC,CAAA"}
|
package/dist/surveys/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.VerySatisfiedEmoji=exports.VeryDissatisfiedEmoji=exports.ThumbsUpEmoji=exports.ThumbsDownEmoji=exports.SatisfiedEmoji=exports.NeutralEmoji=exports.DissatisfiedEmoji=exports.CheckSVG=exports.CancelSVG=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _OptionalReactNativeSvg=require("../optional/OptionalReactNativeSvg");var _jsxRuntime=require("react/jsx-runtime");var _this=void 0,_jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/icons.js";function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var Svg=_OptionalReactNativeSvg.OptionalReactNativeSvg===null||_OptionalReactNativeSvg.OptionalReactNativeSvg===void 0?void 0:_OptionalReactNativeSvg.OptionalReactNativeSvg.Svg;var Path=_OptionalReactNativeSvg.OptionalReactNativeSvg===null||_OptionalReactNativeSvg.OptionalReactNativeSvg===void 0?void 0:_OptionalReactNativeSvg.OptionalReactNativeSvg.Path;var getFallbackSize=function getFallbackSize(value,fallback){if(typeof value==='number'){return value;}if(typeof value==='string'){var parsed=Number.parseInt(value,10);return Number.isNaN(parsed)?fallback:parsed;}return fallback;};var getFallbackColor=function getFallbackColor(fill){return typeof fill==='string'&&fill!=='none'?fill:'black';};var getFallbackFontSize=function getFallbackFontSize(label,height){return label.length>1?Math.round(height*0.55):height;};var renderFallbackIcon=function renderFallbackIcon(_ref){var label=_ref.label,fill=_ref.fill,height=_ref.height;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.fallbackIcon,{color:getFallbackColor(fill),fontSize:getFallbackFontSize(label,height),height:height,lineHeight:height,width:height}],children:label});};var renderSvgIcon=function renderSvgIcon(_ref2){var props=_ref2.props,height=_ref2.height,width=_ref2.width,viewBox=_ref2.viewBox,pathProps=_ref2.pathProps,fallback=_ref2.fallback;var _a;if(!Svg||!Path){return renderFallbackIcon({label:fallback,fill:props.fill,height:getFallbackSize((_a=props.height)!==null&&_a!==void 0?_a:height,48)});}return(0,_jsxRuntime.jsx)(Svg,_objectSpread(_objectSpread({height:height,viewBox:viewBox,width:width},props),{},{children:(0,_jsxRuntime.jsx)(Path,_objectSpread({},pathProps))}));};var SatisfiedEmoji=exports.SatisfiedEmoji=function SatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':)',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var NeutralEmoji=exports.NeutralEmoji=function NeutralEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':|',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var DissatisfiedEmoji=exports.DissatisfiedEmoji=function DissatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':(',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var VeryDissatisfiedEmoji=exports.VeryDissatisfiedEmoji=function VeryDissatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:'X(',pathProps:{d:'M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z'}});};var VerySatisfiedEmoji=exports.VerySatisfiedEmoji=function VerySatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':D',pathProps:{d:'M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var ThumbsUpEmoji=exports.ThumbsUpEmoji=function ThumbsUpEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 0 24 24',width:'48',fallback:'+',pathProps:{d:'M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z'}});};var ThumbsDownEmoji=exports.ThumbsDownEmoji=function ThumbsDownEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 0 24 24',width:'48',fallback:'-',pathProps:{d:'M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z'}});};var CheckSVG=exports.CheckSVG=function CheckSVG(props){return renderSvgIcon({props:props,height:'16',viewBox:'0 0 16 12',width:'16',fallback:'v',pathProps:{d:'M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z'}});};var CancelSVG=exports.CancelSVG=function CancelSVG(props){var _a;return renderSvgIcon({props:props,height:'12',viewBox:'0 0 12 12',width:'12',fallback:'x',pathProps:{fillRule:'evenodd',clipRule:'evenodd',d:'M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z',fill:(_a=props.fill)!==null&&_a!==void 0?_a:'black'}});};var styles=_reactNative.StyleSheet.create({fallbackIcon:{textAlign:'center'}});
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.VerySatisfiedEmoji=exports.VeryDissatisfiedEmoji=exports.ThumbsUpEmoji=exports.ThumbsDownEmoji=exports.SatisfiedEmoji=exports.NeutralEmoji=exports.DissatisfiedEmoji=exports.CheckSVG=exports.CancelSVG=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _OptionalReactNativeSvg=require("../optional/OptionalReactNativeSvg");var _safeStyleSheet=require("./safeStyleSheet");var _jsxRuntime=require("react/jsx-runtime");var _this=void 0,_jsxFileName="/home/runner/work/posthog-js/posthog-js/packages/react-native/dist/surveys/icons.js";function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){(0,_defineProperty2["default"])(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}var Svg=_OptionalReactNativeSvg.OptionalReactNativeSvg===null||_OptionalReactNativeSvg.OptionalReactNativeSvg===void 0?void 0:_OptionalReactNativeSvg.OptionalReactNativeSvg.Svg;var Path=_OptionalReactNativeSvg.OptionalReactNativeSvg===null||_OptionalReactNativeSvg.OptionalReactNativeSvg===void 0?void 0:_OptionalReactNativeSvg.OptionalReactNativeSvg.Path;var getFallbackSize=function getFallbackSize(value,fallback){if(typeof value==='number'){return value;}if(typeof value==='string'){var parsed=Number.parseInt(value,10);return Number.isNaN(parsed)?fallback:parsed;}return fallback;};var getFallbackColor=function getFallbackColor(fill){return typeof fill==='string'&&fill!=='none'?fill:'black';};var getFallbackFontSize=function getFallbackFontSize(label,height){return label.length>1?Math.round(height*0.55):height;};var renderFallbackIcon=function renderFallbackIcon(_ref){var label=_ref.label,fill=_ref.fill,height=_ref.height;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.fallbackIcon,{color:getFallbackColor(fill),fontSize:getFallbackFontSize(label,height),height:height,lineHeight:height,width:height}],children:label});};var renderSvgIcon=function renderSvgIcon(_ref2){var props=_ref2.props,height=_ref2.height,width=_ref2.width,viewBox=_ref2.viewBox,pathProps=_ref2.pathProps,fallback=_ref2.fallback;var _a;if(!Svg||!Path){return renderFallbackIcon({label:fallback,fill:props.fill,height:getFallbackSize((_a=props.height)!==null&&_a!==void 0?_a:height,48)});}return(0,_jsxRuntime.jsx)(Svg,_objectSpread(_objectSpread({height:height,viewBox:viewBox,width:width},props),{},{children:(0,_jsxRuntime.jsx)(Path,_objectSpread({},pathProps))}));};var SatisfiedEmoji=exports.SatisfiedEmoji=function SatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':)',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var NeutralEmoji=exports.NeutralEmoji=function NeutralEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':|',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var DissatisfiedEmoji=exports.DissatisfiedEmoji=function DissatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':(',pathProps:{d:'M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var VeryDissatisfiedEmoji=exports.VeryDissatisfiedEmoji=function VeryDissatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:'X(',pathProps:{d:'M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z'}});};var VerySatisfiedEmoji=exports.VerySatisfiedEmoji=function VerySatisfiedEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 -960 960 960',width:'48',fallback:':D',pathProps:{d:'M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z'}});};var ThumbsUpEmoji=exports.ThumbsUpEmoji=function ThumbsUpEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 0 24 24',width:'48',fallback:'+',pathProps:{d:'M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z'}});};var ThumbsDownEmoji=exports.ThumbsDownEmoji=function ThumbsDownEmoji(props){return renderSvgIcon({props:props,height:'48',viewBox:'0 0 24 24',width:'48',fallback:'-',pathProps:{d:'M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z'}});};var CheckSVG=exports.CheckSVG=function CheckSVG(props){return renderSvgIcon({props:props,height:'16',viewBox:'0 0 16 12',width:'16',fallback:'v',pathProps:{d:'M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z'}});};var CancelSVG=exports.CancelSVG=function CancelSVG(props){var _a;return renderSvgIcon({props:props,height:'12',viewBox:'0 0 12 12',width:'12',fallback:'x',pathProps:{fillRule:'evenodd',clipRule:'evenodd',d:'M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z',fill:(_a=props.fill)!==null&&_a!==void 0?_a:'black'}});};var styles=(0,_safeStyleSheet.createSafeStyleSheet)({fallbackIcon:{textAlign:'center'}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/surveys/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAc,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/surveys/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAc,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,GAAG,GAAG,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,GAAgD,CAAA;AACpF,MAAM,IAAI,GAAG,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,IAAgE,CAAA;AAErG,MAAM,eAAe,GAAG,CAAC,KAAc,EAAE,QAAgB,EAAU,EAAE;IACnE,IA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AK;IACL,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE;QACT,CAAC,EAAE,0jBAA0jB;KAC9jB;CACF,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAe,EAAe,EAAE;;IACxD,OAAA,aAAa,CAAC;QACZ,KAAK;QACL,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,GAAG;QACb,SAAS,EAAE;YACT,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;YACnB,CAAC,EAAE,yiBAAyiB;YAC5iB,IAAI,EAAE,MAAA,KAAK,CAAC,IAAI,mCAAI,OAAO;SAC5B;KACF,CAAC,CAAA;CAAA,CAAA;AAEJ,MAAM,MAAM,GAAG,oBAAoB,CAAC;IAClC,YAAY,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* `StyleSheet.create` that returns the raw style map when the React Native
|
|
4
|
+
* `StyleSheet` runtime is unavailable (e.g. Jest `testEnvironment: node` without
|
|
5
|
+
* the RN preset), instead of throwing at import.
|
|
6
|
+
* See https://github.com/PostHog/posthog-js/issues/3740.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createSafeStyleSheet: <T extends StyleSheet.NamedStyles<T>>(styles: T) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createSafeStyleSheet=void 0;var _reactNative=require("react-native");var createSafeStyleSheet=exports.createSafeStyleSheet=function createSafeStyleSheet(styles){return typeof(_reactNative.StyleSheet===null||_reactNative.StyleSheet===void 0?void 0:_reactNative.StyleSheet.create)==='function'?_reactNative.StyleSheet.create(styles):styles;};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safeStyleSheet.js","sourceRoot":"","sources":["../../src/surveys/safeStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAsC,MAAS,EAAK,EAAE;IACxF,OAAO,OAAO,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAA,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;AACtF,CAAC,CAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.46.
|
|
1
|
+
export declare const version = "4.46.16";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.46.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="4.46.16";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-react-native",
|
|
3
|
-
"version": "4.46.
|
|
3
|
+
"version": "4.46.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"directory": "packages/react-native"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@posthog/core": "1.30.
|
|
32
|
-
"@posthog/types": "1.380.
|
|
31
|
+
"@posthog/core": "1.30.8",
|
|
32
|
+
"@posthog/types": "1.380.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/cli": "^7.19.3",
|