scb-wc-test 0.1.314 → 0.1.315

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.
@@ -1,4 +1,4 @@
1
- import{a as m,n as c,i as v,x as r,t as y}from"../../vendor/vendor.js";import"../scb-link/scb-link.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(n,a,s){try{customElements.get(n)||t(n,a,s)}catch(d){var p=String(d||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var x=Object.defineProperty,w=Object.getOwnPropertyDescriptor,l=(i,t,n,a)=>{for(var s=a>1?void 0:a?w(t,n):t,p=i.length-1,d;p>=0;p--)(d=i[p])&&(s=(a?d(t,n,s):d(s))||s);return a&&s&&x(t,n,s),s};let o=class extends v{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(i){const t={page:i};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(i){if(!this.pagingHref)return;const t=(this.baseUri||"").trim().replace(/^\?/,"").replace(/&+$/,""),n=window.location.search.replace(/^\?/,"").replace(/&+$/,""),a=t||n;return a?`${a}&${this.pagingHref}${i}`:`${this.pagingHref}${i}`}_handlePageSelection(i,t){!this.pagingHref&&t&&t.preventDefault(),this.page=i,this._emitPageChange(i)}_prevPage(i){if(this.page<=1){!this.pagingHref&&i&&i.preventDefault();return}this._handlePageSelection(this.page-1,i)}_nextPage(i){if(this.page>=this.totalPages){!this.pagingHref&&i&&i.preventDefault();return}this._handlePageSelection(this.page+1,i)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(i){if(i==null)return;const t=String(i).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const i=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??i,n=this.mapSpacingToken(this.spacingBottom)??i,a=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),n?this.style.setProperty("--scb-pagination-spacing-block-end",n):this.style.removeProperty("--scb-pagination-spacing-block-end"),a?this.style.setProperty("--scb-pagination-spacing-inline-start",a):this.style.removeProperty("--scb-pagination-spacing-inline-start"),s?this.style.setProperty("--scb-pagination-spacing-inline-end",s):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(i){super.updated(i),(i.has("spacing")||i.has("spacingTop")||i.has("spacingBottom")||i.has("spacingLeft")||i.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const i=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:n,totalPages:a}=this,s=window.innerWidth<=768,p=s?1:2,d=this._getPagingHref(Math.max(1,this.page-1)),h=this._getPagingHref(Math.min(this.totalPages,this.page+1)),b=this.pagingHref?this.variant==="icon"?r`<a
1
+ import{a as m,n as c,i as v,x as r,t as y}from"../../vendor/vendor.js";import"../scb-link/scb-link.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(n,a,s){try{customElements.get(n)||t(n,a,s)}catch(d){var p=String(d||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var x=Object.defineProperty,w=Object.getOwnPropertyDescriptor,l=(i,t,n,a)=>{for(var s=a>1?void 0:a?w(t,n):t,p=i.length-1,d;p>=0;p--)(d=i[p])&&(s=(a?d(t,n,s):d(s))||s);return a&&s&&x(t,n,s),s};let o=class extends v{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(i){const t={page:i};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(i){if(!this.pagingHref)return;const t=(this.baseUri||"").trim().replace(/&+$/,""),n=window.location.search.replace(/&+$/,""),a=t||n;return a?`${a}&${this.pagingHref}${i}`:`${this.pagingHref}${i}`}_handlePageSelection(i,t){!this.pagingHref&&t&&t.preventDefault(),this.page=i,this._emitPageChange(i)}_prevPage(i){if(this.page<=1){!this.pagingHref&&i&&i.preventDefault();return}this._handlePageSelection(this.page-1,i)}_nextPage(i){if(this.page>=this.totalPages){!this.pagingHref&&i&&i.preventDefault();return}this._handlePageSelection(this.page+1,i)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(i){if(i==null)return;const t=String(i).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const i=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??i,n=this.mapSpacingToken(this.spacingBottom)??i,a=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),n?this.style.setProperty("--scb-pagination-spacing-block-end",n):this.style.removeProperty("--scb-pagination-spacing-block-end"),a?this.style.setProperty("--scb-pagination-spacing-inline-start",a):this.style.removeProperty("--scb-pagination-spacing-inline-start"),s?this.style.setProperty("--scb-pagination-spacing-inline-end",s):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(i){super.updated(i),(i.has("spacing")||i.has("spacingTop")||i.has("spacingBottom")||i.has("spacingLeft")||i.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const i=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:n,totalPages:a}=this,s=window.innerWidth<=768,p=s?1:2,d=this._getPagingHref(Math.max(1,this.page-1)),h=this._getPagingHref(Math.min(this.totalPages,this.page+1)),b=this.pagingHref?this.variant==="icon"?r`<a
2
2
  class="paging-action-link"
