@corva/ui 0.35.0-17 → 0.35.0-18
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSvgIcon as e}from"@material-ui/core";import{jsx as
|
|
1
|
+
import{createSvgIcon as e}from"@material-ui/core";import{jsx as i}from"react/jsx-runtime";var r=e(i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.30952 3C3.31015 3 2.5 3.81015 2.5 4.80952V20.1905C2.5 21.1898 3.31015 22 4.30952 22H18.4464V22C18.4466 22 18.4467 22 18.4469 22C20.1333 22 21.5005 20.6328 21.5005 18.9464V12.5851C21.5005 12.0384 21.0573 11.5952 20.5106 11.5952H17.2024V4.80952C17.2024 3.81015 16.3922 3 15.3929 3H4.30952ZM13.867 8.93745H5.72414V10.747H13.867V8.93745ZM5.72414 12.5565H13.867V14.366H5.72414V12.5565ZM13.867 16.1755H5.72414V17.9851H13.867V16.1755ZM17.2028 13.4047V18.9464C17.2028 19.6335 17.7598 20.1905 18.4469 20.1905C19.134 20.1905 19.6909 19.6335 19.6909 18.9464V13.4047H17.2028Z",fill:"#BDBDBD"})}),"ArticleIcon");export{r as ArticleIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as e}from"@material-ui/core";import t from"moment";import r from"classnames";import m from"prop-types";import{helpContentShape as o}from"../../shapes/index.js";import{jsx as p}from"react/jsx-runtime";var a=e((function(e){return{timeStamp:{fontSize:12,lineHeight:"17px",color:e.palette.primary.text6,letterSpacing:"0.4px"}}}));function i(e){var m=e.helpContent,o=e.className,i=a(),n=t(m.updatedAt||m.createdAt).fromNow();return p("div",{className:r(i.timeStamp,o),children:n})}i.propTypes={helpContent:o.isRequired,className:m.string},i.defaultProps={className:null};export{i as HelpContentTimestamp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"prop-types";import{
|
|
1
|
+
import t from"prop-types";import{makeStyles as e}from"@material-ui/core";import{ATTACMENT_METADATA_TYPE as n}from"../../../constants/helpCenter.js";import{helpContentShape as r}from"../shapes/index.js";import{ArticleItemContent as i}from"./ArticleItemContent.js";import{VideoItemContent as o}from"./VideoItemContent.js";import{AttachmentList as m}from"../Attachments/AttachmentList.js";import{jsxs as c,jsx as a}from"react/jsx-runtime";var p=e((function(t){return{itemContent:{marginBottom:t.spacing(3),width:function(t){return t.isArticle?982:902}}}})),s=function(t){return t.filter((function(t){return t.type===n.file}))};function f(t){var e=t.helpContent,n=t.onAttachmentClick,r=e.articleContent,f=p({isArticle:r}),l=r?i:o;return c("div",{className:f.itemContent,children:[a(l,{helpContent:e}),a(m,{onAttachmentClick:n,attachments:s(e.attachmentMetadata)})]})}f.propTypes={helpContent:r.isRequired,onAttachmentClick:t.func.isRequired};export{f as ItemContent,s as getFileAttachments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import{VIDEO_SOURCES as e}from"../../../constants/video.js";import{ATTACMENT_METADATA_TYPE as r}from"../../../constants/helpCenter.js";import{getVideoSourceAndIdByUrl as i}from"../../../utils/video.js";import{helpContentShape as o}from"../shapes/index.js";import{HelpContentCaption as n}from"../HelpCenterDialog/components/HelpContentCaption.js";import{VimePlayer as a}from"./VimePlayer/VimePlayer.js";import{jsxs as l,Fragment as p,jsx as c}from"react/jsx-runtime";var m=t((function(t){return{videoContainer:{width:"100%",aspectRatio:"16 / 9",marginBottom:16},description:{width:"100%",color:t.palette.primary.contrastText,fontSize:16,lineHeight:"22px"}}})),s=function(t){var e,i;return null===(e=t.attachmentMetadata)||void 0===e||null===(i=e.find((function(t){return t.type===r.video})))||void 0===i?void 0:i.cdn_url};function d(t){var r=t.helpContent,o=m(),d=i(r.url),u=d.source,f=d.id,h=u===e.YOUTUBE;return l(p,{children:[l("div",{className:o.videoContainer,children:[h&&c("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(f),title:r.title,frameBorder:0,allow:"picture-in-picture",allowFullScreen:!0}),!h&&c(a,{src:s(r)})]}),c(n,{helpContent:r}),c("div",{className:o.description,children:r.description})]})}d.propTypes={helpContent:o.isRequired};export{d as VideoItemContent};
|