@telia-ace/alliance-ui 1.1.1 → 2.0.0-dev.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.
@@ -0,0 +1,39 @@
1
+ import{h as t}from"./chunk-CNFJFZ6D.js";import{a as r}from"./chunk-JFKSI6I7.js";import{LitElement as a,css as n,html as c,unsafeCSS as i}from"lit";import{property as s}from"lit/decorators.js";var e=class extends a{constructor(){super(),this.errorHeader="Access Denied",this.errorMessage="You do not have access to this application.",this.errorInstructions="Please contact an Access Control Administrator to request the necessary permissions."}static{this.styles=n`
2
+ :host {
3
+ min-height: calc(100vh - calc(${i(t.spacing32)} * 2));
4
+ display: flex;
5
+ flex-direction: column;
6
+ }
7
+ .header {
8
+ padding: ${i(t.spacing24)};
9
+ display: flex;
10
+ justify-content: space-between;
11
+ }
12
+
13
+ .inner {
14
+ flex: 1;
15
+ display: flex;
16
+ flex-direction: column;
17
+ justify-content: center;
18
+ align-items: center;
19
+ padding: ${i(t.spacing24)};
20
+ }
21
+
22
+ .inner telia-heading {
23
+ margin: 0 0 ${i(t.spacing24)};
24
+ }
25
+
26
+ .inner telia-p {
27
+ margin: 0;
28
+ }
29
+ `}render(){return c`
30
+ <div class="header">
31
+ <telia-heading tag="h1" variant="title-200">${this.header}</telia-heading>
32
+ </div>
33
+ <telia-divider> </telia-divider>
34
+ <div class="inner">
35
+ <telia-heading tag="h1" variant="title-300"> ${this.errorHeader} </telia-heading>
36
+ <telia-p> ${this.errorMessage} </telia-p>
37
+ <telia-p> ${this.errorInstructions} </telia-p>
38
+ </div>
39
+ `}};r([s({type:String})],e.prototype,"header",2),r([s({type:String,attribute:"error-header"})],e.prototype,"errorHeader",2),r([s({type:String,attribute:"error-message"})],e.prototype,"errorMessage",2),r([s({type:String,attribute:"error-instructions"})],e.prototype,"errorInstructions",2);export{e as a};
@@ -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-AIATXCVP.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 $,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>
2
2
  :host {
3
3
  height: 500px;
4
4
  position: static;
@@ -1,4 +1,4 @@
1
- import{a as t}from"./chunk-AIATXCVP.js";import{LitElement as s,css as c,html as l}from"lit";import{property as i}from"lit/decorators.js";var h="alliance-view-",m="app-view",u=(a=>(a.Main="main",a.Aside="aside",a.Body="body",a))(u||{});function y(n){return`${h}${n}`}function g(n,p){class e extends s{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}))}}static{this.styles=c`
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`
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 t}from"./chunk-AIATXCVP.js";import{LitElement as s,css as c,html as
95
95
  transform: rotate(360deg);
96
96
  }
97
97
  }
98
- `}init(r){for(let[d,o]of Object.entries(r))o&&(this[d]=o)}async connectedCallback(){super.connectedCallback(),this.id||(this.id=crypto.randomUUID()),await p(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=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`
99
99
  <div class="loader">
100
100
  <div>
101
101
  <div></div>
