@webority/mobile-chat 0.149.0 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ChatFooter.js +1 -1
- package/lib/module/ChatFooter.js +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChatFooter=ChatFooter;var _chatCore=require("@webority/chat-core"),_mobileUi=require("@webority/mobile-ui"),_reactNative=require("react-native"),_chatShared=require("./chatShared.js"),_jsxRuntime=require("react/jsx-runtime");const GOOGLE_PRIVACY="https://policies.google.com/privacy",GOOGLE_TERMS="https://policies.google.com/terms",openLink=e=>(0,_chatShared.openExternalUrl)(e);function ChatFooter({chat:e,labels:i}){const t=(0,_mobileUi.useTheme)(),r=e.profile;if(!r)return null;const o=r.footer.disclaimer||i.disclaimer,a=r.footer.privacyUrl,c=r.footer.assuranceText,n=r.footer.privacyText,l=(0,_chatCore.showsCaptchaNote)(r);if(!(Boolean(o)||Boolean(n)||Boolean(a)||Boolean(c)||l))return null;const s=[];return o&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:o},"disclaimer")),(a||n)&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:a?(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(a),children:n||i.footerPrivacyFallback}):n},"privacy")),c&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:c},"assurance")),l&&s.push((0,_jsxRuntime.jsxs)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:[i.captchaNoticeBefore,(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_PRIVACY),children:i.captchaPrivacyPolicy}),i.captchaNoticeAnd,(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_TERMS),children:i.captchaTerms}),i.captchaNoticeAfter]},"captcha")),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{gap:t.space.xxs,alignItems:"center"},...(0,_chatShared.webProps)({role:"paragraph"}),children:s})}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChatFooter=ChatFooter;var _chatCore=require("@webority/chat-core"),_mobileUi=require("@webority/mobile-ui"),_reactNative=require("react-native"),_chatShared=require("./chatShared.js"),_jsxRuntime=require("react/jsx-runtime");const GOOGLE_PRIVACY="https://policies.google.com/privacy",GOOGLE_TERMS="https://policies.google.com/terms",openLink=e=>(0,_chatShared.openExternalUrl)(e);function ChatFooter({chat:e,labels:i}){const t=(0,_mobileUi.useTheme)(),r=e.profile;if(!r)return null;const o=r.footer.disclaimer||i.disclaimer,a=(0,_chatCore.isSafeLinkUrl)(r.footer.privacyUrl)?r.footer.privacyUrl:null,c=r.footer.assuranceText,n=r.footer.privacyText,l=(0,_chatCore.showsCaptchaNote)(r);if(!(Boolean(o)||Boolean(n)||Boolean(a)||Boolean(c)||l))return null;const s=[];return o&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:o},"disclaimer")),(a||n)&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:a?(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(a),children:n||i.footerPrivacyFallback}):n},"privacy")),c&&s.push((0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:c},"assurance")),l&&s.push((0,_jsxRuntime.jsxs)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:[i.captchaNoticeBefore,(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_PRIVACY),children:i.captchaPrivacyPolicy}),i.captchaNoticeAnd,(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_TERMS),children:i.captchaTerms}),i.captchaNoticeAfter]},"captcha")),(0,_jsxRuntime.jsx)(_reactNative.View,{style:{gap:t.space.xxs,alignItems:"center"},...(0,_chatShared.webProps)({role:"paragraph"}),children:s})}
|
package/lib/module/ChatFooter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{showsCaptchaNote}from"@webority/chat-core";import{Text,useTheme}from"@webority/mobile-ui";import{View}from"react-native";import{openExternalUrl,webProps}from"./chatShared.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const GOOGLE_PRIVACY="https://policies.google.com/privacy",GOOGLE_TERMS="https://policies.google.com/terms",openLink=e=>openExternalUrl(e);export function ChatFooter({chat:e,labels:r}){const
|
|
1
|
+
"use strict";import{isSafeLinkUrl,showsCaptchaNote}from"@webority/chat-core";import{Text,useTheme}from"@webority/mobile-ui";import{View}from"react-native";import{openExternalUrl,webProps}from"./chatShared.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const GOOGLE_PRIVACY="https://policies.google.com/privacy",GOOGLE_TERMS="https://policies.google.com/terms",openLink=e=>openExternalUrl(e);export function ChatFooter({chat:e,labels:r}){const o=useTheme(),t=e.profile;if(!t)return null;const i=t.footer.disclaimer||r.disclaimer,a=isSafeLinkUrl(t.footer.privacyUrl)?t.footer.privacyUrl:null,c=t.footer.assuranceText,n=t.footer.privacyText,s=showsCaptchaNote(t);if(!(Boolean(i)||Boolean(n)||Boolean(a)||Boolean(c)||s))return null;const l=[];return i&&l.push(_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:i},"disclaimer")),(a||n)&&l.push(_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:a?_jsx(Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(a),children:n||r.footerPrivacyFallback}):n},"privacy")),c&&l.push(_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:c},"assurance")),s&&l.push(_jsxs(Text,{variant:"caption",color:"tertiary",align:"center",children:[r.captchaNoticeBefore,_jsx(Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_PRIVACY),children:r.captchaPrivacyPolicy}),r.captchaNoticeAnd,_jsx(Text,{variant:"caption",color:"link",accessibilityRole:"link",onPress:()=>openLink(GOOGLE_TERMS),children:r.captchaTerms}),r.captchaNoticeAfter]},"captcha")),_jsx(View,{style:{gap:o.space.xxs,alignItems:"center"},...webProps({role:"paragraph"}),children:l})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.151.0",
|
|
4
4
|
"description": "Webority Chat for React Native apps: the chat screen, sheet and embedded shells, thread, composer, one renderer per message part kind and the useChat hook, built on @webority/chat-core and @webority/mobile-ui.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"!**/*.map"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@webority/chat-core": "0.
|
|
46
|
-
"@webority/markdown-core": "^0.
|
|
47
|
-
"@webority/mobile-core": "^0.
|
|
48
|
-
"@webority/mobile-ui": "^0.
|
|
45
|
+
"@webority/chat-core": "0.151.0",
|
|
46
|
+
"@webority/markdown-core": "^0.173.0",
|
|
47
|
+
"@webority/mobile-core": "^0.173.0",
|
|
48
|
+
"@webority/mobile-ui": "^0.173.0",
|
|
49
49
|
"expo-audio": ">=58.0.0",
|
|
50
50
|
"expo-file-system": ">=58.0.0",
|
|
51
51
|
"react": "^19.3.0",
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
"@testing-library/react-native": "14.1.0",
|
|
99
99
|
"@types/jest": "29.5.14",
|
|
100
100
|
"@types/react": "19.3.0",
|
|
101
|
-
"@webority/canvas-kit": "0.
|
|
102
|
-
"@webority/chat-core": "0.
|
|
103
|
-
"@webority/markdown-core": "0.
|
|
104
|
-
"@webority/mobile-core": "0.
|
|
105
|
-
"@webority/mobile-ui": "0.
|
|
101
|
+
"@webority/canvas-kit": "0.173.0",
|
|
102
|
+
"@webority/chat-core": "0.151.0",
|
|
103
|
+
"@webority/markdown-core": "0.173.0",
|
|
104
|
+
"@webority/mobile-core": "0.173.0",
|
|
105
|
+
"@webority/mobile-ui": "0.173.0",
|
|
106
106
|
"babel-jest": "29.7.0",
|
|
107
107
|
"expo": "58.0.23",
|
|
108
108
|
"expo-application": "58.1.2",
|