diff --git a/build/es6/node_modules/@lrnwebcomponents/a11y-gif-player/lib/a11y-gif-player.haxProperties.json b/build/es6/node_modules/@lrnwebcomponents/a11y-gif-player/lib/a11y-gif-player.haxProperties.json index 3756bbff6c..ab55b7dc1c 100644 --- a/build/es6/node_modules/@lrnwebcomponents/a11y-gif-player/lib/a11y-gif-player.haxProperties.json +++ b/build/es6/node_modules/@lrnwebcomponents/a11y-gif-player/lib/a11y-gif-player.haxProperties.json @@ -77,7 +77,7 @@ ] }, "saveOptions": { - "unsetAttributes": ["element-visible", "t"] + "unsetAttributes": ["__playing", "__gif-loaded", "element-visible", "t"] }, "demoSchema": [ { diff --git a/build/es6/node_modules/@lrnwebcomponents/accent-card/accent-card.js b/build/es6/node_modules/@lrnwebcomponents/accent-card/accent-card.js index 16b59bb9c0..4b22959ad2 100644 --- a/build/es6/node_modules/@lrnwebcomponents/accent-card/accent-card.js +++ b/build/es6/node_modules/@lrnwebcomponents/accent-card/accent-card.js @@ -187,6 +187,7 @@ import{LitElement as t,html as e,css as o}from"../../lit/index.js";import{Simple ); padding-bottom: var(--accent-card-heading-padding-bottom, 0px); margin: 0; + overflow: hidden; } ::slotted(*[slot="heading"]) { font-size: 26px; @@ -198,6 +199,7 @@ import{LitElement as t,html as e,css as o}from"../../lit/index.js";import{Simple } #heading div { flex: 0 0 auto; + width: 100%; } #heading [data-layout-slotname="heading"] { margin: 0; diff --git a/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js b/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js index 50fe51002b..6c1c51e3ca 100644 --- a/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js +++ b/build/es6/node_modules/@lrnwebcomponents/app-hax/lib/rpg-character-toast/rpg-character-toast.js @@ -41,7 +41,7 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S :host { --simple-toast-bottom: 0px; --simple-toast-bottom-offscreen: -284px; - height: 142px; + height: var(--rpg-character-toast-height, 142px); display: none; width: var(--simple-toast-width, auto); color: var( @@ -66,18 +66,19 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S width: 64px; margin: 0; padding: 0; + display: var(--rpg-character-toast-display); } .bubble { - height: 142px; + height: var(--rpg-character-toast-height, 142px); display: inline-flex; margin-top: 6px; } .mid { - line-height: 142px; + line-height: var(--rpg-character-toast-height, 142px); background-color: white; background-repeat: repeat-x; - background-image: url("${i(s)}"); - padding: 54px 2px 0 2px; + background-image: var(--rpg-character-toast-mid-background-image, url("${i(s)}")); + padding: var(--rpg-character-toast-mid-padding, 54px 2px 0 2px); display: block; } .message { @@ -104,12 +105,12 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S cursor: pointer; } .leftedge { - background-image: url("${i(l)}"); + background-image: var(--rpg-character-toast-left-background-image, url("${i(l)}")); width: 20px; background-color: white; } .rightedge { - background-image: url("${i(r)}"); + background-image: var(--rpg-character-toast-right-background-image, url("${i(r)}")); width: 40px; background-color: white; } @@ -118,9 +119,9 @@ import{css as t,html as e,unsafeCSS as i}from"../../../../lit/index.js";import{S :host([dark-mode]) .rightedge { filter: invert(1); } - `]}static get properties(){return{...super.properties,darkMode:{type:Boolean,reflect:!0,attribute:"dark-mode"},fire:{type:Boolean},hat:{type:String},walking:{type:Boolean},speed:{type:Number},opened:{type:Boolean,reflect:!0},awaitingMerlinInput:{type:Boolean,attribute:"awaiting-merlin-input"},merlin:{type:Boolean},future:{type:Boolean},text:{type:String},classStyle:{type:String,attribute:"class-style"},duration:{type:Number},eventCallback:{type:String,attribute:"event-callback"}}}render(){return e`
Class: xs
Class: sm
Class: md
Class: lg
Class: b-xs
++ css variable: --ddd-border-xs +
+Class: b-sm
++ css variable: --ddd-border-sm +
+Class: b-md
++ css variable: --ddd-border-md +
+Class: b-lg
++ css variable: --ddd-border-lg +
+Accessible via css variables: --ddd-breakpoint-x
`}renderPolarisColors(){return s` -class: bg-gradient-navBar
class: bg-gradient-footer
class: bg-gradient-newsFeature
class: bg-gradient-buttons
class: bg-gradient-hero
class: bg-gradient-hero2
class: bg-gradient-navBar
+css variable: --ddd-theme-polaris-gradient-navBar
+class: bg-gradient-footer
+css variable: --ddd-theme-polaris-gradient-footer
+class: bg-gradient-newsFeature
+css variable: --ddd-theme-polaris-gradient-newsFeature
+class: bg-gradient-buttons
+css variable: --ddd-theme-polaris-gradient-buttons
+class: bg-gradient-hero
+css variable: --ddd-theme-polaris-gradient-hero
+class: bg-gradient-hero2
+css variable: --ddd-theme-polaris-gradient-hero2
+class: r-xs
class: r-sm
class: r-md
class: r-lg
class: r-xl
class: r-rounded
class: r-circle
class: r-xs
+css variable: --ddd-radius-xs
+class: r-sm
+css variable: --ddd-radius-sm
+class: r-md
+css variable: --ddd-radius-md
+class: r-lg
+css variable: --ddd-radius-lg
+class: r-xl
+css variable: --ddd-radius-xl
+class: r-rounded
+css variable: --ddd-radius-rounded
+class: r-circle
+css variable: --ddd-radius-circle
+class: bs-xs
class: bs-sm
class: bs-md
class: bs-lg
class: bs-xs
+css variable: --ddd-boxShadow-xs
+class: bs-sm
+css variable: --ddd-boxShadow-sm
+class: bs-md
+css variable: --ddd-boxShadow-md
+class: bs-lg
+css variable: --ddd-boxShadow-lg
+class: bs-xs
class: bs-sm
class: bs-md
class: bs-lg
class: bs-xs
+css variable: --ddd-textShadow-xs
+class: bs-sm
+css variable: --ddd-textShadow-sm
+class: bs-md
+css variable: --ddd-textShadow-md
+class: bs-lg
+css variable: --ddd-textShadow-lg
+Primary Font: Roboto
-Class: ddd-font-primary
-Weights: 400(regular), 500(medium), 700(bold), 900(black)
++ Primary Font: + Roboto (ddd-font-primary) [--ddd-font-primary] +
++ Weights: 400 (fw-1) [--ddd-font-primary-regular], + 500 (fw-2) [--ddd-font-primary-medium], + << Default >> 700 (fw-3) [--ddd-font-primary-bold], + 900 (fw-4) [--ddd-font-primary-black] +
16
18
20
24
28
32
36
40
44
48
56
64
72
16
+18
+20
+24
+28
+32
+36
+40
+44
+48
+56
+64
+72
+Primary Font: Roboto Slab
-Class: ddd-font-secondary
-Weights: 700(bold)
++ Primary Font: + Roboto Slab (ddd-font-secondary) [--ddd-font-secondary] +
++ Weights: + 700 (fw-3) [--ddd-font-secondary-bold] +
16
18
20
24
28
32
36
40
44
48
56
64
72
16
+18
+20
+24
+28
+32
+36
+40
+44
+48
+56
+64
+72
+Primary Font: Roboto Condesned
-Class: ddd-font-nav
-Weights: 300(light), 700(bold)
-16
18
20
24
28
32
36
40
44
48
56
64
72
Classes: ddd-font-primary, ddd-font-secondary, ddd-font-nav
-Classes: fw-0, fw-1, fw-2, fw-3, fw-4
-Classes: fs-x (4xs, 3xs, 2xs, xs, s, ms, m, ml, l, xl, 2xl, 3xl, 4xl)
-Class | Value | Example | -
---|---|---|
ls-16-sm | 0.08px | DDD-FLEX |
ls-18-sm | 0.09px | DDD-FLEX |
ls-20-sm | 0.1px | DDD-FLEX |
ls-24-sm | 0.12px | DDD-FLEX |
ls-28-sm | 0.14px | DDD-FLEX |
ls-32-sm | 0.16px | DDD-FLEX |
ls-36-sm | 0.18px | DDD-FLEX |
ls-40-sm | 0.2px | DDD-FLEX |
ls-44-sm | 0.22px | DDD-FLEX |
ls-48-sm | 0.24px | DDD-FLEX |
ls-56-sm | 0.28px | DDD-FLEX |
ls-64-sm | 0.32px | DDD-FLEX |
ls-72-sm | 0.36px | DDD-FLEX |
ls-16-lg | 0.24px | DDD-FLEX |
ls-18-lg | 0.27px | DDD-FLEX |
ls-20-lg | 0.3px | DDD-FLEX |
ls-24-lg | 0.36px | DDD-FLEX |
ls-28-lg | 0.42px | DDD-FLEX |
ls-32-lg | 0.48px | DDD-FLEX |
ls-36-lg | 0.54px | DDD-FLEX |
ls-40-lg | 0.6px | DDD-FLEX |
ls-44-lg | 0.66px | DDD-FLEX |
ls-48-lg | 0.72px | DDD-FLEX |
ls-56-lg | 0.84px | DDD-FLEX |
ls-64-lg | 0.96px | DDD-FLEX |
ls-72-lg | 1.08px | DDD-FLEX |
So, I came across your post because I was facing the same issue, but I've found a solution.
-Class: lh-120
-So, I came across your post because I was facing the same issue, but I've found a solution.
-Class: lh-140
++ Primary Font: + Roboto Condensed (ddd-font-nav) [--ddd-font-navigation] +
++ Weights: + 300 (fw-0) [--ddd-font-navigation-light], + 400 (fw-1) [--ddd-font-navigation-regular], + 700 (fw-3) [--ddd-font-navigation-bold] +
So, I came across your post because I was facing the same issue, but I've found a solution.
-Class: lh-150
+16
+18
+20
+24
+28
+32
+36
+40
+44
+48
+56
+64
+72
+So, I came across your post because I was facing the same issue, but I've found a solution.
-Class: lh-auto
+Class | +Value | +Example | + +
---|---|---|
ls-16-sm | +0.08px | +DDD-FLEX | +
ls-18-sm | +0.09px | +DDD-FLEX | +
ls-20-sm | +0.1px | +DDD-FLEX | +
ls-24-sm | +0.12px | +DDD-FLEX | +
ls-28-sm | +0.14px | +DDD-FLEX | +
ls-32-sm | +0.16px | +DDD-FLEX | +
ls-36-sm | +0.18px | +DDD-FLEX | +
ls-40-sm | +0.2px | +DDD-FLEX | +
ls-44-sm | +0.22px | +DDD-FLEX | +
ls-48-sm | +0.24px | +DDD-FLEX | +
ls-56-sm | +0.28px | +DDD-FLEX | +
ls-64-sm | +0.32px | +DDD-FLEX | +
ls-72-sm | +0.36px | +DDD-FLEX | +
ls-16-lg | +0.24px | +DDD-FLEX | +
ls-18-lg | +0.27px | +DDD-FLEX | +
ls-20-lg | +0.3px | +DDD-FLEX | +
ls-24-lg | +0.36px | +DDD-FLEX | +
ls-28-lg | +0.42px | +DDD-FLEX | +
ls-32-lg | +0.48px | +DDD-FLEX | +
ls-36-lg | +0.54px | +DDD-FLEX | +
ls-40-lg | +0.6px | +DDD-FLEX | +
ls-44-lg | +0.66px | +DDD-FLEX | +
ls-48-lg | +0.72px | +DDD-FLEX | +
ls-56-lg | +0.84px | +DDD-FLEX | +
ls-64-lg | +0.96px | +DDD-FLEX | +
ls-72-lg | +1.08px | +DDD-FLEX | +
+ So, I came across your post because I was facing the same issue, + but I've found a solution. +
+Class: lh-120
++ CSS Variable: --ddd-lh-120 +
++ So, I came across your post because I was facing the same issue, + but I've found a solution. +
+Class: lh-140
++ CSS Variable: --ddd-lh-140 +
++ So, I came across your post because I was facing the same issue, + but I've found a solution. +
+Class: lh-150
++ CSS Variable: --ddd-lh-150 +
++ So, I came across your post because I was facing the same issue, + but I've found a solution. +
+Class: lh-auto
++ CSS Variable: N/A +
+Body text - It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of leteters, as opposed to using 'Content here, content here', making it look like readable English.
- -Bold Text
-Italic Text
- Underlined Text -Unordered List
-Ordered List
-The Pennsylvania State University is a multi-campus, land-grant, public research university that educates students from around the world and supports individuals and communities through integrated programs of teaching, research, and service.-
Details text
+ Body text - It is a long established fact that a reader will be + distracted by the readable content of a page when looking at its + layout. The point of using Lorem Ipsum is that it has a more-or-less + normal distribution of leteters, as opposed to using 'Content here, + content here', making it look like readable English. +
+ +Bold Text
+Italic Text
+ Underlined Text +Unordered List
+Ordered List
++ The Pennsylvania State University is a multi-campus, land-grant, + public research university that educates students from around the + world and supports individuals and communities through integrated + programs of teaching, research, and service. ++
Details text
+
+ This is an example of code:Console.log("Hello World!");
+ in a paragraph
+
Here is an example of a block of code on it's own, using class
+ 'block-code', redundant, but avoids common 'block' class name
+ +Here is an example of a block using the 'pre' tag on it's own+
Here is a good example of some Highlighted Text
++ Here is an example of an abbreviation: + Penn State +
+Column one content to replace
Column two content to replace
'}]}}static get properties(){return{itemPadding:{type:Number,reflect:!0,attribute:"item-padding"},itemMargin:{type:Number,reflect:!0,attribute:"item-margin"},breakpointSm:{type:Number,attribute:"breakpoint-sm"},breakpointMd:{type:Number,attribute:"breakpoint-md"},breakpointLg:{type:Number,attribute:"breakpoint-lg"},breakpointXl:{type:Number,attribute:"breakpoint-xl"},columns:{type:Number,reflect:!0},dataHaxRay:{type:String,attribute:"data-hax-ray",reflect:!0},disableResponsive:{type:Boolean,reflect:!0,attribute:"disable-responsive"},layout:{type:String,reflect:!0},layouts:{type:Object},ready:{type:Boolean,reflect:!0},responsiveSize:{type:String,reflect:!0,attribute:"responsive-size"},__columnWidths:{type:String}}}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{switch(["responsiveSize","layout","layouts","disableResponsive","itemPadding","itemMargin"].includes(e)&&(clearTimeout(this.__calcWidthLock),this.__calcWidthLock=setTimeout((()=>{this.__columnWidths=this._getColumnWidths(this.responsiveSize,this.layout,this.layouts,this.disableResponsive)}),0)),e){case"itemMargin":this[e]?this.style.setProperty("--grid-plate-item-margin",this[e]+"px"):this.style.removeProperty("--grid-plate-item-margin");break;case"itemPadding":this[e]?this.style.setProperty("--grid-plate-item-padding",this[e]+"px"):this.style.removeProperty("--grid-plate-item-padding");break;case"__columnWidths":this.resize();break;case"disableResponsive":this.dispatchEvent(new CustomEvent("disable-responsive-changed",{detail:this[e]}))}}))}resize(){window.dispatchEvent(new Event("resize"))}_getColumnWidths(t="sm",e="1-1",a,i){if(a){let o=a[e],r=!1!==i?"xl":t,s={12:"1","8/4":"2-1","6/6":"1-1","4/8":"1-2","4/4/4":"1-1-1","3/3/3/3":"1-1-1-1"}[e];if(void 0!==o&&void 0!==o[r])return a[e][r];if(void 0!==a[s]&&void 0!==a[s][r])return a[s][r];if(void 0!==a["1-1"])return a["1-1"][r]}}_getColumnWidth(t,e){return void 0!==e&&void 0!==e[t]?"width:"+e[t]:"min-height: unset"}_getColumns(t){return t.length}haxactiveElementChanged(t,e){}}customElements.define(GridPlate.tag,GridPlate);export{GridPlate}; \ No newline at end of file + `}_drop(t){this.dataHaxRay&&(this.querySelectorAll(".active").forEach((t=>{t.classList.remove("active")})),this.shadowRoot.querySelectorAll(".active").forEach((t=>{t.classList.remove("active")})))}_dragEnter(t){this.dataHaxRay&&t.target.classList.add("active")}_dragleave(t){this.dataHaxRay&&t.target.classList.remove("active")}static get tag(){return"grid-plate"}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),setTimeout((()=>{this.ready=!0}),100),this.resize(),window.dispatchEvent(new CustomEvent("responsive-element",{detail:{element:this,attribute:"responsive-size",relativeToParent:!1,sm:this.breakpointSm,md:this.breakpointMd,lg:this.breakpointLg,xl:this.breakpointXl}})),this.__columnWidths=this._getColumnWidths(this.responsiveSize,this.layout,this.layouts,this.disableResponsive)}static get haxProperties(){return{type:"grid",canScale:!0,canPosition:!0,canEditSource:!0,contentEditable:!1,gizmo:{title:"Column layout",description:"Layout material in simple columns",icon:"hax:3-3-3-3",color:"grey",tags:["Layout","content","grid","column","row","responsive","gridplate"],handles:[],meta:{author:"HAXTheWeb core team",owner:"The Pennsylvania State University"}},settings:{configure:[{property:"layout",title:"Column Layout",description:"Style to present these items (may change for small screens)",inputMethod:"select",options:(new GridPlateLayoutOptions).options},{property:"disableResponsive",title:"Disable responsive",description:"Check box to force layout to stick regardless of screen size",inputMethod:"boolean"},{property:"itemPadding",title:"Item Padding",description:"Padding inside each item",step:8,max:128,min:0,inputMethod:"slider",suffix:"px"},{property:"itemMargin",title:"Item margins",description:"Margin between items",step:8,max:64,min:0,inputMethod:"slider",suffix:"px"}],advanced:[],developer:[{property:"breakpointSm",title:"Small Breakpoint",description:"Anything less than this number (in pixels) will render with the smallest version of this layout",inputMethod:"textfield",validationType:"number"},{property:"breakpointMd",title:"Medium Breakpoint",description:"Anything less than this number (in pixels) will render with the small version of this layout",inputMethod:"textfield",validationType:"number"},{property:"breakpointLg",title:"Large Breakpoint",description:"Anything less than this number (in pixels) will render with the medium version of this layout.",inputMethod:"textfield",validationType:"number"},{property:"breakpointXl",title:"Extra-Large Breakpoint",description:"Anything less than this number (in pixels) will render with the large version of this layout. Anything greater than or equal to this number will display with the maximum number of columns for this layout.",inputMethod:"textfield",validationType:"number"}]},saveOptions:{unsetAttributes:["ready","layouts","columns","options","responsive-width"]},demoSchema:[{tag:"grid-plate",properties:{disableResponsive:!0,itemMargin:16,itemPadding:16},content:'Column one content to replace
Column two content to replace
'}]}}static get properties(){return{itemPadding:{type:Number,reflect:!0,attribute:"item-padding"},itemMargin:{type:Number,reflect:!0,attribute:"item-margin"},breakpointSm:{type:Number,attribute:"breakpoint-sm"},breakpointMd:{type:Number,attribute:"breakpoint-md"},breakpointLg:{type:Number,attribute:"breakpoint-lg"},breakpointXl:{type:Number,attribute:"breakpoint-xl"},columns:{type:Number,reflect:!0},dataHaxRay:{type:String,attribute:"data-hax-ray",reflect:!0},disableResponsive:{type:Boolean,reflect:!0,attribute:"disable-responsive"},layout:{type:String,reflect:!0},layouts:{type:Object},ready:{type:Boolean,reflect:!0},responsiveSize:{type:String,reflect:!0,attribute:"responsive-size"},__columnWidths:{type:String}}}updated(t){super.updated&&super.updated(t),t.forEach(((t,e)=>{switch(["responsiveSize","layout","layouts","disableResponsive","itemPadding","itemMargin"].includes(e)&&(clearTimeout(this.__calcWidthLock),this.__calcWidthLock=setTimeout((()=>{this.__columnWidths=this._getColumnWidths(this.responsiveSize,this.layout,this.layouts,this.disableResponsive)}),0)),e){case"itemMargin":this[e]?this.style.setProperty("--grid-plate-item-margin",this[e]+"px"):this.style.removeProperty("--grid-plate-item-margin");break;case"itemPadding":this[e]?this.style.setProperty("--grid-plate-item-padding",this[e]+"px"):this.style.removeProperty("--grid-plate-item-padding");break;case"__columnWidths":this.resize();break;case"disableResponsive":this.dispatchEvent(new CustomEvent("disable-responsive-changed",{detail:this[e]}))}}))}resize(){window.dispatchEvent(new Event("resize"))}_getColumnWidths(t="sm",e="1-1",a,i){if(a){let o=a[e],r=!1!==i?"xl":t,s={12:"1","8/4":"2-1","6/6":"1-1","4/8":"1-2","4/4/4":"1-1-1","3/3/3/3":"1-1-1-1"}[e];if(void 0!==o&&void 0!==o[r])return a[e][r];if(void 0!==a[s]&&void 0!==a[s][r])return a[s][r];if(void 0!==a["1-1"])return a["1-1"][r]}}_getColumnWidth(t,e){return void 0!==e&&void 0!==e[t]?"width:"+e[t]:"min-height: unset"}_getColumns(t){return t.length}haxactiveElementChanged(t,e){}}customElements.define(GridPlate.tag,GridPlate);export{GridPlate}; \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-editor-ui.js b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-editor-ui.js index 924ba81b79..75aaa983f4 100644 --- a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-editor-ui.js +++ b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/core/haxcms-site-editor-ui.js @@ -768,4 +768,4 @@ import{html as e,css as t,unsafeCSS as o}from"../../../../lit/index.js";import{s `}dropEvent(e){e.preventDefault(),this.activeDrag=!1,this.activeType=null,b.waveWand(["","/",e,"hax-agent","Agent"],this.shadowRoot.querySelector("#merlin"))}dragenterEvent(e){e.preventDefault(),this.sdSearch.dragover=!0}dragoverEvent(e){e.preventDefault(),this.sdSearch.dragover=!0}dragleaveEvent(e){e.preventDefault(),this.sdSearch.dragover=!1}sdCloseEvent(e){setTimeout((()=>{this._ignoreReset=!0,this.sdSearch.value=""}),0),this.sdSearch.disabled=!1,this.sdSearch.dragover=!1,this.sdSearch.droppable=!1,this.sdSearch.droppableType=null}haxButtonOp(e){let t=e.target.getAttribute("data-event");switch(t){case"super-daemon":if(!this._ignoreReset||"click"===e.type){const t=this.sdSearch.value;"value-changed"===e.type?t&&b.waveWand([t,"*"],this.shadowRoot.querySelector("#merlin"),null):b.waveWand([t,"*"],this.shadowRoot.querySelector("#merlin"),null),this.sdSearch.value=null,this.sdSearch.disabled=!1,this.sdSearch.dragover=!1,this.sdSearch.droppable=!1,this.sdSearch.droppableType=null}this._ignoreReset=!1;break;case"super-daemon-modal":this._ignoreReset&&"click"!==e.type||(i.playSound("click"),b.open(),s.haxTray.collapsed=!1);break;case"media-program":i.playSound("click"),b.runProgram("sources"),b.open(),s.haxTray.collapsed=!1;break;case"content-edit":case"content-map":case"content-add":s.haxTray.trayDetail==t?s.haxTray.collapsed=!s.haxTray.collapsed:s.haxTray.collapsed=!1,s.haxTray.trayDetail=t;break;case"undo":s.activeHaxBody.undo();break;case"redo":s.activeHaxBody.redo();break;case"view-source":s.haxTray.trayDetail=t,s.haxTray.shadowRoot.querySelector("#view-source").openSource(),s.haxTray.collapsed=!1}}_logout(){globalThis.dispatchEvent(new CustomEvent("jwt-login-logout",{composed:!0,bubbles:!0,cancelable:!1,detail:!0})),this.__logoutUserAction=!0}_jwtLoggedIn(e){!1===e.detail&&this.__logoutUserAction&&(this.__logoutUserAction=!1,setTimeout((()=>{globalThis.location.reload()}),100))}_addPageClick(e){!this.editMode&&this.shadowRoot.querySelector("simple-toolbar-menu-item haxcms-button-add:not([hidden])")&&this.shadowRoot.querySelector("simple-toolbar-menu-item haxcms-button-add:not([hidden])").HAXCMSButtonClick()}updateAvailableButtons(){this.shadowRoot&&setTimeout((()=>{globalThis.appSettings&&globalThis.appSettings.backText&&(this.backText=globalThis.appSettings.backText);[{varPath:"deleteNodePath",selector:"#deletebutton"},{varPath:"saveNodePath",selector:"#editbutton"},{varPath:"createNodePath",selector:"#addbutton"},{varPath:"createNodePath",selector:"#addbuttonchild"},{varPath:"createNodePath",selector:"#duplicatebutton"}].forEach((e=>{globalThis.appSettings&&globalThis.appSettings[e.varPath]&&null!=globalThis.appSettings[e.varPath]&&""!=globalThis.appSettings[e.varPath]&&"null"!=globalThis.appSettings[e.varPath]&&(e.dep?null!=globalThis.appSettings[e.dep]&&""!=globalThis.appSettings[e.dep]&&"null"!=globalThis.appSettings[e.dep]&&this.shadowRoot.querySelector(e.selector).removeAttribute("hidden"):this.shadowRoot.querySelector(e.selector).removeAttribute("hidden"))}))}),100)}firstUpdated(t){super.firstUpdated&&super.firstUpdated(t),this.shadowRoot.querySelectorAll("[data-super-daemon-path]").forEach((e=>{b.defineOption({title:e.getAttribute("data-super-daemon-label"),icon:e.getAttribute("data-super-daemon-icon"),tags:["page","operation","command","add","create"],value:{target:e},context:"CMS",eventName:"super-daemon-element-click",path:e.getAttribute("data-super-daemon-path")})})),this.sdSearch=this.shadowRoot.querySelector("super-daemon-search"),b.wandTarget=this.shadowRoot.querySelector("#merlin"),b.defineOption({title:this.t.save,icon:"icons:save",tags:["CMS","save","page","operation","command"],value:{target:this,method:"_editButtonTap"},context:"HAX",eventName:"super-daemon-element-method",path:"CMS/action/save"}),b.defineOption({title:this.t.insights,icon:"hax:clipboard-pulse",tags:["CMS","insights","data","operation"],value:{target:this,method:"_insightsButtonTap"},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/site/insights"}),b.defineOption({title:this.t.edit,icon:"hax:page-edit",tags:["CMS","edit","page","operation","command"],value:{target:this,method:"_editButtonTap"},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/edit"}),b.defineOption({title:this.t.siteSettings,icon:"hax:site-settings",tags:["CMS","site","settings","operation","command","theme","seo","author"],value:{target:this,method:"_manifestButtonTap",args:[{target:this.shadowRoot.querySelector("#manifestbtn")}]},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/site/settings"}),b.defineOption({title:this.t.themeSettings,icon:"hax:site-settings",tags:["CMS","site","settings","operation","command","theme","seo","author"],value:{target:this,method:"_manifestButtonTap",args:[{target:this.shadowRoot.querySelector("#manifestbtn")}]},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/site/settings/theme"}),b.defineOption({title:this.t.seoSettings,icon:"hax:site-settings",tags:["CMS","site","settings","operation","command","theme","seo","search","engine"],value:{target:this,method:"_manifestButtonTap",args:[{target:this.shadowRoot.querySelector("#manifestbtn")}]},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/site/settings/seo"}),b.defineOption({title:this.t.authorSettings,icon:"hax:site-settings",tags:["CMS","site","settings","operation","command","theme","author"],value:{target:this,method:"_manifestButtonTap",args:[{target:this.shadowRoot.querySelector("#manifestbtn")}]},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/site/settings/author"}),b.defineOption({title:this.t.shareSite,icon:"social:share",tags:["CMS","share"],value:{target:this,method:"_shareButtonTap"},context:["logged-in","CMS","HAX"],eventName:"super-daemon-element-method",path:"CMS/action/share"}),b.defineOption({title:this.t.newJourney,icon:"add",tags:["CMS","create","new site"],value:{target:this,method:"_addButtonTap"},context:"CMS",eventName:"super-daemon-element-method",path:"CMS/action/create-site"}),b.defineOption({title:this.t.logOut,icon:"add",tags:["CMS","user","logout"],value:{target:this,method:"_logout"},context:["logged-in","CMS"],eventName:"super-daemon-element-method",path:"CMS/user/logout"}),b.defineOption({title:"Dark mode toggle",icon:"device:brightness-medium",tags:["CMS","dark mode"],value:{target:this.shadowRoot.querySelector("haxcms-darkmode-toggle"),method:"toggle"},voice:"(toggle) dark mode",eventName:"super-daemon-element-method",path:"CMS/action/darkMode"}),b.defineOption({title:"Sound toggle",icon:"av:volume-up",tags:["CMS","sound"],value:{target:this.shadowRoot.querySelector(".soundToggle")},eventName:"super-daemon-element-click",path:"CMS/action/sound"}),b.defineOption({title:this.t.outlineDesigner,icon:"hax:site-map",tags:["CMS","outline","designer","site outline","operation","command"],value:{target:this.shadowRoot.querySelector("#outlinebutton")},context:["CMS"],eventName:"super-daemon-element-click",path:"CMS/action/outline"}),b.defineOption({title:"Load HAXSchema",icon:"hax:hax2022",tags:["Developer","schema","load","demo","testing"],eventName:"super-daemon-run-program",path:">hax/loadElement",context:[">"],value:{name:"Load HAXSchema",context:">",program:async(e,t)=>{const o=globalThis.WCAutoload.requestAvailability();let i=[];return Object.keys(o.registry.list).forEach((async t=>{let a="hax:hax2022";if(globalThis.customElements.get(t)&&globalThis.customElements.get(t).haxProperties&&globalThis.customElements.get(t).haxProperties.gizmo&&(a=globalThis.customElements.get(t).haxProperties.gizmo.icon),""==e||t.includes(e)){let e={};e[t]=o.registry.list[t],i.push({title:t,icon:a,tags:["schema"],value:{target:globalThis.HaxStore.instance,method:"_handleDynamicImports",args:[e,globalThis.HaxStore.instance.haxAutoloader]},eventName:"super-daemon-element-method",context:[">",">hax/loadElement/"+t],path:">hax/loadElement/"+t})}})),i}}}),b.defineOption({title:"Change theme temporarily",icon:"image:style",tags:["Developer","theme"],eventName:"super-daemon-run-program",path:">settings/theme",context:[">"],more:e`Change theme just for the current browsing session`,voice:"change theme (temporarily)",value:{name:"Change theme",context:">",program:async(e,t)=>{let o=[];return["clean-one","clean-two","learn-two-theme","polaris-theme","collections-theme","training-theme","bootstrap-theme","outline-player","haxor-slevin"].forEach((async t=>{(""==e||t.includes(e))&&o.push({title:t.replace("-theme","").replace("-"," "),icon:"image:style",tags:["theme"],value:{target:globalThis.HAXCMS,method:"setTheme",args:[t]},eventName:"super-daemon-element-method",context:[">",">settings/theme/"+t],path:">settings/theme/"+t})})),o}}}),b.defineOption({title:"Go to site",icon:"hax:hax2022",tags:["Developer","change","sites","administration"],eventName:"super-daemon-run-program",path:"/hax/changeSite",context:["CMS"],value:{name:"Go to site",context:"CMS",program:async(e,t)=>{let o=[];return await fetch("./../../system/api/listSites").then((e=>e.ok?e.json():[])).then((t=>{t.data&&t.data.items.length>0&&t.data.items.forEach((async t=>{(""==e||t.metadata.site&&t.metadata.site.name&&t.metadata.site.name.includes(e)&&i.manifest.metadata.site.name!=t.metadata.site.name)&&o.push({title:t.title,icon:t.metadata.theme.variables.icon,tags:["site",t.description],value:{target:this,method:"goToLocation",args:[t.slug]},eventName:"super-daemon-element-method",context:["/","/hax/changeSite/"+t.metadata.site.name],path:"/hax/changeSite/"+t.metadata.site.name})}))})),o}}}),this.updateAvailableButtons(),this.dispatchEvent(new CustomEvent("haxcms-load-user-data",{bubbles:!0,composed:!0,cancelable:!1,detail:!0}))}goToLocation(e){globalThis.location=e}updated(e){super.updated&&super.updated(e),e.forEach(((e,t)=>{"userMenuOpen"===t&&void 0!==e&&(this.userMenuOpen?this.rpgHat="edit":this.rpgHat="none"),"responsiveSize"===t&&(["xs","sm","md"].includes(this[t])?(this.editMode?this.__editText=this.t.save:this.__editText=this.t.edit,this.t.configureBlock="Configure",this.t.addBlock="Block",this.t.findMedia="Media",this.t.pageOutline="Outline",this.t.viewSource="Source"):(this.editMode?this.__editText=this.t.save:this.__editText=this.t.edit,this.t.configureBlock="Configure block",this.t.addBlock="Add block",this.t.findMedia="Find media",this.t.pageOutline="Page outline",this.t.viewSource="View source")),"editMode"==t&&(this.editMode?this.rpgHat="construction":this.rpgHat="none",void 0!==e&&b.close(),this._editModeChanged(this[t],e),this.dispatchEvent(new CustomEvent("edit-mode-changed",{detail:this[t]}))),"manifestEditMode"==t&&(this._manifestEditModeChanged(this[t],e),this.dispatchEvent(new CustomEvent("manifest-edit-mode-changed",{detail:this[t]})))}))}_redoChanged(e){this.canRedo=e.detail.value}_undoChanged(e){this.canUndo=e.detail.value}static get properties(){return{...super.properties,userName:{type:String,attribute:"user-name"},activeDrag:{type:Boolean},activeType:{type:String},activeNode:{type:Object},activeTagName:{type:String},canUndo:{type:Boolean,attribute:"can-undo"},canRedo:{type:Boolean,attribute:"can-redo"},rpgHat:{type:String},userPicture:{type:String,attribute:"user-picture"},userMenuOpen:{type:Boolean},soundIcon:{type:String},darkMode:{type:Boolean,reflect:!0,attribute:"dark-mode"},backLink:{type:String},backText:{type:String},__editIcon:{type:String},__editText:{type:String},painting:{type:Boolean,reflect:!0},pageAllowed:{type:Boolean,attribute:"page-allowed",reflect:!0},editMode:{type:Boolean,reflect:!0,attribute:"edit-mode"},manifestEditMode:{type:Boolean,attribute:"manifest-edit-mode",reflect:!0},activeTitle:{type:String,attribute:"active-title"},manifest:{type:Object},icon:{type:String}}}connectedCallback(){super.connectedCallback(),n((e=>{i.userData&&(this.userName=l(i.userData.userName),this.userPicture=l(i.userData.userPicture),this.updateAvailableButtons()),this.__disposer.push(e)})),n((e=>{this.editMode=l(i.editMode),x.writeMemory("editMode",this.editMode),this.__disposer.push(e)})),n((e=>{this.manifest=l(i.manifest),this.icon="hax:site-settings",this.__disposer.push(e)})),n((e=>{const t=l(i.activeItem);this.updateAvailableButtons(),t&&t.id&&!t._internalRoute?(this.activeTitle=t.title,this.pageAllowed=!0):this.pageAllowed=!1,this.__disposer.push(e)}))}disconnectedCallback(){for(var e in this.__disposer)this.__disposer[e].dispose();super.disconnectedCallback()}_editButtonTap(e){if(this.editMode&&"view-source"===s.haxTray.trayDetail&&!globalThis.confirm(this.t.confirmHtmlSourceExit))return!1;i.playSound("click"),this.editMode=!this.editMode,this.editMode||this.dispatchEvent(new CustomEvent("haxcms-save-node",{bubbles:!0,composed:!0,cancelable:!1,detail:i.activeItem})),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}}))}_insightsButtonTap(e){i.playSound("click");const t=globalThis.document.createElement("haxcms-site-insights"),o=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.insights,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"94vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"94vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:t},invokedBy:this.shadowRoot.querySelector("#insightsbutton"),clone:!1,modal:!1}});globalThis.dispatchEvent(o)}async _cancelButtonTap(e){if(await s.activeHaxBody.haxToContent()!=this._originalContent&&!globalThis.confirm(this.t.unsavedChangesWillBeLostIfSelectingOkAreYouSure))return!1;this.editMode=!1,i.playSound("error"),this.dispatchEvent(new CustomEvent("hax-cancel",{bubbles:!0,composed:!0,cancelable:!1,detail:e.detail})),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}}))}_deleteButtonTap(e){i.playSound("click");let t=globalThis.document.createElement("span");t.innerHTML=`"${i.activeItem.title}" will be removed from the outline but its content stays on the file system.`;let o=globalThis.document.createElement("button");o.appendChild(globalThis.document.createTextNode("Confirm")),o.classList.add("hax-modal-btn"),o.addEventListener("click",this._deleteActive.bind(this));let a=globalThis.document.createElement("button");a.appendChild(globalThis.document.createTextNode("cancel")),a.addEventListener("click",(()=>i.playSound("error"))),a.setAttribute("dialog-dismiss","dialog-dismiss"),a.classList.add("hax-modal-btn"),a.classList.add("cancel");let s=globalThis.document.createElement("span");s.appendChild(o),s.appendChild(a);const n=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:"Are you sure you want to delete this page?",styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"25vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"15vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:t,buttons:s},invokedBy:this.shadowRoot.querySelector("#deletebutton"),clone:!1,modal:!0}});globalThis.dispatchEvent(n)}_deleteActive(e){i.playSound("click");const t=new CustomEvent("haxcms-delete-node",{bubbles:!0,composed:!0,cancelable:!1,detail:{item:i.activeItem}});this.dispatchEvent(t)}_shareButtonTap(e){i.playSound("click");const t=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.shareSite,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"55vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"50vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:globalThis.document.createElement("haxcms-share-dialog")},invokedBy:this.shadowRoot.querySelector("#sharebutton"),clone:!1,modal:!1}});globalThis.dispatchEvent(t)}_outlineButtonTap(e){i.playSound("click");const t=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.outlineDesigner,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-z-index":"100000000","--simple-modal-titlebar-height":"80px","--simple-modal-width":"85vw","--simple-modal-max-width":"85vw","--simple-modal-height":"85vh","--simple-modal-max-height":"85vh"},elements:{content:globalThis.document.createElement("haxcms-outline-editor-dialog")},invokedBy:this.shadowRoot.querySelector("#outlinebutton"),clone:!1,modal:!0}});globalThis.dispatchEvent(t)}_addButtonTap(){i.playSound("click"),setTimeout((()=>{globalThis.location=this.backLink+"createSite-step-1"}),100)}_manifestButtonTap(e){i.playSound("click"),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}})),import("./haxcms-site-dashboard.js").then((()=>{globalThis.dispatchEvent(new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.editSettings,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-z-index":"100000000","--simple-modal-titlebar-height":"80px","--simple-modal-width":"85vw","--simple-modal-max-width":"85vw","--simple-modal-height":"85vh","--simple-modal-max-height":"85vh"},elements:{content:globalThis.document.createElement("haxcms-site-dashboard")},invokedBy:this.shadowRoot.querySelector("#manifestbtn"),clone:!1,modal:!0}})),setTimeout((()=>{globalThis.dispatchEvent(new CustomEvent("haxcms-load-site-dashboard",{bubbles:!0,composed:!0,cancelable:!1,detail:e.target}))}),0)}))}_editModeChanged(e,t){e?(setTimeout((async()=>{this._originalContent=await s.activeHaxBody.haxToContent()}),100),this.__editIcon="icons:save",this.__editText=this.t.save,b.appendContext("HAX"),b.removeContext("CMS")):(this.__editIcon="hax:page-edit",this.__editText=this.t.edit,b.appendContext("CMS"),b.removeContext("HAX")),void 0!==t&&(i.editMode=e,e&&(s.haxTray.collapsed=!1))}_outlineEditModeChanged(e,t){this.dispatchEvent(new CustomEvent("haxcms-outline-edit-mode-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:e}))}_manifestEditModeChanged(e,t){this.dispatchEvent(new CustomEvent("haxcms-manifest-edit-mode-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:e}))}}customElements.define(HAXCMSSiteEditorUI.tag,HAXCMSSiteEditorUI);export{HAXCMSSiteEditorUI}; \ No newline at end of file + >`,voice:"change theme (temporarily)",value:{name:"Change theme",context:">",program:async(e,t)=>{let o=[];return["clean-one","clean-two","learn-two-theme","polaris-theme","polaris-invent-theme","collections-theme","training-theme","bootstrap-theme","outline-player","haxor-slevin"].forEach((async t=>{(""==e||t.includes(e))&&o.push({title:t.replace("-theme","").replace("-"," "),icon:"image:style",tags:["theme"],value:{target:globalThis.HAXCMS,method:"setTheme",args:[t]},eventName:"super-daemon-element-method",context:[">",">settings/theme/"+t],path:">settings/theme/"+t})})),o}}}),b.defineOption({title:"Go to site",icon:"hax:hax2022",tags:["Developer","change","sites","administration"],eventName:"super-daemon-run-program",path:"/hax/changeSite",context:["CMS"],value:{name:"Go to site",context:"CMS",program:async(e,t)=>{let o=[];return await fetch("./../../system/api/listSites").then((e=>e.ok?e.json():[])).then((t=>{t.data&&t.data.items.length>0&&t.data.items.forEach((async t=>{(""==e||t.metadata.site&&t.metadata.site.name&&t.metadata.site.name.includes(e)&&i.manifest.metadata.site.name!=t.metadata.site.name)&&o.push({title:t.title,icon:t.metadata.theme.variables.icon,tags:["site",t.description],value:{target:this,method:"goToLocation",args:[t.slug]},eventName:"super-daemon-element-method",context:["/","/hax/changeSite/"+t.metadata.site.name],path:"/hax/changeSite/"+t.metadata.site.name})}))})),o}}}),this.updateAvailableButtons(),this.dispatchEvent(new CustomEvent("haxcms-load-user-data",{bubbles:!0,composed:!0,cancelable:!1,detail:!0}))}goToLocation(e){globalThis.location=e}updated(e){super.updated&&super.updated(e),e.forEach(((e,t)=>{"userMenuOpen"===t&&void 0!==e&&(this.userMenuOpen?this.rpgHat="edit":this.rpgHat="none"),"responsiveSize"===t&&(["xs","sm","md"].includes(this[t])?(this.editMode?this.__editText=this.t.save:this.__editText=this.t.edit,this.t.configureBlock="Configure",this.t.addBlock="Block",this.t.findMedia="Media",this.t.pageOutline="Outline",this.t.viewSource="Source"):(this.editMode?this.__editText=this.t.save:this.__editText=this.t.edit,this.t.configureBlock="Configure block",this.t.addBlock="Add block",this.t.findMedia="Find media",this.t.pageOutline="Page outline",this.t.viewSource="View source")),"editMode"==t&&(this.editMode?this.rpgHat="construction":this.rpgHat="none",void 0!==e&&b.close(),this._editModeChanged(this[t],e),this.dispatchEvent(new CustomEvent("edit-mode-changed",{detail:this[t]}))),"manifestEditMode"==t&&(this._manifestEditModeChanged(this[t],e),this.dispatchEvent(new CustomEvent("manifest-edit-mode-changed",{detail:this[t]})))}))}_redoChanged(e){this.canRedo=e.detail.value}_undoChanged(e){this.canUndo=e.detail.value}static get properties(){return{...super.properties,userName:{type:String,attribute:"user-name"},activeDrag:{type:Boolean},activeType:{type:String},activeNode:{type:Object},activeTagName:{type:String},canUndo:{type:Boolean,attribute:"can-undo"},canRedo:{type:Boolean,attribute:"can-redo"},rpgHat:{type:String},userPicture:{type:String,attribute:"user-picture"},userMenuOpen:{type:Boolean},soundIcon:{type:String},darkMode:{type:Boolean,reflect:!0,attribute:"dark-mode"},backLink:{type:String},backText:{type:String},__editIcon:{type:String},__editText:{type:String},painting:{type:Boolean,reflect:!0},pageAllowed:{type:Boolean,attribute:"page-allowed",reflect:!0},editMode:{type:Boolean,reflect:!0,attribute:"edit-mode"},manifestEditMode:{type:Boolean,attribute:"manifest-edit-mode",reflect:!0},activeTitle:{type:String,attribute:"active-title"},manifest:{type:Object},icon:{type:String}}}connectedCallback(){super.connectedCallback(),n((e=>{i.userData&&(this.userName=l(i.userData.userName),this.userPicture=l(i.userData.userPicture),this.updateAvailableButtons()),this.__disposer.push(e)})),n((e=>{this.editMode=l(i.editMode),x.writeMemory("editMode",this.editMode),this.__disposer.push(e)})),n((e=>{this.manifest=l(i.manifest),this.icon="hax:site-settings",this.__disposer.push(e)})),n((e=>{const t=l(i.activeItem);this.updateAvailableButtons(),t&&t.id&&!t._internalRoute?(this.activeTitle=t.title,this.pageAllowed=!0):this.pageAllowed=!1,this.__disposer.push(e)}))}disconnectedCallback(){for(var e in this.__disposer)this.__disposer[e].dispose();super.disconnectedCallback()}_editButtonTap(e){if(this.editMode&&"view-source"===s.haxTray.trayDetail&&!globalThis.confirm(this.t.confirmHtmlSourceExit))return!1;i.playSound("click"),this.editMode=!this.editMode,this.editMode||this.dispatchEvent(new CustomEvent("haxcms-save-node",{bubbles:!0,composed:!0,cancelable:!1,detail:i.activeItem})),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}}))}_insightsButtonTap(e){i.playSound("click");const t=globalThis.document.createElement("haxcms-site-insights"),o=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.insights,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"94vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"94vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:t},invokedBy:this.shadowRoot.querySelector("#insightsbutton"),clone:!1,modal:!1}});globalThis.dispatchEvent(o)}async _cancelButtonTap(e){if(await s.activeHaxBody.haxToContent()!=this._originalContent&&!globalThis.confirm(this.t.unsavedChangesWillBeLostIfSelectingOkAreYouSure))return!1;this.editMode=!1,i.playSound("error"),this.dispatchEvent(new CustomEvent("hax-cancel",{bubbles:!0,composed:!0,cancelable:!1,detail:e.detail})),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}}))}_deleteButtonTap(e){i.playSound("click");let t=globalThis.document.createElement("span");t.innerHTML=`"${i.activeItem.title}" will be removed from the outline but its content stays on the file system.`;let o=globalThis.document.createElement("button");o.appendChild(globalThis.document.createTextNode("Confirm")),o.classList.add("hax-modal-btn"),o.addEventListener("click",this._deleteActive.bind(this));let a=globalThis.document.createElement("button");a.appendChild(globalThis.document.createTextNode("cancel")),a.addEventListener("click",(()=>i.playSound("error"))),a.setAttribute("dialog-dismiss","dialog-dismiss"),a.classList.add("hax-modal-btn"),a.classList.add("cancel");let s=globalThis.document.createElement("span");s.appendChild(o),s.appendChild(a);const n=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:"Are you sure you want to delete this page?",styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"25vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"15vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:t,buttons:s},invokedBy:this.shadowRoot.querySelector("#deletebutton"),clone:!1,modal:!0}});globalThis.dispatchEvent(n)}_deleteActive(e){i.playSound("click");const t=new CustomEvent("haxcms-delete-node",{bubbles:!0,composed:!0,cancelable:!1,detail:{item:i.activeItem}});this.dispatchEvent(t)}_shareButtonTap(e){i.playSound("click");const t=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.shareSite,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-width":"55vw","--simple-modal-min-width":"300px","--simple-modal-z-index":"100000000","--simple-modal-height":"50vh","--simple-modal-min-height":"300px","--simple-modal-titlebar-height":"80px"},elements:{content:globalThis.document.createElement("haxcms-share-dialog")},invokedBy:this.shadowRoot.querySelector("#sharebutton"),clone:!1,modal:!1}});globalThis.dispatchEvent(t)}_outlineButtonTap(e){i.playSound("click");const t=new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.outlineDesigner,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-z-index":"100000000","--simple-modal-titlebar-height":"80px","--simple-modal-width":"85vw","--simple-modal-max-width":"85vw","--simple-modal-height":"85vh","--simple-modal-max-height":"85vh"},elements:{content:globalThis.document.createElement("haxcms-outline-editor-dialog")},invokedBy:this.shadowRoot.querySelector("#outlinebutton"),clone:!1,modal:!0}});globalThis.dispatchEvent(t)}_addButtonTap(){i.playSound("click"),setTimeout((()=>{globalThis.location=this.backLink+"createSite-step-1"}),100)}_manifestButtonTap(e){i.playSound("click"),globalThis.dispatchEvent(new CustomEvent("simple-modal-hide",{bubbles:!0,cancelable:!0,detail:{}})),import("./haxcms-site-dashboard.js").then((()=>{globalThis.dispatchEvent(new CustomEvent("simple-modal-show",{bubbles:!0,composed:!0,cancelable:!1,detail:{title:this.t.editSettings,styles:{"--simple-modal-titlebar-background":"var(--hax-ui-color-accent)","--simple-modal-titlebar-color":"var(--hax-ui-background-color)","--simple-modal-z-index":"100000000","--simple-modal-titlebar-height":"80px","--simple-modal-width":"85vw","--simple-modal-max-width":"85vw","--simple-modal-height":"85vh","--simple-modal-max-height":"85vh"},elements:{content:globalThis.document.createElement("haxcms-site-dashboard")},invokedBy:this.shadowRoot.querySelector("#manifestbtn"),clone:!1,modal:!0}})),setTimeout((()=>{globalThis.dispatchEvent(new CustomEvent("haxcms-load-site-dashboard",{bubbles:!0,composed:!0,cancelable:!1,detail:e.target}))}),0)}))}_editModeChanged(e,t){e?(setTimeout((async()=>{this._originalContent=await s.activeHaxBody.haxToContent()}),100),this.__editIcon="icons:save",this.__editText=this.t.save,b.appendContext("HAX"),b.removeContext("CMS")):(this.__editIcon="hax:page-edit",this.__editText=this.t.edit,b.appendContext("CMS"),b.removeContext("HAX")),void 0!==t&&(i.editMode=e,e&&(s.haxTray.collapsed=!1))}_outlineEditModeChanged(e,t){this.dispatchEvent(new CustomEvent("haxcms-outline-edit-mode-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:e}))}_manifestEditModeChanged(e,t){this.dispatchEvent(new CustomEvent("haxcms-manifest-edit-mode-changed",{bubbles:!0,composed:!0,cancelable:!1,detail:e}))}}customElements.define(HAXCMSSiteEditorUI.tag,HAXCMSSiteEditorUI);export{HAXCMSSiteEditorUI}; \ No newline at end of file diff --git a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js index c090568f6c..fbf6fb539b 100644 --- a/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js +++ b/build/es6/node_modules/@lrnwebcomponents/haxcms-elements/lib/ui-components/magic/site-collection-list.js @@ -1,4 +1,4 @@ -import{css as t,html as e}from"../../../../../lit/index.js";import{CollectionList as i}from"../../../../collection-list/collection-list.js";import"../query/site-query.js";import{store as s}from"../../core/haxcms-site-store.js";export class SiteCollectionList extends i{constructor(){super(),this.editMode=!1,this.conditions={},this.sortObj={},this.results=[],this.breakSmartCollection=!1,this.limit=8,this.sort="title",this.parent="",this.tags="",this.pageType="",this.published="true",this.hideInMenu="",this.relatedItems="",this.t={allItems:"All items",topLevelItems:"Top level items"}}render(){return e` +import{css as t,html as e}from"../../../../../lit/index.js";import{CollectionList as i}from"../../../../collection-list/collection-list.js";import"../../../../collection-list/lib/collection-item.js";import"../query/site-query.js";import{store as s}from"../../core/haxcms-site-store.js";export class SiteCollectionList extends i{constructor(){super(),this.editMode=!1,this.conditions={},this.sortObj={},this.results=[],this.breakSmartCollection=!1,this.limit=8,this.sort="title",this.parent="",this.tags="",this.pageType="",this.published="true",this.hideInMenu="",this.relatedItems="",this.t={allItems:"All items",topLevelItems:"Top level items"}}render(){return e`