@telia-ace/alliance-ui 1.1.0-next.1 → 1.1.1-next.0
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/dist/{chunk-T7HYVHI2.js → chunk-IRXHGGSI.js} +21 -10
- package/dist/{chunk-HIRVP2II.js → chunk-KHZRDADJ.js} +1 -1
- package/dist/{chunk-IZII256B.js → chunk-RP753TFV.js} +4 -4
- package/dist/{chunk-DDZCFV2G.js → chunk-SRCKAH5T.js} +5 -4
- package/dist/chunk-XJ6AYYKT.js +16 -0
- package/dist/components/alliance-link/index.js +1 -1
- package/dist/components/alliance-modal/index.js +1 -1
- package/dist/components/alliance-paginator/index.js +1 -1
- package/dist/components/alliance-pop-over/index.js +1 -1
- package/dist/components/alliance-view/index.js +1 -1
- package/dist/components/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-XLNQVDOQ.js +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as r,b as
|
|
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>
|
|
2
2
|
:host {
|
|
3
3
|
height: 500px;
|
|
4
4
|
position: static;
|
|
@@ -63,18 +63,18 @@ import{a as r,b as h,c as a,e as l,g as u,h as e}from"./chunk-CNFJFZ6D.js";impor
|
|
|
63
63
|
variant="text"
|
|
64
64
|
data-testid="close-modal-button"
|
|
65
65
|
@click=${this.onCloseClick}
|
|
66
|
-
><telia-icon size="md" svg="${
|
|
66
|
+
><telia-icon size="md" svg="${y.svg}"
|
|
67
67
|
/></telia-button>`;this.footer=()=>this.actions.length?i`
|
|
68
68
|
<div class="footer">
|
|
69
|
-
${
|
|
69
|
+
${v(this.actions,({disabled:s,variant:c,action:h,label:b})=>i`
|
|
70
70
|
<telia-button
|
|
71
71
|
disabled="${s?"true":"false"}"
|
|
72
72
|
variant="${c||"primary"}"
|
|
73
73
|
size="sm"
|
|
74
|
-
@click=${()=>this.action(
|
|
75
|
-
data-testid="${
|
|
74
|
+
@click=${()=>this.action(h)}
|
|
75
|
+
data-testid="${h}-action-button"
|
|
76
76
|
>
|
|
77
|
-
${
|
|
77
|
+
${b}
|
|
78
78
|
</telia-button>
|
|
79
79
|
`)}
|
|
80
80
|
</div>
|
|
@@ -103,14 +103,25 @@ import{a as r,b as h,c as a,e as l,g as u,h as e}from"./chunk-CNFJFZ6D.js";impor
|
|
|
103
103
|
dialog {
|
|
104
104
|
background-color: ${t(a.white)};
|
|
105
105
|
border-radius: ${t(r.radiusLg)};
|
|
106
|
-
box-shadow: ${t(
|
|
106
|
+
box-shadow: ${t(g.md)};
|
|
107
107
|
z-index: ${t(parseInt(l.modal))};
|
|
108
|
-
max-width: ${t(
|
|
108
|
+
max-width: ${t(p.breakpointLg)};
|
|
109
109
|
position: static;
|
|
110
110
|
padding: 0;
|
|
111
111
|
border: none;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
dialog:focus-visible {
|
|
115
|
+
outline: solid ${t(u.focusBorderWidth)} ${t(u.focusColor)};
|
|
116
|
+
outline-offset: ${t(e.spacing4)};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@media only screen and (min-width: ${t(p.breakpointLg)}) {
|
|
120
|
+
dialog {
|
|
121
|
+
min-width: calc(${t(e.spacing128)} * 3.5);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
114
125
|
.header {
|
|
115
126
|
position: relative;
|
|
116
127
|
display: flex;
|
|
@@ -145,7 +156,7 @@ import{a as r,b as h,c as a,e as l,g as u,h as e}from"./chunk-CNFJFZ6D.js";impor
|
|
|
145
156
|
${this.containStyling()} ${this.scrollStyling()} ${this.subHeaderStyling()}
|
|
146
157
|
<div class="backdrop" @click=${this.onBackdropClick}></div>
|
|
147
158
|
<div class="container">
|
|
148
|
-
<dialog open>
|
|
159
|
+
<dialog open autofocus>
|
|
149
160
|
<div class="header">
|
|
150
161
|
<telia-heading tag="h3" variant="title-100">${this.header}</telia-heading>
|
|
151
162
|
${this.closeButton()}
|
|
@@ -159,4 +170,4 @@ import{a as r,b as h,c as a,e as l,g as u,h as e}from"./chunk-CNFJFZ6D.js";impor
|
|
|
159
170
|
${this.footer()}
|
|
160
171
|
</dialog>
|
|
161
172
|
</div>
|
|
162
|
-
`}};n([d({type:String,attribute:"header"})],o.prototype,"header",2),n([d({type:Array})],o.prototype,"actions",2),n([d({type:Boolean,attribute:"required"})],o.prototype,"required",2),n([d({type:String,attribute:"scroll-mode"})],o.prototype,"scrollMode",2),n([
|
|
173
|
+
`}};n([d({type:String,attribute:"header"})],o.prototype,"header",2),n([d({type:Array})],o.prototype,"actions",2),n([d({type:Boolean,attribute:"required"})],o.prototype,"required",2),n([d({type:String,attribute:"scroll-mode"})],o.prototype,"scrollMode",2),n([f()],o.prototype,"hasSubHeader",2),n([d({type:Boolean,attribute:"contain"})],o.prototype,"contain",2);export{o as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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`
|
|
2
2
|
.loader {
|
|
3
3
|
background-color: rgba(255, 255, 255, 0.4);
|
|
4
|
-
z-index: var(--layer-
|
|
4
|
+
z-index: var(--layer-dropdown);
|
|
5
5
|
position: absolute;
|
|
6
6
|
inset: 0;
|
|
7
7
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
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}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,
|
|
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`
|
|
2
2
|
:host select {
|
|
3
|
-
padding: ${t(l.
|
|
3
|
+
padding: ${t(l.spacing12)} ${t(l.spacing20)};
|
|
4
4
|
border-radius: ${t(y.radiusFull)};
|
|
5
5
|
border: ${t(y.widthXs)} solid ${t(s.purple850)};
|
|
6
6
|
background-color: transparent;
|
|
@@ -54,7 +54,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
|
|
|
54
54
|
>
|
|
55
55
|
${G(N(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 {
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: row;
|
|
@@ -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
|
-
`}};
|
|
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,8 +1,9 @@
|
|
|
1
|
-
import{a as c,c as h,e as u,g as
|
|
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`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
width: max-content;
|
|
5
5
|
position: absolute;
|
|
6
|
+
overflow: clip;
|
|
6
7
|
top: 0;
|
|
7
8
|
left: 0;
|
|
8
9
|
|
|
@@ -10,7 +11,7 @@ import{a as c,c as h,e as u,g as p,h as i}from"./chunk-CNFJFZ6D.js";import{a as
|
|
|
10
11
|
border: ${t(c.widthXs)};
|
|
11
12
|
border-radius: ${t(c.radiusSm)};
|
|
12
13
|
background-color: ${t(h.white)};
|
|
13
|
-
box-shadow: ${t(
|
|
14
|
+
box-shadow: ${t(m.md)};
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
:host([loading]) {
|
|
@@ -24,10 +25,10 @@ import{a as c,c as h,e as u,g as p,h as i}from"./chunk-CNFJFZ6D.js";import{a as
|
|
|
24
25
|
height: ${t(i.spacing12)};
|
|
25
26
|
width: ${t(i.spacing128)};
|
|
26
27
|
}
|
|
27
|
-
`}connectedCallback(){super.connectedCallback();let n=document.getElementById(this.anchor);n&&(this.anchorElement=n),window.addEventListener("click",this.onWindowClick);let e=
|
|
28
|
+
`}connectedCallback(){super.connectedCallback();let n=document.getElementById(this.anchor);n&&(this.anchorElement=n),window.addEventListener("click",this.onWindowClick),window.addEventListener("contextmenu",this.onWindowClick);let e=g(this.reference(),this,this.position);this.cleanup=()=>{window.removeEventListener("click",this.onWindowClick),window.removeEventListener("contextmenu",this.onWindowClick),e()}}disconnectedCallback(){this.dispatchEvent(new CustomEvent("close")),this.cleanup(),super.disconnectedCallback()}render(){return this.loading?p`
|
|
28
29
|
<telia-skeleton round> </telia-skeleton>
|
|
29
30
|
<telia-skeleton round> </telia-skeleton>
|
|
30
31
|
<telia-skeleton round> </telia-skeleton>
|
|
31
32
|
<telia-skeleton round> </telia-skeleton>
|
|
32
33
|
<telia-skeleton round> </telia-skeleton>
|
|
33
|
-
`:
|
|
34
|
+
`:p` <slot> </slot> `}};l([d({type:String})],o.prototype,"anchor",2),l([d({type:String,attribute:!0,reflect:!0})],o.prototype,"placement",2),l([d({type:Boolean,attribute:!0,reflect:!0})],o.prototype,"loading",2);function f({x:r,y:s}){return{getBoundingClientRect:()=>({width:0,height:0,x:r,y:s,top:s,left:r,right:r,bottom:s})}}export{o as a};
|
|
@@ -0,0 +1,16 @@
|
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-XJ6AYYKT.js";import"../../chunk-AIATXCVP.js";export{a as Link};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
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 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../../chunk-
|
|
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 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-SRCKAH5T.js";import"../../chunk-QLXKAVKR.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-AIATXCVP.js";export{a as PopOver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../../chunk-
|
|
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};
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"../chunk-
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/alliance-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1-next.0",
|
|
4
4
|
"description": "UI components used by ACE Alliance apps.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lit": "^3.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@telia-ace/alliance-internal-client-utilities": "^1.1.0
|
|
33
|
+
"@telia-ace/alliance-internal-client-utilities": "^1.1.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
package/dist/chunk-XLNQVDOQ.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-AIATXCVP.js";var d=(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))(d||{}),u=(e=>(e[e.CurrentUserMissingProvider=2e3]="CurrentUserMissingProvider",e[e.CurrentUserGatewayNotStarted=2001]="CurrentUserGatewayNotStarted",e[e.CurrentUserMissingBackend=2002]="CurrentUserMissingBackend",e[e.CurrentUserMissingInDatabase=2003]="CurrentUserMissingInDatabase",e))(u||{});function h(e){let r=Object.entries(e).reduce((i,s)=>{let[o,l]=s;return typeof l>"u"||(typeof l=="object"&&l!==null?i[o]=JSON.stringify(l):i[o]=l),i},{});return Object.keys(r).length?`?${new URLSearchParams(r)}`:""}function c(e="",r="",i={}){let s=f().replace(location.origin,""),o=h(i);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}var y=(e=>(e.Primary="primary",e.Secondary="secondary",e.Expressive="expressive",e.Destructive="destructive",e.Text="text",e.PrimaryWhite="primary-white",e.SecondaryWhite="secondary-white",e.ExpressiveWhite="expressive-white",e.TertiaryPurple="tertiary-purple",e))(y||{});function p(e){return r=>{r.key==="Enter"&&e(r)}}import{LitElement as b,css as g,html as m}from"lit";import{property as n}from"lit/decorators.js";function w(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=i=>{!this.app||this.download||(i.preventDefault(),this.navigate())};this.updateActive=()=>{this.active=w(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(i,s,o){super.attributeChangedCallback(i,s,o),setTimeout(()=>this.computeHref())}render(){return m`<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([n({type:String,attribute:!0,reflect:!0})],t.prototype,"capability",2),a([n({type:String,attribute:!0,reflect:!0})],t.prototype,"app",2),a([n({type:Object,attribute:!0,reflect:!0})],t.prototype,"args",2),a([n({type:String,attribute:!0,reflect:!0})],t.prototype,"href",2),a([n({type:String})],t.prototype,"target",2),a([n({type:String,attribute:!0,reflect:!0})],t.prototype,"rel",2),a([n({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"download",2),a([n({type:String,attribute:!1,reflect:!1})],t.prototype,"_href",2),a([n({type:Boolean,attribute:!0,reflect:!0})],t.prototype,"active",2);export{t as a};
|