@webority/mobile-support 0.88.0 → 0.89.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/components/Attachments.js +1 -1
- package/lib/commonjs/components/NewSupportTicket.js +1 -1
- package/lib/commonjs/components/PhotoTray.js +1 -1
- package/lib/commonjs/components/SupportContact.js +1 -1
- package/lib/commonjs/components/SupportTicketDetail.js +1 -1
- package/lib/commonjs/components/SupportTicketList.js +1 -1
- package/lib/commonjs/report/ReportIssueButton.js +1 -1
- package/lib/module/components/Attachments.js +1 -1
- package/lib/module/components/NewSupportTicket.js +1 -1
- package/lib/module/components/PhotoTray.js +1 -1
- package/lib/module/components/SupportContact.js +1 -1
- package/lib/module/components/SupportTicketDetail.js +1 -1
- package/lib/module/components/SupportTicketList.js +1 -1
- package/lib/module/report/ReportIssueButton.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageViewer=exports.AttachmentList=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_format=require("../format.js"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const AttachmentThumb=({attachment:e,onOpen:t})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]),r=(0,_SupportProvider.useAttachmentLoader)(),[a,o]=(0,_react.useState)({status:"loading"});return(0,_react.useEffect)(()=>{let t=!1;return r(e).then(e=>!t&&o({status:"ready",uri:e}),()=>!t&&o({status:"error"})),()=>{t=!0}},[r,e]),"loading"===a.status?(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thumb,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:`Loading ${e.fileName}`})}):"error"===a.status?(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thumb,accessible:!0,accessibilityLabel:`${e.fileName} could not be loaded`,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:"Could not load"})}):(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>t(a.uri,e.fileName),accessibilityRole:"imagebutton",accessibilityLabel:`Open ${e.fileName}`,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:a.uri},style:s.thumb,resizeMode:"cover"})})},FileRow=({attachment:e})=>{const t=(0,_mobileUi.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(t),[t]),s=(0,_SupportProvider.useAttachmentOpener)(),[r,a]=(0,_react.useState)(!1),o=`${e.fileName}, ${(0,_format.formatBytes)(e.sizeBytes)}`;if(!s)return(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"secondary",testID:`support-file-${e.id}`,children:o});return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>{(async()=>{a(!0);try{await s(e)}catch{_mobileUi.toast.error(`Could not open ${e.fileName}. Try again.`)}finally{a(!1)}})()},disabled:r,accessibilityRole:"button",accessibilityLabel:`Open ${e.fileName}`,accessibilityState:{busy:r,disabled:r},"aria-busy":r,"aria-disabled":r,style:i.fileRow,testID:`support-file-${e.id}`,children:[(0,_jsxRuntime.jsx)(_mobileUi.AppIcon,{name:"document",size:16,color:t.colors.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageViewer=exports.AttachmentList=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_reactNativeGestureHandler=require("react-native-gesture-handler"),_format=require("../format.js"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const AttachmentThumb=({attachment:e,onOpen:t})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]),r=(0,_SupportProvider.useAttachmentLoader)(),[a,o]=(0,_react.useState)({status:"loading"});return(0,_react.useEffect)(()=>{let t=!1;return r(e).then(e=>!t&&o({status:"ready",uri:e}),()=>!t&&o({status:"error"})),()=>{t=!0}},[r,e]),"loading"===a.status?(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thumb,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:`Loading ${e.fileName}`})}):"error"===a.status?(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thumb,accessible:!0,accessibilityLabel:`${e.fileName} could not be loaded`,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:"Could not load"})}):(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>t(a.uri,e.fileName),accessibilityRole:"imagebutton",accessibilityLabel:`Open ${e.fileName}`,testID:`support-attachment-${e.id}`,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:a.uri},style:s.thumb,resizeMode:"cover"})})},FileRow=({attachment:e})=>{const t=(0,_mobileUi.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(t),[t]),s=(0,_SupportProvider.useAttachmentOpener)(),[r,a]=(0,_react.useState)(!1),o=`${e.fileName}, ${(0,_format.formatBytes)(e.sizeBytes)}`;if(!s)return(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"secondary",testID:`support-file-${e.id}`,children:o});return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>{(async()=>{a(!0);try{await s(e)}catch{_mobileUi.toast.error(`Could not open ${e.fileName}. Try again.`)}finally{a(!1)}})()},disabled:r,accessibilityRole:"button",accessibilityLabel:`Open ${e.fileName}`,accessibilityState:{busy:r,disabled:r},"aria-busy":r,"aria-disabled":r,style:i.fileRow,testID:`support-file-${e.id}`,children:[(0,_jsxRuntime.jsx)(_mobileUi.AppIcon,{name:"document",size:16,color:t.colors.link}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"link",children:o}),r&&(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:`Opening ${e.fileName}`})]})},AttachmentList=({attachments:e,onOpenImage:t})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]);if(0===e.length)return null;const r=e.filter(e=>(0,_format.isImage)(e.contentType)),a=e.filter(e=>!(0,_format.isImage)(e.contentType));return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.list,children:[r.length>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thumbRow,children:r.map(e=>(0,_jsxRuntime.jsx)(AttachmentThumb,{attachment:e,onOpen:t},e.id))}),a.map(e=>(0,_jsxRuntime.jsx)(FileRow,{attachment:e},e.id))]})};exports.AttachmentList=AttachmentList;const ImageViewer=({image:e,onClose:t})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]);return(0,_jsxRuntime.jsx)(_reactNative.Modal,{visible:null!==e,onRequestClose:t,animationType:"fade",transparent:!1,children:(0,_jsxRuntime.jsxs)(_reactNativeGestureHandler.GestureHandlerRootView,{style:s.viewer,testID:"support-image-viewer",children:[e&&(0,_jsxRuntime.jsx)(_mobileUi.ZoomableImage,{accessibilityLabel:e.name,style:s.viewerImageWrap,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:e.uri},style:s.viewerImage,resizeMode:"contain"})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.viewerClose,children:(0,_jsxRuntime.jsx)(_mobileUi.IconButton,{icon:({size:e})=>(0,_jsxRuntime.jsx)(_mobileUi.AppIcon,{name:"close-circle",color:i.colors["on-scrim"],size:e}),accessibilityLabel:"Close image",onPress:t,variant:"glass",style:s.viewerCloseButton})}),(0,_jsxRuntime.jsx)(_mobileUi.ToastHost,{})]})})};exports.ImageViewer=ImageViewer;const THUMB=84,buildStyles=e=>_reactNative.StyleSheet.create({list:{gap:e.space.xs,marginTop:e.space.sm},fileRow:{flexDirection:"row",alignItems:"center",gap:e.space.xxs,alignSelf:"flex-start"},thumbRow:{flexDirection:"row",flexWrap:"wrap",gap:e.space.xs},thumb:{width:84,height:84,borderRadius:e.radius.sm,backgroundColor:e.colors["bg-subtle"],alignItems:"center",justifyContent:"center",overflow:"hidden"},viewer:{flex:1,backgroundColor:e.colors["surface-inverse"]},viewerImageWrap:{flex:1},viewerImage:{flex:1,width:"100%"},viewerClose:{position:"absolute",top:e.space["2xl"],right:e.space.md},viewerCloseButton:{backgroundColor:e.colors.scrim,borderColor:e.colors["on-scrim"]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewSupportTicket=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_client=require("../client.js"),_device=require("../device.js"),_SupportProvider=require("../SupportProvider.js"),_validation=require("../validation.js"),_PhotoTray=require("./PhotoTray.js"),_jsxRuntime=require("react/jsx-runtime");const TicketForm=({config:e,styles:t,onCreated:i,onCancel:r,initialDraft:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NewSupportTicket=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_client=require("../client.js"),_device=require("../device.js"),_SupportProvider=require("../SupportProvider.js"),_validation=require("../validation.js"),_PhotoTray=require("./PhotoTray.js"),_jsxRuntime=require("react/jsx-runtime");const TicketForm=({config:e,styles:t,onCreated:i,onCancel:r,initialDraft:a,defaultCategory:o,appVersion:s})=>{const n=(0,_SupportProvider.useCreateSupportTicket)(),listed=t=>t&&e.categories.includes(t)?t:void 0,[l,u]=(0,_react.useState)([]),[c,d]=(0,_react.useState)(a?.screenshots??[]),[m,p]=(0,_react.useState)(null),[g,x]=(0,_react.useState)(null),b=(0,_mobileUi.useForm)({initialValues:{category:listed(a?.category)??listed(o)??"",subject:a?.subject??"",body:a?.body??""},validate:{category:t=>(0,_validation.validateCategory)(t,e),subject:t=>(0,_validation.validateSubject)(t,e),body:t=>(0,_validation.validateBody)(t,e)},onSubmit:async t=>{const r=(0,_validation.validateFiles)([...c,...l],e);if(p(r??null),!r){x(null);try{const e=await n({category:t.category,subject:t.subject.trim(),body:t.body.trim(),pageUrl:a?.pageUrl,userAgent:a?.userAgent??(0,_device.describeDevice)(),appVersion:a?.appVersion??s,files:l,screenshots:c});i(e)}catch(e){x((0,_client.toSupportApiError)(e).message)}}}}),_=b.getFieldProps("category"),j=b.getFieldProps("subject"),y=b.getFieldProps("body"),h=c.length+l.length;return(0,_jsxRuntime.jsxs)(_mobileUi.KeyboardAwareScrollView,{contentContainerStyle:t.content,safeAreaEdges:[],children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"secondary",children:"Tell us what you need. We reply by email and in this ticket."}),(0,_jsxRuntime.jsx)(_mobileUi.Select,{label:"Category",placeholder:"Choose a category",options:e.categories.map(e=>({label:e,value:e})),value:_.value||void 0,onChange:e=>_.setValue(String(e),!0),error:_.error,testID:"support-new-category"}),(0,_jsxRuntime.jsx)(_mobileUi.Input,{label:"Subject",placeholder:"A short summary",required:!0,maxLength:e.subjectMaxLength,value:j.value,onChangeText:j.onChangeText,onBlur:j.onBlur,error:j.error,testID:"support-new-subject"}),(0,_jsxRuntime.jsx)(_mobileUi.Input,{label:"Message",placeholder:"What happened, and what did you expect?",required:!0,multiline:!0,maxLength:e.bodyMaxLength,value:y.value,onChangeText:y.onChangeText,onBlur:y.onBlur,error:y.error,testID:"support-new-body"}),c.length>0&&(0,_jsxRuntime.jsx)(_PhotoTray.PhotoTray,{label:"Screenshot",photos:c,onChange:d,remaining:0,allowAdd:!1,maxBytes:e.maxAttachmentBytes,disabled:b.isSubmitting}),(0,_jsxRuntime.jsx)(_PhotoTray.PhotoTray,{label:"Photos",photos:l,onChange:u,remaining:e.maxAttachmentsPerMessage-h,maxBytes:e.maxAttachmentBytes,disabled:b.isSubmitting}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:`Attach up to ${e.maxAttachmentsPerMessage} files.`}),(m||g)&&(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"danger",accessibilityLiveRegion:"polite",children:m??g}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:t.actions,children:[r&&(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Cancel",variant:"ghost",tone:"neutral",onPress:r,disabled:b.isSubmitting}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Send ticket",loading:b.isSubmitting,disabled:b.isSubmitting,onPress:b.submit,testID:"support-new-submit"})]})]})},NewSupportTicket=e=>{const t=(0,_mobileUi.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(t),[t]),{config:r,loading:a,error:o,reload:s}=(0,_SupportProvider.useSupportConfig)(),n=e.testID??"support-new-ticket";return r?(0,_jsxRuntime.jsx)(_reactNative.View,{style:i.root,testID:n,children:(0,_jsxRuntime.jsx)(TicketForm,{...e,config:r,styles:i})}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:i.center,testID:n,children:a?(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{accessibilityLabel:"Loading"}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"body",color:"danger",align:"center",children:o?.message??"Support is not available right now."}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Try again",variant:"ghost",onPress:()=>{s()}})]})})};exports.NewSupportTicket=NewSupportTicket;const buildStyles=e=>_reactNative.StyleSheet.create({root:{flex:1},content:{padding:e.space.md,gap:e.space.md},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl,gap:e.space.sm},actions:{flexDirection:"row",justifyContent:"flex-end",gap:e.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PhotoTray=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_photos=require("../photos.js"),_jsxRuntime=require("react/jsx-runtime");const PhotoTray=({photos:e,onChange:t,remaining:i,maxBytes:o,disabled:r,label:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PhotoTray=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_photos=require("../photos.js"),_jsxRuntime=require("react/jsx-runtime");const PhotoTray=({photos:e,onChange:t,remaining:i,maxBytes:o,disabled:r,label:s,allowAdd:a=!0})=>{const l=(0,_mobileUi.useTheme)(),n=(0,_react.useMemo)(()=>buildStyles(l),[l]),[c,u]=(0,_react.useState)(null),[m,d]=(0,_react.useState)(null),add=async r=>{d(null),u(r);try{const s=await(0,_photos.pickPhotos)(r,{maxCount:i,maxBytes:o});s.length>0&&t([...e,...s])}catch(e){d(e instanceof Error&&"PhotoPermissionError"===e.name?e.message:"That photo could not be added. Try another one.")}finally{u(null)}},h=i<=0;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:n.root,children:[s?(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:"secondary",children:s}):null,e.length>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:n.row,children:e.map((i,o)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:n.item,children:[(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:i.uri},style:n.thumb,accessibilityLabel:i.name}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:n.remove,children:(0,_jsxRuntime.jsx)(_mobileUi.IconButton,{size:"sm",variant:"glass",style:n.removeButton,icon:({color:e})=>(0,_jsxRuntime.jsx)(_mobileUi.AppIcon,{name:"trash",color:r?e:l.colors["on-scrim"],size:REMOVE_ICON}),accessibilityLabel:`Remove ${i.name}`,disabled:r,onPress:()=>t(e.filter((e,t)=>t!==o))})})]},`${i.uri}-${o}`))}),a&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:n.actions,children:[(0,_jsxRuntime.jsx)(_mobileUi.Button,{size:"sm",variant:"outline",tone:"neutral",leftIcon:"gallery",title:"Add photo",accessibilityLabel:"Add a photo from your library",loading:"library"===c,disabled:r||h||null!==c,onPress:()=>{add("library")}}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{size:"sm",variant:"outline",tone:"neutral",leftIcon:"camera",title:"Take photo",accessibilityLabel:"Take a photo with your camera",loading:"camera"===c,disabled:r||h||null!==c,onPress:()=>{add("camera")}})]}),m?(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"danger",accessibilityLiveRegion:"polite",children:m}):null]})};exports.PhotoTray=PhotoTray;const THUMB=72,REMOVE_SIZE=24,REMOVE_ICON=14,buildStyles=e=>_reactNative.StyleSheet.create({root:{gap:e.space.xs},row:{flexDirection:"row",flexWrap:"wrap",gap:e.space.xs},item:{width:72,height:72},thumb:{width:72,height:72,borderRadius:e.radius.sm,backgroundColor:e.colors["bg-subtle"]},remove:{position:"absolute",top:e.space.xxs,right:e.space.xxs},removeButton:{width:24,height:24,borderRadius:12,backgroundColor:e.colors.scrim,borderColor:e.colors["on-scrim"]},actions:{flexDirection:"row",gap:e.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SupportContact=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_clipboard=require("../clipboard.js"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const COPY_TOAST_KEY="support-contact-copy",SupportContact=({testID:e="support-contact"})=>{const t=(0,_mobileUi.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(t),[t]),{config:o,loading:a,error:r}=(0,_SupportProvider.useSupportConfig)();if(!o)return(0,_jsxRuntime.jsx)(_mobileUi.Card,{variant:"outlined",testID:e,children:a?(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:"Loading contact details"}):(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SupportContact=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_clipboard=require("../clipboard.js"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const COPY_TOAST_KEY="support-contact-copy",SupportContact=({testID:e="support-contact"})=>{const t=(0,_mobileUi.useTheme)(),i=(0,_react.useMemo)(()=>buildStyles(t),[t]),{config:o,loading:a,error:r}=(0,_SupportProvider.useSupportConfig)();if(!o)return(0,_jsxRuntime.jsx)(_mobileUi.Card,{variant:"outlined",testID:e,children:a?(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:"Loading contact details"}):(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"danger",children:r?.message??"Contact details are not available right now."})});const s=o.supportEmail,l=o.supportPhone?.trim(),n=o.supportHours?.trim(),open=(e,t)=>{_reactNative.Linking.openURL(e).catch(()=>_mobileUi.toast.error(t))};return(0,_jsxRuntime.jsxs)(_mobileUi.Card,{variant:"outlined",bodyStyle:i.body,testID:e,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"title",accessibilityRole:"header",children:`Contact ${o.supportName||o.productName}`}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:i.row,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:"secondary",children:"Email"}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"body",selectable:!0,testID:"support-contact-email",children:s||"-"})]}),s?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:i.actions,children:[(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Copy",size:"sm",variant:"outline",tone:"neutral",leftIcon:"copy",accessibilityLabel:`Copy ${s}`,onPress:()=>{(async()=>{try{await(0,_clipboard.copyText)(s),"android"===_reactNative.Platform.OS&&Number(_reactNative.Platform.Version)>=33||_mobileUi.toast.success("Email address copied.",{key:COPY_TOAST_KEY})}catch{_mobileUi.toast.error("Could not copy the email address.",{key:COPY_TOAST_KEY})}})()},testID:"support-contact-copy"}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Send email",size:"sm",variant:"outline",leftIcon:"mail",accessibilityLabel:`Send an email to ${s}`,onPress:()=>open(`mailto:${s}`,"No email app is set up on this device."),testID:"support-contact-mail"})]}):null,l?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:i.row,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:"secondary",children:"Phone"}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:l,size:"sm",variant:"link",leftIcon:"call",accessibilityLabel:`Call ${l}`,onPress:()=>open(`tel:${l.replace(/[^\d+]/g,"")}`,"This device cannot make calls."),testID:"support-contact-phone"})]}):null,n?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:i.row,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:"secondary",children:"Hours"}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",children:n})]}):null]})};exports.SupportContact=SupportContact;const buildStyles=e=>_reactNative.StyleSheet.create({body:{gap:e.space.sm},row:{gap:e.space.xxs,alignItems:"flex-start"},actions:{flexDirection:"row",gap:e.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SupportTicketDetail=void 0;var _mobileCore=require("@webority/mobile-core"),_mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_SupportProvider=require("../SupportProvider.js"),_validation=require("../validation.js"),_Attachments=require("./Attachments.js"),_PhotoTray=require("./PhotoTray.js"),_SupportTicketList=require("./SupportTicketList.js"),_jsxRuntime=require("react/jsx-runtime");const MessageBubble=({message:e,styles:t,timeZone:i,onOpenImage:s})=>{if("System"===e.authorKind)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:t.system,testID:`support-message-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:`${e.body}, ${(0,_mobileCore.formatDateTime)(e.createdDateTimeUtc,{zone:i})}`})});const a="Customer"===e.authorKind;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[t.bubbleRow,a?t.mineRow:t.theirsRow],testID:`support-message-${e.id}`,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[t.bubble,a?t.mine:t.theirs],children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:a?"primary":"secondary",children:e.authorName??(a?"You":"Support team")}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"body",selectable:!0,children:e.body}),(0,_jsxRuntime.jsx)(_Attachments.AttachmentList,{attachments:e.attachments,onOpenImage:s}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:(0,_mobileCore.formatDateTime)(e.createdDateTimeUtc,{zone:i})})]})})},SATISFACTION_TEXT={Satisfied:"You told us this solved your problem.",Unsatisfied:"You told us this did not solve your problem."},SupportTicketDetail=({ticketId:e,testID:t="support-ticket-detail"})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]),{config:a}=(0,_SupportProvider.useSupportConfig)(),n=(0,_SupportProvider.useSupportTimeZone)(),{ticket:o,loading:r,error:l,actionError:c,busy:m,reload:u,reply:d,reopen:x,rate:p}=(0,_SupportProvider.useSupportTicket)(e),[_,b]=(0,_react.useState)(null),[j,y]=(0,_react.useState)(""),[g
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SupportTicketDetail=void 0;var _mobileCore=require("@webority/mobile-core"),_mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_SupportProvider=require("../SupportProvider.js"),_validation=require("../validation.js"),_Attachments=require("./Attachments.js"),_PhotoTray=require("./PhotoTray.js"),_SupportTicketList=require("./SupportTicketList.js"),_jsxRuntime=require("react/jsx-runtime");const MessageBubble=({message:e,styles:t,timeZone:i,onOpenImage:s})=>{if("System"===e.authorKind)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:t.system,testID:`support-message-${e.id}`,children:(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",align:"center",children:`${e.body}, ${(0,_mobileCore.formatDateTime)(e.createdDateTimeUtc,{zone:i})}`})});const a="Customer"===e.authorKind;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[t.bubbleRow,a?t.mineRow:t.theirsRow],testID:`support-message-${e.id}`,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[t.bubble,a?t.mine:t.theirs],children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",color:a?"primary":"secondary",children:e.authorName??(a?"You":"Support team")}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"body",selectable:!0,children:e.body}),(0,_jsxRuntime.jsx)(_Attachments.AttachmentList,{attachments:e.attachments,onOpenImage:s}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:(0,_mobileCore.formatDateTime)(e.createdDateTimeUtc,{zone:i})})]})})},SATISFACTION_TEXT={Satisfied:"You told us this solved your problem.",Unsatisfied:"You told us this did not solve your problem."},SupportTicketDetail=({ticketId:e,testID:t="support-ticket-detail"})=>{const i=(0,_mobileUi.useTheme)(),s=(0,_react.useMemo)(()=>buildStyles(i),[i]),{config:a}=(0,_SupportProvider.useSupportConfig)(),n=(0,_SupportProvider.useSupportTimeZone)(),{ticket:o,loading:r,error:l,actionError:c,busy:m,reload:u,reply:d,reopen:x,rate:p}=(0,_SupportProvider.useSupportTicket)(e),[_,b]=(0,_react.useState)(null),[j,y]=(0,_react.useState)(""),[h,g]=(0,_react.useState)([]),[R,v]=(0,_react.useState)(null),[S,T]=(0,_react.useState)(null),[f,U]=(0,_react.useState)("");if(!o)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.center,testID:t,children:r?(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{accessibilityLabel:"Loading the ticket"}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"body",color:"danger",align:"center",children:l?.message??"That ticket could not be found."}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Try again",variant:"ghost",onPress:()=>{u()}})]})});const w=o.messages.filter(e=>!e.isInternal);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.root,testID:t,children:[(0,_jsxRuntime.jsxs)(_mobileUi.KeyboardAwareScrollView,{contentContainerStyle:s.content,safeAreaEdges:[],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.head,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"h3",accessibilityRole:"header",children:o.subject}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"secondary",children:`${o.number}, ${o.category}`}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.headRow,children:[(0,_jsxRuntime.jsx)(_mobileUi.StatusBadge,{label:o.statusLabel,tone:_SupportTicketList.STATUS_TONES[o.status]??"neutral",accessibilityLabel:`Status: ${o.statusLabel}`}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:`Opened ${(0,_mobileCore.formatDateTime)(o.createdDateTimeUtc,{zone:n})}`})]})]}),"WaitingOnCustomer"===o.status&&(0,_jsxRuntime.jsx)(_mobileUi.Card,{variant:"outlined",bodyStyle:s.section,testID:"support-waiting",children:(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",children:"We need your answer to carry on. Reply below and the ticket goes back to our team."})}),o.canReopen&&(0,_jsxRuntime.jsxs)(_mobileUi.Card,{variant:"outlined",bodyStyle:s.section,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",children:`This ticket is ${o.statusLabel}. Reopen it if you still need help.`}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Reopen ticket",variant:"outline",size:"sm",loading:m,disabled:m,onPress:()=>{x()},testID:"support-reopen"})]}),o.satisfaction?(0,_jsxRuntime.jsxs)(_mobileUi.Card,{variant:"outlined",bodyStyle:s.section,testID:"support-rating",children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",accessibilityLiveRegion:"polite",children:SATISFACTION_TEXT[o.satisfaction]}),o.satisfactionComment?(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"secondary",children:`Your comment: ${o.satisfactionComment}`}):null]}):o.canRate?(0,_jsxRuntime.jsxs)(_mobileUi.Card,{variant:"outlined",bodyStyle:s.section,testID:"support-rating",children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"label",children:"Did this solve your problem?"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.ratingRow,children:[(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Yes, it is solved",size:"sm",leftIcon:"like",variant:"Satisfied"===S?"solid":"outline",tone:"success",accessibilityState:{selected:"Satisfied"===S},"aria-selected":"Satisfied"===S,onPress:()=>T("Satisfied"),testID:"support-rate-satisfied"}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"No, it is not",size:"sm",leftIcon:"dislike",variant:"Unsatisfied"===S?"solid":"outline",tone:"danger",accessibilityState:{selected:"Unsatisfied"===S},"aria-selected":"Unsatisfied"===S,onPress:()=>T("Unsatisfied"),testID:"support-rate-unsatisfied"})]}),S&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_mobileUi.Input,{label:"Anything to add? (optional)",helperText:"Your comment goes to the support team.",value:f,onChangeText:U,multiline:!0,maxLength:a?.satisfactionCommentMaxLength,testID:"support-rating-comment"}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Send answer",size:"sm",loading:m,disabled:m,onPress:()=>{(async()=>{S&&await p({satisfaction:S,comment:f})&&(T(null),U(""))})()},testID:"support-rating-send"})]})]}):null,(0,_jsxRuntime.jsx)(_reactNative.View,{style:s.thread,accessibilityLabel:"Conversation",children:w.map(e=>(0,_jsxRuntime.jsx)(MessageBubble,{message:e,styles:s,timeZone:n,onOpenImage:(e,t)=>b({uri:e,name:t})},e.id))}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.section,children:[(0,_jsxRuntime.jsx)(_mobileUi.Input,{label:"Your reply",placeholder:"Write a reply to the support team",value:j,onChangeText:y,multiline:!0,maxLength:a?.bodyMaxLength,error:R??void 0,testID:"support-reply-input"}),a&&(0,_jsxRuntime.jsx)(_PhotoTray.PhotoTray,{photos:h,onChange:g,remaining:a.maxAttachmentsPerMessage-h.length,maxBytes:a.maxAttachmentBytes,disabled:m}),o.canReopen&&(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"secondary",children:"Replying reopens this ticket."}),c&&(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"danger",accessibilityLiveRegion:"polite",children:c.message}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Send reply",leftIcon:"send",loading:m,disabled:m,onPress:()=>{(async()=>{const e=j.trim(),t=a?(0,_validation.validateBody)(e,a)??(0,_validation.validateFiles)(h,a):e?void 0:"Write a message.";t?v(t):(v(null),await d({body:e,files:h})&&(y(""),g([])))})()},testID:"support-reply-send"})]})]}),(0,_jsxRuntime.jsx)(_Attachments.ImageViewer,{image:_,onClose:()=>b(null)})]})};exports.SupportTicketDetail=SupportTicketDetail;const buildStyles=e=>_reactNative.StyleSheet.create({root:{flex:1},content:{padding:e.space.md,gap:e.space.md},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl,gap:e.space.sm},head:{gap:e.space.xxs},headRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.xs},section:{gap:e.space.sm},ratingRow:{flexDirection:"row",flexWrap:"wrap",gap:e.space.sm},thread:{gap:e.space.sm},system:{paddingHorizontal:e.space.lg,paddingVertical:e.space.xxs},bubbleRow:{flexDirection:"row"},mineRow:{justifyContent:"flex-end"},theirsRow:{justifyContent:"flex-start"},bubble:{maxWidth:"85%",borderRadius:e.radius.lg,padding:e.space.sm,gap:e.space.xxs},mine:{backgroundColor:e.colors["primary-soft"]},theirs:{backgroundColor:e.colors["bg-subtle"]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.statusFilterOptions=exports.SupportTicketList=exports.STATUS_TONES=void 0;var _mobileCore=require("@webority/mobile-core"),_mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const STATUS_TONES=exports.STATUS_TONES={Open:"warning",InProgress:"info",WaitingOnCustomer:"warning",Resolved:"success",Closed:"neutral"},STATUS_FILTERS=[{value:"Open",label:"Open",count:"open"},{value:"InProgress",label:"In progress",count:"inProgress"},{value:"WaitingOnCustomer",label:"Waiting on you",count:"waitingOnCustomer"},{value:"Resolved",label:"Resolved",count:"resolved"},{value:"Closed",label:"Closed",count:"closed"}],ALL="all",statusFilterOptions=(e,t)=>[{value:ALL,label:"All",count:e.total},...STATUS_FILTERS.filter(i=>e[i.count]>0||i.value===t).map(t=>({value:t.value,label:t.label,count:e[t.count]}))];exports.statusFilterOptions=statusFilterOptions;const SEARCH_DEBOUNCE_MS=400,ticketKey=e=>e.id,TicketRow=(0,_react.memo)(function TicketRow({item:e,timeZone:t,onOpen:i,styles:s}){return(0,_jsxRuntime.jsxs)(_mobileUi.Card,{onPress:()=>i(e),accessibilityLabel:`${e.subject}, ${e.statusLabel}, ticket ${e.number}`,bodyStyle:s.card,testID:`support-ticket-${e.id}`,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.cardTop,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:e.number}),(0,_jsxRuntime.jsx)(_mobileUi.StatusBadge,{label:e.statusLabel,tone:STATUS_TONES[e.status]??"neutral",size:"sm"})]}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"title",numberOfLines:2,children:e.subject}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"secondary",children:e.category}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.cardBottom,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:`Updated ${(0,_mobileCore.formatDateTime)(e.updatedDateTimeUtc,{zone:t})}`}),e.awaitingCustomer&&(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"warning",children:"Waiting for your reply"})]})]})}),SupportTicketList=({onOpenTicket:e,onNewTicket:t,header:i,pageSize:s,testID:r="support-ticket-list"})=>{const o=(0,_mobileUi.useTheme)(),a=(0,_react.useMemo)(()=>buildStyles(o),[o]),{tickets:n,counts:l,status:c,search:u,setStatus:m,setSearch:p,loading:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.statusFilterOptions=exports.SupportTicketList=exports.STATUS_TONES=void 0;var _mobileCore=require("@webority/mobile-core"),_mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_SupportProvider=require("../SupportProvider.js"),_jsxRuntime=require("react/jsx-runtime");const STATUS_TONES=exports.STATUS_TONES={Open:"warning",InProgress:"info",WaitingOnCustomer:"warning",Resolved:"success",Closed:"neutral"},STATUS_FILTERS=[{value:"Open",label:"Open",count:"open"},{value:"InProgress",label:"In progress",count:"inProgress"},{value:"WaitingOnCustomer",label:"Waiting on you",count:"waitingOnCustomer"},{value:"Resolved",label:"Resolved",count:"resolved"},{value:"Closed",label:"Closed",count:"closed"}],ALL="all",statusFilterOptions=(e,t)=>[{value:ALL,label:"All",count:e.total},...STATUS_FILTERS.filter(i=>e[i.count]>0||i.value===t).map(t=>({value:t.value,label:t.label,count:e[t.count]}))];exports.statusFilterOptions=statusFilterOptions;const SEARCH_DEBOUNCE_MS=400,ticketKey=e=>e.id,TicketRow=(0,_react.memo)(function TicketRow({item:e,timeZone:t,onOpen:i,styles:s}){return(0,_jsxRuntime.jsxs)(_mobileUi.Card,{onPress:()=>i(e),accessibilityLabel:`${e.subject}, ${e.statusLabel}, ticket ${e.number}`,bodyStyle:s.card,testID:`support-ticket-${e.id}`,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.cardTop,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:e.number}),(0,_jsxRuntime.jsx)(_mobileUi.StatusBadge,{label:e.statusLabel,tone:STATUS_TONES[e.status]??"neutral",size:"sm"})]}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"title",numberOfLines:2,children:e.subject}),(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"secondary",children:e.category}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s.cardBottom,children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"tertiary",children:`Updated ${(0,_mobileCore.formatDateTime)(e.updatedDateTimeUtc,{zone:t})}`}),e.awaitingCustomer&&(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"caption",color:"warning",children:"Waiting for your reply"})]})]})}),SupportTicketList=({onOpenTicket:e,onNewTicket:t,header:i,pageSize:s,testID:r="support-ticket-list"})=>{const o=(0,_mobileUi.useTheme)(),a=(0,_react.useMemo)(()=>buildStyles(o),[o]),{tickets:n,counts:l,status:c,search:u,setStatus:m,setSearch:p,loading:d,refreshing:x,loadingMore:_,error:b,loadMoreError:j,refresh:y,loadMore:S}=(0,_SupportProvider.useSupportTickets)({pageSize:s}),h=(0,_SupportProvider.useSupportTimeZone)(),v=(0,_react.useCallback)(({item:t})=>(0,_jsxRuntime.jsx)(TicketRow,{item:t,timeZone:h,onOpen:e,styles:a}),[h,e,a]),R=(0,_react.useCallback)(()=>{S()},[S]),g=(0,_react.useCallback)(()=>{y()},[y]),T=(0,_react.useMemo)(()=>(0,_jsxRuntime.jsx)(_reactNative.RefreshControl,{refreshing:x,onRefresh:g}),[x,g]),L=(l?.total??0)>0,k=null!==c||""!==u.trim(),f=(0,_jsxRuntime.jsxs)(_reactNative.View,{style:a.header,children:[i,t&&(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"New ticket",leftIcon:"add",onPress:t,fullWidth:!0}),b&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:a.error,accessibilityLiveRegion:"polite",children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"danger",children:b.message}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Try again",size:"sm",variant:"ghost",onPress:()=>{y()}})]}),l&&L&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_mobileUi.SearchBar,{value:u,onChangeText:p,debounceMs:400,placeholder:"Search by subject or ticket number",accessibilityLabel:"Search tickets",testID:"support-ticket-search"}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:a.filters,accessibilityRole:"tablist",accessibilityLabel:"Filter by status",children:statusFilterOptions(l,c).map(e=>(0,_jsxRuntime.jsx)(_mobileUi.Chip,{label:`${e.label} (${e.count})`,selected:(c??ALL)===e.value,onPress:()=>m(e.value===ALL?null:e.value),accessibilityLabel:`${e.label}, ${e.count} tickets`,testID:`support-filter-${e.value}`},e.value))})]})]});if(d&&null===l&&!b)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:a.center,testID:r,children:(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{accessibilityLabel:"Loading your tickets"})});const w=_?(0,_jsxRuntime.jsx)(_reactNative.View,{style:a.footer,children:(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{size:"sm",accessibilityLabel:"Loading more tickets"})}):j?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[a.footer,a.error],accessibilityLiveRegion:"polite",children:[(0,_jsxRuntime.jsx)(_mobileUi.Text,{variant:"bodySmall",color:"danger",children:j.message}),(0,_jsxRuntime.jsx)(_mobileUi.Button,{title:"Load more",size:"sm",variant:"ghost",onPress:()=>{S()}})]}):null;return(0,_jsxRuntime.jsx)(_reactNative.FlatList,{testID:r,data:n,keyExtractor:ticketKey,contentContainerStyle:a.content,ListHeaderComponent:f,ListFooterComponent:w,onEndReached:R,onEndReachedThreshold:.5,refreshControl:T,ListEmptyComponent:d?(0,_jsxRuntime.jsx)(_reactNative.View,{style:a.footer,children:(0,_jsxRuntime.jsx)(_mobileUi.Spinner,{accessibilityLabel:"Loading your tickets"})}):b?null:L?(0,_jsxRuntime.jsx)(_mobileUi.EmptyState,{title:"No tickets match",description:k?"Try another status or search.":void 0}):(0,_jsxRuntime.jsx)(_mobileUi.EmptyState,{title:"No tickets yet",description:"Raise a ticket and it will show here with its status.",action:t?{label:"New ticket",onPress:t}:void 0}),renderItem:v})};exports.SupportTicketList=SupportTicketList;const buildStyles=e=>_reactNative.StyleSheet.create({content:{padding:e.space.md,gap:e.space.sm},header:{gap:e.space.sm,marginBottom:e.space.xs},filters:{gap:e.space.xs},error:{gap:e.space.xs,alignItems:"flex-start"},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl},footer:{paddingVertical:e.space.md,alignItems:"center"},card:{gap:e.space.xxs},cardTop:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},cardBottom:{flexDirection:"row",justifyContent:"space-between",marginTop:e.space.xxs}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportIssueButton=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_captureAndReport=require("./captureAndReport.js"),_jsxRuntime=require("react/jsx-runtime");const ReportIssueButton=({onReport:e,onCaptureError:t,captureScreenshot:s=!1,screenName:r,appVersion:i,category:a,subject:o,title:n="Report an issue",accessibilityLabel:u="Report an issue with this screen",testID:c="support-report-issue",...p})=>{const l=(0,_mobileUi.useTheme)(),[d,b]=(0,_react.useState)(!1),draftWithoutScreenshot=()=>({category:a,subject:o,pageUrl:r,appVersion:i}),_=(0,_jsxRuntime.jsx)(_mobileUi.Button,{leftIcon:"message-question",...p,title:n,accessibilityLabel:u,testID:c,disabled:p.disabled||d,onPress:()=>e(draftWithoutScreenshot())});return s?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{gap:l.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportIssueButton=void 0;var _mobileUi=require("@webority/mobile-ui"),_react=require("react"),_reactNative=require("react-native"),_captureAndReport=require("./captureAndReport.js"),_jsxRuntime=require("react/jsx-runtime");const ReportIssueButton=({onReport:e,onCaptureError:t,captureScreenshot:s=!1,screenName:r,appVersion:i,category:a,subject:o,title:n="Report an issue",accessibilityLabel:u="Report an issue with this screen",testID:c="support-report-issue",...p})=>{const l=(0,_mobileUi.useTheme)(),[d,b]=(0,_react.useState)(!1),draftWithoutScreenshot=()=>({category:a,subject:o,pageUrl:r,appVersion:i}),_=(0,_jsxRuntime.jsx)(_mobileUi.Button,{leftIcon:"message-question",...p,title:n,accessibilityLabel:u,testID:c,disabled:p.disabled||d,onPress:()=>e(draftWithoutScreenshot())});return s?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{gap:l.space.sm},children:[_,(0,_jsxRuntime.jsx)(_mobileUi.Button,{variant:"outline",title:"Add a screenshot",accessibilityLabel:"Add a screenshot",testID:`${c}-screenshot`,loading:d,disabled:p.disabled,onPress:()=>{(async()=>{b(!0);try{e(await(0,_captureAndReport.captureAndReport)({screenName:r,appVersion:i,category:a,subject:o}))}catch(s){t?.(s),e(draftWithoutScreenshot())}finally{b(!1)}})()}})]}):_};exports.ReportIssueButton=ReportIssueButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{AppIcon,IconButton,Spinner,Text,ToastHost,toast,useTheme,ZoomableImage}from"@webority/mobile-ui";import{useEffect,useMemo,useState}from"react";import{Image,Modal,Pressable,StyleSheet,View}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{formatBytes,isImage}from"../format.js";import{useAttachmentLoader,useAttachmentOpener}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AttachmentThumb=({attachment:e,onOpen:t})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),a=useAttachmentLoader(),[o,r]=useState({status:"loading"});return useEffect(()=>{let t=!1;return a(e).then(e=>!t&&r({status:"ready",uri:e}),()=>!t&&r({status:"error"})),()=>{t=!0}},[a,e]),"loading"===o.status?_jsx(View,{style:i.thumb,testID:`support-attachment-${e.id}`,children:_jsx(Spinner,{size:"sm",accessibilityLabel:`Loading ${e.fileName}`})}):"error"===o.status?_jsx(View,{style:i.thumb,accessible:!0,accessibilityLabel:`${e.fileName} could not be loaded`,testID:`support-attachment-${e.id}`,children:_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:"Could not load"})}):_jsx(Pressable,{onPress:()=>t(o.uri,e.fileName),accessibilityRole:"imagebutton",accessibilityLabel:`Open ${e.fileName}`,testID:`support-attachment-${e.id}`,children:_jsx(Image,{source:{uri:o.uri},style:i.thumb,resizeMode:"cover"})})},FileRow=({attachment:e})=>{const t=useTheme(),s=useMemo(()=>buildStyles(t),[t]),i=useAttachmentOpener(),[a,o]=useState(!1),r=`${e.fileName}, ${formatBytes(e.sizeBytes)}`;if(!i)return _jsx(Text,{variant:"caption",color:"secondary",testID:`support-file-${e.id}`,children:r});return _jsxs(Pressable,{onPress:()=>{(async()=>{o(!0);try{await i(e)}catch{toast.error(`Could not open ${e.fileName}. Try again.`)}finally{o(!1)}})()},disabled:a,accessibilityRole:"button",accessibilityLabel:`Open ${e.fileName}`,accessibilityState:{busy:a,disabled:a},"aria-busy":a,"aria-disabled":a,style:s.fileRow,testID:`support-file-${e.id}`,children:[_jsx(AppIcon,{name:"document",size:16,color:t.colors.
|
|
1
|
+
"use strict";import{AppIcon,IconButton,Spinner,Text,ToastHost,toast,useTheme,ZoomableImage}from"@webority/mobile-ui";import{useEffect,useMemo,useState}from"react";import{Image,Modal,Pressable,StyleSheet,View}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{formatBytes,isImage}from"../format.js";import{useAttachmentLoader,useAttachmentOpener}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AttachmentThumb=({attachment:e,onOpen:t})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),a=useAttachmentLoader(),[o,r]=useState({status:"loading"});return useEffect(()=>{let t=!1;return a(e).then(e=>!t&&r({status:"ready",uri:e}),()=>!t&&r({status:"error"})),()=>{t=!0}},[a,e]),"loading"===o.status?_jsx(View,{style:i.thumb,testID:`support-attachment-${e.id}`,children:_jsx(Spinner,{size:"sm",accessibilityLabel:`Loading ${e.fileName}`})}):"error"===o.status?_jsx(View,{style:i.thumb,accessible:!0,accessibilityLabel:`${e.fileName} could not be loaded`,testID:`support-attachment-${e.id}`,children:_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:"Could not load"})}):_jsx(Pressable,{onPress:()=>t(o.uri,e.fileName),accessibilityRole:"imagebutton",accessibilityLabel:`Open ${e.fileName}`,testID:`support-attachment-${e.id}`,children:_jsx(Image,{source:{uri:o.uri},style:i.thumb,resizeMode:"cover"})})},FileRow=({attachment:e})=>{const t=useTheme(),s=useMemo(()=>buildStyles(t),[t]),i=useAttachmentOpener(),[a,o]=useState(!1),r=`${e.fileName}, ${formatBytes(e.sizeBytes)}`;if(!i)return _jsx(Text,{variant:"caption",color:"secondary",testID:`support-file-${e.id}`,children:r});return _jsxs(Pressable,{onPress:()=>{(async()=>{o(!0);try{await i(e)}catch{toast.error(`Could not open ${e.fileName}. Try again.`)}finally{o(!1)}})()},disabled:a,accessibilityRole:"button",accessibilityLabel:`Open ${e.fileName}`,accessibilityState:{busy:a,disabled:a},"aria-busy":a,"aria-disabled":a,style:s.fileRow,testID:`support-file-${e.id}`,children:[_jsx(AppIcon,{name:"document",size:16,color:t.colors.link}),_jsx(Text,{variant:"caption",color:"link",children:r}),a&&_jsx(Spinner,{size:"sm",accessibilityLabel:`Opening ${e.fileName}`})]})};export const AttachmentList=({attachments:e,onOpenImage:t})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]);if(0===e.length)return null;const a=e.filter(e=>isImage(e.contentType)),o=e.filter(e=>!isImage(e.contentType));return _jsxs(View,{style:i.list,children:[a.length>0&&_jsx(View,{style:i.thumbRow,children:a.map(e=>_jsx(AttachmentThumb,{attachment:e,onOpen:t},e.id))}),o.map(e=>_jsx(FileRow,{attachment:e},e.id))]})};export const ImageViewer=({image:e,onClose:t})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]);return _jsx(Modal,{visible:null!==e,onRequestClose:t,animationType:"fade",transparent:!1,children:_jsxs(GestureHandlerRootView,{style:i.viewer,testID:"support-image-viewer",children:[e&&_jsx(ZoomableImage,{accessibilityLabel:e.name,style:i.viewerImageWrap,children:_jsx(Image,{source:{uri:e.uri},style:i.viewerImage,resizeMode:"contain"})}),_jsx(View,{style:i.viewerClose,children:_jsx(IconButton,{icon:({size:e})=>_jsx(AppIcon,{name:"close-circle",color:s.colors["on-scrim"],size:e}),accessibilityLabel:"Close image",onPress:t,variant:"glass",style:i.viewerCloseButton})}),_jsx(ToastHost,{})]})})};const THUMB=84,buildStyles=e=>StyleSheet.create({list:{gap:e.space.xs,marginTop:e.space.sm},fileRow:{flexDirection:"row",alignItems:"center",gap:e.space.xxs,alignSelf:"flex-start"},thumbRow:{flexDirection:"row",flexWrap:"wrap",gap:e.space.xs},thumb:{width:84,height:84,borderRadius:e.radius.sm,backgroundColor:e.colors["bg-subtle"],alignItems:"center",justifyContent:"center",overflow:"hidden"},viewer:{flex:1,backgroundColor:e.colors["surface-inverse"]},viewerImageWrap:{flex:1},viewerImage:{flex:1,width:"100%"},viewerClose:{position:"absolute",top:e.space["2xl"],right:e.space.md},viewerCloseButton:{backgroundColor:e.colors.scrim,borderColor:e.colors["on-scrim"]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Button,Input,KeyboardAwareScrollView,Select,Spinner,Text,useForm,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{toSupportApiError}from"../client.js";import{describeDevice}from"../device.js";import{useCreateSupportTicket,useSupportConfig}from"../SupportProvider.js";import{validateBody,validateCategory,validateFiles,validateSubject}from"../validation.js";import{PhotoTray}from"./PhotoTray.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const TicketForm=({config:e,styles:t,onCreated:
|
|
1
|
+
"use strict";import{Button,Input,KeyboardAwareScrollView,Select,Spinner,Text,useForm,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{toSupportApiError}from"../client.js";import{describeDevice}from"../device.js";import{useCreateSupportTicket,useSupportConfig}from"../SupportProvider.js";import{validateBody,validateCategory,validateFiles,validateSubject}from"../validation.js";import{PhotoTray}from"./PhotoTray.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const TicketForm=({config:e,styles:t,onCreated:o,onCancel:r,initialDraft:a,defaultCategory:s,appVersion:i})=>{const n=useCreateSupportTicket(),listed=t=>t&&e.categories.includes(t)?t:void 0,[l,c]=useState([]),[u,d]=useState(a?.screenshots??[]),[p,g]=useState(null),[m,y]=useState(null),h=useForm({initialValues:{category:listed(a?.category)??listed(s)??"",subject:a?.subject??"",body:a?.body??""},validate:{category:t=>validateCategory(t,e),subject:t=>validateSubject(t,e),body:t=>validateBody(t,e)},onSubmit:async t=>{const r=validateFiles([...u,...l],e);if(g(r??null),!r){y(null);try{const e=await n({category:t.category,subject:t.subject.trim(),body:t.body.trim(),pageUrl:a?.pageUrl,userAgent:a?.userAgent??describeDevice(),appVersion:a?.appVersion??i,files:l,screenshots:u});o(e)}catch(e){y(toSupportApiError(e).message)}}}}),b=h.getFieldProps("category"),x=h.getFieldProps("subject"),j=h.getFieldProps("body"),S=u.length+l.length;return _jsxs(KeyboardAwareScrollView,{contentContainerStyle:t.content,safeAreaEdges:[],children:[_jsx(Text,{variant:"bodySmall",color:"secondary",children:"Tell us what you need. We reply by email and in this ticket."}),_jsx(Select,{label:"Category",placeholder:"Choose a category",options:e.categories.map(e=>({label:e,value:e})),value:b.value||void 0,onChange:e=>b.setValue(String(e),!0),error:b.error,testID:"support-new-category"}),_jsx(Input,{label:"Subject",placeholder:"A short summary",required:!0,maxLength:e.subjectMaxLength,value:x.value,onChangeText:x.onChangeText,onBlur:x.onBlur,error:x.error,testID:"support-new-subject"}),_jsx(Input,{label:"Message",placeholder:"What happened, and what did you expect?",required:!0,multiline:!0,maxLength:e.bodyMaxLength,value:j.value,onChangeText:j.onChangeText,onBlur:j.onBlur,error:j.error,testID:"support-new-body"}),u.length>0&&_jsx(PhotoTray,{label:"Screenshot",photos:u,onChange:d,remaining:0,allowAdd:!1,maxBytes:e.maxAttachmentBytes,disabled:h.isSubmitting}),_jsx(PhotoTray,{label:"Photos",photos:l,onChange:c,remaining:e.maxAttachmentsPerMessage-S,maxBytes:e.maxAttachmentBytes,disabled:h.isSubmitting}),_jsx(Text,{variant:"caption",color:"tertiary",children:`Attach up to ${e.maxAttachmentsPerMessage} files.`}),(p||m)&&_jsx(Text,{variant:"bodySmall",color:"danger",accessibilityLiveRegion:"polite",children:p??m}),_jsxs(View,{style:t.actions,children:[r&&_jsx(Button,{title:"Cancel",variant:"ghost",tone:"neutral",onPress:r,disabled:h.isSubmitting}),_jsx(Button,{title:"Send ticket",loading:h.isSubmitting,disabled:h.isSubmitting,onPress:h.submit,testID:"support-new-submit"})]})]})};export const NewSupportTicket=e=>{const t=useTheme(),o=useMemo(()=>buildStyles(t),[t]),{config:r,loading:a,error:s,reload:i}=useSupportConfig(),n=e.testID??"support-new-ticket";return _jsx(View,r?{style:o.root,testID:n,children:_jsx(TicketForm,{...e,config:r,styles:o})}:{style:o.center,testID:n,children:a?_jsx(Spinner,{accessibilityLabel:"Loading"}):_jsxs(_Fragment,{children:[_jsx(Text,{variant:"body",color:"danger",align:"center",children:s?.message??"Support is not available right now."}),_jsx(Button,{title:"Try again",variant:"ghost",onPress:()=>{i()}})]})})};const buildStyles=e=>StyleSheet.create({root:{flex:1},content:{padding:e.space.md,gap:e.space.md},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl,gap:e.space.sm},actions:{flexDirection:"row",justifyContent:"flex-end",gap:e.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{AppIcon,Button,IconButton,Text,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{Image,StyleSheet,View}from"react-native";import{pickPhotos}from"../photos.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const PhotoTray=({photos:e,onChange:o,remaining:t,maxBytes:
|
|
1
|
+
"use strict";import{AppIcon,Button,IconButton,Text,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{Image,StyleSheet,View}from"react-native";import{pickPhotos}from"../photos.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const PhotoTray=({photos:e,onChange:o,remaining:t,maxBytes:s,disabled:r,label:i,allowAdd:a=!0})=>{const l=useTheme(),n=useMemo(()=>buildStyles(l),[l]),[c,m]=useState(null),[u,d]=useState(null),add=async r=>{d(null),m(r);try{const i=await pickPhotos(r,{maxCount:t,maxBytes:s});i.length>0&&o([...e,...i])}catch(e){d(e instanceof Error&&"PhotoPermissionError"===e.name?e.message:"That photo could not be added. Try another one.")}finally{m(null)}},h=t<=0;return _jsxs(View,{style:n.root,children:[i?_jsx(Text,{variant:"label",color:"secondary",children:i}):null,e.length>0&&_jsx(View,{style:n.row,children:e.map((t,s)=>_jsxs(View,{style:n.item,children:[_jsx(Image,{source:{uri:t.uri},style:n.thumb,accessibilityLabel:t.name}),_jsx(View,{style:n.remove,children:_jsx(IconButton,{size:"sm",variant:"glass",style:n.removeButton,icon:({color:e})=>_jsx(AppIcon,{name:"trash",color:r?e:l.colors["on-scrim"],size:REMOVE_ICON}),accessibilityLabel:`Remove ${t.name}`,disabled:r,onPress:()=>o(e.filter((e,o)=>o!==s))})})]},`${t.uri}-${s}`))}),a&&_jsxs(View,{style:n.actions,children:[_jsx(Button,{size:"sm",variant:"outline",tone:"neutral",leftIcon:"gallery",title:"Add photo",accessibilityLabel:"Add a photo from your library",loading:"library"===c,disabled:r||h||null!==c,onPress:()=>{add("library")}}),_jsx(Button,{size:"sm",variant:"outline",tone:"neutral",leftIcon:"camera",title:"Take photo",accessibilityLabel:"Take a photo with your camera",loading:"camera"===c,disabled:r||h||null!==c,onPress:()=>{add("camera")}})]}),u?_jsx(Text,{variant:"caption",color:"danger",accessibilityLiveRegion:"polite",children:u}):null]})};const THUMB=72,REMOVE_SIZE=24,REMOVE_ICON=14,buildStyles=e=>StyleSheet.create({root:{gap:e.space.xs},row:{flexDirection:"row",flexWrap:"wrap",gap:e.space.xs},item:{width:72,height:72},thumb:{width:72,height:72,borderRadius:e.radius.sm,backgroundColor:e.colors["bg-subtle"]},remove:{position:"absolute",top:e.space.xxs,right:e.space.xxs},removeButton:{width:24,height:24,borderRadius:12,backgroundColor:e.colors.scrim,borderColor:e.colors["on-scrim"]},actions:{flexDirection:"row",gap:e.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Button,Card,Spinner,Text,toast,useTheme}from"@webority/mobile-ui";import{useMemo}from"react";import{Linking,Platform,StyleSheet,View}from"react-native";import{copyText}from"../clipboard.js";import{useSupportConfig}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const COPY_TOAST_KEY="support-contact-copy";export const SupportContact=({testID:t="support-contact"})=>{const e=useTheme(),o=useMemo(()=>buildStyles(e),[e]),{config:s,loading:a,error:i}=useSupportConfig();if(!s)return _jsx(Card,{variant:"outlined",testID:t,children:a?_jsx(Spinner,{size:"sm",accessibilityLabel:"Loading contact details"}):_jsx(Text,{variant:"bodySmall",color:"
|
|
1
|
+
"use strict";import{Button,Card,Spinner,Text,toast,useTheme}from"@webority/mobile-ui";import{useMemo}from"react";import{Linking,Platform,StyleSheet,View}from"react-native";import{copyText}from"../clipboard.js";import{useSupportConfig}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const COPY_TOAST_KEY="support-contact-copy";export const SupportContact=({testID:t="support-contact"})=>{const e=useTheme(),o=useMemo(()=>buildStyles(e),[e]),{config:s,loading:a,error:i}=useSupportConfig();if(!s)return _jsx(Card,{variant:"outlined",testID:t,children:a?_jsx(Spinner,{size:"sm",accessibilityLabel:"Loading contact details"}):_jsx(Text,{variant:"bodySmall",color:"danger",children:i?.message??"Contact details are not available right now."})});const r=s.supportEmail,l=s.supportPhone?.trim(),n=s.supportHours?.trim(),open=(t,e)=>{Linking.openURL(t).catch(()=>toast.error(e))};return _jsxs(Card,{variant:"outlined",bodyStyle:o.body,testID:t,children:[_jsx(Text,{variant:"title",accessibilityRole:"header",children:`Contact ${s.supportName||s.productName}`}),_jsxs(View,{style:o.row,children:[_jsx(Text,{variant:"label",color:"secondary",children:"Email"}),_jsx(Text,{variant:"body",selectable:!0,testID:"support-contact-email",children:r||"-"})]}),r?_jsxs(View,{style:o.actions,children:[_jsx(Button,{title:"Copy",size:"sm",variant:"outline",tone:"neutral",leftIcon:"copy",accessibilityLabel:`Copy ${r}`,onPress:()=>{(async()=>{try{await copyText(r),"android"===Platform.OS&&Number(Platform.Version)>=33||toast.success("Email address copied.",{key:COPY_TOAST_KEY})}catch{toast.error("Could not copy the email address.",{key:COPY_TOAST_KEY})}})()},testID:"support-contact-copy"}),_jsx(Button,{title:"Send email",size:"sm",variant:"outline",leftIcon:"mail",accessibilityLabel:`Send an email to ${r}`,onPress:()=>open(`mailto:${r}`,"No email app is set up on this device."),testID:"support-contact-mail"})]}):null,l?_jsxs(View,{style:o.row,children:[_jsx(Text,{variant:"label",color:"secondary",children:"Phone"}),_jsx(Button,{title:l,size:"sm",variant:"link",leftIcon:"call",accessibilityLabel:`Call ${l}`,onPress:()=>open(`tel:${l.replace(/[^\d+]/g,"")}`,"This device cannot make calls."),testID:"support-contact-phone"})]}):null,n?_jsxs(View,{style:o.row,children:[_jsx(Text,{variant:"label",color:"secondary",children:"Hours"}),_jsx(Text,{variant:"bodySmall",children:n})]}):null]})};const buildStyles=t=>StyleSheet.create({body:{gap:t.space.sm},row:{gap:t.space.xxs,alignItems:"flex-start"},actions:{flexDirection:"row",gap:t.space.sm}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{formatDateTime}from"@webority/mobile-core";import{Button,Card,Input,KeyboardAwareScrollView,Spinner,StatusBadge,Text,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{useSupportConfig,useSupportTicket,useSupportTimeZone}from"../SupportProvider.js";import{validateBody,validateFiles}from"../validation.js";import{AttachmentList,ImageViewer}from"./Attachments.js";import{PhotoTray}from"./PhotoTray.js";import{STATUS_TONES}from"./SupportTicketList.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const MessageBubble=({message:e,styles:t,timeZone:s,onOpenImage:i})=>{if("System"===e.authorKind)return _jsx(View,{style:t.system,testID:`support-message-${e.id}`,children:_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:`${e.body}, ${formatDateTime(e.createdDateTimeUtc,{zone:s})}`})});const a="Customer"===e.authorKind;return _jsx(View,{style:[t.bubbleRow,a?t.mineRow:t.theirsRow],testID:`support-message-${e.id}`,children:_jsxs(View,{style:[t.bubble,a?t.mine:t.theirs],children:[_jsx(Text,{variant:"label",color:a?"primary":"secondary",children:e.authorName??(a?"You":"Support team")}),_jsx(Text,{variant:"body",selectable:!0,children:e.body}),_jsx(AttachmentList,{attachments:e.attachments,onOpenImage:i}),_jsx(Text,{variant:"caption",color:"tertiary",children:formatDateTime(e.createdDateTimeUtc,{zone:s})})]})})},SATISFACTION_TEXT={Satisfied:"You told us this solved your problem.",Unsatisfied:"You told us this did not solve your problem."};export const SupportTicketDetail=({ticketId:e,testID:t="support-ticket-detail"})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),{config:a}=useSupportConfig(),o=useSupportTimeZone(),{ticket:n,loading:r,error:l,actionError:c,busy:d,reload:m,reply:p,reopen:u,rate:
|
|
1
|
+
"use strict";import{formatDateTime}from"@webority/mobile-core";import{Button,Card,Input,KeyboardAwareScrollView,Spinner,StatusBadge,Text,useTheme}from"@webority/mobile-ui";import{useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{useSupportConfig,useSupportTicket,useSupportTimeZone}from"../SupportProvider.js";import{validateBody,validateFiles}from"../validation.js";import{AttachmentList,ImageViewer}from"./Attachments.js";import{PhotoTray}from"./PhotoTray.js";import{STATUS_TONES}from"./SupportTicketList.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const MessageBubble=({message:e,styles:t,timeZone:s,onOpenImage:i})=>{if("System"===e.authorKind)return _jsx(View,{style:t.system,testID:`support-message-${e.id}`,children:_jsx(Text,{variant:"caption",color:"tertiary",align:"center",children:`${e.body}, ${formatDateTime(e.createdDateTimeUtc,{zone:s})}`})});const a="Customer"===e.authorKind;return _jsx(View,{style:[t.bubbleRow,a?t.mineRow:t.theirsRow],testID:`support-message-${e.id}`,children:_jsxs(View,{style:[t.bubble,a?t.mine:t.theirs],children:[_jsx(Text,{variant:"label",color:a?"primary":"secondary",children:e.authorName??(a?"You":"Support team")}),_jsx(Text,{variant:"body",selectable:!0,children:e.body}),_jsx(AttachmentList,{attachments:e.attachments,onOpenImage:i}),_jsx(Text,{variant:"caption",color:"tertiary",children:formatDateTime(e.createdDateTimeUtc,{zone:s})})]})})},SATISFACTION_TEXT={Satisfied:"You told us this solved your problem.",Unsatisfied:"You told us this did not solve your problem."};export const SupportTicketDetail=({ticketId:e,testID:t="support-ticket-detail"})=>{const s=useTheme(),i=useMemo(()=>buildStyles(s),[s]),{config:a}=useSupportConfig(),o=useSupportTimeZone(),{ticket:n,loading:r,error:l,actionError:c,busy:d,reload:m,reply:p,reopen:u,rate:x}=useSupportTicket(e),[y,h]=useState(null),[g,b]=useState(""),[S,j]=useState([]),[f,T]=useState(null),[_,v]=useState(null),[w,I]=useState("");if(!n)return _jsx(View,{style:i.center,testID:t,children:r?_jsx(Spinner,{accessibilityLabel:"Loading the ticket"}):_jsxs(_Fragment,{children:[_jsx(Text,{variant:"body",color:"danger",align:"center",children:l?.message??"That ticket could not be found."}),_jsx(Button,{title:"Try again",variant:"ghost",onPress:()=>{m()}})]})});const D=n.messages.filter(e=>!e.isInternal);return _jsxs(View,{style:i.root,testID:t,children:[_jsxs(KeyboardAwareScrollView,{contentContainerStyle:i.content,safeAreaEdges:[],children:[_jsxs(View,{style:i.head,children:[_jsx(Text,{variant:"h3",accessibilityRole:"header",children:n.subject}),_jsx(Text,{variant:"bodySmall",color:"secondary",children:`${n.number}, ${n.category}`}),_jsxs(View,{style:i.headRow,children:[_jsx(StatusBadge,{label:n.statusLabel,tone:STATUS_TONES[n.status]??"neutral",accessibilityLabel:`Status: ${n.statusLabel}`}),_jsx(Text,{variant:"caption",color:"tertiary",children:`Opened ${formatDateTime(n.createdDateTimeUtc,{zone:o})}`})]})]}),"WaitingOnCustomer"===n.status&&_jsx(Card,{variant:"outlined",bodyStyle:i.section,testID:"support-waiting",children:_jsx(Text,{variant:"bodySmall",children:"We need your answer to carry on. Reply below and the ticket goes back to our team."})}),n.canReopen&&_jsxs(Card,{variant:"outlined",bodyStyle:i.section,children:[_jsx(Text,{variant:"bodySmall",children:`This ticket is ${n.statusLabel}. Reopen it if you still need help.`}),_jsx(Button,{title:"Reopen ticket",variant:"outline",size:"sm",loading:d,disabled:d,onPress:()=>{u()},testID:"support-reopen"})]}),n.satisfaction?_jsxs(Card,{variant:"outlined",bodyStyle:i.section,testID:"support-rating",children:[_jsx(Text,{variant:"bodySmall",accessibilityLiveRegion:"polite",children:SATISFACTION_TEXT[n.satisfaction]}),n.satisfactionComment?_jsx(Text,{variant:"bodySmall",color:"secondary",children:`Your comment: ${n.satisfactionComment}`}):null]}):n.canRate?_jsxs(Card,{variant:"outlined",bodyStyle:i.section,testID:"support-rating",children:[_jsx(Text,{variant:"label",children:"Did this solve your problem?"}),_jsxs(View,{style:i.ratingRow,children:[_jsx(Button,{title:"Yes, it is solved",size:"sm",leftIcon:"like",variant:"Satisfied"===_?"solid":"outline",tone:"success",accessibilityState:{selected:"Satisfied"===_},"aria-selected":"Satisfied"===_,onPress:()=>v("Satisfied"),testID:"support-rate-satisfied"}),_jsx(Button,{title:"No, it is not",size:"sm",leftIcon:"dislike",variant:"Unsatisfied"===_?"solid":"outline",tone:"danger",accessibilityState:{selected:"Unsatisfied"===_},"aria-selected":"Unsatisfied"===_,onPress:()=>v("Unsatisfied"),testID:"support-rate-unsatisfied"})]}),_&&_jsxs(_Fragment,{children:[_jsx(Input,{label:"Anything to add? (optional)",helperText:"Your comment goes to the support team.",value:w,onChangeText:I,multiline:!0,maxLength:a?.satisfactionCommentMaxLength,testID:"support-rating-comment"}),_jsx(Button,{title:"Send answer",size:"sm",loading:d,disabled:d,onPress:()=>{(async()=>{_&&await x({satisfaction:_,comment:w})&&(v(null),I(""))})()},testID:"support-rating-send"})]})]}):null,_jsx(View,{style:i.thread,accessibilityLabel:"Conversation",children:D.map(e=>_jsx(MessageBubble,{message:e,styles:i,timeZone:o,onOpenImage:(e,t)=>h({uri:e,name:t})},e.id))}),_jsxs(View,{style:i.section,children:[_jsx(Input,{label:"Your reply",placeholder:"Write a reply to the support team",value:g,onChangeText:b,multiline:!0,maxLength:a?.bodyMaxLength,error:f??void 0,testID:"support-reply-input"}),a&&_jsx(PhotoTray,{photos:S,onChange:j,remaining:a.maxAttachmentsPerMessage-S.length,maxBytes:a.maxAttachmentBytes,disabled:d}),n.canReopen&&_jsx(Text,{variant:"caption",color:"secondary",children:"Replying reopens this ticket."}),c&&_jsx(Text,{variant:"bodySmall",color:"danger",accessibilityLiveRegion:"polite",children:c.message}),_jsx(Button,{title:"Send reply",leftIcon:"send",loading:d,disabled:d,onPress:()=>{(async()=>{const e=g.trim(),t=a?validateBody(e,a)??validateFiles(S,a):e?void 0:"Write a message.";t?T(t):(T(null),await p({body:e,files:S})&&(b(""),j([])))})()},testID:"support-reply-send"})]})]}),_jsx(ImageViewer,{image:y,onClose:()=>h(null)})]})};const buildStyles=e=>StyleSheet.create({root:{flex:1},content:{padding:e.space.md,gap:e.space.md},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl,gap:e.space.sm},head:{gap:e.space.xxs},headRow:{flexDirection:"row",alignItems:"center",gap:e.space.sm,marginTop:e.space.xs},section:{gap:e.space.sm},ratingRow:{flexDirection:"row",flexWrap:"wrap",gap:e.space.sm},thread:{gap:e.space.sm},system:{paddingHorizontal:e.space.lg,paddingVertical:e.space.xxs},bubbleRow:{flexDirection:"row"},mineRow:{justifyContent:"flex-end"},theirsRow:{justifyContent:"flex-start"},bubble:{maxWidth:"85%",borderRadius:e.radius.lg,padding:e.space.sm,gap:e.space.xxs},mine:{backgroundColor:e.colors["primary-soft"]},theirs:{backgroundColor:e.colors["bg-subtle"]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{formatDateTime}from"@webority/mobile-core";import{Button,Card,Chip,EmptyState,SearchBar,Spinner,StatusBadge,Text,useTheme}from"@webority/mobile-ui";import{memo,useCallback,useMemo}from"react";import{FlatList,RefreshControl,ScrollView,StyleSheet,View}from"react-native";import{useSupportTickets,useSupportTimeZone}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";export const STATUS_TONES={Open:"warning",InProgress:"info",WaitingOnCustomer:"warning",Resolved:"success",Closed:"neutral"};const STATUS_FILTERS=[{value:"Open",label:"Open",count:"open"},{value:"InProgress",label:"In progress",count:"inProgress"},{value:"WaitingOnCustomer",label:"Waiting on you",count:"waitingOnCustomer"},{value:"Resolved",label:"Resolved",count:"resolved"},{value:"Closed",label:"Closed",count:"closed"}],ALL="all";export const statusFilterOptions=(e,t)=>[{value:ALL,label:"All",count:e.total},...STATUS_FILTERS.filter(s=>e[s.count]>0||s.value===t).map(t=>({value:t.value,label:t.label,count:e[t.count]}))];const SEARCH_DEBOUNCE_MS=400,ticketKey=e=>e.id,TicketRow=memo(function TicketRow({item:e,timeZone:t,onOpen:s,styles:i}){return _jsxs(Card,{onPress:()=>s(e),accessibilityLabel:`${e.subject}, ${e.statusLabel}, ticket ${e.number}`,bodyStyle:i.card,testID:`support-ticket-${e.id}`,children:[_jsxs(View,{style:i.cardTop,children:[_jsx(Text,{variant:"caption",color:"tertiary",children:e.number}),_jsx(StatusBadge,{label:e.statusLabel,tone:STATUS_TONES[e.status]??"neutral",size:"sm"})]}),_jsx(Text,{variant:"title",numberOfLines:2,children:e.subject}),_jsx(Text,{variant:"bodySmall",color:"secondary",children:e.category}),_jsxs(View,{style:i.cardBottom,children:[_jsx(Text,{variant:"caption",color:"tertiary",children:`Updated ${formatDateTime(e.updatedDateTimeUtc,{zone:t})}`}),e.awaitingCustomer&&_jsx(Text,{variant:"caption",color:"warning",children:"Waiting for your reply"})]})]})});export const SupportTicketList=({onOpenTicket:e,onNewTicket:t,header:s,pageSize:i,testID:r="support-ticket-list"})=>{const o=useTheme(),a=useMemo(()=>buildStyles(o),[o]),{tickets:n,counts:l,status:c,search:u,setStatus:d,setSearch:p,loading:m,refreshing:x,loadingMore:
|
|
1
|
+
"use strict";import{formatDateTime}from"@webority/mobile-core";import{Button,Card,Chip,EmptyState,SearchBar,Spinner,StatusBadge,Text,useTheme}from"@webority/mobile-ui";import{memo,useCallback,useMemo}from"react";import{FlatList,RefreshControl,ScrollView,StyleSheet,View}from"react-native";import{useSupportTickets,useSupportTimeZone}from"../SupportProvider.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";export const STATUS_TONES={Open:"warning",InProgress:"info",WaitingOnCustomer:"warning",Resolved:"success",Closed:"neutral"};const STATUS_FILTERS=[{value:"Open",label:"Open",count:"open"},{value:"InProgress",label:"In progress",count:"inProgress"},{value:"WaitingOnCustomer",label:"Waiting on you",count:"waitingOnCustomer"},{value:"Resolved",label:"Resolved",count:"resolved"},{value:"Closed",label:"Closed",count:"closed"}],ALL="all";export const statusFilterOptions=(e,t)=>[{value:ALL,label:"All",count:e.total},...STATUS_FILTERS.filter(s=>e[s.count]>0||s.value===t).map(t=>({value:t.value,label:t.label,count:e[t.count]}))];const SEARCH_DEBOUNCE_MS=400,ticketKey=e=>e.id,TicketRow=memo(function TicketRow({item:e,timeZone:t,onOpen:s,styles:i}){return _jsxs(Card,{onPress:()=>s(e),accessibilityLabel:`${e.subject}, ${e.statusLabel}, ticket ${e.number}`,bodyStyle:i.card,testID:`support-ticket-${e.id}`,children:[_jsxs(View,{style:i.cardTop,children:[_jsx(Text,{variant:"caption",color:"tertiary",children:e.number}),_jsx(StatusBadge,{label:e.statusLabel,tone:STATUS_TONES[e.status]??"neutral",size:"sm"})]}),_jsx(Text,{variant:"title",numberOfLines:2,children:e.subject}),_jsx(Text,{variant:"bodySmall",color:"secondary",children:e.category}),_jsxs(View,{style:i.cardBottom,children:[_jsx(Text,{variant:"caption",color:"tertiary",children:`Updated ${formatDateTime(e.updatedDateTimeUtc,{zone:t})}`}),e.awaitingCustomer&&_jsx(Text,{variant:"caption",color:"warning",children:"Waiting for your reply"})]})]})});export const SupportTicketList=({onOpenTicket:e,onNewTicket:t,header:s,pageSize:i,testID:r="support-ticket-list"})=>{const o=useTheme(),a=useMemo(()=>buildStyles(o),[o]),{tickets:n,counts:l,status:c,search:u,setStatus:d,setSearch:p,loading:m,refreshing:x,loadingMore:b,error:h,loadMoreError:y,refresh:g,loadMore:S}=useSupportTickets({pageSize:i}),j=useSupportTimeZone(),T=useCallback(({item:t})=>_jsx(TicketRow,{item:t,timeZone:j,onOpen:e,styles:a}),[j,e,a]),_=useCallback(()=>{S()},[S]),f=useCallback(()=>{g()},[g]),v=useMemo(()=>_jsx(RefreshControl,{refreshing:x,onRefresh:f}),[x,f]),w=(l?.total??0)>0,L=null!==c||""!==u.trim(),k=_jsxs(View,{style:a.header,children:[s,t&&_jsx(Button,{title:"New ticket",leftIcon:"add",onPress:t,fullWidth:!0}),h&&_jsxs(View,{style:a.error,accessibilityLiveRegion:"polite",children:[_jsx(Text,{variant:"bodySmall",color:"danger",children:h.message}),_jsx(Button,{title:"Try again",size:"sm",variant:"ghost",onPress:()=>{g()}})]}),l&&w&&_jsxs(_Fragment,{children:[_jsx(SearchBar,{value:u,onChangeText:p,debounceMs:400,placeholder:"Search by subject or ticket number",accessibilityLabel:"Search tickets",testID:"support-ticket-search"}),_jsx(ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:a.filters,accessibilityRole:"tablist",accessibilityLabel:"Filter by status",children:statusFilterOptions(l,c).map(e=>_jsx(Chip,{label:`${e.label} (${e.count})`,selected:(c??ALL)===e.value,onPress:()=>d(e.value===ALL?null:e.value),accessibilityLabel:`${e.label}, ${e.count} tickets`,testID:`support-filter-${e.value}`},e.value))})]})]});if(m&&null===l&&!h)return _jsx(View,{style:a.center,testID:r,children:_jsx(Spinner,{accessibilityLabel:"Loading your tickets"})});const C=b?_jsx(View,{style:a.footer,children:_jsx(Spinner,{size:"sm",accessibilityLabel:"Loading more tickets"})}):y?_jsxs(View,{style:[a.footer,a.error],accessibilityLiveRegion:"polite",children:[_jsx(Text,{variant:"bodySmall",color:"danger",children:y.message}),_jsx(Button,{title:"Load more",size:"sm",variant:"ghost",onPress:()=>{S()}})]}):null;return _jsx(FlatList,{testID:r,data:n,keyExtractor:ticketKey,contentContainerStyle:a.content,ListHeaderComponent:k,ListFooterComponent:C,onEndReached:_,onEndReachedThreshold:.5,refreshControl:v,ListEmptyComponent:m?_jsx(View,{style:a.footer,children:_jsx(Spinner,{accessibilityLabel:"Loading your tickets"})}):h?null:_jsx(EmptyState,w?{title:"No tickets match",description:L?"Try another status or search.":void 0}:{title:"No tickets yet",description:"Raise a ticket and it will show here with its status.",action:t?{label:"New ticket",onPress:t}:void 0}),renderItem:T})};const buildStyles=e=>StyleSheet.create({content:{padding:e.space.md,gap:e.space.sm},header:{gap:e.space.sm,marginBottom:e.space.xs},filters:{gap:e.space.xs},error:{gap:e.space.xs,alignItems:"flex-start"},center:{flex:1,alignItems:"center",justifyContent:"center",padding:e.space.xl},footer:{paddingVertical:e.space.md,alignItems:"center"},card:{gap:e.space.xxs},cardTop:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},cardBottom:{flexDirection:"row",justifyContent:"space-between",marginTop:e.space.xxs}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Button,useTheme}from"@webority/mobile-ui";import{useState}from"react";import{View}from"react-native";import{captureAndReport}from"./captureAndReport.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const ReportIssueButton=({onReport:e,onCaptureError:t,captureScreenshot:s=!1,screenName:r,appVersion:a,category:o,subject:i,title:n="Report an issue",accessibilityLabel:c="Report an issue with this screen",testID:p="support-report-issue",...u})=>{const l=useTheme(),[m,d]=useState(!1),draftWithoutScreenshot=()=>({category:o,subject:i,pageUrl:r,appVersion:a}),b=_jsx(Button,{leftIcon:"message-question",...u,title:n,accessibilityLabel:c,testID:p,disabled:u.disabled||m,onPress:()=>e(draftWithoutScreenshot())});return s?_jsxs(View,{style:{gap:l.
|
|
1
|
+
"use strict";import{Button,useTheme}from"@webority/mobile-ui";import{useState}from"react";import{View}from"react-native";import{captureAndReport}from"./captureAndReport.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const ReportIssueButton=({onReport:e,onCaptureError:t,captureScreenshot:s=!1,screenName:r,appVersion:a,category:o,subject:i,title:n="Report an issue",accessibilityLabel:c="Report an issue with this screen",testID:p="support-report-issue",...u})=>{const l=useTheme(),[m,d]=useState(!1),draftWithoutScreenshot=()=>({category:o,subject:i,pageUrl:r,appVersion:a}),b=_jsx(Button,{leftIcon:"message-question",...u,title:n,accessibilityLabel:c,testID:p,disabled:u.disabled||m,onPress:()=>e(draftWithoutScreenshot())});return s?_jsxs(View,{style:{gap:l.space.sm},children:[b,_jsx(Button,{variant:"outline",title:"Add a screenshot",accessibilityLabel:"Add a screenshot",testID:`${p}-screenshot`,loading:m,disabled:u.disabled,onPress:()=>{(async()=>{d(!0);try{e(await captureAndReport({screenName:r,appVersion:a,category:o,subject:i}))}catch(s){t?.(s),e(draftWithoutScreenshot())}finally{d(!1)}})()}})]}):b};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-support",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "Customer support tickets for Webority React Native apps: the support API client, hooks, ticket screens, contact card and a report-an-issue button that attaches a screenshot.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"react-native": ">=0.81.0",
|
|
73
73
|
"react-native-gesture-handler": "^2.21.0 || ^3.0.0",
|
|
74
74
|
"react-native-view-shot": ">=4.0.0",
|
|
75
|
-
"@webority/mobile-
|
|
76
|
-
"@webority/mobile-
|
|
75
|
+
"@webority/mobile-ui": "0.89.0",
|
|
76
|
+
"@webority/mobile-core": "0.89.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
79
79
|
"expo-image-manipulator": {
|
|
@@ -135,9 +135,9 @@
|
|
|
135
135
|
"react-test-renderer": "19.2.8",
|
|
136
136
|
"rimraf": "6.1.3",
|
|
137
137
|
"typescript": "5.9.3",
|
|
138
|
+
"@webority/mobile-ui": "0.89.0",
|
|
138
139
|
"@webority/mobile-dev": "0.0.0",
|
|
139
|
-
"@webority/mobile-core": "0.
|
|
140
|
-
"@webority/mobile-ui": "0.88.0"
|
|
140
|
+
"@webority/mobile-core": "0.89.0"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"build": "bob build && node ../mobile-dev/scripts/minify-lib.mjs",
|