@telia-ace/alliance-ui 2.0.0 → 2.0.1-next.1

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 p}from"./chunk-K55JD2QD.js";import{a as t}from"./chunk-JFKSI6I7.js";import{LitElement as c,css as h,html as l}from"lit";import{property as i}from"lit/decorators.js";var m="alliance-view-",u="app-view",y=(a=>(a.Main="main",a.Aside="aside",a.Body="body",a))(y||{});function f(n){return`${m}${n}`}function w(n,d){class e extends c{static{this.styles=h`
1
+ import{a as p}from"./chunk-L3VH74CD.js";import{a as t}from"./chunk-JFKSI6I7.js";import{LitElement as c,css as h,html as l}from"lit";import{property as i}from"lit/decorators.js";var m="alliance-view-",u="app-view",y=(a=>(a.Main="main",a.Aside="aside",a.Body="body",a))(y||{});function f(r){return`${m}${r}`}function w(r,d){class e extends c{static{this.styles=h`
2
2
  .loader {
3
3
  background-color: rgba(255, 255, 255, 0.4);
4
4
  z-index: var(--layer-dropdown);
@@ -95,7 +95,7 @@ import{a as p}from"./chunk-K55JD2QD.js";import{a as t}from"./chunk-JFKSI6I7.js";
95
95
  transform: rotate(360deg);
96
96
  }
97
97
  }
98
- `}constructor(){super(),this.appView=!0,this.loading=!0,this.mounted=!1,this.args={},this.app=n,this.capability="launch",this.complete=r=>{this.dispatchEvent(new CustomEvent("complete",{detail:r}))}}init(r){for(let[s,o]of Object.entries(r))o&&(this[s]=o)}async connectedCallback(){super.connectedCallback(),this.id||(this.id=p()),await d(this),this.loading=!1,this.mounted=!0}renderLoader(){return l`
98
+ `}constructor(){super(),this.appView=!0,this.loading=!0,this.mounted=!1,this.args={},this.app=r,this.capability="launch",this.complete=n=>{this.dispatchEvent(new CustomEvent("complete",{detail:n}))}}init(n){for(let[s,o]of Object.entries(n))o&&(this[s]=o)}async connectedCallback(){super.connectedCallback(),this.id||(this.id=p()),await d(this),this.loading=!1,this.mounted=!0}renderLoader(){return l`
99
99
  <div class="loader">
100
100
  <div>
101
101
  <div></div>
@@ -128,7 +128,7 @@ import{a as p}from"./chunk-K55JD2QD.js";import{a as t}from"./chunk-JFKSI6I7.js";
128
128
  display: none;
129
129
  }
130
130
  </style>
131
- `;default:case"main":return l`
131
+ `;default:return l`
132
132
  <style>
133
133
  :host {
134
134
  position: relative;
@@ -140,4 +140,4 @@ import{a as p}from"./chunk-K55JD2QD.js";import{a as t}from"./chunk-JFKSI6I7.js";
140
140
  `}}render(){return l`
141
141
  ${this.renderTypeStyling()} ${this.loading?this.renderLoader():""}
142
142
  <slot></slot>
143
- `}}t([i({type:Boolean,attribute:u,reflect:!0})],e.prototype,"appView",2),t([i({type:Boolean,attribute:!0,reflect:!0})],e.prototype,"mounted",2),t([i({type:Boolean,attribute:!0,reflect:!0})],e.prototype,"loading",2),t([i({type:String,attribute:!1,reflect:!0})],e.prototype,"app",2),t([i({type:String,attribute:!0,reflect:!0})],e.prototype,"type",2),t([i({type:String,attribute:!0,reflect:!0})],e.prototype,"capability",2),t([i({type:Object,attribute:!0,reflect:!0})],e.prototype,"args",2);let a=f(n);customElements.get(a)||customElements.define(a,e)}export{m as a,u as b,y as c,f as d,w as e};
143
+ `}}t([i({type:Boolean,attribute:u,reflect:!0})],e.prototype,"appView",2),t([i({type:Boolean,attribute:!0,reflect:!0})],e.prototype,"mounted",2),t([i({type:Boolean,attribute:!0,reflect:!0})],e.prototype,"loading",2),t([i({type:String,attribute:!1,reflect:!0})],e.prototype,"app",2),t([i({type:String,attribute:!0,reflect:!0})],e.prototype,"type",2),t([i({type:String,attribute:!0,reflect:!0})],e.prototype,"capability",2),t([i({type:Object,attribute:!0,reflect:!0})],e.prototype,"args",2);let a=f(r);customElements.get(a)||customElements.define(a,e)}export{m as a,u as b,y as c,f as d,w as e};
@@ -1,4 +1,4 @@
1
- import{a as y,b as R,c as s,f as C,h as l,j as x}from"./chunk-CNFJFZ6D.js";import{a as i}from"./chunk-JFKSI6I7.js";import{LitElement as j,css as F,html as M,unsafeCSS as t}from"lit";import{property as V}from"lit/decorators.js";import{repeat as G}from"lit/directives/repeat.js";var m="...",p=(n,a)=>{let e=a-n+1;return Array.from({length:e},(o,r)=>r+n)};function S(n){return n[n.length-1]}function N(n){return Array.from({length:n},(a,e)=>k(e+1,n))}function k(n,a){return`${n} / ${a}`}function A(n){let a=n.split("/")[0];if(typeof a!="string")throw new Error("Could not parse page value from select.");return parseInt(a)}function b({itemCount:n,pageSize:a,siblingCount:e,currentPage:o}){let r=Math.ceil(n/a);if(e+5>=r)return p(1,r);let w=Math.max(o-e,1),L=Math.min(o+e,r),$=w>2,v=L<r-2,T=1,_=r;if(!$&&v){let g=3+2*e;return[...p(1,g),m,r]}if($&&!v){let g=3+2*e,I=p(r-g+1,r);return[T,m,...I]}if($&&v){let g=p(w,L);return[T,m,...g,m,_]}return p(1,r)}var d=class extends j{constructor(){super();this.onChange=e=>{let o=A(e.currentTarget.value),r=new CustomEvent("select-page",{bubbles:!0,composed:!0,detail:{nextPage:o,previousPage:this.currentPage},cancelable:!0});this.dispatchEvent(r)};this.currentPage=0,this.lastPage=0}static{this.styles=F`
1
+ import{a as y,b as N,c as s,f as C,h as l,j as x}from"./chunk-CNFJFZ6D.js";import{a as i}from"./chunk-JFKSI6I7.js";import{LitElement as j,css as F,html as M,unsafeCSS as t}from"lit";import{property as V}from"lit/decorators.js";import{repeat as G}from"lit/directives/repeat.js";var m="...",p=(n,a)=>{let e=a-n+1;return Array.from({length:e},(o,r)=>r+n)};function S(n){return n[n.length-1]}function R(n){return Array.from({length:n},(a,e)=>k(e+1,n))}function k(n,a){return`${n} / ${a}`}function A(n){let a=n.split("/")[0];if(typeof a!="string")throw new Error("Could not parse page value from select.");return Number.parseInt(a)}function b({itemCount:n,pageSize:a,siblingCount:e,currentPage:o}){let r=Math.ceil(n/a);if(e+5>=r)return p(1,r);let w=Math.max(o-e,1),L=Math.min(o+e,r),$=w>2,v=L<r-2,T=1,_=r;if(!$&&v){let g=3+2*e;return[...p(1,g),m,r]}if($&&!v){let g=3+2*e,I=p(r-g+1,r);return[T,m,...I]}if($&&v){let g=p(w,L);return[T,m,...g,m,_]}return p(1,r)}var d=class extends j{constructor(){super();this.onChange=e=>{let o=A(e.currentTarget.value),r=new CustomEvent("select-page",{bubbles:!0,composed:!0,detail:{nextPage:o,previousPage:this.currentPage},cancelable:!0});this.dispatchEvent(r)};this.currentPage=0,this.lastPage=0}static{this.styles=F`
2
2
  :host select {
3
3
  padding: ${t(l.spacing12)} ${t(l.spacing20)};
4
4
  border-radius: ${t(y.radiusFull)};
@@ -52,7 +52,7 @@ import{a as y,b as R,c as s,f as C,h as l,j as x}from"./chunk-CNFJFZ6D.js";impor
52
52
  @change=${this.onChange}
53
53
  .value=${k(this.currentPage,this.lastPage)}
54
54
  >
55
- ${G(N(this.lastPage),e=>M`<option value="${e}">${e}</option>`)}
55
+ ${G(R(this.lastPage),e=>M`<option value="${e}">${e}</option>`)}
56
56
  </select>
57
57
  `}};i([V({type:Number,attribute:"current-page"})],d.prototype,"currentPage",2),i([V({type:Number,attribute:"last-page"})],d.prototype,"lastPage",2);import{LitElement as O,css as W,html as E,unsafeCSS as z}from"lit";import{property as f,state as D}from"lit/decorators.js";import{repeat as X}from"lit/directives/repeat.js";var c=class extends O{constructor(){super();this.changePage=e=>{if(e===this.currentPage||e<1||e>this.pages[this.pages.length-1])return;let o=new CustomEvent("change-page",{bubbles:!0,composed:!0,detail:{nextPage:e,previousPage:this.currentPage},cancelable:!0});this.dispatchEvent(o)&&(this.currentPage=e,this.pages=b({itemCount:this.itemCount,pageSize:this.pageSize,siblingCount:this.siblingCount,currentPage:this.currentPage}))};this.next=()=>{this.changePage(this.currentPage+1)};this.previous=()=>{this.changePage(this.currentPage-1)};this.onPageSelect=e=>this.changePage(e.detail.nextPage);this.itemCount=0,this.pageSize=50,this.initialPage=1,this.siblingCount=2,this.currentPage=this.initialPage,this.pages=[]}static{this.styles=W`
58
58
  :host {
@@ -78,7 +78,7 @@ import{a as y,b as R,c as s,f as C,h as l,j as x}from"./chunk-CNFJFZ6D.js";impor
78
78
  display: block;
79
79
  }
80
80
 
81
- @container (min-width: ${z(R.breakpointLg)}) {
81
+ @container (min-width: ${z(N.breakpointLg)}) {
82
82
  :host telia-label,
83
83
  :host alliance-paginator-button[page] {
84
84
  display: block;
@@ -0,0 +1,2 @@
1
+ import f from"node:crypto";var y=(e=>(e[e.AlreadyInitialized=1e3]="AlreadyInitialized",e[e.NoAppName=1001]="NoAppName",e[e.MissingAppController=1002]="MissingAppController",e[e.MissingCapabilityOnApp=1003]="MissingCapabilityOnApp",e[e.MissingManagedObjectProvider=1004]="MissingManagedObjectProvider",e[e.NoManifest=1005]="NoManifest",e[e.NoRootElement=1006]="NoRootElement",e[e.NoView=1007]="NoView",e[e.CookieKeyNotDefined=1008]="CookieKeyNotDefined",e[e.CookieCategoryNotAllowed=1009]="CookieCategoryNotAllowed",e[e.StorageKeyNotDefined=1010]="StorageKeyNotDefined",e[e.StorageCategoryNotAllowed=1011]="StorageCategoryNotAllowed",e[e.LocalizationTemplateNotDefined=1012]="LocalizationTemplateNotDefined",e[e.NonViewOperation=1013]="NonViewOperation",e))(y||{}),h=(e=>(e[e.CurrentUserMissingProvider=2e3]="CurrentUserMissingProvider",e[e.CurrentUserGatewayNotStarted=2001]="CurrentUserGatewayNotStarted",e[e.CurrentUserMissingBackend=2002]="CurrentUserMissingBackend",e[e.CurrentUserMissingInDatabase=2003]="CurrentUserMissingInDatabase",e))(h||{});function d(e){if(!p(e))throw new Error("Parameter was not an error")}function p(e){return!!e&&typeof e=="object"&&N(e)==="[object Error]"||e instanceof Error}function N(e){return Object.prototype.toString.call(e)}var w="Layerr",C=w;function E(){return C}function k(e){let t,r="";if(e.length===0)t={};else if(p(e[0]))t={cause:e[0]},r=e.slice(1).join(" ")||"";else if(e[0]&&typeof e[0]=="object")t=Object.assign({},e[0]),r=e.slice(1).join(" ")||"";else if(typeof e[0]=="string")t={},r=r=e.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:t,shortMessage:r}}var i=class s extends Error{constructor(t,r){let o=[...arguments],{options:n,shortMessage:a}=k(o),u=a;if(n.cause&&(u=`${u}: ${n.cause.message}`),super(u),this.message=u,n.name&&typeof n.name=="string"?this.name=n.name:this.name=E(),n.cause&&Object.defineProperty(this,"_cause",{value:n.cause}),Object.defineProperty(this,"_info",{value:{}}),n.info&&typeof n.info=="object"&&Object.assign(this._info,n.info),Error.captureStackTrace){let m=n.constructorOpt||this.constructor;Error.captureStackTrace(this,m)}}static cause(t){return d(t),t._cause&&p(t._cause)?t._cause:null}static fullStack(t){d(t);let r=s.cause(t);return r?`${t.stack}
2
+ caused by: ${s.fullStack(r)}`:t.stack??""}static info(t){d(t);let r={},o=s.cause(t);return o&&Object.assign(r,s.info(o)),t._info&&Object.assign(r,t._info),r}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}},b="0123456789ABCDEFGHJKMNPQRSTVWXYZ",c=32,g=0xffffffffffff,$=10,T=16,l=Object.freeze({source:"ulid"});function j(e){let t=e||O(),r=t&&(t.crypto||t.msCrypto)||(typeof f<"u"?f:null);if(typeof r?.getRandomValues=="function")return()=>{let o=new Uint8Array(1);return r.getRandomValues(o),o[0]/255};if(typeof r?.randomBytes=="function")return()=>r.randomBytes(1).readUInt8()/255;if(f?.randomBytes)return()=>f.randomBytes(1).readUInt8()/255;throw new i({info:{code:"PRNG_DETECT",...l}},"Failed to find a reliable PRNG")}function O(){return U()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function A(e,t){let r="";for(;e>0;e--)r=v(t)+r;return r}function M(e,t){if(isNaN(e))throw new i({info:{code:"ENC_TIME_NAN",...l}},`Time must be a number: ${e}`);if(e>g)throw new i({info:{code:"ENC_TIME_SIZE_EXCEED",...l}},`Cannot encode a time larger than ${g}: ${e}`);if(e<0)throw new i({info:{code:"ENC_TIME_NEG",...l}},`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new i({info:{code:"ENC_TIME_TYPE",...l}},`Time must be an integer: ${e}`);let r,o="";for(let n=t;n>0;n--)r=e%c,o=b.charAt(r)+o,e=(e-r)/c;return o}function U(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function v(e){let t=Math.floor(e()*c);return t===c&&(t=c-1),b.charAt(t)}function _(e,t){let r=t||j(),o=isNaN(e)?Date.now():e;return M(o,$)+A(T,r)}function D(){return _().toLowerCase()}function I(e){let t=Object.entries(e).reduce((r,o)=>{let[n,a]=o;return typeof a>"u"||(typeof a=="object"&&a!==null?r[n]=JSON.stringify(a):r[n]=a),r},{});return Object.keys(t).length?`?${new URLSearchParams(t)}`:""}function L(e="",t="",r={}){let o=S().replace(location.origin,""),n=I(r);return e?t?`${o}/${e}/${t}${n}`:`${o}/${e}${n}`:`${o}${n}`}function S(){return globalThis.__ALLIANCE_RUNTIME_ROOT_URL?globalThis.__ALLIANCE_RUNTIME_ROOT_URL:window.origin}function P(e){return t=>{t.key==="Enter"&&e(t)}}export{D as a,L as b,P as c};
@@ -1,4 +1,4 @@
1
- import{b as s,c as l}from"./chunk-K55JD2QD.js";import{a as e}from"./chunk-JFKSI6I7.js";import{LitElement as o,css as p,html as u}from"lit";import{property as r}from"lit/decorators.js";function d(i=""){return location.href.replace(location.origin,"").startsWith(i)}var t=class extends o{constructor(){super();this.navigate=()=>{this.active||(history.pushState({},"",this._href),window.dispatchEvent(new Event("popstate")))};this.clickHandler=a=>{!this.app||this.download||(a.preventDefault(),this.navigate())};this.updateActive=()=>{this.active=d(this._href)};this.computeHref=()=>{if(this.app){this._href=this.href=s(this.app,this.capability,this.args),this.updateActive();return}if(this.href)return this.capability="",this._href=this.href;throw new Error("The <alliance-link> component requires either the 'app' property or 'href' property!")};this.args={},this.download=!1,this.target="_self",this.href=this._href="",this.capability="launch",this.active=!1}static{this.styles=p`
1
+ import{b as s,c as l}from"./chunk-L3VH74CD.js";import{a as e}from"./chunk-JFKSI6I7.js";import{LitElement as o,css as p,html as u}from"lit";import{property as r}from"lit/decorators.js";function d(i=""){return location.href.replace(location.origin,"").startsWith(i)}var t=class extends o{constructor(){super();this.navigate=()=>{this.active||(history.pushState({},"",this._href),window.dispatchEvent(new Event("popstate")))};this.clickHandler=a=>{!this.app||this.download||(a.preventDefault(),this.navigate())};this.updateActive=()=>{this.active=d(this._href)};this.computeHref=()=>{if(this.app){this._href=this.href=s(this.app,this.capability,this.args),this.updateActive();return}if(this.href){this.capability="",this._href=this.href;return}throw new Error("The <alliance-link> component requires either the 'app' property or 'href' property!")};this.args={},this.download=!1,this.target="_self",this.href=this._href="",this.capability="launch",this.active=!1}static{this.styles=p`
2
2
  :host {
3
3
  display: contents;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";import{a as n}from"./chunk-JFKSI6I7.js";import{close as y}from"@teliads/components/icons";import{LitElement as $,css as m,html as i,unsafeCSS as t}from"lit";import{property as d,state as f}from"lit/decorators.js";import{repeat as v}from"lit/directives/repeat.js";var o=class extends ${constructor(){super();this.containStyling=()=>this.contain?i`<style>
1
+ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";import{a as n}from"./chunk-JFKSI6I7.js";import{close as y}from"@teliads/components/icons";import{LitElement as m,css as $,html as i,unsafeCSS as t}from"lit";import{property as d,state as f}from"lit/decorators.js";import{repeat as v}from"lit/directives/repeat.js";var o=class extends m{constructor(){super();this.containStyling=()=>this.contain?i`<style>
2
2
  :host {
3
3
  height: 500px;
4
4
  position: static;
@@ -25,9 +25,13 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
25
25
  flex-direction: column;
26
26
  }
27
27
 
28
+ .header {
29
+ border-bottom: ${t(r.widthXs)} solid ${t(a.gray200)};
30
+ }
31
+
28
32
  .body {
29
33
  flex: 1;
30
- padding: ${t(e.spacing24)} ${t(e.spacing32)};
34
+ padding: ${t(e.spacing24)};
31
35
  height: 80%;
32
36
  overflow-x: hidden;
33
37
  overflow-y: auto;
@@ -35,7 +39,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
35
39
 
36
40
  .footer {
37
41
  border-top: ${t(r.widthXs)} solid ${t(a.gray200)};
38
- padding: ${t(e.spacing24)} ${t(e.spacing32)};
42
+ padding: ${t(e.spacing24)};
39
43
  }
40
44
  </style>`:i`<style>
41
45
  .container {
@@ -51,8 +55,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
51
55
 
52
56
  .footer,
53
57
  .body {
54
- margin: ${t(e.spacing24)} 0;
55
- padding: 0 ${t(e.spacing32)};
58
+ padding: 0 ${t(e.spacing24)} ${t(e.spacing24)};
56
59
  }
57
60
  </style>`;this.subHeaderStyling=()=>{if(this.hasSubHeader)return i`<style>
58
61
  div.sub-header {
@@ -78,16 +81,16 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
78
81
  </telia-button>
79
82
  `)}
80
83
  </div>
81
- `:"";this.onBackdropClick=()=>{if(!this.required)return this.action("close")};this.onCloseClick=()=>{if(!this.required)return this.action("close")};this.onKeyDown=s=>{s.defaultPrevented||!this.required&&s.key==="Escape"&&this.action("close")};this.onSubHeaderSlotChange=()=>{this.hasSubHeader=!0};this.action=s=>{let c=new CustomEvent("action",{bubbles:!0,composed:!0,detail:{action:s},cancelable:!0});return this.dispatchEvent(c)};this.header="",this.actions=[],this.required=!1,this.scrollMode="outside",this.hasSubHeader=!1}static{this.styles=m`
84
+ `:"";this.onBackdropClick=()=>{if(!this.required)return this.action("close")};this.onCloseClick=()=>{if(!this.required)return this.action("close")};this.onKeyDown=s=>{s.defaultPrevented||!this.required&&s.key==="Escape"&&this.action("close")};this.onSubHeaderSlotChange=()=>{this.hasSubHeader=!0};this.action=s=>{let c=new CustomEvent("action",{bubbles:!0,composed:!0,detail:{action:s},cancelable:!0});return this.dispatchEvent(c)};this.header="",this.actions=[],this.required=!1,this.scrollMode="outside",this.hasSubHeader=!1}static{this.styles=$`
82
85
  :host {
83
86
  display: block;
84
87
  inset: 0;
85
- z-index: ${t(parseInt(l.modal)-2)};
88
+ z-index: ${t(Number.parseInt(l.modal)-2)};
86
89
  }
87
90
 
88
91
  .backdrop {
89
92
  inset: 0;
90
- z-index: ${t(parseInt(l.modal)-1)};
93
+ z-index: ${t(Number.parseInt(l.modal)-1)};
91
94
  background-color: ${t(a.black)};
92
95
  opacity: 0.3;
93
96
  }
@@ -104,7 +107,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
104
107
  background-color: ${t(a.white)};
105
108
  border-radius: ${t(r.radiusLg)};
106
109
  box-shadow: ${t(g.md)};
107
- z-index: ${t(parseInt(l.modal))};
110
+ z-index: ${t(Number.parseInt(l.modal))};
108
111
  max-width: ${t(p.breakpointLg)};
109
112
  position: static;
110
113
  padding: 0;
@@ -126,15 +129,14 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
126
129
  position: relative;
127
130
  display: flex;
128
131
  align-items: center;
129
- padding: ${t(e.spacing24)} ${t(e.spacing32)};
130
- border-bottom: ${t(r.widthXs)} solid ${t(a.gray200)};
131
- min-height: 40px;
132
+ padding: ${t(e.spacing24)} ${t(e.spacing24)} ${t(e.spacing32)};
133
+ min-height: 30px;
132
134
  }
133
135
 
134
136
  .header telia-button {
135
137
  position: absolute;
136
- top: ${t(e.spacing20)};
137
- right: ${t(e.spacing24)};
138
+ top: ${t(e.spacing16)};
139
+ right: ${t(e.spacing16)};
138
140
  }
139
141
 
140
142
  .sub-header {
@@ -1,4 +1,4 @@
1
- import{a as c,c as h,e as u,g as m,h as i}from"./chunk-CNFJFZ6D.js";import{a as l}from"./chunk-JFKSI6I7.js";import{autoPlacement as k,autoUpdate as g,computePosition as b}from"@floating-ui/dom";import{css as E,html as p,LitElement as v,unsafeCSS as t}from"lit";import{property as d}from"lit/decorators.js";var o=class extends v{constructor(){super(...arguments);this.onWindowClick=n=>{let{target:e,clientX:a,clientY:w}=n;if(!this.cursor){this.cursor={x:a,y:w};return}!e||e===this||this.contains(e)||this.anchorElement&&(e===this.anchorElement||this.anchorElement.contains(e))||this.remove()};this.position=()=>{let n=[];this.placement||n.push(k()),b(this.reference(),this,{middleware:n,placement:this.placement}).then(({x:e,y:a})=>{Object.assign(this.style,{left:`${e}px`,top:`${a}px`})})};this.reference=()=>!this.anchorElement&&!this.cursor?f({x:0,y:0}):this.anchorElement||f(this.cursor)}static{this.styles=E`
1
+ import{a as c,c as h,e as u,g as m,h as i}from"./chunk-CNFJFZ6D.js";import{a as l}from"./chunk-JFKSI6I7.js";import{autoPlacement as k,autoUpdate as g,computePosition as b}from"@floating-ui/dom";import{LitElement as E,css as v,html as p,unsafeCSS as t}from"lit";import{property as d}from"lit/decorators.js";var o=class extends E{constructor(){super(...arguments);this.onWindowClick=n=>{let{target:e,clientX:a,clientY:w}=n;if(!this.cursor){this.cursor={x:a,y:w};return}!e||e===this||this.contains(e)||this.anchorElement&&(e===this.anchorElement||this.anchorElement.contains(e))||this.remove()};this.position=()=>{let n=[];this.placement||n.push(k()),b(this.reference(),this,{middleware:n,placement:this.placement}).then(({x:e,y:a})=>{Object.assign(this.style,{left:`${e}px`,top:`${a}px`})})};this.reference=()=>!this.anchorElement&&!this.cursor?f({x:0,y:0}):this.anchorElement||f(this.cursor)}static{this.styles=v`
2
2
  :host {
3
3
  display: block;
4
4
  width: max-content;
@@ -1 +1 @@
1
- import{a}from"../../chunk-PLZJ2UJT.js";import"../../chunk-K55JD2QD.js";import"../../chunk-JFKSI6I7.js";export{a as Link};
1
+ import{a}from"../../chunk-PRKPUBA7.js";import"../../chunk-L3VH74CD.js";import"../../chunk-JFKSI6I7.js";export{a as Link};
@@ -1 +1 @@
1
- import{a}from"../../chunk-6JFKVQEE.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Modal};
1
+ import{a}from"../../chunk-TJ37YT5S.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Modal};
@@ -1 +1 @@
1
- import{a,b,c}from"../../chunk-V65IZH4Y.js";import"../../chunk-AZ6GENL6.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as PageSelect,b as Paginator,c as PaginatorButton};
1
+ import{a,b,c}from"../../chunk-ERBUEZ5O.js";import"../../chunk-AZ6GENL6.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as PageSelect,b as Paginator,c as PaginatorButton};
@@ -1 +1 @@
1
- import{a}from"../../chunk-NLDZVSFD.js";import"../../chunk-QLXKAVKR.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as PopOver};
1
+ import{a}from"../../chunk-ZO3TGBYT.js";import"../../chunk-QLXKAVKR.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as PopOver};
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../../chunk-A67SKVV4.js";import"../../chunk-K55JD2QD.js";import"../../chunk-JFKSI6I7.js";export{c as ViewElementType,e as registerViewElement,a as viewElementPrefix,b as viewElementSelector,d as viewElementTag};
1
+ import{a,b,c,d,e}from"../../chunk-DPROJK37.js";import"../../chunk-L3VH74CD.js";import"../../chunk-JFKSI6I7.js";export{c as ViewElementType,e as registerViewElement,a as viewElementPrefix,b as viewElementSelector,d as viewElementTag};
@@ -1 +1 @@
1
- import{a as t}from"../chunk-PLZJ2UJT.js";import{a as e}from"../chunk-6JFKVQEE.js";import{a as r,b as a,c as n}from"../chunk-V65IZH4Y.js";import"../chunk-AZ6GENL6.js";import"../chunk-BDQXACZ6.js";import"../chunk-JZJUYJ7F.js";import{a as l}from"../chunk-NLDZVSFD.js";import"../chunk-QLXKAVKR.js";import{a as p,b as i,c as m,d as f,e as c}from"../chunk-LZEZ2U5O.js";import"../chunk-H7ZWVNSK.js";import{a as s}from"../chunk-3Y6W4IDL.js";import"../chunk-CNFJFZ6D.js";import{a as b,b as x,c as y,d as h,e as P}from"../chunk-A67SKVV4.js";import"../chunk-K55JD2QD.js";import"../chunk-JFKSI6I7.js";var g=[["link",t],["modal",e],["unauthorized",s],["page-selector",r],["paginator-button",n],["paginator",a],["pop-over",l],["table",p],["tb",i],["td",m],["th",f],["tr",c]];for(let[u,d]of g){let o=`alliance-${u}`;customElements.get(o)||customElements.define(o,d)}export{y as ViewElementType,P as registerViewElement,b as viewElementPrefix,x as viewElementSelector,h as viewElementTag};
1
+ import{a as p,b as i,c as m,d as f,e as c}from"../chunk-LZEZ2U5O.js";import{a as s}from"../chunk-3Y6W4IDL.js";import{a as b,b as x,c as y,d as h,e as P}from"../chunk-DPROJK37.js";import{a as t}from"../chunk-PRKPUBA7.js";import"../chunk-L3VH74CD.js";import{a as e}from"../chunk-TJ37YT5S.js";import"../chunk-H7ZWVNSK.js";import{a as r,b as a,c as n}from"../chunk-ERBUEZ5O.js";import"../chunk-AZ6GENL6.js";import"../chunk-BDQXACZ6.js";import"../chunk-JZJUYJ7F.js";import{a as l}from"../chunk-ZO3TGBYT.js";import"../chunk-QLXKAVKR.js";import"../chunk-CNFJFZ6D.js";import"../chunk-JFKSI6I7.js";var g=[["link",t],["modal",e],["unauthorized",s],["page-selector",r],["paginator-button",n],["paginator",a],["pop-over",l],["table",p],["tb",i],["td",m],["th",f],["tr",c]];for(let[u,d]of g){let o=`alliance-${u}`;customElements.get(o)||customElements.define(o,d)}export{y as ViewElementType,P as registerViewElement,b as viewElementPrefix,x as viewElementSelector,h as viewElementTag};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/alliance-ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-next.1",
4
4
  "description": "UI components used by ACE Alliance apps.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -25,12 +25,12 @@
25
25
  "dist"
26
26
  ],
27
27
  "dependencies": {
28
- "@floating-ui/dom": "^1.6.10",
28
+ "@floating-ui/dom": "^1.6.13",
29
29
  "@teliads/components": "^22.1.1",
30
- "lit": "^3.2.0"
30
+ "lit": "^3.2.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@telia-ace/alliance-internal-client-utilities": "^2.0.0"
33
+ "@telia-ace/alliance-internal-client-utilities": "^2.0.1-next.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
@@ -1,2 +0,0 @@
1
- import f from"node:crypto";var m=(e=>(e[e.AlreadyInitialized=1e3]="AlreadyInitialized",e[e.NoAppName=1001]="NoAppName",e[e.MissingAppController=1002]="MissingAppController",e[e.MissingCapabilityOnApp=1003]="MissingCapabilityOnApp",e[e.MissingManagedObjectProvider=1004]="MissingManagedObjectProvider",e[e.NoManifest=1005]="NoManifest",e[e.NoRootElement=1006]="NoRootElement",e[e.NoView=1007]="NoView",e[e.CookieKeyNotDefined=1008]="CookieKeyNotDefined",e[e.CookieCategoryNotAllowed=1009]="CookieCategoryNotAllowed",e[e.StorageKeyNotDefined=1010]="StorageKeyNotDefined",e[e.StorageCategoryNotAllowed=1011]="StorageCategoryNotAllowed",e[e.LocalizationTemplateNotDefined=1012]="LocalizationTemplateNotDefined",e[e.NonViewOperation=1013]="NonViewOperation",e))(m||{}),h=(e=>(e[e.CurrentUserMissingProvider=2e3]="CurrentUserMissingProvider",e[e.CurrentUserGatewayNotStarted=2001]="CurrentUserGatewayNotStarted",e[e.CurrentUserMissingBackend=2002]="CurrentUserMissingBackend",e[e.CurrentUserMissingInDatabase=2003]="CurrentUserMissingInDatabase",e))(h||{});function d(e){if(!p(e))throw new Error("Parameter was not an error")}function p(e){return!!e&&typeof e=="object"&&N(e)==="[object Error]"||e instanceof Error}function N(e){return Object.prototype.toString.call(e)}var w="Layerr",C=w;function E(){return C}function k(e){let t,n="";if(e.length===0)t={};else if(p(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&typeof e[0]=="object")t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else if(typeof e[0]=="string")t={},n=n=e.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:t,shortMessage:n}}var i=class s extends Error{constructor(t,n){let o=[...arguments],{options:r,shortMessage:a}=k(o),u=a;if(r.cause&&(u=`${u}: ${r.cause.message}`),super(u),this.message=u,r.name&&typeof r.name=="string"?this.name=r.name:this.name=E(),r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&typeof r.info=="object"&&Object.assign(this._info,r.info),Error.captureStackTrace){let y=r.constructorOpt||this.constructor;Error.captureStackTrace(this,y)}}static cause(t){return d(t),t._cause&&p(t._cause)?t._cause:null}static fullStack(t){d(t);let n=s.cause(t);return n?`${t.stack}
2
- caused by: ${s.fullStack(n)}`:t.stack??""}static info(t){d(t);let n={},o=s.cause(t);return o&&Object.assign(n,s.info(o)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}},b="0123456789ABCDEFGHJKMNPQRSTVWXYZ",l=32,g=0xffffffffffff,j=10,O=16,c=Object.freeze({source:"ulid"});function $(e){let t=e||T(),n=t&&(t.crypto||t.msCrypto)||(typeof f<"u"?f:null);if(typeof n?.getRandomValues=="function")return()=>{let o=new Uint8Array(1);return n.getRandomValues(o),o[0]/255};if(typeof n?.randomBytes=="function")return()=>n.randomBytes(1).readUInt8()/255;if(f?.randomBytes)return()=>f.randomBytes(1).readUInt8()/255;throw new i({info:{code:"PRNG_DETECT",...c}},"Failed to find a reliable PRNG")}function T(){return v()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function A(e,t){let n="";for(;e>0;e--)n=_(t)+n;return n}function M(e,t){if(isNaN(e))throw new i({info:{code:"ENC_TIME_NAN",...c}},`Time must be a number: ${e}`);if(e>g)throw new i({info:{code:"ENC_TIME_SIZE_EXCEED",...c}},`Cannot encode a time larger than ${g}: ${e}`);if(e<0)throw new i({info:{code:"ENC_TIME_NEG",...c}},`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new i({info:{code:"ENC_TIME_TYPE",...c}},`Time must be an integer: ${e}`);let n,o="";for(let r=t;r>0;r--)n=e%l,o=b.charAt(n)+o,e=(e-n)/l;return o}function v(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function _(e){let t=Math.floor(e()*l);return t===l&&(t=l-1),b.charAt(t)}function U(e,t){let n=t||$(),o=isNaN(e)?Date.now():e;return M(o,j)+A(O,n)}function D(){return U().toLowerCase()}function I(e){let t=Object.entries(e).reduce((n,o)=>{let[r,a]=o;return typeof a>"u"||(typeof a=="object"&&a!==null?n[r]=JSON.stringify(a):n[r]=a),n},{});return Object.keys(t).length?`?${new URLSearchParams(t)}`:""}function L(e="",t="",n={}){let o=S().replace(location.origin,""),r=I(n);return e?t?`${o}/${e}/${t}${r}`:`${o}/${e}${r}`:`${o}${r}`}function S(){return globalThis.__ALLIANCE_RUNTIME_ROOT_URL?globalThis.__ALLIANCE_RUNTIME_ROOT_URL:window.origin}function P(e){return t=>{t.key==="Enter"&&e(t)}}export{D as a,L as b,P as c};