From c673332526924083c2d46113dd44f38ba838ed24 Mon Sep 17 00:00:00 2001 From: btopro Date: Fri, 1 Mar 2024 16:54:13 -0500 Subject: [PATCH] HAXcms build updated --- VERSION.txt | 2 +- .../a11y-media-player/a11y-media-player.js | 2 +- .../audio-player/audio-player.js | 2 +- .../@lrnwebcomponents/d-d-d/lib/DDDStyles.js | 1 - .../haxcms-elements/package.json | 112 +++++++++--------- .../page-break/lib/page-anchor.js | 13 +- .../page-section/page-section.js | 31 ++++- .../lib/play-list.haxProperties.json | 6 +- .../@lrnwebcomponents/play-list/play-list.js | 2 +- .../simple-cta/simple-cta.js | 5 +- .../video-player/video-player.js | 3 +- 11 files changed, 103 insertions(+), 76 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 5210382a7a..608c4e7100 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -8.0.1 \ No newline at end of file +8.0.2 \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/a11y-media-player/a11y-media-player.js b/build/es6/node_modules/@lrnwebcomponents/a11y-media-player/a11y-media-player.js index 85e12ec666..5d12d5bc4d 100644 --- a/build/es6/node_modules/@lrnwebcomponents/a11y-media-player/a11y-media-player.js +++ b/build/es6/node_modules/@lrnwebcomponents/a11y-media-player/a11y-media-player.js @@ -1234,6 +1234,6 @@ import{LitElement as t,html as e,css as i}from"../../lit/index.js";import{DDD as -
`}static get properties(){return{...super.properties,__playerReady:{type:Boolean},allowConcurrent:{attribute:"allow-concurrent",type:Boolean},audioOnly:{attribute:"audio-only",type:Boolean,reflect:!0},autoplay:{attribute:"autoplay",type:Boolean},captionsTrack:{attribute:"captions-track",type:Object},cc:{attribute:"cc",type:Boolean},currentTime:{type:Number},crossorigin:{attribute:"crossorigin",type:String},disablePrintButton:{attribute:"disable-print-button",type:Boolean},disableSearch:{attribute:"disable-search",type:Boolean},disableScroll:{attribute:"disable-scroll",type:Boolean},disableSeek:{attribute:"disable-seek",type:Boolean},darkTranscript:{attribute:"dark-transcript",type:Boolean},disableFullscreen:{attribute:"disable-fullscreen",type:Boolean},disableInteractive:{attribute:"disable-interactive",type:Boolean},height:{attribute:"height",type:String},hideElapsedTime:{attribute:"hide-elapsed-time",type:Boolean},hideTimestamps:{attribute:"hide-timestamps",type:Boolean},hideTranscript:{attribute:"hide-transcript",type:Boolean,reflect:!0},id:{attribute:"id",type:String,reflect:!0},lang:{attribute:"lang",type:String},learningMode:{attribute:"learning-mode",type:Boolean},linkable:{attribute:"linkable",type:Boolean},localization:{attribute:"localization",type:Object},loop:{attribute:"loop",type:Boolean},mediaLang:{attribute:"media-lang",type:String},mediaTitle:{attribute:"media-title",type:String},muted:{attribute:"muted",type:Boolean},hideYoutubeLink:{type:Boolean,attribute:"hide-youtube-link"},playbackRate:{attribute:"playback-rate",type:Number},preload:{attribute:"preload",type:String,reflect:!0},responsiveSize:{attribute:"responsive-size",type:String,reflect:!0},search:{attribute:"search",type:Object},standAlone:{attribute:"stand-alone",type:Boolean,reflect:!0},source:{type:String,reflect:!0},sources:{attribute:"sources",type:Array},stackedLayout:{attribute:"stacked-layout",type:Boolean},sticky:{attribute:"sticky",type:Boolean,reflect:!0},stickyCorner:{attribute:"sticky-corner",type:String,reflect:!0},thumbnailSrc:{attribute:"thumbnail-src",type:String,reflect:!0},tracks:{attribute:"tracks",type:Array},transcriptTrack:{attribute:"transcript-track",type:Object},volume:{attribute:"volume",type:Number},width:{attribute:"width",type:String},youtubeId:{attribute:"youtube-id",reflect:!0,type:String},__currentTime:{type:Number},__captionsOption:{type:Number},__cues:{type:Array},__loadedTracks:{type:Object},__playing:{type:Boolean},__preloadedDuration:{type:Number},__settingsOpen:{type:Boolean},__transcriptOption:{type:Number}}}static get tag(){return"a11y-media-player"}constructor(){super(),globalThis.ResponsiveUtility.requestAvailability(),globalThis.A11yMediaStateManager.requestAvailability(),this.__playerReady=!1,this.audioOnly=!1,this.autoplay=!1,this.allowConcurrent=!1,this.cc=!1,this.darkTranscript=!1,this.disableFullscreen=!1,this.disableInteractive=!1,this.disablePrintButton=!1,this.disableSearch=!1,this.disableScroll=!1,this.disableSeek=!1,this.hideElapsedTime=!1,this.hideTimestamps=!1,this.hideTranscript=!1,this.id=null,this.lang="en",this.learningMode=!1,this.linkable=!1,this.localization={},this.loop=!1,this.mediaTitle="",this.mediaLang="en",this.muted=!1,this.hideYoutubeLink=!1,this.preload="metadata",this.playbackRate=1,this.search=null,this.standAlone=!1,this.responsiveSize="sm",this.captionsTrack=null,this.transcriptTrack=null,this.sources=[],this.stackedLayout=!1,this.sticky=!1,this.stickyCorner="top-right",this.tracks=[],this.volume=70,this.width=null,this.youtubeId=null,this.__cues=[],this.__currentTime=0,this.__captionsOption=-1,this.__loadedTracks=null,this.__playing=!1,this.__settingsOpen=!1,this.__transcriptOption=-1,this.querySelectorAll("video,audio").forEach((t=>{t.addEventListener("loadedmetadata",(e=>{this.__preloadedDuration=t.duration}))}))}get anchor(){let t=globalThis.AnchorBehaviors;return{target:!!t&&t.getTarget(this),params:t?t.params:{}}}get aspect(){let t=this.media&&this.media.aspectRatio?this.media.aspectRatio:16/9;return null===this.width||this.width,this.style.maxWidth=this.width,t}get audioNoThumb(){return this.audioOnly&&(null===this.thumbnailSrc||void 0===this.thumbnailSrc)}get buffered(){return this.media&&this.media.buffered&&this.media.buffered>0?this.media.buffered:0}get captionCues(){return this.captionsTrack&&this.captionsTrack.cues?this.isYoutube?Object.keys(this.captionsTrack.cues).map((t=>{let e=this.captionsTrack.cues[t];return e.startTime<=this.currentTime&&e.endTime>=this.currentTime?e:{}})):this.captionsTrack.activeCues:[]}get captionsPicker(){let t={};return t[-1]=this._getLocal(this.localization,"captions","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get captionsTrackKey(){return this.cc?this._getTrackId(this.captionsTrack):-1}get cues(){return this.__cues}get duration(){return this.media&&this.media.duration&&this.media.duration>0?this.media.duration:this.__preloadedDuration?this.__preloadedDuration:0}get flexLayout(){return this.hasCaptions&&!this.standAlone&&!this.hideTranscript&&!this.audioNoThumb&&!this.stackedLayout}get fullFlex(){return this.flexLayout&&"xs"!==this.responsiveSize&&"sm"!==this.responsiveSize}get fullscreenButton(){return this.fullscreenEnabled&&!this.disableFullscreen&&!this.audioNoThumb}get hasCaptions(){return this.cues.length>1}get isYoutube(){return!!this.youtubeId}get loadedTracks(){return this.__loadedTracks}get localizationDefaults(){return{audio:{label:"Audio",notSupported:"HTML5 video is not supported."},autoScroll:{label:"Scroll Transcript",icon:"swap-vert"},captions:{label:"Closed Captions",icon:"av:closed-caption",off:"Off"},download:{label:"Download Transcript",icon:"file-download"},forward:{label:"Forward",icon:"av:fast-forward"},fullscreen:{label:"Fullscreen",icon:"fullscreen"},copyLink:{label:"Copy Media Link",icon:"link"},closeLink:{label:"Close",icon:"close"},loading:{label:"Loading..."},loop:{label:"Loop Playback"},mute:{label:"Mute",icon:"av:volume-up"},nextResult:{label:"Next",icon:"arrow-forward"},pause:{label:"Pause",icon:"av:pause"},play:{label:"Play",icon:"av:play-arrow"},prevResult:{label:"Previous",icon:"arrow-back"},print:{label:"Print Transcript",icon:"print"},restart:{label:"Restart",icon:"av:replay"},rewind:{label:"Backward",icon:"av:fast-rewind"},search:{label:"Search the transcript.",icon:"search"},seekSlider:{label:"Seek Slider"},settings:{label:"Settings",icon:"settings"},speed:{label:"Speed %"},transcript:{label:"Transcript",icon:"description",loading:"Loading the transcript(s)...",off:"Off",skip:"Skip to the transcript."},unmute:{label:"Unmute",icon:"av:volume-off"},video:{label:"Video",notSupported:"HTML5 video is not supported."},volume:{label:"Volume"},youTubeLoading:{label:"Loading...",startLoading:"Press play."},youTubeTranscript:{label:"Transcript will load once media plays."}}}get media(){return this.isYoutube?this.youtube:this.loadedTracks}get mediaCaption(){let t=this._getLocal(this.localization,"audio","label"),e=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&e?this.mediaTitle+" ("+t+")":this.audioOnly?t:e?this.mediaTitle:void 0}get mediaEnd(){return!(!this.mediaSeekable||!this.media.seekable.end(0))&&this.media.seekable.end(0)}get mediaMaxWidth(){return`max-width:${this.fullscreen||this.audioNoThumb?"unset":`calc(${100*this.aspect}vh - ${80*this.aspect}px)`};`}get mediaSeekable(){return!(!this.media||!this.media.seekable)&&this.media.seekable.length>0}get mediaStart(){return this.mediaSeekable&&this.media.seekable.start(0)?this.media.seekable.start(0):0}get playing(){return this.__playing}get playerStyle(){return`height:${this.audioNoThumb?"60px":"unset"};padding-top:${this.fullscreen||this.audioNoThumb||this.height?"unset":100/this.aspect+"%"};${this.poster&&(this.isYoutube||this.audioOnly)?`background-image:url('${this.poster}');`:""}`}get poster(){let t=this.thumbnailSrc?this.thumbnailSrc:!(!this.media||this.media.poster)&&this.media.poster;return!this.thumbnailSrc&&this.youtubeId?`https://img.youtube.com/vi/${this.youtubeId.replace(/[\?&].*/,"")}/hqdefault.jpg`:t}get printCaption(){let t=this._getLocal(this.localization,"audio","label"),e=this._getLocal(this.localization,"video","label"),i=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&i?this.mediaTitle+" ("+t+")":this.audioOnly?t:i?this.mediaTitle+" ("+e+")":e}get currentTime(){let t=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");return t&&!t.disabled&&t.dragging?this.shadowRoot.querySelector("#slider").immediateValue:this.__currentTime}get shareLink(){let t=globalThis.location.href.split(/[#?]/)[0],e=this.id?`?id=${this.id}`:"";return`${t}${e}${""!==e&&this.currentTime&&0!==this.currentTime?`&t=${this.currentTime}`:""}`}get showCustomCaptions(){return(this.isYoutube||this.audioOnly)&&this.hasCaptions&&this.cc}get status(){return this.duration>0?e` +
`}static get properties(){return{...super.properties,__playerReady:{type:Boolean},allowConcurrent:{attribute:"allow-concurrent",type:Boolean},audioOnly:{attribute:"audio-only",type:Boolean,reflect:!0},autoplay:{attribute:"autoplay",type:Boolean},captionsTrack:{attribute:"captions-track",type:Object},cc:{attribute:"cc",type:Boolean},currentTime:{type:Number},crossorigin:{attribute:"crossorigin",type:String},disablePrintButton:{attribute:"disable-print-button",type:Boolean},disableSearch:{attribute:"disable-search",type:Boolean},disableScroll:{attribute:"disable-scroll",type:Boolean},disableSeek:{attribute:"disable-seek",type:Boolean},darkTranscript:{attribute:"dark-transcript",type:Boolean},disableFullscreen:{attribute:"disable-fullscreen",type:Boolean},disableInteractive:{attribute:"disable-interactive",type:Boolean},height:{attribute:"height",type:String},hideElapsedTime:{attribute:"hide-elapsed-time",type:Boolean},hideTimestamps:{attribute:"hide-timestamps",type:Boolean},hideTranscript:{attribute:"hide-transcript",type:Boolean,reflect:!0},id:{attribute:"id",type:String,reflect:!0},lang:{attribute:"lang",type:String},learningMode:{attribute:"learning-mode",type:Boolean},linkable:{attribute:"linkable",type:Boolean},localization:{attribute:"localization",type:Object},loop:{attribute:"loop",type:Boolean},mediaLang:{attribute:"media-lang",type:String},mediaTitle:{attribute:"media-title",type:String},muted:{attribute:"muted",type:Boolean},hideYoutubeLink:{type:Boolean,attribute:"hide-youtube-link"},playbackRate:{attribute:"playback-rate",type:Number},preload:{attribute:"preload",type:String,reflect:!0},responsiveSize:{attribute:"responsive-size",type:String,reflect:!0},search:{attribute:"search",type:Object},standAlone:{attribute:"stand-alone",type:Boolean,reflect:!0},source:{type:String,reflect:!0},sources:{attribute:"sources",type:Array},stackedLayout:{attribute:"stacked-layout",type:Boolean},sticky:{attribute:"sticky",type:Boolean,reflect:!0},stickyCorner:{attribute:"sticky-corner",type:String,reflect:!0},thumbnailSrc:{attribute:"thumbnail-src",type:String,reflect:!0},tracks:{attribute:"tracks",type:Array},transcriptTrack:{attribute:"transcript-track",type:Object},volume:{attribute:"volume",type:Number},width:{attribute:"width",type:String},youtubeId:{attribute:"youtube-id",reflect:!0,type:String},__currentTime:{type:Number},__captionsOption:{type:Number},__cues:{type:Array},__loadedTracks:{type:Object},__playing:{type:Boolean},__preloadedDuration:{type:Number},__settingsOpen:{type:Boolean},__transcriptOption:{type:Number}}}static get tag(){return"a11y-media-player"}constructor(){super(),globalThis.ResponsiveUtility.requestAvailability(),globalThis.A11yMediaStateManager.requestAvailability(),this.__playerReady=!1,this.audioOnly=!1,this.autoplay=!1,this.allowConcurrent=!1,this.cc=!1,this.darkTranscript=!1,this.disableFullscreen=!1,this.disableInteractive=!1,this.disablePrintButton=!1,this.disableSearch=!1,this.disableScroll=!1,this.disableSeek=!1,this.hideElapsedTime=!1,this.hideTimestamps=!1,this.hideTranscript=!1,this.id=null,this.lang="en",this.learningMode=!1,this.linkable=!1,this.localization={},this.loop=!1,this.mediaTitle="",this.mediaLang="en",this.muted=!1,this.hideYoutubeLink=!1,this.preload="metadata",this.playbackRate=1,this.search=null,this.standAlone=!1,this.responsiveSize="sm",this.captionsTrack=null,this.transcriptTrack=null,this.sources=[],this.stackedLayout=!1,this.sticky=!1,this.stickyCorner="top-right",this.tracks=[],this.volume=70,this.width=null,this.youtubeId=null,this.__cues=[],this.__currentTime=0,this.__captionsOption=-1,this.__loadedTracks=null,this.__playing=!1,this.__settingsOpen=!1,this.__transcriptOption=-1,this.querySelectorAll("video,audio").forEach((t=>{t.addEventListener("loadedmetadata",(e=>{this.__preloadedDuration=t.duration}))}))}get anchor(){let t=globalThis.AnchorBehaviors;return{target:!!t&&t.getTarget(this),params:t?t.params:{}}}get aspect(){let t=this.media&&this.media.aspectRatio?this.media.aspectRatio:16/9;return null===this.width||this.width,this.style.maxWidth=this.width,t}get audioNoThumb(){return this.audioOnly&&(null===this.thumbnailSrc||void 0===this.thumbnailSrc)}get buffered(){return this.media&&this.media.buffered&&this.media.buffered>0?this.media.buffered:0}get captionCues(){return this.captionsTrack&&this.captionsTrack.cues?this.isYoutube?Object.keys(this.captionsTrack.cues).map((t=>{let e=this.captionsTrack.cues[t];return e.startTime<=this.currentTime&&e.endTime>=this.currentTime?e:{}})):this.captionsTrack.activeCues:[]}get captionsPicker(){let t={};return t[-1]=this._getLocal(this.localization,"captions","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get captionsTrackKey(){return this.cc?this._getTrackId(this.captionsTrack):-1}get cues(){return this.__cues}get duration(){return this.media&&this.media.duration&&this.media.duration>0?this.media.duration:this.__preloadedDuration?this.__preloadedDuration:0}get flexLayout(){return this.hasCaptions&&!this.standAlone&&!this.hideTranscript&&!this.audioNoThumb&&!this.stackedLayout}get fullFlex(){return this.flexLayout&&"xs"!==this.responsiveSize&&"sm"!==this.responsiveSize}get fullscreenButton(){return this.fullscreenEnabled&&!this.disableFullscreen&&!this.audioNoThumb}get hasCaptions(){return this.cues.length>1}get isYoutube(){return!!this.youtubeId}get loadedTracks(){return this.__loadedTracks}get localizationDefaults(){return{audio:{label:"Audio",notSupported:"HTML5 video is not supported."},autoScroll:{label:"Scroll Transcript",icon:"swap-vert"},captions:{label:"Closed Captions",icon:"av:closed-caption",off:"Off"},download:{label:"Download Transcript",icon:"file-download"},forward:{label:"Forward",icon:"av:fast-forward"},fullscreen:{label:"Fullscreen",icon:"fullscreen"},copyLink:{label:"Copy Media Link",icon:"link"},closeLink:{label:"Close",icon:"close"},loading:{label:"Loading..."},loop:{label:"Loop Playback"},mute:{label:"Mute",icon:"av:volume-up"},nextResult:{label:"Next",icon:"arrow-forward"},pause:{label:"Pause",icon:"av:pause"},play:{label:"Play",icon:"av:play-arrow"},prevResult:{label:"Previous",icon:"arrow-back"},print:{label:"Print Transcript",icon:"print"},restart:{label:"Restart",icon:"av:replay"},rewind:{label:"Backward",icon:"av:fast-rewind"},search:{label:"Search the transcript.",icon:"search"},seekSlider:{label:"Seek Slider"},settings:{label:"Settings",icon:"settings"},speed:{label:"Speed %"},transcript:{label:"Transcript",icon:"description",loading:"Loading the transcript(s)...",off:"Off",skip:"Skip to the transcript."},unmute:{label:"Unmute",icon:"av:volume-off"},video:{label:"Video",notSupported:"HTML5 video is not supported."},volume:{label:"Volume"},youTubeLoading:{label:"Loading...",startLoading:"Press play."},youTubeTranscript:{label:"Transcript will load once media plays."}}}get media(){return this.isYoutube?this.youtube:this.loadedTracks}get mediaCaption(){let t=this._getLocal(this.localization,"audio","label"),e=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&e?this.mediaTitle+" ("+t+")":this.audioOnly?t:e?this.mediaTitle:void 0}get mediaEnd(){return!(!this.mediaSeekable||!this.media.seekable.end(0))&&this.media.seekable.end(0)}get mediaMaxWidth(){return`max-width:${this.fullscreen||this.audioNoThumb?"unset":`calc(${100*this.aspect}vh - ${80*this.aspect}px)`};`}get mediaSeekable(){return!(!this.media||!this.media.seekable)&&this.media.seekable.length>0}get mediaStart(){return this.mediaSeekable&&this.media.seekable.start(0)?this.media.seekable.start(0):0}get playing(){return this.__playing}get playerStyle(){return`height:${this.audioNoThumb?"60px":"unset"};padding-top:${this.fullscreen||this.audioNoThumb||this.audioOnly||this.height?"unset":100/this.aspect+"%"};${this.poster&&(this.isYoutube||this.audioOnly)?`background-image:url('${this.poster}');`:""}`}get poster(){let t=this.thumbnailSrc?this.thumbnailSrc:!(!this.media||this.media.poster)&&this.media.poster;return!this.thumbnailSrc&&this.youtubeId?`https://img.youtube.com/vi/${this.youtubeId.replace(/[\?&].*/,"")}/hqdefault.jpg`:t}get printCaption(){let t=this._getLocal(this.localization,"audio","label"),e=this._getLocal(this.localization,"video","label"),i=void 0!==this.mediaTitle&&null!==this.mediaTitle&&""!==this.mediaTitle;return this.audioOnly&&i?this.mediaTitle+" ("+t+")":this.audioOnly?t:i?this.mediaTitle+" ("+e+")":e}get currentTime(){let t=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");return t&&!t.disabled&&t.dragging?this.shadowRoot.querySelector("#slider").immediateValue:this.__currentTime}get shareLink(){let t=globalThis.location.href.split(/[#?]/)[0],e=this.id?`?id=${this.id}`:"";return`${t}${e}${""!==e&&this.currentTime&&0!==this.currentTime?`&t=${this.currentTime}`:""}`}get showCustomCaptions(){return(this.isYoutube||this.audioOnly)&&this.hasCaptions&&this.cc}get status(){return this.duration>0?e` ${this._getHHMMSS(this.currentTime,this.duration)}/${this._getHHMMSS(this.duration)} `:this.isYoutube?this.__playing?this._getLocal(this.localization,"youTubeLoading","label"):this._getLocal(this.localization,"youTubeLoading","startLoading"):this._getLocal(this.localization,"loading","label")}get stickyMode(){return this.sticky&&"none"!==this.stickyCorner}get t(){let t=this._getSeconds(this.anchor.params.t||this.anchor.params.start||"0s");return this.anchor&&this.anchor.target===this?t:this.videoData?this.videoData.t||this.videoData.start:void 0}get transcriptCues(){return(this.cues?this.cues.slice():[]).filter((t=>t.track===this.transcriptTrack))}get transcriptPicker(){let t={};return t[-1]=this._getLocal(this.localization,"transcript","off"),Object.keys(this.loadedTracks&&this.loadedTracks.textTracks?this.loadedTracks.textTracks:{}).forEach((e=>{t[e]=this.loadedTracks.textTracks[e].label||this.loadedTracks.textTracks[e].language})),t}get transcriptTrackKey(){return this.hideTranscript?-1:this._getTrackId(this.transcriptTrack)}get videoData(){if(this.youtubeId){let t=this.youtubeId.split(/[\?\&]/),e={};return e.videoId=t[0],t.forEach(((t,i)=>{if(i>0){let i=t.split(/=/);e[i[0]]=this._getSeconds(i[1])}})),e}}get videoId(){if(this.videoData)return this.videoData.videoId}get youtube(){return null!==this.shadowRoot.querySelector("a11y-media-youtube")&&this.shadowRoot.querySelector("a11y-media-youtube")}_setAttribute(t,e){e?this.setAttribute(t,e):this.removeAttribute(t)}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{"learningMode"===e&&(this.disableSeek=this[e],this.hideTranscript=this[e]);let change=t=>t.includes(e),mediaChange=t=>change(["__loadedTracks","youtubeId","media",t]),i=change(["standAlone","hideTranscript","audioNoThumb","stackedLayout","__cues"]),s=this.media?this.media:this.__loadedTracks;"id"===e&&null===this.id&&(this.id="a11y-media-player"+Date.now()),change(["media","muted"])&&this._handleMuteChanged(),change(["media","volume"])&&this.setVolume(this.volume),change(["media","autoplay"])&&this.autoplay&&this.play(),"__captionsOption"===e&&this._captionsOptionChanged(),change(["cc","captionsTrack"])&&this._captionsChanged(),i&&this._setAttribute("flex-layout",this.flexLayout),(i||"responsiveSize"===e)&&this._setAttribute("full-flex",this.fullFlex),change(["sticky","sticky-corner","__playing"])&&this._setAttribute("sticky-mode",this.stickyMode&&this.__playing),change(["height"])&&(this.style.setProperty("--a11y-media-player-height",this.height?this.height:"unset"),this.style.setProperty("--a11y-media-transcript-max-height",this.height?"146px":"unset")),null!==this.media&&(mediaChange("cc")&&this._setAttribute("cc",this.cc,this.__loadedTracks),mediaChange("isYoutube")&&this.__loadedTracks&&(this.__loadedTracks.hidden,this.isYoutube),mediaChange("mediaLang")&&this._setAttribute("lang",this.mediaLang,s),mediaChange("loop")&&this._setAttribute("loop",this.loop,s),mediaChange("playbackRate")&&this._setAttribute("playbackRate",this.playbackRate,s),mediaChange("isYoutube")&&this._setAttribute("poster",!this.isYoutube&&this.thumbnailSrc,this.__loadedTracks),!change(["isYoutube","poster","media","audioOnly"])||!this.poster||this.isYoutube||this.audioOnly||this.media.poster||(this.media.poster=this.poster)),this.dispatchEvent(new CustomEvent(`${e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}-changed`,{detail:{value:this[e]}}))}))}_captionsChanged(){let t=-1;Object.keys(this.loadedTracks.textTracks).forEach((e=>{let i=this.cc&&this.loadedTracks.textTracks[e]===this.captionsTrack;this.loadedTracks.textTracks[e].mode=i?"showing":"hidden",i&&(t=e)})),this.__captionsOption=t}_captionsOptionChanged(){this.cc=this.__captionsOption>-1,Object.keys(this.loadedTracks.textTracks).forEach((t=>{let e=parseInt(t)==parseInt(this.__captionsOption);this.loadedTracks.textTracks[t].mode=e?"showing":"hidden",e&&(this.captionsTrack=this.loadedTracks.textTracks[t])}))}_handleMuteChanged(){this.media&&(this.media.muted=this.muted),this.dispatchEvent(new CustomEvent("mute-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}download(){let t=globalThis.document.createElement("a"),e=this.mediaTitle&&""!=this.mediaTitle.trim()?`${this.mediaTitle} (${this._getLocal(this.localization,"transcript","label")})`:this._getLocal(this.localization,"transcript","label"),i=e.replace(/[^\w\d]/g,""),s=this.transcriptTrack.cues,o=Object.keys(s).map((t=>`${this._getHHMMSS(s[t].startTime)} - ${this._getHHMMSS(s[t].endTime)}: \t${s[t].text.replace(/[\n\r\s*]/g," ")}\n`)).join("");t.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(e+"\n"+o)),t.setAttribute("download",i+".txt"),t.style.display="none",globalThis.document.body.appendChild(t),t.click(),globalThis.document.body.removeChild(t),this.dispatchEvent(new CustomEvent("transcript-downloaded",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}goToYoutube(){globalThis.open(`https://www.youtube.com/watch?v=${this.youtubeId}`)}print(){let t=this.transcriptTrack.cues,e=this.mediaTitle&&""!=this.mediaTitle.trim()?`${this.mediaTitle} (${this._getLocal(this.localization,"transcript","label")})`:this._getLocal(this.localization,"transcript","label"),i=globalThis.open("","","left=0,top=0,width=552,height=477,toolbar=0,scrollbars=0,status =0");i.document.body.innerHTML=`\n

${e}

\n ${Object.keys(t).map((e=>`
\n ${this.hideTimestamps?"":`\n \n ${this._getHHMMSS(t[e].startTime)} - \n ${this._getHHMMSS(t[e].endTime)}:\n `}\n \n ${t[e].text}\n \n
`)).join("")}\n `,i.document.close(),i.focus(),i.print(),i.addEventListener("afterprint",(t=>{i.close()})),this.dispatchEvent(new CustomEvent("transcript-printed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}play(){this.__playing=!0,this.media&&this.media.play&&this.media.play(),this.dispatchEvent(new CustomEvent("play",{bubbles:!0,composed:!0,cancelable:!1,detail:this})),globalThis.dispatchEvent(new CustomEvent("a11y-player-playing",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}pause(){this.__playing=!1,this.media&&this.media.pause&&this.media.pause(),this.dispatchEvent(new CustomEvent("pause",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}stop(){this.pause(),this.seek(0),globalThis.dispatchEvent(new CustomEvent("stop",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}restart(){this.seek(0),this.play(),globalThis.dispatchEvent(new CustomEvent("restart",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}rewind(t){t=void 0!==t?t:this.duration/20,this.seek(this.currentTime-t,0),globalThis.dispatchEvent(new CustomEvent("backward",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}forward(t){t=void 0!==t?t:this.duration/20,this.seek(this.currentTime+t),globalThis.dispatchEvent(new CustomEvent("forward",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}seek(t=0){this.mediaSeekable&&(this.media.seek(Math.max(0,Math.min(t,this.duration))),this._handleTimeUpdate(),globalThis.dispatchEvent(new CustomEvent("seek",{bubbles:!0,composed:!0,cancelable:!1,detail:this})))}selectCaptionByKeyEvent(t){this.selectCaptionByKey(t.detail.value)}selectCaptionByKey(t){(t=parseInt(t))>-1&&(this.captionsTrack=this.loadedTracks.textTracks[t]),this.cc=t>-1}selectTranscriptByKeyEvent(t){this.selectTranscriptByKey(t.detail.value)}selectTranscriptByKey(t){(t=parseInt(t))>-1&&(this.transcriptTrack=this.loadedTracks.textTracks[t]),this.hideTranscript=t<0}getloadedTracks(){let t=this.querySelector("audio,video"),e=t?t.getAttribute("crossorigin"):void 0,i=null,s=this.source&&!this.source&&this.source.match(/webm|ogv|mov|mp4$/),o=(this.sources||[]).filter((t=>`${t.type||""}${t.kind||""}`.match(/video|mp4|webm|ogv/))).length>0,l=this.isYoutube||s||o;if(t&&(e||t.setAttribute("crossorigin",this.crossorigin),t.removeAttribute("autoplay"),t.removeAttribute("controls"),t.setAttribute("preload","metadata")),!this.youtubeId){let t=!(!this.querySelector("iframe")||!this.querySelector("iframe"))&&this.querySelector("iframe").src;!!t&&(t.match(/youtube(-\w*)*.com/)||t.src.match(/youtu.be/))&&t&&(this.youtubeId=t.replace(/.*\//g,""),l=!0,this.querySelector("iframe").remove())}return t?i=t:(i=globalThis.document.createElement(this.querySelectorAll('source[type*="audio"]').length>0||!l?"audio":"video"),e||i.setAttribute("crossorigin",this.crossorigin),i.setAttribute("preload","metadata"),this.querySelectorAll("source,track").forEach((t=>{t.parentNode===this&&i.appendChild(t)})),this.appendChild(i)),this.audioOnly="AUDIO"===i.tagName,i.style.width="100%",i.style.maxWidth="100%",(this.tracks||[]).forEach((t=>{let e=globalThis.document.createElement("track");Object.keys(t).forEach((i=>e.setAttribute(i,t[i]))),i.appendChild(e)})),(this.sources||[]).forEach((t=>{let e=globalThis.document.createElement("source");Object.keys(t).forEach((i=>e.setAttribute(i,t[i]))),i.appendChild(e)})),i.seek=t=>i.currentTime=t,this._addSourcesAndTracks(i,i),i}_getTrack(t){if(!t){let t=this.loadedTracks.textTracks.filter((t=>!0===t.default));return t?t[0].track:this.loadedTracks.textTracks[0].track}return t}selectTranscript(t){this.transcriptTrack=this._getTrack(t)}setPlaybackRate(t){t=null!==t?t:1,this.media.playbackRate=null!==t?t:1,globalThis.dispatchEvent(new CustomEvent("playback-rate-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}setVolume(t=70){this.volume=Math.max(0,Math.min(t,100)),this.media&&(this.media.volume=t/100),globalThis.dispatchEvent(new CustomEvent("volume-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleCC(t){this.cc=void 0===t?!this.cc:t,globalThis.dispatchEvent(new CustomEvent("cc-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}get fullscreenTarget(){return this.shadowRoot&&this.shadowRoot.querySelector("#player-section")?this.shadowRoot.querySelector("#player-section"):this}toggleFullscreen(t){super.toggleFullscreen(t),globalThis.dispatchEvent(new CustomEvent("fullscreen-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleLoop(t){this.loop=void 0===t?!this.loop:t,this.media.loop=!0===t,globalThis.dispatchEvent(new CustomEvent("loop-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}togglePlay(){this.__playing?this.pause():this.play(),globalThis.dispatchEvent(new CustomEvent("play-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleMute(t){this.muted=void 0===t?!this.muted:t,globalThis.dispatchEvent(new CustomEvent("muted-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleSettings(t){t=void 0===t?!this.__settingsOpen:t,this.__settingsOpen=t,this.dispatchEvent(new CustomEvent("settings-toggled",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}toggleSticky(t){t=void 0===t?!this.sticky:t,this.sticky!==t&&(this.sticky=t,this.dispatchEvent(new CustomEvent("player-sticky",{bubbles:!0,composed:!0,cancelable:!1,detail:this})))}toggleTranscript(t){(t=void 0===t?this.hideTranscript:t)&&!this.selectTranscriptByKey>-1&&this.selectTranscriptByKey(0),this.hideTranscript=!t,this.dispatchEvent(new CustomEvent("transcript-toggle",{bubbles:!0,composed:!0,cancelable:!1,detail:this}))}_addSourcesAndTracks(t){t.style.width="100%",t.style.maxWidth="100%",Object.keys(t.textTracks).forEach((e=>this._onAddTrack(t.textTracks[e]))),t.textTracks.onremovetrack=t=>this._onRemoveTrack(t.track),t.textTracks.onaddtrack=t=>this._onAddTrack(t.track);let e=t.querySelector("track[default]")?t.querySelector("track[default]"):t.querySelector("track"),i=Object.keys(t.textTracks).find((i=>e.label===t.textTracks[i].label&&e.kind===t.textTracks[i].kind&&e.srclang===t.textTracks[i].scrlang))||0;this.captionsTrack=t.textTracks[i],this.hideTranscript||(this.transcriptTrack=this.captionsTrack),this._handleTimeUpdate()}_handleCloseLink(){this.shadowRoot.querySelector("#link")&&this.shadowRoot.querySelector("#link").close&&this.shadowRoot.querySelector("#link").close()}_handleCopyLink(){let t=globalThis.document.createElement("textarea");this.pause(),t.value=this.shareLink,globalThis.document.body.appendChild(t),t.select(),globalThis.document.execCommand("copy"),globalThis.document.body.removeChild(t),o.showSimpleToast({detail:{duration:3e3,text:`Copied to clipboard: ${this.shareLink}`}})}_handleCueSeek(t){this.standAlone||this.seek(t.startTime)}_handleMediaLoaded(t){this._handleTimeUpdate(),this.youtubeId||this.anchor.target!==this||this.seek(this._getSeconds(this.anchor.params.t||this.anchor.params.start||"0s"))}_handleSearchAdded(t){this.search=t.detail}_handleSpeedChanged(t){var e=r(t)[0];this.setPlaybackRate(e.value)}_handleSliderDragging(t){let e=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");if(e&&!e.disabled&&e.dragging&&this.__playing&&e.dragging){let t=setInterval((()=>{e.dragging||(this.play(),clearInterval(t))}));this.pause()}}_handleSliderChanged(t){let e=!!this.shadowRoot&&this.shadowRoot.querySelector("#slider");this.playing&&e.immediateValue!=this.__currentTime||this.seek(e.immediateValue)}_handleTimeUpdate(){this.__wait||(this.__currentTime=this.media&&this.media.currentTime&&this.media.currentTime>0?this.media.currentTime:0,this.__wait=!0,setTimeout((()=>{this.__wait=!1}),1e3))}_getTrackId(t){return this.loadedTracks&&Object.keys(this.loadedTracks.textTracks).find((e=>this.loadedTracks.textTracks[e]===t))||-1}_handleVolumeChanged(t){var e=r(t)[0];this.volume=e.value}_onAddTrack(t){null===this.captionsTrack&&(this.captionsTrack=t),t&&(t.mode="hidden");let e=setInterval((()=>{if(t.cues&&t.cues.length>0){clearInterval(e);let i=Object.keys(t.cues).map((e=>t.cues[e]));this._onRemoveTrack(t),this.__cues=this.cues.concat(i).sort(((t,e)=>{let i=t.startTime-e.startTime,s=t.endTime-e.endTime;return 0!==i?i:0!==s?s:t.track-e.track}))}}))}_onRemoveTrack(t){this.loadedTracks&&this.loadedTracks.textTracks&&Object.keys(this.loadedTracks.textTracks).filter((e=>this.loadedTracks.textTracks[e]!==t)),this.__cues=this.cues?this.cues.filter((e=>e.track!==t)):[]}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),this.style.setProperty("--a11y-media-transcript-max-height",this.height?"146px":"unset"),this.__loadedTracks=this.getloadedTracks(),this._handleMediaLoaded(),this.__loadedTracks.addEventListener("loadedmetadata",(t=>this._handleMediaLoaded(t))),this.__loadedTracks.addEventListener("timeupdate",(t=>{this._handleTimeUpdate(t)})),globalThis.dispatchEvent(new CustomEvent("responsive-element",{detail:{element:this,attribute:"responsive-size",relativeToParent:!0,sm:400,md:700,lg:1e3,xl:1500}})),globalThis.dispatchEvent(new CustomEvent("a11y-player",{bubbles:!0,composed:!0,cancelable:!1,detail:this})),this.__playerReady=!0}_setActiveCue(t){let e=t.detail.element,i=e.parentNode,s=null!=i?i.offsetTop:0;if(!this.disableScroll){let scrollingTo=(t,e,i)=>{if(!(i<=0)){var s=(e-t.scrollTop)/i*10;setTimeout((()=>{t.scrollTop=t.scrollTop+s,t.scrollTop!==e&&scrollingTo(t,e,i-10)}),10)}};scrollingTo(e.parentNode.parentNode,e.offsetTop-s,250)}}_transcriptScroll(t){this.disableScroll=!this.disableScroll}_getHHMMSS(t,e){t=parseFloat(t),e=void 0===e?t:parseFloat(e);let a=t=>t<10?`0${t}`:t,b=(t,i,s)=>e>=i?a(Math.floor(t/i))+":":s;return b(t,3600,"")+b(t%3600,60,"00:")+a(Math.round(t%60))}_getSeconds(t=0){let e=t.replace(/[hm]{1,2}&?/g,":0").replace(/[s]{1,2}$/g,"").split(/:/);return 3600*(e.length>2?parseInt(e[e.length-3]):0)+60*(e.length>1?parseInt(e[e.length-2]):0)+(e.length>0?parseFloat(e[e.length-1]):0)}_getLocal(t,e,i){let s="";return void 0!==t&&void 0!==t[e]&&void 0!==t[e][i]?s=t[e][i]:void 0!==this.localizationDefaults&&void 0!==this.localizationDefaults[e]&&void 0!==this.localizationDefaults[e][i]&&(s=this.localizationDefaults[e][i]),s}}customElements.define(A11yMediaPlayer.tag,A11yMediaPlayer);export{A11yMediaPlayer}; \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/audio-player/audio-player.js b/build/es6/node_modules/@lrnwebcomponents/audio-player/audio-player.js index 0f9da92824..04108c6776 100644 --- a/build/es6/node_modules/@lrnwebcomponents/audio-player/audio-player.js +++ b/build/es6/node_modules/@lrnwebcomponents/audio-player/audio-player.js @@ -2,4 +2,4 @@ * Copyright 2023 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{VideoPlayer as e}from"../video-player/video-player.js";class AudioPlayer extends e{constructor(){super()}static get tag(){return"audio-player"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!0,gizmo:{title:"Audio",description:"This can present video in a highly accessible manner regardless of source.",icon:"av:music-video",color:"green",tags:["Audio / Video","Media","listen","mp3"],handles:[{type:"audio",type_exclusive:!0,source:"source",title:"caption",caption:"caption",description:"caption",color:"primaryColor"}],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"source",title:"Source",description:"The URL for this media.",inputMethod:"haxupload",noCamera:!0,validationType:"url"},{property:"mediaTitle",title:"Title",description:"Simple title for under video",inputMethod:"textfield",validationType:"text"},{property:"accentColor",title:"Accent color",description:"Select the accent color for the player.",inputMethod:"colorpicker"},{property:"dark",title:"Dark theme",description:"Enable dark theme for the player.",inputMethod:"boolean"},{property:"track",title:"Closed captions",description:"The URL for the captions file.",inputMethod:"haxupload",noCamera:!0,noVoiceRecord:!0,validationType:"url"}],advanced:[{property:"thumbnailSrc",title:"Thumbnail image",description:"Optional. The URL for a thumbnail/poster image.",inputMethod:"haxupload",noVoiceRecord:!0,validationType:"url"},{property:"learningMode",title:"Enable learning mode",description:"Disables fast forward and rewind.",inputMethod:"boolean"},{property:"hideYoutubeLink",title:"Remove open on YouTube button",description:"Removes the button for opening the video on YouTube.",inputMethod:"boolean"},{property:"linkable",title:"Include a share link?",description:"Provides a link to share the video.",inputMethod:"boolean"}],developer:[{property:"crossorigin",title:"Crossorigin",description:"Indicates whether to use CORS.",inputMethod:"select",options:{"":"",anonymous:"anonymous","use-credentials":"use-credentials"}},{property:"allowBackgroundPlay",title:"Allow background playback",description:"Videos pause / play automatically when tab loses focus; this enables video to play without tab having focus",inputMethod:"boolean"},{property:"darkTranscript",title:"Dark theme for transcript",description:"Enable dark theme for the transcript.",inputMethod:"boolean"},{property:"disableInteractive",title:"Disable Interactive",description:"Disable interactive mode that makes transcript clickable.",inputMethod:"boolean"},{property:"hideTimestamps",title:"Hide timestamps",description:"Hide the time stamps on the transcript.",inputMethod:"boolean"},{property:"hideTranscript",title:"Hide Transcript",description:"Hide transcript by default.",inputMethod:"boolean"},{property:"lang",title:"Language",description:"Language of the media.",inputMethod:"textfield",validationType:"text"}]},saveOptions:{unsetAttributes:["__utils","__stand-alone","colors"]},demoSchema:[{tag:"audio-player",properties:{accentColor:"orange",dark:!0,crossorigin:"anonymous",source:"https://inline-audio-mocha.vercel.app/assets/whopper.mp3"},content:""}]}}}customElements.define(AudioPlayer.tag,AudioPlayer);export{AudioPlayer}; \ No newline at end of file +import{VideoPlayer as e}from"../video-player/video-player.js";class AudioPlayer extends e{constructor(){super()}get audioOnly(){return!0}static get tag(){return"audio-player"}static get haxProperties(){return{canScale:!1,canPosition:!1,canEditSource:!0,gizmo:{title:"Audio",description:"This can present video in a highly accessible manner regardless of source.",icon:"av:music-video",color:"green",tags:["Audio / Video","Media","listen","mp3"],handles:[{type:"audio",type_exclusive:!0,source:"source",title:"caption",caption:"caption",description:"caption",color:"primaryColor"}],meta:{author:"HAXTheWeb core team"}},settings:{configure:[{property:"source",title:"Source",description:"The URL for this media.",inputMethod:"haxupload",noCamera:!0,validationType:"url"},{property:"mediaTitle",title:"Title",description:"Simple title for under video",inputMethod:"textfield",validationType:"text"},{property:"accentColor",title:"Accent color",description:"Select the accent color for the player.",inputMethod:"colorpicker"},{property:"dark",title:"Dark theme",description:"Enable dark theme for the player.",inputMethod:"boolean"},{property:"track",title:"Closed captions",description:"The URL for the captions file.",inputMethod:"haxupload",noCamera:!0,noVoiceRecord:!0,validationType:"url"}],advanced:[{property:"thumbnailSrc",title:"Thumbnail image",description:"Optional. The URL for a thumbnail/poster image.",inputMethod:"haxupload",noVoiceRecord:!0,validationType:"url"},{property:"learningMode",title:"Enable learning mode",description:"Disables fast forward and rewind.",inputMethod:"boolean"},{property:"hideYoutubeLink",title:"Remove open on YouTube button",description:"Removes the button for opening the video on YouTube.",inputMethod:"boolean"},{property:"linkable",title:"Include a share link?",description:"Provides a link to share the video.",inputMethod:"boolean"}],developer:[{property:"crossorigin",title:"Crossorigin",description:"Indicates whether to use CORS.",inputMethod:"select",options:{"":"",anonymous:"anonymous","use-credentials":"use-credentials"}},{property:"allowBackgroundPlay",title:"Allow background playback",description:"Videos pause / play automatically when tab loses focus; this enables video to play without tab having focus",inputMethod:"boolean"},{property:"darkTranscript",title:"Dark theme for transcript",description:"Enable dark theme for the transcript.",inputMethod:"boolean"},{property:"disableInteractive",title:"Disable Interactive",description:"Disable interactive mode that makes transcript clickable.",inputMethod:"boolean"},{property:"hideTimestamps",title:"Hide timestamps",description:"Hide the time stamps on the transcript.",inputMethod:"boolean"},{property:"hideTranscript",title:"Hide Transcript",description:"Hide transcript by default.",inputMethod:"boolean"},{property:"lang",title:"Language",description:"Language of the media.",inputMethod:"textfield",validationType:"text"}]},saveOptions:{unsetAttributes:["__utils","__stand-alone","colors"]},demoSchema:[{tag:"audio-player",properties:{accentColor:"orange",dark:!0,crossorigin:"anonymous",source:"https://inline-audio-mocha.vercel.app/assets/whopper.mp3"},content:""}]}}}customElements.define(AudioPlayer.tag,AudioPlayer);export{AudioPlayer}; \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/d-d-d/lib/DDDStyles.js b/build/es6/node_modules/@lrnwebcomponents/d-d-d/lib/DDDStyles.js index e2effe4436..4501b76730 100644 --- a/build/es6/node_modules/@lrnwebcomponents/d-d-d/lib/DDDStyles.js +++ b/build/es6/node_modules/@lrnwebcomponents/d-d-d/lib/DDDStyles.js @@ -515,7 +515,6 @@ Come back to grid in style guide - > decide number of columns based on container details { transition: max-height 4s ease-out; overflow: hidden; - max-height: 50px; display: flex; border-bottom: 2px solid var(--ddd-theme-default-slateMaxLight); position: relative; diff --git a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/package.json b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/package.json index b3c9bfc6bb..b85f185cea 100755 --- a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/package.json +++ b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/package.json @@ -17,7 +17,7 @@ }, "sharedStyles": [] }, - "version": "8.0.1", + "version": "8.0.2", "description": "HAX CMS series of elements to provide a full on CMS", "repository": { "type": "git", @@ -43,58 +43,58 @@ "license": "Apache-2.0", "dependencies": { "@github/time-elements": "3.1.4", - "@lrnwebcomponents/anchor-behaviors": "^8.0.1", - "@lrnwebcomponents/app-hax": "^8.0.1", - "@lrnwebcomponents/beaker-broker": "^8.0.1", - "@lrnwebcomponents/citation-element": "^8.0.1", - "@lrnwebcomponents/clean-two": "^8.0.1", - "@lrnwebcomponents/course-design": "^8.0.1", - "@lrnwebcomponents/dynamic-import-registry": "^8.0.1", - "@lrnwebcomponents/editable-outline": "^8.0.1", - "@lrnwebcomponents/editable-table": "^8.0.1", - "@lrnwebcomponents/full-width-image": "^8.0.1", - "@lrnwebcomponents/git-corner": "^8.0.1", - "@lrnwebcomponents/h-a-x": "^8.0.1", - "@lrnwebcomponents/hax-body": "^8.0.1", - "@lrnwebcomponents/hax-body-behaviors": "^8.0.1", - "@lrnwebcomponents/hax-logo": "^8.0.1", - "@lrnwebcomponents/haxor-slevin": "^8.0.1", - "@lrnwebcomponents/html-block": "^8.0.1", - "@lrnwebcomponents/json-outline-schema": "^8.0.1", - "@lrnwebcomponents/jwt-login": "^8.0.1", - "@lrnwebcomponents/learn-two-theme": "^8.0.1", - "@lrnwebcomponents/lesson-overview": "^8.0.1", - "@lrnwebcomponents/license-element": "^8.0.1", - "@lrnwebcomponents/lunr-search": "^8.0.1", - "@lrnwebcomponents/map-menu": "^8.0.1", - "@lrnwebcomponents/md-block": "^8.0.1", - "@lrnwebcomponents/outline-designer": "^8.0.1", - "@lrnwebcomponents/outline-player": "^8.0.1", - "@lrnwebcomponents/page-contents-menu": "^8.0.1", - "@lrnwebcomponents/page-flag": "^8.0.1", - "@lrnwebcomponents/play-list": "^8.0.1", - "@lrnwebcomponents/portal-launcher": "^8.0.1", - "@lrnwebcomponents/product-card": "^8.0.1", - "@lrnwebcomponents/q-r": "^8.0.1", - "@lrnwebcomponents/replace-tag": "^8.0.1", - "@lrnwebcomponents/retro-card": "^8.0.1", - "@lrnwebcomponents/rpg-character": "^8.0.1", - "@lrnwebcomponents/schema-behaviors": "^8.0.1", - "@lrnwebcomponents/scroll-button": "^8.0.1", - "@lrnwebcomponents/simple-blog": "^8.0.1", - "@lrnwebcomponents/simple-colors": "^8.0.1", - "@lrnwebcomponents/simple-datetime": "^8.0.1", - "@lrnwebcomponents/simple-fields": "^8.0.1", - "@lrnwebcomponents/simple-icon": "^8.0.1", - "@lrnwebcomponents/simple-icon-picker": "^8.0.1", - "@lrnwebcomponents/simple-img": "^8.0.1", - "@lrnwebcomponents/simple-login": "^8.0.1", - "@lrnwebcomponents/simple-picker": "^8.0.1", - "@lrnwebcomponents/simple-progress": "^8.0.1", - "@lrnwebcomponents/simple-toast": "^8.0.1", - "@lrnwebcomponents/simple-tooltip": "^8.0.1", - "@lrnwebcomponents/super-daemon": "^8.0.1", - "@lrnwebcomponents/wc-autoload": "^8.0.1", + "@lrnwebcomponents/anchor-behaviors": "^8.0.2", + "@lrnwebcomponents/app-hax": "^8.0.2", + "@lrnwebcomponents/beaker-broker": "^8.0.2", + "@lrnwebcomponents/citation-element": "^8.0.2", + "@lrnwebcomponents/clean-two": "^8.0.2", + "@lrnwebcomponents/course-design": "^8.0.2", + "@lrnwebcomponents/dynamic-import-registry": "^8.0.2", + "@lrnwebcomponents/editable-outline": "^8.0.2", + "@lrnwebcomponents/editable-table": "^8.0.2", + "@lrnwebcomponents/full-width-image": "^8.0.2", + "@lrnwebcomponents/git-corner": "^8.0.2", + "@lrnwebcomponents/h-a-x": "^8.0.2", + "@lrnwebcomponents/hax-body": "^8.0.2", + "@lrnwebcomponents/hax-body-behaviors": "^8.0.2", + "@lrnwebcomponents/hax-logo": "^8.0.2", + "@lrnwebcomponents/haxor-slevin": "^8.0.2", + "@lrnwebcomponents/html-block": "^8.0.2", + "@lrnwebcomponents/json-outline-schema": "^8.0.2", + "@lrnwebcomponents/jwt-login": "^8.0.2", + "@lrnwebcomponents/learn-two-theme": "^8.0.2", + "@lrnwebcomponents/lesson-overview": "^8.0.2", + "@lrnwebcomponents/license-element": "^8.0.2", + "@lrnwebcomponents/lunr-search": "^8.0.2", + "@lrnwebcomponents/map-menu": "^8.0.2", + "@lrnwebcomponents/md-block": "^8.0.2", + "@lrnwebcomponents/outline-designer": "^8.0.2", + "@lrnwebcomponents/outline-player": "^8.0.2", + "@lrnwebcomponents/page-contents-menu": "^8.0.2", + "@lrnwebcomponents/page-flag": "^8.0.2", + "@lrnwebcomponents/play-list": "^8.0.2", + "@lrnwebcomponents/portal-launcher": "^8.0.2", + "@lrnwebcomponents/product-card": "^8.0.2", + "@lrnwebcomponents/q-r": "^8.0.2", + "@lrnwebcomponents/replace-tag": "^8.0.2", + "@lrnwebcomponents/retro-card": "^8.0.2", + "@lrnwebcomponents/rpg-character": "^8.0.2", + "@lrnwebcomponents/schema-behaviors": "^8.0.2", + "@lrnwebcomponents/scroll-button": "^8.0.2", + "@lrnwebcomponents/simple-blog": "^8.0.2", + "@lrnwebcomponents/simple-colors": "^8.0.2", + "@lrnwebcomponents/simple-datetime": "^8.0.2", + "@lrnwebcomponents/simple-fields": "^8.0.2", + "@lrnwebcomponents/simple-icon": "^8.0.2", + "@lrnwebcomponents/simple-icon-picker": "^8.0.2", + "@lrnwebcomponents/simple-img": "^8.0.2", + "@lrnwebcomponents/simple-login": "^8.0.2", + "@lrnwebcomponents/simple-picker": "^8.0.2", + "@lrnwebcomponents/simple-progress": "^8.0.2", + "@lrnwebcomponents/simple-toast": "^8.0.2", + "@lrnwebcomponents/simple-tooltip": "^8.0.2", + "@lrnwebcomponents/super-daemon": "^8.0.2", + "@lrnwebcomponents/wc-autoload": "^8.0.2", "@polymer/app-layout": "^3.0.2", "@polymer/iron-ajax": "^3.0.1", "@polymer/iron-list": "^3.0.2", @@ -111,8 +111,8 @@ "wired-elements": "3.0.0-rc.6" }, "devDependencies": { - "@lrnwebcomponents/deduping-fix": "^8.0.1", - "@lrnwebcomponents/storybook-utilities": "^8.0.1", + "@lrnwebcomponents/deduping-fix": "^8.0.2", + "@lrnwebcomponents/storybook-utilities": "^8.0.2", "@open-wc/testing": "4.0.0", "@polymer/iron-component-page": "github:PolymerElements/iron-component-page", "@polymer/iron-demo-helpers": "3.1.0", @@ -131,5 +131,5 @@ "web-components", "html" ], - "gitHead": "246242dfc335bb0f3baa59f801241be9d3b69180" + "gitHead": "6e322873c1da195972880b7c146cbadb1e7e84c7" } diff --git a/build/es6/node_modules/@lrnwebcomponents/page-break/lib/page-anchor.js b/build/es6/node_modules/@lrnwebcomponents/page-break/lib/page-anchor.js index 639f94fe7f..c455e2b89d 100644 --- a/build/es6/node_modules/@lrnwebcomponents/page-break/lib/page-anchor.js +++ b/build/es6/node_modules/@lrnwebcomponents/page-break/lib/page-anchor.js @@ -1,4 +1,4 @@ -import{html as t,css as e}from"../../../lit/index.js";import{DDD as i}from"../../d-d-d/d-d-d.js";import{store as r}from"../../haxcms-elements/lib/core/haxcms-site-store.js";import{HAXStore as a}from"../../hax-body/lib/hax-store.js";import{toJS as s}from"../../../mobx/dist/mobx.esm.js";export class PageAnchor extends i{constructor(){super(),this.value=null,this.target=null,this.entityId=null}static get properties(){return{...super.properties,value:{type:String},target:{type:String},entityId:{type:String,attribute:"entity-id"}}}static get styles(){return[super.styles,e` +import{html as t,css as e}from"../../../lit/index.js";import{DDD as i}from"../../d-d-d/d-d-d.js";import{store as r}from"../../haxcms-elements/lib/core/haxcms-site-store.js";import{HAXStore as a}from"../../hax-body/lib/hax-store.js";import{toJS as o}from"../../../mobx/dist/mobx.esm.js";export class PageAnchor extends i{constructor(){super(),this.value=null,this.target=null,this.entityId=null}static get properties(){return{...super.properties,value:{type:String},target:{type:String},entityId:{type:String,attribute:"entity-id"}}}static get styles(){return[super.styles,e` :host { display: inline-block; } @@ -7,11 +7,10 @@ import{html as t,css as e}from"../../../lit/index.js";import{DDD as i}from"../.. --simple-icon-height: var(--ddd-icon-xxs); --simple-icon-width: var(--ddd-icon-xxs); } - `]}clickHandler(t){if(console.log(t.type),this._haxState&&"click"===t.type)return t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!1;let e;e=this._haxState?globalThis.document.querySelector(".haxcms-theme-element "+this.target):a.activeHaxBody.querySelector(this.target),e&&(e.scrollIntoView(),setTimeout((()=>{switch(e.tagName.toLowerCase()){case"video-player":case"audio-player":this.value?e.seek(parseInt(this.value)):e.play();break;case"play-list":e.slide=parseInt(this.value)}}),100))}getMatchFromFields(t,e,i="color"){const o=s(r.entityData);if(o[t]&&o[t][i])return o[t][i];let l;if(l=this._haxState?globalThis.document.querySelector(".haxcms-theme-element "+e):a.activeHaxBody.querySelector(e),l&&e){let t=a.haxSchemaFromTag(l.tagName);if(t&&t.gizmo&&t.gizmo[i])return`--simple-colors-theme-default-${t.gizmo[i]}-3`}return null}render(){return t`{switch(e.tagName.toLowerCase()){case"video-player":case"audio-player":this.value?e.seek(parseInt(this.value)):e.play();break;case"play-list":e.slide=parseInt(this.value)}}),100)):this.target=null}getMatchFromFields(t,e,i="accentColor"){const s=o(r.entityData);if(s[t]&&s[t][i])return"accentColor"==i?`--simple-colors-default-theme-${s[t][i]}-3`:s[t][i];let l;if(l=this._haxState?globalThis.document.querySelector(".haxcms-theme-element "+e):a.activeHaxBody.querySelector(e),l&&e&&"accentColor"==i){let t=a.haxSchemaFromTag(l.tagName);if(t&&t.gizmo&&t.gizmo.color)return`--simple-colors-default-theme-${t.gizmo.color}-3`}return null}render(){let e=this.getMatchFromFields(this.entityId,this.target,"accentColor"),i=this.getMatchFromFields(this.entityId,this.target,"icon");return t`${this.getMatchFromFields(this.entityId,this.target,"icon")?t``:""} + style="${e?`background-color: var(${e})`:""}" + > + ${i?t``:""} - `}static get tag(){return"page-anchor"}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}haxHooks(){return{editModeChanged:"haxeditModeChanged",setupActiveElementForm:"haxsetupActiveElementForm"}}haxeditModeChanged(t){this._haxState=t}haxsetupActiveElementForm(t){var e=[{text:"-- No association --",value:null}];a.activeHaxBody.querySelectorAll("[id],[resource]").forEach((t=>{if(!["PAGE-BREAK","PAGE-ANCHOR","RICH-TEXT-EDITOR-HIGHLIGHT"].includes(t.tagName)){let i=a.haxSchemaFromTag(t.tagName),r=t.gizmo?t.gizmo.title:"",s=t.tagName.toLowerCase();i.gizmo&&i.gizmo.metadata&&i.gizmo.metadata.anchorLabel?r=t[i.gizmo.metadata.anchorLabel]:(""!=t.innerText&&(r=t.innerText),t.getAttribute("id")?(r+=` (${t.getAttribute("id")})`,s=`#${t.getAttribute("id")}`):t.getAttribute("resource")&&(r+=` (${t.getAttribute("resource")})`,s=`[resource="${t.getAttribute("resource")}"]`)),e.push({text:r,value:s})}}));const i=s(r.entityData);var o=[{text:"-- No association --",value:null}];Object.keys(i).map((t=>{o.push({text:i[t].title,value:i[t].id})})),t.settings.configure.forEach(((i,r)=>{"target"===i.property&&(t.settings.configure[r].inputMethod="select",t.settings.configure[r].itemsList=e),"entityId"===i.property&&(t.settings.configure[r].inputMethod="select",t.settings.configure[r].itemsList=o)}))}}globalThis.customElements.define(PageAnchor.tag,PageAnchor); \ No newline at end of file + `}static get tag(){return"page-anchor"}static get haxProperties(){return new URL(`./${this.tag}.haxProperties.json`,import.meta.url).href}haxHooks(){return{editModeChanged:"haxeditModeChanged",setupActiveElementForm:"haxsetupActiveElementForm"}}haxeditModeChanged(t){this._haxState=t}haxsetupActiveElementForm(t){var e=[{text:"-- No association --",value:null}];a.activeHaxBody.querySelectorAll("[id],[resource]").forEach((t=>{if(!["PAGE-BREAK","PAGE-ANCHOR","RICH-TEXT-EDITOR-HIGHLIGHT"].includes(t.tagName)){let i=a.haxSchemaFromTag(t.tagName),r=t.gizmo?t.gizmo.title:"",o=t.tagName.toLowerCase();i.gizmo&&i.gizmo.metadata&&i.gizmo.metadata.anchorLabel?r=t[i.gizmo.metadata.anchorLabel]:(""!=t.innerText&&(r=t.innerText),t.getAttribute("id")?(r+=` (${t.getAttribute("id")})`,o=`#${t.getAttribute("id")}`):t.getAttribute("resource")&&(r+=` (${t.getAttribute("resource")})`,o=`[resource="${t.getAttribute("resource")}"]`)),e.push({text:r,value:o})}}));const i=o(r.entityData);var s=[{text:"-- No association --",value:null}];Object.keys(i).map((t=>{s.push({text:i[t].title,value:i[t].id})})),t.settings.configure.forEach(((i,r)=>{"target"===i.property&&(t.settings.configure[r].inputMethod="select",t.settings.configure[r].itemsList=e),"entityId"===i.property&&(t.settings.configure[r].inputMethod="select",t.settings.configure[r].itemsList=s)}))}}globalThis.customElements.define(PageAnchor.tag,PageAnchor); \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js b/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js index 71a3823856..2acca41454 100644 --- a/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js +++ b/build/es6/node_modules/@lrnwebcomponents/page-section/page-section.js @@ -2,7 +2,7 @@ * Copyright 2023 * @license , see License.md for full text. */ -import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d/d-d-d.js";import"../simple-icon/lib/simple-icon-button-lite.js";import"../simple-tooltip/simple-tooltip.js";class PageSection extends o{constructor(){super(),this.filter=!1,this.fold=!1,this.full=!1,this.scroller=!1,this.bg=null,this.image=null,this.accentColor="blue",this.scrollerLabel="Scroll to reveal content",this.preset=null,this.anchor=null}static get properties(){return{...super.properties,anchor:{type:String},scrollerLabel:{type:String,attribute:"scroller-label"},filter:{type:Boolean,reflect:!0},fold:{type:Boolean,reflect:!0},full:{type:Boolean,reflect:!0},scroller:{type:Boolean,reflect:!0},bg:{type:String},image:{type:String,reflect:!0},preset:{type:String,reflect:!0}}}static get styles(){let t=[];return super.styles&&(t=super.styles),[t,e` +import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d/d-d-d.js";import"../simple-icon/lib/simple-icon-button-lite.js";import"../simple-tooltip/simple-tooltip.js";class PageSection extends o{constructor(){super(),this.AbortControllers=new AbortController,this.filter=!1,this.fold=!1,this.full=!1,this.scroller=!1,this.bg=null,this.image=null,this.accentColor="blue",this.scrollerLabel="Scroll to reveal content",this.preset=null,this.anchor=null}static get properties(){return{...super.properties,anchor:{type:String},scrollerLabel:{type:String,attribute:"scroller-label"},filter:{type:Boolean,reflect:!0},fold:{type:Boolean,reflect:!0},full:{type:Boolean,reflect:!0},scroller:{type:Boolean,reflect:!0},bg:{type:String},image:{type:String,reflect:!0},preset:{type:String,reflect:!0}}}static get styles(){let t=[];return super.styles&&(t=super.styles),[t,e` :host { display: block; } @@ -54,6 +54,7 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d position: relative; background-position: 50%; background-size: cover; + transition: background-color 1s linear; } :host([full]) .section { height: 100vh; @@ -79,7 +80,7 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d color: var(--simple-colors-default-theme-accent-12); } :host([fold]) .scroller { - margin-top: calc(var(--ddd-spacing-25) * -1); + margin-top: calc(var(--ddd-spacing-20) * -1); } .scroller { position: relative; @@ -92,6 +93,7 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d height: var(--ddd-icon-xl); margin-top: calc(var(--ddd-icon-xl) * -1); z-index: 11; + animation: fullwidth-header-bounce 2.8s ease-out infinite; } .scroller:focus-within::part(icon), .scroller:focus::part(icon), @@ -100,6 +102,19 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d --simple-icon-width: var(--ddd-icon-xl); --simple-icon-height: var(--ddd-icon-xl); } + + @keyframes fullwidth-header-bounce { + 0% { + transform: translateY(0%); + } + 12.5% { + transform: translateY(20%); + } + 25% { + transform: translateY(0%); + } + } + simple-tooltip { --simple-tooltip-font-size: var( --page-section-tooltip-font-size, @@ -267,8 +282,14 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d border-top-color: var(--ddd-theme-default-skyBlue) !important; width: var(--ddd-spacing-10) !important; } + :host([fold]:not([full])) .section { + padding-bottom: var(--ddd-spacing-20); + } + :host([scroller]:not([full])) .content { + padding-bottom: var(--ddd-spacing-20); + } } - @media (max-width: 768px) and (orientation: landscape) { + @media (max-width: 900px) and (orientation: landscape) { .fold { height: var(--ddd-spacing-22); } @@ -286,10 +307,10 @@ import{html as t,css as e}from"../../lit/index.js";import{DDD as o}from"../d-d-d --simple-icon-height: var(--ddd-icon-md); } :host([fold]) .scroller { - margin-top: calc(var(--ddd-spacing-20) * -1); + margin-top: calc(var(--ddd-spacing-15) * -1); } } - `]}cleanAnchor(t){return t?t.replace(/[^a-zA-Z]+/g,"").toLowerCase():""}updated(t){if(t.has("preset")&&this.preset)switch(this.preset){case"antihero":this.bg="var(--ddd-theme-default-limestoneLight)",this.image=new URL("./lib/assets/geo-bkg.png",import.meta.url).href;break;case"video":this.bg="var(--ddd-theme-default-limestoneLight)",this.image=null;break;case"antihero-light":this.bg="var(--ddd-theme-default-slateMaxLight)",this.image=null;break;case"lines":this.bg="var(--ddd-theme-default-white)",this.image=new URL("./lib/assets/texture-lines.svg",import.meta.url).href}t.has("anchor")&&this.anchor&&this.shadowRoot&&!this.getAttribute("id")&&this.setAttribute("id",this.cleanAnchor(this.anchor))}bgStyle(t,e,o){return e?`background-color: ${t};background-image:var(--ddd-theme-default-gradient-antihero),url("${o}");`:`background-color: ${t};background-image: url("${o}");`}render(){return t` + `]}cleanAnchor(t){return t?t.replace(/[^a-zA-Z]+/g,"").toLowerCase():""}videoPlay(t){this.bg="var(--ddd-theme-default-coalyGray)"}videoPause(t){this.bg="var(--ddd-theme-default-limestoneLight)"}updated(t){if(t.has("preset")&&this.preset)switch(this.preset){case"antihero":this.bg="var(--ddd-theme-default-limestoneLight)",this.image=new URL("./lib/assets/geo-bkg.png",import.meta.url).href;break;case"video":this.bg="var(--ddd-theme-default-limestoneLight)",this.image=null,this.AbortControllers.abort(),this.AbortControllers=new AbortController,this.addEventListener("play",this.videoPlay.bind(this),{signal:this.AbortControllers.signal}),this.addEventListener("pause",this.videoPause.bind(this),{signal:this.AbortControllers.signal});break;case"antihero-light":this.bg="var(--ddd-theme-default-slateMaxLight)",this.image=null;break;case"lines":this.bg="var(--ddd-theme-default-white)",this.image=new URL("./lib/assets/texture-lines.svg",import.meta.url).href}t.has("anchor")&&this.anchor&&this.shadowRoot&&!this.getAttribute("id")&&this.setAttribute("id",this.cleanAnchor(this.anchor))}bgStyle(t,e,o){return e?`background-color: ${t};background-image:var(--ddd-theme-default-gradient-antihero),url("${o}");`:`background-color: ${t};background-image: url("${o}");`}render(){return t`
", - "properties": {} + "properties": { + "pagination": true, + "navigation": true, + "loop": true + } } ] } diff --git a/build/es6/node_modules/@lrnwebcomponents/play-list/play-list.js b/build/es6/node_modules/@lrnwebcomponents/play-list/play-list.js index f4464ad907..e58d6525d6 100644 --- a/build/es6/node_modules/@lrnwebcomponents/play-list/play-list.js +++ b/build/es6/node_modules/@lrnwebcomponents/play-list/play-list.js @@ -2,7 +2,7 @@ * Copyright 2023 * @license , see License.md for full text. */ -import{LitElement as t,html as e,css as i,nothing as o}from"../../lit/index.js";import{unsafeHTML as s}from"../../lit/directives/unsafe-html.js";import"../../@shoelace-style/shoelace/dist/components/carousel/carousel.js";import"../../@shoelace-style/shoelace/dist/components/carousel-item/carousel-item.js";import"../simple-icon/lib/simple-icon-lite.js";import{generateStyleLinkEls as a}from"./lib/SLStyleManager.js";import{haxElementToNode as r,nodeToHaxElement as l,copyToClipboard as n}from"../utils/utils.js";class PlayList extends t{constructor(){super(),a(),this.items=[],this.loop=!1,this.edit=!1,this.navigation=!0,this.pagination=!0,this.aspectRatio="16:9",this.slide=0,this.orientation="horizontal",this._observer=new MutationObserver((t=>{clearTimeout(this._debounceMutations),this._debounceMutations=setTimeout((()=>{this.mirrorLightDomToItems()}),100)})),this._observer.observe(this,{childList:!0,subtree:!0})}async mirrorLightDomToItems(){let t=Array.from(this.children);1===t.length&&"TEMPLATE"===t[0].tagName&&(t=Array.from(t[0].children)),0!==t.length?await Promise.all(t.map((async t=>await l(t)))).then((t=>{this.items=t})):this.items=[]}renderHAXItem(t){return t.properties.innerHTML&&delete t.properties.innerHTML,e`${s(r(t).outerHTML)}`}static get haxProperties(){return new URL(`./lib/${this.tag}.haxProperties.json`,import.meta.url).href}disconnectedCallback(){this._linkEls&&(document.head.removeChild(this._linkEls[0]),document.head.removeChild(this._linkEls[1])),super.disconnectedCallback()}static get properties(){return{items:{type:Array},loop:{type:Boolean,reflect:!0},edit:{type:Boolean,reflect:!0},navigation:{type:Boolean,reflect:!0},pagination:{type:Boolean,reflect:!0},aspectRatio:{type:String,reflect:!0,attribute:"aspect-ratio"},orientation:{type:String,reflect:!0},slide:{type:Number,reflect:!0}}}static get styles(){let t=[];return super.styles&&(t=super.styles),[t,i` +import{LitElement as t,html as e,css as i,nothing as o}from"../../lit/index.js";import{unsafeHTML as s}from"../../lit/directives/unsafe-html.js";import"../../@shoelace-style/shoelace/dist/components/carousel/carousel.js";import"../../@shoelace-style/shoelace/dist/components/carousel-item/carousel-item.js";import"../simple-icon/lib/simple-icon-button-lite.js";import{generateStyleLinkEls as a}from"./lib/SLStyleManager.js";import{haxElementToNode as r,nodeToHaxElement as l,copyToClipboard as n}from"../utils/utils.js";class PlayList extends t{constructor(){super(),a(),this.items=[],this.loop=!1,this.edit=!1,this.navigation=!1,this.pagination=!1,this.aspectRatio="16:9",this.slide=0,this.orientation="horizontal",this._observer=new MutationObserver((t=>{clearTimeout(this._debounceMutations),this._debounceMutations=setTimeout((()=>{this.mirrorLightDomToItems()}),100)})),this._observer.observe(this,{childList:!0,subtree:!0})}async mirrorLightDomToItems(){let t=Array.from(this.children);1===t.length&&"TEMPLATE"===t[0].tagName&&(t=Array.from(t[0].children)),0!==t.length?await Promise.all(t.map((async t=>await l(t)))).then((t=>{this.items=t})):this.items=[]}renderHAXItem(t){return t.properties.innerHTML&&delete t.properties.innerHTML,e`${s(r(t).outerHTML)}`}static get haxProperties(){return new URL(`./lib/${this.tag}.haxProperties.json`,import.meta.url).href}disconnectedCallback(){this._linkEls&&(document.head.removeChild(this._linkEls[0]),document.head.removeChild(this._linkEls[1])),super.disconnectedCallback()}static get properties(){return{items:{type:Array},loop:{type:Boolean,reflect:!0},edit:{type:Boolean,reflect:!0},navigation:{type:Boolean,reflect:!0},pagination:{type:Boolean,reflect:!0},aspectRatio:{type:String,reflect:!0,attribute:"aspect-ratio"},orientation:{type:String,reflect:!0},slide:{type:Number,reflect:!0}}}static get styles(){let t=[];return super.styles&&(t=super.styles),[t,i` :host { display: block; } diff --git a/build/es6/node_modules/@lrnwebcomponents/simple-cta/simple-cta.js b/build/es6/node_modules/@lrnwebcomponents/simple-cta/simple-cta.js index 0cebe5bbd0..865522bc42 100644 --- a/build/es6/node_modules/@lrnwebcomponents/simple-cta/simple-cta.js +++ b/build/es6/node_modules/@lrnwebcomponents/simple-cta/simple-cta.js @@ -111,7 +111,10 @@ import{html as e,css as t}from"../../lit/index.js";import{remoteLinkBehavior as --component-border-color, var(--ddd-theme-default-link) ); - padding: 0.75rem 0.75rem 0.75rem 1.5rem; + padding: var( + --simple-cta-button-padding, + 0.75rem 0.75rem 0.75rem 1.5rem + ); transition: all 0.2s ease-out; background-color: var(--component-background-color, transparent); font-weight: var(--ddd-font-primary-medium); diff --git a/build/es6/node_modules/@lrnwebcomponents/video-player/video-player.js b/build/es6/node_modules/@lrnwebcomponents/video-player/video-player.js index 39e088e598..c2399d36ff 100644 --- a/build/es6/node_modules/@lrnwebcomponents/video-player/video-player.js +++ b/build/es6/node_modules/@lrnwebcomponents/video-player/video-player.js @@ -2,9 +2,10 @@ * Copyright 2018 The Pennsylvania State University * @license Apache-2.0, see License.md for full text. */ -import{css as e,html as t}from"../../lit/index.js";import{DDD as i}from"../d-d-d/d-d-d.js";import"../a11y-media-player/a11y-media-player.js";import{I18NMixin as a}from"../i18n-manager/lib/I18NMixin.js";import{IntersectionObserverMixin as o}from"../intersection-element/lib/IntersectionObserverMixin.js";import{MediaBehaviorsVideo as r}from"../media-behaviors/media-behaviors.js";import{SchemaBehaviors as s}from"../schema-behaviors/schema-behaviors.js";import{copyToClipboard as l}from"../utils/utils.js";class VideoPlayer extends(o(r(s(a(i))))){static get styles(){return[super.styles,e` +import{css as e,html as t}from"../../lit/index.js";import{DDD as i}from"../d-d-d/d-d-d.js";import"../a11y-media-player/a11y-media-player.js";import{I18NMixin as a}from"../i18n-manager/lib/I18NMixin.js";import{IntersectionObserverMixin as r}from"../intersection-element/lib/IntersectionObserverMixin.js";import{MediaBehaviorsVideo as o}from"../media-behaviors/media-behaviors.js";import{SchemaBehaviors as s}from"../schema-behaviors/schema-behaviors.js";import{copyToClipboard as l}from"../utils/utils.js";class VideoPlayer extends(r(o(s(a(i))))){static get styles(){return[super.styles,e` :host { display: block; + margin: var(--ddd-spacing-4) 0; } .video-caption {