3
3
  href=${d}
4
4
  @click=${this._prevPage}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.314",
3
+ "version": "0.1.315",
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": "6553FBC913DB0C11C22CB36D2B2C7798DAE8B92536532143B116EE4AF8A96FC8"
393
+ "buildHash": "13501A15509DE750CB2B0883C3D5E422A8E4D8F3F5EDD1E9AFBC0FADA5FBAAAF"
394
394
  }
@@ -26,7 +26,7 @@ let r = class extends v {
26
26
  }
27
27
  _getPagingHref(i) {
28
28
  if (!this.pagingHref) return;
29
- const t = (this.baseUri || "").trim().replace(/^\?/, "").replace(/&+$/, ""), n = window.location.search.replace(/^\?/, "").replace(/&+$/, ""), a = t || n;
29
+ const t = (this.baseUri || "").trim().replace(/&+$/, ""), n = window.location.search.replace(/&+$/, ""), a = t || n;
30
30
  return a ? `${a}&${this.pagingHref}${i}` : `${this.pagingHref}${i}`;
31
31
  }
32
32
  _handlePageSelection(i, t) {
@@ -10460,7 +10460,7 @@
10460
10460
  box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
10461
10461
  }
10462
10462
  }
10463
- `],te([o({type:String})],Z.prototype,"variant",2),te([o({type:String,reflect:!0})],Z.prototype,"direction",2),te([o({type:String,reflect:!0})],Z.prototype,"size",2),te([o({type:String})],Z.prototype,"title",2),te([o({type:String})],Z.prototype,"subtitle",2),te([o({type:String,attribute:"supporting-text"})],Z.prototype,"supportingText",2),te([o({type:Boolean,reflect:!0})],Z.prototype,"open",2),te([o({type:String,attribute:"link-text"})],Z.prototype,"linkText",2),te([o({type:String,attribute:"link-href"})],Z.prototype,"linkHref",2),te([o({type:String})],Z.prototype,"href",2),te([o({type:Boolean,attribute:"show-icon"})],Z.prototype,"showIcon",2),te([o({type:Boolean,attribute:"show-close-button"})],Z.prototype,"showCloseButton",2),te([o({type:String,reflect:!0})],Z.prototype,"sizing",2),te([o({type:String,reflect:!0})],Z.prototype,"width",2),te([o({type:String,reflect:!0,attribute:"max-width"})],Z.prototype,"maxWidth",2),te([o({type:String,reflect:!0})],Z.prototype,"height",2),te([o({type:String,reflect:!0,attribute:"max-height"})],Z.prototype,"maxHeight",2),te([o({type:Boolean,reflect:!0,attribute:"full-height"})],Z.prototype,"fullHeight",2),te([o({type:Boolean,reflect:!0,attribute:"full-width"})],Z.prototype,"fullWidth",2),te([o({type:String})],Z.prototype,"spacing",2),te([o({type:String,attribute:"spacing-top"})],Z.prototype,"spacingTop",2),te([o({type:String,attribute:"spacing-bottom"})],Z.prototype,"spacingBottom",2),te([o({type:String,attribute:"spacing-left"})],Z.prototype,"spacingLeft",2),te([o({type:String,attribute:"spacing-right"})],Z.prototype,"spacingRight",2),Z=te([x("scb-notification-card")],Z);var Rg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,nt=(e,t,i,s)=>{for(var r=s>1?void 0:s?Og(t,i):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(r=(s?n(t,i,r):n(r))||r);return s&&r&&Rg(t,i,r),r};let qe=class extends k{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(e){const t={page:e};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(e){if(!this.pagingHref)return;const t=(this.baseUri||"").trim().replace(/^\?/,"").replace(/&+$/,""),i=window.location.search.replace(/^\?/,"").replace(/&+$/,""),s=t||i;return s?`${s}&${this.pagingHref}${e}`:`${this.pagingHref}${e}`}_handlePageSelection(e,t){!this.pagingHref&&t&&t.preventDefault(),this.page=e,this._emitPageChange(e)}_prevPage(e){if(this.page<=1){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page-1,e)}_nextPage(e){if(this.page>=this.totalPages){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page+1,e)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(e){if(e==null)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),s?this.style.setProperty("--scb-pagination-spacing-inline-start",s):this.style.removeProperty("--scb-pagination-spacing-inline-start"),r?this.style.setProperty("--scb-pagination-spacing-inline-end",r):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:s}=this,r=window.innerWidth<=768,a=r?1:2,n=this._getPagingHref(Math.max(1,this.page-1)),l=this._getPagingHref(Math.min(this.totalPages,this.page+1)),d=this.pagingHref?this.variant==="icon"?c`<a
10463
+ `],te([o({type:String})],Z.prototype,"variant",2),te([o({type:String,reflect:!0})],Z.prototype,"direction",2),te([o({type:String,reflect:!0})],Z.prototype,"size",2),te([o({type:String})],Z.prototype,"title",2),te([o({type:String})],Z.prototype,"subtitle",2),te([o({type:String,attribute:"supporting-text"})],Z.prototype,"supportingText",2),te([o({type:Boolean,reflect:!0})],Z.prototype,"open",2),te([o({type:String,attribute:"link-text"})],Z.prototype,"linkText",2),te([o({type:String,attribute:"link-href"})],Z.prototype,"linkHref",2),te([o({type:String})],Z.prototype,"href",2),te([o({type:Boolean,attribute:"show-icon"})],Z.prototype,"showIcon",2),te([o({type:Boolean,attribute:"show-close-button"})],Z.prototype,"showCloseButton",2),te([o({type:String,reflect:!0})],Z.prototype,"sizing",2),te([o({type:String,reflect:!0})],Z.prototype,"width",2),te([o({type:String,reflect:!0,attribute:"max-width"})],Z.prototype,"maxWidth",2),te([o({type:String,reflect:!0})],Z.prototype,"height",2),te([o({type:String,reflect:!0,attribute:"max-height"})],Z.prototype,"maxHeight",2),te([o({type:Boolean,reflect:!0,attribute:"full-height"})],Z.prototype,"fullHeight",2),te([o({type:Boolean,reflect:!0,attribute:"full-width"})],Z.prototype,"fullWidth",2),te([o({type:String})],Z.prototype,"spacing",2),te([o({type:String,attribute:"spacing-top"})],Z.prototype,"spacingTop",2),te([o({type:String,attribute:"spacing-bottom"})],Z.prototype,"spacingBottom",2),te([o({type:String,attribute:"spacing-left"})],Z.prototype,"spacingLeft",2),te([o({type:String,attribute:"spacing-right"})],Z.prototype,"spacingRight",2),Z=te([x("scb-notification-card")],Z);var Rg=Object.defineProperty,Og=Object.getOwnPropertyDescriptor,nt=(e,t,i,s)=>{for(var r=s>1?void 0:s?Og(t,i):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(r=(s?n(t,i,r):n(r))||r);return s&&r&&Rg(t,i,r),r};let qe=class extends k{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.baseUri="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(e){const t={page:e};this.dispatchEvent(new CustomEvent("page-change",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:t,bubbles:!0,composed:!0}))}_getPagingHref(e){if(!this.pagingHref)return;const t=(this.baseUri||"").trim().replace(/&+$/,""),i=window.location.search.replace(/&+$/,""),s=t||i;return s?`${s}&${this.pagingHref}${e}`:`${this.pagingHref}${e}`}_handlePageSelection(e,t){!this.pagingHref&&t&&t.preventDefault(),this.page=e,this._emitPageChange(e)}_prevPage(e){if(this.page<=1){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page-1,e)}_nextPage(e){if(this.page>=this.totalPages){!this.pagingHref&&e&&e.preventDefault();return}this._handlePageSelection(this.page+1,e)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(e){if(e==null)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,i=this.mapSpacingToken(this.spacingBottom)??e,s=this.mapSpacingToken(this.spacingLeft),r=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-pagination-spacing-block-start",t):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),s?this.style.setProperty("--scb-pagination-spacing-inline-start",s):this.style.removeProperty("--scb-pagination-spacing-inline-start"),r?this.style.setProperty("--scb-pagination-spacing-inline-end",r):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom")||e.has("spacingLeft")||e.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:s}=this,r=window.innerWidth<=768,a=r?1:2,n=this._getPagingHref(Math.max(1,this.page-1)),l=this._getPagingHref(Math.min(this.totalPages,this.page+1)),d=this.pagingHref?this.variant==="icon"?c`<a
10464
10464
  class="paging-action-link"
10465
10465
  href=${n}
10466
10466
  @click=${this._prevPage}