@soul-refiner/design-system 2.14.113 → 2.14.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/dropdown/dropdown.js +5 -5
- package/dist/components/media/video-player/video.js +2 -2
- package/dist/src/components/actions/dropdown/dropdown.d.ts +2 -1
- package/dist/src/components/actions/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/media/video-player/video.d.ts +1 -13
- package/dist/src/components/media/video-player/video.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),o=require("react"),r=require("styled-components"),t=require("../../atoms/box/box.js"),a=require("../../input/checkbox/checkbox.js"),i=require("../../input/radio/radio.js"),n=require("../../atoms/typography/paragraph.js");require("../../iconography/icon/icon.js");var l=require("../../../icons/basic/checkmark.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../common/colors.js");var c=s(o);const d=({checkbox:o,radio:r,children:t,closeOnChange:a=!0,closeOnBlur:i=!0,defaultValue:n="",disabled:l=!1,hasArrow:s,maintainState:d=!0,isButtonTrigger:h=!1,multiple:
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),o=require("react"),r=require("styled-components"),t=require("../../atoms/box/box.js"),a=require("../../input/checkbox/checkbox.js"),i=require("../../input/radio/radio.js"),n=require("../../atoms/typography/paragraph.js");require("../../iconography/icon/icon.js");var l=require("../../../icons/basic/checkmark.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../common/colors.js");var c=s(o);const d=({checkbox:o,radio:r,children:t,closeOnChange:a=!0,closeOnBlur:i=!0,defaultValue:n="",disabled:l=!1,hasArrow:s,maintainState:d=!0,isButtonTrigger:h=!1,multiple:b,offset:g=[0,16],onChange:v,open:f="right",options:y,sx:k,trigger:m,containerSx:j,additionalOptions:w,additionalOnChange:C,defaultAdditionalValue:S,useFullWidth:H=!1,blueOptionHover:q=!1,useTickInRadio:R=!1,maxHeight:A,...D})=>{const O=c.default.useId(),B=c.default.useRef(null),I=c.default.useRef(null),[T,z]=c.default.useState(!1),[P,E]=c.default.useState(()=>n||(b?[]:"")),[F,N]=c.default.useState(S||"");c.default.useEffect(()=>{l&&z(!1)},[l]);const V=()=>{l||z(e=>!e)},W=b?e=>{e.stopPropagation();const o=e.target.getAttribute("data-value")??"";Array.isArray(P)&&P.includes(o)?E(e=>e.filter(e=>e!==o)):E(e=>[o,...e]),a&&z(!1),v&&v(e)}:e=>{e.stopPropagation();const o=e.target.getAttribute("data-value")??"";E(P!==o?o:""),a&&z(!1),v&&v(e)},L=e=>{e.stopPropagation();const o=e.target.getAttribute("data-value")??"";N(F!==o?o:""),C&&C(o)},G=e=>d&&(b?P.includes(e):e===P);let J=null;t&&(J=c.default.Children.map(t,t=>{let a;if(c.default.isValidElement(t)){const{onClick:i,...n}=t.props;return a=n,e.jsx(x,{checkbox:!!o,onClick:W,selected:G(a.value),radio:!!r,blueHover:q,useTickInRadio:R,...a},a.value)}return null})),y&&(J=y.map((t,a)=>"string"==typeof t&&"break"===t?e.jsx($,{},`${O}-spacer-${a}`):e.jsx(x,{checkbox:!!o,radio:!!r,onClick:W,selected:G(t.value),blueHover:q,useTickInRadio:R,...t},t.value)));const K=c.default.cloneElement(m,h||"Button"===m.type?.displayName||"Button"===m.type?.name?{isDropdownOpen:T,onClick:V}:{onClick:V});return e.jsxs(u,{$sx:k,tabIndex:0,ref:B,onBlurCapture:e=>{i&&B?.current&&!B?.current?.contains(e.relatedTarget)&&z(!1)},...D,children:[K,T&&e.jsx(p,{$hasArrow:s,$offset:g,$openDirection:f,ref:I,$sx:j,$useFullWidth:H,$maxHeight:A,children:e.jsxs("div",{style:{display:"flex"},children:[e.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:J}),!!w?.length&&e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:w.map(o=>e.jsx(x,{onClick:L,selected:F===o.value,label:o.label,value:o.value,blueHover:q,useTickInRadio:R},o.value))})]})})]})},u=r.styled.div`
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|
|
5
5
|
outline: none;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
box-shadow: var(--elevation-2);
|
|
16
16
|
border-radius: 8px;
|
|
17
|
-
overflow: auto;
|
|
17
|
+
${({$maxHeight:e})=>e?`\n max-height: ${e}px;\n overflow-y: auto;\n `:"overflow: auto;"}
|
|
18
18
|
& > div:first-of-type {
|
|
19
19
|
border-radius: 8px 8px 0px 0px;
|
|
20
20
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
${({$hasArrow:e,$offset:o})=>e?`\n &:before {\n content: '';\n position: absolute;\n width: 15px;\n height: 15px;\n transform: rotate(45deg) translate(${(o?.[0]||0)+8}px, ${(o?.[1]||0)-32}px);\n background-color: var(--color-white);\n }\n `:""}
|
|
31
31
|
${({$offset:e})=>e?`transform: translate(${e[0]}px, ${e[1]}px);`:""}
|
|
32
|
-
`,x=({checkbox:o,radio:r,disabled:s,icon:c,label:d,onClick:u,selected:p,sublabel:x,sx:b,
|
|
32
|
+
`,x=({checkbox:o,radio:r,disabled:s,icon:c,label:d,onClick:u,selected:p,sublabel:x,sx:$,value:b,color:v,blueHover:f=!1,useTickInRadio:y=!1})=>e.jsxs(h,{"data-value":b,onClick:s?void 0:u,$disabled:s,$hasCheckbox:!!o,$hasRadio:!!r,$hasSublabel:!!x,$selected:p,$sx:$,$blueHover:f,children:[o?e.jsx(a.Checkbox,{selected:p}):r?y&&p?e.jsx(g,{$isSelected:!0,children:e.jsx(l.Checkmark,{size:16,color:"white"})}):e.jsx(i.Radio,{checked:p,value:""}):c,e.jsxs(t.Box,{$dir:"column",$display:"flex",children:[d&&e.jsx(n.P,{$color:v||"grey-4",$fontSize:14,$lineHeight:20,$mediumBold:!0,$textClampLines:1,children:d}),x&&e.jsx(n.P,{$color:"grey-4",$fontSize:12,$lineHeight:16,$textClampLines:1,children:x})]})]});x.displayName="Dropdown.Option",d.Option=x;const h=r.styled.div`
|
|
33
33
|
position: relative;
|
|
34
34
|
z-index: 1;
|
|
35
35
|
padding: ${({$hasSublabel:e})=>e?10:12}px 16px;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
${({$disabled:e,$selected:o,$hasCheckbox:r,$hasRadio:t,$blueHover:a})=>e?"cursor: initial;\n color: var(--color-grey-7);\n background-color: var(--color-grey-10);":o?"\n background-color: var(--color-primary-blue-3);\n &:active {\n background-color: var(--color-grey-2);\n }":a?"&:hover {\n background-color: var(--color-primary-blue-4);\n }":r||t?"&:hover {\n background-color: var(--color-grey-10);\n }":"\n &:hover {\n background-color: var(--color-grey-10);\n }\n\n &:active {\n background-color: var(--color-grey-8);\n }\n "}
|
|
46
46
|
${({$sx:e})=>e||""}
|
|
47
|
-
|
|
47
|
+
`,$=({sx:o})=>e.jsx(b,{$sx:o});$.displayName="Dropdown.Spacer",d.Spacer=$;const b=r.styled.div`
|
|
48
48
|
width: 100%;
|
|
49
49
|
height: 1px;
|
|
50
50
|
background-color: var(--color-grey-8);
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
appearance: none;
|
|
54
54
|
}
|
|
55
55
|
${({$sx:e})=>e||""}
|
|
56
|
-
|
|
56
|
+
`,g=r.styled.div`
|
|
57
57
|
margin-right: 8px;
|
|
58
58
|
width: 20px;
|
|
59
59
|
height: 20px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),n=require("react-player"),r=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),p=require("../../../icons/security/lock_circle.js"),u=require("../../../icons/audio_video/play_solid.js"),g=require("../../../utils/local-storage.js"),h=require("./playlist-item.js"),x=require("./misc.js"),
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),n=require("react-player"),r=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),p=require("../../../icons/security/lock_circle.js"),u=require("../../../icons/audio_video/play_solid.js"),g=require("../../../utils/local-storage.js"),h=require("./playlist-item.js"),x=require("./misc.js"),f=require("../../../icons/arrow/chevron_down.js"),m=require("../../surfaces/accordion/accordion.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(i),w=b(t),v=b(n);const j=1280/720,$=200*j,I=r.styled.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
background-color: var(--color-grey-0);
|
|
@@ -135,4 +135,4 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
${({$showingAll:e})=>e?"height: 100%; overflow-y:auto;":"max-height: 350px;"}
|
|
138
|
-
`;exports.VideoPlayer=({activeIndex:t,pip:n,playable:r,playlist:b,onClickPreview:L,onPipChange:M,onProgress:T,onStart:E,orientation:H,setMediaItem:R,onShowAllPlaylist:O,forwardedRef:F,subtitle:N,title:_,trailer:W,additionalMedia:V,autoPlay:X=!1,crossOrigin:Y="true"})=>{const K="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},G=K.innerHeight/3,J=j*(K.innerHeight/3),Q=y.default.useRef(null),U=F||Q,Z=y.default.useRef({}),ee=y.default.useRef(null),ie=y.default.useRef(null),[te,ne]=y.default.useState(0),[re,oe]=y.default.useState(!1),[le,se]=y.default.useState(!r),[ae,de]=y.default.useState(b?.[t].id||null),[ce,pe]=g.useLocalStorage("videoPipHeight",G),[ue,ge]=g.useLocalStorage("videoPipWidth",J),[he,xe]=g.useLocalStorage("video-volume",1),[me,fe]=g.useLocalStorage("videoPipRight",16),[be,ye]=g.useLocalStorage("videoPipBottom",16),[we,ve]=y.default.useState([0,0]),[je,$e]=y.default.useState([0,0]),[Ie,ke]=y.default.useState(!1),[Se,De]=y.default.useState(0),[Pe,Ae]=y.default.useState([]),[ze,qe]=y.default.useState([]),[Ce,Be]=y.default.useState([]),Le=le?W:Ie?Pe?.[Se]:b?.[t],Me=Array.isArray(Le?.src)?Le.src[0]:Le?.src,Te=Me?.includes(".m3u8")||!1;y.default.useEffect(()=>{V&&(Ae(V.filter(e=>"VIDEO"===e.type)),qe(V.filter(e=>"FILE"===e.type)),Be(V.filter(e=>"LINK"===e.type)))},[V]),y.default.useEffect(()=>{const e=()=>{const e=Z.current[ae];e&&setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})},0)};return b?.length&&ae&&("undefined"!=typeof window&&window.addEventListener("load",e),e()),()=>{"undefined"!=typeof window&&window.removeEventListener("load",e)}},[b,ae]);const Ee=(e,i=!1)=>{se(!1),ke(i),i?De(e):R(e)},He=()=>{oe(e=>!e),O&&O(!re)},Re=(e,i)=>{if(!ie?.current)return;const t=ie.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*K.innerWidth/3||i>=2*K.innerHeight/3||e<$||i<200||(ge(e),pe(i))},Oe=()=>{if(!ie?.current)return;const e=ie.current.getBoundingClientRect();$e([e.width,e.height])},Fe=e=>{if(!ie?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,n=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(n-we[1]+je[1]),i=Math.round(e*j);Re(i,e)}else if(i.includes("bottom")){const e=Math.round(we[1]-n+je[1]),i=Math.round(e*j);Re(i,e)}else if(i.includes("left")){const e=Math.round(t-we[0]+je[0]),i=Math.round(e/j);Re(e,i)}else if(i.includes("right")){const e=Math.round(we[0]-t+je[0]),i=Math.round(e/j);Re(e,i)}},Ne=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return V?.length&&e.push({label:"Resources",color:"dark"}),e.push({label:"Trailer",color:"dark"}),e},[V]),_e=te===Ne.length-1,We=V&&te>0&&te<Ne.length-1;return y.default.useEffect(()=>{te>=Ne.length&&ne(0)},[Ne,te]),Le?e.jsx(I,{$orientation:H,children:e.jsxs(P,{$orientation:H,$playable:r||le||Ie,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),n&&e.jsx(S,{}),e.jsxs(k,{$pip:!!n,draggable:n&&0===je[0],onDrag:n?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!ie?.current)return;const t=ie.current.getBoundingClientRect();e&&e>=16&&e<=K.innerWidth-16-t.width&&fe(e),i&&i>=16&&i<=K.innerHeight-16-t.height&&ye(i)})(me+(i-we[0]),be+(t-we[1])),ve([i,t])}:void 0,onMouseDown:e=>{ve([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:ie,style:n?{bottom:be,height:ce,right:me,width:ue}:void 0,children:[n&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(v.default,{className:"player",config:{file:{attributes:{..."true"===Y?{crossOrigin:"true"}:{},disablePictureInPicture:"true"},forceHLS:Te,hlsOptions:Te?{autoStartLoad:!0}:void 0,tracks:(Le?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:!X&&(Le.thumbnail&&e.jsx(w.default,{alt:`thumbnail for ${_}`,layout:"fill",priority:!0,quality:100,style:{objectFit:"cover"},src:Le.thumbnail})),progressInterval:4e3,onProgress:e=>T(e,Ie?Pe[Se]?.id:void 0),onStart:E,onClickPreview:L,onReady:()=>{if(!le){const e=U?.current?.getCurrentTime();0===e&&(Ie?0!==Pe?.[Se]?.progress&&U.current.seekTo(Pe?.[Se].progress):0!==Le?.progress&&U.current.seekTo(Le.progress))}},pip:n,playIcon:r||le||Ie?e.jsx(u.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(p.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:X&&(r||le||Ie),muted:X,ref:U,url:Le.src,width:"100%",volume:he,onVolumeChange:e=>{xe(e.target.volume)}}),n&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Fe,onMouseDown:Oe,onDragEnd:()=>$e([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Fe,onMouseDown:Oe,onDragEnd:()=>$e([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Fe,onMouseDown:Oe,onDragEnd:()=>$e([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Fe,onMouseDown:Oe,onDragEnd:()=>$e([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(A,{children:e.jsxs(z,{$showingAll:re,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:te,onChange:e=>ne(e),items:Ne,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:re,orientation:H,toggleShowingAll:He})]}),0===te?e.jsx(C,{ref:ee,$showingAll:re,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{de(i.id),Ee(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:r,nowplaying:ae,comingSoon:i.comingSoon||!1,ref:e=>{Z.current[i.id]=e}},i.id))}):We?e.jsxs(C,{$showingAll:re,children:[!!Pe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:Pe.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{de(i.id),Ee(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:ae,ref:e=>{Z.current[i.id]=e}},i.id))})},i))}),!!ze.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:ae,type:i.type,isFile:"FILE"===i.type,ref:e=>{Z.current[i.id]=e}},i.id))})},i))}),!!Ce.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Ce].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:ae,type:i.type,isFile:"FILE"===i.type,ref:e=>{Z.current[i.id]=e}},i.id))})},i))})]}):_e&&W?e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:se,trailer:W}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:re?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:re,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:te,onChange:e=>ne(e),items:Ne,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:re,orientation:H,toggleShowingAll:He})]}),[e.jsx(B,{ref:ee,$showingAll:re,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:ae,playlistItemId:i.id,duration:i.duration,ref:e=>{Z.current[i.id]=e},onClick:()=>{Ee(t),de(i.id)},playable:r,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(B,{$showingAll:re,children:[!!Pe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:Pe.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{de(i.id),Ee(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:ae,ref:e=>{Z.current[i.id]=e}},i.id))},i))}),(!!ze.length||!!Ce.length)&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...ze,...Ce].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:ae,type:i.type,isFile:"FILE"===i.type,ref:e=>{Z.current[i.id]=e}},i.id))},i))})]}),!!W&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:se,trailer:W})})][te]]})})]})}):null};
|
|
138
|
+
`;exports.VideoPlayer=({activeIndex:t,pip:n,playable:r,playlist:b,onClickPreview:L,onPipChange:M,onProgress:E,onStart:T,orientation:H,setMediaItem:R,onShowAllPlaylist:O,forwardedRef:F,subtitle:N,title:_,trailer:W,additionalMedia:V})=>{const X="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},Y=X.innerHeight/3,K=j*(X.innerHeight/3),G=y.default.useRef(null),J=F||G,Q=y.default.useRef({}),U=y.default.useRef(null),Z=y.default.useRef(null),[ee,ie]=y.default.useState(0),[te,ne]=y.default.useState(!1),[re,oe]=y.default.useState(!r),[le,se]=y.default.useState(b?.[t].id||null),[ae,de]=g.useLocalStorage("videoPipHeight",Y),[ce,pe]=g.useLocalStorage("videoPipWidth",K),[ue,ge]=g.useLocalStorage("video-volume",1),[he,xe]=g.useLocalStorage("videoPipRight",16),[fe,me]=g.useLocalStorage("videoPipBottom",16),[be,ye]=y.default.useState([0,0]),[we,ve]=y.default.useState([0,0]),[je,$e]=y.default.useState(!1),[Ie,ke]=y.default.useState(0),[Se,De]=y.default.useState([]),[Pe,Ae]=y.default.useState([]),[ze,qe]=y.default.useState([]),[Ce,Be]=y.default.useState(!1),Le=re?W:je?Se?.[Ie]:b?.[t],Me=Array.isArray(Le?.src)?Le.src[0]:Le?.src,Ee=Me?.includes(".m3u8")||!1;y.default.useEffect(()=>{V&&(De(V.filter(e=>"VIDEO"===e.type)),Ae(V.filter(e=>"FILE"===e.type)),qe(V.filter(e=>"LINK"===e.type)))},[V]);const Te=y.default.useRef(!0);y.default.useEffect(()=>{Te.current?Te.current=!1:!r||re||je||Be(!0)},[t,r,re,je]),y.default.useEffect(()=>{const e=()=>{const e=Q.current[le];e&&setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})},0)};return b?.length&&le&&("undefined"!=typeof window&&window.addEventListener("load",e),e()),()=>{"undefined"!=typeof window&&window.removeEventListener("load",e)}},[b,le]);const He=(e,i=!1)=>{oe(!1),$e(i),Be(!(!r&&!i)),i?ke(e):R(e)},Re=()=>{ne(e=>!e),O&&O(!te)},Oe=(e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*X.innerWidth/3||i>=2*X.innerHeight/3||e<$||i<200||(pe(e),de(i))},Fe=()=>{if(!Z?.current)return;const e=Z.current.getBoundingClientRect();ve([e.width,e.height])},Ne=e=>{if(!Z?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,n=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(n-be[1]+we[1]),i=Math.round(e*j);Oe(i,e)}else if(i.includes("bottom")){const e=Math.round(be[1]-n+we[1]),i=Math.round(e*j);Oe(i,e)}else if(i.includes("left")){const e=Math.round(t-be[0]+we[0]),i=Math.round(e/j);Oe(e,i)}else if(i.includes("right")){const e=Math.round(be[0]-t+we[0]),i=Math.round(e/j);Oe(e,i)}},_e=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return V?.length&&e.push({label:"Resources",color:"dark"}),e.push({label:"Trailer",color:"dark"}),e},[V]),We=ee===_e.length-1,Ve=V&&ee>0&&ee<_e.length-1;return y.default.useEffect(()=>{ee>=_e.length&&ie(0)},[_e,ee]),Le?e.jsx(I,{$orientation:H,children:e.jsxs(P,{$orientation:H,$playable:r||re||je,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),n&&e.jsx(S,{}),e.jsxs(k,{$pip:!!n,draggable:n&&0===we[0],onDrag:n?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();e&&e>=16&&e<=X.innerWidth-16-t.width&&xe(e),i&&i>=16&&i<=X.innerHeight-16-t.height&&me(i)})(he+(i-be[0]),fe+(t-be[1])),ye([i,t])}:void 0,onMouseDown:e=>{ye([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:Z,style:n?{bottom:fe,height:ae,right:he,width:ce}:void 0,children:[n&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(v.default,{className:"player",config:{file:{attributes:{crossOrigin:"true",disablePictureInPicture:"true"},forceHLS:Ee,hlsOptions:Ee?{autoStartLoad:!0}:void 0,tracks:(Le?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:e.jsx(w.default,{alt:`thumbnail for ${_}`,layout:"fill",priority:!0,quality:100,style:{objectFit:"cover"},src:Le.thumbnail}),progressInterval:4e3,onProgress:e=>E(e,je?Se[Ie]?.id:void 0),onStart:T,onClickPreview:e=>{(r||re||je)&&Be(!0),L&&L(e)},onReady:()=>{if(!re){const e=J?.current?.getCurrentTime();0===e&&(je?0!==Se?.[Ie]?.progress&&J.current.seekTo(Se?.[Ie].progress):0!==Le?.progress&&J.current.seekTo(Le.progress))}},pip:n,playIcon:r||re||je?e.jsx(u.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(p.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:re||je||r&&Ce,ref:J,url:Le.src,width:"100%",volume:ue,onVolumeChange:e=>{ge(e.target.volume)}}),n&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(A,{children:e.jsxs(z,{$showingAll:te,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:_}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:_e,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Re})]}),0===ee?e.jsx(C,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:r,nowplaying:le,comingSoon:i.comingSoon||!1,ref:e=>{Q.current[i.id]=e}},i.id))}):Ve?e.jsxs(C,{$showingAll:te,children:[!!Se.length&&e.jsx(m.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(m.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!Pe.length&&e.jsx(m.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(m.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Pe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!ze.length&&e.jsx(m.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(m.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))})]}):We&&W?e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:te?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:te,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:_e,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Re})]}),[e.jsx(B,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:le,playlistItemId:i.id,duration:i.duration,ref:e=>{Q.current[i.id]=e},onClick:()=>{He(t),se(i.id)},playable:r,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(B,{$showingAll:te,children:[!!Se.length&&e.jsx(m.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(m.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(f.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))},i))}),(!!Pe.length||!!ze.length)&&e.jsx(m.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(m.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(f.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...Pe,...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))},i))})]}),!!W&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:_,handleSetPlayingTrailer:oe,trailer:W})})][ee]]})})]})}):null};
|
|
@@ -24,9 +24,10 @@ export interface DropdownProps extends NativeProps, React.PropsWithChildren {
|
|
|
24
24
|
isButtonTrigger?: boolean;
|
|
25
25
|
blueOptionHover?: boolean;
|
|
26
26
|
useTickInRadio?: boolean;
|
|
27
|
+
maxHeight?: number;
|
|
27
28
|
}
|
|
28
29
|
declare const Dropdown: {
|
|
29
|
-
({ checkbox, radio, children, closeOnChange, closeOnBlur, defaultValue, disabled, hasArrow, maintainState, isButtonTrigger, multiple, offset, onChange, open: openDirection, options, sx, trigger, containerSx, additionalOptions, additionalOnChange, defaultAdditionalValue, useFullWidth, blueOptionHover, useTickInRadio, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
({ checkbox, radio, children, closeOnChange, closeOnBlur, defaultValue, disabled, hasArrow, maintainState, isButtonTrigger, multiple, offset, onChange, open: openDirection, options, sx, trigger, containerSx, additionalOptions, additionalOnChange, defaultAdditionalValue, useFullWidth, blueOptionHover, useTickInRadio, maxHeight, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
Option: {
|
|
31
32
|
({ checkbox, radio, disabled, icon, label, onClick, selected, sublabel, sx, value, color, blueHover, useTickInRadio, }: DropdownOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/dropdown/dropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,KAAK,WAAW,GAAG,IAAI,CACrB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAClC,WAAW,GACX,UAAU,GACV,QAAQ,GACR,eAAe,GACf,SAAS,GACT,UAAU,GACV,aAAa,GACb,oBAAoB,GACpB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,aAAa,CAChB,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,KAAK,CAAC,iBAAiB;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC;IACxE,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/actions/dropdown/dropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,KAAK,WAAW,GAAG,IAAI,CACrB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAClC,WAAW,GACX,UAAU,GACV,QAAQ,GACR,eAAe,GACf,SAAS,GACT,UAAU,GACV,aAAa,GACb,oBAAoB,GACpB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,aAAa,CAChB,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,WAAW,EAAE,KAAK,CAAC,iBAAiB;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC;IACxE,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ;wVA2BX,aAAa;;gIAoSb,mBAAmB;;;;iBAyHE,mBAAmB;;;CAxN1C,CAAC;AAiEF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,GAAG,SAAS,CAAC;IACxE,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAqID,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAoCD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -69,23 +69,11 @@ export interface VideoPlayerProps {
|
|
|
69
69
|
* @param forwardedRef the reference to the video player
|
|
70
70
|
*/
|
|
71
71
|
forwardedRef?: React.MutableRefObject<any>;
|
|
72
|
-
/**
|
|
73
|
-
* @param autoPlay whether the video should automatically start playing when loaded
|
|
74
|
-
* @default false
|
|
75
|
-
*/
|
|
76
|
-
autoPlay?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* @param crossOrigin CORS setting for the video element.
|
|
79
|
-
* - 'true': CORS request without credentials (default, converts to 'anonymous')
|
|
80
|
-
* - 'false': No CORS attribute (allows playback from any origin without CORS checks)
|
|
81
|
-
* @default 'true'
|
|
82
|
-
*/
|
|
83
|
-
crossOrigin?: 'true' | 'false';
|
|
84
72
|
onShowAllPlaylist?: (isOpen: boolean) => void;
|
|
85
73
|
}
|
|
86
74
|
/**
|
|
87
75
|
* ReactPlayer props reference -> https://www.npmjs.com/package/react-player#props
|
|
88
76
|
* HLS Option props reference -> https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning
|
|
89
77
|
*/
|
|
90
|
-
export declare const VideoPlayer: ({ activeIndex, pip, playable, playlist, onClickPreview, onPipChange, onProgress, onStart, orientation, setMediaItem, onShowAllPlaylist, forwardedRef, subtitle, title, trailer, additionalMedia,
|
|
78
|
+
export declare const VideoPlayer: ({ activeIndex, pip, playable, playlist, onClickPreview, onPipChange, onProgress, onStart, orientation, setMediaItem, onShowAllPlaylist, forwardedRef, subtitle, title, trailer, additionalMedia, }: VideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
91
79
|
//# sourceMappingURL=video.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB,EACD,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB,EACD,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE3C,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,uMAiBrB,gBAAgB,4CA80BlB,CAAC"}
|