scb-wc-test 0.1.310 → 0.1.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +5 -5
- package/mvc/components/scb-viz/scb-viz.js +50 -57
- package/package.json +2 -2
- package/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +1 -0
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +9 -4
- package/scb-viz/scb-viz.d.ts +1 -0
- package/scb-viz/scb-viz.js +85 -89
- package/scb-wc-test.bundle.js +24 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var l=customElements.define.bind(customElements);customElements.define=function(s,i,r){try{customElements.get(s)||l(s,i,r)}catch(n){var c=String(n||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,g=t=>{throw TypeError(t)},o=(t,l,s,i)=>{for(var r=i>1?void 0:i?w(l,s):l,c=t.length-1,n;c>=0;c--)(n=t[c])&&(r=(i?n(l,s,r):n(r))||r);return i&&r&&y(l,s,r),r},z=(t,l,s)=>l.has(t)||g("Cannot "+s),_=(t,l,s)=>l.has(t)?g("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,s),p=(t,l,s)=>(z(t,l,"access private method"),s),d,f,u;let e=class extends S{constructor(){super(...arguments),_(this,d),this.variant="standard",this.width="100%",this.showScrollbar=!1,this.rightScrollButtonLabel="Scrolla höger",this.leftScrollButtonLabel="Scrolla vänster",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.contentFlex=!1,this.internalGap="",this._canScrollLeft=!1,this._canScrollRight=!1,this.updateScrollButtons=()=>{const t=this.scrollerEl||this.shadowRoot?.querySelector(".scb-horizontal-scroller");if(!t){this._canScrollLeft&&(this._canScrollLeft=!1),this._canScrollRight&&(this._canScrollRight=!1),this.removeAttribute("data-scroll-left"),this.removeAttribute("data-scroll-right");return}const l=t.scrollLeft>0,s=t.scrollLeft+t.clientWidth<t.scrollWidth-1;this._canScrollLeft!==l&&(this._canScrollLeft=l),this._canScrollRight!==s&&(this._canScrollRight=s),l?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left"),s?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.scrollerEl=null,this.slotEl=null,this.sizeObserver=null,this.resizeRaf=null,this.handleScroll=()=>{const t=this.shadowRoot?.querySelector(".scb-horizontal-scroller");t&&(this.updateScrollButtons(),this.dispatchCustomEventWithAlias("scb-scroll",{scrollLeft:t.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEventWithAlias("scb-scroll-start",{scrollLeft:t.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEventWithAlias("scb-scroll-end",{scrollLeft:t.scrollLeft})},120),t.scrollLeft>this.lastScrollLeft?this.dispatchCustomEventWithAlias("scb-scroll-right",{scrollLeft:t.scrollLeft}):t.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEventWithAlias("scb-scroll-left",{scrollLeft:t.scrollLeft}),this.lastScrollLeft=t.scrollLeft)},this.handleWheel=t=>{const l=this.scrollerEl||this.shadowRoot?.querySelector(".scb-horizontal-scroller");if(!l||t.deltaY===0)return;const s=l.scrollLeft,i=s>0,r=s+l.clientWidth<l.scrollWidth-1;!i&&!r||(l.scrollLeft+=t.deltaY,l.scrollLeft!==s&&t.preventDefault())}}doScrollBy(t){const l=this.shadowRoot?.querySelector(".scb-horizontal-scroller");l&&l.scrollBy({left:t,behavior:"smooth"})}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-horizontal-scroller-width",this.width)}disconnectedCallback(){super.disconnectedCallback(),this.scrollerEl&&(this.scrollerEl.removeEventListener("scroll",this.handleScroll),this.scrollerEl.removeEventListener("wheel",this.handleWheel)),this.sizeObserver&&(this.sizeObserver.disconnect(),this.sizeObserver=null),this.resizeRaf!==null&&(cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.scrollEndTimeout&&(clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=null),this.scrollerEl=null,this.slotEl=null}dispatchCustomEvent(t,l={}){this.dispatchEvent(new CustomEvent(t,{detail:l,bubbles:!0,composed:!0}))}dispatchCustomEventWithAlias(t,l={}){if(this.dispatchCustomEvent(t,l),t.includes("-")){const s=t.replace(/-/g,"");this.dispatchCustomEvent(s,l)}}firstUpdated(){this.scrollerEl=this.shadowRoot?.querySelector(".scb-horizontal-scroller"),this.slotEl=this.shadowRoot?.querySelector("slot");const t=this.shadowRoot?.querySelector(".scroll-shadow-left"),l=this.shadowRoot?.querySelector(".scroll-shadow-right");this.scrollerEl&&(this.scrollerEl.addEventListener("scroll",this.handleScroll),this.scrollerEl.addEventListener("wheel",this.handleWheel,{passive:!1}));const s=()=>{if(this.slotEl&&t&&l){const c=this.slotEl.getBoundingClientRect();t.style.height=`${c.height}px`,l.style.height=`${c.height}px`}},i=()=>{s(),this.updateScrollButtons()},r=()=>{this.resizeRaf===null&&(this.resizeRaf=requestAnimationFrame(()=>{this.resizeRaf=null,i()}))};requestAnimationFrame(()=>{i()}),this.slotEl&&this.slotEl.addEventListener("slotchange",()=>{r()}),this.sizeObserver=new ResizeObserver(()=>{r()}),this.scrollerEl&&this.sizeObserver.observe(this.scrollerEl),this.slotEl&&this.sizeObserver.observe(this.slotEl),p(this,d,f).call(this),p(this,d,u).call(this)}updated(t){t.has("width")&&this.style.setProperty("--scb-horizontal-scroller-width",this.width),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,d,f).call(this),(t.has("internalGap")||t.has("contentFlex"))&&p(this,d,u).call(this)}mapSpacingToken(t){if(!t)return;const l=String(t).trim();if(l)return/^\d+$/.test(l)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(l,10)))})`:l}render(){const t=this.variant,l=this._canScrollLeft||this._canScrollRight;switch(t){case"inline":return h`
|
|
1
|
+
import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var l=customElements.define.bind(customElements);customElements.define=function(s,i,r){try{customElements.get(s)||l(s,i,r)}catch(n){var c=String(n||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,g=t=>{throw TypeError(t)},o=(t,l,s,i)=>{for(var r=i>1?void 0:i?w(l,s):l,c=t.length-1,n;c>=0;c--)(n=t[c])&&(r=(i?n(l,s,r):n(r))||r);return i&&r&&y(l,s,r),r},z=(t,l,s)=>l.has(t)||g("Cannot "+s),_=(t,l,s)=>l.has(t)?g("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,s),p=(t,l,s)=>(z(t,l,"access private method"),s),d,f,u;let e=class extends S{constructor(){super(...arguments),_(this,d),this.variant="standard",this.width="100%",this.showScrollbar=!1,this.rightScrollButtonLabel="Scrolla höger",this.leftScrollButtonLabel="Scrolla vänster",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.contentFlex=!1,this.internalGap="",this._canScrollLeft=!1,this._canScrollRight=!1,this.updateScrollButtons=()=>{const t=this.scrollerEl||this.shadowRoot?.querySelector(".scb-horizontal-scroller");if(!t){this._canScrollLeft&&(this._canScrollLeft=!1),this._canScrollRight&&(this._canScrollRight=!1),this.removeAttribute("data-scroll-left"),this.removeAttribute("data-scroll-right");return}const l=t.scrollLeft>0,s=t.scrollLeft+t.clientWidth<t.scrollWidth-1;this._canScrollLeft!==l&&(this._canScrollLeft=l),this._canScrollRight!==s&&(this._canScrollRight=s),l?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left"),s?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.scrollerEl=null,this.slotEl=null,this.sizeObserver=null,this.resizeRaf=null,this.handleScroll=()=>{const t=this.shadowRoot?.querySelector(".scb-horizontal-scroller");t&&(this.updateScrollButtons(),this.dispatchCustomEventWithAlias("scb-scroll",{scrollLeft:t.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEventWithAlias("scb-scroll-start",{scrollLeft:t.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEventWithAlias("scb-scroll-end",{scrollLeft:t.scrollLeft})},120),t.scrollLeft>this.lastScrollLeft?this.dispatchCustomEventWithAlias("scb-scroll-right",{scrollLeft:t.scrollLeft}):t.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEventWithAlias("scb-scroll-left",{scrollLeft:t.scrollLeft}),this.lastScrollLeft=t.scrollLeft)},this.handleWheel=t=>{const l=this.scrollerEl||this.shadowRoot?.querySelector(".scb-horizontal-scroller");if(!l||t.deltaY===0)return;const s=l.scrollLeft,i=s>0,r=s+l.clientWidth<l.scrollWidth-1;!i&&!r||(l.scrollLeft+=t.deltaY,l.scrollLeft!==s&&t.preventDefault())}}getScrollStep(){const t=this.scrollerEl||this.shadowRoot?.querySelector(".scb-horizontal-scroller");return t?Math.max(Math.round(t.clientWidth*.8),120):200}doScrollBy(t){const l=this.shadowRoot?.querySelector(".scb-horizontal-scroller");l&&l.scrollBy({left:t,behavior:"smooth"})}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-horizontal-scroller-width",this.width)}disconnectedCallback(){super.disconnectedCallback(),this.scrollerEl&&(this.scrollerEl.removeEventListener("scroll",this.handleScroll),this.scrollerEl.removeEventListener("wheel",this.handleWheel)),this.sizeObserver&&(this.sizeObserver.disconnect(),this.sizeObserver=null),this.resizeRaf!==null&&(cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.scrollEndTimeout&&(clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=null),this.scrollerEl=null,this.slotEl=null}dispatchCustomEvent(t,l={}){this.dispatchEvent(new CustomEvent(t,{detail:l,bubbles:!0,composed:!0}))}dispatchCustomEventWithAlias(t,l={}){if(this.dispatchCustomEvent(t,l),t.includes("-")){const s=t.replace(/-/g,"");this.dispatchCustomEvent(s,l)}}firstUpdated(){this.scrollerEl=this.shadowRoot?.querySelector(".scb-horizontal-scroller"),this.slotEl=this.shadowRoot?.querySelector("slot");const t=this.shadowRoot?.querySelector(".scroll-shadow-left"),l=this.shadowRoot?.querySelector(".scroll-shadow-right");this.scrollerEl&&(this.scrollerEl.addEventListener("scroll",this.handleScroll),this.scrollerEl.addEventListener("wheel",this.handleWheel,{passive:!1}));const s=()=>{if(this.slotEl&&t&&l){const c=this.slotEl.getBoundingClientRect();t.style.height=`${c.height}px`,l.style.height=`${c.height}px`}},i=()=>{s(),this.updateScrollButtons()},r=()=>{this.resizeRaf===null&&(this.resizeRaf=requestAnimationFrame(()=>{this.resizeRaf=null,i()}))};requestAnimationFrame(()=>{i()}),this.slotEl&&this.slotEl.addEventListener("slotchange",()=>{r()}),this.sizeObserver=new ResizeObserver(()=>{r()}),this.scrollerEl&&this.sizeObserver.observe(this.scrollerEl),this.slotEl&&this.sizeObserver.observe(this.slotEl),p(this,d,f).call(this),p(this,d,u).call(this)}updated(t){t.has("width")&&this.style.setProperty("--scb-horizontal-scroller-width",this.width),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&p(this,d,f).call(this),(t.has("internalGap")||t.has("contentFlex"))&&p(this,d,u).call(this)}mapSpacingToken(t){if(!t)return;const l=String(t).trim();if(l)return/^\d+$/.test(l)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(l,10)))})`:l}render(){const t=this.variant,l=this._canScrollLeft||this._canScrollRight;switch(t){case"inline":return h`
|
|
2
2
|
<div class="scb-horizontal-scroller ${l?"canScroll":""}" tabindex="0">
|
|
3
3
|
${this.variant!="inline"?h`<div class="scroll-shadow-left"></div>`:""}
|
|
4
4
|
<slot></slot>
|
|
@@ -14,7 +14,7 @@ import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";im
|
|
|
14
14
|
label="${this.leftScrollButtonLabel}"
|
|
15
15
|
aria-label="Scrolla vänster"
|
|
16
16
|
icon="chevron_left"
|
|
17
|
-
@click="${()=>this.doScrollBy(-
|
|
17
|
+
@click="${()=>this.doScrollBy(-this.getScrollStep())}"
|
|
18
18
|
></scb-button>
|
|
19
19
|
`:""}
|
|
20
20
|
|
|
@@ -26,7 +26,7 @@ import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";im
|
|
|
26
26
|
aria-label="Scrolla höger"
|
|
27
27
|
icon="chevron_right"
|
|
28
28
|
trailing-icon
|
|
29
|
-
@click="${()=>this.doScrollBy(
|
|
29
|
+
@click="${()=>this.doScrollBy(this.getScrollStep())}"
|
|
30
30
|
></scb-button>
|
|
31
31
|
`:""}
|
|
32
32
|
</div>
|
|
@@ -38,7 +38,7 @@ import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";im
|
|
|
38
38
|
icon="chevron_left"
|
|
39
39
|
aria-label="Scrolla vänster"
|
|
40
40
|
variant="filled-tonal"
|
|
41
|
-
@click="${()=>this.doScrollBy(-
|
|
41
|
+
@click="${()=>this.doScrollBy(-this.getScrollStep())}"
|
|
42
42
|
></scb-icon-button>
|
|
43
43
|
`:""}
|
|
44
44
|
<div class="scroll-shadow-left"></div>
|
|
@@ -53,7 +53,7 @@ import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";im
|
|
|
53
53
|
icon="chevron_right"
|
|
54
54
|
aria-label="Scrolla höger"
|
|
55
55
|
variant="filled-tonal"
|
|
56
|
-
@click="${()=>this.doScrollBy(
|
|
56
|
+
@click="${()=>this.doScrollBy(this.getScrollStep())}"
|
|
57
57
|
></scb-icon-button>
|
|
58
58
|
`:""}
|
|
59
59
|
`}}};d=new WeakSet;f=function(){const t=this.mapSpacingToken(this.spacing),l=this.mapSpacingToken(this.spacingTop),s=this.mapSpacingToken(this.spacingBottom),i=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight),c=l??t,n=s??t;c?this.style.setProperty("--scb-horizontal-scroller-spacing-block-start",c):this.style.removeProperty("--scb-horizontal-scroller-spacing-block-start"),n?this.style.setProperty("--scb-horizontal-scroller-spacing-block-end",n):this.style.removeProperty("--scb-horizontal-scroller-spacing-block-end"),i?this.style.setProperty("--scb-horizontal-scroller-spacing-inline-start",i):this.style.removeProperty("--scb-horizontal-scroller-spacing-inline-start"),r?this.style.setProperty("--scb-horizontal-scroller-spacing-inline-end",r):this.style.removeProperty("--scb-horizontal-scroller-spacing-inline-end")};u=function(){const t=this.mapSpacingToken(this.internalGap);this.contentFlex&&t?this.style.setProperty("--scb-horizontal-scroller-internal-gap",t):this.style.removeProperty("--scb-horizontal-scroller-internal-gap")};e.styles=v`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ht,n as m,r as P,i as dt,x as
|
|
1
|
+
import{a as ht,n as m,r as P,i as dt,x as f,k as W,l as pt,t as gt}from"../../vendor/vendor.js";import"../scb-chip/scb-chip.js";import"../scb-segmented-button/scb-segmented-button.js";import"../scb-segmented-button/scb-segmented-item.js";import"../scb-accordion/scb-accordion.js";import"../scb-divider/scb-divider.js";import"../scb-horizontal-scroller/scb-horizontal-scroller.js";import"../scb-icon-button/scb-icon-button.js";import{a as ft,g as ut,b as mt}from"./scb-viz-series-differentiation-registry.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.js";import"../scb-button/scb-button.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,n,s){try{customElements.get(i)||e(i,n,s)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var bt=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,U=t=>{throw TypeError(t)},u=(t,e,i,n)=>{for(var s=n>1?void 0:n?vt(e,i):e,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=(n?a(e,i,s):a(s))||s);return n&&s&&bt(e,i,s),s},yt=(t,e,i)=>e.has(t)||U("Cannot "+i),_t=(t,e,i)=>e.has(t)?U("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),c=(t,e,i)=>(yt(t,e,"access private method"),i),l,L,F,I,M,A,j,K,D,N,k,J,Y,Z,$,E,v,Q,X,tt,et,it,st,nt,at,O,rt,T,R,ot,lt,q,B,H,x,V;const ct=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
2
2
|
viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
|
|
3
3
|
<style type="text/css">
|
|
4
4
|
.st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
|
|
@@ -113,7 +113,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
113
113
|
<path d="M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z"/>
|
|
114
114
|
<path d="M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z"/>
|
|
115
115
|
</svg>
|
|
116
|
-
`;let f=class extends dt{constructor(){super(...arguments),_t(this,l),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth="",this.containerMaxWidth="",this.contentHeight="",this.toggleHeightMode="stable",this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._chartConfigSyncFrame=0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentPointerDown=t=>{if(!this._actionsMenuOpen)return;const e=t.composedPath(),i=this.shadowRoot?.querySelector(".actions-menu");i&&e.includes(i)||this._closeActionsMenu()},this._onDocumentKeyDown=t=>{this._actionsMenuOpen&&t.key==="Escape"&&(t.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await c(this,l,it).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),c(this,l,st).call(this))},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),c(this,l,$).call(this)}}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}get actionsMenuLabel(){return this.lang==="en"?"Open menu":"Öppna meny"}get printLabel(){return this.lang==="en"?"Print":"Skriv ut"}get downloadPngLabel(){return this.lang==="en"?"Download PNG":"Ladda ner PNG"}get downloadJpgLabel(){return this.lang==="en"?"Download JPG":"Ladda ner JPG"}get downloadCsvLabel(){return this.lang==="en"?"Download CSV":"Ladda ner CSV"}get enableSeriesDifferentiationLabel(){return this.lang==="en"?"Show symbols and patterns":"Visa symboler och mönster"}get disableSeriesDifferentiationLabel(){return this.lang==="en"?"Hide symbols and patterns":"Dölj symboler och mönster"}_getImageAltText(){return[this.title,this.subtitle,this.description].map(e=>typeof e=="string"?e.trim():"").filter(Boolean).join(". ")||(this.lang==="en"?"Image figure":"Bildfigur")}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown)}firstUpdated(t){this._readTableDataFromSlot(),c(this,l,H).call(this),c(this,l,V).call(this),c(this,l,D).call(this),this._syncChipClass(),c(this,l,L).call(this),c(this,l,M).call(this)}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&(this._syncChipClass(),this._closeActionsMenu()),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&c(this,l,H).call(this),t.has("containerMaxWidth")&&c(this,l,V).call(this),t.has("variant")&&c(this,l,L).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&c(this,l,D).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&c(this,l,M).call(this),(t.has("selectedChip")||t.has("variant"))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),(t.has("valueFormat")||t.has("timeFormat")||t.has("yAxisSettings")||t.has("selectedChip")||t.has("variant"))&&c(this,l,k).call(this)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),c(this,l,F).call(this),c(this,l,I).call(this),c(this,l,N).call(this)}_onTableSlotChange(t){const e=t.target;e&&(this._readTableDataFromSlot(e),this.requestUpdate())}_onDiagramSlotChange(){c(this,l,D).call(this),c(this,l,M).call(this),c(this,l,k).call(this),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),this.requestUpdate()}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const i=e.assignedElements({flatten:!0}),n=[];i.forEach(d=>{if(d.tagName==="TABLE"){n.push(d);return}d.querySelectorAll("table").forEach(y=>n.push(y))});const s=n[0];if(!s){this._slottedTableData=void 0;return}const o=[],a=[],r=[],h=d=>d?(d.textContent??"").replace(/\s+/g," ").trim():"",p=d=>d?{html:(d.innerHTML??"").trim(),text:h(d)}:{html:"",text:""},b=s.querySelector("thead tr");b&&Array.from(b.querySelectorAll("th, td")).forEach(y=>o.push(p(y)));const _=Array.from(s.querySelectorAll("tbody tr")),w=_.length>0?_:Array.from(s.querySelectorAll("tr")).filter(d=>d.closest("thead")===null);if(w.forEach(d=>{const y=Array.from(d.querySelectorAll("th, td"));if(y.length===0)return;const z=y[0].tagName==="TH"&&d.closest("thead")===null&&d.closest("tfoot")===null;r.push(z);const S=[];y.forEach(C=>S.push(p(C))),a.push(S)}),!b&&a.length>0){const d=a[0],y=w[0],z=Array.from(y?.querySelectorAll("th, td")??[]);z.length>0&&z.every(C=>C.tagName==="TH")&&y?.closest("tbody")===null&&(o.splice(0,o.length,...d),a.shift(),r.shift())}this._slottedTableData={headers:o.length>0?o:void 0,rows:a,rowHeaderRows:r.length>0?r:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(s=>s.length)),i=s=>{if(s==null)return!1;if(typeof s=="number")return!0;const o=String(s).replace(/[\u00A0\u202F\s]+/g,"").trim();return o?/^-?\d+(?:[.,]\d+)?$/.test(o):!1},n=[];for(let s=0;s<e;s+=1){if(s===0){n.push("left");continue}const o=t.rows.map(r=>this._normalizeRenderableCell(r[s]).text).filter(r=>r!==""&&r!==null&&r!==void 0),a=o.length>0&&o.every(i);n.push(a?"right":"left")}return n}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"420px"}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getDiagramAssignedElements(){const t=this.shadowRoot?.querySelector('slot[name="diagram"]');return t?t.assignedElements({flatten:!0}):[]}_findExportableVisualElement(t){for(const e of t){if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e;const i=e.querySelector("svg, canvas, img");if(i instanceof SVGSVGElement||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement)return i}return null}_getExportableVisualElement(){if(this.variant==="Table")return null;if(this.variant==="Image"){const t=this.shadowRoot?.querySelector(".image-content img");return t instanceof HTMLImageElement?t:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:"number",scale:"auto",decimals:0}}_normalizeValueFormat(t){const e=this._getDefaultValueFormat(),i=t&&typeof t=="object"?t:{},n=["number","currency","percent"].includes(String(i.type))?String(i.type):e.type,s=["auto","raw","thousands","millions","billions"].includes(String(i.scale))?String(i.scale):e.scale,o=Number.isFinite(Number(i.decimals))?Math.max(0,Math.min(20,Number(i.decimals))):e.decimals;return{type:n,scale:s,decimals:o}}_normalizeTimeFormat(t){const e={mode:"raw",display:"raw"},i=t&&typeof t=="object"?t:{},n=["raw","year","monthCode","quarterCode","weekCode","tertialCode"];let s=typeof i.mode=="string"?i.mode:e.mode,o=typeof i.display=="string"?i.display:e.display;n.includes(s)||(s=e.mode);const a={raw:["raw"],year:["raw","year"],monthCode:["raw","iso-month","short-month","long-month"],quarterCode:["raw","quarter-compact","quarter-short","quarter-long"],weekCode:["raw","week-compact","week-long"],tertialCode:["raw","tertial-compact","tertial-short","tertial-long"]};return a[s].includes(o)||(o=a[s][0]),s==="raw"&&(o="raw"),{mode:s,display:o}}_normalizeYAxisSettings(t){const e=t&&typeof t=="object"?t:{},i=Number.isFinite(Number(e.referenceLineValue))?Number(e.referenceLineValue):null;return{startAtZero:!!e.startAtZero,referenceLineEnabled:!!e.referenceLineEnabled&&Number.isFinite(i),referenceLineValue:i,referenceLineLabel:typeof e.referenceLineLabel=="string"?e.referenceLineLabel:""}}_getShortMonthNames(){return["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"]}_getLongMonthNames(){return["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]}_formatCategoryTimeLabel(t,e){if(!t||e.mode==="raw"||e.display==="raw")return null;if(e.mode==="year"){const i=/^\s*(\d{4})\s*$/.exec(t);return i?i[1]:null}if(e.mode==="monthCode"){const i=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2])-1,s=i[1],o=String(n+1).padStart(2,"0");return e.display==="iso-month"?`${s}-${o}`:e.display==="short-month"?`${this._getShortMonthNames()[n]} ${s}`:e.display==="long-month"?`${this._getLongMonthNames()[n]} ${s}`:t}if(e.mode==="quarterCode"){const i=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(t);if(!i)return null;const n=Number(i[3]),s=i[1],o=["första","andra","tredje","fjärde"];return e.display==="quarter-compact"?`${s} K${n}`:e.display==="quarter-short"?`kv ${n} ${s}`:e.display==="quarter-long"?`${o[n-1]} kvartalet ${s}`:t}if(e.mode==="weekCode"){const i=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2]),s=i[1];return e.display==="week-compact"?`${s} v. ${n}`:e.display==="week-long"?`vecka ${n} ${s}`:t}if(e.mode==="tertialCode"){const i=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2]),s=i[1],o=["första","andra","tredje"];return e.display==="tertial-compact"?`${s} T${n}`:e.display==="tertial-short"?`tertial ${n} ${s}`:e.display==="tertial-long"?`${o[n-1]} tertialet ${s}`:t}return null}_formatLocalizedNumber(t,e){return new Intl.NumberFormat(this.lang==="en"?"en-GB":"sv-SE",{minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}_formatValueForDisplay(t,e,i){if(!Number.isFinite(t))return null;const n={raw:1,thousands:1e3,millions:1e6,billions:1e9},s={raw:"",thousands:this.lang==="en"?"k":"t",millions:this.lang==="en"?"M":"mn",billions:this.lang==="en"?"B":"md"};let o=e.scale;if(o==="auto"){const p=Math.abs(t);p>=1e9?o="billions":p>=1e6?o="millions":p>=1e3?o="thousands":o="raw"}const a=t/(n[o]||1);let r=this._formatLocalizedNumber(a,e.decimals);e.type==="percent"?r=`${r} %`:e.type==="currency"&&(r=i?`${r} kr`:r);const h=s[o]||"";return h&&(r=`${r} ${h}`),r}_isCategoryAxis(t){return t?.categories?.length>0||t?.options?.type==="category"}_applyTimeFormatToLiveChart(t){const e=this._normalizeTimeFormat(this.timeFormat);if(e.mode==="raw"||e.display==="raw")return;const i=this._formatCategoryTimeLabel.bind(this);[...t?.xAxis||[],...t?.yAxis||[]].forEach(n=>{if(!this._isCategoryAxis(n))return;const s=n.options?.labels&&typeof n.options.labels=="object"?{...n.options.labels}:{},o=typeof s.formatter=="function"?s.formatter:null;s.formatter=function(){let a="";if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos=="number"){const h=this.axis.categories[this.pos];typeof h<"u"&&h!==null&&(a=String(h))}else typeof this?.value<"u"&&this.value!==null&&(a=String(this.value));const r=i(a,e);return r!==null?r:o?o.call(this):a},delete s.format,n.update({labels:s},!1)})}_applyValueFormatToLiveChart(t){const e=this._normalizeValueFormat(this.valueFormat),i=this._formatValueForDisplay.bind(this);t.update({tooltip:{...t.options?.tooltip||{},valueDecimals:e.decimals,formatter:function(){const n=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this];let s="";const o=[];return typeof this.x<"u"&&this.x!==null?s=`<span>${String(this.x)}</span><br/>`:typeof this.key<"u"&&this.key!==null&&(s=`<span>${String(this.key)}</span><br/>`),n.forEach(a=>{const r=a?.point||a,h=Number.isFinite(a?.y)?a.y:r?.y,p=i(h,e,!0);if(p===null)return;const b=r?.name||r?.series?.name||"";o.push(`${b?`${String(b)}: `:""}<b>${p}</b><br/>`)}),s+o.join("")}},plotOptions:{...t.options?.plotOptions||{},series:{...t.options?.plotOptions?.series||{},dataLabels:{...t.options?.plotOptions?.series?.dataLabels||{},formatter:function(){const n=Number.isFinite(this?.y)?this.y:this?.point?.y;return i(n,e,e.type==="percent")??null}}}}},!1,!1,!1),(t?.yAxis||[]).forEach(n=>{const s=n.options?.labels&&typeof n.options.labels=="object"?{...n.options.labels}:{},o=typeof s.formatter=="function"?s.formatter:null,a=!(n.options?.title&&typeof n.options.title.text=="string"&&n.options.title.text.trim());s.formatter=function(){const r=i(this?.value,e,a);return r!==null?r:o?o.call(this):this?.value},(e.type==="percent"||e.scale!=="auto")&&delete s.format,n.update({labels:s},!1)})}_applyYAxisSettingsToLiveChart(t){const e=this._normalizeYAxisSettings(this.yAxisSettings),i=t?.yAxis||[];i.length&&i.forEach((n,s)=>{const o=n.options&&typeof n.options=="object"?n.options:{},a={},r=typeof o.min<"u"&&o.min!==null&&o.min!=="";s===0&&e.startAtZero&&!r&&(a.min=0);const h=Array.isArray(o.plotLines)?o.plotLines.filter(p=>p?.id!=="scb-viz-reference-line"):[];s===0&&e.referenceLineEnabled&&Number.isFinite(e.referenceLineValue)&&h.push({id:"scb-viz-reference-line",className:"scb-axis-plotline scb-viz-reference-line",value:e.referenceLineValue,label:e.referenceLineLabel?{text:e.referenceLineLabel,className:"scb-viz-reference-line-label"}:void 0}),h.length?a.plotLines=h:Array.isArray(o.plotLines)&&(a.plotLines=[]),n.update(a,!1)})}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!=="diagram")return;const t=c(this,l,j).call(this,this._getDiagramAssignedElements());return t===void 0?void 0:window.Highcharts?.charts?.[t]}_getSeriesDifferentiationGroup(t,e){const i=String(t?.type||t?.options?.type||e?.options?.chart?.type||"").trim().toLowerCase();return["line","spline","scatter"].includes(i)?"line":["area","areaspline"].includes(i)?"area":["column","bar"].includes(i)?"fill":["pie","variablepie"].includes(i)?"point-fill":null}_shouldShowSeriesDifferentiationAction(){if(this._getCurrentPrintableView()!=="diagram")return!1;const t=this._getCurrentHighchartsChart();return!t?.series?.length||!this._isHighchartsStyledMode(t)?!1:t.series.some(e=>this._getSeriesDifferentiationGroup(e,t)!==null)}_getSeriesDifferentiationSnapshotStore(t){let e=this._seriesDifferentiationSnapshots.get(t);return e||(e=new Map,this._seriesDifferentiationSnapshots.set(t,e)),e}_cloneSeriesOptionValue(t){return Array.isArray(t)?t.map(e=>this._cloneSeriesOptionValue(e)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,i])=>[e,this._cloneSeriesOptionValue(i)])):t}_captureSeriesDifferentiationSnapshot(t){const e=this._cloneSeriesOptionValue(t?.options?.marker);return{marker:e&&Object.keys(e).length>0?e:{enabled:!1}}}_getHighchartsSvgElement(t){const e=t?.element??t;return e instanceof SVGElement?e:null}_isHighchartsStyledMode(t){return!!(t?.styledMode||t?.renderer?.styledMode||t?.options?.chart?.styledMode)}_getHighchartsSvgRoot(t){if(t?.container instanceof SVGSVGElement)return t.container;const e=t?.renderTo?.querySelector("svg")??t?.container?.querySelector?.("svg");return e instanceof SVGSVGElement?e:null}_getHighchartsColorClassName(t,e){const i=this._getHighchartsSvgElement(t);return Array.from(i?.classList??[]).find(s=>/^highcharts-color-\d+$/.test(s))??`highcharts-color-${e}`}_setSeriesDifferentiationMetadata(t,e){const i=this._getHighchartsSvgElement(t);i&&(i.setAttribute("data-scb-viz-role",e.role),e.dashStyle?i.setAttribute("data-scb-viz-dash-style",e.dashStyle):i.removeAttribute("data-scb-viz-dash-style"),e.patternKind?i.setAttribute("data-scb-viz-pattern-kind",e.patternKind):i.removeAttribute("data-scb-viz-pattern-kind"))}_clearSeriesDifferentiationMetadata(t){const e=this._getHighchartsSvgElement(t);e&&(e.removeAttribute("data-scb-viz-role"),e.removeAttribute("data-scb-viz-dash-style"),e.removeAttribute("data-scb-viz-pattern-kind"))}_setSeriesDifferentiationColorClass(t,e){const i=this._getHighchartsSvgElement(t);if(!i||!e)return;const n=Array.from(i.classList).find(s=>/^highcharts-color-\d+$/.test(s));n!==e&&(n&&(i.classList.remove(n),i.setAttribute("data-scb-viz-prev-color-class",n)),i.classList.add(e),i.setAttribute("data-scb-viz-added-color-class",e))}_clearSeriesDifferentiationColorClass(t){const e=this._getHighchartsSvgElement(t);if(!e)return;const i=e.getAttribute("data-scb-viz-added-color-class"),n=e.getAttribute("data-scb-viz-prev-color-class");i&&(e.classList.remove(i),e.removeAttribute("data-scb-viz-added-color-class")),n&&(e.classList.add(n),e.removeAttribute("data-scb-viz-prev-color-class"))}_getLegendSeriesDifferentiationTargets(t){const e=[],i=[],n=this._getHighchartsSvgElement(t?.legendItem?.group),s=(a,r)=>{const h=this._getHighchartsSvgElement(r);!h||a.includes(h)||a.push(h)};if(s(e,t?.legendLine),s(e,t?.legendItem?.line),s(i,t?.legendSymbol),s(i,t?.legendItem?.symbol),s(i,t?.legendArea),s(i,t?.legendItem?.area),n){const a=n.querySelector(".highcharts-graph, .highcharts-legend-graph, line, path");a&&s(e,a),n.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach(r=>{s(i,r)})}const o=i.filter(a=>!e.includes(a));return{graphTargets:e,fillTargets:o}}_ensureStyledModeSeriesPattern(t,e,i){const n=this._getHighchartsSvgRoot(t);if(!n)return;const s="http://www.w3.org/2000/svg";let o=n.querySelector("defs");o instanceof SVGDefsElement||(o=document.createElementNS(s,"defs"),n.insertBefore(o,n.firstChild));const a=`scb-viz-pattern-${e}-${i}`;if(o.querySelector(`#${a}`))return;const r=document.createElementNS(s,"pattern");r.setAttribute("id",a),r.setAttribute("patternUnits","userSpaceOnUse"),r.setAttribute("width","10"),r.setAttribute("height","10"),r.classList.add(e);const h=document.createElementNS(s,"rect");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","10"),h.setAttribute("height","10"),h.setAttribute("class","scb-viz-highcharts-pattern__background"),r.appendChild(h),ft(r,s,i),o.appendChild(r)}_applyStyledModeSeriesDifferentiation(t){const e=this._getHighchartsSvgRoot(t);if(!e)return;e.classList.add("scb-viz-series-differentiation-enabled");const i=ut(),n=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((s,o)=>{const a=this._getSeriesDifferentiationGroup(s,t);if(!a)return;const r=String(s?.index??o);n.has(r)||n.set(r,this._captureSeriesDifferentiationSnapshot(s));const{dashStyle:h,markerSymbol:p,patternKind:b}=mt(o),_=this._getHighchartsColorClassName(s?.graph??s?.area??s?.group,o),w=this._getLegendSeriesDifferentiationTargets(s);this._setSeriesDifferentiationMetadata(s?.graph,{role:"graph",dashStyle:h}),a==="area"&&(this._setSeriesDifferentiationMetadata(s?.area,{role:"area",patternKind:b}),this._setSeriesDifferentiationColorClass(s?.area,_),this._ensureStyledModeSeriesPattern(t,_,b)),a==="fill"&&(s.points?.forEach(d=>{this._setSeriesDifferentiationMetadata(d?.graphic,{role:"fill",patternKind:b}),this._setSeriesDifferentiationColorClass(d?.graphic,_)}),this._ensureStyledModeSeriesPattern(t,_,b)),a==="point-fill"&&s.points?.forEach((d,y)=>{const z=i[y%i.length],S=this._getHighchartsColorClassName(d?.graphic??d?.legendSymbol??d?.legendItem?.symbol??d?.legendItem?.group,y),C=this._getLegendSeriesDifferentiationTargets(d);this._setSeriesDifferentiationMetadata(d?.graphic,{role:"fill",patternKind:z}),this._setSeriesDifferentiationColorClass(d?.graphic,S),this._ensureStyledModeSeriesPattern(t,S,z),C.fillTargets.forEach(G=>{this._setSeriesDifferentiationMetadata(G,{role:"legend-fill",patternKind:z}),this._setSeriesDifferentiationColorClass(G,S)})}),(a==="line"||a==="area")&&w.graphTargets.forEach(d=>{this._setSeriesDifferentiationMetadata(d,{role:"legend-symbol",dashStyle:h})}),(a==="area"||a==="fill")&&w.fillTargets.forEach(d=>{this._setSeriesDifferentiationMetadata(d,{role:"legend-fill",patternKind:b}),this._setSeriesDifferentiationColorClass(d,_)}),(a==="line"||a==="area")&&s.update({marker:{enabled:!0,symbol:p}},!1)}),t.redraw(!1)}_restoreStyledModeSeriesDifferentiation(t){this._getHighchartsSvgRoot(t)?.classList.remove("scb-viz-series-differentiation-enabled");const i=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((n,s)=>{const o=this._getSeriesDifferentiationGroup(n,t);if(!o)return;const a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(r=>{const h=this._getLegendSeriesDifferentiationTargets(r);this._clearSeriesDifferentiationMetadata(r?.graphic),this._clearSeriesDifferentiationColorClass(r?.graphic),h.graphTargets.forEach(p=>{this._clearSeriesDifferentiationMetadata(p)}),h.fillTargets.forEach(p=>{this._clearSeriesDifferentiationMetadata(p),this._clearSeriesDifferentiationColorClass(p)})}),a.graphTargets.forEach(r=>{this._clearSeriesDifferentiationMetadata(r)}),a.fillTargets.forEach(r=>{this._clearSeriesDifferentiationMetadata(r),this._clearSeriesDifferentiationColorClass(r)}),o==="line"||o==="area"){const r=i.get(String(n?.index??s));n.update({marker:this._cloneSeriesOptionValue(r?.marker)},!1)}}),t.redraw(!1)}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getExportBaseFileName(){const t=this.lang==="en"?"visualization":"visualisering";return(this.title||t).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}_buildExportFileName(t){const e=t==="csv"?this.lang==="en"?"-table":"-tabell":"";return`${this._getExportBaseFileName()}${e}.${t}`}_renderActionsMenu(){const t=this._getCurrentPrintableView(),e=this._canExportRaster(),i=this._canExportCsv(),n=e&&(t==="diagram"||t==="image"),s=i&&t==="table",o=this._shouldShowSeriesDifferentiationAction();return g`
|
|
116
|
+
`;let g=class extends dt{constructor(){super(...arguments),_t(this,l),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth="",this.containerMaxWidth="",this.contentHeight="",this.toggleHeightMode="stable",this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._chartConfigSyncFrame=0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentPointerDown=t=>{if(!this._actionsMenuOpen)return;const e=t.composedPath(),i=this.shadowRoot?.querySelector(".actions-menu");i&&e.includes(i)||this._closeActionsMenu()},this._onDocumentKeyDown=t=>{this._actionsMenuOpen&&t.key==="Escape"&&(t.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await c(this,l,it).call(this)},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"png"))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await c(this,l,E).call(this,"jpeg"))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),c(this,l,st).call(this))},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),c(this,l,$).call(this)}}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}get actionsMenuLabel(){return this.lang==="en"?"Open menu":"Öppna meny"}get printLabel(){return this.lang==="en"?"Print":"Skriv ut"}get downloadPngLabel(){return this.lang==="en"?"Download PNG":"Ladda ner PNG"}get downloadJpgLabel(){return this.lang==="en"?"Download JPG":"Ladda ner JPG"}get downloadCsvLabel(){return this.lang==="en"?"Download CSV":"Ladda ner CSV"}get enableSeriesDifferentiationLabel(){return this.lang==="en"?"Show symbols and patterns":"Visa symboler och mönster"}get disableSeriesDifferentiationLabel(){return this.lang==="en"?"Hide symbols and patterns":"Dölj symboler och mönster"}_getImageAltText(){return[this.title,this.subtitle,this.description].map(e=>typeof e=="string"?e.trim():"").filter(Boolean).join(". ")||(this.lang==="en"?"Image figure":"Bildfigur")}connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown)}firstUpdated(t){this._readTableDataFromSlot(),c(this,l,H).call(this),c(this,l,V).call(this),c(this,l,D).call(this),this._syncChipClass(),c(this,l,L).call(this),c(this,l,M).call(this)}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&(this._syncChipClass(),this._closeActionsMenu()),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&c(this,l,H).call(this),t.has("containerMaxWidth")&&c(this,l,V).call(this),t.has("variant")&&c(this,l,L).call(this),(t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode")||t.has("variant"))&&c(this,l,D).call(this),(t.has("selectedChip")||t.has("variant")||t.has("contentMaxWidth")||t.has("contentHeight")||t.has("toggleHeightMode"))&&c(this,l,M).call(this),(t.has("selectedChip")||t.has("variant"))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),(t.has("valueFormat")||t.has("timeFormat")||t.has("yAxisSettings")||t.has("selectedChip")||t.has("variant"))&&c(this,l,k).call(this)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown),c(this,l,F).call(this),c(this,l,I).call(this),c(this,l,N).call(this)}_onTableSlotChange(t){const e=t.target;e&&(this._readTableDataFromSlot(e),this.requestUpdate())}_onDiagramSlotChange(){c(this,l,D).call(this),c(this,l,M).call(this),c(this,l,k).call(this),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{c(this,l,$).call(this)}),this.requestUpdate()}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const i=e.assignedElements({flatten:!0}),n=[];i.forEach(d=>{if(d.tagName==="TABLE"){n.push(d);return}d.querySelectorAll("table").forEach(y=>n.push(y))});const s=n[0];if(!s){this._slottedTableData=void 0;return}const o=[],a=[],r=[],h=d=>d?(d.textContent??"").replace(/\s+/g," ").trim():"",p=d=>d?{html:(d.innerHTML??"").trim(),text:h(d)}:{html:"",text:""},b=s.querySelector("thead tr");b&&Array.from(b.querySelectorAll("th, td")).forEach(y=>o.push(p(y)));const _=Array.from(s.querySelectorAll("tbody tr")),w=_.length>0?_:Array.from(s.querySelectorAll("tr")).filter(d=>d.closest("thead")===null);if(w.forEach(d=>{const y=Array.from(d.querySelectorAll("th, td"));if(y.length===0)return;const z=y[0].tagName==="TH"&&d.closest("thead")===null&&d.closest("tfoot")===null;r.push(z);const S=[];y.forEach(C=>S.push(p(C))),a.push(S)}),!b&&a.length>0){const d=a[0],y=w[0],z=Array.from(y?.querySelectorAll("th, td")??[]);z.length>0&&z.every(C=>C.tagName==="TH")&&y?.closest("tbody")===null&&(o.splice(0,o.length,...d),a.shift(),r.shift())}this._slottedTableData={headers:o.length>0?o:void 0,rows:a,rowHeaderRows:r.length>0?r:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(s=>s.length)),i=s=>{if(s==null)return!1;if(typeof s=="number")return!0;const o=String(s).replace(/[\u00A0\u202F\s]+/g,"").trim();return o?/^-?\d+(?:[.,]\d+)?$/.test(o):!1},n=[];for(let s=0;s<e;s+=1){if(s===0){n.push("left");continue}const o=t.rows.map(r=>this._normalizeRenderableCell(r[s]).text).filter(r=>r!==""&&r!==null&&r!==void 0),a=o.length>0&&o.every(i);n.push(a?"right":"left")}return n}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_getResolvedDiagramHeight(){return this.contentHeight?.trim()||""}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()||"720px"}_getResolvedToggleHeightMode(){return this.toggleHeightMode==="auto"?"auto":"stable"}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||"600px"}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getDiagramAssignedElements(){const t=this.shadowRoot?.querySelector('slot[name="diagram"]');return t?t.assignedElements({flatten:!0}):[]}_findExportableVisualElement(t){for(const e of t){if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e;const i=e.querySelector("svg, canvas, img");if(i instanceof SVGSVGElement||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement)return i}return null}_getExportableVisualElement(){if(this.variant==="Table")return null;if(this.variant==="Image"){const t=this.shadowRoot?.querySelector(".image-content img");return t instanceof HTMLImageElement?t:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:"number",scale:"auto",decimals:0}}_normalizeValueFormat(t){const e=this._getDefaultValueFormat(),i=t&&typeof t=="object"?t:{},n=["number","currency","percent"].includes(String(i.type))?String(i.type):e.type,s=["auto","raw","thousands","millions","billions"].includes(String(i.scale))?String(i.scale):e.scale,o=Number.isFinite(Number(i.decimals))?Math.max(0,Math.min(20,Number(i.decimals))):e.decimals;return{type:n,scale:s,decimals:o}}_normalizeTimeFormat(t){const e={mode:"raw",display:"raw"},i=t&&typeof t=="object"?t:{},n=["raw","year","monthCode","quarterCode","weekCode","tertialCode"];let s=typeof i.mode=="string"?i.mode:e.mode,o=typeof i.display=="string"?i.display:e.display;n.includes(s)||(s=e.mode);const a={raw:["raw"],year:["raw","year"],monthCode:["raw","iso-month","short-month","long-month"],quarterCode:["raw","quarter-compact","quarter-short","quarter-long"],weekCode:["raw","week-compact","week-long"],tertialCode:["raw","tertial-compact","tertial-short","tertial-long"]};return a[s].includes(o)||(o=a[s][0]),s==="raw"&&(o="raw"),{mode:s,display:o}}_normalizeYAxisSettings(t){const e=t&&typeof t=="object"?t:{},i=Number.isFinite(Number(e.referenceLineValue))?Number(e.referenceLineValue):null;return{startAtZero:!!e.startAtZero,referenceLineEnabled:!!e.referenceLineEnabled&&Number.isFinite(i),referenceLineValue:i,referenceLineLabel:typeof e.referenceLineLabel=="string"?e.referenceLineLabel:""}}_getShortMonthNames(){return["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"]}_getLongMonthNames(){return["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]}_formatCategoryTimeLabel(t,e){if(!t||e.mode==="raw"||e.display==="raw")return null;if(e.mode==="year"){const i=/^\s*(\d{4})\s*$/.exec(t);return i?i[1]:null}if(e.mode==="monthCode"){const i=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2])-1,s=i[1],o=String(n+1).padStart(2,"0");return e.display==="iso-month"?`${s}-${o}`:e.display==="short-month"?`${this._getShortMonthNames()[n]} ${s}`:e.display==="long-month"?`${this._getLongMonthNames()[n]} ${s}`:t}if(e.mode==="quarterCode"){const i=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(t);if(!i)return null;const n=Number(i[3]),s=i[1],o=["första","andra","tredje","fjärde"];return e.display==="quarter-compact"?`${s} K${n}`:e.display==="quarter-short"?`kv ${n} ${s}`:e.display==="quarter-long"?`${o[n-1]} kvartalet ${s}`:t}if(e.mode==="weekCode"){const i=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2]),s=i[1];return e.display==="week-compact"?`${s} v. ${n}`:e.display==="week-long"?`vecka ${n} ${s}`:t}if(e.mode==="tertialCode"){const i=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(t);if(!i)return null;const n=Number(i[2]),s=i[1],o=["första","andra","tredje"];return e.display==="tertial-compact"?`${s} T${n}`:e.display==="tertial-short"?`tertial ${n} ${s}`:e.display==="tertial-long"?`${o[n-1]} tertialet ${s}`:t}return null}_formatLocalizedNumber(t,e){return new Intl.NumberFormat(this.lang==="en"?"en-GB":"sv-SE",{minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}_formatValueForDisplay(t,e,i){if(!Number.isFinite(t))return null;const n={raw:1,thousands:1e3,millions:1e6,billions:1e9},s={raw:"",thousands:this.lang==="en"?"k":"t",millions:this.lang==="en"?"M":"mn",billions:this.lang==="en"?"B":"md"};let o=e.scale;if(o==="auto"){const p=Math.abs(t);p>=1e9?o="billions":p>=1e6?o="millions":p>=1e3?o="thousands":o="raw"}const a=t/(n[o]||1);let r=this._formatLocalizedNumber(a,e.decimals);e.type==="percent"?r=`${r} %`:e.type==="currency"&&(r=i?`${r} kr`:r);const h=s[o]||"";return h&&(r=`${r} ${h}`),r}_isCategoryAxis(t){return t?.categories?.length>0||t?.options?.type==="category"}_applyTimeFormatToLiveChart(t){const e=this._normalizeTimeFormat(this.timeFormat);if(e.mode==="raw"||e.display==="raw")return;const i=this._formatCategoryTimeLabel.bind(this);[...t?.xAxis||[],...t?.yAxis||[]].forEach(n=>{if(!this._isCategoryAxis(n))return;const s=n.options?.labels&&typeof n.options.labels=="object"?{...n.options.labels}:{},o=typeof s.formatter=="function"?s.formatter:null;s.formatter=function(){let a="";if(this?.axis&&Array.isArray(this.axis.categories)&&typeof this.pos=="number"){const h=this.axis.categories[this.pos];typeof h<"u"&&h!==null&&(a=String(h))}else typeof this?.value<"u"&&this.value!==null&&(a=String(this.value));const r=i(a,e);return r!==null?r:o?o.call(this):a},delete s.format,n.update({labels:s},!1)})}_applyValueFormatToLiveChart(t){const e=this._normalizeValueFormat(this.valueFormat),i=this._formatValueForDisplay.bind(this);t.update({tooltip:{...t.options?.tooltip||{},valueDecimals:e.decimals,formatter:function(){const n=Array.isArray(this.points)&&this.points.length?this.points:[this.point||this];let s="";const o=[];return typeof this.x<"u"&&this.x!==null?s=`<span>${String(this.x)}</span><br/>`:typeof this.key<"u"&&this.key!==null&&(s=`<span>${String(this.key)}</span><br/>`),n.forEach(a=>{const r=a?.point||a,h=Number.isFinite(a?.y)?a.y:r?.y,p=i(h,e,!0);if(p===null)return;const b=r?.name||r?.series?.name||"";o.push(`${b?`${String(b)}: `:""}<b>${p}</b><br/>`)}),s+o.join("")}},plotOptions:{...t.options?.plotOptions||{},series:{...t.options?.plotOptions?.series||{},dataLabels:{...t.options?.plotOptions?.series?.dataLabels||{},formatter:function(){const n=Number.isFinite(this?.y)?this.y:this?.point?.y;return i(n,e,e.type==="percent")??null}}}}},!1,!1,!1),(t?.yAxis||[]).forEach(n=>{const s=n.options?.labels&&typeof n.options.labels=="object"?{...n.options.labels}:{},o=typeof s.formatter=="function"?s.formatter:null,a=!(n.options?.title&&typeof n.options.title.text=="string"&&n.options.title.text.trim());s.formatter=function(){const r=i(this?.value,e,a);return r!==null?r:o?o.call(this):this?.value},(e.type==="percent"||e.scale!=="auto")&&delete s.format,n.update({labels:s},!1)})}_applyYAxisSettingsToLiveChart(t){const e=this._normalizeYAxisSettings(this.yAxisSettings),i=t?.yAxis||[];i.length&&i.forEach((n,s)=>{const o=n.options&&typeof n.options=="object"?n.options:{},a={},r=typeof o.min<"u"&&o.min!==null&&o.min!=="";s===0&&e.startAtZero&&!r&&(a.min=0);const h=Array.isArray(o.plotLines)?o.plotLines.filter(p=>p?.id!=="scb-viz-reference-line"):[];s===0&&e.referenceLineEnabled&&Number.isFinite(e.referenceLineValue)&&h.push({id:"scb-viz-reference-line",className:"scb-axis-plotline scb-viz-reference-line",value:e.referenceLineValue,label:e.referenceLineLabel?{text:e.referenceLineLabel,className:"scb-viz-reference-line-label"}:void 0}),h.length?a.plotLines=h:Array.isArray(o.plotLines)&&(a.plotLines=[]),n.update(a,!1)})}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!=="diagram")return;const t=c(this,l,j).call(this,this._getDiagramAssignedElements());return t===void 0?void 0:window.Highcharts?.charts?.[t]}_getSeriesDifferentiationGroup(t,e){const i=String(t?.type||t?.options?.type||e?.options?.chart?.type||"").trim().toLowerCase();return["line","spline","scatter"].includes(i)?"line":["area","areaspline"].includes(i)?"area":["column","bar"].includes(i)?"fill":["pie","variablepie"].includes(i)?"point-fill":null}_shouldShowSeriesDifferentiationAction(){if(this._getCurrentPrintableView()!=="diagram")return!1;const t=this._getCurrentHighchartsChart();return!t?.series?.length||!this._isHighchartsStyledMode(t)?!1:t.series.some(e=>this._getSeriesDifferentiationGroup(e,t)!==null)}_getSeriesDifferentiationSnapshotStore(t){let e=this._seriesDifferentiationSnapshots.get(t);return e||(e=new Map,this._seriesDifferentiationSnapshots.set(t,e)),e}_cloneSeriesOptionValue(t){return Array.isArray(t)?t.map(e=>this._cloneSeriesOptionValue(e)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,i])=>[e,this._cloneSeriesOptionValue(i)])):t}_captureSeriesDifferentiationSnapshot(t){const e=this._cloneSeriesOptionValue(t?.options?.marker);return{marker:e&&Object.keys(e).length>0?e:{enabled:!1}}}_getHighchartsSvgElement(t){const e=t?.element??t;return e instanceof SVGElement?e:null}_isHighchartsStyledMode(t){return!!(t?.styledMode||t?.renderer?.styledMode||t?.options?.chart?.styledMode)}_getHighchartsSvgRoot(t){if(t?.container instanceof SVGSVGElement)return t.container;const e=t?.renderTo?.querySelector("svg")??t?.container?.querySelector?.("svg");return e instanceof SVGSVGElement?e:null}_getHighchartsColorClassName(t,e){const i=this._getHighchartsSvgElement(t);return Array.from(i?.classList??[]).find(s=>/^highcharts-color-\d+$/.test(s))??`highcharts-color-${e}`}_setSeriesDifferentiationMetadata(t,e){const i=this._getHighchartsSvgElement(t);i&&(i.setAttribute("data-scb-viz-role",e.role),e.dashStyle?i.setAttribute("data-scb-viz-dash-style",e.dashStyle):i.removeAttribute("data-scb-viz-dash-style"),e.patternKind?i.setAttribute("data-scb-viz-pattern-kind",e.patternKind):i.removeAttribute("data-scb-viz-pattern-kind"))}_clearSeriesDifferentiationMetadata(t){const e=this._getHighchartsSvgElement(t);e&&(e.removeAttribute("data-scb-viz-role"),e.removeAttribute("data-scb-viz-dash-style"),e.removeAttribute("data-scb-viz-pattern-kind"))}_setSeriesDifferentiationColorClass(t,e){const i=this._getHighchartsSvgElement(t);if(!i||!e)return;const n=Array.from(i.classList).find(s=>/^highcharts-color-\d+$/.test(s));n!==e&&(n&&(i.classList.remove(n),i.setAttribute("data-scb-viz-prev-color-class",n)),i.classList.add(e),i.setAttribute("data-scb-viz-added-color-class",e))}_clearSeriesDifferentiationColorClass(t){const e=this._getHighchartsSvgElement(t);if(!e)return;const i=e.getAttribute("data-scb-viz-added-color-class"),n=e.getAttribute("data-scb-viz-prev-color-class");i&&(e.classList.remove(i),e.removeAttribute("data-scb-viz-added-color-class")),n&&(e.classList.add(n),e.removeAttribute("data-scb-viz-prev-color-class"))}_getLegendSeriesDifferentiationTargets(t){const e=[],i=[],n=this._getHighchartsSvgElement(t?.legendItem?.group),s=(a,r)=>{const h=this._getHighchartsSvgElement(r);!h||a.includes(h)||a.push(h)};if(s(e,t?.legendLine),s(e,t?.legendItem?.line),s(i,t?.legendSymbol),s(i,t?.legendItem?.symbol),s(i,t?.legendArea),s(i,t?.legendItem?.area),n){const a=n.querySelector(".highcharts-graph, .highcharts-legend-graph, line, path");a&&s(e,a),n.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach(r=>{s(i,r)})}const o=i.filter(a=>!e.includes(a));return{graphTargets:e,fillTargets:o}}_ensureStyledModeSeriesPattern(t,e,i){const n=this._getHighchartsSvgRoot(t);if(!n)return;const s="http://www.w3.org/2000/svg";let o=n.querySelector("defs");o instanceof SVGDefsElement||(o=document.createElementNS(s,"defs"),n.insertBefore(o,n.firstChild));const a=`scb-viz-pattern-${e}-${i}`;if(o.querySelector(`#${a}`))return;const r=document.createElementNS(s,"pattern");r.setAttribute("id",a),r.setAttribute("patternUnits","userSpaceOnUse"),r.setAttribute("width","10"),r.setAttribute("height","10"),r.classList.add(e);const h=document.createElementNS(s,"rect");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width","10"),h.setAttribute("height","10"),h.setAttribute("class","scb-viz-highcharts-pattern__background"),r.appendChild(h),ft(r,s,i),o.appendChild(r)}_applyStyledModeSeriesDifferentiation(t){const e=this._getHighchartsSvgRoot(t);if(!e)return;e.classList.add("scb-viz-series-differentiation-enabled");const i=ut(),n=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((s,o)=>{const a=this._getSeriesDifferentiationGroup(s,t);if(!a)return;const r=String(s?.index??o);n.has(r)||n.set(r,this._captureSeriesDifferentiationSnapshot(s));const{dashStyle:h,markerSymbol:p,patternKind:b}=mt(o),_=this._getHighchartsColorClassName(s?.graph??s?.area??s?.group,o),w=this._getLegendSeriesDifferentiationTargets(s);this._setSeriesDifferentiationMetadata(s?.graph,{role:"graph",dashStyle:h}),a==="area"&&(this._setSeriesDifferentiationMetadata(s?.area,{role:"area",patternKind:b}),this._setSeriesDifferentiationColorClass(s?.area,_),this._ensureStyledModeSeriesPattern(t,_,b)),a==="fill"&&(s.points?.forEach(d=>{this._setSeriesDifferentiationMetadata(d?.graphic,{role:"fill",patternKind:b}),this._setSeriesDifferentiationColorClass(d?.graphic,_)}),this._ensureStyledModeSeriesPattern(t,_,b)),a==="point-fill"&&s.points?.forEach((d,y)=>{const z=i[y%i.length],S=this._getHighchartsColorClassName(d?.graphic??d?.legendSymbol??d?.legendItem?.symbol??d?.legendItem?.group,y),C=this._getLegendSeriesDifferentiationTargets(d);this._setSeriesDifferentiationMetadata(d?.graphic,{role:"fill",patternKind:z}),this._setSeriesDifferentiationColorClass(d?.graphic,S),this._ensureStyledModeSeriesPattern(t,S,z),C.fillTargets.forEach(G=>{this._setSeriesDifferentiationMetadata(G,{role:"legend-fill",patternKind:z}),this._setSeriesDifferentiationColorClass(G,S)})}),(a==="line"||a==="area")&&w.graphTargets.forEach(d=>{this._setSeriesDifferentiationMetadata(d,{role:"legend-symbol",dashStyle:h})}),(a==="area"||a==="fill")&&w.fillTargets.forEach(d=>{this._setSeriesDifferentiationMetadata(d,{role:"legend-fill",patternKind:b}),this._setSeriesDifferentiationColorClass(d,_)}),(a==="line"||a==="area")&&s.update({marker:{enabled:!0,symbol:p}},!1)}),t.redraw(!1)}_restoreStyledModeSeriesDifferentiation(t){this._getHighchartsSvgRoot(t)?.classList.remove("scb-viz-series-differentiation-enabled");const i=this._getSeriesDifferentiationSnapshotStore(t);t.series?.forEach((n,s)=>{const o=this._getSeriesDifferentiationGroup(n,t);if(!o)return;const a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(r=>{const h=this._getLegendSeriesDifferentiationTargets(r);this._clearSeriesDifferentiationMetadata(r?.graphic),this._clearSeriesDifferentiationColorClass(r?.graphic),h.graphTargets.forEach(p=>{this._clearSeriesDifferentiationMetadata(p)}),h.fillTargets.forEach(p=>{this._clearSeriesDifferentiationMetadata(p),this._clearSeriesDifferentiationColorClass(p)})}),a.graphTargets.forEach(r=>{this._clearSeriesDifferentiationMetadata(r)}),a.fillTargets.forEach(r=>{this._clearSeriesDifferentiationMetadata(r),this._clearSeriesDifferentiationColorClass(r)}),o==="line"||o==="area"){const r=i.get(String(n?.index??s));n.update({marker:this._cloneSeriesOptionValue(r?.marker)},!1)}}),t.redraw(!1)}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getExportBaseFileName(){const t=this.lang==="en"?"visualization":"visualisering";return(this.title||t).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}_buildExportFileName(t){const e=t==="csv"?this.lang==="en"?"-table":"-tabell":"";return`${this._getExportBaseFileName()}${e}.${t}`}_renderActionsMenu(){const t=this._getCurrentPrintableView(),e=this._canExportRaster(),i=this._canExportCsv(),n=e&&(t==="diagram"||t==="image"),s=i&&t==="table",o=this._shouldShowSeriesDifferentiationAction();return f`
|
|
117
117
|
<div class="actions-menu">
|
|
118
118
|
<scb-icon-button
|
|
119
119
|
icon="more_vert"
|
|
@@ -144,7 +144,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
144
144
|
<span class="actions-menu-item-label">${this.printLabel}</span>
|
|
145
145
|
</button>
|
|
146
146
|
</li>
|
|
147
|
-
${n?
|
|
147
|
+
${n?f`
|
|
148
148
|
<li>
|
|
149
149
|
<button
|
|
150
150
|
type="button"
|
|
@@ -168,7 +168,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
168
168
|
</button>
|
|
169
169
|
</li>
|
|
170
170
|
`:""}
|
|
171
|
-
${s?
|
|
171
|
+
${s?f`
|
|
172
172
|
<li>
|
|
173
173
|
<button
|
|
174
174
|
type="button"
|
|
@@ -181,7 +181,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
181
181
|
</button>
|
|
182
182
|
</li>
|
|
183
183
|
`:""}
|
|
184
|
-
${o?
|
|
184
|
+
${o?f`
|
|
185
185
|
<li>
|
|
186
186
|
<button
|
|
187
187
|
type="button"
|
|
@@ -200,9 +200,9 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
200
200
|
</ul>
|
|
201
201
|
</div>
|
|
202
202
|
</div>
|
|
203
|
-
`}_renderActions(){return
|
|
203
|
+
`}_renderActions(){return f`
|
|
204
204
|
<div class="actions-row">
|
|
205
|
-
${this.variant==="Standard"&&!this.disableToggle?
|
|
205
|
+
${this.variant==="Standard"&&!this.disableToggle?f`
|
|
206
206
|
<div class="flipp-wrapper">
|
|
207
207
|
<scb-segmented-button
|
|
208
208
|
.value=${this.selectedChip||""}
|
|
@@ -220,58 +220,58 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
220
220
|
></scb-segmented-item>
|
|
221
221
|
</scb-segmented-button>
|
|
222
222
|
</div>
|
|
223
|
-
`:
|
|
223
|
+
`:f`<div></div>`}
|
|
224
224
|
${this._renderActionsMenu()}
|
|
225
225
|
</div>
|
|
226
|
-
`}_renderHeader(t=!1){const e=
|
|
226
|
+
`}_renderHeader(t=!1){const e=f`
|
|
227
227
|
<div class="header">
|
|
228
|
-
${this.title?
|
|
229
|
-
${this.subtitle?
|
|
228
|
+
${this.title?f` <div class="label" role="heading" aria-level="2">${this.title}</div> `:""}
|
|
229
|
+
${this.subtitle?f` <div class="sub-label">${this.subtitle}</div> `:""}
|
|
230
230
|
</div>
|
|
231
|
-
`;return t?
|
|
231
|
+
`;return t?f`
|
|
232
232
|
<div class="header-row">
|
|
233
233
|
${e}
|
|
234
234
|
${this._renderActionsMenu()}
|
|
235
235
|
</div>
|
|
236
|
-
`:e}_renderTable(){const t=this.tableData??this._slottedTableData;if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(r=>r.length)),n=(t.headers??[]).map(r=>this._normalizeRenderableCell(r)),s=t.rows.map(r=>{const h=r.map(p=>this._normalizeRenderableCell(p));for(;h.length<i;)h.push({html:"",text:""});return h}),o=t.rowHeaderRows??[],a=[this.title,this.subtitle].map(r=>typeof r=="string"?r.trim():"").filter(Boolean).join(". ");return
|
|
236
|
+
`:e}_renderTable(){const t=this.tableData??this._slottedTableData;if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(r=>r.length)),n=(t.headers??[]).map(r=>this._normalizeRenderableCell(r)),s=t.rows.map(r=>{const h=r.map(p=>this._normalizeRenderableCell(p));for(;h.length<i;)h.push({html:"",text:""});return h}),o=t.rowHeaderRows??[],a=[this.title,this.subtitle].map(r=>typeof r=="string"?r.trim():"").filter(Boolean).join(". ");return f`
|
|
237
237
|
<table class="scb-viz-table" part="table">
|
|
238
|
-
${a?
|
|
239
|
-
${n.length>0?
|
|
238
|
+
${a?f`<caption class="visually-hidden">${a}</caption>`:""}
|
|
239
|
+
${n.length>0?f`
|
|
240
240
|
<thead>
|
|
241
241
|
<tr>
|
|
242
|
-
${n.map((r,h)=>{const p=e[h]==="right"?"align-right":"align-left";return
|
|
242
|
+
${n.map((r,h)=>{const p=e[h]==="right"?"align-right":"align-left";return f`<th scope="col" class=${p}>${r.html?W(r.html):r.text}</th>`})}
|
|
243
243
|
</tr>
|
|
244
244
|
</thead>
|
|
245
245
|
`:""}
|
|
246
246
|
<tbody>
|
|
247
|
-
${s.map((r,h)=>{const p=o[h]===!0;return
|
|
247
|
+
${s.map((r,h)=>{const p=o[h]===!0;return f`
|
|
248
248
|
<tr>
|
|
249
|
-
${r.map((b,_)=>{const w=e[_]==="right"?"align-right":"align-left",d=b.html?W(b.html):b.text;return _===0&&p?
|
|
249
|
+
${r.map((b,_)=>{const w=e[_]==="right"?"align-right":"align-left",d=b.html?W(b.html):b.text;return _===0&&p?f`<th scope="row" class=${w}>${d}</th>`:f`<td class=${w}>${d}</td>`})}
|
|
250
250
|
</tr>
|
|
251
251
|
`})}
|
|
252
252
|
</tbody>
|
|
253
253
|
</table>
|
|
254
|
-
`}_hasMoreAboutStats(){return!!(this.comment||this.source||this.footnote||this.officialStatistics)}_renderMoreAboutStatsContent(){return
|
|
254
|
+
`}_hasMoreAboutStats(){return!!(this.comment||this.source||this.footnote||this.officialStatistics)}_renderMoreAboutStatsContent(){return f`
|
|
255
255
|
<div class="more-about-stats-content">
|
|
256
|
-
${this.comment?
|
|
256
|
+
${this.comment?f`
|
|
257
257
|
<div class="section">
|
|
258
258
|
<div class="secondary-label" role="heading" aria-level="3">${this.commentLabel}</div>
|
|
259
259
|
<div class="body-text">${this.comment}</div>
|
|
260
260
|
</div>
|
|
261
261
|
`:""}
|
|
262
|
-
${this.source?
|
|
262
|
+
${this.source?f`
|
|
263
263
|
<div class="section">
|
|
264
264
|
<div class="secondary-label" role="heading" aria-level="3">${this.sourceLabel}</div>
|
|
265
265
|
<div class="body-text">${this.source}</div>
|
|
266
266
|
</div>
|
|
267
267
|
`:""}
|
|
268
|
-
${this.footnote?
|
|
268
|
+
${this.footnote?f`
|
|
269
269
|
<div class="section">
|
|
270
270
|
<div class="secondary-label" role="heading" aria-level="3">${this.footnoteLabel}</div>
|
|
271
271
|
<div class="body-text">${this.footnote}</div>
|
|
272
272
|
</div>
|
|
273
273
|
`:""}
|
|
274
|
-
${this.officialStatistics?
|
|
274
|
+
${this.officialStatistics?f`
|
|
275
275
|
<a
|
|
276
276
|
class="sos-logotype-link"
|
|
277
277
|
href="https://www.scb.se/sos"
|
|
@@ -286,7 +286,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
286
286
|
</a>
|
|
287
287
|
`:""}
|
|
288
288
|
</div>
|
|
289
|
-
`}_renderMoreAboutStatsScreen(){return this._hasMoreAboutStats()?
|
|
289
|
+
`}_renderMoreAboutStatsScreen(){return this._hasMoreAboutStats()?f`
|
|
290
290
|
<div class="footer-statistics-screen">
|
|
291
291
|
<scb-divider></scb-divider>
|
|
292
292
|
<scb-accordion>
|
|
@@ -295,16 +295,16 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
295
295
|
</scb-accordion-item>
|
|
296
296
|
</scb-accordion>
|
|
297
297
|
</div>
|
|
298
|
-
`:""}_renderMoreAboutStatsPrint(){return this._hasMoreAboutStats()?
|
|
298
|
+
`:""}_renderMoreAboutStatsPrint(){return this._hasMoreAboutStats()?f`
|
|
299
299
|
<div class="footer-statistics-print print-more-about-stats">
|
|
300
300
|
<div class="secondary-label print-more-about-stats-heading" role="heading" aria-level="3">
|
|
301
301
|
${this.moreAboutStatsLabel}
|
|
302
302
|
</div>
|
|
303
303
|
${this._renderMoreAboutStatsContent()}
|
|
304
304
|
</div>
|
|
305
|
-
`:""}_renderFooter(){return
|
|
305
|
+
`:""}_renderFooter(){return f`
|
|
306
306
|
<div class="footer">
|
|
307
|
-
${this.description?
|
|
307
|
+
${this.description?f`
|
|
308
308
|
<div class="description section">
|
|
309
309
|
<div class="secondary-label" role="heading" aria-level="3">${this.descriptionLabel}</div>
|
|
310
310
|
<div class="body-text">${this.description}</div>
|
|
@@ -313,7 +313,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
313
313
|
${this._renderMoreAboutStatsScreen()}
|
|
314
314
|
${this._renderMoreAboutStatsPrint()}
|
|
315
315
|
</div>
|
|
316
|
-
`}render(){switch(this.variant){case"Table":return
|
|
316
|
+
`}render(){switch(this.variant){case"Table":return f`
|
|
317
317
|
<div part="container" class="viz-container">
|
|
318
318
|
${this._renderHeader(!0)}
|
|
319
319
|
<div class="content">
|
|
@@ -334,7 +334,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
334
334
|
></slot>
|
|
335
335
|
<slot></slot>
|
|
336
336
|
</div>
|
|
337
|
-
`;case"Image":return
|
|
337
|
+
`;case"Image":return f`
|
|
338
338
|
<div part="container" class="viz-container">
|
|
339
339
|
${this._renderHeader(!0)}
|
|
340
340
|
<div
|
|
@@ -351,7 +351,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
351
351
|
></slot>
|
|
352
352
|
<slot></slot>
|
|
353
353
|
</div>
|
|
354
|
-
`;default:return
|
|
354
|
+
`;default:return f`
|
|
355
355
|
<div part="container" class="viz-container">
|
|
356
356
|
${this._renderHeader()}
|
|
357
357
|
${this._renderActions()}
|
|
@@ -362,26 +362,19 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
362
362
|
<div
|
|
363
363
|
class=${`standard-content-panel standard-content-panel--diagram ${this.selectedChip==="Diagram"?"standard-content-panel--active":""}`}
|
|
364
364
|
>
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
`:g`
|
|
379
|
-
<div class="standard-diagram-scroller">
|
|
380
|
-
<div class="diagram-content">
|
|
381
|
-
<slot name="diagram" @slotchange=${this._onDiagramSlotChange}></slot>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
`}
|
|
365
|
+
<scb-horizontal-scroller
|
|
366
|
+
width=${this._getResolvedDiagramScrollerWidth()}
|
|
367
|
+
class="standard-diagram-scroller"
|
|
368
|
+
variant="inline"
|
|
369
|
+
show-scrollbar
|
|
370
|
+
>
|
|
371
|
+
<div
|
|
372
|
+
class="diagram-content"
|
|
373
|
+
style=${this._getResolvedContentMaxWidth()?`--scb-viz-content-max-width: ${this._getResolvedContentMaxWidth()};`:""}
|
|
374
|
+
>
|
|
375
|
+
<slot name="diagram" @slotchange=${this._onDiagramSlotChange}></slot>
|
|
376
|
+
</div>
|
|
377
|
+
</scb-horizontal-scroller>
|
|
385
378
|
</div>
|
|
386
379
|
<div
|
|
387
380
|
class=${`standard-content-panel standard-content-panel--table ${this.selectedChip==="Table"?"standard-content-panel--active":""}`}
|
|
@@ -407,7 +400,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
407
400
|
></slot>
|
|
408
401
|
<slot></slot>
|
|
409
402
|
</div>
|
|
410
|
-
`}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}_toggleActionsMenu(t){t.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){this.shadowRoot?.querySelector(".actions-menu scb-icon-button")?.focus()}_focusFirstMenuItem(){this.shadowRoot?.querySelector(".actions-menu-item")?.focus()}_getCurrentPrintableView(){return this.variant==="Table"?"table":this.variant==="Image"?"image":this.selectedChip==="Table"?"table":"diagram"}};l=new WeakSet;L=function(){if(c(this,l,F).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{c(this,l,M).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};F=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};I=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};M=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(c(this,l,I).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,c(this,l,K).call(this)})}))};A=function(t){const e=t?.getAttribute("data-highcharts-chart");if(!e)return;const i=Number.parseInt(e,10);return Number.isNaN(i)?void 0:i};j=function(t){for(const e of t){const i=c(this,l,A).call(this,e);if(i!==void 0)return i;const n=e.querySelector("[data-highcharts-chart]"),s=c(this,l,A).call(this,n);if(s!==void 0)return s}};K=function(){if(this.variant!=="Standard"||this.selectedChip!=="Diagram")return;const t=this.shadowRoot?.querySelector('slot[name="diagram"]');if(!t)return;const e=t.assignedElements({flatten:!0});if(e.length===0)return;const i=c(this,l,j).call(this,e);if(i===void 0)return;const s=window.Highcharts?.charts?.[i];s&&(s.setSize?.(null,null,!1),s.reflow?.(),this._seriesDifferentiationEnabled&&c(this,l,$).call(this))};D=function(){const t=this.variant==="Standard"?this._getResolvedDiagramHeight():"",e=this.variant==="Standard"&&this._getResolvedToggleHeightMode()==="stable"?this._getResolvedStandardContentHeight():"";this.variant==="Standard"?this.style.setProperty("--scb-viz-diagram-min-height",t||"
|
|
403
|
+
`}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}_toggleActionsMenu(t){t.stopPropagation(),this._actionsMenuOpen=!this._actionsMenuOpen,this._actionsMenuOpen&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){this.shadowRoot?.querySelector(".actions-menu scb-icon-button")?.focus()}_focusFirstMenuItem(){this.shadowRoot?.querySelector(".actions-menu-item")?.focus()}_getCurrentPrintableView(){return this.variant==="Table"?"table":this.variant==="Image"?"image":this.selectedChip==="Table"?"table":"diagram"}};l=new WeakSet;L=function(){if(c(this,l,F).call(this),typeof ResizeObserver>"u")return;const t=this.shadowRoot?.querySelector(".diagram-content");t&&(this._diagramResizeObserver=new ResizeObserver(()=>{c(this,l,M).call(this)}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(t))};F=function(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0};I=function(){this._diagramReflowFrame&&(cancelAnimationFrame(this._diagramReflowFrame),this._diagramReflowFrame=0)};M=function(){this.variant!=="Standard"||this.selectedChip!=="Diagram"||(c(this,l,I).call(this),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,c(this,l,K).call(this)})}))};A=function(t){const e=t?.getAttribute("data-highcharts-chart");if(!e)return;const i=Number.parseInt(e,10);return Number.isNaN(i)?void 0:i};j=function(t){for(const e of t){const i=c(this,l,A).call(this,e);if(i!==void 0)return i;const n=e.querySelector("[data-highcharts-chart]"),s=c(this,l,A).call(this,n);if(s!==void 0)return s}};K=function(){if(this.variant!=="Standard"||this.selectedChip!=="Diagram")return;const t=this.shadowRoot?.querySelector('slot[name="diagram"]');if(!t)return;const e=t.assignedElements({flatten:!0});if(e.length===0)return;const i=c(this,l,j).call(this,e);if(i===void 0)return;const s=window.Highcharts?.charts?.[i];s&&(s.setSize?.(null,null,!1),s.reflow?.(),this._seriesDifferentiationEnabled&&c(this,l,$).call(this))};D=function(){const t=this.variant==="Standard"?this._getResolvedDiagramHeight():"",e=this.variant==="Standard"&&this._getResolvedToggleHeightMode()==="stable"?this._getResolvedStandardContentHeight():"";this.variant==="Standard"?this.style.setProperty("--scb-viz-diagram-min-height",t||"600px"):this.style.removeProperty("--scb-viz-diagram-min-height"),t?(this.style.setProperty("--scb-viz-diagram-height",t),this.style.setProperty("--scb-viz-diagram-overflow","hidden")):(this.style.removeProperty("--scb-viz-diagram-height"),this.style.removeProperty("--scb-viz-diagram-overflow")),e?this.style.setProperty("--scb-viz-standard-content-height",e):this.style.removeProperty("--scb-viz-standard-content-height")};N=function(){this._chartConfigSyncFrame&&(cancelAnimationFrame(this._chartConfigSyncFrame),this._chartConfigSyncFrame=0)};k=function(){c(this,l,N).call(this),this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=requestAnimationFrame(()=>{this._chartConfigSyncFrame=0,c(this,l,J).call(this)})})};J=function(){const t=this._getCurrentHighchartsChart();if(!t)return;let e=!1;typeof this.timeFormat<"u"&&(this._applyTimeFormatToLiveChart(t),e=!0),typeof this.valueFormat<"u"&&(this._applyValueFormatToLiveChart(t),e=!0),typeof this.yAxisSettings<"u"&&(this._applyYAxisSettingsToLiveChart(t),e=!0),e&&t.redraw(!1)};Y=function(t){this._isHighchartsStyledMode(t)&&this._applyStyledModeSeriesDifferentiation(t)};Z=function(t){this._isHighchartsStyledMode(t)&&this._restoreStyledModeSeriesDifferentiation(t)};$=function(){const t=this._getCurrentHighchartsChart();if(t){if(this._seriesDifferentiationEnabled){c(this,l,Y).call(this,t);return}c(this,l,Z).call(this,t)}};E=async function(t){const e=this._getExportableVisualElement();if(!e)return;const i=await c(this,l,nt).call(this,e,t);i&&c(this,l,B).call(this,i,this._buildExportFileName(t==="jpeg"?"jpg":"png"))};v=function(t){return String(t??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};Q=function(t){const e=this._inferTableAlignments(t),i=Math.max(t.headers?.length??0,...t.rows.map(h=>h.length)),n=(t.headers??[]).map(h=>this._normalizeRenderableCell(h)),s=t.rows.map(h=>{const p=h.map(b=>this._normalizeRenderableCell(b));for(;p.length<i;)p.push({html:"",text:""});return p}),o=t.rowHeaderRows??[],a=n.length?`<thead><tr>${n.map((h,p)=>`<th scope="col" class="${e[p]==="right"?"align-right":"align-left"}">${h.html||c(this,l,v).call(this,h.text)}</th>`).join("")}</tr></thead>`:"",r=`<tbody>${s.map((h,p)=>{const b=o[p]===!0;return`<tr>${h.map((w,d)=>{const y=e[d]==="right"?"align-right":"align-left",z=w.html||c(this,l,v).call(this,w.text);return d===0&&b?`<th scope="row" class="${y}">${z}</th>`:`<td class="${y}">${z}</td>`}).join("")}</tr>`}).join("")}</tbody>`;return`<table class="scb-viz-print-table">${a}${r}</table>`};X=function(){const t=[];if(this.description&&t.push(`
|
|
411
404
|
<section class="print-section">
|
|
412
405
|
<h2>${c(this,l,v).call(this,this.descriptionLabel)}</h2>
|
|
413
406
|
<div>${c(this,l,v).call(this,this.description)}</div>
|
|
@@ -485,7 +478,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
485
478
|
</article>
|
|
486
479
|
</body>
|
|
487
480
|
</html>`};et=async function(t){const e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.right="0",e.style.bottom="0",e.style.width="0",e.style.height="0",e.style.border="0",e.style.visibility="hidden",document.body.appendChild(e);const i=()=>{e.remove()},n=e.contentDocument,s=e.contentWindow;if(!n||!s){i();return}n.open(),n.write(t),n.close();const o=Array.from(n.images||[]);await Promise.all(o.map(r=>r.complete?Promise.resolve():new Promise(h=>{r.addEventListener("load",()=>h(null),{once:!0}),r.addEventListener("error",()=>h(null),{once:!0})})));const a=()=>{s.removeEventListener("afterprint",a),i()};s.addEventListener("afterprint",a,{once:!0}),setTimeout(()=>{s.focus(),s.print(),setTimeout(i,1e3)},50)};it=async function(){const t=this._getCurrentPrintableView();let e="";if(t==="table"){const i=this._getResolvedTableData();if(!i?.rows?.length)return;e=c(this,l,Q).call(this,i)}else if(t==="image"){const i=this.shadowRoot?.querySelector(".image-content img"),n=i?.currentSrc||i?.src||this.imageHref;if(!n)return;e=`<img class="viz-image" src="${c(this,l,v).call(this,n)}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}else{const i=this._getExportableVisualElement();if(!i)return;const n=await c(this,l,at).call(this,i,"png");if(!n)return;e=`<img class="viz-chart-image" src="${n}" alt="${c(this,l,v).call(this,this._getImageAltText())}">`}await c(this,l,et).call(this,c(this,l,tt).call(this,e))};st=function(){const t=this._getResolvedTableData();if(!t?.rows?.length)return;const e=this.lang==="en"?",":";",i=[];t.headers?.length&&i.push(t.headers.map(a=>this._normalizeRenderableCell(a).text)),t.rows.forEach(a=>{i.push(a.map(r=>this._normalizeRenderableCell(r).text))});const n=a=>`"${String(a??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,s=`\uFEFF${i.map(a=>a.map(n).join(e)).join(`\r
|
|
488
|
-
`)}`,o=new Blob([s],{type:"text/csv;charset=utf-8;"});c(this,l,B).call(this,o,this._buildExportFileName("csv"))};nt=async function(t,e){const i=await c(this,l,O).call(this,t);return i?c(this,l,lt).call(this,i,e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};at=async function(t,e){const i=await c(this,l,O).call(this,t);return i?i.toDataURL(e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};O=async function(t){if(t instanceof HTMLCanvasElement){const a=t.width||Math.round(t.getBoundingClientRect().width),r=t.height||Math.round(t.getBoundingClientRect().height);if(!a||!r)return null;const h=document.createElement("canvas");h.width=a,h.height=r;const p=h.getContext("2d");return p?(p.fillStyle=c(this,l,q).call(this),p.fillRect(0,0,a,r),p.drawImage(t,0,0,a,r),h):null}if(t instanceof HTMLImageElement){const a=t.naturalWidth||t.width,r=t.naturalHeight||t.height;return!a||!r?null:c(this,l,R).call(this,t.currentSrc||t.src,a,r)}const{width:e,height:i,serialized:n}=c(this,l,rt).call(this,t);if(!e||!i||!n)return null;const s=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(s);try{return await c(this,l,R).call(this,o,e,i)}finally{URL.revokeObjectURL(o)}};rt=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),n=t.viewBox?.baseVal,s=Math.round(n?.width||i.width||Number(t.getAttribute("width"))||0),o=Math.round(n?.height||i.height||Number(t.getAttribute("height"))||0);return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")&&s&&e.setAttribute("width",String(s)),!e.getAttribute("height")&&o&&e.setAttribute("height",String(o)),!e.getAttribute("viewBox")&&s&&o&&e.setAttribute("viewBox",`0 0 ${s} ${o}`),c(this,l,T).call(this,t,e),e.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(a=>a.remove()),{width:s,height:o,serialized:new XMLSerializer().serializeToString(e)}};T=function(t,e){const i=getComputedStyle(t);let n="";for(let a=0;a<i.length;a+=1){const r=i[a],h=i.getPropertyValue(r);h&&(n+=`${r}:${h};`)}n&&e.setAttribute("style",n);const s=Array.from(t.children),o=Array.from(e.children);for(let a=0;a<s.length;a+=1){const r=s[a],h=o[a];r&&h&&c(this,l,T).call(this,r,h)}};R=async function(t,e,i){const n=Math.max(1,Math.min(2,window.devicePixelRatio||1)),s=Math.max(1,Math.round(e)),o=Math.max(1,Math.round(i)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(s*n)),a.height=Math.max(1,Math.round(o*n));const r=a.getContext("2d");if(!r)return null;const h=await c(this,l,ot).call(this,t);return h?(r.scale(n,n),r.fillStyle=c(this,l,q).call(this),r.fillRect(0,0,s,o),r.drawImage(h,0,0,s,o),a):null};ot=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};lt=function(t,e,i){return new Promise(n=>{t.toBlob(s=>n(s),e,i)})};q=function(){const t=this.shadowRoot?.querySelector(".viz-container"),e=getComputedStyle(t??this).backgroundColor;return e&&e!=="rgba(0, 0, 0, 0)"?e:"#ffffff"};B=function(t,e){const i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=e,document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};H=function(){const t=c(this,l,x).call(this,this.spacing),e=c(this,l,x).call(this,this.spacingTop)??t,i=c(this,l,x).call(this,this.spacingBottom)??t,n=c(this,l,x).call(this,this.spacingLeft),s=c(this,l,x).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),i?this.style.setProperty("--scb-viz-spacing-block-end",i):this.style.removeProperty("--scb-viz-spacing-block-end"),n?this.style.setProperty("--scb-viz-spacing-inline-start",n):this.style.removeProperty("--scb-viz-spacing-inline-start"),s?this.style.setProperty("--scb-viz-spacing-inline-end",s):this.style.removeProperty("--scb-viz-spacing-inline-end")};x=function(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e};V=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};
|
|
481
|
+
`)}`,o=new Blob([s],{type:"text/csv;charset=utf-8;"});c(this,l,B).call(this,o,this._buildExportFileName("csv"))};nt=async function(t,e){const i=await c(this,l,O).call(this,t);return i?c(this,l,lt).call(this,i,e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};at=async function(t,e){const i=await c(this,l,O).call(this,t);return i?i.toDataURL(e==="jpeg"?"image/jpeg":"image/png",e==="jpeg"?.92:void 0):null};O=async function(t){if(t instanceof HTMLCanvasElement){const a=t.width||Math.round(t.getBoundingClientRect().width),r=t.height||Math.round(t.getBoundingClientRect().height);if(!a||!r)return null;const h=document.createElement("canvas");h.width=a,h.height=r;const p=h.getContext("2d");return p?(p.fillStyle=c(this,l,q).call(this),p.fillRect(0,0,a,r),p.drawImage(t,0,0,a,r),h):null}if(t instanceof HTMLImageElement){const a=t.naturalWidth||t.width,r=t.naturalHeight||t.height;return!a||!r?null:c(this,l,R).call(this,t.currentSrc||t.src,a,r)}const{width:e,height:i,serialized:n}=c(this,l,rt).call(this,t);if(!e||!i||!n)return null;const s=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),o=URL.createObjectURL(s);try{return await c(this,l,R).call(this,o,e,i)}finally{URL.revokeObjectURL(o)}};rt=function(t){const e=t.cloneNode(!0),i=t.getBoundingClientRect(),n=t.viewBox?.baseVal,s=Math.round(n?.width||i.width||Number(t.getAttribute("width"))||0),o=Math.round(n?.height||i.height||Number(t.getAttribute("height"))||0);return e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!e.getAttribute("width")&&s&&e.setAttribute("width",String(s)),!e.getAttribute("height")&&o&&e.setAttribute("height",String(o)),!e.getAttribute("viewBox")&&s&&o&&e.setAttribute("viewBox",`0 0 ${s} ${o}`),c(this,l,T).call(this,t,e),e.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(a=>a.remove()),{width:s,height:o,serialized:new XMLSerializer().serializeToString(e)}};T=function(t,e){const i=getComputedStyle(t);let n="";for(let a=0;a<i.length;a+=1){const r=i[a],h=i.getPropertyValue(r);h&&(n+=`${r}:${h};`)}n&&e.setAttribute("style",n);const s=Array.from(t.children),o=Array.from(e.children);for(let a=0;a<s.length;a+=1){const r=s[a],h=o[a];r&&h&&c(this,l,T).call(this,r,h)}};R=async function(t,e,i){const n=Math.max(1,Math.min(2,window.devicePixelRatio||1)),s=Math.max(1,Math.round(e)),o=Math.max(1,Math.round(i)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(s*n)),a.height=Math.max(1,Math.round(o*n));const r=a.getContext("2d");if(!r)return null;const h=await c(this,l,ot).call(this,t);return h?(r.scale(n,n),r.fillStyle=c(this,l,q).call(this),r.fillRect(0,0,s,o),r.drawImage(h,0,0,s,o),a):null};ot=function(t){return new Promise(e=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>e(null),i.src=t})};lt=function(t,e,i){return new Promise(n=>{t.toBlob(s=>n(s),e,i)})};q=function(){const t=this.shadowRoot?.querySelector(".viz-container"),e=getComputedStyle(t??this).backgroundColor;return e&&e!=="rgba(0, 0, 0, 0)"?e:"#ffffff"};B=function(t,e){const i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=e,document.body.appendChild(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)};H=function(){const t=c(this,l,x).call(this,this.spacing),e=c(this,l,x).call(this,this.spacingTop)??t,i=c(this,l,x).call(this,this.spacingBottom)??t,n=c(this,l,x).call(this,this.spacingLeft),s=c(this,l,x).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),i?this.style.setProperty("--scb-viz-spacing-block-end",i):this.style.removeProperty("--scb-viz-spacing-block-end"),n?this.style.setProperty("--scb-viz-spacing-inline-start",n):this.style.removeProperty("--scb-viz-spacing-inline-start"),s?this.style.setProperty("--scb-viz-spacing-inline-end",s):this.style.removeProperty("--scb-viz-spacing-inline-end")};x=function(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e};V=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};g.styles=ht`
|
|
489
482
|
:host {
|
|
490
483
|
display: block;
|
|
491
484
|
box-sizing: border-box;
|
|
@@ -855,7 +848,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
855
848
|
.diagram-content {
|
|
856
849
|
width: 100%;
|
|
857
850
|
max-width: var(--scb-viz-content-max-width, 100%);
|
|
858
|
-
min-height: var(--scb-viz-diagram-min-height,
|
|
851
|
+
min-height: var(--scb-viz-diagram-min-height, 600px);
|
|
859
852
|
height: var(--scb-viz-diagram-height, auto);
|
|
860
853
|
overflow: var(--scb-viz-diagram-overflow, visible);
|
|
861
854
|
}
|
|
@@ -865,7 +858,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
865
858
|
width: 100%;
|
|
866
859
|
max-width: 100%;
|
|
867
860
|
min-width: 0;
|
|
868
|
-
min-height: var(--scb-viz-diagram-min-height,
|
|
861
|
+
min-height: var(--scb-viz-diagram-min-height, 600px);
|
|
869
862
|
height: var(--scb-viz-diagram-height, auto);
|
|
870
863
|
overflow: var(--scb-viz-diagram-overflow, visible);
|
|
871
864
|
}
|
|
@@ -877,7 +870,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
877
870
|
}
|
|
878
871
|
|
|
879
872
|
.standard-content-shell--stable {
|
|
880
|
-
min-height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height,
|
|
873
|
+
min-height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height, 600px));
|
|
881
874
|
}
|
|
882
875
|
|
|
883
876
|
.standard-content-panel {
|
|
@@ -904,7 +897,7 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
904
897
|
}
|
|
905
898
|
|
|
906
899
|
.standard-content-shell--stable .standard-content-panel--table.standard-content-panel--active {
|
|
907
|
-
height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height,
|
|
900
|
+
height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height, 600px));
|
|
908
901
|
min-height: 0;
|
|
909
902
|
overflow: hidden;
|
|
910
903
|
}
|
|
@@ -1116,4 +1109,4 @@ import{a as ht,n as m,r as P,i as dt,x as g,k as W,l as pt,t as gt}from"../../ve
|
|
|
1116
1109
|
width: calc(100% / var(--scb-viz-print-scale, 1));
|
|
1117
1110
|
}
|
|
1118
1111
|
}
|
|
1119
|
-
`;u([m({type:String,reflect:!0})],
|
|
1112
|
+
`;u([m({type:String,reflect:!0})],g.prototype,"variant",2);u([m({type:String,reflect:!0,attribute:"selected-chip"})],g.prototype,"selectedChip",2);u([m({type:String,reflect:!0})],g.prototype,"title",2);u([m({type:String,reflect:!0})],g.prototype,"subtitle",2);u([m({type:String,reflect:!0})],g.prototype,"description",2);u([m({type:String,reflect:!0})],g.prototype,"comment",2);u([m({type:String,reflect:!0})],g.prototype,"source",2);u([m({type:String,reflect:!0})],g.prototype,"footnote",2);u([m({type:String,reflect:!0,attribute:"lang"})],g.prototype,"lang",2);u([m({type:String,reflect:!0,attribute:"image-href"})],g.prototype,"imageHref",2);u([m({type:Boolean,reflect:!0,attribute:"official-statistics"})],g.prototype,"officialStatistics",2);u([m({type:Boolean,reflect:!0,attribute:"disable-toggle"})],g.prototype,"disableToggle",2);u([m({type:String,attribute:"content-max-width"})],g.prototype,"contentMaxWidth",2);u([m({type:String,attribute:"container-max-width"})],g.prototype,"containerMaxWidth",2);u([m({type:String,attribute:"content-height"})],g.prototype,"contentHeight",2);u([m({type:String,reflect:!0,attribute:"toggle-height-mode"})],g.prototype,"toggleHeightMode",2);u([m({attribute:!1})],g.prototype,"tableData",2);u([m({attribute:!1})],g.prototype,"valueFormat",2);u([m({attribute:!1})],g.prototype,"timeFormat",2);u([m({attribute:!1})],g.prototype,"yAxisSettings",2);u([P()],g.prototype,"_slottedTableData",2);u([P()],g.prototype,"_actionsMenuOpen",2);u([P()],g.prototype,"_seriesDifferentiationEnabled",2);u([m({type:String,reflect:!0})],g.prototype,"spacing",2);u([m({type:String,attribute:"spacing-top",reflect:!0})],g.prototype,"spacingTop",2);u([m({type:String,attribute:"spacing-bottom",reflect:!0})],g.prototype,"spacingBottom",2);u([m({type:String,attribute:"spacing-left",reflect:!0})],g.prototype,"spacingLeft",2);u([m({type:String,attribute:"spacing-right",reflect:!0})],g.prototype,"spacingRight",2);g=u([gt("scb-viz")],g);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.311",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -390,5 +390,5 @@
|
|
|
390
390
|
},
|
|
391
391
|
"./mvc/*": "./mvc/*"
|
|
392
392
|
},
|
|
393
|
-
"buildHash": "
|
|
393
|
+
"buildHash": "A03857A7A6B8919E9720A2198465960B04357C902C97EB53D961C7D874F76072"
|
|
394
394
|
}
|
|
@@ -24,6 +24,7 @@ export declare class ScbHorizontalScroller extends LitElement {
|
|
|
24
24
|
private _canScrollLeft;
|
|
25
25
|
private _canScrollRight;
|
|
26
26
|
static styles: import('lit').CSSResult;
|
|
27
|
+
private getScrollStep;
|
|
27
28
|
private doScrollBy;
|
|
28
29
|
private updateScrollButtons;
|
|
29
30
|
connectedCallback(): void;
|