@momentum-ui/web-components 2.22.4 → 2.22.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/8028.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8028],{38028:(t,e,a)=>{a(80528),a(61200),a(69788);var n,i=a(31890),o=a(26283),r=a(26272),s=a(41488),c=a(40333),l=a(23968),p=a(97822),h=a(8229),d=a(37782),m=a(22887),y=a(3553),u=function(t,e,a,n){var i,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,a,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(o<3?i(r):o>3?i(e,a,r):i(e,a))||r);return o>3&&r&&Object.defineProperty(e,a,r),r};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[r.A,y.A]}isPresenceType(t){return m.eO.includes(t)}firstUpdated(){const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t){const{presenceColor:e,presenceIcon:a}=(0,m.E0)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=a}}updated(t){super.updated(t);const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e&&(t.has("type")||t.has("presenceType")||t.has("newMomentum"))){const{presenceColor:t,presenceIcon:a}=(0,m.E0)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=a}t.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const t=this.title.trim().split(" ");return 1===t.length?t[0].charAt(0):t[0].charAt(0)+t[t.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(t){return this.iconNameMap[t]||""}get chatIconSize(){return this.iconSize}get iconSize(){return(this.size/2).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?s.html` <md-loading></md-loading> `:c.nothing}get avatarLetter(){return this.title?s.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[8028],{38028:(t,e,i)=>{i(80528),i(61200),i(69788);var a,n=i(31890),o=i(26283),s=i(26272),r=i(41488),c=i(40333),l=i(23968),p=i(97822),h=i(8229),d=i(37782),m=i(22887),y=i(3553),u=function(t,e,i,a){var n,o=arguments.length,s=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,a);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[s.A,y.A]}isPresenceType(t){return m.eO.includes(t)}firstUpdated(){const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t){const{presenceColor:e,presenceIcon:i}=(0,m.E0)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}}updated(t){super.updated(t);const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e&&(t.has("type")||t.has("presenceType")||t.has("newMomentum"))){const{presenceColor:t,presenceIcon:i}=(0,m.E0)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}t.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const t=this.title.trim().split(" ");return 1===t.length?t[0].charAt(0):t[0].charAt(0)+t[t.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(t){return this.iconNameMap[t]||""}get chatIconSize(){return this.iconSize}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?r.html` <md-loading></md-loading> `:c.nothing}get avatarLetter(){return this.title?r.html`
2
2
  <span class="md-avatar__letter ${(0,l.classMap)(this.avatarLetterClassMap)}">
3
3
  ${this.pretifyTitle}
4
4
  <slot></slot>
5
5
  ${this.renderIsTyping}
6
6
  </span>
7
- `:c.nothing}get avatarIcon(){return s.html`
7
+ `:c.nothing}get avatarIcon(){return r.html`
8
8
  <span class="md-avatar__icon ${(0,l.classMap)(this.avatarStyleMap)}">
9
9
  <md-icon
10
10
  .name=${this.iconName}
@@ -12,9 +12,9 @@
12
12
  .size=${this.newMomentum?this.iconSize:""}
13
13
  ></md-icon>
14
14
  </span>
15
- `}get avatarImage(){return s.html`
16
- ${(0,d.until)(this.loadImage().then((t=>(this.handleImageLoad(),s.html` ${t} `))).catch((()=>this.handleImageError())),s.html` ${this.iconName?this.avatarIcon:this.title?s.html` ${this.avatarLetter} `:c.nothing} `)}
17
- `}loadImage(){return t=this,e=void 0,n=function*(){return new Promise(((t,e)=>{const a=document.createElement("img");a.src=this.src,a.alt=this.alt,a.onload=()=>t(a),a.onerror=t=>e(t),a.classList.add("md-avatar__img"),a.classList.toggle("md-avatar__img--hidden",!this.imageLoaded)}))},new((a=void 0)||(a=Promise))((function(i,o){function r(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof a?e:new a((function(t){t(e)}))).then(r,s)}c((n=n.apply(t,e||[])).next())}));var t,e,a,n}handleImageLoad(){this.imageLoaded=!0}handleImageError(){this.imageErrored=!0}handleKeyDown(t){if(!this.clickable)return;const{code:e}=t;(0,o.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.clickable&&(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}getBrandOrDesignIconSet(t){return new Set(["webex-app-icon-color-container","social-fbmessenger-color","apple-business-chat-color","social-line-color","social-viber-color","social-x","social-whatsapp-color","social-wechat-color"]).has(t)?"momentumBrandVisuals":"momentumDesign"}get avatarContent(){return this.src&&!this.imageErrored?this.avatarImage:this.iconName?this.avatarIcon:this.title?this.avatarLetter:c.nothing}renderPresence(){return this.newMomentum&&(this.presenceType||this.type)&&"self"!==this.type&&this.presenceIcon?s.html`
15
+ `}get avatarImage(){return r.html`
16
+ ${(0,d.until)(this.loadImage().then((t=>(this.handleImageLoad(),r.html` ${t} `))).catch((()=>this.handleImageError())),r.html` ${this.iconName?this.avatarIcon:this.title?r.html` ${this.avatarLetter} `:c.nothing} `)}
17
+ `}loadImage(){return t=this,e=void 0,a=function*(){return new Promise(((t,e)=>{const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.onload=()=>t(i),i.onerror=t=>e(t),i.classList.add("md-avatar__img"),i.classList.toggle("md-avatar__img--hidden",!this.imageLoaded)}))},new((i=void 0)||(i=Promise))((function(n,o){function s(t){try{c(a.next(t))}catch(t){o(t)}}function r(t){try{c(a.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,r)}c((a=a.apply(t,e||[])).next())}));var t,e,i,a}handleImageLoad(){this.imageLoaded=!0}handleImageError(){this.imageErrored=!0}handleKeyDown(t){if(!this.clickable)return;const{code:e}=t;(0,o.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.clickable&&(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}getBrandOrDesignIconSet(t){return new Set(["webex-app-icon-color-container","social-fbmessenger-color","apple-business-chat-color","social-line-color","social-viber-color","social-x","social-whatsapp-color","social-wechat-color"]).has(t)?"momentumBrandVisuals":"momentumDesign"}get avatarContent(){return this.src&&!this.imageErrored?this.avatarImage:this.iconName?this.avatarIcon:this.title?this.avatarLetter:c.nothing}renderPresence(){return this.newMomentum&&(this.presenceType||this.type)&&"self"!==this.type&&this.presenceIcon?r.html`
18
18
  <md-presence
19
19
  class="avatar-presence"
20
20
  name="${this.presenceIcon}"
@@ -22,11 +22,11 @@
22
22
  size="${this.size}"
23
23
  >
24
24
  </md-presence>
25
- `:c.nothing}renderAvatarContent(){const t=this.getIconName(this.type);if("channel-custom"===this.type)return s.html`
25
+ `:c.nothing}renderAvatarContent(){const t=this.getIconName(this.type);if("channel-custom"===this.type)return r.html`
26
26
  <span class="md-avatar__logo" data-channel-style=${this.avatarStyle} data-channel-state=${this.state}>
27
27
  <slot></slot>
28
28
  </span>
29
- `;if(t){const e=this.getBrandOrDesignIconSet(t);return s.html`
29
+ `;if(t){const e=this.getBrandOrDesignIconSet(t);return r.html`
30
30
  <span
31
31
  class="md-avatar__logo ${this.type}"
32
32
  data-channel-style=${this.avatarStyle}
@@ -39,7 +39,7 @@
39
39
  color="var(--icon-color-${this.type})"
40
40
  ></md-icon>
41
41
  </span>
42
- `}return this.avatarContent}render(){return s.html`
42
+ `}return this.avatarContent}render(){return r.html`
43
43
  <div
44
44
  part="avatar"
45
45
  class="md-avatar
@@ -50,12 +50,12 @@
50
50
  tabindex=${(0,p.ifDefined)(this.tabIndex||void 0)}
51
51
  aria-label=${(0,p.ifDefined)(this.label)}
52
52
  >
53
- ${"self"===this.type?s.html`
53
+ ${"self"===this.type?r.html`
54
54
  <span class="md-avatar__self" style=${(0,h.styleMap)(this.avatarStyleMap)}>
55
55
  <md-icon .name=${this.chatIconName} .iconSet=${"momentumDesign"} .size=${this.chatIconSize}></md-icon>
56
56
  </span>
57
57
  `:this.renderAvatarContent()}
58
- ${this.hasNotification?s.html` <span class="md-avatar__notification-badge"></span> `:c.nothing}
58
+ ${this.hasNotification?r.html` <span class="md-avatar__notification-badge"></span> `:c.nothing}
59
59
  ${this.renderPresence()}
60
60
  </div>
61
- `}};u([(0,s.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),u([(0,s.property)({type:String})],e.prototype,"alt",void 0),u([(0,s.property)({type:String})],e.prototype,"src",void 0),u([(0,s.property)({type:String})],e.prototype,"label",void 0),u([(0,s.property)({type:String})],e.prototype,"title",void 0),u([(0,s.property)({type:String})],e.prototype,"color",void 0),u([(0,s.property)({type:Boolean})],e.prototype,"decrypting",void 0),u([(0,s.property)({type:String})],e.prototype,"role",void 0),u([(0,s.property)({type:String,attribute:"icon-name"})],e.prototype,"iconName",void 0),u([(0,s.property)({type:Boolean})],e.prototype,"failurePresence",void 0),u([(0,s.property)({type:String})],e.prototype,"type",void 0),u([(0,s.property)({type:String,attribute:"presence-type"})],e.prototype,"presenceType",void 0),u([(0,s.property)({type:Boolean})],e.prototype,"newMomentum",void 0),u([(0,s.property)({type:Boolean})],e.prototype,"typing",void 0),u([(0,s.property)({type:Number})],e.prototype,"size",void 0),u([(0,s.property)({type:Boolean,attribute:"has-notification"})],e.prototype,"hasNotification",void 0),u([(0,s.property)({type:Boolean})],e.prototype,"clickable",void 0),u([(0,s.property)({attribute:!1})],e.prototype,"clickFunction",void 0),u([(0,s.property)({type:String,attribute:"avatar-style"})],e.prototype,"avatarStyle",void 0),u([(0,s.property)({type:String})],e.prototype,"state",void 0),u([(0,s.internalProperty)()],e.prototype,"imageLoaded",void 0),u([(0,s.internalProperty)()],e.prototype,"imageErrored",void 0),u([(0,s.internalProperty)()],e.prototype,"presenceColor",void 0),u([(0,s.internalProperty)()],e.prototype,"presenceIcon",void 0),e=u([(0,i.w)("md-avatar")],e),t.ELEMENT=e}(n||(n={}))}}]);
61
+ `}};u([(0,r.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),u([(0,r.property)({type:String})],e.prototype,"alt",void 0),u([(0,r.property)({type:String})],e.prototype,"src",void 0),u([(0,r.property)({type:String})],e.prototype,"label",void 0),u([(0,r.property)({type:String})],e.prototype,"title",void 0),u([(0,r.property)({type:String})],e.prototype,"color",void 0),u([(0,r.property)({type:Boolean})],e.prototype,"decrypting",void 0),u([(0,r.property)({type:String})],e.prototype,"role",void 0),u([(0,r.property)({type:String,attribute:"icon-name"})],e.prototype,"iconName",void 0),u([(0,r.property)({type:Boolean})],e.prototype,"failurePresence",void 0),u([(0,r.property)({type:String})],e.prototype,"type",void 0),u([(0,r.property)({type:String,attribute:"presence-type"})],e.prototype,"presenceType",void 0),u([(0,r.property)({type:Boolean})],e.prototype,"newMomentum",void 0),u([(0,r.property)({type:Boolean})],e.prototype,"typing",void 0),u([(0,r.property)({type:Number})],e.prototype,"size",void 0),u([(0,r.property)({type:Boolean,attribute:"has-notification"})],e.prototype,"hasNotification",void 0),u([(0,r.property)({type:Boolean})],e.prototype,"clickable",void 0),u([(0,r.property)({attribute:!1})],e.prototype,"clickFunction",void 0),u([(0,r.property)({type:String,attribute:"avatar-style"})],e.prototype,"avatarStyle",void 0),u([(0,r.property)({type:String})],e.prototype,"state",void 0),u([(0,r.internalProperty)()],e.prototype,"imageLoaded",void 0),u([(0,r.internalProperty)()],e.prototype,"imageErrored",void 0),u([(0,r.internalProperty)()],e.prototype,"presenceColor",void 0),u([(0,r.internalProperty)()],e.prototype,"presenceIcon",void 0),e=u([(0,n.w)("md-avatar")],e),t.ELEMENT=e}(a||(a={}))}}]);
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/until.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/until.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,n,o,a,s,l,c)=>(()=>{"use strict";var p,h={8229:e=>{e.exports=t},17518:e=>{e.exports=l},23968:e=>{e.exports=r},32022:e=>{e.exports=o},37782:e=>{e.exports=c},38028:(e,t,i)=>{i.r(t),i.d(t,{Avatar:()=>r}),i(80528),i(61200),i(69788);var r,n=i(31890),o=i(26283),a=i(26272),s=i(41488),l=i(40333),c=i(23968),p=i(97822),h=i(8229),m=i(37782),d=i(22887),u=i(3553),y=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends s.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._tabIndex;this._tabIndex=e,this.requestUpdate("tabIndex",t)}static get styles(){return[a.A,u.A]}isPresenceType(e){return d.eO.includes(e)}firstUpdated(){const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e){const{presenceColor:t,presenceIcon:i}=(0,d.E0)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}}updated(e){super.updated(e);const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t&&(e.has("type")||e.has("presenceType")||e.has("newMomentum"))){const{presenceColor:e,presenceIcon:i}=(0,d.E0)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}e.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const e=this.title.trim().split(" ");return 1===e.length?e[0].charAt(0):e[0].charAt(0)+e[e.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(e){return this.iconNameMap[e]||""}get chatIconSize(){return this.iconSize}get iconSize(){return(this.size/2).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?s.html` <md-loading></md-loading> `:l.nothing}get avatarLetter(){return this.title?s.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/until.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/until.js"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,((e,t,i,r,n,o,a,s,l,c)=>(()=>{"use strict";var p,h={8229:e=>{e.exports=t},17518:e=>{e.exports=l},23968:e=>{e.exports=r},32022:e=>{e.exports=o},37782:e=>{e.exports=c},38028:(e,t,i)=>{i.r(t),i.d(t,{Avatar:()=>r}),i(80528),i(61200),i(69788);var r,n=i(31890),o=i(26283),a=i(26272),s=i(41488),l=i(40333),c=i(23968),p=i(97822),h=i(8229),m=i(37782),d=i(22887),u=i(3553),y=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};!function(e){let t=class extends s.LitElement{constructor(){super(...arguments),this._tabIndex=0,this.alt="",this.src="",this.label="",this.title="",this.color="",this.decrypting=!1,this.role="img",this.iconName="",this.failurePresence=!1,this.type="",this.newMomentum=!1,this.typing=!1,this.size=40,this.hasNotification=!1,this.clickable=!1,this.avatarStyle="default",this.state="rest",this.imageLoaded=!1,this.imageErrored=!1,this.presenceColor="",this.presenceIcon="",this.iconNameMap={"channel-chat":"chat-filled","channel-social":"sms-message-filled","channel-sms-inbound":"sms-filled","channel-sms-outbound":"sms-outgoing-filled","channel-email-inbound":"email-filled","channel-email-outbound":"email-outgoing-filled","channel-call":"handset-filled","channel-callback":"outgoing-call-legacy-filled","channel-headset":"headset-filled","channel-campaign":"campaign-management-bold","channel-emoji":"emoji-happy-filled","channel-webex":"webex-app-icon-color-container","channel-fb-messenger":"social-fbmessenger-color","channel-apple-chat":"apple-business-chat-color","channel-line":"social-line-color","channel-twitter-x":"social-x","channel-viber":"social-viber-color","channel-whats-app":"social-whatsapp-color","channel-we-chat":"social-wechat-color","channel-spam":"participant-unknown-bold"}}get tabIndex(){return this._tabIndex}set tabIndex(e){const t=this._tabIndex;this._tabIndex=e,this.requestUpdate("tabIndex",t)}static get styles(){return[a.A,u.A]}isPresenceType(e){return d.eO.includes(e)}firstUpdated(){const e=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(e){const{presenceColor:t,presenceIcon:i}=(0,d.E0)(e,this.failurePresence,this.newMomentum);this.presenceColor=t,this.presenceIcon=i}}updated(e){super.updated(e);const t=this.presenceType||(this.isPresenceType(this.type)?this.type:"");if(t&&(e.has("type")||e.has("presenceType")||e.has("newMomentum"))){const{presenceColor:e,presenceIcon:i}=(0,d.E0)(t,this.failurePresence,this.newMomentum);this.presenceColor=e,this.presenceIcon=i}e.has("role")&&this.style.setProperty("--avatar-cursor","button"===this.role?"pointer":"default")}get avatarClassMap(){return Object.assign(Object.assign({},this.newMomentum&&"bot"!==this.type||!this.type?{}:{[`md-avatar--${this.type}`]:!0}),{[`md-avatar--${this.size}`]:!!this.size,[`md-avatar--${this.color}`]:!!this.color})}get avatarLetterClassMap(){return{"md-decrypting":this.decrypting,[`md-avatar--${this.color}`]:this.color,"new-momentum":this.newMomentum}}get avatarStyleMap(){return{[`md-avatar--${this.color}`]:this.color}}get pretifyTitle(){if(this.title.length){const e=this.title.trim().split(" ");return 1===e.length?e[0].charAt(0):e[0].charAt(0)+e[e.length-1].charAt(0)}return this.title}get chatIconName(){return"chat-filled"}getIconName(e){return this.iconNameMap[e]||""}get chatIconSize(){return this.iconSize}get iconSize(){return 24===this.size?"16":28===this.size?"18":32===this.size?"20":36===this.size?"22":40===this.size?"24":48===this.size?"28":56===this.size?"32":64===this.size?"36":72===this.size?"40":Math.round(this.size/1.7).toString()}get renderIsTyping(){return"typing"===this.type||this.typing?s.html` <md-loading></md-loading> `:l.nothing}get avatarLetter(){return this.title?s.html`
2
2
  <span class="md-avatar__letter ${(0,c.classMap)(this.avatarLetterClassMap)}">
3
3
  ${this.pretifyTitle}
4
4
  <slot></slot>
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","lit-html/directives/style-map","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("lit-html/directives/style-map"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):t(e["lit-element"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["lit-html/directives/style-map"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,((e,t,i,o,s,r,n,l)=>(()=>{"use strict";var a,d={8229:e=>{e.exports=s},23968:e=>{e.exports=i},32022:e=>{e.exports=r},40333:e=>{e.exports=t},41488:t=>{t.exports=e},60554:e=>{e.exports=n},63704:(e,t,i)=>{var o,s=i(31890),r=i(26272),n=i(41488),l=i(40333),a=i(23968),d=i(97822),m=i(92019),c=function(e,t,i,o){var s,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.color="",this.bgColor="",this.textColor="",this.height="",this.width="",this.outlined=!1,this.compact=!1,this.circle=!1,this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?n.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/style-map","lit-html","lit-html/directives/class-map","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit-html/directives/class-map.js","lit-html/directives/until.js"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/class-map"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit-html/directives/class-map.js"),require("lit-html/directives/until.js")):t(e["lit-element"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/class-map"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit-html/directives/class-map.js"],e["lit-html/directives/until.js"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,((e,t,i,o,s,r,n,l,a,d)=>(()=>{"use strict";var m,c={8229:e=>{e.exports=t},17518:e=>{e.exports=a},23968:e=>{e.exports=o},32022:e=>{e.exports=r},37782:e=>{e.exports=d},40333:e=>{e.exports=i},41488:t=>{t.exports=e},60554:e=>{e.exports=n},63704:(e,t,i)=>{var o,s=i(31890),r=i(26272),n=i(41488),l=i(40333),a=i(23968),d=i(97822),m=i(92019),c=function(e,t,i,o){var s,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.color="",this.bgColor="",this.textColor="",this.height="",this.width="",this.outlined=!1,this.compact=!1,this.circle=!1,this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?n.html`
2
2
  <style>
3
3
  :host .md-badge {
4
4
  ${this.renderBgColor()};
@@ -30,7 +30,7 @@
30
30
  `)():l.nothing}
31
31
  <slot></slot>
32
32
  </span>
33
- `}};c([(0,n.property)({type:String})],t.prototype,"ariaLabel",void 0),c([(0,n.property)({type:String})],t.prototype,"color",void 0),c([(0,n.property)({type:String})],t.prototype,"bgColor",void 0),c([(0,n.property)({type:String})],t.prototype,"textColor",void 0),c([(0,n.property)({type:String})],t.prototype,"height",void 0),c([(0,n.property)({type:String})],t.prototype,"width",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"outlined",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"compact",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"circle",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"small",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"split",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"disabled",void 0),c([(0,n.property)({type:String})],t.prototype,"tabIndexing",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaHiddenSplits",void 0),t=c([(0,s.w)("md-badge")],t),e.ELEMENT=t}(o||(o={}))},85314:e=>{e.exports=l},86610:(e,t,i)=>{i.r(t),i.d(t,{TaskItem:()=>o}),i(63704),i(61200);var o,s=i(31890),r=i(26272),n=i(41488),l=i(40333),a=i(23968),d=i(50182),m=function(e,t,i,o){var s,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.mediaType="call",this.status="",this.popovertitle="",this.queue="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.renderTaskType=()=>{switch(this.mediaType.toLowerCase()){case"telephony":return n.html`
33
+ `}};c([(0,n.property)({type:String})],t.prototype,"ariaLabel",void 0),c([(0,n.property)({type:String})],t.prototype,"color",void 0),c([(0,n.property)({type:String})],t.prototype,"bgColor",void 0),c([(0,n.property)({type:String})],t.prototype,"textColor",void 0),c([(0,n.property)({type:String})],t.prototype,"height",void 0),c([(0,n.property)({type:String})],t.prototype,"width",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"outlined",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"compact",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"circle",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"small",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"split",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"disabled",void 0),c([(0,n.property)({type:String})],t.prototype,"tabIndexing",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaHiddenSplits",void 0),t=c([(0,s.w)("md-badge")],t),e.ELEMENT=t}(o||(o={}))},85314:e=>{e.exports=l},86610:(e,t,i)=>{i.r(t),i.d(t,{TaskItem:()=>o}),i(38028),i(63704),i(61200);var o,s=i(31890),r=i(26272),n=i(41488),l=i(40333),a=i(23968),d=i(50182),m=function(e,t,i,o){var s,r=arguments.length,n=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.mediaType="call",this.status="",this.popovertitle="",this.queue="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.renderTaskType=()=>{switch(this.mediaType.toLowerCase()){case"telephony":return n.html`
34
34
  <md-badge color="green" circle>
35
35
  <md-icon name="handset-filled" size="20" iconSet="momentumDesign"></md-icon>
36
36
  </md-badge>
@@ -55,7 +55,12 @@
55
55
  <md-icon name="icon-icon-campaign_18"></md-icon>
56
56
  </md-badge>
57
57
  `;case"outbound-campaign":return n.html`
58
- <md-avatar title="Channel Campaign" type="channel-campaign" avatar-style="default" state="rest"></md-avatar>
58
+ <md-avatar
59
+ title="Channel Campaign"
60
+ type="channel-campaign"
61
+ avatar-style="default"
62
+ state=${this.selected?"active":"rest"}
63
+ ></md-avatar>
59
64
  `;case"chat":return n.html`
60
65
  <md-badge color="blue" circle>
61
66
  <md-icon name="chat-filled" size="20" iconSet="momentumDesign"></md-icon>
@@ -76,7 +81,7 @@
76
81
  <md-badge bgColor="#25D366" circle>
77
82
  <md-icon name="whatsApp_16" iconSet="momentumUI" color="white-100"></md-icon>
78
83
  </md-badge>
79
- `;default:return n.html` <slot name="task-type"></slot> `}},this.renderStatus=()=>{switch(this.status){case"consulting":return n.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"play":return n.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"hold":return n.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"conference":return n.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case"transfered":return n.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case"courtesy_callback":return n.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"campaign":return n.html` <md-icon name="announcement-bold" size="12" iconSet="momentumDesign"></md-icon> `;default:return n.html` <slot name="task-status"></slot> `}}}get title(){return this.displayTitle}set title(e){this.titleValue=e,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(e){this.itemTitleValue=e,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(e){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:e}})),this.blur()}handleKeyDown(e){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:e.code},bubbles:!0,composed:!0}))}renderChatCount(){return this.quantity>0?this.quantity>99?n.html` <span class="new-chat-quantity">99+</span> `:n.html` <span class="new-chat-quantity">${this.quantity}</span> `:l.nothing}getAriaLabel(){var e;if(this.customAriaLabel)return this.customAriaLabel;let t=this.queue;if(!t){const i=this.querySelector('[slot="queue"]');if(i){t=(null===(e=i.textContent)||void 0===e?void 0:e.trim())||i.innerText.trim();const o=t.match(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/);if(o){const[,e=0,i,s]=o.map(Number);(new Date).setHours(e,i,s),t=t.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${e?e+" hours ":""}${i} minutes ${s} seconds`)}}}return`${this.mediaType} ${this.status} ${this.title} ${t} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,d.A]}get sanitizedTabIndexForContainer(){var e;return null!==(e=parseInt(this.tabIndexForContainer))&&void 0!==e?e:0}render(){return n.html`
84
+ `;default:return n.html` <slot name="task-type"></slot> `}},this.renderStatus=()=>{switch(this.status){case"consulting":return n.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"play":return n.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"hold":return n.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"conference":return n.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case"transfered":return n.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case"courtesy_callback":return n.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case"campaign":return n.html` <md-icon name="announcement-bold" size="12" iconSet="momentumDesign"></md-icon> `;default:return n.html` <slot name="task-status"></slot> `}}}get title(){return this.displayTitle}set title(e){this.titleValue=e,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(e){this.itemTitleValue=e,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(e){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:e}})),this.blur()}handleKeyDown(e){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:e.code},bubbles:!0,composed:!0}))}renderChatCount(){return this.quantity<=0?l.nothing:this.quantity>99?n.html` <span class="new-chat-quantity">99+</span> `:n.html` <span class="new-chat-quantity">${this.quantity}</span> `}getAriaLabel(){var e,t;if(this.customAriaLabel)return this.customAriaLabel;let i=this.queue;if(!i){const o=this.querySelector('[slot="queue"]');if(o){i=null!==(t=null===(e=o.textContent)||void 0===e?void 0:e.trim())&&void 0!==t?t:o.innerText.trim();const s=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(i);if(s){const[,e=0,t,o]=s.map(Number);(new Date).setHours(e,t,o),i=i.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${e?e+" hours ":""}${t} minutes ${o} seconds`)}}}return`${this.mediaType} ${this.status} ${this.title} ${i} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,d.A]}get sanitizedTabIndexForContainer(){var e;return null!==(e=parseInt(this.tabIndexForContainer))&&void 0!==e?e:0}render(){return n.html`
80
85
  <div
81
86
  part="task-item-container"
82
87
  class="md-taskitem ${(0,a.classMap)({selected:this.selected})}"
@@ -93,7 +98,8 @@
93
98
  <div class="md-taskitem__content" part="task-item-content">
94
99
  ${this.popovertitle?n.html` <span class="md-taskitem__content_popover_title">${this.popovertitle}</span> `:l.nothing}
95
100
  ${this.title?n.html`
96
- <span class="md-taskitem__content_title ${(0,a.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
101
+ <span
102
+ class="md-taskitem__content_title ${(0,a.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
97
103
  >${this.title}</span
98
104
  >
99
105
  `:l.nothing}
@@ -113,4 +119,4 @@
113
119
  ${this.renderChatCount()}
114
120
  </div>
115
121
  </div>
116
- `}};m([(0,n.property)({type:String})],t.prototype,"mediaType",void 0),m([(0,n.property)({type:String})],t.prototype,"status",void 0),m([(0,n.property)({type:String})],t.prototype,"popovertitle",void 0),m([(0,n.property)({type:String})],t.prototype,"queue",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"accepted",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"displayOnlyTitle",void 0),m([(0,n.property)({type:Number})],t.prototype,"quantity",void 0),m([(0,n.property)({type:String})],t.prototype,"lastmessage",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"selected",void 0),m([(0,n.property)({type:String})],t.prototype,"customAriaLabel",void 0),m([(0,n.property)({type:String})],t.prototype,"iconSrc",void 0),m([(0,n.property)({type:String})],t.prototype,"tabIndexForContainer",void 0),m([(0,n.property)({type:String,reflect:!0})],t.prototype,"title",null),m([(0,n.property)({type:String,reflect:!0,attribute:"item-title"})],t.prototype,"itemTitle",null),t=m([(0,s.w)("md-task-item")],t),e.ELEMENT=t}(o||(o={}))},97822:e=>{e.exports=o}},m={};function c(e){var t=m[e];if(void 0!==t)return t.exports;var i=m[e]={exports:{}};return d[e](i,i.exports,c),i.exports}c.m=d,a=[],c.O=(e,t,i,o)=>{if(!t){var s=1/0;for(d=0;d<a.length;d++){for(var[t,i,o]=a[d],r=!0,n=0;n<t.length;n++)(!1&o||s>=o)&&Object.keys(c.O).every((e=>c.O[e](t[n])))?t.splice(n--,1):(r=!1,o<s&&(s=o));if(r){a.splice(d--,1);var l=i();void 0!==l&&(e=l)}}return e}o=o||0;for(var d=a.length;d>0&&a[d-1][2]>o;d--)a[d]=a[d-1];a[d]=[t,i,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={8111:0,8339:0};c.O.j=t=>0===e[t];var t=(t,i)=>{var o,s,[r,n,l]=i,a=0;if(r.some((t=>0!==e[t]))){for(o in n)c.o(n,o)&&(c.m[o]=n[o]);if(l)var d=l(c)}for(t&&t(i);a<r.length;a++)s=r[a],c.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return c.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var p=c.O(void 0,[4367,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,2019,182],(()=>c(86610)));return c.O(p)})()));
122
+ `}};m([(0,n.property)({type:String})],t.prototype,"mediaType",void 0),m([(0,n.property)({type:String})],t.prototype,"status",void 0),m([(0,n.property)({type:String})],t.prototype,"popovertitle",void 0),m([(0,n.property)({type:String})],t.prototype,"queue",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"accepted",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"displayOnlyTitle",void 0),m([(0,n.property)({type:Number})],t.prototype,"quantity",void 0),m([(0,n.property)({type:String})],t.prototype,"lastmessage",void 0),m([(0,n.property)({type:Boolean})],t.prototype,"selected",void 0),m([(0,n.property)({type:String})],t.prototype,"customAriaLabel",void 0),m([(0,n.property)({type:String})],t.prototype,"iconSrc",void 0),m([(0,n.property)({type:String})],t.prototype,"tabIndexForContainer",void 0),m([(0,n.property)({type:String,reflect:!0})],t.prototype,"title",null),m([(0,n.property)({type:String,reflect:!0,attribute:"item-title"})],t.prototype,"itemTitle",null),t=m([(0,s.w)("md-task-item")],t),e.ELEMENT=t}(o||(o={}))},97822:e=>{e.exports=s}},p={};function h(e){var t=p[e];if(void 0!==t)return t.exports;var i=p[e]={exports:{}};return c[e](i,i.exports,h),i.exports}h.m=c,m=[],h.O=(e,t,i,o)=>{if(!t){var s=1/0;for(a=0;a<m.length;a++){for(var[t,i,o]=m[a],r=!0,n=0;n<t.length;n++)(!1&o||s>=o)&&Object.keys(h.O).every((e=>h.O[e](t[n])))?t.splice(n--,1):(r=!1,o<s&&(s=o));if(r){m.splice(a--,1);var l=i();void 0!==l&&(e=l)}}return e}o=o||0;for(var a=m.length;a>0&&m[a-1][2]>o;a--)m[a]=m[a-1];m[a]=[t,i,o]},h.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return h.d(t,{a:t}),t},h.d=(e,t)=>{for(var i in t)h.o(t,i)&&!h.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={8111:0,8339:0};h.O.j=t=>0===e[t];var t=(t,i)=>{var o,s,[r,n,l]=i,a=0;if(r.some((t=>0!==e[t]))){for(o in n)h.o(n,o)&&(h.m[o]=n[o]);if(l)var d=l(h)}for(t&&t(i);a<r.length;a++)s=r[a],h.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return h.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=h.O(void 0,[4367,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,3553,6700,528,9788,8028,2019,182],(()=>h(86610)));return h.O(u)})()));
@@ -1 +1 @@
1
- require("../4367"),require("../1890"),require("../6272"),require("../6325"),require("../6283"),require("../9217"),require("../2176"),require("../6798"),require("../5830"),require("../1200"),require("../2576"),require("../2019"),require("../182"),module.exports=require("../comp/md-task-item-entry");
1
+ require("../4367"),require("../1890"),require("../6272"),require("../6325"),require("../6283"),require("../9217"),require("../2176"),require("../6798"),require("../5830"),require("../1200"),require("../2576"),require("../3553"),require("../6700"),require("../528"),require("../9788"),require("../8028"),require("../2019"),require("../182"),module.exports=require("../comp/md-task-item-entry");