@@ -140,4 +140,4 @@ import{a as t}from"./chunk-AIATXCVP.js";import{LitElement as s,css as c,html as
140
140
  `}}render(){return l`
141
141
  ${this.renderTypeStyling()} ${this.loading?this.renderLoader():""}
142
142
  <slot></slot>
143
- `}}t([i({type:Boolean,attribute:m,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=y(n);customElements.get(a)||customElements.define(a,e)}export{h as a,m as b,u as c,y as d,g 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(n);customElements.get(a)||customElements.define(a,e)}export{m as a,u as b,y as c,f as d,w as e};
@@ -0,0 +1,2 @@
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};
@@ -0,0 +1,55 @@
1
+ import{a as n,c as e,f as l,h as o,j as i}from"./chunk-CNFJFZ6D.js";import{a as s}from"./chunk-JFKSI6I7.js";import{LitElement as f,css as u,html as g}from"lit";var p=class extends f{static{this.styles=u`
2
+ :host {
3
+ display: table;
4
+ border-collapse: collapse;
5
+ width: 100%;
6
+ }
7
+ `}render(){return g` <alliance-tb>
8
+ <slot></slot>
9
+ </alliance-tb>`}};import{LitElement as b,css as y,html as x}from"lit";var m=class extends b{static{this.styles=y`
10
+ :host {
11
+ display: table-row-group;
12
+ vertical-align: middle;
13
+ border-color: inherit;
14
+ }
15
+ `}render(){return x`<slot></slot>`}};import{LitElement as $,css as k,html as S,unsafeCSS as v}from"lit";var d=class extends ${static{this.styles=k`
16
+ :host {
17
+ display: table-cell;
18
+ vertical-align: inherit;
19
+ padding: ${v(o.spacing24)};
20
+ }
21
+ `}render(){return S` <slot></slot> `}};import{LitElement as E,css as L,html as C,unsafeCSS as w}from"lit";import{property as B}from"lit/decorators.js";var a=class extends E{constructor(){super(),this.label=""}static{this.styles=L`
22
+ :host {
23
+ display: table-cell;
24
+ padding: ${w(o.spacing24)};
25
+ }
26
+ `}render(){return C`<telia-heading tag="h4" variant="title-100">${this.label}</telia-heading>`}};s([B({type:String})],a.prototype,"label",2);import{LitElement as I,css as W,html as h,unsafeCSS as t}from"lit";import{property as X}from"lit/decorators.js";var c=class extends I{constructor(){super(),this.clickable=!1}static{this.styles=W`
27
+ :host {
28
+ display: table-row;
29
+ border-bottom: ${t(n.widthXs)} solid ${t(e.gray200)};
30
+ }
31
+ `}render(){return h`
32
+ ${this.clickable?j:""}
33
+ <slot></slot>
34
+ `}};s([X({type:Boolean})],c.prototype,"clickable",2);var j=h`<style>
35
+ :host {
36
+ background-color: transparent;
37
+ transition: background-color ${t(l.duration150)} ${t(l.easeIn)};
38
+ cursor: pointer;
39
+ }
40
+
41
+ :host(:hover),
42
+ :host(:focus-visible),
43
+ :host(:focus) {
44
+ background-color: ${t(e.gray200)};
45
+ }
46
+
47
+ :host(:active) {
48
+ background-color: ${t(e.gray300)};
49
+ }
50
+
51
+ :host(:focus-visible) {
52
+ outline: solid ${t(i.focusBorderWidth)} ${t(i.focusColor)};
53
+ outline-offset: ${t(o.spacing4)};
54
+ }
55
+ </style>`;export{p as a,m as b,d as c,a as d,c as e};
@@ -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-AIATXCVP.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{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`
2
2
  :host {
3
3
  display: block;
4
4
  width: max-content;
@@ -0,0 +1,16 @@
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`
2
+ :host {
3
+ display: contents;
4
+ }
5
+ `}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this.updateActive),this.computeHref()}disconnectedCallback(){window.removeEventListener("popstate",this.updateActive),super.disconnectedCallback()}attributeChangedCallback(a,n,h){super.attributeChangedCallback(a,n,h),setTimeout(()=>this.computeHref())}render(){return u`<a
6
+ part="anchor"
7
+ rel=${this.rel}
8
+ .target=${this.target}
9
+ .href=${this._href}
10
+ ?download=${this.download}
11
+ ?active=${this.active}
12
+ @click=${this.clickHandler}
13
+ @keydown=${l(this.clickHandler)}
14
+ >
15
+ <slot></slot>
16
+ </a>`}};e([r({type:String,attribute:!0,reflect:!0})],t.prototype,"capability",2),e([r({type:String,attribute:!0,reflect:!0})],t.prototype,"app",2),e([r({type:Object,attribute:!0,reflect:!0})],t.prototype,"args",2),e([r({type:String,attribute:!0,reflect:!0})],t.prototype,"href",2),e([r({type:String})],t.prototype,"target",2),e([r({type:String,attribute:!0,reflect:!0})],t.prototype,"rel",2),e([r({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"download",2),e([r({type:String,attribute:!1,reflect:!1})],t.prototype,"_href",2),e([r({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"active",2);export{t as a};
@@ -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-AIATXCVP.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 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`
2
2
  :host select {
3
3
  padding: ${t(l.spacing12)} ${t(l.spacing20)};
4
4
  border-radius: ${t(y.radiusFull)};
@@ -113,4 +113,4 @@ import{a as y,b as R,c as s,f as C,h as l,j as x}from"./chunk-CNFJFZ6D.js";impor
113
113
  ?disabled=${this.currentPage===S(this.pages)}
114
114
  icon="right"
115
115
  ></alliance-paginator-button>
116
- `}};i([f({type:Number,attribute:"item-count"})],c.prototype,"itemCount",2),i([f({type:Number,attribute:"page-size"})],c.prototype,"pageSize",2),i([f({type:Number,attribute:"initial-page"})],c.prototype,"initialPage",2),i([f({type:Number,attribute:"sibling-count"})],c.prototype,"siblingCount",2),i([D()],c.prototype,"currentPage",2),i([D()],c.prototype,"pages",2);import{chevronLeft as q,chevronRight as J}from"@teliads/components/icons";import{LitElement as K,html as P}from"lit";import{property as h}from"lit/decorators.js";var H=(e=>(e.Left="left",e.Right="right",e))(H||{}),u=class extends K{constructor(){super();this.selected=!1,this.disabled=!1,this.clickable=!0}renderContent(){return this.icon==="left"?P`<telia-icon size="sm" svg="${q.svg}" />`:this.icon==="right"?P`<telia-icon size="sm" svg="${J.svg}" />`:P`<span>${this.page}</span>`}render(){return P`<telia-button ?disabled=${this.disabled} size="sm" variant=${this.selected?"primary":"tertiary-purple"}>${this.renderContent()}</telia-button> `}};i([h({type:H})],u.prototype,"icon",2),i([h({type:String})],u.prototype,"page",2),i([h({type:Boolean})],u.prototype,"selected",2),i([h({type:Boolean})],u.prototype,"disabled",2),i([h({type:Boolean})],u.prototype,"clickable",2);export{d as a,c as b,u as c};
116
+ `}};i([f({type:Number,attribute:"item-count"})],c.prototype,"itemCount",2),i([f({type:Number,attribute:"page-size"})],c.prototype,"pageSize",2),i([f({type:Number,attribute:"initial-page"})],c.prototype,"initialPage",2),i([f({type:Number,attribute:"sibling-count"})],c.prototype,"siblingCount",2),i([D()],c.prototype,"currentPage",2),i([D()],c.prototype,"pages",2);import{chevronLeft as q,chevronRight as J}from"@teliads/components/icons";import{LitElement as K,html as P}from"lit";import{property as h}from"lit/decorators.js";var H=(e=>(e.Left="left",e.Right="right",e))(H||{}),u=class extends K{constructor(){super(),this.selected=!1,this.disabled=!1,this.clickable=!0}renderContent(){return this.icon==="left"?P`<telia-icon size="sm" svg="${q.svg}" />`:this.icon==="right"?P`<telia-icon size="sm" svg="${J.svg}" />`:P`<span>${this.page}</span>`}render(){return P`<telia-button ?disabled=${this.disabled} size="sm" variant=${this.selected?"primary":"tertiary-purple"}>${this.renderContent()}</telia-button> `}};i([h({type:H})],u.prototype,"icon",2),i([h({type:String})],u.prototype,"page",2),i([h({type:Boolean})],u.prototype,"selected",2),i([h({type:Boolean})],u.prototype,"disabled",2),i([h({type:Boolean})],u.prototype,"clickable",2);export{d as a,c as b,u as c};
@@ -1 +1 @@
1
- import{a}from"../../chunk-XJ6AYYKT.js";import"../../chunk-AIATXCVP.js";export{a as Link};
1
+ import{a}from"../../chunk-PLZJ2UJT.js";import"../../chunk-K55JD2QD.js";import"../../chunk-JFKSI6I7.js";export{a as Link};
@@ -1 +1 @@
1
- import{a}from"../../chunk-IRXHGGSI.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-AIATXCVP.js";export{a as Modal};
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 +1 @@
1
- import{a,b,c}from"../../chunk-RP753TFV.js";import"../../chunk-AZ6GENL6.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-AIATXCVP.js";export{a as PageSelect,b as Paginator,c as PaginatorButton};
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 +1 @@
1
- import{a}from"../../chunk-SRCKAH5T.js";import"../../chunk-QLXKAVKR.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-AIATXCVP.js";export{a as PopOver};
1
+ import{a}from"../../chunk-NLDZVSFD.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-IXSQVPWG.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-AIATXCVP.js";export{a as Table,b as TableBody,c as TableData,d as TableHead,e as TableRow};
1
+ import{a,b,c,d,e}from"../../chunk-LZEZ2U5O.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Table,b as TableBody,c as TableData,d as TableHead,e as TableRow};
@@ -0,0 +1,14 @@
1
+ import * as lit from 'lit';
2
+ import { LitElement } from 'lit';
3
+
4
+ declare class Unauthorized extends LitElement {
5
+ constructor();
6
+ static styles: lit.CSSResult;
7
+ header: string;
8
+ errorHeader: string;
9
+ errorMessage: string;
10
+ errorInstructions: string;
11
+ render(): lit.TemplateResult<1>;
12
+ }
13
+
14
+ export { Unauthorized };
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-3Y6W4IDL.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Unauthorized};
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../../chunk-KHZRDADJ.js";import"../../chunk-AIATXCVP.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-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};
@@ -3,6 +3,7 @@ export { Action, ActionEvent, Modal } from './alliance-modal/index.js';
3
3
  export { ChangePageEvent, PageSelect, Paginator, PaginatorButton, SelectPageEvent } from './alliance-paginator/index.js';
4
4
  export { PopOver } from './alliance-pop-over/index.js';
5
5
  export { Table, TableBody, TableData, TableHead, TableRow } from './alliance-table/index.js';
6
+ export { Unauthorized } from './alliance-unauthorized/index.js';
6
7
  export { IViewElement, ViewElementType, ViewInitProps, registerViewElement, viewElementPrefix, viewElementSelector, viewElementTag } from './alliance-view/index.js';
7
8
  import 'lit';
8
9
  import '@telia-ace/alliance-internal-client-utilities';
@@ -1 +1 @@
1
- import{a as t}from"../chunk-XJ6AYYKT.js";import{a as e}from"../chunk-IRXHGGSI.js";import{a,b as r,c as l}from"../chunk-RP753TFV.js";import"../chunk-AZ6GENL6.js";import"../chunk-BDQXACZ6.js";import"../chunk-JZJUYJ7F.js";import{a as n}from"../chunk-SRCKAH5T.js";import"../chunk-QLXKAVKR.js";import{a as p,b as m,c as i,d as c,e as f}from"../chunk-IXSQVPWG.js";import"../chunk-H7ZWVNSK.js";import"../chunk-CNFJFZ6D.js";import{a as d,b as x,c as u,d as y,e as P}from"../chunk-KHZRDADJ.js";import"../chunk-AIATXCVP.js";var b=[["link",t],["modal",e],["page-selector",a],["paginator-button",l],["paginator",r],["pop-over",n],["table",p],["tb",m],["td",i],["th",c],["tr",f]];for(let[s,g]of b){let o=`alliance-${s}`;customElements.get(o)||customElements.define(o,g)}export{u as ViewElementType,P as registerViewElement,d as viewElementPrefix,x as viewElementSelector,y as viewElementTag};
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 +1 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-CNFJFZ6D.js";import"../chunk-AIATXCVP.js";export{k as addCssVariables,a as borders,b as breakpoints,c as colors,j as focus,d as grid,e as layers,f as motion,g as shadows,h as spacing,i as typography};
1
+ import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-CNFJFZ6D.js";import"../chunk-JFKSI6I7.js";export{k as addCssVariables,a as borders,b as breakpoints,c as colors,j as focus,d as grid,e as layers,f as motion,g as shadows,h as spacing,i as typography};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/alliance-ui",
3
- "version": "1.1.1",
3
+ "version": "2.0.0-dev.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.5.3",
28
+ "@floating-ui/dom": "^1.6.10",
29
29
  "@teliads/components": "^22.1.1",
30
- "lit": "^3.1.0"
30
+ "lit": "^3.2.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@telia-ace/alliance-internal-client-utilities": "^1.1.0"
33
+ "@telia-ace/alliance-internal-client-utilities": "^2.0.0-dev.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
@@ -1,55 +0,0 @@
1
- import{a as n,c as e,f as l,h as o,j as i}from"./chunk-CNFJFZ6D.js";import{a as s}from"./chunk-AIATXCVP.js";import{LitElement as u,css as g,html as b}from"lit";var p=class extends u{static{this.styles=g`
2
- :host {
3
- display: table;
4
- border-collapse: collapse;
5
- width: 100%;
6
- }
7
- `}render(){return b` <alliance-tb>
8
- <slot></slot>
9
- </alliance-tb>`}};import{LitElement as y,css as x,html as $}from"lit";var m=class extends y{static{this.styles=x`
10
- :host {
11
- display: table-row-group;
12
- vertical-align: middle;
13
- border-color: inherit;
14
- }
15
- `}render(){return $`<slot></slot>`}};import{LitElement as k,css as S,html as v,unsafeCSS as E}from"lit";var d=class extends k{static{this.styles=S`
16
- :host {
17
- display: table-cell;
18
- vertical-align: inherit;
19
- padding: ${E(o.spacing24)};
20
- }
21
- `}render(){return v` <slot></slot> `}};import{LitElement as L,css as C,html as w,unsafeCSS as B}from"lit";import{property as I}from"lit/decorators.js";var a=class extends L{constructor(){super();this.label=""}static{this.styles=C`
22
- :host {
23
- display: table-cell;
24
- padding: ${B(o.spacing24)};
25
- }
26
- `}render(){return w`<telia-heading tag="h4" variant="title-100">${this.label}</telia-heading>`}};s([I({type:String})],a.prototype,"label",2);import{LitElement as W,css as X,html as h,unsafeCSS as t}from"lit";import{property as j}from"lit/decorators.js";var c=class extends W{constructor(){super();this.clickable=!1}static{this.styles=X`
27
- :host {
28
- display: table-row;
29
- border-bottom: ${t(n.widthXs)} solid ${t(e.gray200)};
30
- }
31
- `}render(){return h`
32
- ${this.clickable?q:""}
33
- <slot></slot>
34
- `}};s([j({type:Boolean})],c.prototype,"clickable",2);var q=h`<style>
35
- :host {
36
- background-color: transparent;
37
- transition: background-color ${t(l.duration150)} ${t(l.easeIn)};
38
- cursor: pointer;
39
- }
40
-
41
- :host(:hover),
42
- :host(:focus-visible),
43
- :host(:focus) {
44
- background-color: ${t(e.gray200)};
45
- }
46
-
47
- :host(:active) {
48
- background-color: ${t(e.gray300)};
49
- }
50
-
51
- :host(:focus-visible) {
52
- outline: solid ${t(i.focusBorderWidth)} ${t(i.focusColor)};
53
- outline-offset: ${t(o.spacing4)};
54
- }
55
- </style>`;export{p as a,m as b,d as c,a as d,c as e};
@@ -1,16 +0,0 @@
1
- import{a}from"./chunk-AIATXCVP.js";var u=(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))(u||{}),d=(e=>(e[e.CurrentUserMissingProvider=2e3]="CurrentUserMissingProvider",e[e.CurrentUserGatewayNotStarted=2001]="CurrentUserGatewayNotStarted",e[e.CurrentUserMissingBackend=2002]="CurrentUserMissingBackend",e[e.CurrentUserMissingInDatabase=2003]="CurrentUserMissingInDatabase",e))(d||{});function h(e){let r=Object.entries(e).reduce((n,s)=>{let[o,l]=s;return typeof l>"u"||(typeof l=="object"&&l!==null?n[o]=JSON.stringify(l):n[o]=l),n},{});return Object.keys(r).length?`?${new URLSearchParams(r)}`:""}function c(e="",r="",n={}){let s=f().replace(location.origin,""),o=h(n);return e?r?`${s}/${e}/${r}${o}`:`${s}/${e}${o}`:`${s}${o}`}function f(){return globalThis.__ALLIANCE_RUNTIME_ROOT_URL?globalThis.__ALLIANCE_RUNTIME_ROOT_URL:window.origin}function p(e){return r=>{r.key==="Enter"&&e(r)}}import{LitElement as b,css as g,html as y}from"lit";import{property as i}from"lit/decorators.js";function m(e=""){return location.href.replace(location.origin,"").startsWith(e)}var t=class extends b{constructor(){super();this.navigate=()=>{this.active||(history.pushState({},"",this._href),window.dispatchEvent(new Event("popstate")))};this.clickHandler=n=>{!this.app||this.download||(n.preventDefault(),this.navigate())};this.updateActive=()=>{this.active=m(this._href)};this.computeHref=()=>{if(this.app){this._href=this.href=c(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=g`
2
- :host {
3
- display: contents;
4
- }
5
- `}connectedCallback(){super.connectedCallback(),window.addEventListener("popstate",this.updateActive),this.computeHref()}disconnectedCallback(){window.removeEventListener("popstate",this.updateActive),super.disconnectedCallback()}attributeChangedCallback(n,s,o){super.attributeChangedCallback(n,s,o),setTimeout(()=>this.computeHref())}render(){return y`<a
6
- part="anchor"
7
- rel=${this.rel}
8
- .target=${this.target}
9
- .href=${this._href}
10
- ?download=${this.download}
11
- ?active=${this.active}
12
- @click=${this.clickHandler}
13
- @keydown=${p(this.clickHandler)}
14
- >
15
- <slot></slot>
16
- </a>`}};a([i({type:String,attribute:!0,reflect:!0})],t.prototype,"capability",2),a([i({type:String,attribute:!0,reflect:!0})],t.prototype,"app",2),a([i({type:Object,attribute:!0,reflect:!0})],t.prototype,"args",2),a([i({type:String,attribute:!0,reflect:!0})],t.prototype,"href",2),a([i({type:String})],t.prototype,"target",2),a([i({type:String,attribute:!0,reflect:!0})],t.prototype,"rel",2),a([i({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"download",2),a([i({type:String,attribute:!1,reflect:!1})],t.prototype,"_href",2),a([i({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"active",2);export{t as a};
File without changes