@nyaruka/temba-components 0.31.4 → 0.31.7

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{a4ce5e6b.js → 56002f06.js} +92 -15
  3. package/dist/index.js +92 -15
  4. package/dist/static/icons/symbol-defs.svg +7 -3
  5. package/dist/sw.js +1 -1
  6. package/dist/sw.js.map +1 -1
  7. package/dist/templates/components-body.html +1 -1
  8. package/dist/templates/components-head.html +1 -1
  9. package/out-tsc/src/contacts/ContactNameFetch.js +1 -1
  10. package/out-tsc/src/contacts/ContactNameFetch.js.map +1 -1
  11. package/out-tsc/src/contacts/events.js +1 -2
  12. package/out-tsc/src/contacts/events.js.map +1 -1
  13. package/out-tsc/src/dialog/Dialog.js +12 -1
  14. package/out-tsc/src/dialog/Dialog.js.map +1 -1
  15. package/out-tsc/src/interfaces.js.map +1 -1
  16. package/out-tsc/src/list/RunList.js +3 -2
  17. package/out-tsc/src/list/RunList.js.map +1 -1
  18. package/out-tsc/src/list/TembaMenu.js +102 -17
  19. package/out-tsc/src/list/TembaMenu.js.map +1 -1
  20. package/out-tsc/src/tabpane/TabPane.js +6 -0
  21. package/out-tsc/src/tabpane/TabPane.js.map +1 -1
  22. package/out-tsc/src/vectoricon/VectorIcon.js +2 -3
  23. package/out-tsc/src/vectoricon/VectorIcon.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/contacts/ContactNameFetch.ts +1 -1
  26. package/src/contacts/events.ts +1 -2
  27. package/src/dialog/Dialog.ts +12 -1
  28. package/src/interfaces.ts +1 -0
  29. package/src/list/RunList.ts +3 -2
  30. package/src/list/TembaMenu.ts +106 -17
  31. package/src/tabpane/TabPane.ts +6 -0
  32. package/src/vectoricon/VectorIcon.ts +2 -3
  33. package/static/icons/Read Me.txt +1 -1
  34. package/static/icons/SVG/menu-collapse.svg +5 -0
  35. package/static/icons/SVG/zapier.svg +2 -1
  36. package/static/icons/demo-external-svg.html +144 -139
  37. package/static/icons/demo-files/demo.css +4 -4
  38. package/static/icons/demo.html +151 -142
  39. package/static/icons/selection.json +250 -200
  40. package/static/icons/symbol-defs.svg +7 -3
