@nyaruka/temba-components 0.107.1 → 0.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,17 @@ 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.108.0](https://github.com/nyaruka/temba-components/compare/v0.107.1...v0.108.0)
8
+
9
+ - Switch to generic StartProgress widget [`#456`](https://github.com/nyaruka/temba-components/pull/456)
10
+ - Honor status over total count for progress [`409608a`](https://github.com/nyaruka/temba-components/commit/409608a8519974502c5b97b8ddc210af3575f294)
11
+ - Soften progress curvature [`a848a5d`](https://github.com/nyaruka/temba-components/commit/a848a5d1515787e4e6c03e28c428f5a9ae352f63)
12
+ - Use Queued status for waiting message [`bbf9684`](https://github.com/nyaruka/temba-components/commit/bbf9684577cbd86762976262e87072d85bb496aa)
13
+
7
14
  #### [v0.107.1](https://github.com/nyaruka/temba-components/compare/v0.107.0...v0.107.1)
8
15
 
16
+ > 16 September 2024
17
+
9
18
  - Fix widths for large pcts on progress bar [`#454`](https://github.com/nyaruka/temba-components/pull/454)
10
19
  - Better handling for empty case [`25bcf3b`](https://github.com/nyaruka/temba-components/commit/25bcf3bdf76cc616f22d9bfc0f66dd6e18d91e5f)
11
20
 
package/demo/index.html CHANGED
@@ -153,6 +153,7 @@
153
153
  <temba-tabs collapses index="0">
154
154
  <temba-tab name="Overview" icon="default">
155
155
  <temba-progress style="margin-bottom:8px" total="100" current="25" eta="2030-09-17T07:00:00.000Z"></temba-progress>
156
+
156
157
  <div style="display:flex;flex-wrap: wrap;">
157
158
  <temba-checkbox label="Check this out" checked></temba-checkbox>
158
159
  <temba-select placeholder="Select a color" clearable>
@@ -1424,7 +1424,7 @@ let br=Ks,yr=!1;const _r=["es","fr","pt"],{setLocale:xr}=(t=>(function(t){if(yr)
1424
1424
  flex-direction: row;
1425
1425
  margin-left: 0.6em;
1426
1426
  }
1427
- `}handleSlotClicked(){this.open=!0}updated(t){if(super.updated(t),t.has("open")&&(this.open?this.fetchForm():void 0!==t.get("open")&&(this.open?window.setTimeout((()=>{this.body=this.getLoading(),this.submitting=!1}),500):this.setBody(""))),t.has("body")&&this.open&&this.body&&!this.fetching){this.shadowRoot.querySelector("temba-dialog").focusFirstInput()}}getLoading(){return j`<temba-loading units="6" size="8"></temba-loading>`}updatePrimaryButton(){const t=this.shadowRoot.querySelector("#wizard-form");t&&(this.wizardStep=parseInt(t.dataset.step),this.wizardStepCount=parseInt(t.dataset.steps)),this.noSubmit||this.updateComplete.then((()=>{const t=this.shadowRoot.querySelector("input[type='submit'],button[type='submit']");this.buttons=t?[{type:ml.SECONDARY,name:"Cancel",closes:!0},{type:ml.PRIMARY,name:t.value}]:[{type:ml.SECONDARY,name:"Ok",closes:!0}],this.submitting=!1}))}setBody(t){const e=this.shadowRoot.querySelector(".scripts");for(const t of e.children)t.remove();const i=this.ownerDocument.createElement("div");i.innerHTML=t;const o=i.getElementsByTagName("script"),n=[];for(let t=o.length-1;t>=0;t--){const e=this.ownerDocument.createElement("script"),i=o[t].innerText;o[t].src&&-1===o[t].src.indexOf("web-dev-server")?(e.src=o[t].src,e.type="text/javascript",e.async=!0,e.onload=function(){},n.push(e)):i&&(e.appendChild(this.ownerDocument.createTextNode(i)),n.push(e)),o[t].remove()}const s=!!i.querySelector(".success-script");return s||(this.body=$r(i.innerHTML)),this.updateComplete.then((()=>{for(const t of n)e.appendChild(t)})),!s}getHeaders(){const t=this.headers;return t["X-PJAX"]=1,t}fetchForm(){this.fetching=!0,this.body=this.getLoading(),jt(this.endpoint,null,this.getHeaders()).then((t=>{0==t.body.indexOf("<!DOCTYPE HTML>")?document.location=t.url:(this.setBody(t.body),this.fetching=!1,this.updateComplete.then((()=>{this.updatePrimaryButton(),this.fireCustomEvent(Le.Loaded,{body:this.getBody()})})))}))}submit(t={}){this.submitting=!0;const e=this.shadowRoot.querySelector("form");let i=e?function(t){const e=[];for(let i=0;i<t.elements.length;i++){const o=t.elements[i];if(o.name&&!o.disabled&&"file"!==o.type&&"reset"!==o.type&&"submit"!==o.type&&"button"!==o.type)if("select-multiple"===o.type)for(let t=0;t<o.options.length;t++)o.options[t].selected&&o.options[t].value&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.options[t].value));else if("checkbox"!==o.type&&"radio"!==o.type||o.checked){let t=o.value;!t&&o.checked&&(t="1"),t&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(t))}}return e.join("&")}(e):"";t&&Object.keys(t).forEach((e=>{i+=(i.length>1?"&":"")+encodeURIComponent(e)+"="+encodeURIComponent(t[e])})),Qt(this.endpoint,i,this.getHeaders(),"application/x-www-form-urlencoded").then((t=>{window.setTimeout((()=>{let e=t.headers.get("temba-success");!e&&t.url&&-1===t.url.indexOf(this.endpoint)&&(e=t.url),e?"hide"===e?this.updateComplete.then((()=>{this.open=!1,this.fireCustomEvent(Le.Submitted)})):(this.fireCustomEvent(Le.Redirected,{url:e}),this.open=!1):this.setBody(t.body)&&this.updateComplete.then((()=>{this.updatePrimaryButton()}))}),1e3)})).catch((t=>{console.error(t)}))}handleDialogClick(t){const e=t.detail.button,i=t.detail.detail;e.disabled||e.submitting||(e.primary||e.destructive)&&(this.suspendSubmit||this.submit()),i.closes&&(this.open=!1,this.fetching=!1,this.cancelName=void 0)}handleDialogHidden(){this.open=!1,this.fetching=!1}isDestructive(){return this.endpoint&&this.endpoint.indexOf("delete")>-1}handleGotoStep(t){const e=t.target.dataset.gotoStep;e&&this.submit({wizard_goto_step:e})}getBody(){return this.shadowRoot.querySelector(".modax-body")}render(){const t=[],e=this.shadowRoot.querySelector("#wizard-form");if(e){const i=(e.getAttribute("data-completed")||"").split(",").filter((t=>t.length>0));for(let e=0;e<this.wizardStepCount;e++)t.push(j`<div
1427
+ `}handleSlotClicked(){this.open=!0}updated(t){if(super.updated(t),t.has("open")&&(this.open?this.fetchForm():void 0!==t.get("open")&&(this.open?window.setTimeout((()=>{this.body=this.getLoading(),this.submitting=!1}),500):this.setBody(""))),t.has("body")&&this.open&&this.body&&!this.fetching){this.shadowRoot.querySelector("temba-dialog").focusFirstInput()}}getLoading(){return j`<temba-loading units="6" size="8"></temba-loading>`}updatePrimaryButton(){const t=this.shadowRoot.querySelector("#wizard-form");t&&(this.wizardStep=parseInt(t.dataset.step),this.wizardStepCount=parseInt(t.dataset.steps)),this.noSubmit||this.updateComplete.then((()=>{const t=this.shadowRoot.querySelector("input[type='submit'],button[type='submit']");this.buttons=t?[{type:ml.SECONDARY,name:"Cancel",closes:!0},{type:ml.PRIMARY,name:t.value}]:[{type:ml.SECONDARY,name:"Ok",closes:!0}],this.submitting=!1}))}setBody(t){const e=this.shadowRoot.querySelector(".scripts");for(const t of e.children)t.remove();const i=this.ownerDocument.createElement("div");i.innerHTML=t;const o=i.getElementsByTagName("script"),n=[];for(let t=o.length-1;t>=0;t--){const e=this.ownerDocument.createElement("script"),i=o[t].innerText;o[t].src&&-1===o[t].src.indexOf("web-dev-server")?(e.src=o[t].src,e.type="text/javascript",e.async=!0,e.onload=function(){},n.push(e)):i&&(e.appendChild(this.ownerDocument.createTextNode(i)),n.push(e)),o[t].remove()}const s=!!i.querySelector(".success-script");return s||(this.body=$r(i.innerHTML)),this.updateComplete.then((()=>{for(const t of n)e.appendChild(t)})),!s}getHeaders(){const t=this.headers;return t["X-PJAX"]=1,t}fetchForm(){this.fetching=!0,this.body=this.getLoading(),jt(this.endpoint,null,this.getHeaders()).then((t=>{0==t.body.indexOf("<!DOCTYPE HTML>")?document.location=t.url:(this.setBody(t.body),this.fetching=!1,this.updateComplete.then((()=>{this.updatePrimaryButton(),this.fireCustomEvent(Le.Loaded,{body:this.getBody()})})))}))}submit(t={}){this.submitting=!0;const e=this.shadowRoot.querySelector("form");let i=e?function(t){const e=[];for(let i=0;i<t.elements.length;i++){const o=t.elements[i];if(o.name&&!o.disabled&&"file"!==o.type&&"reset"!==o.type&&"submit"!==o.type&&"button"!==o.type)if("select-multiple"===o.type)for(let t=0;t<o.options.length;t++)o.options[t].selected&&o.options[t].value&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(o.options[t].value));else if("checkbox"!==o.type&&"radio"!==o.type||o.checked){let t=o.value;!t&&o.checked&&(t="1"),t&&e.push(encodeURIComponent(o.name)+"="+encodeURIComponent(t))}}return e.join("&")}(e):"";t&&Object.keys(t).forEach((e=>{i+=(i.length>1?"&":"")+encodeURIComponent(e)+"="+encodeURIComponent(t[e])})),Qt(this.endpoint,i,this.getHeaders(),"application/x-www-form-urlencoded").then((t=>{window.setTimeout((()=>{let e=t.headers.get("temba-success");!e&&t.url&&-1===t.url.indexOf(this.endpoint)&&(e=t.url),e?"hide"===e?this.updateComplete.then((()=>{this.open=!1,this.fireCustomEvent(Le.Submitted)})):(this.fireCustomEvent(Le.Redirected,{url:e}),this.open=!1):this.setBody(t.body)&&this.updateComplete.then((()=>{this.updatePrimaryButton()}))}),1e3)})).catch((t=>{console.error(t)}))}handleDialogClick(t){const e=t.detail.button,i=t.detail.detail;e.disabled||e.submitting||(e.primary||e.destructive)&&(this.suspendSubmit||this.submit()),i.closes&&(this.open=!1,this.fetching=!1,this.cancelName=void 0)}handleDialogHidden(){this.open=!1,this.fetching=!1}isDestructive(){return this.endpoint&&(this.endpoint.indexOf("delete")>-1||this.endpoint.indexOf("interrupt")>-1)}handleGotoStep(t){const e=t.target.dataset.gotoStep;e&&this.submit({wizard_goto_step:e})}getBody(){return this.shadowRoot.querySelector(".modax-body")}render(){const t=[],e=this.shadowRoot.querySelector("#wizard-form");if(e){const i=(e.getAttribute("data-completed")||"").split(",").filter((t=>t.length>0));for(let e=0;e<this.wizardStepCount;e++)t.push(j`<div
1428
1428
  data-goto-step=${i[e]}
1429
1429
  @click=${this.handleGotoStep.bind(this)}
1430
1430
  class="${Vt({"step-ball":!0,active:this.wizardStep-1===e,complete:e<i.length})}"
@@ -7961,18 +7961,23 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
7961
7961
  >.
7962
7962
  </div></temba-alert
7963
7963
  >
7964
- </div>`:null}}t([ge({type:Number})],Ec.prototype,"backlogSize",void 0),t([ge({type:String})],Ec.prototype,"endpoint",void 0),t([ge({type:Object})],Ec.prototype,"firstFetch",void 0),t([ge({type:Object})],Ec.prototype,"lastFetch",void 0),t([ge({type:Number})],Ec.prototype,"fetches",void 0),t([ge({type:Number})],Ec.prototype,"msgsPerSecond",void 0),t([ge({type:Object})],Ec.prototype,"estimatedCompletionDate",void 0);class Tc extends ue{constructor(){super(...arguments),this.total=100,this.current=0,this.pct=0,this.done=!1,this.showEstimatedCompletion=!1,this.showPercentage=!1}updated(t){if(t.has("eta")&&this.eta&&(this.estimatedCompletionDate=new Date(this.eta),this.showEstimatedCompletion=this.estimatedCompletionDate>new Date),t.has("current")){const t=Math.floor(Math.min(this.current/this.total*100,100));Number.isNaN(t)?this.showPercentage=!1:(this.pct=t,this.showPercentage=!0),this.done=this.pct>=100}}render(){return j`<div class="wrapper">
7964
+ </div>`:null}}t([ge({type:Number})],Ec.prototype,"backlogSize",void 0),t([ge({type:String})],Ec.prototype,"endpoint",void 0),t([ge({type:Object})],Ec.prototype,"firstFetch",void 0),t([ge({type:Object})],Ec.prototype,"lastFetch",void 0),t([ge({type:Number})],Ec.prototype,"fetches",void 0),t([ge({type:Number})],Ec.prototype,"msgsPerSecond",void 0),t([ge({type:Object})],Ec.prototype,"estimatedCompletionDate",void 0);class Tc extends ue{constructor(){super(...arguments),this.total=100,this.current=0,this.pct=0,this.done=!1,this.showEstimatedCompletion=!1,this.showPercentage=!1}updated(t){if(t.has("eta")&&this.eta&&(this.estimatedCompletionDate=new Date(this.eta),this.showEstimatedCompletion=this.estimatedCompletionDate>new Date),t.has("current")){const t=Math.floor(Math.min(this.current/this.total*100,100));Number.isNaN(t)?this.showPercentage=!1:(this.pct=t,this.showPercentage=!0),this.done=this.pct>=100}}render(){return j`<div class="wrapper ${this.done?"complete":""}">
7965
7965
  <div class="meter ${this.done?"done":""}">
7966
+ ${this.message?j`<div class="message">${this.message}</div>`:null}
7966
7967
  <span class="complete" style="flex-basis: ${this.pct}%"></span>
7967
7968
  <div class="incomplete"></div>
7968
7969
  </div>
7969
7970
 
7970
7971
  ${this.showPercentage||this.showEstimatedCompletion?j`<div class="etc">
7971
- ${this.estimatedCompletionDate&&this.showEstimatedCompletion&&!this.done?j`<temba-date
7972
- value="${this.estimatedCompletionDate.toISOString()}"
7973
- display="countdown"
7974
- ></temba-date>`:j`${this.pct}%`}
7972
+ <div>
7973
+ ${this.estimatedCompletionDate&&this.showEstimatedCompletion&&!this.done?j`<temba-date
7974
+ value="${this.estimatedCompletionDate.toISOString()}"
7975
+ display="countdown"
7976
+ ></temba-date>`:j`${this.pct}%`}
7977
+ </div>
7975
7978
  </div>`:null}
7979
+
7980
+ <slot></slot>
7976
7981
  </div>`}}Tc.styles=r`
7977
7982
  .wrapper {
7978
7983
  display: flex;
@@ -7980,6 +7985,13 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
7980
7985
  background: #f1f1f1;
7981
7986
  border-radius: var(--curvature);
7982
7987
  box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
7988
+ overflow: hidden;
7989
+ min-height: 1.5rem;
7990
+ }
7991
+
7992
+ .message {
7993
+ padding: 0 0.25rem;
7994
+ color: rgba(0, 0, 0, 0.4);
7983
7995
  }
7984
7996
 
7985
7997
  .meter {
@@ -7987,7 +7999,6 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
7987
7999
  display: flex;
7988
8000
  box-sizing: content-box;
7989
8001
  position: relative;
7990
- border-radius: var(--curvature);
7991
8002
  border-top-right-radius: 0;
7992
8003
  border-bottom-right-radius: 0;
7993
8004
  padding: 4px;
@@ -7996,7 +8007,7 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
7996
8007
  .meter > span {
7997
8008
  display: block;
7998
8009
  height: 100%;
7999
- border-radius: var(--curvature);
8010
+ border-radius: calc(var(--curvature) * 0.8);
8000
8011
  background-color: var(--color-primary-dark);
8001
8012
  background-image: linear-gradient(
8002
8013
  center bottom,
@@ -8006,7 +8017,6 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
8006
8017
 
8007
8018
  position: relative;
8008
8019
  overflow: hidden;
8009
- min-width: 3px;
8010
8020
  }
8011
8021
 
8012
8022
  .meter > span:after,
@@ -8029,7 +8039,7 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
8029
8039
  );
8030
8040
  z-index: 1;
8031
8041
  background-size: 50px 50px;
8032
- animation: move 16s linear infinite;
8042
+ animation: move 8s linear infinite;
8033
8043
  border-top-right-radius: var(--curvature);
8034
8044
  border-bottom-right-radius: var(--curvature);
8035
8045
  border-top-left-radius: var(--curvature);
@@ -8050,24 +8060,35 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
8050
8060
  }
8051
8061
  }
8052
8062
 
8053
- .complete {
8054
- transition: width 2s;
8063
+ .meter .complete {
8064
+ transition: flex-basis 2s;
8055
8065
  }
8056
8066
 
8057
- .incomplete {
8067
+ .meter .incomplete {
8058
8068
  flex-grow: 1;
8059
8069
  }
8060
8070
 
8061
8071
  .etc {
8062
- font-size: 0.7em;
8072
+ display: flex;
8073
+ flex-direction: row;
8063
8074
  background: rgba(0, 0, 0, 0.07);
8064
8075
  font-weight: bold;
8065
8076
  white-space: nowrap;
8066
- border-top-right-radius: var(--curvature);
8067
- border-bottom-right-radius: var(--curvature);
8068
8077
  color: rgba(0, 0, 0, 0.5);
8069
8078
  align-self: center;
8070
- padding: 2px 6px;
8079
+ padding: 0px 6px;
8080
+ align-self: stretch;
8081
+ align-items: center;
8082
+ }
8083
+
8084
+ .etc > div {
8085
+ font-size: 0.7em;
8086
+ }
8087
+
8088
+ .wrapper *::last-child {
8089
+ border-top-right-radius: var(--curvature);
8090
+ border-bottom-right-radius: var(--curvature);
8091
+ overflow: hidden;
8071
8092
  }
8072
8093
 
8073
8094
  .meter.done > span:after,
@@ -8078,11 +8099,26 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
8078
8099
  .meter.done > span {
8079
8100
  background: rgb(var(--success-rgb));
8080
8101
  }
8081
- `,t([ge({type:Number})],Tc.prototype,"total",void 0),t([ge({type:Number})],Tc.prototype,"current",void 0),t([ge({type:Number})],Tc.prototype,"pct",void 0),t([ge({type:Boolean})],Tc.prototype,"done",void 0),t([ge({type:String})],Tc.prototype,"eta",void 0),t([ge({type:String,attribute:!1})],Tc.prototype,"estimatedCompletionDate",void 0),t([ge({type:Boolean})],Tc.prototype,"showEstimatedCompletion",void 0),t([ge({type:Boolean})],Tc.prototype,"showPercentage",void 0);class $c extends ue{constructor(){super(...arguments),this.refreshes=0}updated(t){super.updated(t),t.has("uuid")&&this.refresh()}refresh(){Wt(`/api/v2/flow_starts.json?uuid=${this.uuid}`).then((t=>{if(t.length>0){this.refreshes++;const e=t[0];this.started=e.progress.started,this.total=e.progress.total;const i=(new Date).getTime()-new Date(e.created_on).getTime(),o=this.started/i,n=new Date((new Date).getTime()+(this.total-this.started)/o),s=new Date;s.setMonth(s.getMonth()+2),this.eta=n>s?null:n.toISOString(),this.started<this.total&&setTimeout((()=>{this.refresh()}),Math.min(1e3*this.refreshes,6e4))}}))}render(){return j`<temba-progress
8102
+ `,t([ge({type:Number})],Tc.prototype,"total",void 0),t([ge({type:Number})],Tc.prototype,"current",void 0),t([ge({type:Number})],Tc.prototype,"pct",void 0),t([ge({type:Boolean})],Tc.prototype,"done",void 0),t([ge({type:String})],Tc.prototype,"eta",void 0),t([ge({type:String,attribute:!1})],Tc.prototype,"estimatedCompletionDate",void 0),t([ge({type:Boolean})],Tc.prototype,"showEstimatedCompletion",void 0),t([ge({type:Boolean})],Tc.prototype,"showPercentage",void 0),t([ge({type:String})],Tc.prototype,"message",void 0);class $c extends ue{constructor(){super(...arguments),this.refreshes=0,this.complete=!1,this.running=!1}updated(t){super.updated(t),t.has("id")&&this.refresh()}interruptStart(){var t,e;t=this.interruptTitle,e=this.interruptEndpoint,window.showModax(t,e)}refresh(){Wt(this.statusEndpoint).then((t=>{if(t.length>0){this.refreshes++;const e=t[0];if(this.current=e.progress.current,this.total=e.progress.total,this.complete="Completed"==e.status||"Failed"==e.status||"Interrupted"==e.status,this.running="Started"===e.status,"Pending"===e.status?this.message="Preparing to start..":"Queued"===e.status?this.message="Waiting..":this.message=null,"Started"===e.status){const t=(new Date).getTime()-new Date(e.modified_on).getTime(),i=this.current/t;if(i>.1){const t=new Date((new Date).getTime()+(this.total-this.current)/i),e=new Date;e.setMonth(e.getMonth()+2),this.eta=t>e?null:t.toISOString()}}!this.complete&&this.current<this.total&&setTimeout((()=>{this.refresh()}),Math.min(1e3*this.refreshes,6e4)),this.complete&&this.scheduleRemoval()}}))}scheduleRemoval(){setTimeout((()=>{this.remove()}),5e3)}render(){return j`<temba-progress
8082
8103
  total=${this.total}
8083
- current=${this.started}
8104
+ current=${this.current}
8084
8105
  eta=${this.eta}
8085
- ></temba-progress>`}}function Oc(t,e){window.customElements.get(t)||window.customElements.define(t,e)}t([ge({type:String})],$c.prototype,"uuid",void 0),t([ge({type:Number})],$c.prototype,"started",void 0),t([ge({type:Number})],$c.prototype,"total",void 0),t([ge({type:Number})],$c.prototype,"refreshes",void 0),t([ge({type:String})],$c.prototype,"eta",void 0),Oc("temba-anchor",wh),Oc("temba-alert",dh),Oc("temba-store",wr),Oc("temba-textinput",ze),Oc("temba-datepicker",Uh),Oc("temba-date",Kh),Oc("temba-completion",ul),Oc("temba-checkbox",be),Oc("temba-select",dl),Oc("temba-options",kr),Oc("temba-loading",yl),Oc("temba-lightbox",ic),Oc("temba-button",vl),Oc("temba-omnibox",fh),Oc("temba-tip",yh),Oc("temba-contact-name",Eh),Oc("temba-contact-name-fetch",Fh),Oc("temba-contact-field",Lh),Oc("temba-contact-fields",$h),Oc("temba-field-manager",Vh),Oc("temba-urn",Th),Oc("temba-content-menu",Yh),Oc("temba-field",bl),Oc("temba-dialog",gl),Oc("temba-modax",fl),Oc("temba-charcount",Tl),Oc("temba-contact-chat",rh),Oc("temba-contact-details",class extends Ll{static get styles(){return r`
8106
+ message=${this.message}
8107
+ >
8108
+ ${this.running?j`<temba-icon
8109
+ name="close"
8110
+ @click=${this.interruptStart}
8111
+ ></temba-icon>`:null}
8112
+ </temba-progress>`}}function Oc(t,e){window.customElements.get(t)||window.customElements.define(t,e)}$c.styles=r`
8113
+ temba-icon[name='close'] {
8114
+ cursor: pointer;
8115
+ margin: 0 4px;
8116
+ }
8117
+
8118
+ temba-icon[name='close']:hover {
8119
+ color: var(--color-primary-dark);
8120
+ }
8121
+ `,t([ge({type:String})],$c.prototype,"id",void 0),t([ge({type:Number})],$c.prototype,"current",void 0),t([ge({type:Number})],$c.prototype,"total",void 0),t([ge({type:Number})],$c.prototype,"refreshes",void 0),t([ge({type:String})],$c.prototype,"eta",void 0),t([ge({type:Boolean})],$c.prototype,"complete",void 0),t([ge({type:Boolean})],$c.prototype,"running",void 0),t([ge({type:String})],$c.prototype,"message",void 0),t([ge({type:String})],$c.prototype,"statusEndpoint",void 0),t([ge({type:String})],$c.prototype,"interruptTitle",void 0),t([ge({type:String})],$c.prototype,"interruptEndpoint",void 0),Oc("temba-anchor",wh),Oc("temba-alert",dh),Oc("temba-store",wr),Oc("temba-textinput",ze),Oc("temba-datepicker",Uh),Oc("temba-date",Kh),Oc("temba-completion",ul),Oc("temba-checkbox",be),Oc("temba-select",dl),Oc("temba-options",kr),Oc("temba-loading",yl),Oc("temba-lightbox",ic),Oc("temba-button",vl),Oc("temba-omnibox",fh),Oc("temba-tip",yh),Oc("temba-contact-name",Eh),Oc("temba-contact-name-fetch",Fh),Oc("temba-contact-field",Lh),Oc("temba-contact-fields",$h),Oc("temba-field-manager",Vh),Oc("temba-urn",Th),Oc("temba-content-menu",Yh),Oc("temba-field",bl),Oc("temba-dialog",gl),Oc("temba-modax",fl),Oc("temba-charcount",Tl),Oc("temba-contact-chat",rh),Oc("temba-contact-details",class extends Ll{static get styles(){return r`
8086
8122
  .urn {
8087
8123
  display: flex;
8088
8124
  padding: 0.4em 1em 0.8em 1em;
@@ -8201,7 +8237,7 @@ const{I:gc}=rt,fc=()=>document.createComment(""),vc=(t,e,i)=>{const o=t._$AA.par
8201
8237
  </div>`}}renderHeader(){return j`<div class="header">
8202
8238
  <temba-icon name="notification"></temba-icon>
8203
8239
  <div class="title">Notifications</div>
8204
- </div>`}handleSelection(t){super.handleSelected(t)}scrollToTop(){window.setTimeout((()=>{this.shadowRoot.querySelector("temba-options").scrollToTop()}),1e3)}}),Oc("temba-list",ah),Oc("temba-sortable-list",Hh),Oc("temba-run-list",Rh),Oc("temba-flow-details",qh),Oc("temba-label",Sh),Oc("temba-menu",xh),Oc("temba-remote",tc),Oc("temba-contact-search",uh),Oc("temba-icon",ph),Oc("temba-dropdown",kh),Oc("temba-tabs",Ah),Oc("temba-tab",Ch),Oc("temba-contact-badges",Mh),Oc("temba-contact-pending",Dh),Oc("temba-contact-tickets",Ph),Oc("temba-slider",Nh),Oc("temba-content-menu",Yh),Oc("temba-compose",ec),Oc("temba-color-picker",oc),Oc("temba-resizer",nc),Oc("temba-thumbnail",rc),Oc("temba-webchat",hc),Oc("temba-image-picker",dc),Oc("temba-mask",uc),Oc("temba-user",pc),Oc("temba-template-editor",mc),Oc("temba-toast",kc),Oc("temba-chat",ql),Oc("temba-media-picker",Cc),Oc("temba-contact-notepad",Sc),Oc("temba-outbox-monitor",Ec),Oc("temba-progress",Tc),Oc("temba-flowstart-progress",$c);class Lc extends lt{static get styles(){return r`
8240
+ </div>`}handleSelection(t){super.handleSelected(t)}scrollToTop(){window.setTimeout((()=>{this.shadowRoot.querySelector("temba-options").scrollToTop()}),1e3)}}),Oc("temba-list",ah),Oc("temba-sortable-list",Hh),Oc("temba-run-list",Rh),Oc("temba-flow-details",qh),Oc("temba-label",Sh),Oc("temba-menu",xh),Oc("temba-remote",tc),Oc("temba-contact-search",uh),Oc("temba-icon",ph),Oc("temba-dropdown",kh),Oc("temba-tabs",Ah),Oc("temba-tab",Ch),Oc("temba-contact-badges",Mh),Oc("temba-contact-pending",Dh),Oc("temba-contact-tickets",Ph),Oc("temba-slider",Nh),Oc("temba-content-menu",Yh),Oc("temba-compose",ec),Oc("temba-color-picker",oc),Oc("temba-resizer",nc),Oc("temba-thumbnail",rc),Oc("temba-webchat",hc),Oc("temba-image-picker",dc),Oc("temba-mask",uc),Oc("temba-user",pc),Oc("temba-template-editor",mc),Oc("temba-toast",kc),Oc("temba-chat",ql),Oc("temba-media-picker",Cc),Oc("temba-contact-notepad",Sc),Oc("temba-outbox-monitor",Ec),Oc("temba-progress",Tc),Oc("temba-start-progress",$c);class Lc extends lt{static get styles(){return r`
8205
8241
  :host {
8206
8242
  line-height: normal;
8207
8243
  }