@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 r}from"react/jsx-runtime";var i=e(r("svg",{width:"20",height:"20",viewBox:"-4 -4 20 20",xmlns:"http://www.w3.org/2000/svg",children:r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.50793 0.0834961C0.67512 0.0834961 0 0.758616 0 1.59143V14.4089C0 15.2417 0.67512 15.9168 1.50793 15.9168H13.2887C13.2888 15.9168 13.2889 15.9168 13.2891 15.9168C14.6944 15.9168 15.8337 14.7775 15.8337 13.3722V8.0711C15.8337 7.61548 15.4644 7.24618 15.0088 7.24618H12.252V1.59143C12.252 0.758616 11.5769 0.0834961 10.744 0.0834961H1.50793ZM9.4725 5.03137H2.68678V6.53931H9.4725V5.03137ZM2.68678 8.0472H9.4725V9.5552H2.68678V8.0472ZM9.4725 11.0631H2.68678V12.5711H9.4725V11.0631ZM12.2524 8.7541V13.3722C12.2524 13.9447 12.7165 14.4089 13.2891 14.4089C13.8616 14.4089 14.3258 13.9447 14.3258 13.3722V8.7541H12.2524Z"})}),"ArticleIcon");export{i as ArticleIcon};
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 t}from"@material-ui/core";import e from"moment";import r from"classnames";import m from"prop-types";import{helpContentShape as o}from"../../shapes/index.js";import{jsx as a}from"react/jsx-runtime";var p=t((function(t){return{timeStamp:{fontSize:12,lineHeight:"17px",color:t.palette.primary.text6,letterSpacing:"0.4px"}}}));function i(t){var m=t.helpContent,o=t.className,i=p(),n=e(m.updatedAt||m.createdAt).format("MM/DD/YY HH:mm");return a("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
+ 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{Box 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 o}from"./ArticleItemContent.js";import{VideoItemContent as i}from"./VideoItemContent.js";import{AttachmentList as m}from"../Attachments/AttachmentList.js";import{jsxs as p,jsx as a}from"react/jsx-runtime";var c=function(t){return t.filter((function(t){return t.type===n.file}))};function s(t){var n=t.helpContent,r=t.onAttachmentClick,s=n.articleContent?o:i;return p(e,{width:"982px",mb:3,children:[a(s,{helpContent:n}),a(m,{onAttachmentClick:r,attachments:c(n.attachmentMetadata)})]})}s.propTypes={helpContent:r.isRequired,onAttachmentClick:t.func.isRequired};export{s as ItemContent,c as getFileAttachments};
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 e}from"@material-ui/core";import{VIDEO_SOURCES as t}from"../../../constants/video.js";import{ATTACMENT_METADATA_TYPE as i}from"../../../constants/helpCenter.js";import{getVideoSourceAndIdByUrl as r}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 d,jsx as c}from"react/jsx-runtime";var m=e((function(e){return{videoContainer:{width:"100%",minHeight:507,marginBottom:16},video:{width:"100%"},youtubeVideoContainer:{height:507},description:{width:"100%",color:e.palette.primary.contrastText,fontSize:16,lineHeight:"22px"}}})),s=function(e){var t,r;return null===(t=e.attachmentMetadata)||void 0===t||null===(r=t.find((function(e){return e.type===i.video})))||void 0===r?void 0:r.cdn_url};function p(e){var i=e.helpContent,o=m(),p=r(i.url),u=p.source,h=p.id,f=u===t.YOUTUBE;return l(d,{children:[l("div",{className:o.videoContainer,children:[f&&c("div",{className:o.youtubeVideoContainer,children:c("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(h),title:i.title,frameBorder:0,allow:"picture-in-picture",allowFullScreen:!0})}),!f&&c("div",{style:{width:"100%"},children:c(a,{src:s(i)})})]}),c(n,{helpContent:i}),c("div",{className:o.description,children:i.description})]})}p.propTypes={helpContent:o.isRequired};export{p as VideoItemContent};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.35.0-17",
3
+ "version": "0.35.0-18",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"