@nyaruka/temba-components 0.27.2 → 0.28.2
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/CHANGELOG.md +21 -0
- package/README.md +2 -1
- package/demo/index.html +176 -127
- package/dist/{956247ac.js → 2cd62ab6.js} +91 -66
- package/dist/index.js +91 -66
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/templates/components-body.html +1 -1
- package/dist/templates/components-head.html +1 -1
- package/out-tsc/src/contacts/ContactTickets.js +34 -49
- package/out-tsc/src/contacts/ContactTickets.js.map +1 -1
- package/out-tsc/src/list/TembaMenu.js +9 -3
- package/out-tsc/src/list/TembaMenu.js.map +1 -1
- package/out-tsc/src/slider/TembaSlider.js +42 -25
- package/out-tsc/src/slider/TembaSlider.js.map +1 -1
- package/out-tsc/src/tabpane/Tab.js +4 -0
- package/out-tsc/src/tabpane/Tab.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +45 -6
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/test/temba-slider.test.js +11 -0
- package/out-tsc/test/temba-slider.test.js.map +1 -0
- package/package.json +1 -1
- package/src/contacts/ContactTickets.ts +43 -53
- package/src/list/TembaMenu.ts +9 -3
- package/src/slider/TembaSlider.ts +43 -32
- package/src/tabpane/Tab.ts +3 -0
- package/src/tabpane/TabPane.ts +44 -6
- package/stories/temba-checkbox.stories.md +2 -12
- package/test/temba-slider.test.ts +11 -0
|
@@ -3678,6 +3678,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3678
3678
|
|
|
3679
3679
|
.level-0 {
|
|
3680
3680
|
padding: 0px;
|
|
3681
|
+
z-index: 500;
|
|
3681
3682
|
}
|
|
3682
3683
|
|
|
3683
3684
|
.item {
|
|
@@ -3775,7 +3776,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3775
3776
|
.level-1 {
|
|
3776
3777
|
transition: opacity 100ms linear, margin 200ms linear;
|
|
3777
3778
|
overflow-y: scroll;
|
|
3778
|
-
z-index:
|
|
3779
|
+
z-index: 150;
|
|
3779
3780
|
}
|
|
3780
3781
|
|
|
3781
3782
|
.level-2 {
|
|
@@ -3908,9 +3909,14 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3908
3909
|
}
|
|
3909
3910
|
|
|
3910
3911
|
.fully-collapsed .level-1 {
|
|
3911
|
-
margin-left: -
|
|
3912
|
-
|
|
3912
|
+
margin-left: -217px;
|
|
3913
|
+
pointer-events: none;
|
|
3913
3914
|
border: none;
|
|
3915
|
+
overflow: hidden;
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
.fully-collapsed .level-1 > * {
|
|
3919
|
+
opacity: 0;
|
|
3914
3920
|
}
|
|
3915
3921
|
|
|
3916
3922
|
.fully-collapsed .level-1 .item,
|
|
@@ -4011,7 +4017,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4011
4017
|
<slot name="dropdown"></slot>
|
|
4012
4018
|
</div>
|
|
4013
4019
|
</div>
|
|
4014
|
-
`}}t([it({type:Boolean})],Wa.prototype,"open",void 0),t([it({type:Number})],Wa.prototype,"arrowSize",void 0),t([it({type:Number})],Wa.prototype,"arrowOffset",void 0),t([it({type:Number})],Wa.prototype,"offsetX",void 0),t([it({type:Number})],Wa.prototype,"offsetY",void 0);class Ga extends tt{constructor(){super(...arguments),this.index=0}static get styles(){return r`
|
|
4020
|
+
`}}t([it({type:Boolean})],Wa.prototype,"open",void 0),t([it({type:Number})],Wa.prototype,"arrowSize",void 0),t([it({type:Number})],Wa.prototype,"arrowOffset",void 0),t([it({type:Number})],Wa.prototype,"offsetX",void 0),t([it({type:Number})],Wa.prototype,"offsetY",void 0);class Ga extends tt{constructor(){super(...arguments),this.collapses=!1,this.index=0}static get styles(){return r`
|
|
4015
4021
|
:host {
|
|
4016
4022
|
display: flex;
|
|
4017
4023
|
flex-direction: column;
|
|
@@ -4023,6 +4029,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4023
4029
|
}
|
|
4024
4030
|
|
|
4025
4031
|
.tab {
|
|
4032
|
+
user-select: none;
|
|
4026
4033
|
padding: 0.5em 1em;
|
|
4027
4034
|
margin: 0em 0em;
|
|
4028
4035
|
cursor: pointer;
|
|
@@ -4034,10 +4041,39 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4034
4041
|
border: 0px solid rgba(0, 0, 0, 0.45);
|
|
4035
4042
|
color: var(--color-text-dark);
|
|
4036
4043
|
--icon-color: var(--color-text-dark);
|
|
4044
|
+
white-space: nowrap;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
.tab.hidden {
|
|
4048
|
+
display: none;
|
|
4037
4049
|
}
|
|
4038
4050
|
|
|
4039
4051
|
.tab temba-icon {
|
|
4052
|
+
}
|
|
4053
|
+
|
|
4054
|
+
.tab .name {
|
|
4055
|
+
margin-left: 0.4em;
|
|
4056
|
+
max-width: 80px;
|
|
4040
4057
|
margin-right: 0.4em;
|
|
4058
|
+
overflow: hidden;
|
|
4059
|
+
transition: max-width 500ms ease-in-out;
|
|
4060
|
+
}
|
|
4061
|
+
|
|
4062
|
+
.tab .badge {
|
|
4063
|
+
margin-left: 0.4em;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
4066
|
+
@media (max-width: 900px) {
|
|
4067
|
+
.collapses .tab .name {
|
|
4068
|
+
max-width: 0px;
|
|
4069
|
+
margin: 0;
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
@media (max-width: 600px) {
|
|
4074
|
+
.collapses .tab .badge {
|
|
4075
|
+
display: none;
|
|
4076
|
+
}
|
|
4041
4077
|
}
|
|
4042
4078
|
|
|
4043
4079
|
.tab.selected {
|
|
@@ -4062,7 +4098,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4062
4098
|
}
|
|
4063
4099
|
|
|
4064
4100
|
.badge {
|
|
4065
|
-
margin-left: 0.4em;
|
|
4066
4101
|
}
|
|
4067
4102
|
|
|
4068
4103
|
.count {
|
|
@@ -4081,16 +4116,18 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4081
4116
|
color: #fff;
|
|
4082
4117
|
}
|
|
4083
4118
|
`}handleTabClick(t){this.index=parseInt(t.currentTarget.dataset.index),this.requestUpdate("index"),this.fireEvent(de.ContextChanged)}updated(t){if(super.updated(t),t.has("index")&&this.children.length>this.index)for(let t=0;t<this.children.length;t++){const e=this.children[t];e.selected=t==this.index,e.selected?e.style.display="flex":e.style.display="none"}}getTab(t){return this.children.item(t)}render(){const t=[];for(const e of this.children)t.push(e);return O`
|
|
4084
|
-
<div
|
|
4119
|
+
<div
|
|
4120
|
+
class="tabs ${Gt({tabs:!0,collapses:this.collapses})}"
|
|
4121
|
+
>
|
|
4085
4122
|
${t.map(((t,e)=>O`
|
|
4086
4123
|
<div
|
|
4087
4124
|
@click=${this.handleTabClick}
|
|
4088
4125
|
data-index=${e}
|
|
4089
|
-
class="
|
|
4126
|
+
class="${Gt({tab:!0,selected:e==this.index,hidden:t.hidden,notify:t.notify})}"
|
|
4090
4127
|
style="${t.selectionColor&&e==this.index?`color:${t.selectionColor};--icon-color:${t.selectionColor};`:""} ${t.selectionBackground&&e==this.index?`background-color:${t.selectionBackground};`:""}"
|
|
4091
4128
|
>
|
|
4092
4129
|
${t.icon?O`<temba-icon name=${t.icon} />`:null}
|
|
4093
|
-
|
|
4130
|
+
<div class="name">${t.name}</div>
|
|
4094
4131
|
${t.hasBadge()?O`
|
|
4095
4132
|
<div class="badge">
|
|
4096
4133
|
${t.count>0?O`<div class="count">${t.count}</div>`:null}
|
|
@@ -4102,7 +4139,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4102
4139
|
<div class="pane ${0===this.index?"first":null}">
|
|
4103
4140
|
<slot></slot>
|
|
4104
4141
|
</div>
|
|
4105
|
-
`}}t([it({type:Number})],Ga.prototype,"index",void 0);class Ya extends tt{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.count=0}static get styles(){return r`
|
|
4142
|
+
`}}t([it({type:Boolean})],Ga.prototype,"collapses",void 0),t([it({type:Number})],Ga.prototype,"index",void 0);class Ya extends tt{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.hidden=!1,this.count=0}static get styles(){return r`
|
|
4106
4143
|
:host {
|
|
4107
4144
|
display: flex;
|
|
4108
4145
|
flex-direction: column;
|
|
@@ -4121,7 +4158,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4121
4158
|
}
|
|
4122
4159
|
`}hasBadge(){return this.count>0}render(){return O`<slot
|
|
4123
4160
|
class="${Gt({selected:this.selected})}"
|
|
4124
|
-
></slot> `}}t([it({type:String})],Ya.prototype,"name",void 0),t([it({type:String})],Ya.prototype,"icon",void 0),t([it({type:String})],Ya.prototype,"selectionColor",void 0),t([it({type:String})],Ya.prototype,"selectionBackground",void 0),t([it({type:Boolean})],Ya.prototype,"selected",void 0),t([it({type:Boolean})],Ya.prototype,"notify",void 0),t([it({type:Number})],Ya.prototype,"count",void 0);class Ka extends X{static get styles(){return r`
|
|
4161
|
+
></slot> `}}t([it({type:String})],Ya.prototype,"name",void 0),t([it({type:String})],Ya.prototype,"icon",void 0),t([it({type:String})],Ya.prototype,"selectionColor",void 0),t([it({type:String})],Ya.prototype,"selectionBackground",void 0),t([it({type:Boolean})],Ya.prototype,"selected",void 0),t([it({type:Boolean})],Ya.prototype,"notify",void 0),t([it({type:Boolean})],Ya.prototype,"hidden",void 0),t([it({type:Number})],Ya.prototype,"count",void 0);class Ka extends X{static get styles(){return r`
|
|
4125
4162
|
:host {
|
|
4126
4163
|
display: inline-block;
|
|
4127
4164
|
}
|
|
@@ -4618,17 +4655,16 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4618
4655
|
${this.data.map((t=>this.renderEvent(t)))}
|
|
4619
4656
|
`:O`<slot name="empty"></slot>`}}t([it({type:String})],nl.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],nl.prototype,"data",void 0),t([it({type:String})],nl.prototype,"lang_weekly",void 0),t([it({type:String})],nl.prototype,"lang_daily",void 0),t([it({type:String})],nl.prototype,"lang_once",void 0);class ol extends ga{static get styles(){return r`
|
|
4620
4657
|
:host {
|
|
4621
|
-
|
|
4622
|
-
color: #fff;
|
|
4623
|
-
--icon-color: #fff;
|
|
4624
|
-
border-radius: var(--curvature);
|
|
4658
|
+
padding: 1em;
|
|
4625
4659
|
}
|
|
4626
4660
|
|
|
4627
4661
|
:hover {
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
.ticket:hover {
|
|
4631
4665
|
cursor: pointer;
|
|
4666
|
+
box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.055),
|
|
4667
|
+
0 0 0px 2px var(--color-link-primary);
|
|
4632
4668
|
}
|
|
4633
4669
|
|
|
4634
4670
|
.tickets {
|
|
@@ -4661,26 +4697,19 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4661
4697
|
}
|
|
4662
4698
|
|
|
4663
4699
|
.ticket > div {
|
|
4664
|
-
padding: 1em;
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
.ticket .action {
|
|
4668
|
-
background: rgba(0, 0, 0, 0.1);
|
|
4669
|
-
border-top-right-radius: var(--curvature);
|
|
4670
|
-
border-bottom-right-radius: var(--curvature);
|
|
4671
|
-
padding: 1.5em;
|
|
4672
|
-
--icon-color: rgba(0, 0, 0, 0.4);
|
|
4673
|
-
white-space: nowrap;
|
|
4700
|
+
padding: 0.5em 1em;
|
|
4701
|
+
pointer-events: none;
|
|
4674
4702
|
}
|
|
4675
4703
|
|
|
4676
|
-
.
|
|
4677
|
-
|
|
4704
|
+
.status {
|
|
4705
|
+
--icon-color: #999;
|
|
4678
4706
|
}
|
|
4679
4707
|
|
|
4680
|
-
.closed
|
|
4681
|
-
background: #
|
|
4708
|
+
.ticket.closed {
|
|
4709
|
+
background: #f9f9f9;
|
|
4710
|
+
color: #888;
|
|
4682
4711
|
}
|
|
4683
|
-
`}prepareData(t){return t&&t.length&&t.sort(((t,e)=>new Date(t.opened_on).getTime()-new Date(
|
|
4712
|
+
`}prepareData(t){return t&&t.length&&t.sort(((t,e)=>t.status==ue.Open&&e.status==ue.Closed?-1:e.status==ue.Open&&t.status==ue.Closed?1:t.status==ue.Closed&&e.status==ue.Closed?new Date(e.closed_on).getTime()-new Date(t.closed_on).getTime():new Date(e.opened_on).getTime()-new Date(t.opened_on).getTime())),t}updated(t){super.updated(t),t.has("contact")&&(this.contact?this.url=`/api/v2/tickets.json?contact=${this.contact}`:this.url=null)}renderTicket(t){const e=t.status===ue.Open?t.opened_on:t.closed_on;return O`
|
|
4684
4713
|
<div
|
|
4685
4714
|
class="ticket ${t.status}"
|
|
4686
4715
|
href="/ticket/all/open/${t.uuid}"
|
|
@@ -4695,47 +4724,31 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4695
4724
|
</temba-tip>
|
|
4696
4725
|
</div>
|
|
4697
4726
|
|
|
4698
|
-
${t.status===ue.
|
|
4699
|
-
<
|
|
4700
|
-
|
|
4701
|
-
</div>
|
|
4702
|
-
`:O`
|
|
4703
|
-
<div class="action">
|
|
4704
|
-
<temba-icon name="check" size="1.5"></temba-icon>
|
|
4705
|
-
</div>
|
|
4706
|
-
`}
|
|
4727
|
+
${t.status===ue.Closed?O`<div class="status">
|
|
4728
|
+
<temba-icon name="check"></temba-icon>
|
|
4729
|
+
</div>`:null}
|
|
4707
4730
|
</div>
|
|
4708
|
-
`}render(){if(this.data&&this.data.length>0){const t=this.data.
|
|
4709
|
-
<div
|
|
4710
|
-
class="tickets"
|
|
4711
|
-
href="/ticket/all/open/${t.uuid}"
|
|
4712
|
-
onclick="goto(event)"
|
|
4713
|
-
>
|
|
4714
|
-
<div style="flex-grow:1"></div>
|
|
4715
|
-
<temba-icon name="agent" style="pointer-events: none;"></temba-icon>
|
|
4716
|
-
<div class="count" style="pointer-events: none;">
|
|
4717
|
-
${this.data.filter((t=>t.status===ue.Open)).length}
|
|
4718
|
-
</div>
|
|
4719
|
-
</div>
|
|
4720
|
-
`}}}t([it({type:String})],ol.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],ol.prototype,"data",void 0);class rl extends ot{constructor(){super(...arguments),this.min=0,this.max=100,this.circleX=0,this.grabbed=!1,this.left=0,this.gap=0}static get styles(){return r`
|
|
4731
|
+
`}render(){if(this.data&&this.data.length>0){const t=this.data.map((t=>this.renderTicket(t)));return O`${t}`}return O`<slot name="empty"></slot>`}}t([it({type:String})],ol.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],ol.prototype,"data",void 0);class rl extends ot{constructor(){super(...arguments),this.range=!1,this.min=0,this.max=100,this.circleX=0,this.grabbed=!1}static get styles(){return r`
|
|
4721
4732
|
:host {
|
|
4722
4733
|
display: block;
|
|
4723
4734
|
}
|
|
4724
4735
|
|
|
4725
4736
|
.track {
|
|
4726
|
-
height:
|
|
4727
|
-
border:
|
|
4737
|
+
height: 2px;
|
|
4738
|
+
border-top: 0.5em solid #fff;
|
|
4739
|
+
border-bottom: 0.5em solid #fff;
|
|
4728
4740
|
background: #ddd;
|
|
4741
|
+
flex-grow: 1;
|
|
4729
4742
|
}
|
|
4730
4743
|
|
|
4731
4744
|
.circle {
|
|
4732
|
-
margin-
|
|
4733
|
-
margin-left:
|
|
4745
|
+
margin-bottom: -1.05em;
|
|
4746
|
+
margin-left: -0.5em;
|
|
4734
4747
|
width: 0.75em;
|
|
4735
4748
|
height: 0.75em;
|
|
4736
4749
|
border: 2px solid #999;
|
|
4737
4750
|
border-radius: 999px;
|
|
4738
|
-
position:
|
|
4751
|
+
position: relative;
|
|
4739
4752
|
background: #fff;
|
|
4740
4753
|
box-shadow: 0 0 0 4px rgb(255, 255, 255);
|
|
4741
4754
|
transition: transform 200ms ease-in-out;
|
|
@@ -4750,10 +4763,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4750
4763
|
cursor: pointer;
|
|
4751
4764
|
}
|
|
4752
4765
|
|
|
4753
|
-
.grabbed .circle {
|
|
4754
|
-
// border-color: #777;
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
4766
|
.grabbed .circle {
|
|
4758
4767
|
border-color: var(--color-primary-dark);
|
|
4759
4768
|
background: #fff;
|
|
@@ -4762,14 +4771,30 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4762
4771
|
.grabbed .circle {
|
|
4763
4772
|
transform: scale(1.2);
|
|
4764
4773
|
}
|
|
4765
|
-
|
|
4774
|
+
|
|
4775
|
+
.wrapper {
|
|
4776
|
+
display: flex;
|
|
4777
|
+
align-items: center;
|
|
4778
|
+
}
|
|
4779
|
+
|
|
4780
|
+
.pre,
|
|
4781
|
+
.post {
|
|
4782
|
+
font-size: 0.9em;
|
|
4783
|
+
color: #999;
|
|
4784
|
+
padding: 0em 1em;
|
|
4785
|
+
}
|
|
4786
|
+
`}firstUpdated(t){super.firstUpdated(t),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}updated(t){t.has("value")&&this.updateCircle()}updateValue(t){const e=this.shadowRoot.querySelector(".track"),i=(t.pageX-e.offsetLeft)/e.offsetWidth,n=(this.max-this.min)*i+this.min;this.value=""+Math.max(this.min,Math.min(Math.round(n),this.max))}handleMouseMove(t){this.grabbed&&this.updateValue(t)}handleTrackDown(t){this.grabbed=!0,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),document.querySelector("html").classList.add("dragging"),this.updateValue(t),this.requestUpdate()}handleMouseUp(t){this.grabbed=!1,this.updateValue(t),this.requestUpdate(),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.querySelector("html").classList.remove("dragging")}updateCircle(){const t=this.shadowRoot.querySelector(".track"),e=this.shadowRoot.querySelector(".pre"),i=this.max-this.min,n=(parseInt(this.value)-this.min)/i,o=t.offsetWidth*n;this.circleX=o+(e?e.offsetWidth:0),this.requestUpdate()}render(){return O` <div class="${Gt({grabbed:this.grabbed})}">
|
|
4766
4787
|
<div
|
|
4767
4788
|
style=${ut({left:this.circleX+"px"})}
|
|
4768
4789
|
class="circle"
|
|
4769
4790
|
@mousedown=${this.handleTrackDown}
|
|
4770
4791
|
></div>
|
|
4771
|
-
<div class="
|
|
4772
|
-
|
|
4792
|
+
<div class="wrapper">
|
|
4793
|
+
${this.range?O`<div class="pre">${this.min}</div>`:null}
|
|
4794
|
+
<div class="track" @mousedown=${this.handleTrackDown}></div>
|
|
4795
|
+
${this.range?O`<div class="post">${this.max}</div>`:null}
|
|
4796
|
+
</div>
|
|
4797
|
+
</div>`}}function sl(t,e){window.customElements.get(t)||window.customElements.define(t,e)}t([it({type:Boolean})],rl.prototype,"range",void 0),t([it({type:Number})],rl.prototype,"min",void 0),t([it({type:Number})],rl.prototype,"max",void 0),sl("temba-anchor",Va),sl("temba-alert",Ia),sl("temba-store",dr),sl("temba-textinput",Ht),sl("temba-completion",ea),sl("temba-checkbox",rt),sl("temba-select",ta),sl("temba-options",pr),sl("temba-loading",sa),sl("temba-button",oa),sl("temba-omnibox",Fa),sl("temba-tip",Za),sl("temba-contact-name",Ja),sl("temba-contact-field",tl),sl("temba-contact-fields",Qa),sl("temba-urn",Xa),sl("temba-field",ra),sl("temba-dialog",na),sl("temba-modax",ia),sl("temba-charcount",fa),sl("temba-contact-history",Aa),sl("temba-contact-chat",ya),sl("temba-contact-details",Pa),sl("temba-ticket-list",Oa),sl("temba-list",La),sl("temba-label",Ka),sl("temba-menu",Ua),sl("temba-contact-search",Na),sl("temba-icon",za),sl("temba-dropdown",Wa),sl("temba-tabs",Ga),sl("temba-tab",Ya),sl("temba-contact-groups",class extends va{static get styles(){return r`
|
|
4773
4798
|
temba-label {
|
|
4774
4799
|
margin: 0.3em;
|
|
4775
4800
|
}
|
package/dist/index.js
CHANGED
|
@@ -3678,6 +3678,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3678
3678
|
|
|
3679
3679
|
.level-0 {
|
|
3680
3680
|
padding: 0px;
|
|
3681
|
+
z-index: 500;
|
|
3681
3682
|
}
|
|
3682
3683
|
|
|
3683
3684
|
.item {
|
|
@@ -3775,7 +3776,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3775
3776
|
.level-1 {
|
|
3776
3777
|
transition: opacity 100ms linear, margin 200ms linear;
|
|
3777
3778
|
overflow-y: scroll;
|
|
3778
|
-
z-index:
|
|
3779
|
+
z-index: 150;
|
|
3779
3780
|
}
|
|
3780
3781
|
|
|
3781
3782
|
.level-2 {
|
|
@@ -3908,9 +3909,14 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
3908
3909
|
}
|
|
3909
3910
|
|
|
3910
3911
|
.fully-collapsed .level-1 {
|
|
3911
|
-
margin-left: -
|
|
3912
|
-
|
|
3912
|
+
margin-left: -217px;
|
|
3913
|
+
pointer-events: none;
|
|
3913
3914
|
border: none;
|
|
3915
|
+
overflow: hidden;
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
.fully-collapsed .level-1 > * {
|
|
3919
|
+
opacity: 0;
|
|
3914
3920
|
}
|
|
3915
3921
|
|
|
3916
3922
|
.fully-collapsed .level-1 .item,
|
|
@@ -4011,7 +4017,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4011
4017
|
<slot name="dropdown"></slot>
|
|
4012
4018
|
</div>
|
|
4013
4019
|
</div>
|
|
4014
|
-
`}}t([it({type:Boolean})],Wa.prototype,"open",void 0),t([it({type:Number})],Wa.prototype,"arrowSize",void 0),t([it({type:Number})],Wa.prototype,"arrowOffset",void 0),t([it({type:Number})],Wa.prototype,"offsetX",void 0),t([it({type:Number})],Wa.prototype,"offsetY",void 0);class Ga extends tt{constructor(){super(...arguments),this.index=0}static get styles(){return r`
|
|
4020
|
+
`}}t([it({type:Boolean})],Wa.prototype,"open",void 0),t([it({type:Number})],Wa.prototype,"arrowSize",void 0),t([it({type:Number})],Wa.prototype,"arrowOffset",void 0),t([it({type:Number})],Wa.prototype,"offsetX",void 0),t([it({type:Number})],Wa.prototype,"offsetY",void 0);class Ga extends tt{constructor(){super(...arguments),this.collapses=!1,this.index=0}static get styles(){return r`
|
|
4015
4021
|
:host {
|
|
4016
4022
|
display: flex;
|
|
4017
4023
|
flex-direction: column;
|
|
@@ -4023,6 +4029,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4023
4029
|
}
|
|
4024
4030
|
|
|
4025
4031
|
.tab {
|
|
4032
|
+
user-select: none;
|
|
4026
4033
|
padding: 0.5em 1em;
|
|
4027
4034
|
margin: 0em 0em;
|
|
4028
4035
|
cursor: pointer;
|
|
@@ -4034,10 +4041,39 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4034
4041
|
border: 0px solid rgba(0, 0, 0, 0.45);
|
|
4035
4042
|
color: var(--color-text-dark);
|
|
4036
4043
|
--icon-color: var(--color-text-dark);
|
|
4044
|
+
white-space: nowrap;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
.tab.hidden {
|
|
4048
|
+
display: none;
|
|
4037
4049
|
}
|
|
4038
4050
|
|
|
4039
4051
|
.tab temba-icon {
|
|
4052
|
+
}
|
|
4053
|
+
|
|
4054
|
+
.tab .name {
|
|
4055
|
+
margin-left: 0.4em;
|
|
4056
|
+
max-width: 80px;
|
|
4040
4057
|
margin-right: 0.4em;
|
|
4058
|
+
overflow: hidden;
|
|
4059
|
+
transition: max-width 500ms ease-in-out;
|
|
4060
|
+
}
|
|
4061
|
+
|
|
4062
|
+
.tab .badge {
|
|
4063
|
+
margin-left: 0.4em;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
4066
|
+
@media (max-width: 900px) {
|
|
4067
|
+
.collapses .tab .name {
|
|
4068
|
+
max-width: 0px;
|
|
4069
|
+
margin: 0;
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
@media (max-width: 600px) {
|
|
4074
|
+
.collapses .tab .badge {
|
|
4075
|
+
display: none;
|
|
4076
|
+
}
|
|
4041
4077
|
}
|
|
4042
4078
|
|
|
4043
4079
|
.tab.selected {
|
|
@@ -4062,7 +4098,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4062
4098
|
}
|
|
4063
4099
|
|
|
4064
4100
|
.badge {
|
|
4065
|
-
margin-left: 0.4em;
|
|
4066
4101
|
}
|
|
4067
4102
|
|
|
4068
4103
|
.count {
|
|
@@ -4081,16 +4116,18 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4081
4116
|
color: #fff;
|
|
4082
4117
|
}
|
|
4083
4118
|
`}handleTabClick(t){this.index=parseInt(t.currentTarget.dataset.index),this.requestUpdate("index"),this.fireEvent(de.ContextChanged)}updated(t){if(super.updated(t),t.has("index")&&this.children.length>this.index)for(let t=0;t<this.children.length;t++){const e=this.children[t];e.selected=t==this.index,e.selected?e.style.display="flex":e.style.display="none"}}getTab(t){return this.children.item(t)}render(){const t=[];for(const e of this.children)t.push(e);return O`
|
|
4084
|
-
<div
|
|
4119
|
+
<div
|
|
4120
|
+
class="tabs ${Gt({tabs:!0,collapses:this.collapses})}"
|
|
4121
|
+
>
|
|
4085
4122
|
${t.map(((t,e)=>O`
|
|
4086
4123
|
<div
|
|
4087
4124
|
@click=${this.handleTabClick}
|
|
4088
4125
|
data-index=${e}
|
|
4089
|
-
class="
|
|
4126
|
+
class="${Gt({tab:!0,selected:e==this.index,hidden:t.hidden,notify:t.notify})}"
|
|
4090
4127
|
style="${t.selectionColor&&e==this.index?`color:${t.selectionColor};--icon-color:${t.selectionColor};`:""} ${t.selectionBackground&&e==this.index?`background-color:${t.selectionBackground};`:""}"
|
|
4091
4128
|
>
|
|
4092
4129
|
${t.icon?O`<temba-icon name=${t.icon} />`:null}
|
|
4093
|
-
|
|
4130
|
+
<div class="name">${t.name}</div>
|
|
4094
4131
|
${t.hasBadge()?O`
|
|
4095
4132
|
<div class="badge">
|
|
4096
4133
|
${t.count>0?O`<div class="count">${t.count}</div>`:null}
|
|
@@ -4102,7 +4139,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4102
4139
|
<div class="pane ${0===this.index?"first":null}">
|
|
4103
4140
|
<slot></slot>
|
|
4104
4141
|
</div>
|
|
4105
|
-
`}}t([it({type:Number})],Ga.prototype,"index",void 0);class Ya extends tt{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.count=0}static get styles(){return r`
|
|
4142
|
+
`}}t([it({type:Boolean})],Ga.prototype,"collapses",void 0),t([it({type:Number})],Ga.prototype,"index",void 0);class Ya extends tt{constructor(){super(...arguments),this.selected=!1,this.notify=!1,this.hidden=!1,this.count=0}static get styles(){return r`
|
|
4106
4143
|
:host {
|
|
4107
4144
|
display: flex;
|
|
4108
4145
|
flex-direction: column;
|
|
@@ -4121,7 +4158,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4121
4158
|
}
|
|
4122
4159
|
`}hasBadge(){return this.count>0}render(){return O`<slot
|
|
4123
4160
|
class="${Gt({selected:this.selected})}"
|
|
4124
|
-
></slot> `}}t([it({type:String})],Ya.prototype,"name",void 0),t([it({type:String})],Ya.prototype,"icon",void 0),t([it({type:String})],Ya.prototype,"selectionColor",void 0),t([it({type:String})],Ya.prototype,"selectionBackground",void 0),t([it({type:Boolean})],Ya.prototype,"selected",void 0),t([it({type:Boolean})],Ya.prototype,"notify",void 0),t([it({type:Number})],Ya.prototype,"count",void 0);class Ka extends X{static get styles(){return r`
|
|
4161
|
+
></slot> `}}t([it({type:String})],Ya.prototype,"name",void 0),t([it({type:String})],Ya.prototype,"icon",void 0),t([it({type:String})],Ya.prototype,"selectionColor",void 0),t([it({type:String})],Ya.prototype,"selectionBackground",void 0),t([it({type:Boolean})],Ya.prototype,"selected",void 0),t([it({type:Boolean})],Ya.prototype,"notify",void 0),t([it({type:Boolean})],Ya.prototype,"hidden",void 0),t([it({type:Number})],Ya.prototype,"count",void 0);class Ka extends X{static get styles(){return r`
|
|
4125
4162
|
:host {
|
|
4126
4163
|
display: inline-block;
|
|
4127
4164
|
}
|
|
@@ -4618,17 +4655,16 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4618
4655
|
${this.data.map((t=>this.renderEvent(t)))}
|
|
4619
4656
|
`:O`<slot name="empty"></slot>`}}t([it({type:String})],nl.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],nl.prototype,"data",void 0),t([it({type:String})],nl.prototype,"lang_weekly",void 0),t([it({type:String})],nl.prototype,"lang_daily",void 0),t([it({type:String})],nl.prototype,"lang_once",void 0);class ol extends ga{static get styles(){return r`
|
|
4620
4657
|
:host {
|
|
4621
|
-
|
|
4622
|
-
color: #fff;
|
|
4623
|
-
--icon-color: #fff;
|
|
4624
|
-
border-radius: var(--curvature);
|
|
4658
|
+
padding: 1em;
|
|
4625
4659
|
}
|
|
4626
4660
|
|
|
4627
4661
|
:hover {
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
.ticket:hover {
|
|
4631
4665
|
cursor: pointer;
|
|
4666
|
+
box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.055),
|
|
4667
|
+
0 0 0px 2px var(--color-link-primary);
|
|
4632
4668
|
}
|
|
4633
4669
|
|
|
4634
4670
|
.tickets {
|
|
@@ -4661,26 +4697,19 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4661
4697
|
}
|
|
4662
4698
|
|
|
4663
4699
|
.ticket > div {
|
|
4664
|
-
padding: 1em;
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
.ticket .action {
|
|
4668
|
-
background: rgba(0, 0, 0, 0.1);
|
|
4669
|
-
border-top-right-radius: var(--curvature);
|
|
4670
|
-
border-bottom-right-radius: var(--curvature);
|
|
4671
|
-
padding: 1.5em;
|
|
4672
|
-
--icon-color: rgba(0, 0, 0, 0.4);
|
|
4673
|
-
white-space: nowrap;
|
|
4700
|
+
padding: 0.5em 1em;
|
|
4701
|
+
pointer-events: none;
|
|
4674
4702
|
}
|
|
4675
4703
|
|
|
4676
|
-
.
|
|
4677
|
-
|
|
4704
|
+
.status {
|
|
4705
|
+
--icon-color: #999;
|
|
4678
4706
|
}
|
|
4679
4707
|
|
|
4680
|
-
.closed
|
|
4681
|
-
background: #
|
|
4708
|
+
.ticket.closed {
|
|
4709
|
+
background: #f9f9f9;
|
|
4710
|
+
color: #888;
|
|
4682
4711
|
}
|
|
4683
|
-
`}prepareData(t){return t&&t.length&&t.sort(((t,e)=>new Date(t.opened_on).getTime()-new Date(
|
|
4712
|
+
`}prepareData(t){return t&&t.length&&t.sort(((t,e)=>t.status==ue.Open&&e.status==ue.Closed?-1:e.status==ue.Open&&t.status==ue.Closed?1:t.status==ue.Closed&&e.status==ue.Closed?new Date(e.closed_on).getTime()-new Date(t.closed_on).getTime():new Date(e.opened_on).getTime()-new Date(t.opened_on).getTime())),t}updated(t){super.updated(t),t.has("contact")&&(this.contact?this.url=`/api/v2/tickets.json?contact=${this.contact}`:this.url=null)}renderTicket(t){const e=t.status===ue.Open?t.opened_on:t.closed_on;return O`
|
|
4684
4713
|
<div
|
|
4685
4714
|
class="ticket ${t.status}"
|
|
4686
4715
|
href="/ticket/all/open/${t.uuid}"
|
|
@@ -4695,47 +4724,31 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4695
4724
|
</temba-tip>
|
|
4696
4725
|
</div>
|
|
4697
4726
|
|
|
4698
|
-
${t.status===ue.
|
|
4699
|
-
<
|
|
4700
|
-
|
|
4701
|
-
</div>
|
|
4702
|
-
`:O`
|
|
4703
|
-
<div class="action">
|
|
4704
|
-
<temba-icon name="check" size="1.5"></temba-icon>
|
|
4705
|
-
</div>
|
|
4706
|
-
`}
|
|
4727
|
+
${t.status===ue.Closed?O`<div class="status">
|
|
4728
|
+
<temba-icon name="check"></temba-icon>
|
|
4729
|
+
</div>`:null}
|
|
4707
4730
|
</div>
|
|
4708
|
-
`}render(){if(this.data&&this.data.length>0){const t=this.data.
|
|
4709
|
-
<div
|
|
4710
|
-
class="tickets"
|
|
4711
|
-
href="/ticket/all/open/${t.uuid}"
|
|
4712
|
-
onclick="goto(event)"
|
|
4713
|
-
>
|
|
4714
|
-
<div style="flex-grow:1"></div>
|
|
4715
|
-
<temba-icon name="agent" style="pointer-events: none;"></temba-icon>
|
|
4716
|
-
<div class="count" style="pointer-events: none;">
|
|
4717
|
-
${this.data.filter((t=>t.status===ue.Open)).length}
|
|
4718
|
-
</div>
|
|
4719
|
-
</div>
|
|
4720
|
-
`}}}t([it({type:String})],ol.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],ol.prototype,"data",void 0);class rl extends ot{constructor(){super(...arguments),this.min=0,this.max=100,this.circleX=0,this.grabbed=!1,this.left=0,this.gap=0}static get styles(){return r`
|
|
4731
|
+
`}render(){if(this.data&&this.data.length>0){const t=this.data.map((t=>this.renderTicket(t)));return O`${t}`}return O`<slot name="empty"></slot>`}}t([it({type:String})],ol.prototype,"contact",void 0),t([it({type:Object,attribute:!1})],ol.prototype,"data",void 0);class rl extends ot{constructor(){super(...arguments),this.range=!1,this.min=0,this.max=100,this.circleX=0,this.grabbed=!1}static get styles(){return r`
|
|
4721
4732
|
:host {
|
|
4722
4733
|
display: block;
|
|
4723
4734
|
}
|
|
4724
4735
|
|
|
4725
4736
|
.track {
|
|
4726
|
-
height:
|
|
4727
|
-
border:
|
|
4737
|
+
height: 2px;
|
|
4738
|
+
border-top: 0.5em solid #fff;
|
|
4739
|
+
border-bottom: 0.5em solid #fff;
|
|
4728
4740
|
background: #ddd;
|
|
4741
|
+
flex-grow: 1;
|
|
4729
4742
|
}
|
|
4730
4743
|
|
|
4731
4744
|
.circle {
|
|
4732
|
-
margin-
|
|
4733
|
-
margin-left:
|
|
4745
|
+
margin-bottom: -1.05em;
|
|
4746
|
+
margin-left: -0.5em;
|
|
4734
4747
|
width: 0.75em;
|
|
4735
4748
|
height: 0.75em;
|
|
4736
4749
|
border: 2px solid #999;
|
|
4737
4750
|
border-radius: 999px;
|
|
4738
|
-
position:
|
|
4751
|
+
position: relative;
|
|
4739
4752
|
background: #fff;
|
|
4740
4753
|
box-shadow: 0 0 0 4px rgb(255, 255, 255);
|
|
4741
4754
|
transition: transform 200ms ease-in-out;
|
|
@@ -4750,10 +4763,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4750
4763
|
cursor: pointer;
|
|
4751
4764
|
}
|
|
4752
4765
|
|
|
4753
|
-
.grabbed .circle {
|
|
4754
|
-
// border-color: #777;
|
|
4755
|
-
}
|
|
4756
|
-
|
|
4757
4766
|
.grabbed .circle {
|
|
4758
4767
|
border-color: var(--color-primary-dark);
|
|
4759
4768
|
background: #fff;
|
|
@@ -4762,14 +4771,30 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
|
|
|
4762
4771
|
.grabbed .circle {
|
|
4763
4772
|
transform: scale(1.2);
|
|
4764
4773
|
}
|
|
4765
|
-
|
|
4774
|
+
|
|
4775
|
+
.wrapper {
|
|
4776
|
+
display: flex;
|
|
4777
|
+
align-items: center;
|
|
4778
|
+
}
|
|
4779
|
+
|
|
4780
|
+
.pre,
|
|
4781
|
+
.post {
|
|
4782
|
+
font-size: 0.9em;
|
|
4783
|
+
color: #999;
|
|
4784
|
+
padding: 0em 1em;
|
|
4785
|
+
}
|
|
4786
|
+
`}firstUpdated(t){super.firstUpdated(t),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}updated(t){t.has("value")&&this.updateCircle()}updateValue(t){const e=this.shadowRoot.querySelector(".track"),i=(t.pageX-e.offsetLeft)/e.offsetWidth,n=(this.max-this.min)*i+this.min;this.value=""+Math.max(this.min,Math.min(Math.round(n),this.max))}handleMouseMove(t){this.grabbed&&this.updateValue(t)}handleTrackDown(t){this.grabbed=!0,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),document.querySelector("html").classList.add("dragging"),this.updateValue(t),this.requestUpdate()}handleMouseUp(t){this.grabbed=!1,this.updateValue(t),this.requestUpdate(),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.querySelector("html").classList.remove("dragging")}updateCircle(){const t=this.shadowRoot.querySelector(".track"),e=this.shadowRoot.querySelector(".pre"),i=this.max-this.min,n=(parseInt(this.value)-this.min)/i,o=t.offsetWidth*n;this.circleX=o+(e?e.offsetWidth:0),this.requestUpdate()}render(){return O` <div class="${Gt({grabbed:this.grabbed})}">
|
|
4766
4787
|
<div
|
|
4767
4788
|
style=${ut({left:this.circleX+"px"})}
|
|
4768
4789
|
class="circle"
|
|
4769
4790
|
@mousedown=${this.handleTrackDown}
|
|
4770
4791
|
></div>
|
|
4771
|
-
<div class="
|
|
4772
|
-
|
|
4792
|
+
<div class="wrapper">
|
|
4793
|
+
${this.range?O`<div class="pre">${this.min}</div>`:null}
|
|
4794
|
+
<div class="track" @mousedown=${this.handleTrackDown}></div>
|
|
4795
|
+
${this.range?O`<div class="post">${this.max}</div>`:null}
|
|
4796
|
+
</div>
|
|
4797
|
+
</div>`}}function sl(t,e){window.customElements.get(t)||window.customElements.define(t,e)}t([it({type:Boolean})],rl.prototype,"range",void 0),t([it({type:Number})],rl.prototype,"min",void 0),t([it({type:Number})],rl.prototype,"max",void 0),sl("temba-anchor",Va),sl("temba-alert",Ia),sl("temba-store",dr),sl("temba-textinput",Ht),sl("temba-completion",ea),sl("temba-checkbox",rt),sl("temba-select",ta),sl("temba-options",pr),sl("temba-loading",sa),sl("temba-button",oa),sl("temba-omnibox",Fa),sl("temba-tip",Za),sl("temba-contact-name",Ja),sl("temba-contact-field",tl),sl("temba-contact-fields",Qa),sl("temba-urn",Xa),sl("temba-field",ra),sl("temba-dialog",na),sl("temba-modax",ia),sl("temba-charcount",fa),sl("temba-contact-history",Aa),sl("temba-contact-chat",ya),sl("temba-contact-details",Pa),sl("temba-ticket-list",Oa),sl("temba-list",La),sl("temba-label",Ka),sl("temba-menu",Ua),sl("temba-contact-search",Na),sl("temba-icon",za),sl("temba-dropdown",Wa),sl("temba-tabs",Ga),sl("temba-tab",Ya),sl("temba-contact-groups",class extends va{static get styles(){return r`
|
|
4773
4798
|
temba-label {
|
|
4774
4799
|
margin: 0.3em;
|
|
4775
4800
|
}
|
package/dist/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return t[e]||(r=new Promise(async r=>{if("document"in self){const t=document.createElement("script");t.src=e,document.head.appendChild(t),t.onload=r}else importScripts(e),r()})),r.then(()=>{if(!t[e])throw new Error(`Module ${e} didn’t register its module`);return t[e]})},r=(r,t)=>{Promise.all(r.map(e)).then(e=>t(1===e.length?e[0]:e))},t={require:Promise.resolve(r)};self.define=(r,s,o)=>{t[r]||(t[r]=Promise.resolve().then(()=>{let t={};const n={uri:location.origin+r.slice(1)};return Promise.all(s.map(r=>{switch(r){case"exports":return t;case"module":return n;default:return e(r)}})).then(e=>{const r=o(...e);return t.default||(t.default=r),t})}))}}define("./sw.js",["./workbox-80efdfd1"],(function(e){"use strict";e.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"
|
|
1
|
+
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return t[e]||(r=new Promise(async r=>{if("document"in self){const t=document.createElement("script");t.src=e,document.head.appendChild(t),t.onload=r}else importScripts(e),r()})),r.then(()=>{if(!t[e])throw new Error(`Module ${e} didn’t register its module`);return t[e]})},r=(r,t)=>{Promise.all(r.map(e)).then(e=>t(1===e.length?e[0]:e))},t={require:Promise.resolve(r)};self.define=(r,s,o)=>{t[r]||(t[r]=Promise.resolve().then(()=>{let t={};const n={uri:location.origin+r.slice(1)};return Promise.all(s.map(r=>{switch(r){case"exports":return t;case"module":return n;default:return e(r)}})).then(e=>{const r=o(...e);return t.default||(t.default=r),t})}))}}define("./sw.js",["./workbox-80efdfd1"],(function(e){"use strict";e.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"2cd62ab6.js",revision:"6be3cd43fd3d857e70e9292a23f276ca"},{url:"templates/components-body.html",revision:"834a188365fcab2dbfde6a842168a3e2"},{url:"templates/components-head.html",revision:"8ecd863328b72a5b4209cbc50c271866"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
|
|
2
2
|
//# sourceMappingURL=sw.js.map
|
package/dist/sw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sw.js","sources":["../../../../../tmp/
|
|
1
|
+
{"version":3,"file":"sw.js","sources":["../../../../../tmp/278e96265a24a5029920c55cf0d9eb8a/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {skipWaiting as workbox_core_skipWaiting} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/skipWaiting.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/home/runner/work/temba-components/temba-components/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nworkbox_core_skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"2cd62ab6.js\",\n \"revision\": \"6be3cd43fd3d857e70e9292a23f276ca\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"834a188365fcab2dbfde6a842168a3e2\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"8ecd863328b72a5b4209cbc50c271866\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"k1BAmCoC,CAClC,KACS,uBACK,oCAEd,KACS,0CACK,oCAEd,KACS,0CACK,qCAEb,oBAE2B,IAAIA,kBAAgCC,0BAA2C,iCAG/E,iBAAkB,IAAIC,aAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/
|
|
1
|
+
<script type="module" src="{{STATIC_URL}}@nyaruka/temba-components/dist/2cd62ab6.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.28.2"</script>
|