scb-wc-test 0.1.345 → 0.1.347
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/all.js +8 -0
- package/index.d.ts +4 -0
- package/mvc/components/all.js +4 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +13 -8
- package/mvc/components/scb-list/scb-list-item.js +11 -10
- package/mvc/components/scb-notification-card/scb-notification-card.js +15 -9
- package/mvc/components/scb-viz/scb-viz-actions-runtime.js +2 -0
- package/mvc/components/scb-viz/scb-viz-print-runtime.js +98 -0
- package/mvc/components/scb-viz/scb-viz-series-differentiation-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz-table-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz.js +40 -138
- package/package.json +18 -2
- package/scb-accordion/scb-accordion-item.js +30 -25
- package/scb-list/scb-list-item.d.ts +1 -0
- package/scb-list/scb-list-item.js +11 -7
- package/scb-notification-card/scb-notification-card.js +14 -8
- package/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-viz/scb-viz-actions-runtime.js +166 -0
- package/scb-viz/scb-viz-print-runtime.d.ts +27 -0
- package/scb-viz/scb-viz-print-runtime.js +124 -0
- package/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-viz/scb-viz-series-differentiation-runtime.js +168 -0
- package/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-viz/scb-viz-table-runtime.js +93 -0
- package/scb-viz/scb-viz.d.ts +11 -12
- package/scb-viz/scb-viz.js +570 -849
- package/scb-wc-test.bundle.js +806 -794
- package/scb-wc-test.d.ts +8 -0
package/all.js
CHANGED
|
@@ -83,7 +83,11 @@ import './mvc/components/scb-textfield/scb-textfield.js';
|
|
|
83
83
|
import './mvc/components/scb-toc/scb-toc-item.js';
|
|
84
84
|
import './mvc/components/scb-toc/scb-toc.js';
|
|
85
85
|
import './mvc/components/scb-tooltip/scb-tooltip.js';
|
|
86
|
+
import './mvc/components/scb-viz/scb-viz-actions-runtime.js';
|
|
87
|
+
import './mvc/components/scb-viz/scb-viz-print-runtime.js';
|
|
86
88
|
import './mvc/components/scb-viz/scb-viz-series-differentiation-registry.js';
|
|
89
|
+
import './mvc/components/scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
90
|
+
import './mvc/components/scb-viz/scb-viz-table-runtime.js';
|
|
87
91
|
import './mvc/components/scb-viz/scb-viz.js';
|
|
88
92
|
import './mvc/scb-blazor-bridge.js';
|
|
89
93
|
import './mvc/vendor/preload-helper.js';
|
|
@@ -171,5 +175,9 @@ import './scb-textfield/scb-textfield.js';
|
|
|
171
175
|
import './scb-toc/scb-toc-item.js';
|
|
172
176
|
import './scb-toc/scb-toc.js';
|
|
173
177
|
import './scb-tooltip/scb-tooltip.js';
|
|
178
|
+
import './scb-viz/scb-viz-actions-runtime.js';
|
|
179
|
+
import './scb-viz/scb-viz-print-runtime.js';
|
|
174
180
|
import './scb-viz/scb-viz-series-differentiation-registry.js';
|
|
181
|
+
import './scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
182
|
+
import './scb-viz/scb-viz-table-runtime.js';
|
|
175
183
|
import './scb-viz/scb-viz.js';
|
package/index.d.ts
CHANGED
|
@@ -79,5 +79,9 @@ export * from './scb-textfield/scb-textfield';
|
|
|
79
79
|
export * from './scb-toc/scb-toc-item';
|
|
80
80
|
export * from './scb-toc/scb-toc';
|
|
81
81
|
export * from './scb-tooltip/scb-tooltip';
|
|
82
|
+
export * from './scb-viz/scb-viz-actions-runtime';
|
|
83
|
+
export * from './scb-viz/scb-viz-print-runtime';
|
|
82
84
|
export * from './scb-viz/scb-viz-series-differentiation-registry';
|
|
85
|
+
export * from './scb-viz/scb-viz-series-differentiation-runtime';
|
|
86
|
+
export * from './scb-viz/scb-viz-table-runtime';
|
|
83
87
|
export * from './scb-viz/scb-viz';
|
package/mvc/components/all.js
CHANGED
|
@@ -80,4 +80,8 @@ import './scb-toc/scb-toc.js';
|
|
|
80
80
|
import './scb-toc/scb-toc-item.js';
|
|
81
81
|
import './scb-tooltip/scb-tooltip.js';
|
|
82
82
|
import './scb-viz/scb-viz.js';
|
|
83
|
+
import './scb-viz/scb-viz-actions-runtime.js';
|
|
84
|
+
import './scb-viz/scb-viz-print-runtime.js';
|
|
83
85
|
import './scb-viz/scb-viz-series-differentiation-registry.js';
|
|
86
|
+
import './scb-viz/scb-viz-series-differentiation-runtime.js';
|
|
87
|
+
import './scb-viz/scb-viz-table-runtime.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as g,n,i as
|
|
1
|
+
import{a as g,n,i as v,E as p,x as l,t as b}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-chevron/scb-chevron.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(o,a,s){try{customElements.get(o)||e(o,a,s)}catch(d){var c=String(d||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(t,e,o,a)=>{for(var s=a>1?void 0:a?h(e,o):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(s=(a?d(e,o,s):d(s))||s);return a&&s&&m(e,o,s),s};let i=class extends v{constructor(){super(...arguments),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=i._uid(),this._ignoreNextNativeTitleAttrChange=!1,this._onSummaryClick=t=>{t.preventDefault();const e=!this.open;this.closest("scb-accordion")?.onItemToggled?.(this,e),this.setOpen(e)},this._onToggle=t=>{const e=t.currentTarget;e.open||(e.open=!0),this._applyInertByOpen()}}static _uid(){return globalThis.crypto?.randomUUID?.()??`${i._uidPrefix}-${++i._uidSeq}`}static get observedAttributes(){const t=super.observedAttributes||[];return t.includes("title")?t:[...t,"title"]}attributeChangedCallback(t,e,o){if(t==="title"&&this._ignoreNextNativeTitleAttrChange){this._ignoreNextNativeTitleAttrChange=!1;return}super.attributeChangedCallback(t,e,o),t==="title"&&o!==null&&(this._ignoreNextNativeTitleAttrChange=!0,this.removeAttribute("title"))}firstUpdated(){this._applyInertByOpen()}_applyInertByOpen(){const t=this.renderRoot.querySelector(".scb-accordion-bottom");t&&(this.open?(t.removeAttribute("inert"),t.setAttribute("aria-hidden","false")):(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true")))}_onKeyDown(t){const e=this.closest("scb-accordion"),a=Array.from(e?.querySelectorAll("scb-accordion-item")||[]).map(d=>d.renderRoot.querySelector("details")?.querySelector(".scb-accordion-top")||null).filter(d=>!!d),s=t.currentTarget,c=a.indexOf(s);switch(t.key){case"ArrowDown":t.preventDefault(),c<a.length-1&&a[c+1].focus();break;case"ArrowUp":t.preventDefault(),c>0&&a[c-1].focus();break;case"Home":t.preventDefault(),a.length&&a[0].focus();break;case"End":t.preventDefault(),a.length&&a[a.length-1].focus();break}}setOpen(t){this.open=!!t;const e=this.renderRoot.querySelector("details");e&&!e.open&&(e.open=!0),this._applyInertByOpen()}updated(t){if(t.has("open")){const e=this.renderRoot.querySelector("details");e&&!e.open&&(e.open=!0),this._applyInertByOpen(),this.dispatchEvent(new CustomEvent("open-changed",{detail:{open:this.open,title:this.title},bubbles:!0,composed:!0}))}}render(){const t=`bottom-${this._unique}`,e=`header-${this._unique}`,o=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?l`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?l`
|
|
2
2
|
<scb-avatar
|
|
3
3
|
label=${this.avatarLabel}
|
|
4
4
|
alt=${this.avatarAlt}
|
|
@@ -46,6 +46,7 @@ import{a as g,n,i as m,E as p,x as l,t as v}from"../../vendor/vendor.js";import"
|
|
|
46
46
|
--scb-accordion-motion-duration: 0.3s;
|
|
47
47
|
--scb-accordion-motion-easing: ease;
|
|
48
48
|
--scb-accordion-panel-padding-closed: var(--spacing-0, 0px);
|
|
49
|
+
--scb-accordion-interaction-bleed: max(var(--stroke-focus-ring, 3px), var(--spacing-2, 4px));
|
|
49
50
|
|
|
50
51
|
--scb-accordion-item-padding-inline: var(--spacing-5, 16px);
|
|
51
52
|
--scb-accordion-item-padding-block: var(--spacing-7, 24px);
|
|
@@ -142,17 +143,21 @@ import{a as g,n,i as m,E as p,x as l,t as v}from"../../vendor/vendor.js";import"
|
|
|
142
143
|
opacity var(--scb-accordion-motion-duration) var(--scb-accordion-motion-easing),
|
|
143
144
|
padding var(--scb-accordion-motion-duration) var(--scb-accordion-motion-easing);
|
|
144
145
|
padding-block: var(--scb-accordion-panel-padding-closed);
|
|
145
|
-
padding-inline: var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px));
|
|
146
|
+
padding-inline: calc(var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px)) - var(--scb-accordion-interaction-bleed));
|
|
146
147
|
}
|
|
147
148
|
:host([open]) .scb-accordion-bottom {
|
|
148
149
|
grid-template-rows: 1fr;
|
|
149
150
|
opacity: 1;
|
|
150
|
-
padding-top: var(--spacing-2, 4px);
|
|
151
|
-
padding-right: var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px));
|
|
152
|
-
padding-bottom: var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px));
|
|
153
|
-
padding-left: var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px));
|
|
151
|
+
padding-top: max(var(--spacing-0, 0px), calc(var(--spacing-2, 4px) - var(--scb-accordion-interaction-bleed)));
|
|
152
|
+
padding-right: calc(var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px)) - var(--scb-accordion-interaction-bleed));
|
|
153
|
+
padding-bottom: calc(var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px)) - var(--scb-accordion-interaction-bleed));
|
|
154
|
+
padding-left: calc(var(--scb-accordion-item-padding-inline, var(--spacing-5, 16px)) - var(--scb-accordion-interaction-bleed));
|
|
155
|
+
}
|
|
156
|
+
.bottom-inner {
|
|
157
|
+
min-height: 0;
|
|
158
|
+
overflow: visible;
|
|
159
|
+
padding: var(--scb-accordion-interaction-bleed);
|
|
154
160
|
}
|
|
155
|
-
.bottom-inner { overflow: hidden; }
|
|
156
161
|
|
|
157
162
|
.title {
|
|
158
163
|
font-family: var(--brand-font);
|
|
@@ -203,4 +208,4 @@ import{a as g,n,i as m,E as p,x as l,t as v}from"../../vendor/vendor.js";import"
|
|
|
203
208
|
@media (prefers-reduced-motion: reduce) {
|
|
204
209
|
md-ripple { display: none; }
|
|
205
210
|
}
|
|
206
|
-
`];r([n({type:Boolean,reflect:!0})],i.prototype,"open",2);r([n({type:String})],i.prototype,"title",2);r([n({type:String})],i.prototype,"content",2);r([n({type:String,attribute:"overline"})],i.prototype,"overline",2);r([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);r([n({type:Boolean})],i.prototype,"leading",2);r([n({type:String,attribute:"leading-variant",reflect:!0})],i.prototype,"leadingVariant",2);r([n({type:String,attribute:"leading-icon"})],i.prototype,"leadingIcon",2);r([n({type:String,attribute:"img-href-image",reflect:!0})],i.prototype,"imgHrefImage",2);r([n({type:String,attribute:"avatar-label"})],i.prototype,"avatarLabel",2);r([n({type:String,attribute:"avatar-alt"})],i.prototype,"avatarAlt",2);r([n({type:String,attribute:"avatar-variant"})],i.prototype,"avatarVariant",2);r([n({type:String,attribute:"avatar-src"})],i.prototype,"avatarSrc",2);r([n({type:Number,reflect:!0})],i.prototype,"density",2);i=r([
|
|
211
|
+
`];r([n({type:Boolean,reflect:!0})],i.prototype,"open",2);r([n({type:String})],i.prototype,"title",2);r([n({type:String})],i.prototype,"content",2);r([n({type:String,attribute:"overline"})],i.prototype,"overline",2);r([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);r([n({type:Boolean})],i.prototype,"leading",2);r([n({type:String,attribute:"leading-variant",reflect:!0})],i.prototype,"leadingVariant",2);r([n({type:String,attribute:"leading-icon"})],i.prototype,"leadingIcon",2);r([n({type:String,attribute:"img-href-image",reflect:!0})],i.prototype,"imgHrefImage",2);r([n({type:String,attribute:"avatar-label"})],i.prototype,"avatarLabel",2);r([n({type:String,attribute:"avatar-alt"})],i.prototype,"avatarAlt",2);r([n({type:String,attribute:"avatar-variant"})],i.prototype,"avatarVariant",2);r([n({type:String,attribute:"avatar-src"})],i.prototype,"avatarSrc",2);r([n({type:Number,reflect:!0})],i.prototype,"density",2);i=r([b("scb-accordion-item")],i);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../scb-checkbox/scb-checkbox-group.js","../scb-switch/scb-switch.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as
|
|
2
|
+
import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as I,i as L,a as E,E as l,x as n}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,d,c){try{customElements.get(e)||i(e,d,c)}catch(p){var o=String(p||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var T=Object.defineProperty,P=Object.getOwnPropertyDescriptor,V=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var c=d>1?void 0:d?P(i,e):i,o=t.length-1,p;o>=0;o--)(p=t[o])&&(c=(d?p(i,e,c):p(c))||c);return d&&c&&T(i,e,c),c},k=(t,i,e)=>i.has(t)||V("Cannot "+e),v=(t,i,e)=>(k(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?V("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(k(t,i,"write to private field"),i.set(t,e),e),$=(t,i,e)=>(k(t,i,"access private method"),e),f,y,b,u,w,x;let a=class extends L{constructor(){super(...arguments),g(this,u),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.density=0,this.noDivider=!1,g(this,f,!1),g(this,y,!1),g(this,b,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");t&&(t.checked=!t.checked),i&&(i.selected=!i.selected)},g(this,x,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return E`
|
|
3
3
|
:host {
|
|
4
4
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
5
5
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -106,7 +106,7 @@ import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a
|
|
|
106
106
|
width: 100%;
|
|
107
107
|
gap: 12px;
|
|
108
108
|
}
|
|
109
|
-
`}async firstUpdated(){await $(this,u,w).call(this),this.addEventListener("keydown",v(this,x))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&$(this,u,w).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:
|
|
109
|
+
`}async firstUpdated(){await $(this,u,w).call(this),this.addEventListener("keydown",v(this,x))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&$(this,u,w).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:l;case"avatar":return n`
|
|
110
110
|
<div class="leading">
|
|
111
111
|
<scb-avatar
|
|
112
112
|
label=${this.avatarLabel}
|
|
@@ -117,7 +117,7 @@ import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a
|
|
|
117
117
|
variant=${this.avatarVariant}
|
|
118
118
|
></scb-avatar>
|
|
119
119
|
</div>
|
|
120
|
-
`;case"image":return this.imgHrefImage?n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:
|
|
120
|
+
`;case"image":return this.imgHrefImage?n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:l;default:return l}})():l,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",c=this.label?`Växla ${this.label}`:"Växla";let o=l;if(this.trailing)if(this.trailingVariant==="icon"){const h=this.trailingIcon||(this.type==="link"?e:"");o=h?n`<div class="trailing"><md-icon>${h}</md-icon></div>`:l}else this.trailingVariant==="checkbox"?o=n`
|
|
121
121
|
<div class="trailing">
|
|
122
122
|
<scb-checkbox
|
|
123
123
|
aria-label=${d}
|
|
@@ -126,22 +126,23 @@ import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a
|
|
|
126
126
|
</div>`:this.trailingVariant==="switch"&&(o=n`
|
|
127
127
|
<div class="trailing">
|
|
128
128
|
<scb-switch
|
|
129
|
-
|
|
129
|
+
label=${this.trailingSwitchLabel||l}
|
|
130
|
+
aria-label=${c}
|
|
130
131
|
@click=${h=>h.stopPropagation()}
|
|
131
132
|
></scb-switch>
|
|
132
|
-
</div>`);else this.type==="link"&&(o=n`<div class="trailing"><md-icon>${e}</md-icon></div>`);const p=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":
|
|
133
|
+
</div>`);else this.type==="link"&&(o=n`<div class="trailing"><md-icon>${e}</md-icon></div>`);const p=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":l,S=n`
|
|
133
134
|
${t}
|
|
134
135
|
<div class="texts">
|
|
135
|
-
${this.overline?n`<div class="overline">${this.overline}</div>`:
|
|
136
|
+
${this.overline?n`<div class="overline">${this.overline}</div>`:l}
|
|
136
137
|
<div class="label">${this.label}</div>
|
|
137
|
-
${this.supportingText?n`<div class="supporting-text">${this.supportingText}</div>`:
|
|
138
|
+
${this.supportingText?n`<div class="supporting-text">${this.supportingText}</div>`:l}
|
|
138
139
|
</div>
|
|
139
140
|
${o}
|
|
140
141
|
`;return n`
|
|
141
142
|
<div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled?"true":"false"}>
|
|
142
|
-
${this.type==="link"&&i?n`<a class="link" href=${i} target=${this.target||
|
|
143
|
-
${this.type==="link"?n`<md-ripple></md-ripple>`:
|
|
143
|
+
${this.type==="link"&&i?n`<a class="link" href=${i} target=${this.target||l} rel=${p}>${S}</a>`:S}
|
|
144
|
+
${this.type==="link"?n`<md-ripple></md-ripple>`:l}
|
|
144
145
|
</div>
|
|
145
146
|
|
|
146
147
|
<md-focus-ring></md-focus-ring>
|
|
147
|
-
`}};f=new WeakMap;y=new WeakMap;
|
|
148
|
+
`}};f=new WeakMap;y=new WeakMap;b=new WeakMap;u=new WeakSet;w=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!v(this,f)&&(await m(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,f,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!v(this,y)&&(await m(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="switch"&&!v(this,b)&&(await m(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,b,!0))};x=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:String,attribute:"trailing-switch-label"})],a.prototype,"trailingSwitchLabel",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([I("scb-list-item")],a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as h,n,i as f,x as c,t as
|
|
1
|
+
import{a as h,n,i as f,x as c,t as g}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-icon-button/scb-icon-button.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 o=customElements.define.bind(customElements);customElements.define=function(s,a,r){try{customElements.get(s)||o(s,a,r)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,e=(t,o,s,a)=>{for(var r=a>1?void 0:a?m(o,s):o,l=t.length-1,p;l>=0;l--)(p=t[l])&&(r=(a?p(o,s,r):p(r))||r);return a&&r&&d(o,s,r),r};let i=class extends f{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.size="large",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const t=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);const o=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(o)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(t){const o=(t??"").trim();return o?/^\d+$/.test(o)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(o,10)))})`:o:""}__applySpacing(){const t=this.__resolveSpacingToken(this.spacingTop||this.spacing),o=this.__resolveSpacingToken(this.spacingBottom||this.spacing),s=this.__resolveSpacingToken(this.spacingLeft||this.spacing),a=this.__resolveSpacingToken(this.spacingRight||this.spacing);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),o?this.style.marginBlockEnd=o:this.style.removeProperty("margin-block-end"),s?this.style.marginInlineStart=s:this.style.removeProperty("margin-inline-start"),a?this.style.marginInlineEnd=a:this.style.removeProperty("margin-inline-end")}updated(t){super.updated(t),t.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){const t=this.direction==="vertical"?"vertical":"horizontal",o=!!(this.title||this.subtitle),s=!!(this.supportingText&&!this.title&&!this.subtitle&&!this.linkText),a=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",r=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
|
|
2
2
|
<div class="notification" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true">
|
|
3
3
|
<div class="notification-main ${t}">
|
|
4
4
|
${this.showIcon?c`
|
|
@@ -6,15 +6,17 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
|
|
|
6
6
|
<md-icon aria-hidden="true">${this._iconForVariant()}</md-icon>
|
|
7
7
|
</div>
|
|
8
8
|
`:null}
|
|
9
|
-
<div class="notification-text-container">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<div class="notification-text-container ${s?"no-gap":""}">
|
|
10
|
+
${o?c`
|
|
11
|
+
<div class="notification-title-container">
|
|
12
|
+
${this.title?c`<div class="notification-title">${this.title}</div>`:null}
|
|
13
|
+
${this.subtitle?c`<div class="notification-subtitle">${this.subtitle}</div>`:null}
|
|
14
|
+
</div>
|
|
15
|
+
`:null}
|
|
14
16
|
${this.supportingText?c`<div class="notification-text">${this.supportingText}</div>`:null}
|
|
15
17
|
${this.linkText?c`
|
|
16
18
|
<div class="notification-footer">
|
|
17
|
-
<a class="footer-link" href="${
|
|
19
|
+
<a class="footer-link" href="${r}">${this.linkText}</a>
|
|
18
20
|
</div>
|
|
19
21
|
`:null}
|
|
20
22
|
</div>
|
|
@@ -24,7 +26,7 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
|
|
|
24
26
|
<scb-icon-button
|
|
25
27
|
aria-label="Stäng meddelande"
|
|
26
28
|
icon="close"
|
|
27
|
-
style=${
|
|
29
|
+
style=${a}
|
|
28
30
|
@click=${this._closeNotification}
|
|
29
31
|
>
|
|
30
32
|
</scb-icon-button>
|
|
@@ -262,6 +264,10 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
|
|
|
262
264
|
min-width: 0;
|
|
263
265
|
}
|
|
264
266
|
|
|
267
|
+
.notification-text-container.no-gap {
|
|
268
|
+
gap: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
265
271
|
.notification-title-container{
|
|
266
272
|
display: flex;
|
|
267
273
|
flex-direction: column;
|
|
@@ -349,4 +355,4 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
|
|
|
349
355
|
box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
|
|
350
356
|
}
|
|
351
357
|
}
|
|
352
|
-
`];e([n({type:String})],i.prototype,"variant",2);e([n({type:String,reflect:!0})],i.prototype,"direction",2);e([n({type:String,reflect:!0})],i.prototype,"size",2);e([n({type:String})],i.prototype,"title",2);e([n({type:String})],i.prototype,"subtitle",2);e([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);e([n({type:Boolean,reflect:!0})],i.prototype,"open",2);e([n({type:String,attribute:"link-text"})],i.prototype,"linkText",2);e([n({type:String,attribute:"link-href"})],i.prototype,"linkHref",2);e([n({type:String})],i.prototype,"href",2);e([n({type:Boolean,attribute:"show-icon"})],i.prototype,"showIcon",2);e([n({type:Boolean,attribute:"show-close-button"})],i.prototype,"showCloseButton",2);e([n({type:String,reflect:!0})],i.prototype,"sizing",2);e([n({type:String,reflect:!0})],i.prototype,"width",2);e([n({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);e([n({type:String,reflect:!0})],i.prototype,"height",2);e([n({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-height"})],i.prototype,"fullHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-width"})],i.prototype,"fullWidth",2);e([n({type:String})],i.prototype,"spacing",2);e([n({type:String,attribute:"spacing-top"})],i.prototype,"spacingTop",2);e([n({type:String,attribute:"spacing-bottom"})],i.prototype,"spacingBottom",2);e([n({type:String,attribute:"spacing-left"})],i.prototype,"spacingLeft",2);e([n({type:String,attribute:"spacing-right"})],i.prototype,"spacingRight",2);i=e([
|
|
358
|
+
`];e([n({type:String})],i.prototype,"variant",2);e([n({type:String,reflect:!0})],i.prototype,"direction",2);e([n({type:String,reflect:!0})],i.prototype,"size",2);e([n({type:String})],i.prototype,"title",2);e([n({type:String})],i.prototype,"subtitle",2);e([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);e([n({type:Boolean,reflect:!0})],i.prototype,"open",2);e([n({type:String,attribute:"link-text"})],i.prototype,"linkText",2);e([n({type:String,attribute:"link-href"})],i.prototype,"linkHref",2);e([n({type:String})],i.prototype,"href",2);e([n({type:Boolean,attribute:"show-icon"})],i.prototype,"showIcon",2);e([n({type:Boolean,attribute:"show-close-button"})],i.prototype,"showCloseButton",2);e([n({type:String,reflect:!0})],i.prototype,"sizing",2);e([n({type:String,reflect:!0})],i.prototype,"width",2);e([n({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);e([n({type:String,reflect:!0})],i.prototype,"height",2);e([n({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-height"})],i.prototype,"fullHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-width"})],i.prototype,"fullWidth",2);e([n({type:String})],i.prototype,"spacing",2);e([n({type:String,attribute:"spacing-top"})],i.prototype,"spacingTop",2);e([n({type:String,attribute:"spacing-bottom"})],i.prototype,"spacingBottom",2);e([n({type:String,attribute:"spacing-left"})],i.prototype,"spacingLeft",2);e([n({type:String,attribute:"spacing-right"})],i.prototype,"spacingRight",2);i=e([g("scb-notification-card")],i);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var n=customElements.define.bind(customElements);customElements.define=function(t,i,r){try{customElements.get(t)||n(t,i,r)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();const b=e=>{const n=getComputedStyle(e).backgroundColor;return n&&n!=="rgba(0, 0, 0, 0)"?n:"#ffffff"};function w({lang:e,title:n}){const t=e==="en"?"visualization":"visualisering";return(n||t).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function E(e,n){const t=n==="csv"?e.lang==="en"?"-table":"-tabell":"";return`${w(e)}${t}.${n}`}function m(e=document){return e}function p(e=document){const n=m(e);return n.fullscreenElement||n.webkitFullscreenElement||null}function y(e){return!!(e.requestFullscreen||e.webkitRequestFullscreen)}async function S(e,n=document){if(!y(e))return;const t=m(n),i=p(n);if(i===e){t.exitFullscreen?await t.exitFullscreen():t.webkitExitFullscreen&&await t.webkitExitFullscreen();return}i&&(t.exitFullscreen?await t.exitFullscreen():t.webkitExitFullscreen&&await t.webkitExitFullscreen()),e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen&&await e.webkitRequestFullscreen()}async function C(e,n=document){const t=n.createElement("iframe");t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.right="0",t.style.bottom="0",t.style.width="0",t.style.height="0",t.style.border="0",t.style.visibility="hidden",n.body.appendChild(t);const i=()=>{t.remove()},r=t.contentDocument,o=t.contentWindow;if(!r||!o){i();return}r.open(),r.write(e),r.close();const a=Array.from(r.images||[]);await Promise.all(a.map(l=>l.complete?Promise.resolve():new Promise(s=>{l.addEventListener("load",()=>s(null),{once:!0}),l.addEventListener("error",()=>s(null),{once:!0})})));const c=()=>{o.removeEventListener("afterprint",c),i()};o.addEventListener("afterprint",c,{once:!0}),setTimeout(()=>{o.focus(),o.print(),setTimeout(i,1e3)},50)}async function z(e,n){e.setAttribute("data-scb-viz-force-light",""),await new Promise(t=>requestAnimationFrame(()=>t(null)));try{return await n()}finally{e.removeAttribute("data-scb-viz-force-light")}}function R(e,n){const t=n==="en"?",":";",i=o=>`"${String(o??"").replace(/\r?\n/g," ").replace(/"/g,'""')}"`,r=`\uFEFF${e.map(o=>o.map(i).join(t)).join(`\r
|
|
2
|
+
`)}`;return new Blob([r],{type:"text/csv;charset=utf-8;"})}async function k(e,n,t){const i=await f(e,n);return i?F(i,t==="jpeg"?"image/jpeg":"image/png",t==="jpeg"?.92:void 0):null}async function A(e,n,t){const i=await f(e,n);return i?i.toDataURL("image/png",void 0):null}function L(e,n,t=document){const i=URL.createObjectURL(e),r=t.createElement("a");r.href=i,r.download=n,t.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(i),0)}async function f(e,n){const t=b(n);if(e instanceof HTMLCanvasElement){const l=e.width||Math.round(e.getBoundingClientRect().width),s=e.height||Math.round(e.getBoundingClientRect().height);if(!l||!s)return null;const u=document.createElement("canvas");u.width=l,u.height=s;const d=u.getContext("2d");return d?(d.fillStyle=t,d.fillRect(0,0,l,s),d.drawImage(e,0,0,l,s),u):null}if(e instanceof HTMLImageElement){const l=e.naturalWidth||e.width,s=e.naturalHeight||e.height;return!l||!s?null:h(e.currentSrc||e.src,l,s,t)}const{width:i,height:r,serialized:o}=v(e);if(!i||!r||!o)return null;const a=new Blob([o],{type:"image/svg+xml;charset=utf-8"}),c=URL.createObjectURL(a);try{return await h(c,i,r,t)}finally{URL.revokeObjectURL(c)}}function v(e){const n=e.cloneNode(!0),t=e.getBoundingClientRect(),i=e.viewBox?.baseVal,r=Math.round(i?.width||t.width||Number(e.getAttribute("width"))||0),o=Math.round(i?.height||t.height||Number(e.getAttribute("height"))||0);return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),!n.getAttribute("width")&&r&&n.setAttribute("width",String(r)),!n.getAttribute("height")&&o&&n.setAttribute("height",String(o)),!n.getAttribute("viewBox")&&r&&o&&n.setAttribute("viewBox",`0 0 ${r} ${o}`),g(e,n),n.querySelectorAll(".highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point").forEach(a=>a.remove()),{width:r,height:o,serialized:new XMLSerializer().serializeToString(n)}}function g(e,n){const t=getComputedStyle(e);let i="";for(let a=0;a<t.length;a+=1){const c=t[a],l=t.getPropertyValue(c);l&&(i+=`${c}:${l};`)}i&&n.setAttribute("style",i);const r=Array.from(e.children),o=Array.from(n.children);for(let a=0;a<r.length;a+=1){const c=r[a],l=o[a];c&&l&&g(c,l)}}async function h(e,n,t,i){const r=Math.max(1,Math.min(2,window.devicePixelRatio||1)),o=Math.max(1,Math.round(n)),a=Math.max(1,Math.round(t)),c=document.createElement("canvas");c.width=Math.max(1,Math.round(o*r)),c.height=Math.max(1,Math.round(a*r));const l=c.getContext("2d");if(!l)return null;const s=await x(e);return s?(l.scale(r,r),l.fillStyle=i,l.fillRect(0,0,o,a),l.drawImage(s,0,0,o,a),c):null}function x(e){return new Promise(n=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>n(t),t.onerror=()=>n(null),t.src=e})}function F(e,n,t){return new Promise(i=>{e.toBlob(r=>i(r),n,t)})}export{R as a,E as b,k as c,L as d,A as e,p as g,y as i,C as o,z as r,S as t};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
(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,s,a){try{customElements.get(i)||e(i,s,a)}catch(n){var r=String(n||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();function m(t,e){const i=t.headers.length?`<thead><tr>${t.headers.map((a,r)=>`<th scope="col" class="${t.alignments[r]==="right"?"align-right":"align-left"}"><span class="scb-viz-print-table-heading-text">${a.html||e(a.text)}</span></th>`).join("")}</tr></thead>`:"",s=`<tbody>${t.rows.map((a,r)=>{const n=t.rowHeaderRows[r]===!0;return`<tr>${a.map((l,c)=>{const o=t.alignments[c]==="right"?"align-right":"align-left",d=l.html||e(l.text);return c===0&&n?`<th scope="row" class="${o}">${d}</th>`:`<td class="${o}">${d}</td>`}).join("")}</tr>`}).join("")}</tbody>`;return`<table class="scb-viz-print-table">${i}${s}</table>`}function b(t){const e=[];if(t.description&&e.push(`
|
|
2
|
+
<section class="print-section">
|
|
3
|
+
<h2>${t.escapeHtml(t.descriptionLabel)}</h2>
|
|
4
|
+
<div class="body-text-rich">${t.renderRichTextHtml(t.description)}</div>
|
|
5
|
+
</section>
|
|
6
|
+
`),t.comment||t.source||t.footnote||t.officialStatistics){const i=[];t.comment&&i.push(`
|
|
7
|
+
<section class="print-section print-meta-section">
|
|
8
|
+
<h3>${t.escapeHtml(t.commentLabel)}</h3>
|
|
9
|
+
<div class="body-text-rich">${t.renderRichTextHtml(t.comment)}</div>
|
|
10
|
+
</section>
|
|
11
|
+
`),t.source&&i.push(`
|
|
12
|
+
<section class="print-section print-meta-section">
|
|
13
|
+
<h3>${t.escapeHtml(t.sourceLabel)}</h3>
|
|
14
|
+
<div>${t.escapeHtml(t.source)}</div>
|
|
15
|
+
</section>
|
|
16
|
+
`),t.footnote&&i.push(`
|
|
17
|
+
<section class="print-section print-meta-section">
|
|
18
|
+
<h3>${t.escapeHtml(t.footnoteLabel)}</h3>
|
|
19
|
+
<div class="body-text-rich">${t.renderRichTextHtml(t.footnote)}</div>
|
|
20
|
+
</section>
|
|
21
|
+
`),t.officialStatistics&&t.sosLogotypeSvg&&i.push(`
|
|
22
|
+
<div class="print-sos">${t.sosLogotypeSvg}</div>
|
|
23
|
+
`),e.push(`
|
|
24
|
+
<section class="print-section print-more-about-stats">
|
|
25
|
+
<h2>${t.escapeHtml(t.moreAboutStatsLabel)}</h2>
|
|
26
|
+
${i.join("")}
|
|
27
|
+
</section>
|
|
28
|
+
`)}return e.join("")}function g(t){const e=t.escapeHtml;return`<!doctype html>
|
|
29
|
+
<html lang="${e(t.lang||"sv")}">
|
|
30
|
+
<head>
|
|
31
|
+
<meta charset="utf-8">
|
|
32
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
33
|
+
<title>${e(t.title||(t.lang==="en"?"Visualization":"Visualisering"))}</title>
|
|
34
|
+
<style>
|
|
35
|
+
:root { color-scheme: light; }
|
|
36
|
+
@page { margin: 16mm; }
|
|
37
|
+
* { box-sizing: border-box; }
|
|
38
|
+
html, body { margin: 0; padding: 0; background: #fff; }
|
|
39
|
+
body {
|
|
40
|
+
font-family: var(--brand-font, Inter, 'Segoe UI', Arial, sans-serif);
|
|
41
|
+
color: var(--md-sys-color-on-surface, #1f1f1f);
|
|
42
|
+
-webkit-print-color-adjust: exact;
|
|
43
|
+
print-color-adjust: exact;
|
|
44
|
+
}
|
|
45
|
+
.viz-print { width: 100%; }
|
|
46
|
+
.viz-header { max-width: 600px; margin-bottom: 24px; }
|
|
47
|
+
.viz-title { font-size: 1.75rem; font-weight: 600; line-height: 1.25; margin: 0; }
|
|
48
|
+
.viz-subtitle { font-size: 1rem; font-weight: 400; line-height: 1.5; margin: 0; }
|
|
49
|
+
.viz-content { width: 100%; }
|
|
50
|
+
.viz-chart-image, .viz-image { display: block; max-width: 100%; height: auto; }
|
|
51
|
+
.print-section { max-width: 600px; margin-top: 16px; }
|
|
52
|
+
.print-section h2, .print-section h3 { margin: 0 0 8px 0; font-size: 1rem; font-weight: 600; line-height: 1.5; }
|
|
53
|
+
.print-section h3 { margin-bottom: 4px; }
|
|
54
|
+
.print-more-about-stats { margin-top: 16px; }
|
|
55
|
+
.print-meta-section { margin-top: 0; margin-bottom: 16px; }
|
|
56
|
+
.print-sos { display: inline-flex; margin-top: 8px; color: inherit; }
|
|
57
|
+
.print-sos svg { height: 24px; width: auto; display: block; }
|
|
58
|
+
.scb-viz-print-table { border-collapse: collapse; width: max-content; max-width: 100%; font-size: 1rem; line-height: 1.5; }
|
|
59
|
+
.scb-viz-print-table th, .scb-viz-print-table td { border: 1px solid #c5c7d0; padding: 8px 12px; text-align: start; }
|
|
60
|
+
.scb-viz-print-table thead th {
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
vertical-align: top;
|
|
63
|
+
}
|
|
64
|
+
.scb-viz-print-table-heading-text {
|
|
65
|
+
display: block;
|
|
66
|
+
max-inline-size: var(--scb-viz-table-header-max-width, 12rem);
|
|
67
|
+
min-inline-size: 0;
|
|
68
|
+
white-space: normal;
|
|
69
|
+
word-break: normal;
|
|
70
|
+
overflow-wrap: break-word;
|
|
71
|
+
hyphens: auto;
|
|
72
|
+
text-wrap: pretty;
|
|
73
|
+
}
|
|
74
|
+
.scb-viz-print-table tbody th {
|
|
75
|
+
font-weight: 400;
|
|
76
|
+
white-space: normal;
|
|
77
|
+
overflow-wrap: break-word;
|
|
78
|
+
word-break: normal;
|
|
79
|
+
hyphens: auto;
|
|
80
|
+
}
|
|
81
|
+
.scb-viz-print-table tbody tr:nth-child(odd) { background: #f5f5f5; }
|
|
82
|
+
.scb-viz-print-table tbody tr:nth-child(even) { background: #fff; }
|
|
83
|
+
.scb-viz-print-table .align-right { text-align: right; }
|
|
84
|
+
.scb-viz-print-table tbody td.align-right { white-space: nowrap; }
|
|
85
|
+
.scb-viz-print-table .align-left { text-align: left; }
|
|
86
|
+
</style>
|
|
87
|
+
</head>
|
|
88
|
+
<body>
|
|
89
|
+
<article class="viz-print">
|
|
90
|
+
<header class="viz-header">
|
|
91
|
+
${t.title?`<h1 class="viz-title">${e(t.title)}</h1>`:""}
|
|
92
|
+
${t.subtitle?`<div class="viz-subtitle">${e(t.subtitle)}</div>`:""}
|
|
93
|
+
</header>
|
|
94
|
+
<div class="viz-content">${t.contentHtml}</div>
|
|
95
|
+
${t.footerHtml||""}
|
|
96
|
+
</article>
|
|
97
|
+
</body>
|
|
98
|
+
</html>`}export{g as a,m as b,b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as f,a as l}from"./scb-viz-series-differentiation-registry.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,i,n){try{customElements.get(r)||t(r,i,n)}catch(c){var s=String(c||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();function b(e){return f(e)}function z(e,t){let r="";const i=t&&t.options&&typeof t.options=="object"?t.options:{},n=t&&t.userOptions&&typeof t.userOptions=="object"?t.userOptions:{},s=e&&e.options&&typeof e.options=="object"?e.options:{},c=s.custom&&typeof s.custom=="object"?s.custom:{},o=e&&e.custom&&typeof e.custom=="object"?e.custom:{};return i.chart&&typeof i.chart.id=="string"?r=i.chart.id:n.chart&&typeof n.chart.id=="string"&&(r=n.chart.id),r=String(r||"").trim().toLowerCase(),r==="grouped-column"||r==="grouped-bar"||i.custom&&i.custom.scbVizGroupedClustered===!0||c.scbVizGroupedCategory===!0||c.scbVizGroupedCategoryLegend===!0||o.scbVizGroupedCategory===!0||o.scbVizGroupedCategoryLegend===!0||e&&e._scbVizGroupedCategoryLegendItem===!0?!0:p(e)}function p(e){return Array.isArray(e?.points)&&e.points.some(t=>{const r=t&&t.custom&&typeof t.custom=="object"?t.custom:{};return typeof r.scbVizGroup=="string"&&r.scbVizGroup.trim()})}function d(e){const r=[e?.colorIndex,e?.options?.colorIndex,e?.userOptions?.colorIndex,e?.series?.colorIndex,e?.series?.options?.colorIndex].find(i=>Number.isInteger(i));return Number.isInteger(r)?Number(r):null}function m(e){return!e||typeof e!="object"?{indexByKey:{},nextIndex:0}:((!e.scbVizGroupedSeriesDifferentiationStore||typeof e.scbVizGroupedSeriesDifferentiationStore!="object")&&(e.scbVizGroupedSeriesDifferentiationStore={indexByKey:{},nextIndex:0}),e.scbVizGroupedSeriesDifferentiationStore)}function g(e,t){const r=d(e);if(Number.isInteger(r))return`color:${r}`;const i=e?.custom&&typeof e.custom=="object"&&typeof e.custom.scbVizGroup=="string"?e.custom.scbVizGroup.trim():"";if(i)return`group:${i}`;const n=typeof e?.name=="string"?e.name.trim():"";if(n)return`name:${n}`;const s=typeof e?.series?.name=="string"?e.series.name.trim():"";return s?`series:${s}`:`fallback:${t}`}function S(e,t,r){const i=d(e);if(typeof i=="number"&&Number.isInteger(i))return i;const n=m(t),s=g(e,r);return Object.prototype.hasOwnProperty.call(n.indexByKey,s)||(n.indexByKey[s]=n.nextIndex,n.nextIndex+=1),n.indexByKey[s]}function V(e,t,r){const i=S(e,t,r);return{variantIndex:i,...b(i)}}function v(e){return e.getCurrentPrintableView()!=="diagram"||!e.chart?.series?.length||!e.isHighchartsStyledMode(e.chart)?!1:e.chart.series.some(t=>e.getSeriesDifferentiationGroup(t,e.chart)!==null)}function a(e){const t=e?.element??e;return t instanceof SVGElement?t:null}function A(e){return!!(e?.styledMode||e?.renderer?.styledMode||e?.options?.chart?.styledMode)}function h(e){if(e?.container instanceof SVGSVGElement)return e.container;const t=e?.renderTo?.querySelector("svg")??e?.container?.querySelector?.("svg");return t instanceof SVGSVGElement?t:null}function x(e,t){const r=a(e);return Array.from(r?.classList??[]).find(n=>/^highcharts-color-\d+$/.test(n))??`highcharts-color-${t}`}function G(e,t){const r=a(e);r&&(r.setAttribute("data-scb-viz-role",t.role),t.dashStyle?r.setAttribute("data-scb-viz-dash-style",t.dashStyle):r.removeAttribute("data-scb-viz-dash-style"),t.patternKind?r.setAttribute("data-scb-viz-pattern-kind",t.patternKind):r.removeAttribute("data-scb-viz-pattern-kind"))}function C(e){const t=a(e);t&&(t.removeAttribute("data-scb-viz-role"),t.removeAttribute("data-scb-viz-dash-style"),t.removeAttribute("data-scb-viz-pattern-kind"))}function I(e,t){const r=a(e);if(!r||!t)return;const i=Array.from(r.classList).find(n=>/^highcharts-color-\d+$/.test(n));i!==t&&(i&&(r.classList.remove(i),r.setAttribute("data-scb-viz-prev-color-class",i)),r.classList.add(t),r.setAttribute("data-scb-viz-added-color-class",t))}function D(e){const t=a(e);if(!t)return;const r=t.getAttribute("data-scb-viz-added-color-class"),i=t.getAttribute("data-scb-viz-prev-color-class");r&&(t.classList.remove(r),t.removeAttribute("data-scb-viz-added-color-class")),i&&(t.classList.add(i),t.removeAttribute("data-scb-viz-prev-color-class"))}function _(e){const t=[],r=[],i=a(e?.legendItem?.group),n=(s,c)=>{const o=a(c);!o||s.includes(o)||s.push(o)};if(n(t,e?.legendLine),n(t,e?.legendItem?.line),n(r,e?.legendSymbol),n(r,e?.legendItem?.symbol),n(r,e?.legendArea),n(r,e?.legendItem?.area),i){const s=i.querySelector(".highcharts-graph, .highcharts-legend-graph, line");s&&n(t,s),i.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach(c=>{n(r,c)})}return{graphTargets:t,fillTargets:r.filter(s=>!t.includes(s))}}function E(e,t,r){const i=h(e);if(!i)return;const n="http://www.w3.org/2000/svg";let s=i.querySelector("defs");s instanceof SVGDefsElement||(s=document.createElementNS(n,"defs"),i.insertBefore(s,i.firstChild));const c=`scb-viz-pattern-${t}-${r}`;if(s.querySelector(`#${c}`))return;const o=document.createElementNS(n,"pattern");o.setAttribute("id",c),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","10"),o.setAttribute("height","10"),o.classList.add(t);const u=document.createElementNS(n,"rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width","10"),u.setAttribute("height","10"),u.setAttribute("class","scb-viz-highcharts-pattern__background"),o.appendChild(u),l(o,n,r),s.appendChild(o)}export{V as a,A as b,h as c,x as d,G as e,C as f,b as g,I as h,z as i,D as j,_ as k,E as l,v as s,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(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(n,o,r){try{customElements.get(n)||l(n,o,r)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();function g(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)}}function b(t){if(!t)return;const l=t.assignedElements({flatten:!0}),n=[];l.forEach(e=>{if(e.tagName==="TABLE"){n.push(e);return}e.querySelectorAll("table").forEach(h=>n.push(h))});const o=n[0];if(!o)return;const r=[],s=[],i=[],c=e=>e?(e.textContent??"").replace(/\s+/g," ").trim():"",a=e=>e?{html:(e.innerHTML??"").trim(),text:c(e)}:{html:"",text:""},u=o.querySelector("thead tr");u&&Array.from(u.querySelectorAll("th, td")).forEach(e=>{r.push(a(e))});const d=Array.from(o.querySelectorAll("tbody tr")),m=d.length>0?d:Array.from(o.querySelectorAll("tr")).filter(e=>e.closest("thead")===null);if(m.forEach(e=>{const h=Array.from(e.querySelectorAll("th, td"));if(h.length===0)return;i.push(h[0].tagName==="TH"&&e.closest("thead")===null&&e.closest("tfoot")===null);const f=[];h.forEach(w=>f.push(a(w))),s.push(f)}),!u&&s.length>0){const e=s[0],h=m[0],f=Array.from(h?.querySelectorAll("th, td")??[]);f.length>0&&f.every(p=>p.tagName==="TH")&&h?.closest("tbody")===null&&(r.splice(0,r.length,...e),s.shift(),i.shift())}return{headers:r.length>0?r:void 0,rows:s,rowHeaderRows:i.length>0?i:void 0}}function y(t,l){const n=Math.max(t.headers?.length??0,...t.rows.map(r=>r.length)),o=[];for(let r=0;r<n;r+=1){if(r===0){o.push("left");continue}const s=t.rows.map(c=>g(c[r]).text).filter(c=>c!==""&&c!==null&&c!==void 0),i=s.length>0&&s.every(c=>l(c)!==null);o.push(i?"right":"left")}return o}function x(t,l){const n=l.normalizeCell??g,o=l.formatCell??(a=>n(a)),r=l.inferAlignments(t),s=Math.max(t.headers?.length??0,...t.rows.map(a=>a.length)),i=(t.headers??[]).map(a=>n(a)),c=t.rows.map(a=>{const u=a.map((d,m)=>o(d,m,r));for(;u.length<s;)u.push({html:"",text:""});return u});return{alignments:r,colCount:s,headers:i,rows:c,rowHeaderRows:t.rowHeaderRows??[]}}function S(t,l=g){const n=[];return t.headers?.length&&n.push(t.headers.map(o=>l(o).text)),t.rows.forEach(o=>{n.push(o.map(r=>l(r).text))}),n}export{x as b,S as c,y as i,g as n,b as r};
|