@nyaruka/temba-components 0.64.1 → 0.65.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.
- package/.github/workflows/build.yml +4 -0
- package/CHANGELOG.md +20 -1
- package/dist/{43489c4a.js → 8ce5c6c3.js} +30 -27
- package/dist/index.js +30 -27
- 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/compose/Compose.js +8 -5
- package/out-tsc/src/compose/Compose.js.map +1 -1
- package/out-tsc/src/contacts/ContactChat.js +5 -16
- package/out-tsc/src/contacts/ContactChat.js.map +1 -1
- package/out-tsc/src/contacts/ContactHistory.js +10 -6
- package/out-tsc/src/contacts/ContactHistory.js.map +1 -1
- package/out-tsc/src/contacts/events.js +14 -2
- package/out-tsc/src/contacts/events.js.map +1 -1
- package/out-tsc/src/fields/FieldManager.js +1 -0
- package/out-tsc/src/fields/FieldManager.js.map +1 -1
- package/out-tsc/src/tabpane/TabPane.js +5 -2
- package/out-tsc/src/tabpane/TabPane.js.map +1 -1
- package/out-tsc/test/temba-contact-details.test.js +2 -2
- package/out-tsc/test/temba-contact-details.test.js.map +1 -1
- package/out-tsc/test/temba-contact-fields.test.js +3 -3
- package/out-tsc/test/temba-contact-fields.test.js.map +1 -1
- package/out-tsc/test/temba-datepicker.test.js +4 -4
- package/out-tsc/test/temba-datepicker.test.js.map +1 -1
- package/package.json +1 -1
- package/screenshots/truth/contacts/compose-attachments-no-text-failure.png +0 -0
- package/screenshots/truth/contacts/compose-attachments-no-text-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-generic.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text-and-attachments.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-failure-text.png +0 -0
- package/screenshots/truth/contacts/compose-text-and-attachments-success.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-failure.png +0 -0
- package/screenshots/truth/contacts/compose-text-no-attachments-success.png +0 -0
- package/screenshots/truth/contacts/contact-active-default.png +0 -0
- package/screenshots/truth/contacts/contact-active-show-chatbox.png +0 -0
- package/screenshots/truth/contacts/contact-archived-hide-chatbox.png +0 -0
- package/screenshots/truth/contacts/contact-blocked-hide-chatbox.png +0 -0
- package/screenshots/truth/contacts/contact-stopped-hide-chatbox.png +0 -0
- package/src/compose/Compose.ts +8 -5
- package/src/contacts/ContactChat.ts +6 -17
- package/src/contacts/ContactHistory.ts +14 -12
- package/src/contacts/events.ts +16 -3
- package/src/fields/FieldManager.ts +1 -0
- package/src/tabpane/TabPane.ts +5 -2
- package/test/temba-contact-details.test.ts +1 -1
- package/test/temba-contact-fields.test.ts +2 -2
- package/test/temba-datepicker.test.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v0.65.1](https://github.com/nyaruka/temba-components/compare/v0.65.0...v0.65.1)
|
|
8
|
+
|
|
9
|
+
- Customizable compose styling [`#386`](https://github.com/nyaruka/temba-components/pull/386)
|
|
10
|
+
- Temp removal assertinos with tz name [`6ba7fe9`](https://github.com/nyaruka/temba-components/commit/6ba7fe95e4bf32d2bd4d305e914c5b84f81a158b)
|
|
11
|
+
- Set timezone for build [`1d9b73b`](https://github.com/nyaruka/temba-components/commit/1d9b73b5ddc43c98b81a1ef652e5c9725aa28b22)
|
|
12
|
+
- Match correct OS for github build [`a277f7d`](https://github.com/nyaruka/temba-components/commit/a277f7d732a40d3a477266acc83866a189cda21d)
|
|
13
|
+
|
|
14
|
+
#### [v0.65.0](https://github.com/nyaruka/temba-components/compare/v0.64.1...v0.65.0)
|
|
15
|
+
|
|
16
|
+
> 11 December 2023
|
|
17
|
+
|
|
18
|
+
- Add queued treatment for messages, allow updating most recent message [`#385`](https://github.com/nyaruka/temba-components/pull/385)
|
|
19
|
+
|
|
7
20
|
#### [v0.64.1](https://github.com/nyaruka/temba-components/compare/v0.64.0...v0.64.1)
|
|
8
21
|
|
|
22
|
+
> 23 November 2023
|
|
23
|
+
|
|
9
24
|
- Improve extraction of initials for avatars [`#383`](https://github.com/nyaruka/temba-components/pull/383)
|
|
10
25
|
- Improve non-ascii support in extractInitials [`2f291cd`](https://github.com/nyaruka/temba-components/commit/2f291cd0400cce84ae7657c19578db680f451660)
|
|
11
26
|
|
|
@@ -104,12 +119,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
104
119
|
- Fix reading created_by for msg events [`#364`](https://github.com/nyaruka/temba-components/pull/364)
|
|
105
120
|
- Add logical icon names for optin and optout [`#365`](https://github.com/nyaruka/temba-components/pull/365)
|
|
106
121
|
|
|
107
|
-
#### [v0.58.8](https://github.com/nyaruka/temba-components/compare/v0.58.
|
|
122
|
+
#### [v0.58.8](https://github.com/nyaruka/temba-components/compare/v0.58.7...v0.58.8)
|
|
108
123
|
|
|
109
124
|
> 28 September 2023
|
|
110
125
|
|
|
111
126
|
- Update publish.yml [`7dc7d69`](https://github.com/nyaruka/temba-components/commit/7dc7d69822942b39c3b35e06846cfd4c65108b2d)
|
|
112
127
|
|
|
128
|
+
#### [v0.58.7](https://github.com/nyaruka/temba-components/compare/v0.58.6...v0.58.7)
|
|
129
|
+
|
|
130
|
+
> 28 September 2023
|
|
131
|
+
|
|
113
132
|
#### [v0.58.6](https://github.com/nyaruka/temba-components/compare/v0.58.5...v0.58.6)
|
|
114
133
|
|
|
115
134
|
> 28 September 2023
|
|
@@ -1703,34 +1703,26 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1703
1703
|
/ ${this.segments}${t?D`+`:null}
|
|
1704
1704
|
<div></div>
|
|
1705
1705
|
</div>`:null}</div> ${n}</div></div>`}}t([ct({type:String})],Xa.prototype,"text",void 0),t([ct({type:Number})],Xa.prototype,"count",void 0),t([ct({type:Number,attribute:!1})],Xa.prototype,"segments",void 0),t([ct({type:Object,attribute:!1})],Xa.prototype,"extended",void 0);class Qa extends lt{constructor(){super(...arguments),this.showLoading=!1}prepareData(t){return t}refresh(){this.store.makeRequest(this.url,{prepareData:this.prepareData,force:!0})}handleStoreUpdated(t){this.store.initialHttpComplete.then((()=>{if(t.detail.url===this.url){const e=this.data;this.data=t.detail.data,this.fireCustomEvent(ke.Refreshed,{data:t.detail.data,previous:e})}}))}updated(t){super.updated(t),t.has("url")&&(this.url?this.store.makeRequest(this.url,{prepareData:this.prepareData}):this.data=null)}connectedCallback(){super.connectedCallback(),this.store=document.querySelector("temba-store"),this.handleStoreUpdated=this.handleStoreUpdated.bind(this),this.prepareData=this.prepareData.bind(this),this.store&&this.store.addEventListener(ke.StoreUpdated,this.handleStoreUpdated)}disconnectedCallback(){super.disconnectedCallback(),this.store&&this.store.removeEventListener(ke.StoreUpdated,this.handleStoreUpdated)}render(){if(!this.store.ready&&this.showLoading)return D`<temba-loading></temba-loading>`}}t([ct({type:String})],Qa.prototype,"url",void 0),t([ct({type:Boolean})],Qa.prototype,"showLoading",void 0),t([ct({type:Object,attribute:!1})],Qa.prototype,"data",void 0);class tl extends Qa{constructor(){super(...arguments),this.endpoint="/api/v2/contacts.json?uuid="}prepareData(t){return t&&t.length>0?((t=t[0]).groups.forEach((t=>{t.is_dynamic=this.store.isDynamicGroup(t.uuid)})),t.groups.sort(((t,e)=>{if(!t.is_dynamic||!e.is_dynamic){if(t.is_dynamic)return-1;if(e.is_dynamic)return 1}return t.name.localeCompare(e.name)})),t):null}setContact(t){this.data=this.prepareData([t]),this.store.updateCache(`${this.endpoint}${this.contact}`,this.data)}updated(t){super.updated(t),t.has("contact")&&(this.contact?this.url=`${this.endpoint}${this.contact}`:this.url=null)}}t([ct({type:String})],tl.prototype,"contact",void 0),t([ct({type:Object,attribute:!1})],tl.prototype,"data",void 0),t([ct({type:String})],tl.prototype,"endpoint",void 0);class el extends tl{static get styles(){return r`
|
|
1706
|
-
.left-pane {
|
|
1707
|
-
box-shadow: -13px 10px 7px 14px rgba(0, 0, 0, 0);
|
|
1708
|
-
transition: box-shadow 600ms linear;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
.left-pane.open {
|
|
1712
|
-
z-index: 1000;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
1706
|
:host {
|
|
1716
1707
|
flex-grow: 1;
|
|
1717
1708
|
display: flex;
|
|
1718
1709
|
flex-direction: row;
|
|
1719
1710
|
min-height: 0;
|
|
1720
|
-
|
|
1711
|
+
--compose-shadow: none;
|
|
1712
|
+
--compose-border: none;
|
|
1713
|
+
--compose-padding: 3px;
|
|
1714
|
+
--compose-curvature: none;
|
|
1721
1715
|
}
|
|
1722
1716
|
|
|
1723
1717
|
.chat-wrapper {
|
|
1724
1718
|
display: flex;
|
|
1725
1719
|
flex-grow: 1;
|
|
1726
1720
|
flex-direction: column;
|
|
1727
|
-
background: #e9e9e9;
|
|
1728
|
-
|
|
1729
1721
|
min-height: 0;
|
|
1730
1722
|
}
|
|
1731
1723
|
|
|
1732
1724
|
temba-contact-history {
|
|
1733
|
-
border-bottom:
|
|
1725
|
+
border-bottom: 2px solid #f6f6f6;
|
|
1734
1726
|
flex-grow: 1;
|
|
1735
1727
|
display: flex;
|
|
1736
1728
|
flex-direction: column;
|
|
@@ -1738,11 +1730,8 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1738
1730
|
}
|
|
1739
1731
|
|
|
1740
1732
|
.chatbox {
|
|
1741
|
-
padding: 0.8em;
|
|
1742
1733
|
display: flex;
|
|
1743
1734
|
flex-direction: column;
|
|
1744
|
-
border-bottom-left-radius: var(--curvature);
|
|
1745
|
-
border-bottom-right-radius: var(--curvature);
|
|
1746
1735
|
}
|
|
1747
1736
|
|
|
1748
1737
|
.chatbox.full {
|
|
@@ -1819,11 +1808,14 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1819
1808
|
class="broadcast"
|
|
1820
1809
|
name="${pt.broadcast}"
|
|
1821
1810
|
></temba-icon>`),t.recipient_count>1&&s.push(D`<div class="recipients">${t.recipient_count} contacts</div>`),s.push(D`<div class="separator">•</div>`)),t.optin&&s.push(D`<div class="optin">${t.optin.name}</div>
|
|
1822
|
-
<div class="separator">•</div>`),s.push(D`<temba-date
|
|
1811
|
+
<div class="separator">•</div>`),"Q"===t.status&&s.push(D`<div>Queued</div>`),s.push(D`<temba-date
|
|
1823
1812
|
class="time"
|
|
1824
1813
|
value="${t.created_on}"
|
|
1825
1814
|
display="duration"
|
|
1826
|
-
></temba-date>`),D`<div
|
|
1815
|
+
></temba-date>`),D`<div
|
|
1816
|
+
style="display:flex;align-items:flex-start"
|
|
1817
|
+
class=${ee({queued:"Q"===t.status})}
|
|
1818
|
+
>
|
|
1827
1819
|
<div style="display:flex;flex-direction:column">
|
|
1828
1820
|
<div
|
|
1829
1821
|
class="${t.msg.text?"":"no-message"} attachments-${(t.msg.attachments||[]).length} ${ee({msg:!0,automated:!i&&!t.created_by})}"
|
|
@@ -1869,7 +1861,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1869
1861
|
|
|
1870
1862
|
<div
|
|
1871
1863
|
class="msg-summary"
|
|
1872
|
-
style="flex-direction:row${i?"-reverse":""}"
|
|
1864
|
+
style="align-items:center;flex-direction:row${i?"-reverse":""}"
|
|
1873
1865
|
>
|
|
1874
1866
|
<div style="flex-grow:1"></div>
|
|
1875
1867
|
${s}
|
|
@@ -2111,6 +2103,10 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
2111
2103
|
background: var(--color-automated) !important;
|
|
2112
2104
|
}
|
|
2113
2105
|
|
|
2106
|
+
.queued {
|
|
2107
|
+
opacity: 0.3;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2114
2110
|
.optin_requested {
|
|
2115
2111
|
--icon-color: var(--color-primary-dark);
|
|
2116
2112
|
}
|
|
@@ -2458,7 +2454,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
2458
2454
|
.attachment img {
|
|
2459
2455
|
cursor: pointer;
|
|
2460
2456
|
}
|
|
2461
|
-
`}firstUpdated(t){super.firstUpdated(t),this.handleClose=this.handleClose.bind(this)}updated(t){if(super.updated(t),t.has("mostRecentEvent")&&t.get("mostRecentEvent")&&this.mostRecentEvent&&this.fireCustomEvent(ke.Refreshed),t.has("endDate")&&this.refreshTimeout&&this.endDate&&window.clearTimeout(this.refreshTimeout),t.has("uuid"))if(null==this.uuid)this.reset();else{const t=`/contact/history/${this.uuid}/?_format=json`;if(this.endpoint!==t){if(this.reset(),this.endDate){const t=new Date(this.endDate);this.nextBefore=1e3*t.getTime()+1e3}this.endpoint=t,this.refreshTickets()}}if(t.has("ticket")&&(this.endpoint=null,this.requestUpdate("uuid")),t.has("refreshing")&&this.refreshing&&this.endpoint&&!this.endDate){const t=1e3*(this.getLastEventTime()-1);let e=!1;nl(!1,this.endpoint,this.ticket,null,t).then((t=>{t.events&&t.events.length>0&&this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}}));
|
|
2457
|
+
`}firstUpdated(t){super.firstUpdated(t),this.handleClose=this.handleClose.bind(this)}updated(t){if(super.updated(t),t.has("mostRecentEvent")&&t.get("mostRecentEvent")&&this.mostRecentEvent&&this.fireCustomEvent(ke.Refreshed),t.has("endDate")&&this.refreshTimeout&&this.endDate&&window.clearTimeout(this.refreshTimeout),t.has("uuid"))if(null==this.uuid)this.reset();else{const t=`/contact/history/${this.uuid}/?_format=json`;if(this.endpoint!==t){if(this.reset(),this.endDate){const t=new Date(this.endDate);this.nextBefore=1e3*t.getTime()+1e3}this.endpoint=t,this.refreshTickets()}}if(t.has("ticket")&&(this.endpoint=null,this.requestUpdate("uuid")),t.has("refreshing")&&this.refreshing&&this.endpoint&&!this.endDate){const t=1e3*(this.getLastEventTime()-1);let e=!1;nl(!1,this.endpoint,this.ticket,null,t).then((t=>{t.events&&t.events.length>0&&this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}}));const i=t.events.reverse();let n=0;this.eventGroups.forEach((t=>{const e=t.events.length;t.events=t.events.filter((t=>!i.find((e=>t.created_on==e.created_on&&t.type===e.type)))),n+=e-t.events.length})),this.lastRefreshAdded=i.length-n;const o=[...this.eventGroups];if(this.eventGroups.length>0){const t=o.splice(o.length-1,1)[0];e=t.open,i.splice(0,0,...t.events)}const s=this.getEventGroups(i);s.length&&(e&&(s[s.length-1].open=e),this.eventGroups=[...o,...s]),this.refreshing=!1,this.scheduleRefresh()})).catch((()=>{this.refreshing=!1,this.scheduleRefresh()}))}if(t.has("fetching")&&this.fetching&&(this.nextBefore||(this.nextBefore=1e3*(new Date).getTime()-1e3),this.httpComplete=nl(this.empty,this.endpoint,this.ticket,this.nextBefore,this.nextAfter).then((t=>{t.events&&t.events.length>0&&(this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}})));let e=!1;const i=t.events?t.events.reverse():[];if(this.eventGroups.length>0){const t=this.eventGroups.splice(0,1)[0];e=t.open,i.push(...t.events)}const n=this.getEventGroups(i);n.length&&(e&&(n[n.length-1].open=e),this.eventGroups=[...n,...this.eventGroups]),t.next_before===this.nextBefore&&(this.complete=!0),this.nextBefore=t.next_before,this.nextAfter=t.next_after,this.fetching=!1,this.empty=!1}))),t.has("refreshing")&&!this.refreshing&&this.lastRefreshAdded>0){const t=this.getEventsPane();if(this.lastHeight>0){const e=t.scrollHeight-this.lastHeight;t.scrollHeight-t.scrollTop-e-t.clientHeight<500?this.scrollToBottom():this.showMessageAlert=!0}this.eventGroups.length>0&&(this.lastHeight=t.scrollHeight)}if(t.has("fetching")&&!this.fetching&&void 0!==t.get("fetching")){const t=this.getEventsPane();if(this.lastHeight&&t.scrollHeight>this.lastHeight){const e=t.scrollTop+t.scrollHeight-this.lastHeight;t.scrollTop=e}this.lastHeight||this.scrollToBottom(),this.eventGroups.length>0&&(this.lastHeight=t.scrollHeight)}t.has("endpoint")&&this.endpoint&&(this.fetching=!0,this.empty=!0)}refreshTickets(){if(this.ticket){let t=`/api/v2/tickets.json?contact=${this.uuid}`;this.ticket&&(t=`${t}&ticket=${this.ticket}`),se(t).then((t=>{this.tickets=t.reverse()}))}}getEventsPane(){return this.getDiv(".events")}scrollToBottom(t=!1){const e=this.getEventsPane();e.scrollTo({top:e.scrollHeight,behavior:t?"smooth":"auto"}),this.showMessageAlert=!1,window.setTimeout((()=>{e.scrollTo({top:e.scrollHeight,behavior:t?"smooth":"auto"})}),0)}refresh(){this.scheduleRefresh(500)}getEventGroups(t){const e=[];let i;for(const n of t){const t=rl(n,this.ticket);i&&i.type===t?i.events.push(n):(i&&e.push(i),i={open:!1,events:[n],type:t})}return i&&i.events.length>0&&e.push(i),e}scheduleRefresh(t=-1){if(this.endDate)return;let e=t;if(-1===t){const t=this.getLastEventTime();e=Math.max(Math.min(((new Date).getTime()-t)/2,1e4),500)}t>-1&&this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=window.setTimeout((()=>{this.refreshing?(this.scheduleRefresh(),this.refreshing=!1):this.refreshing=!0}),e)}reset(){this.endpoint=null,this.tickets=null,this.ticketEvents={},this.eventGroups=[],this.fetching=!1,this.complete=!1,this.nextBefore=null,this.nextAfter=null,this.lastHeight=0}handleEventGroupShow(t){const e=t.currentTarget,i=parseInt(e.getAttribute("data-group-index"));this.eventGroups[this.eventGroups.length-i-1].open=!0,this.requestUpdate("eventGroups")}handleEventGroupHide(t){t.preventDefault(),t.stopPropagation();const e=t.currentTarget,i=parseInt(e.getAttribute("data-group-index"));this.eventGroups[this.eventGroups.length-i-1].open=!1,this.requestUpdate("eventGroups")}handleScroll(){this.getEventsPane().scrollTop<=100&&this.eventGroups.length>0&&!this.fetching&&!this.complete&&(this.fetching=!0)}updateMostRecent(t){this.mostRecentEvent&&this.mostRecentEvent.type===t.type&&this.mostRecentEvent.created_on===t.created_on||(this.mostRecentEvent=t)}getLastEventTime(){const t=this.eventGroups[this.eventGroups.length-1];if(t){const e=t.events[t.events.length-1];return new Date(e.created_on).getTime()}return 0}renderEvent(t){switch(t.type){case sl.IVR_CREATED:case sl.MESSAGE_CREATED:case sl.MESSAGE_RECEIVED:case sl.BROADCAST_CREATED:return ll(t,this.agent);case sl.FLOW_ENTERED:case sl.FLOW_EXITED:return(t=>{let e="Interrupted",i=pt.flow_interrupted;return"I"!==t.status&&(t.type===sl.FLOW_ENTERED?(e="Started",i=pt.flow):(e="Completed",i=pt.flow)),D`
|
|
2462
2458
|
<temba-icon name="${i}"></temba-icon>
|
|
2463
2459
|
<div class="description">
|
|
2464
2460
|
${e}
|
|
@@ -4056,8 +4052,11 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
4056
4052
|
flex-grow: 1;
|
|
4057
4053
|
background: var(--focused-tab-color, #fff);
|
|
4058
4054
|
border-radius: var(--curvature);
|
|
4059
|
-
box-shadow:
|
|
4060
|
-
|
|
4055
|
+
box-shadow: var(
|
|
4056
|
+
--tabs-shadow,
|
|
4057
|
+
rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
|
|
4058
|
+
rgba(0, 0, 0, 0.03) 0px 1px 2px 0px
|
|
4059
|
+
);
|
|
4061
4060
|
min-height: 0;
|
|
4062
4061
|
}
|
|
4063
4062
|
|
|
@@ -5546,6 +5545,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5546
5545
|
.other-fields {
|
|
5547
5546
|
flex-grow: 2;
|
|
5548
5547
|
min-height: 0px;
|
|
5548
|
+
margin-bottom: 0px;
|
|
5549
5549
|
}
|
|
5550
5550
|
|
|
5551
5551
|
temba-textinput {
|
|
@@ -5857,9 +5857,9 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5857
5857
|
|
|
5858
5858
|
border-radius: var(--curvature-widget);
|
|
5859
5859
|
background: var(--color-widget-bg);
|
|
5860
|
-
border: 1px solid var(--color-widget-border);
|
|
5860
|
+
border: var(--compose-border, 1px solid var(--color-widget-border));
|
|
5861
5861
|
transition: all ease-in-out var(--transition-speed);
|
|
5862
|
-
box-shadow: var(--widget-box-shadow);
|
|
5862
|
+
box-shadow: var(--compose-shadow, var(--widget-box-shadow));
|
|
5863
5863
|
caret-color: var(--input-caret);
|
|
5864
5864
|
}
|
|
5865
5865
|
|
|
@@ -5873,8 +5873,6 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5873
5873
|
right: 0;
|
|
5874
5874
|
background: rgba(210, 243, 184, 0.8);
|
|
5875
5875
|
border-radius: var(--curvature-widget);
|
|
5876
|
-
margin: -0.5em;
|
|
5877
|
-
padding: 0.5em;
|
|
5878
5876
|
transition: opacity ease-in-out var(--transition-speed);
|
|
5879
5877
|
display: flex;
|
|
5880
5878
|
align-items: center;
|
|
@@ -5897,8 +5895,13 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5897
5895
|
|
|
5898
5896
|
.chatbox {
|
|
5899
5897
|
--color-widget-border: none;
|
|
5900
|
-
--curvature-widget: var(
|
|
5898
|
+
--curvature-widget: var(
|
|
5899
|
+
--compose-curvature,
|
|
5900
|
+
var(--curvature) var(--curvature) 0px 0px
|
|
5901
|
+
);
|
|
5901
5902
|
--textarea-min-height: 4em;
|
|
5903
|
+
--widget-box-shadow: none;
|
|
5904
|
+
padding: var(--compose-padding, 0px);
|
|
5902
5905
|
}
|
|
5903
5906
|
|
|
5904
5907
|
.attachments {
|
package/dist/index.js
CHANGED
|
@@ -1703,34 +1703,26 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1703
1703
|
/ ${this.segments}${t?D`+`:null}
|
|
1704
1704
|
<div></div>
|
|
1705
1705
|
</div>`:null}</div> ${n}</div></div>`}}t([ct({type:String})],Xa.prototype,"text",void 0),t([ct({type:Number})],Xa.prototype,"count",void 0),t([ct({type:Number,attribute:!1})],Xa.prototype,"segments",void 0),t([ct({type:Object,attribute:!1})],Xa.prototype,"extended",void 0);class Qa extends lt{constructor(){super(...arguments),this.showLoading=!1}prepareData(t){return t}refresh(){this.store.makeRequest(this.url,{prepareData:this.prepareData,force:!0})}handleStoreUpdated(t){this.store.initialHttpComplete.then((()=>{if(t.detail.url===this.url){const e=this.data;this.data=t.detail.data,this.fireCustomEvent(ke.Refreshed,{data:t.detail.data,previous:e})}}))}updated(t){super.updated(t),t.has("url")&&(this.url?this.store.makeRequest(this.url,{prepareData:this.prepareData}):this.data=null)}connectedCallback(){super.connectedCallback(),this.store=document.querySelector("temba-store"),this.handleStoreUpdated=this.handleStoreUpdated.bind(this),this.prepareData=this.prepareData.bind(this),this.store&&this.store.addEventListener(ke.StoreUpdated,this.handleStoreUpdated)}disconnectedCallback(){super.disconnectedCallback(),this.store&&this.store.removeEventListener(ke.StoreUpdated,this.handleStoreUpdated)}render(){if(!this.store.ready&&this.showLoading)return D`<temba-loading></temba-loading>`}}t([ct({type:String})],Qa.prototype,"url",void 0),t([ct({type:Boolean})],Qa.prototype,"showLoading",void 0),t([ct({type:Object,attribute:!1})],Qa.prototype,"data",void 0);class tl extends Qa{constructor(){super(...arguments),this.endpoint="/api/v2/contacts.json?uuid="}prepareData(t){return t&&t.length>0?((t=t[0]).groups.forEach((t=>{t.is_dynamic=this.store.isDynamicGroup(t.uuid)})),t.groups.sort(((t,e)=>{if(!t.is_dynamic||!e.is_dynamic){if(t.is_dynamic)return-1;if(e.is_dynamic)return 1}return t.name.localeCompare(e.name)})),t):null}setContact(t){this.data=this.prepareData([t]),this.store.updateCache(`${this.endpoint}${this.contact}`,this.data)}updated(t){super.updated(t),t.has("contact")&&(this.contact?this.url=`${this.endpoint}${this.contact}`:this.url=null)}}t([ct({type:String})],tl.prototype,"contact",void 0),t([ct({type:Object,attribute:!1})],tl.prototype,"data",void 0),t([ct({type:String})],tl.prototype,"endpoint",void 0);class el extends tl{static get styles(){return r`
|
|
1706
|
-
.left-pane {
|
|
1707
|
-
box-shadow: -13px 10px 7px 14px rgba(0, 0, 0, 0);
|
|
1708
|
-
transition: box-shadow 600ms linear;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
.left-pane.open {
|
|
1712
|
-
z-index: 1000;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
1706
|
:host {
|
|
1716
1707
|
flex-grow: 1;
|
|
1717
1708
|
display: flex;
|
|
1718
1709
|
flex-direction: row;
|
|
1719
1710
|
min-height: 0;
|
|
1720
|
-
|
|
1711
|
+
--compose-shadow: none;
|
|
1712
|
+
--compose-border: none;
|
|
1713
|
+
--compose-padding: 3px;
|
|
1714
|
+
--compose-curvature: none;
|
|
1721
1715
|
}
|
|
1722
1716
|
|
|
1723
1717
|
.chat-wrapper {
|
|
1724
1718
|
display: flex;
|
|
1725
1719
|
flex-grow: 1;
|
|
1726
1720
|
flex-direction: column;
|
|
1727
|
-
background: #e9e9e9;
|
|
1728
|
-
|
|
1729
1721
|
min-height: 0;
|
|
1730
1722
|
}
|
|
1731
1723
|
|
|
1732
1724
|
temba-contact-history {
|
|
1733
|
-
border-bottom:
|
|
1725
|
+
border-bottom: 2px solid #f6f6f6;
|
|
1734
1726
|
flex-grow: 1;
|
|
1735
1727
|
display: flex;
|
|
1736
1728
|
flex-direction: column;
|
|
@@ -1738,11 +1730,8 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1738
1730
|
}
|
|
1739
1731
|
|
|
1740
1732
|
.chatbox {
|
|
1741
|
-
padding: 0.8em;
|
|
1742
1733
|
display: flex;
|
|
1743
1734
|
flex-direction: column;
|
|
1744
|
-
border-bottom-left-radius: var(--curvature);
|
|
1745
|
-
border-bottom-right-radius: var(--curvature);
|
|
1746
1735
|
}
|
|
1747
1736
|
|
|
1748
1737
|
.chatbox.full {
|
|
@@ -1819,11 +1808,14 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1819
1808
|
class="broadcast"
|
|
1820
1809
|
name="${pt.broadcast}"
|
|
1821
1810
|
></temba-icon>`),t.recipient_count>1&&s.push(D`<div class="recipients">${t.recipient_count} contacts</div>`),s.push(D`<div class="separator">•</div>`)),t.optin&&s.push(D`<div class="optin">${t.optin.name}</div>
|
|
1822
|
-
<div class="separator">•</div>`),s.push(D`<temba-date
|
|
1811
|
+
<div class="separator">•</div>`),"Q"===t.status&&s.push(D`<div>Queued</div>`),s.push(D`<temba-date
|
|
1823
1812
|
class="time"
|
|
1824
1813
|
value="${t.created_on}"
|
|
1825
1814
|
display="duration"
|
|
1826
|
-
></temba-date>`),D`<div
|
|
1815
|
+
></temba-date>`),D`<div
|
|
1816
|
+
style="display:flex;align-items:flex-start"
|
|
1817
|
+
class=${ee({queued:"Q"===t.status})}
|
|
1818
|
+
>
|
|
1827
1819
|
<div style="display:flex;flex-direction:column">
|
|
1828
1820
|
<div
|
|
1829
1821
|
class="${t.msg.text?"":"no-message"} attachments-${(t.msg.attachments||[]).length} ${ee({msg:!0,automated:!i&&!t.created_by})}"
|
|
@@ -1869,7 +1861,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
1869
1861
|
|
|
1870
1862
|
<div
|
|
1871
1863
|
class="msg-summary"
|
|
1872
|
-
style="flex-direction:row${i?"-reverse":""}"
|
|
1864
|
+
style="align-items:center;flex-direction:row${i?"-reverse":""}"
|
|
1873
1865
|
>
|
|
1874
1866
|
<div style="flex-grow:1"></div>
|
|
1875
1867
|
${s}
|
|
@@ -2111,6 +2103,10 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
2111
2103
|
background: var(--color-automated) !important;
|
|
2112
2104
|
}
|
|
2113
2105
|
|
|
2106
|
+
.queued {
|
|
2107
|
+
opacity: 0.3;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2114
2110
|
.optin_requested {
|
|
2115
2111
|
--icon-color: var(--color-primary-dark);
|
|
2116
2112
|
}
|
|
@@ -2458,7 +2454,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
2458
2454
|
.attachment img {
|
|
2459
2455
|
cursor: pointer;
|
|
2460
2456
|
}
|
|
2461
|
-
`}firstUpdated(t){super.firstUpdated(t),this.handleClose=this.handleClose.bind(this)}updated(t){if(super.updated(t),t.has("mostRecentEvent")&&t.get("mostRecentEvent")&&this.mostRecentEvent&&this.fireCustomEvent(ke.Refreshed),t.has("endDate")&&this.refreshTimeout&&this.endDate&&window.clearTimeout(this.refreshTimeout),t.has("uuid"))if(null==this.uuid)this.reset();else{const t=`/contact/history/${this.uuid}/?_format=json`;if(this.endpoint!==t){if(this.reset(),this.endDate){const t=new Date(this.endDate);this.nextBefore=1e3*t.getTime()+1e3}this.endpoint=t,this.refreshTickets()}}if(t.has("ticket")&&(this.endpoint=null,this.requestUpdate("uuid")),t.has("refreshing")&&this.refreshing&&this.endpoint&&!this.endDate){const t=1e3*(this.getLastEventTime()-1);let e=!1;nl(!1,this.endpoint,this.ticket,null,t).then((t=>{t.events&&t.events.length>0&&this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}}));
|
|
2457
|
+
`}firstUpdated(t){super.firstUpdated(t),this.handleClose=this.handleClose.bind(this)}updated(t){if(super.updated(t),t.has("mostRecentEvent")&&t.get("mostRecentEvent")&&this.mostRecentEvent&&this.fireCustomEvent(ke.Refreshed),t.has("endDate")&&this.refreshTimeout&&this.endDate&&window.clearTimeout(this.refreshTimeout),t.has("uuid"))if(null==this.uuid)this.reset();else{const t=`/contact/history/${this.uuid}/?_format=json`;if(this.endpoint!==t){if(this.reset(),this.endDate){const t=new Date(this.endDate);this.nextBefore=1e3*t.getTime()+1e3}this.endpoint=t,this.refreshTickets()}}if(t.has("ticket")&&(this.endpoint=null,this.requestUpdate("uuid")),t.has("refreshing")&&this.refreshing&&this.endpoint&&!this.endDate){const t=1e3*(this.getLastEventTime()-1);let e=!1;nl(!1,this.endpoint,this.ticket,null,t).then((t=>{t.events&&t.events.length>0&&this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}}));const i=t.events.reverse();let n=0;this.eventGroups.forEach((t=>{const e=t.events.length;t.events=t.events.filter((t=>!i.find((e=>t.created_on==e.created_on&&t.type===e.type)))),n+=e-t.events.length})),this.lastRefreshAdded=i.length-n;const o=[...this.eventGroups];if(this.eventGroups.length>0){const t=o.splice(o.length-1,1)[0];e=t.open,i.splice(0,0,...t.events)}const s=this.getEventGroups(i);s.length&&(e&&(s[s.length-1].open=e),this.eventGroups=[...o,...s]),this.refreshing=!1,this.scheduleRefresh()})).catch((()=>{this.refreshing=!1,this.scheduleRefresh()}))}if(t.has("fetching")&&this.fetching&&(this.nextBefore||(this.nextBefore=1e3*(new Date).getTime()-1e3),this.httpComplete=nl(this.empty,this.endpoint,this.ticket,this.nextBefore,this.nextAfter).then((t=>{t.events&&t.events.length>0&&(this.updateMostRecent(t.events[0]),t.events.forEach((t=>{if(t.type===sl.TICKET_OPENED){const e=t;this.ticketEvents[e.ticket.uuid]=e}})));let e=!1;const i=t.events?t.events.reverse():[];if(this.eventGroups.length>0){const t=this.eventGroups.splice(0,1)[0];e=t.open,i.push(...t.events)}const n=this.getEventGroups(i);n.length&&(e&&(n[n.length-1].open=e),this.eventGroups=[...n,...this.eventGroups]),t.next_before===this.nextBefore&&(this.complete=!0),this.nextBefore=t.next_before,this.nextAfter=t.next_after,this.fetching=!1,this.empty=!1}))),t.has("refreshing")&&!this.refreshing&&this.lastRefreshAdded>0){const t=this.getEventsPane();if(this.lastHeight>0){const e=t.scrollHeight-this.lastHeight;t.scrollHeight-t.scrollTop-e-t.clientHeight<500?this.scrollToBottom():this.showMessageAlert=!0}this.eventGroups.length>0&&(this.lastHeight=t.scrollHeight)}if(t.has("fetching")&&!this.fetching&&void 0!==t.get("fetching")){const t=this.getEventsPane();if(this.lastHeight&&t.scrollHeight>this.lastHeight){const e=t.scrollTop+t.scrollHeight-this.lastHeight;t.scrollTop=e}this.lastHeight||this.scrollToBottom(),this.eventGroups.length>0&&(this.lastHeight=t.scrollHeight)}t.has("endpoint")&&this.endpoint&&(this.fetching=!0,this.empty=!0)}refreshTickets(){if(this.ticket){let t=`/api/v2/tickets.json?contact=${this.uuid}`;this.ticket&&(t=`${t}&ticket=${this.ticket}`),se(t).then((t=>{this.tickets=t.reverse()}))}}getEventsPane(){return this.getDiv(".events")}scrollToBottom(t=!1){const e=this.getEventsPane();e.scrollTo({top:e.scrollHeight,behavior:t?"smooth":"auto"}),this.showMessageAlert=!1,window.setTimeout((()=>{e.scrollTo({top:e.scrollHeight,behavior:t?"smooth":"auto"})}),0)}refresh(){this.scheduleRefresh(500)}getEventGroups(t){const e=[];let i;for(const n of t){const t=rl(n,this.ticket);i&&i.type===t?i.events.push(n):(i&&e.push(i),i={open:!1,events:[n],type:t})}return i&&i.events.length>0&&e.push(i),e}scheduleRefresh(t=-1){if(this.endDate)return;let e=t;if(-1===t){const t=this.getLastEventTime();e=Math.max(Math.min(((new Date).getTime()-t)/2,1e4),500)}t>-1&&this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=window.setTimeout((()=>{this.refreshing?(this.scheduleRefresh(),this.refreshing=!1):this.refreshing=!0}),e)}reset(){this.endpoint=null,this.tickets=null,this.ticketEvents={},this.eventGroups=[],this.fetching=!1,this.complete=!1,this.nextBefore=null,this.nextAfter=null,this.lastHeight=0}handleEventGroupShow(t){const e=t.currentTarget,i=parseInt(e.getAttribute("data-group-index"));this.eventGroups[this.eventGroups.length-i-1].open=!0,this.requestUpdate("eventGroups")}handleEventGroupHide(t){t.preventDefault(),t.stopPropagation();const e=t.currentTarget,i=parseInt(e.getAttribute("data-group-index"));this.eventGroups[this.eventGroups.length-i-1].open=!1,this.requestUpdate("eventGroups")}handleScroll(){this.getEventsPane().scrollTop<=100&&this.eventGroups.length>0&&!this.fetching&&!this.complete&&(this.fetching=!0)}updateMostRecent(t){this.mostRecentEvent&&this.mostRecentEvent.type===t.type&&this.mostRecentEvent.created_on===t.created_on||(this.mostRecentEvent=t)}getLastEventTime(){const t=this.eventGroups[this.eventGroups.length-1];if(t){const e=t.events[t.events.length-1];return new Date(e.created_on).getTime()}return 0}renderEvent(t){switch(t.type){case sl.IVR_CREATED:case sl.MESSAGE_CREATED:case sl.MESSAGE_RECEIVED:case sl.BROADCAST_CREATED:return ll(t,this.agent);case sl.FLOW_ENTERED:case sl.FLOW_EXITED:return(t=>{let e="Interrupted",i=pt.flow_interrupted;return"I"!==t.status&&(t.type===sl.FLOW_ENTERED?(e="Started",i=pt.flow):(e="Completed",i=pt.flow)),D`
|
|
2462
2458
|
<temba-icon name="${i}"></temba-icon>
|
|
2463
2459
|
<div class="description">
|
|
2464
2460
|
${e}
|
|
@@ -4056,8 +4052,11 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
4056
4052
|
flex-grow: 1;
|
|
4057
4053
|
background: var(--focused-tab-color, #fff);
|
|
4058
4054
|
border-radius: var(--curvature);
|
|
4059
|
-
box-shadow:
|
|
4060
|
-
|
|
4055
|
+
box-shadow: var(
|
|
4056
|
+
--tabs-shadow,
|
|
4057
|
+
rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
|
|
4058
|
+
rgba(0, 0, 0, 0.03) 0px 1px 2px 0px
|
|
4059
|
+
);
|
|
4061
4060
|
min-height: 0;
|
|
4062
4061
|
}
|
|
4063
4062
|
|
|
@@ -5546,6 +5545,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5546
5545
|
.other-fields {
|
|
5547
5546
|
flex-grow: 2;
|
|
5548
5547
|
min-height: 0px;
|
|
5548
|
+
margin-bottom: 0px;
|
|
5549
5549
|
}
|
|
5550
5550
|
|
|
5551
5551
|
temba-textinput {
|
|
@@ -5857,9 +5857,9 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5857
5857
|
|
|
5858
5858
|
border-radius: var(--curvature-widget);
|
|
5859
5859
|
background: var(--color-widget-bg);
|
|
5860
|
-
border: 1px solid var(--color-widget-border);
|
|
5860
|
+
border: var(--compose-border, 1px solid var(--color-widget-border));
|
|
5861
5861
|
transition: all ease-in-out var(--transition-speed);
|
|
5862
|
-
box-shadow: var(--widget-box-shadow);
|
|
5862
|
+
box-shadow: var(--compose-shadow, var(--widget-box-shadow));
|
|
5863
5863
|
caret-color: var(--input-caret);
|
|
5864
5864
|
}
|
|
5865
5865
|
|
|
@@ -5873,8 +5873,6 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5873
5873
|
right: 0;
|
|
5874
5874
|
background: rgba(210, 243, 184, 0.8);
|
|
5875
5875
|
border-radius: var(--curvature-widget);
|
|
5876
|
-
margin: -0.5em;
|
|
5877
|
-
padding: 0.5em;
|
|
5878
5876
|
transition: opacity ease-in-out var(--transition-speed);
|
|
5879
5877
|
display: flex;
|
|
5880
5878
|
align-items: center;
|
|
@@ -5897,8 +5895,13 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
|
|
|
5897
5895
|
|
|
5898
5896
|
.chatbox {
|
|
5899
5897
|
--color-widget-border: none;
|
|
5900
|
-
--curvature-widget: var(
|
|
5898
|
+
--curvature-widget: var(
|
|
5899
|
+
--compose-curvature,
|
|
5900
|
+
var(--curvature) var(--curvature) 0px 0px
|
|
5901
|
+
);
|
|
5901
5902
|
--textarea-min-height: 4em;
|
|
5903
|
+
--widget-box-shadow: none;
|
|
5904
|
+
padding: var(--compose-padding, 0px);
|
|
5902
5905
|
}
|
|
5903
5906
|
|
|
5904
5907
|
.attachments {
|
package/dist/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const
|
|
1
|
+
if(!self.define){let e,t={};const o=(o,n)=>(o=new URL(o+".js",n).href,t[o]||new Promise((t=>{if("document"in self){const e=document.createElement("script");e.src=o,e.onload=t,document.head.appendChild(e)}else e=o,importScripts(o),t()})).then((()=>{let e=t[o];if(!e)throw new Error(`Module ${o} didn’t register its module`);return e})));self.define=(n,s)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(t[c])return;let i={};const r=e=>o(e,c),l={module:{uri:c},exports:i,require:r};t[c]=Promise.all(n.map((e=>l[e]||r(e)))).then((e=>(s(...e),i)))}}define(["./workbox-919adfb7"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"8ce5c6c3.js",revision:"80bb9179688fa5e6862e16e935c7be36"},{url:"templates/components-body.html",revision:"28b9952ce7a4f910402c2c05b23a0247"},{url:"templates/components-head.html",revision:"87d5aed8663fc316f3a94cf15fc8fc9c"}],{}),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/3c114796298f3d7a9155b97b44ada345/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/workspaces/temba-components/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/workspaces/temba-components/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/workspaces/temba-components/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/workspaces/temba-components/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/workspaces/temba-components/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/workspaces/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\nself.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\": \"8ce5c6c3.js\",\n \"revision\": \"80bb9179688fa5e6862e16e935c7be36\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"28b9952ce7a4f910402c2c05b23a0247\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"87d5aed8663fc316f3a94cf15fc8fc9c\"\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":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"0nBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,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/8ce5c6c3.js"></script><script>window.TEMBA_COMPONENTS_VERSION="0.65.1"</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/
|
|
1
|
+
<link rel="modulepreload" href="{{STATIC_URL}}@nyaruka/temba-components/dist/8ce5c6c3.js" crossorigin="anonymous">
|
|
@@ -16,9 +16,9 @@ export class Compose extends FormElement {
|
|
|
16
16
|
|
|
17
17
|
border-radius: var(--curvature-widget);
|
|
18
18
|
background: var(--color-widget-bg);
|
|
19
|
-
border: 1px solid var(--color-widget-border);
|
|
19
|
+
border: var(--compose-border, 1px solid var(--color-widget-border));
|
|
20
20
|
transition: all ease-in-out var(--transition-speed);
|
|
21
|
-
box-shadow: var(--widget-box-shadow);
|
|
21
|
+
box-shadow: var(--compose-shadow, var(--widget-box-shadow));
|
|
22
22
|
caret-color: var(--input-caret);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -32,8 +32,6 @@ export class Compose extends FormElement {
|
|
|
32
32
|
right: 0;
|
|
33
33
|
background: rgba(210, 243, 184, 0.8);
|
|
34
34
|
border-radius: var(--curvature-widget);
|
|
35
|
-
margin: -0.5em;
|
|
36
|
-
padding: 0.5em;
|
|
37
35
|
transition: opacity ease-in-out var(--transition-speed);
|
|
38
36
|
display: flex;
|
|
39
37
|
align-items: center;
|
|
@@ -56,8 +54,13 @@ export class Compose extends FormElement {
|
|
|
56
54
|
|
|
57
55
|
.chatbox {
|
|
58
56
|
--color-widget-border: none;
|
|
59
|
-
--curvature-widget: var(
|
|
57
|
+
--curvature-widget: var(
|
|
58
|
+
--compose-curvature,
|
|
59
|
+
var(--curvature) var(--curvature) 0px 0px
|
|
60
|
+
);
|
|
60
61
|
--textarea-min-height: 4em;
|
|
62
|
+
--widget-box-shadow: none;
|
|
63
|
+
padding: var(--compose-padding, 0px);
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
.attachments {
|