package/CHANGELOG.md CHANGED
@@ -4,8 +4,29 @@ 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.31.7](https://github.com/nyaruka/temba-components/compare/v0.31.6...v0.31.7)
8
+
9
+ - Add collapse icon for TembaMenu [`#199`](https://github.com/nyaruka/temba-components/pull/199)
10
+ - Fix menu selecting first item [`#198`](https://github.com/nyaruka/temba-components/pull/198)
11
+ - Add menu collapse [`6b56603`](https://github.com/nyaruka/temba-components/commit/6b566030f3daaa264c1366fe2be489aba6ad3c38)
12
+ - Only add padding to visible collapse icon [`db926e6`](https://github.com/nyaruka/temba-components/commit/db926e6bba65665a5bf1c8b9d616f9e7a62043d8)
13
+
14
+ #### [v0.31.6](https://github.com/nyaruka/temba-components/compare/v0.31.5...v0.31.6)
15
+
16
+ > 25 August 2022
17
+
18
+ - Use anon_display for name if it is there [`#197`](https://github.com/nyaruka/temba-components/pull/197)
19
+
20
+ #### [v0.31.5](https://github.com/nyaruka/temba-components/compare/v0.31.4...v0.31.5)
21
+
22
+ > 25 August 2022
23
+
24
+ - Add option to override temba-dialog width [`#196`](https://github.com/nyaruka/temba-components/pull/196)
25
+
7
26
  #### [v0.31.4](https://github.com/nyaruka/temba-components/compare/v0.31.3...v0.31.4)
8
27
 
28
+ > 25 August 2022
29
+
9
30
  - Always fire event on tab change, including first selection [`#195`](https://github.com/nyaruka/temba-components/pull/195)
10
31
 
11
32
  #### [v0.31.3](https://github.com/nyaruka/temba-components/compare/v0.31.2...v0.31.3)
@@ -1121,7 +1121,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1121
1121
  <div class="slot-wrapper" @click=${this.handleSlotClicked}>
1122
1122
  <slot></slot>
1123
1123
  </div>
1124
- `}}t([it({type:String})],ia.prototype,"header",void 0),t([it({type:String})],ia.prototype,"endpoint",void 0),t([it({type:Boolean,reflect:!0})],ia.prototype,"open",void 0),t([it({type:Boolean})],ia.prototype,"fetching",void 0),t([it({type:Boolean})],ia.prototype,"submitting",void 0),t([it({type:String})],ia.prototype,"primaryName",void 0),t([it({type:String})],ia.prototype,"cancelName",void 0),t([it({type:String})],ia.prototype,"onLoaded",void 0),t([it({type:Boolean})],ia.prototype,"noSubmit",void 0),t([it({type:Object})],ia.prototype,"headers",void 0),t([it({type:String})],ia.prototype,"body",void 0),t([it({type:Boolean})],ia.prototype,"disabled",void 0),t([it({type:Boolean})],ia.prototype,"suspendSubmit",void 0);class na extends tt{constructor(){super(),this.size="medium",this.primaryButtonName="Ok",this.cancelButtonName="Cancel",this.submittingName="Saving",this.scrollOffset=0}static get widths(){return{small:"400px",medium:"600px",large:"655px"}}static get styles(){return r`
1124
+ `}}t([it({type:String})],ia.prototype,"header",void 0),t([it({type:String})],ia.prototype,"endpoint",void 0),t([it({type:Boolean,reflect:!0})],ia.prototype,"open",void 0),t([it({type:Boolean})],ia.prototype,"fetching",void 0),t([it({type:Boolean})],ia.prototype,"submitting",void 0),t([it({type:String})],ia.prototype,"primaryName",void 0),t([it({type:String})],ia.prototype,"cancelName",void 0),t([it({type:String})],ia.prototype,"onLoaded",void 0),t([it({type:Boolean})],ia.prototype,"noSubmit",void 0),t([it({type:Object})],ia.prototype,"headers",void 0),t([it({type:String})],ia.prototype,"body",void 0),t([it({type:Boolean})],ia.prototype,"disabled",void 0),t([it({type:Boolean})],ia.prototype,"suspendSubmit",void 0);class na extends tt{constructor(){super(),this.size="medium",this.primaryButtonName="Ok",this.cancelButtonName="Cancel",this.width=null,this.submittingName="Saving",this.scrollOffset=0}static get widths(){return{small:"400px",medium:"600px",large:"655px"}}static get styles(){return r`
1125
1125
  :host {
1126
1126
  position: absolute;
1127
1127
  z-index: 10000;
@@ -1249,7 +1249,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1249
1249
  flex-grow: 1;
1250
1250
  text-align: right;
1251
1251
  }
1252
- `}updated(t){if(t.has("open")){const e=document.querySelector("body");if(this.open){this.animationEnd=!0,window.setTimeout((()=>{this.ready=!0,this.animationEnd=!1}),400);const t=window.outerWidth-e.clientWidth;this.scrollOffset=-document.documentElement.scrollTop,e.style.position="fixed",e.style.overflowY="scroll",e.style.top=this.scrollOffset+"px",e.style.width="100%",e.style.overflowY="hidden",e.style.paddingRight=t+"px"}else e.style.position="",e.style.overflowY="",e.style.width="",e.style.marginRight="",e.style.paddingRight="0px",window.scrollTo(0,-1*parseInt(this.scrollOffset||"0"));this.open&&!t.get("open")?(this.shadowRoot.querySelectorAll("temba-button").forEach((t=>{t&&(t.submitting=!1)})),this.noFocus||this.focusFirstInput()):window.setTimeout((()=>{this.ready=!1}),400)}}focusFirstInput(){window.setTimeout((()=>{let t=this.querySelector('temba-textinput, temba-completion, input[type="text"], textarea');t&&(t=t.textInputElement||t.inputElement||t,t.readOnly||(t.focus(),t.click()))}),100)}handleClick(t){const e=t.currentTarget;e.disabled||(this.fireCustomEvent(ue.ButtonClicked,{button:e}),e.name===this.cancelButtonName&&(this.open=!1))}getDocumentHeight(){const t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}clickCancel(){const t=this.getCancelButton();t&&t.click()}getCancelButton(){return this.shadowRoot.querySelector(`temba-button[name='${this.cancelButtonName}']`)}getPrimaryButton(){return this.shadowRoot.querySelector("temba-button[primary]")}handleKeyUp(t){"Escape"===t.key&&this.clickCancel()}handleClickMask(t){if(this.hideOnClick){const e=t.target.id;"dialog-mask"!==e&&"dialog-bg"!==e||(this.fireCustomEvent(ue.DialogHidden),this.clickCancel())}}show(){this.open=!0}hide(){this.open=!1}render(){const t={height:`${this.getDocumentHeight()+100}px`},e={width:na.widths[this.size]},i=this.header?O`
1252
+ `}updated(t){if(t.has("open")){const e=document.querySelector("body");if(this.open){this.animationEnd=!0,window.setTimeout((()=>{this.ready=!0,this.animationEnd=!1}),400);const t=window.outerWidth-e.clientWidth;this.scrollOffset=-document.documentElement.scrollTop,e.style.position="fixed",e.style.overflowY="scroll",e.style.top=this.scrollOffset+"px",e.style.width="100%",e.style.overflowY="hidden",e.style.paddingRight=t+"px"}else e.style.position="",e.style.overflowY="",e.style.width="",e.style.marginRight="",e.style.paddingRight="0px",window.scrollTo(0,-1*parseInt(this.scrollOffset||"0"));this.open&&!t.get("open")?(this.shadowRoot.querySelectorAll("temba-button").forEach((t=>{t&&(t.submitting=!1)})),this.noFocus||this.focusFirstInput()):window.setTimeout((()=>{this.ready=!1}),400)}}focusFirstInput(){window.setTimeout((()=>{let t=this.querySelector('temba-textinput, temba-completion, input[type="text"], textarea');t&&(t=t.textInputElement||t.inputElement||t,t.readOnly||(t.focus(),t.click()))}),100)}handleClick(t){const e=t.currentTarget;e.disabled||(this.fireCustomEvent(ue.ButtonClicked,{button:e}),e.name===this.cancelButtonName&&(this.open=!1))}getDocumentHeight(){const t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}clickCancel(){const t=this.getCancelButton();t&&t.click()}getCancelButton(){return this.shadowRoot.querySelector(`temba-button[name='${this.cancelButtonName}']`)}getPrimaryButton(){return this.shadowRoot.querySelector("temba-button[primary]")}handleKeyUp(t){"Escape"===t.key&&this.clickCancel()}handleClickMask(t){if(this.hideOnClick){const e=t.target.id;"dialog-mask"!==e&&"dialog-bg"!==e||(this.fireCustomEvent(ue.DialogHidden),this.clickCancel())}}show(){this.open=!0}hide(){this.open=!1}render(){const t={height:`${this.getDocumentHeight()+100}px`},e={width:this.width,minWidth:"250px",maxWidth:"600px"};this.width||(e.width=na.widths[this.size]);const i=this.header?O`
1253
1253
  <div class="dialog-header">
1254
1254
  <div class="header-text">${this.header}</div>
1255
1255
  </div>
@@ -1306,7 +1306,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1306
1306
  </div>
1307
1307
  </div>
1308
1308
  </div>
1309
- `}}t([it({type:Boolean})],na.prototype,"open",void 0),t([it()],na.prototype,"header",void 0),t([it()],na.prototype,"body",void 0),t([it({type:Boolean})],na.prototype,"submitting",void 0),t([it({type:Boolean})],na.prototype,"destructive",void 0),t([it({type:Boolean})],na.prototype,"disabled",void 0),t([it({type:Boolean})],na.prototype,"loading",void 0),t([it({type:Boolean})],na.prototype,"hideOnClick",void 0),t([it({type:Boolean})],na.prototype,"noFocus",void 0),t([it()],na.prototype,"size",void 0),t([it({type:String})],na.prototype,"primaryButtonName",void 0),t([it({type:String})],na.prototype,"cancelButtonName",void 0),t([it()],na.prototype,"submittingName",void 0),t([it()],na.prototype,"animationEnd",void 0),t([it()],na.prototype,"ready",void 0),t([it({attribute:!1})],na.prototype,"onButtonClicked",void 0);class oa extends X{constructor(){super(...arguments),this.v=1}static get styles(){return r`
1309
+ `}}t([it({type:Boolean})],na.prototype,"open",void 0),t([it()],na.prototype,"header",void 0),t([it()],na.prototype,"body",void 0),t([it({type:Boolean})],na.prototype,"submitting",void 0),t([it({type:Boolean})],na.prototype,"destructive",void 0),t([it({type:Boolean})],na.prototype,"disabled",void 0),t([it({type:Boolean})],na.prototype,"loading",void 0),t([it({type:Boolean})],na.prototype,"hideOnClick",void 0),t([it({type:Boolean})],na.prototype,"noFocus",void 0),t([it()],na.prototype,"size",void 0),t([it({type:String})],na.prototype,"primaryButtonName",void 0),t([it({type:String})],na.prototype,"cancelButtonName",void 0),t([it({type:String})],na.prototype,"width",void 0),t([it()],na.prototype,"submittingName",void 0),t([it()],na.prototype,"animationEnd",void 0),t([it()],na.prototype,"ready",void 0),t([it({attribute:!1})],na.prototype,"onButtonClicked",void 0);class oa extends X{constructor(){super(...arguments),this.v=1}static get styles(){return r`
1310
1310
  :host {
1311
1311
  display: inline-block;
1312
1312
  font-family: var(--font-family);
@@ -1991,8 +1991,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1991
1991
  ${t.msg.attachments.map((t=>(t=>{const e=t.indexOf(":"),i=t.substr(0,e),n=t.substr(e+1),[o,r]=i.split("/",2);let s=null;if("image"!==o){if("pdf"===r)return O`<div
1992
1992
  style="width:100%;height:300px;border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);overflow:hidden"
1993
1993
  ><embed src="${n}#view=Fit" type="application/pdf" frameBorder="0" scrolling="auto" height="100%" width="100%"></embed></div>`;if("video"===o)return O`<video
1994
- style="border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);"
1995
- max-width="400px"
1994
+ style="border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);max-width:400px"
1996
1995
  height="auto"
1997
1996
  controls
1998
1997
  >
@@ -3297,7 +3296,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3297
3296
  `}}t([it({type:Boolean})],za.prototype,"fetching",void 0),t([it({type:Boolean})],za.prototype,"expanded",void 0),t([it({type:String})],za.prototype,"endpoint",void 0),t([it({type:String})],za.prototype,"placeholder",void 0),t([it({type:String})],za.prototype,"name",void 0),t([it({type:String})],za.prototype,"query",void 0),t([it({type:Number})],za.prototype,"inactiveThreshold",void 0),t([it({type:Number})],za.prototype,"inactiveDays",void 0),t([it({type:Object,attribute:!1})],za.prototype,"summary",void 0),t([it({type:Object,attribute:!1})],za.prototype,"flow",void 0);class Na extends X{constructor(){super(),this.size=1,this.animationDuration=200,this.src="",this.steps=2,this.easing="cubic-bezier(0.68, -0.55, 0.265, 1.55)"}static get styles(){return r`
3298
3297
  :host {
3299
3298
  margin: auto;
3300
- --color1: var(--icon-color);
3301
3299
  }
3302
3300
 
3303
3301
  .sheet {
@@ -3336,7 +3334,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3336
3334
 
3337
3335
  .clickable:hover {
3338
3336
  cursor: pointer;
3339
- fill: var(--color-link-primary);
3337
+ fill: var(--color-link-primary) !important;
3340
3338
  background: rgb(255, 255, 255);
3341
3339
  }
3342
3340
 
@@ -3381,7 +3379,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3381
3379
  class="${Gt({sheet:""===this.src,[this.animateChange]:!!this.animateChange,[this.animateChange+"-"+this.animationStep]:this.animationStep>0,[this.animateClick]:!!this.animateClick,[this.animateClick+"-"+this.animationStep]:this.animationStep>0})}"
3382
3380
  >
3383
3381
  <use
3384
- href="${this.src?this.src:`${this.prefix||window.static_url||"/static/"}icons/symbol-defs.svg?v=14#icon-${this.lastName||this.name||this.id}`}"
3382
+ href="${this.src?this.src:`${this.prefix||window.static_url||"/static/"}icons/symbol-defs.svg?v=15#icon-${this.lastName||this.name||this.id}`}"
3385
3383
  />
3386
3384
  </svg>
3387
3385
  </div>
@@ -3640,6 +3638,9 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3640
3638
  .level-0 > .top {
3641
3639
  padding-top: var(--menu-padding);
3642
3640
  background: var(--color-primary-dark);
3641
+ display: flex;
3642
+ flex-direction: column;
3643
+ align-items: center;
3643
3644
  }
3644
3645
 
3645
3646
  .level-0 > .empty {
@@ -3906,7 +3907,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3906
3907
  }
3907
3908
 
3908
3909
  .fully-collapsed .level-1 {
3909
- margin-left: -217px;
3910
+ margin-left: -208px;
3910
3911
  pointer-events: none;
3911
3912
  border: none;
3912
3913
  overflow: hidden;
@@ -3932,13 +3933,69 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3932
3933
  margin-left: 0.75em;
3933
3934
  margin-right: 0.75em;
3934
3935
  }
3935
- `}setBubble(t,e){const i=Ha(this.root.items,t);return!(!i||!i.item)&&(i.item.bubble=e,this.requestUpdate("root"),!0)}getMenuItemState(t){let e={};return t&&(e=this.state[t],e||(e={},this.state[t]=e)),e}updated(t){t.has("value")&&this.setSelection((this.value||"").split("/")),t.has("submenu")&&!t.has("value")&&this.setSelection([this.submenu]),t.has("endpoint")&&(this.root={level:-1,endpoint:this.endpoint},this.wait||this.loadItems(this.root),this.fireCustomEvent(ue.Ready))}refresh(t=null){t||(t=[...this.selection]);const e=this.getMenuItemForSelection(t);e&&(e.endpoint?this.loadItems(e,!1):(t.pop(),this.refresh(t)))}fireNoPath(t){const e=this.getMenuItem(),i={item:e.id,selection:"/"+this.selection.join("/"),endpoint:e.endpoint,path:t+"/"+this.pending.join("/")+document.location.search},n=this.selection.join("/");n.replace(i.path,""),this.selection=n.split("/"),this.fireCustomEvent(ue.NoPath,i),this.pending=[],this.requestUpdate("root")}loadItems(t,e=!0){t&&t.endpoint&&(t.loading=!0,this.httpComplete=Kt(t.endpoint).then((i=>{if(i.forEach((e=>{e.level=t.level+1,e.items&&e.items.forEach((e=>{e.level=t.level+2}))})),t.items=i,t.loading=!1,this.requestUpdate("root"),this.scrollSelectedIntoView(),this.pending&&this.pending.length>0){const t=this.pending.shift();if(t&&i.length>0){const e=Ha(i,t);e.item?this.handleItemClicked(null,e.item):this.fireNoPath(t)}}else if(e&&i.length>0&&this.selection.length>=1&&!t.inline)for(const t of i)if(!t.type){this.handleItemClicked(null,t);break}})))}handleItemClicked(t,e,i=null){if(i&&i.inline&&this.handleItemClicked(null,i),this.collapsed&&(this.collapsed=!1),t&&(t.preventDefault(),t.stopPropagation()),"modax-button"!=e.type)if(e.trigger)new Function(e.trigger)();else if(e.level,e.level>=this.selection.length?this.selection.push(e.vanity_id||e.id):this.selection.splice(e.level,this.selection.length-e.level,e.vanity_id||e.id),e.endpoint)this.loadItems(e,!e.href),this.dispatchEvent(new Event("change"));else{if(this.pending&&this.pending.length>0){const t=this.pending.shift(),e=this.getMenuItem();if(t&&e&&e.items&&e.items.length>0){const i=Ha(e.items,t).item;i?this.handleItemClicked(null,i):this.fireNoPath(t)}else this.fireNoPath(t)}else this.dispatchEvent(new Event("change"));this.requestUpdate("root")}else this.fireCustomEvent(ue.ButtonClicked,{title:e.name,href:e.href,on_submit:e.on_submit})}scrollSelectedIntoView(){window.setTimeout((()=>{this.shadowRoot.querySelectorAll(".selected").forEach((t=>{t.scrollIntoView({block:"end",behavior:"smooth"})}))}),0)}clickItem(t){const e=[...this.selection];e.splice(e.length-1,1,t);const i=this.getMenuItemForSelection(e);return!!i&&(this.handleItemClicked(null,i),this.scrollSelectedIntoView(),!0)}getMenuItem(){return this.getMenuItemForSelection([...this.selection])}getMenuItemForSelection(t){const e=[...t];let i=this.root.items,n=null;for(;e.length>0;){const t=e.splice(0,1)[0];if(!i)break;if(n=Ha(i,t).item,!n)break;i=n.items}return n}getSelection(){return this.selection}setSelection(t){this.pending=[...t],this.selection=[],this.wait&&(this.wait=!1,this.loadItems(this.root))}setSelectionPath(t){const e=t.split("/").filter((t=>!!t));this.clickItem(e[e.length-1])||(this.wait=!0,this.setSelection(e))}async setFocusedItem(t){const e=t.split("/").filter((t=>!!t));if(e.length>0){if(!Ha(this.root.items,e[0]).item)return}const i=[];let n=this.root;for(;e.length>0;){const t=e.shift();t&&(n.items||(this.loadItems(n,!1),await this.httpComplete),n=Ha(n.items,t).item,n?i.push(t):e.splice(0,e.length))}this.selection=i,this.requestUpdate("root")}isSelected(t){if(t.level<this.selection.length){return this.selection[t.level]==(t.vanity_id||t.id)}return!1}isExpanded(t){return!!this.selection.find((e=>e===t.vanity_id||t.id))}render(){if(!this.root||!this.root.items)return O`<temba-loading
3936
+
3937
+ .expand-icon {
3938
+ transform: rotate(180deg);
3939
+ --icon-color: rgba(255, 255, 255, 0.5);
3940
+ cursor: pointer;
3941
+ max-height: 0px;
3942
+ overflow: hidden;
3943
+ opacity: 0;
3944
+ transition: all 400ms ease-in-out 400ms;
3945
+ }
3946
+
3947
+ .expand-icon:hover {
3948
+ --icon-color: #fff;
3949
+ }
3950
+
3951
+ .fully-collapsed .expand-icon {
3952
+ padding-top: 0.5em;
3953
+ max-height: 2em;
3954
+ opacity: 1;
3955
+ }
3956
+
3957
+ .section-header {
3958
+ display: flex;
3959
+ align-items: center;
3960
+ }
3961
+
3962
+ .section-header .section {
3963
+ flex-grow: 1;
3964
+ }
3965
+
3966
+ .section-header temba-icon {
3967
+ --icon-color: #ddd;
3968
+ cursor: pointer;
3969
+ padding-bottom: 0.5em;
3970
+ padding-right: 0.5em;
3971
+ }
3972
+
3973
+ .section-header temba-icon:hover {
3974
+ --icon-color: var(--color-link-primary);
3975
+ }
3976
+
3977
+ slot[name='header'] {
3978
+ display: none;
3979
+ }
3980
+
3981
+ slot[name='header'].show-header {
3982
+ display: block;
3983
+ }
3984
+ `}setBubble(t,e){const i=Ha(this.root.items,t);return!(!i||!i.item)&&(i.item.bubble=e,this.requestUpdate("root"),!0)}getMenuItemState(t){let e={};return t&&(e=this.state[t],e||(e={},this.state[t]=e)),e}updated(t){t.has("value")&&this.setSelection((this.value||"").split("/")),t.has("submenu")&&!t.has("value")&&this.setSelection([this.submenu]),t.has("endpoint")&&(this.root={level:-1,endpoint:this.endpoint},this.wait||this.loadItems(this.root),this.fireCustomEvent(ue.Ready))}refresh(t=null){t||(t=[...this.selection]);const e=this.getMenuItemForSelection(t);e&&(e.endpoint?this.loadItems(e,!1):(t.pop(),this.refresh(t)))}fireNoPath(t){const e=this.getMenuItem();if(e){const i={item:e.id,selection:"/"+this.selection.join("/"),endpoint:e.endpoint,path:t+"/"+this.pending.join("/")+document.location.search},n=this.selection.join("/");n.replace(i.path,""),this.selection=n.split("/"),this.fireCustomEvent(ue.NoPath,i),this.pending=[],this.requestUpdate("root")}}loadItems(t,e=!0){t&&t.endpoint&&(t.loading=!0,this.httpComplete=Kt(t.endpoint).then((i=>{if(i.forEach((e=>{e.level=t.level+1,e.items&&e.items.forEach((e=>{e.level=t.level+2}))})),t.items=i,t.loading=!1,this.requestUpdate("root"),this.scrollSelectedIntoView(),this.pending&&this.pending.length>0){const t=this.pending.shift();if(t&&i.length>0){const e=Ha(i,t);e.item?this.handleItemClicked(null,e.item):this.fireNoPath(t)}}else if(e&&i.length>0&&this.selection.length>=1&&!t.inline)for(const t of i)if(!t.type){this.handleItemClicked(null,t);break}})))}handleItemClicked(t,e,i=null){if(i&&i.inline&&this.handleItemClicked(null,i),this.collapsed&&(this.collapsed=!1),t&&(t.preventDefault(),t.stopPropagation()),"modax-button"!=e.type)if(e.trigger)new Function(e.trigger)();else if(e.level,e.level>=this.selection.length?this.selection.push(e.vanity_id||e.id):this.selection.splice(e.level,this.selection.length-e.level,e.vanity_id||e.id),e.endpoint)this.loadItems(e,!0),this.dispatchEvent(new Event("change"));else{if(this.pending&&this.pending.length>0){const t=this.pending.shift(),e=this.getMenuItem();if(t&&e&&e.items&&e.items.length>0){const i=Ha(e.items,t).item;i?this.handleItemClicked(null,i):this.fireNoPath(t)}else this.fireNoPath(t)}else this.dispatchEvent(new Event("change"));this.requestUpdate("root")}else this.fireCustomEvent(ue.ButtonClicked,{title:e.name,href:e.href,on_submit:e.on_submit})}scrollSelectedIntoView(){window.setTimeout((()=>{this.shadowRoot.querySelectorAll(".selected").forEach((t=>{t.scrollIntoView({block:"end",behavior:"smooth"})}))}),0)}clickItem(t){const e=[...this.selection];e.splice(e.length-1,1,t);const i=this.getMenuItemForSelection(e);return!!i&&(this.handleItemClicked(null,i),this.scrollSelectedIntoView(),!0)}getMenuItem(){return this.getMenuItemForSelection([...this.selection])}getMenuItemForSelection(t){const e=[...t];let i=this.root.items,n=null;for(;e.length>0;){const t=e.splice(0,1)[0];if(!i)break;if(n=Ha(i,t).item,!n)break;i=n.items}return n}getSelection(){return this.selection}setSelection(t){this.pending=[...t],this.selection=[],this.wait&&(this.wait=!1,this.loadItems(this.root))}setSelectionPath(t){const e=t.split("/").filter((t=>!!t));this.clickItem(e[e.length-1])||(this.wait=!0,this.setSelection(e))}handleExpand(){this.collapsed=!1}handleCollapse(){this.collapsed=!0}async setFocusedItem(t){const e=t.split("/").filter((t=>!!t));if(e.length>0){if(!Ha(this.root.items,e[0]).item)return}const i=[];let n=this.root;for(;e.length>0;){const t=e.shift();t&&(n.items||(this.loadItems(n,!1),await this.httpComplete),n=Ha(n.items,t).item,n?i.push(t):e.splice(0,e.length))}this.selection=i,this.requestUpdate("root")}isSelected(t){if(t.level<this.selection.length){return this.selection[t.level]==(t.vanity_id||t.id)}return!1}isExpanded(t){return!!this.selection.find((e=>e===t.vanity_id||t.id))}render(){if(!this.root||!this.root.items)return O`<temba-loading
3936
3985
  units="3"
3937
3986
  size="10"
3938
3987
  direction="column"
3939
3988
  style="margin:1em;margin-right:0em"
3940
3989
  />`;let t=this.root.items||[];const e=[];e.push(O`<div class="level level-0 ${this.submenu?"hidden":""}">
3941
- <div class="top"></div>
3990
+ <div class="top">
3991
+ <div class="expand-icon" @click=${this.handleExpand}>
3992
+ <temba-icon
3993
+ name="menu-collapse"
3994
+ class="expand"
3995
+ size="1.4"
3996
+ ></temba-icon>
3997
+ </div>
3998
+ </div>
3942
3999
 
3943
4000
  ${t.filter((t=>!t.bottom)).map((t=>this.renderMenuItem(t)))}
3944
4001
 
@@ -3948,7 +4005,21 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3948
4005
  </div>`),this.selection.forEach(((i,n)=>{const o=Ha(t,i).item;let r=!1;if(o){t=o.items;const e=this.getMenuItemState(o.id);e.collapsed?r="collapsed"===e.collapsed:this.selection.length>o.level+2&&(r=!1)}else t=null;t&&t.length>0&&!o.inline&&e.push(O`<div
3949
4006
  class="${Gt({level:!0,["level-"+(n+1)]:!0,collapsed:r})}"
3950
4007
  >
3951
- ${this.submenu?null:O`<div class="section">${o.name}</div>`}
4008
+ ${this.submenu?null:O`
4009
+ <slot
4010
+ class="${Gt({"show-header":o.show_header})}"
4011
+ name="header"
4012
+ ></slot>
4013
+ <div class="section-header">
4014
+ <div class="section">${o.name}</div>
4015
+
4016
+ ${0!=n||this.collapsed?null:O`<temba-icon
4017
+ name="menu-collapse"
4018
+ size="1.1"
4019
+ @click=${this.handleCollapse}
4020
+ ></temba-icon>`}
4021
+ </div>
4022
+ `}
3952
4023
  ${t.map((t=>t.inline&&t.items?O`${this.renderMenuItem(t)}
3953
4024
  <div class="inline-children">
3954
4025
  ${(t.items||[]).map((e=>this.renderMenuItem(e,t)))}
@@ -4023,6 +4094,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4023
4094
 
4024
4095
  .tabs {
4025
4096
  display: flex;
4097
+ padding-left: 0.18em;
4026
4098
  }
4027
4099
 
4028
4100
  .tab {
@@ -4039,6 +4111,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4039
4111
  color: var(--color-text-dark);
4040
4112
  --icon-color: var(--color-text-dark);
4041
4113
  white-space: nowrap;
4114
+ transition: all 100ms ease-in-out;
4042
4115
  }
4043
4116
 
4044
4117
  .tab.hidden {
@@ -4077,6 +4150,8 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4077
4150
  cursor: default;
4078
4151
  box-shadow: 2px 1px 3px 2px rgba(0, 0, 0, 0.07);
4079
4152
  background: #fff;
4153
+ transform: scale(1.05) translateY(-0.05em);
4154
+ z-index: 0;
4080
4155
  }
4081
4156
 
4082
4157
  .pane {
@@ -4088,10 +4163,12 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4088
4163
  box-shadow: 2px 5px 12px 2px rgba(0, 0, 0, 0.09),
4089
4164
  3px 3px 2px 1px rgba(0, 0, 0, 0.05);
4090
4165
  min-height: 0;
4166
+ z-index: 1;
4091
4167
  }
4092
4168
 
4093
4169
  .pane.first {
4094
4170
  border-top-left-radius: 0px;
4171
+ overflow: hidden;
4095
4172
  }
4096
4173
 
4097
4174
  .badge {
@@ -4810,7 +4887,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4810
4887
  style="width: 12em;white-space:nowrap;overflow: hidden; text-overflow: ellipsis;"
4811
4888
  >
4812
4889
  <temba-contact-name
4813
- name=${t.contact.name}
4890
+ name=${t.contact.name||t.contact.anon_display}
4814
4891
  urn=${t.contact.urn}
4815
4892
  icon-size="15"
4816
4893
  />
@@ -4874,7 +4951,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4874
4951
  <div>
4875
4952
  <temba-contact-name
4876
4953
  style="cursor:pointer"
4877
- name=${this.selectedRun.contact.name}
4954
+ name=${this.selectedRun.contact.name||this.selectedRun.contact.anon_display}
4878
4955
  urn=${this.selectedRun.contact.urn}
4879
4956
  onclick="goto(event, this)"
4880
4957
  href="/contact/read/${this.selectedRun.contact.uuid}/"
@@ -4955,7 +5032,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4955
5032
  margin-top: 2px;
4956
5033
  }
4957
5034
  `}render(){if(this.data)return O` <temba-contact-name
4958
- name=${this.data.name}
5035
+ name=${this.data.name||this.data.anon_display}
4959
5036
  urn=${this.data.urns.length>0?this.data.urns[0]:null}
4960
5037
  />
4961
5038
  <slot></slot>`}}function cl(t,e){window.customElements.get(t)||window.customElements.define(t,e)}t([it({type:Number,attribute:"icon-size"})],ll.prototype,"size",void 0),cl("temba-anchor",Va),cl("temba-alert",Ia),cl("temba-store",ur),cl("temba-textinput",Ht),cl("temba-completion",ea),cl("temba-checkbox",rt),cl("temba-select",ta),cl("temba-options",pr),cl("temba-loading",sa),cl("temba-button",oa),cl("temba-omnibox",Fa),cl("temba-tip",Za),cl("temba-contact-name",Ja),cl("temba-contact-name-fetch",ll),cl("temba-contact-field",tl),cl("temba-contact-fields",Qa),cl("temba-urn",Xa),cl("temba-field",ra),cl("temba-dialog",na),cl("temba-modax",ia),cl("temba-charcount",fa),cl("temba-contact-history",Aa),cl("temba-contact-chat",ya),cl("temba-contact-details",Pa),cl("temba-ticket-list",Oa),cl("temba-list",La),cl("temba-run-list",sl),cl("temba-flow-details",al),cl("temba-label",Ka),cl("temba-menu",Ua),cl("temba-contact-search",za),cl("temba-icon",Na),cl("temba-dropdown",Wa),cl("temba-tabs",Ga),cl("temba-tab",Ya),cl("temba-contact-badges",class extends va{static get styles(){return r`
package/dist/index.js CHANGED
@@ -1121,7 +1121,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1121
1121
  <div class="slot-wrapper" @click=${this.handleSlotClicked}>
1122
1122
  <slot></slot>
1123
1123
  </div>
1124
- `}}t([it({type:String})],ia.prototype,"header",void 0),t([it({type:String})],ia.prototype,"endpoint",void 0),t([it({type:Boolean,reflect:!0})],ia.prototype,"open",void 0),t([it({type:Boolean})],ia.prototype,"fetching",void 0),t([it({type:Boolean})],ia.prototype,"submitting",void 0),t([it({type:String})],ia.prototype,"primaryName",void 0),t([it({type:String})],ia.prototype,"cancelName",void 0),t([it({type:String})],ia.prototype,"onLoaded",void 0),t([it({type:Boolean})],ia.prototype,"noSubmit",void 0),t([it({type:Object})],ia.prototype,"headers",void 0),t([it({type:String})],ia.prototype,"body",void 0),t([it({type:Boolean})],ia.prototype,"disabled",void 0),t([it({type:Boolean})],ia.prototype,"suspendSubmit",void 0);class na extends tt{constructor(){super(),this.size="medium",this.primaryButtonName="Ok",this.cancelButtonName="Cancel",this.submittingName="Saving",this.scrollOffset=0}static get widths(){return{small:"400px",medium:"600px",large:"655px"}}static get styles(){return r`
1124
+ `}}t([it({type:String})],ia.prototype,"header",void 0),t([it({type:String})],ia.prototype,"endpoint",void 0),t([it({type:Boolean,reflect:!0})],ia.prototype,"open",void 0),t([it({type:Boolean})],ia.prototype,"fetching",void 0),t([it({type:Boolean})],ia.prototype,"submitting",void 0),t([it({type:String})],ia.prototype,"primaryName",void 0),t([it({type:String})],ia.prototype,"cancelName",void 0),t([it({type:String})],ia.prototype,"onLoaded",void 0),t([it({type:Boolean})],ia.prototype,"noSubmit",void 0),t([it({type:Object})],ia.prototype,"headers",void 0),t([it({type:String})],ia.prototype,"body",void 0),t([it({type:Boolean})],ia.prototype,"disabled",void 0),t([it({type:Boolean})],ia.prototype,"suspendSubmit",void 0);class na extends tt{constructor(){super(),this.size="medium",this.primaryButtonName="Ok",this.cancelButtonName="Cancel",this.width=null,this.submittingName="Saving",this.scrollOffset=0}static get widths(){return{small:"400px",medium:"600px",large:"655px"}}static get styles(){return r`
1125
1125
  :host {
1126
1126
  position: absolute;
1127
1127
  z-index: 10000;
@@ -1249,7 +1249,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1249
1249
  flex-grow: 1;
1250
1250
  text-align: right;
1251
1251
  }
1252
- `}updated(t){if(t.has("open")){const e=document.querySelector("body");if(this.open){this.animationEnd=!0,window.setTimeout((()=>{this.ready=!0,this.animationEnd=!1}),400);const t=window.outerWidth-e.clientWidth;this.scrollOffset=-document.documentElement.scrollTop,e.style.position="fixed",e.style.overflowY="scroll",e.style.top=this.scrollOffset+"px",e.style.width="100%",e.style.overflowY="hidden",e.style.paddingRight=t+"px"}else e.style.position="",e.style.overflowY="",e.style.width="",e.style.marginRight="",e.style.paddingRight="0px",window.scrollTo(0,-1*parseInt(this.scrollOffset||"0"));this.open&&!t.get("open")?(this.shadowRoot.querySelectorAll("temba-button").forEach((t=>{t&&(t.submitting=!1)})),this.noFocus||this.focusFirstInput()):window.setTimeout((()=>{this.ready=!1}),400)}}focusFirstInput(){window.setTimeout((()=>{let t=this.querySelector('temba-textinput, temba-completion, input[type="text"], textarea');t&&(t=t.textInputElement||t.inputElement||t,t.readOnly||(t.focus(),t.click()))}),100)}handleClick(t){const e=t.currentTarget;e.disabled||(this.fireCustomEvent(ue.ButtonClicked,{button:e}),e.name===this.cancelButtonName&&(this.open=!1))}getDocumentHeight(){const t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}clickCancel(){const t=this.getCancelButton();t&&t.click()}getCancelButton(){return this.shadowRoot.querySelector(`temba-button[name='${this.cancelButtonName}']`)}getPrimaryButton(){return this.shadowRoot.querySelector("temba-button[primary]")}handleKeyUp(t){"Escape"===t.key&&this.clickCancel()}handleClickMask(t){if(this.hideOnClick){const e=t.target.id;"dialog-mask"!==e&&"dialog-bg"!==e||(this.fireCustomEvent(ue.DialogHidden),this.clickCancel())}}show(){this.open=!0}hide(){this.open=!1}render(){const t={height:`${this.getDocumentHeight()+100}px`},e={width:na.widths[this.size]},i=this.header?O`
1252
+ `}updated(t){if(t.has("open")){const e=document.querySelector("body");if(this.open){this.animationEnd=!0,window.setTimeout((()=>{this.ready=!0,this.animationEnd=!1}),400);const t=window.outerWidth-e.clientWidth;this.scrollOffset=-document.documentElement.scrollTop,e.style.position="fixed",e.style.overflowY="scroll",e.style.top=this.scrollOffset+"px",e.style.width="100%",e.style.overflowY="hidden",e.style.paddingRight=t+"px"}else e.style.position="",e.style.overflowY="",e.style.width="",e.style.marginRight="",e.style.paddingRight="0px",window.scrollTo(0,-1*parseInt(this.scrollOffset||"0"));this.open&&!t.get("open")?(this.shadowRoot.querySelectorAll("temba-button").forEach((t=>{t&&(t.submitting=!1)})),this.noFocus||this.focusFirstInput()):window.setTimeout((()=>{this.ready=!1}),400)}}focusFirstInput(){window.setTimeout((()=>{let t=this.querySelector('temba-textinput, temba-completion, input[type="text"], textarea');t&&(t=t.textInputElement||t.inputElement||t,t.readOnly||(t.focus(),t.click()))}),100)}handleClick(t){const e=t.currentTarget;e.disabled||(this.fireCustomEvent(ue.ButtonClicked,{button:e}),e.name===this.cancelButtonName&&(this.open=!1))}getDocumentHeight(){const t=document.body,e=document.documentElement;return Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}clickCancel(){const t=this.getCancelButton();t&&t.click()}getCancelButton(){return this.shadowRoot.querySelector(`temba-button[name='${this.cancelButtonName}']`)}getPrimaryButton(){return this.shadowRoot.querySelector("temba-button[primary]")}handleKeyUp(t){"Escape"===t.key&&this.clickCancel()}handleClickMask(t){if(this.hideOnClick){const e=t.target.id;"dialog-mask"!==e&&"dialog-bg"!==e||(this.fireCustomEvent(ue.DialogHidden),this.clickCancel())}}show(){this.open=!0}hide(){this.open=!1}render(){const t={height:`${this.getDocumentHeight()+100}px`},e={width:this.width,minWidth:"250px",maxWidth:"600px"};this.width||(e.width=na.widths[this.size]);const i=this.header?O`
1253
1253
  <div class="dialog-header">
1254
1254
  <div class="header-text">${this.header}</div>
1255
1255
  </div>
@@ -1306,7 +1306,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1306
1306
  </div>
1307
1307
  </div>
1308
1308
  </div>
1309
- `}}t([it({type:Boolean})],na.prototype,"open",void 0),t([it()],na.prototype,"header",void 0),t([it()],na.prototype,"body",void 0),t([it({type:Boolean})],na.prototype,"submitting",void 0),t([it({type:Boolean})],na.prototype,"destructive",void 0),t([it({type:Boolean})],na.prototype,"disabled",void 0),t([it({type:Boolean})],na.prototype,"loading",void 0),t([it({type:Boolean})],na.prototype,"hideOnClick",void 0),t([it({type:Boolean})],na.prototype,"noFocus",void 0),t([it()],na.prototype,"size",void 0),t([it({type:String})],na.prototype,"primaryButtonName",void 0),t([it({type:String})],na.prototype,"cancelButtonName",void 0),t([it()],na.prototype,"submittingName",void 0),t([it()],na.prototype,"animationEnd",void 0),t([it()],na.prototype,"ready",void 0),t([it({attribute:!1})],na.prototype,"onButtonClicked",void 0);class oa extends X{constructor(){super(...arguments),this.v=1}static get styles(){return r`
1309
+ `}}t([it({type:Boolean})],na.prototype,"open",void 0),t([it()],na.prototype,"header",void 0),t([it()],na.prototype,"body",void 0),t([it({type:Boolean})],na.prototype,"submitting",void 0),t([it({type:Boolean})],na.prototype,"destructive",void 0),t([it({type:Boolean})],na.prototype,"disabled",void 0),t([it({type:Boolean})],na.prototype,"loading",void 0),t([it({type:Boolean})],na.prototype,"hideOnClick",void 0),t([it({type:Boolean})],na.prototype,"noFocus",void 0),t([it()],na.prototype,"size",void 0),t([it({type:String})],na.prototype,"primaryButtonName",void 0),t([it({type:String})],na.prototype,"cancelButtonName",void 0),t([it({type:String})],na.prototype,"width",void 0),t([it()],na.prototype,"submittingName",void 0),t([it()],na.prototype,"animationEnd",void 0),t([it()],na.prototype,"ready",void 0),t([it({attribute:!1})],na.prototype,"onButtonClicked",void 0);class oa extends X{constructor(){super(...arguments),this.v=1}static get styles(){return r`
1310
1310
  :host {
1311
1311
  display: inline-block;
1312
1312
  font-family: var(--font-family);
@@ -1991,8 +1991,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
1991
1991
  ${t.msg.attachments.map((t=>(t=>{const e=t.indexOf(":"),i=t.substr(0,e),n=t.substr(e+1),[o,r]=i.split("/",2);let s=null;if("image"!==o){if("pdf"===r)return O`<div
1992
1992
  style="width:100%;height:300px;border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);overflow:hidden"
1993
1993
  ><embed src="${n}#view=Fit" type="application/pdf" frameBorder="0" scrolling="auto" height="100%" width="100%"></embed></div>`;if("video"===o)return O`<video
1994
- style="border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);"
1995
- max-width="400px"
1994
+ style="border-radius:var(--curvature);box-shadow:0px 0px 12px 0px rgba(0,0,0,.1), 0px 0px 2px 0px rgba(0,0,0,.15);max-width:400px"
1996
1995
  height="auto"
1997
1996
  controls
1998
1997
  >
@@ -3297,7 +3296,6 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3297
3296
  `}}t([it({type:Boolean})],za.prototype,"fetching",void 0),t([it({type:Boolean})],za.prototype,"expanded",void 0),t([it({type:String})],za.prototype,"endpoint",void 0),t([it({type:String})],za.prototype,"placeholder",void 0),t([it({type:String})],za.prototype,"name",void 0),t([it({type:String})],za.prototype,"query",void 0),t([it({type:Number})],za.prototype,"inactiveThreshold",void 0),t([it({type:Number})],za.prototype,"inactiveDays",void 0),t([it({type:Object,attribute:!1})],za.prototype,"summary",void 0),t([it({type:Object,attribute:!1})],za.prototype,"flow",void 0);class Na extends X{constructor(){super(),this.size=1,this.animationDuration=200,this.src="",this.steps=2,this.easing="cubic-bezier(0.68, -0.55, 0.265, 1.55)"}static get styles(){return r`
3298
3297
  :host {
3299
3298
  margin: auto;
3300
- --color1: var(--icon-color);
3301
3299
  }
3302
3300
 
3303
3301
  .sheet {
@@ -3336,7 +3334,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3336
3334
 
3337
3335
  .clickable:hover {
3338
3336
  cursor: pointer;
3339
- fill: var(--color-link-primary);
3337
+ fill: var(--color-link-primary) !important;
3340
3338
  background: rgb(255, 255, 255);
3341
3339
  }
3342
3340
 
@@ -3381,7 +3379,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3381
3379
  class="${Gt({sheet:""===this.src,[this.animateChange]:!!this.animateChange,[this.animateChange+"-"+this.animationStep]:this.animationStep>0,[this.animateClick]:!!this.animateClick,[this.animateClick+"-"+this.animationStep]:this.animationStep>0})}"
3382
3380
  >
3383
3381
  <use
3384
- href="${this.src?this.src:`${this.prefix||window.static_url||"/static/"}icons/symbol-defs.svg?v=14#icon-${this.lastName||this.name||this.id}`}"
3382
+ href="${this.src?this.src:`${this.prefix||window.static_url||"/static/"}icons/symbol-defs.svg?v=15#icon-${this.lastName||this.name||this.id}`}"
3385
3383
  />
3386
3384
  </svg>
3387
3385
  </div>
@@ -3640,6 +3638,9 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3640
3638
  .level-0 > .top {
3641
3639
  padding-top: var(--menu-padding);
3642
3640
  background: var(--color-primary-dark);
3641
+ display: flex;
3642
+ flex-direction: column;
3643
+ align-items: center;
3643
3644
  }
3644
3645
 
3645
3646
  .level-0 > .empty {
@@ -3906,7 +3907,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3906
3907
  }
3907
3908
 
3908
3909
  .fully-collapsed .level-1 {
3909
- margin-left: -217px;
3910
+ margin-left: -208px;
3910
3911
  pointer-events: none;
3911
3912
  border: none;
3912
3913
  overflow: hidden;
@@ -3932,13 +3933,69 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3932
3933
  margin-left: 0.75em;
3933
3934
  margin-right: 0.75em;
3934
3935
  }
3935
- `}setBubble(t,e){const i=Ha(this.root.items,t);return!(!i||!i.item)&&(i.item.bubble=e,this.requestUpdate("root"),!0)}getMenuItemState(t){let e={};return t&&(e=this.state[t],e||(e={},this.state[t]=e)),e}updated(t){t.has("value")&&this.setSelection((this.value||"").split("/")),t.has("submenu")&&!t.has("value")&&this.setSelection([this.submenu]),t.has("endpoint")&&(this.root={level:-1,endpoint:this.endpoint},this.wait||this.loadItems(this.root),this.fireCustomEvent(ue.Ready))}refresh(t=null){t||(t=[...this.selection]);const e=this.getMenuItemForSelection(t);e&&(e.endpoint?this.loadItems(e,!1):(t.pop(),this.refresh(t)))}fireNoPath(t){const e=this.getMenuItem(),i={item:e.id,selection:"/"+this.selection.join("/"),endpoint:e.endpoint,path:t+"/"+this.pending.join("/")+document.location.search},n=this.selection.join("/");n.replace(i.path,""),this.selection=n.split("/"),this.fireCustomEvent(ue.NoPath,i),this.pending=[],this.requestUpdate("root")}loadItems(t,e=!0){t&&t.endpoint&&(t.loading=!0,this.httpComplete=Kt(t.endpoint).then((i=>{if(i.forEach((e=>{e.level=t.level+1,e.items&&e.items.forEach((e=>{e.level=t.level+2}))})),t.items=i,t.loading=!1,this.requestUpdate("root"),this.scrollSelectedIntoView(),this.pending&&this.pending.length>0){const t=this.pending.shift();if(t&&i.length>0){const e=Ha(i,t);e.item?this.handleItemClicked(null,e.item):this.fireNoPath(t)}}else if(e&&i.length>0&&this.selection.length>=1&&!t.inline)for(const t of i)if(!t.type){this.handleItemClicked(null,t);break}})))}handleItemClicked(t,e,i=null){if(i&&i.inline&&this.handleItemClicked(null,i),this.collapsed&&(this.collapsed=!1),t&&(t.preventDefault(),t.stopPropagation()),"modax-button"!=e.type)if(e.trigger)new Function(e.trigger)();else if(e.level,e.level>=this.selection.length?this.selection.push(e.vanity_id||e.id):this.selection.splice(e.level,this.selection.length-e.level,e.vanity_id||e.id),e.endpoint)this.loadItems(e,!e.href),this.dispatchEvent(new Event("change"));else{if(this.pending&&this.pending.length>0){const t=this.pending.shift(),e=this.getMenuItem();if(t&&e&&e.items&&e.items.length>0){const i=Ha(e.items,t).item;i?this.handleItemClicked(null,i):this.fireNoPath(t)}else this.fireNoPath(t)}else this.dispatchEvent(new Event("change"));this.requestUpdate("root")}else this.fireCustomEvent(ue.ButtonClicked,{title:e.name,href:e.href,on_submit:e.on_submit})}scrollSelectedIntoView(){window.setTimeout((()=>{this.shadowRoot.querySelectorAll(".selected").forEach((t=>{t.scrollIntoView({block:"end",behavior:"smooth"})}))}),0)}clickItem(t){const e=[...this.selection];e.splice(e.length-1,1,t);const i=this.getMenuItemForSelection(e);return!!i&&(this.handleItemClicked(null,i),this.scrollSelectedIntoView(),!0)}getMenuItem(){return this.getMenuItemForSelection([...this.selection])}getMenuItemForSelection(t){const e=[...t];let i=this.root.items,n=null;for(;e.length>0;){const t=e.splice(0,1)[0];if(!i)break;if(n=Ha(i,t).item,!n)break;i=n.items}return n}getSelection(){return this.selection}setSelection(t){this.pending=[...t],this.selection=[],this.wait&&(this.wait=!1,this.loadItems(this.root))}setSelectionPath(t){const e=t.split("/").filter((t=>!!t));this.clickItem(e[e.length-1])||(this.wait=!0,this.setSelection(e))}async setFocusedItem(t){const e=t.split("/").filter((t=>!!t));if(e.length>0){if(!Ha(this.root.items,e[0]).item)return}const i=[];let n=this.root;for(;e.length>0;){const t=e.shift();t&&(n.items||(this.loadItems(n,!1),await this.httpComplete),n=Ha(n.items,t).item,n?i.push(t):e.splice(0,e.length))}this.selection=i,this.requestUpdate("root")}isSelected(t){if(t.level<this.selection.length){return this.selection[t.level]==(t.vanity_id||t.id)}return!1}isExpanded(t){return!!this.selection.find((e=>e===t.vanity_id||t.id))}render(){if(!this.root||!this.root.items)return O`<temba-loading
3936
+
3937
+ .expand-icon {
3938
+ transform: rotate(180deg);
3939
+ --icon-color: rgba(255, 255, 255, 0.5);
3940
+ cursor: pointer;
3941
+ max-height: 0px;
3942
+ overflow: hidden;
3943
+ opacity: 0;
3944
+ transition: all 400ms ease-in-out 400ms;
3945
+ }
3946
+
3947
+ .expand-icon:hover {
3948
+ --icon-color: #fff;
3949
+ }
3950
+
3951
+ .fully-collapsed .expand-icon {
3952
+ padding-top: 0.5em;
3953
+ max-height: 2em;
3954
+ opacity: 1;
3955
+ }
3956
+
3957
+ .section-header {
3958
+ display: flex;
3959
+ align-items: center;
3960
+ }
3961
+
3962
+ .section-header .section {
3963
+ flex-grow: 1;
3964
+ }
3965
+
3966
+ .section-header temba-icon {
3967
+ --icon-color: #ddd;
3968
+ cursor: pointer;
3969
+ padding-bottom: 0.5em;
3970
+ padding-right: 0.5em;
3971
+ }
3972
+
3973
+ .section-header temba-icon:hover {
3974
+ --icon-color: var(--color-link-primary);
3975
+ }
3976
+
3977
+ slot[name='header'] {
3978
+ display: none;
3979
+ }
3980
+
3981
+ slot[name='header'].show-header {
3982
+ display: block;
3983
+ }
3984
+ `}setBubble(t,e){const i=Ha(this.root.items,t);return!(!i||!i.item)&&(i.item.bubble=e,this.requestUpdate("root"),!0)}getMenuItemState(t){let e={};return t&&(e=this.state[t],e||(e={},this.state[t]=e)),e}updated(t){t.has("value")&&this.setSelection((this.value||"").split("/")),t.has("submenu")&&!t.has("value")&&this.setSelection([this.submenu]),t.has("endpoint")&&(this.root={level:-1,endpoint:this.endpoint},this.wait||this.loadItems(this.root),this.fireCustomEvent(ue.Ready))}refresh(t=null){t||(t=[...this.selection]);const e=this.getMenuItemForSelection(t);e&&(e.endpoint?this.loadItems(e,!1):(t.pop(),this.refresh(t)))}fireNoPath(t){const e=this.getMenuItem();if(e){const i={item:e.id,selection:"/"+this.selection.join("/"),endpoint:e.endpoint,path:t+"/"+this.pending.join("/")+document.location.search},n=this.selection.join("/");n.replace(i.path,""),this.selection=n.split("/"),this.fireCustomEvent(ue.NoPath,i),this.pending=[],this.requestUpdate("root")}}loadItems(t,e=!0){t&&t.endpoint&&(t.loading=!0,this.httpComplete=Kt(t.endpoint).then((i=>{if(i.forEach((e=>{e.level=t.level+1,e.items&&e.items.forEach((e=>{e.level=t.level+2}))})),t.items=i,t.loading=!1,this.requestUpdate("root"),this.scrollSelectedIntoView(),this.pending&&this.pending.length>0){const t=this.pending.shift();if(t&&i.length>0){const e=Ha(i,t);e.item?this.handleItemClicked(null,e.item):this.fireNoPath(t)}}else if(e&&i.length>0&&this.selection.length>=1&&!t.inline)for(const t of i)if(!t.type){this.handleItemClicked(null,t);break}})))}handleItemClicked(t,e,i=null){if(i&&i.inline&&this.handleItemClicked(null,i),this.collapsed&&(this.collapsed=!1),t&&(t.preventDefault(),t.stopPropagation()),"modax-button"!=e.type)if(e.trigger)new Function(e.trigger)();else if(e.level,e.level>=this.selection.length?this.selection.push(e.vanity_id||e.id):this.selection.splice(e.level,this.selection.length-e.level,e.vanity_id||e.id),e.endpoint)this.loadItems(e,!0),this.dispatchEvent(new Event("change"));else{if(this.pending&&this.pending.length>0){const t=this.pending.shift(),e=this.getMenuItem();if(t&&e&&e.items&&e.items.length>0){const i=Ha(e.items,t).item;i?this.handleItemClicked(null,i):this.fireNoPath(t)}else this.fireNoPath(t)}else this.dispatchEvent(new Event("change"));this.requestUpdate("root")}else this.fireCustomEvent(ue.ButtonClicked,{title:e.name,href:e.href,on_submit:e.on_submit})}scrollSelectedIntoView(){window.setTimeout((()=>{this.shadowRoot.querySelectorAll(".selected").forEach((t=>{t.scrollIntoView({block:"end",behavior:"smooth"})}))}),0)}clickItem(t){const e=[...this.selection];e.splice(e.length-1,1,t);const i=this.getMenuItemForSelection(e);return!!i&&(this.handleItemClicked(null,i),this.scrollSelectedIntoView(),!0)}getMenuItem(){return this.getMenuItemForSelection([...this.selection])}getMenuItemForSelection(t){const e=[...t];let i=this.root.items,n=null;for(;e.length>0;){const t=e.splice(0,1)[0];if(!i)break;if(n=Ha(i,t).item,!n)break;i=n.items}return n}getSelection(){return this.selection}setSelection(t){this.pending=[...t],this.selection=[],this.wait&&(this.wait=!1,this.loadItems(this.root))}setSelectionPath(t){const e=t.split("/").filter((t=>!!t));this.clickItem(e[e.length-1])||(this.wait=!0,this.setSelection(e))}handleExpand(){this.collapsed=!1}handleCollapse(){this.collapsed=!0}async setFocusedItem(t){const e=t.split("/").filter((t=>!!t));if(e.length>0){if(!Ha(this.root.items,e[0]).item)return}const i=[];let n=this.root;for(;e.length>0;){const t=e.shift();t&&(n.items||(this.loadItems(n,!1),await this.httpComplete),n=Ha(n.items,t).item,n?i.push(t):e.splice(0,e.length))}this.selection=i,this.requestUpdate("root")}isSelected(t){if(t.level<this.selection.length){return this.selection[t.level]==(t.vanity_id||t.id)}return!1}isExpanded(t){return!!this.selection.find((e=>e===t.vanity_id||t.id))}render(){if(!this.root||!this.root.items)return O`<temba-loading
3936
3985
  units="3"
3937
3986
  size="10"
3938
3987
  direction="column"
3939
3988
  style="margin:1em;margin-right:0em"
3940
3989
  />`;let t=this.root.items||[];const e=[];e.push(O`<div class="level level-0 ${this.submenu?"hidden":""}">
3941
- <div class="top"></div>
3990
+ <div class="top">
3991
+ <div class="expand-icon" @click=${this.handleExpand}>
3992
+ <temba-icon
3993
+ name="menu-collapse"
3994
+ class="expand"
3995
+ size="1.4"
3996
+ ></temba-icon>
3997
+ </div>
3998
+ </div>
3942
3999
 
3943
4000
  ${t.filter((t=>!t.bottom)).map((t=>this.renderMenuItem(t)))}
3944
4001
 
@@ -3948,7 +4005,21 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
3948
4005
  </div>`),this.selection.forEach(((i,n)=>{const o=Ha(t,i).item;let r=!1;if(o){t=o.items;const e=this.getMenuItemState(o.id);e.collapsed?r="collapsed"===e.collapsed:this.selection.length>o.level+2&&(r=!1)}else t=null;t&&t.length>0&&!o.inline&&e.push(O`<div
3949
4006
  class="${Gt({level:!0,["level-"+(n+1)]:!0,collapsed:r})}"
3950
4007
  >
3951
- ${this.submenu?null:O`<div class="section">${o.name}</div>`}
4008
+ ${this.submenu?null:O`
4009
+ <slot
4010
+ class="${Gt({"show-header":o.show_header})}"
4011
+ name="header"
4012
+ ></slot>
4013
+ <div class="section-header">
4014
+ <div class="section">${o.name}</div>
4015
+
4016
+ ${0!=n||this.collapsed?null:O`<temba-icon
4017
+ name="menu-collapse"
4018
+ size="1.1"
4019
+ @click=${this.handleCollapse}
4020
+ ></temba-icon>`}
4021
+ </div>
4022
+ `}
3952
4023
  ${t.map((t=>t.inline&&t.items?O`${this.renderMenuItem(t)}
3953
4024
  <div class="inline-children">
3954
4025
  ${(t.items||[]).map((e=>this.renderMenuItem(e,t)))}
@@ -4023,6 +4094,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4023
4094
 
4024
4095
  .tabs {
4025
4096
  display: flex;
4097
+ padding-left: 0.18em;
4026
4098
  }
4027
4099
 
4028
4100
  .tab {
@@ -4039,6 +4111,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4039
4111
  color: var(--color-text-dark);
4040
4112
  --icon-color: var(--color-text-dark);
4041
4113
  white-space: nowrap;
4114
+ transition: all 100ms ease-in-out;
4042
4115
  }
4043
4116
 
4044
4117
  .tab.hidden {
@@ -4077,6 +4150,8 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4077
4150
  cursor: default;
4078
4151
  box-shadow: 2px 1px 3px 2px rgba(0, 0, 0, 0.07);
4079
4152
  background: #fff;
4153
+ transform: scale(1.05) translateY(-0.05em);
4154
+ z-index: 0;
4080
4155
  }
4081
4156
 
4082
4157
  .pane {
@@ -4088,10 +4163,12 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4088
4163
  box-shadow: 2px 5px 12px 2px rgba(0, 0, 0, 0.09),
4089
4164
  3px 3px 2px 1px rgba(0, 0, 0, 0.05);
4090
4165
  min-height: 0;
4166
+ z-index: 1;
4091
4167
  }
4092
4168
 
4093
4169
  .pane.first {
4094
4170
  border-top-left-radius: 0px;
4171
+ overflow: hidden;
4095
4172
  }
4096
4173
 
4097
4174
  .badge {
@@ -4810,7 +4887,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4810
4887
  style="width: 12em;white-space:nowrap;overflow: hidden; text-overflow: ellipsis;"
4811
4888
  >
4812
4889
  <temba-contact-name
4813
- name=${t.contact.name}
4890
+ name=${t.contact.name||t.contact.anon_display}
4814
4891
  urn=${t.contact.urn}
4815
4892
  icon-size="15"
4816
4893
  />
@@ -4874,7 +4951,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4874
4951
  <div>
4875
4952
  <temba-contact-name
4876
4953
  style="cursor:pointer"
4877
- name=${this.selectedRun.contact.name}
4954
+ name=${this.selectedRun.contact.name||this.selectedRun.contact.anon_display}
4878
4955
  urn=${this.selectedRun.contact.urn}
4879
4956
  onclick="goto(event, this)"
4880
4957
  href="/contact/read/${this.selectedRun.contact.uuid}/"
@@ -4955,7 +5032,7 @@ function t(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPro
4955
5032
  margin-top: 2px;
4956
5033
  }
4957
5034
  `}render(){if(this.data)return O` <temba-contact-name
4958
- name=${this.data.name}
5035
+ name=${this.data.name||this.data.anon_display}
4959
5036
  urn=${this.data.urns.length>0?this.data.urns[0]:null}
4960
5037
  />
4961
5038
  <slot></slot>`}}function cl(t,e){window.customElements.get(t)||window.customElements.define(t,e)}t([it({type:Number,attribute:"icon-size"})],ll.prototype,"size",void 0),cl("temba-anchor",Va),cl("temba-alert",Ia),cl("temba-store",ur),cl("temba-textinput",Ht),cl("temba-completion",ea),cl("temba-checkbox",rt),cl("temba-select",ta),cl("temba-options",pr),cl("temba-loading",sa),cl("temba-button",oa),cl("temba-omnibox",Fa),cl("temba-tip",Za),cl("temba-contact-name",Ja),cl("temba-contact-name-fetch",ll),cl("temba-contact-field",tl),cl("temba-contact-fields",Qa),cl("temba-urn",Xa),cl("temba-field",ra),cl("temba-dialog",na),cl("temba-modax",ia),cl("temba-charcount",fa),cl("temba-contact-history",Aa),cl("temba-contact-chat",ya),cl("temba-contact-details",Pa),cl("temba-ticket-list",Oa),cl("temba-list",La),cl("temba-run-list",sl),cl("temba-flow-details",al),cl("temba-label",Ka),cl("temba-menu",Ua),cl("temba-contact-search",za),cl("temba-icon",Na),cl("temba-dropdown",Wa),cl("temba-tabs",Ga),cl("temba-tab",Ya),cl("temba-contact-badges",class extends va{static get styles(){return r`
@@ -1,8 +1,15 @@
1
1
  <svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
2
  <defs>
3
+ <symbol id="icon-zapier" viewBox="0 0 32 32">
4
+ <path fill="#474747" style="fill: var(--color1, #474747)" d="M4.8 0h22.4c2.651 0 4.8 2.149 4.8 4.8v22.4c0 2.651-2.149 4.8-4.8 4.8h-22.4c-2.651 0-4.8-2.149-4.8-4.8v-22.4c0-2.651 2.149-4.8 4.8-4.8z"></path>
5
+ <path fill="#fff" style="fill: var(--color2, #fff)" d="M4.8 20.8h22.4v6.4h-22.4v-6.4z"></path>
6
+ </symbol>
3
7
  <symbol id="icon-hourglass" viewBox="0 0 24 24">
4
8
  <path d="M12 11.484l3.984-3.984v-3.516h-7.969v3.516zM15.984 16.5l-3.984-3.984-3.984 3.984v3.516h7.969v-3.516zM6 2.016h12v6l-3.984 3.984 3.984 3.984v6h-12v-6l3.984-3.984-3.984-3.984v-6z"></path>
5
9
  </symbol>
10
+ <symbol id="icon-menu-collapse" viewBox="0 0 24 24">
11
+ <path d="M21 15.609l-1.406 1.406-5.016-5.016 5.016-5.016 1.406 1.406-3.563 3.609zM3 6h12.984v2.016h-12.984v-2.016zM3 12.984v-1.969h9.984v1.969h-9.984zM3 18v-2.016h12.984v2.016h-12.984z"></path>
12
+ </symbol>
6
13
  <symbol id="icon-bar-chart" viewBox="0 0 24 24">
7
14
  <path d="M19 20v-10c0-0.552-0.448-1-1-1s-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1zM13 20v-16c0-0.552-0.448-1-1-1s-1 0.448-1 1v16c0 0.552 0.448 1 1 1s1-0.448 1-1zM7 20v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6c0 0.552 0.448 1 1 1s1-0.448 1-1z"></path>
8
15
  </symbol>
@@ -394,9 +401,6 @@
394
401
  <symbol id="icon-language" viewBox="0 0 20 20">
395
402
  <path d="M19.753 10.909c-0.624-1.707-2.366-2.726-4.661-2.726-0.090 0-0.176 0.002-0.262 0.006l-0.016-2.063c0 0 3.41-0.588 3.525-0.607s0.133-0.119 0.109-0.231c-0.023-0.111-0.167-0.883-0.188-0.976-0.027-0.131-0.102-0.127-0.207-0.109s-3.25 0.461-3.25 0.461-0.012-1.953-0.013-2.078c-0.001-0.125-0.069-0.158-0.194-0.156s-0.92 0.014-1.025 0.016c-0.105 0.002-0.164 0.049-0.162 0.148s0.033 2.307 0.033 2.307-3.061 0.527-3.144 0.543c-0.084 0.014-0.17 0.053-0.151 0.143s0.19 1.094 0.208 1.172c0.018 0.080 0.072 0.129 0.188 0.107 0.115-0.019 2.924-0.504 2.924-0.504l0.035 2.018c-1.077 0.281-1.801 0.824-2.256 1.303-0.768 0.807-1.207 1.887-1.207 2.963 0 1.586 0.971 2.529 2.328 2.695 3.162 0.387 5.119-3.060 5.769-4.715 1.097 1.506 0.256 4.354-2.094 5.98-0.043 0.029-0.098 0.129-0.033 0.207s0.541 0.662 0.619 0.756c0.080 0.096 0.206 0.059 0.256 0.023 2.51-1.73 3.661-4.515 2.869-6.683zM12.367 14.097c-0.966-0.121-0.944-0.914-0.944-1.453 0-0.773 0.327-1.58 0.876-2.156 0.335-0.354 0.75-0.621 1.229-0.799l0.082 4.277c-0.385 0.131-0.799 0.185-1.243 0.131zM14.794 13.544l0.046-4.109c0.084-0.004 0.166-0.010 0.252-0.010 0.773 0 1.494 0.145 1.885 0.361s-1.023 2.713-2.183 3.758zM5.844 5.876c-0.030-0.094-0.103-0.145-0.196-0.145h-1.95c-0.093 0-0.165 0.051-0.194 0.144-0.412 1.299-3.48 10.99-3.496 11.041s-0.011 0.076 0.062 0.076h1.733c0.075 0 0.099-0.023 0.114-0.072 0.015-0.051 1.008-3.318 1.008-3.318h3.496c0 0 0.992 3.268 1.008 3.318s0.039 0.072 0.113 0.072h1.734c0.072 0 0.078-0.025 0.062-0.076-0.014-0.050-3.083-9.741-3.494-11.040zM3.226 12.194l1.447-5.25 1.447 5.25h-2.894z"></path>
396
403
  </symbol>
397
- <symbol id="icon-zapier" viewBox="0 0 32 32">
398
- <path fill="#ff4a00" style="fill: var(--color1, #ff4a00)" d="M20 16.005c0 1.191-0.22 2.328-0.615 3.38-1.049 0.396-2.191 0.615-3.38 0.615h-0.012c-1.191 0-2.327-0.22-3.379-0.615-0.396-1.052-0.615-2.191-0.615-3.38v-0.012c0-1.191 0.219-2.327 0.615-3.379 1.052-0.396 2.189-0.615 3.379-0.615h0.012c1.191 0 2.331 0.219 3.38 0.616 0.396 1.051 0.615 2.188 0.615 3.38zM31.78 13.333h-9.34l6.597-6.603c-0.52-0.731-1.093-1.413-1.727-2.044-0.631-0.632-1.313-1.209-2.040-1.728l-6.605 6.599v-9.337c-0.865-0.139-1.751-0.22-2.66-0.22h-0.013c-0.907 0-1.795 0.081-2.66 0.22v9.34l-6.6-6.599c-0.732 0.515-1.413 1.095-2.045 1.725-0.632 0.632-1.211 1.316-1.728 2.044l6.599 6.603h-9.337c0 0-0.22 1.755-0.22 2.66v0.012c0 0.907 0.081 1.797 0.22 2.66h9.34l-6.599 6.603c1.036 1.461 2.311 2.735 3.769 3.773l6.603-6.6v9.339c0.864 0.14 1.751 0.22 2.655 0.22h0.023c0.905 0 1.792-0.080 2.655-0.22v-9.339l6.603 6.6c0.731-0.5 1.413-1.083 2.039-1.72h0.007c0.631-0.62 1.208-1.301 1.728-2.041l-6.6-6.599h9.339c0.14-0.86 0.22-1.739 0.22-2.64v-0.041c0-0.904-0.080-1.791-0.22-2.653z"></path>
399
- </symbol>
400
404
  <symbol id="icon-cord" viewBox="0 0 32 32">
401
405
  <path d="M27.59 12.41c-0.464-0.464-1.216-0.464-1.679 0l-4.91 4.91-6.321-6.321 4.91-4.91c0.464-0.464 0.464-1.216 0-1.679s-1.216-0.464-1.679 0l-4.91 4.91-2.91-2.91c-0.464-0.464-1.216-0.464-1.679 0s-0.464 1.216 0 1.679l2.093 2.093-4.16 4.16c-2.636 2.636-3.048 6.653-1.236 9.721l-4.521 4.521c-0.781 0.781-0.781 2.047 0 2.828 0.391 0.391 0.902 0.586 1.414 0.586s1.024-0.195 1.414-0.586l4.521-4.521c3.068 1.812 7.085 1.4 9.721-1.236l4.16-4.16 2.093 2.093c0.232 0.232 0.536 0.348 0.84 0.348s0.608-0.116 0.84-0.348c0.464-0.464 0.464-1.216 0-1.679l-2.91-2.91 4.91-4.91c0.464-0.464 0.464-1.216 0-1.679z"></path>
402
406
  </symbol>
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:"a4ce5e6b.js",revision:"9e440e609e093b6a58fbdd07f01ec152"},{url:"templates/components-body.html",revision:"689aa497b951e09fc332b9a1cf5ef402"},{url:"templates/components-head.html",revision:"5ff8233f0c81f9cf064523b739a64800"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")}));
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:"56002f06.js",revision:"1c47dd0de9ccaf506653dad5c3f6ce4b"},{url:"templates/components-body.html",revision:"0827077e2ff07f81bb5faf4e18a00703"},{url:"templates/components-head.html",revision:"00973b8923f5c0e21aba2e360c397502"}],{}),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/49467a4fa2e9a723f6a12687e6341282/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\": \"a4ce5e6b.js\",\n \"revision\": \"9e440e609e093b6a58fbdd07f01ec152\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"689aa497b951e09fc332b9a1cf5ef402\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"5ff8233f0c81f9cf064523b739a64800\"\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":["url","revision","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"k1BAmCoC,CAClC,CACEA,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,oBAE2B,IAAIC,kBAAgCC,0BAA2C,iCAG/E,iBAAkB,IAAIC,aAAiC"}
1
+ {"version":3,"file":"sw.js","sources":["../../../../../tmp/fdcff037317296def220f6ffe93607b3/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\": \"56002f06.js\",\n \"revision\": \"1c47dd0de9ccaf506653dad5c3f6ce4b\"\n },\n {\n \"url\": \"templates/components-body.html\",\n \"revision\": \"0827077e2ff07f81bb5faf4e18a00703\"\n },\n {\n \"url\": \"templates/components-head.html\",\n \"revision\": \"00973b8923f5c0e21aba2e360c397502\"\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":["url","revision","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"k1BAmCoC,CAClC,CACEA,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,qCAEb,oBAE2B,IAAIC,kBAAgCC,0BAA2C,iCAG/E,iBAAkB,IAAIC,aAAiC"}