@momentum-ui/web-components 2.22.16 → 2.22.17
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/1323.js +2 -2
- package/dist/3135.js +1 -1
- package/dist/754.js +1 -1
- package/dist/8612.js +3 -3
- package/dist/9130.js +1 -1
- package/dist/assets/icons/svg/voxon-horizontal.svg +1 -0
- package/dist/assets/icons/svg/voxon-mark.svg +1 -0
- package/dist/comp/md-card-ai-entry.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +3 -3
- package/dist/comp/md-menu-overlay-entry.js +2 -2
- package/dist/comp/md-popover-entry.js +2 -2
- package/dist/comp/md-task-item-entry.js +19 -17
- package/dist/index-entry.js +20 -18
- package/dist/types/components/floating-modal/FloatingModal.d.ts +1 -0
- package/dist/types/components/menu-overlay/MenuOverlay.d.ts +0 -1
- package/dist/types/components/popover/Popover.d.ts +0 -1
- package/package.json +1 -1
package/dist/1323.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1323],{11323:(e,t,i)=>{var r,s,n=i(90195),o=i(31890),a=i(28373),l=i(66677),h=i(22962),d=i.n(h),p=i(84157),
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1323],{11323:(e,t,i)=>{var r,s,n=i(90195),o=i(31890),a=i(28373),l=i(66677),h=i(22962),d=i.n(h),p=i(84157),v=i.n(p),u=i(68250),c=i.n(u),g=i(69371),y=i.n(g),m=i(4863),E=i(41488),O=i(97822),f=i(16366),w=function(e,t,i,r){var s,n=arguments.length,o=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,i,o):s(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},b=function(e,t,i,r){return new(i||(i=Promise))((function(s,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};!function(e){e.small="260px",e.large="370px"}(r||(r={})),function(e){let t=class extends((0,a.d)(E.LitElement)){constructor(){super(...arguments),this._isOpen=!1,this.size="large",this.maxHeight="",this.customWidth="",this.showArrow=!1,this.disabled=!1,this.placement="bottom",this.allowHoverToggle=!1,this.ariaRole="menu",this.ariaLabel="",this.isDatePicker=!1,this.overlayOffset=15,this.keepOpenOnWindowBlur=!1,this.positioningStrategy=void 0,this.popperInstance=null,this.triggerElement=null,this.updateActiveMenuOverlayOpened=t=>{var i;this===t.target&&(null===(i=e.ELEMENT.activeOverlay)||void 0===i||i.push(t.target))},this.updateActiveMenuOverlayClosed=t=>{var i,r;const s=e.ELEMENT.activeOverlay.indexOf(t.target);this===t.target&&-1!==s&&(e.ELEMENT.activeOverlay.splice(s,1),e.ELEMENT.activeOverlay.length>0?(null===(i=e.ELEMENT.activeOverlay[e.ELEMENT.activeOverlay.length-1])||void 0===i||i.setFocusableElements(),null===(r=e.ELEMENT.activeOverlay[e.ELEMENT.activeOverlay.length-1])||void 0===r||r.focusOnNestedTrigger(this.triggerElement)):this.setFocusableElements())},this.handleTriggerClick=()=>{this.toggleOverlay()},this.setOverlay=(0,l.sg)((e=>{this.disabled||(this.isOpen=e)}),100),this.expandPopup=()=>{this.setOverlay(!0)},this.collapsePopup=()=>{this.setOverlay(!1)},this.handleOutsideOverlayKeydown=t=>b(this,void 0,void 0,(function*(){let i=!1;const r=t.composedPath();r.length&&(i=!!r.find((e=>e===this)),!i)||!this.overlayContainer||t.code!==n.Uz.Escape||(t.preventDefault(),(e.ELEMENT.activeOverlay.length>0?e.ELEMENT.activeOverlay[e.ELEMENT.activeOverlay.length-1]:void 0)===this&&(this.isOpen=!1,yield this.updateComplete,this.focusOnTrigger()))})),this.handleTriggerKeyDown=e=>b(this,void 0,void 0,(function*(){switch(e.code){case n.Uz.Space:case n.Uz.Enter:e.preventDefault(),this.toggleOverlay(),this.isOpen||(yield this.updateComplete,this.focusOnTrigger())}})),this.handleOutsideOverlayClick=e=>{let t=!1;const i=e.composedPath();i.length&&(t=!!i.find((e=>e===this)),t||this.preventClickOutside||(this.isOpen=!1))}}get isOpen(){return this._isOpen}set isOpen(e){const t=this._isOpen;this._isOpen=e,this.handleInstance(e),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",e),this.requestUpdate("isOpen",t)}renderMaxHeight(){return this.maxHeight?`max-height: ${this.maxHeight};`:"max-height: calc(100vh - 48px);"}renderOverflowY(){return this.isDatePicker?"overflow-y: visible;":"overflow-y: auto;"}renderWidth(){return this.customWidth?`width: ${this.customWidth};`:"small"===this.size?`width: ${r.small};`:`width: ${r.large};`}getStyles(){return E.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host .md-menu-overlay .overlay-content {
|
|
4
4
|
${this.renderMaxHeight()};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
${this.renderOverflowY()};
|
|
7
7
|
}
|
|
8
8
|
</style>
|
|
9
|
-
`}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("click",this.handleOutsideOverlayClick),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}checkIsInputField(e){var t;return"md-input"===(null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.isOpen?this.triggerElement.setAttribute("aria-expanded","true"):this.triggerElement.removeAttribute("aria-expanded"))}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return b(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise((e=>setTimeout(e,0))),this.trigger&&(this.triggerElement=this.trigger[0],this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")),this.overlayContainer&&this.isOpen&&(this.handleInstance(!0),this.overlayContainer.toggleAttribute("data-show",!0)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),e.has("isOpen")&&this.updateTriggerElementAriaExpanded()}))}update(e){super.update(e),e.has("isOpen")&&(this.isOpen?(this.activateFocusTrap(),document.addEventListener("menu-item-click",this.handleTriggerClick)):(this.deactivateFocusTrap(),document.removeEventListener("menu-item-click",this.handleTriggerClick)))}updated(e){super.updated(e),e.has("isOpen")&&(this.isOpen?(this.dispatchMenuOpen(),this.triggerElement&&(this.triggerElement.setAttribute("aria-expanded","true"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","true"))):(this.dispatchMenuClose(),this.triggerElement&&(this.triggerElement.removeAttribute("aria-expanded"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","false"))))}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(e){e?this.create():this.destroy()}create(){this.triggerElement&&(this.popperInstance=(0,m.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>b(this,void 0,void 0,(function*(){var e;this.isOpen&&(null===(e=this.popperInstance)||void 0===e||e.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())})),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...m.defaultModifiers,
|
|
9
|
+
`}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("click",this.handleOutsideOverlayClick),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}checkIsInputField(e){var t;return"md-input"===(null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.isOpen?this.triggerElement.setAttribute("aria-expanded","true"):this.triggerElement.removeAttribute("aria-expanded"))}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return b(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise((e=>setTimeout(e,0))),this.trigger&&(this.triggerElement=this.trigger[0],this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")),this.overlayContainer&&this.isOpen&&(this.handleInstance(!0),this.overlayContainer.toggleAttribute("data-show",!0)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),e.has("isOpen")&&this.updateTriggerElementAriaExpanded()}))}update(e){super.update(e),e.has("isOpen")&&(this.isOpen?(this.activateFocusTrap(),document.addEventListener("menu-item-click",this.handleTriggerClick)):(this.deactivateFocusTrap(),document.removeEventListener("menu-item-click",this.handleTriggerClick)))}updated(e){super.updated(e),e.has("isOpen")&&(this.isOpen?(this.dispatchMenuOpen(),this.triggerElement&&(this.triggerElement.setAttribute("aria-expanded","true"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","true"))):(this.dispatchMenuClose(),this.triggerElement&&(this.triggerElement.removeAttribute("aria-expanded"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","false"))))}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(e){e?this.create():this.destroy()}create(){this.triggerElement&&(this.popperInstance=(0,m.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>b(this,void 0,void 0,(function*(){var e;this.isOpen&&(null===(e=this.popperInstance)||void 0===e||e.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())})),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...m.defaultModifiers,v(),c(),y(),d(),{name:"preventOverflow",options:{padding:16}},{name:"offset",options:{offset:({placement:e,reference:t})=>"left-end"===e||"right-end"===e?[t.height+t.y+3,14]:[0,this.overlayOffset]}},{name:"arrow",options:{element:this.arrow,padding:5}},{name:"computeStyles",options:{adaptive:!1}}]}))}destroy(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}toggleOverlay(){this.disabled||(this.isOpen=!this.isOpen)}focusOnTrigger(){requestAnimationFrame((()=>{var e;(null===(e=this.focusableElements)||void 0===e?void 0:e.length)&&this.focusableElements[0].focus()}))}focusInsideOverlay(){this.focusableElements&&(this.focusableElements.length>1?this.setInitialFocus(1):this.focusableElements.length&&this.setInitialFocus())}focusOnNestedTrigger(e){var t;null===(t=this.setFocusOnTrigger)||void 0===t||t.call(this,e)}handleWindowBlurEvent(){this._isOpen&&!this.keepOpenOnWindowBlur&&(this.isOpen=!1)}static get styles(){return[f.A]}render(){return E.html`
|
|
10
10
|
${this.getStyles()}
|
|
11
11
|
<div class="md-menu-overlay">
|
|
12
12
|
<slot name="menu-trigger"></slot>
|
package/dist/3135.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[754,3135,8373],{28373:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(90195),n=s(41488),o=s(18889),a=s(32972),
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[754,3135,8373],{28373:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(90195),n=s(41488),o=s(18889),a=s(32972),l=function(e,t,s,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,s,a):n(t,s))||a);return o>3&&a&&Object.defineProperty(t,s,a),a},c=function(e,t,s,i){return new(s||(s=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function l(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,l)}c((i=i.apply(e,t||[])).next())}))};const r=e=>{if((0,o.V)(r,e))return e;class t extends((0,a.y)(e)){constructor(){super(...arguments),this.focusableElements=[],this.initialFocusComplete=!1,this.focusableTimer=[],this.activeFocusTrap=!1,this.preventClickOutside=!1,this.focusTrapIndex=-1,this.preventScroll=!1,this.shouldWrapFocus=()=>!0,this.handleFocusOnClear=()=>{this.focusTrap(!0)},this.handleOutsideTrapClick=e=>{let t=!1;const s=e.composedPath();s.length&&(t=!!s.find((e=>e===this)),t||this.preventClickOutside||!this.activeFocusTrap?t&&this.activeFocusTrap&&this.initialFocusComplete&&this.handleClickInsideTrap(e):this.deactivateFocusTrap())},this.updateFocusableElements=()=>{this.focusableTimer&&(clearTimeout(this.focusableTimer),this.focusableElements=[]),this.focusableTimer=setTimeout((()=>{this.setFocusableElements()}),10)},this.handleChildFocusTrap=e=>{e.target!==this&&(e.stopPropagation(),this.deactivateFocusTrap(!1))},this.handleChildFocusUntrap=e=>{e.target!==this&&(e.stopPropagation(),this.activateFocusTrap(!1))}}updated(e){if(super.updated(e),e.has("focusTrapIndex")){const t=e.get("focusTrapIndex"),s=this.focusableElements[t];s&&(s.blur(),s.toggleAttribute("focus-visible",!1));const i=this.focusableElements[this.focusTrapIndex];i&&this.tryFocus(i)}}tryFocus(e){requestAnimationFrame((()=>c(this,void 0,void 0,(function*(){this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),void 0!==e.updateComplete&&(yield e.updateComplete),document.hasFocus()&&this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),this.initialFocusComplete||(this.initialFocusComplete=!0)}))))}domRectCollection(e){return 0===e.getClientRects().length}viewportPosition(e){const{width:t,height:s}=e.getBoundingClientRect(),{offsetWidth:i,offsetHeight:n}=e;return i+n+s+t===0}isNotVisible(e){return"SLOT"!==e.tagName&&(this.viewportPosition(e)||this.domRectCollection(e))}hasHiddenStyle(e){const t=e.style;return t?"none"===t.display||"0"===t.opacity||"hidden"===t.visibility||"collapse"===t.visibility:e instanceof HTMLElement==0}hasComputedHidden(e){const t=getComputedStyle(e);return"hidden"===t.visibility||"0"===t.height}isHidden(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&"true"===e.getAttribute("aria-hidden")||this.hasHiddenStyle(e)||this.isNotVisible(e)||this.hasComputedHidden(e)}isNotTabbable(e){return"-1"===e.getAttribute("tabindex")}isInteractiveElement(e){return e instanceof HTMLButtonElement||e instanceof HTMLDetailsElement||e instanceof HTMLEmbedElement||e instanceof HTMLIFrameElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||!!(e instanceof HTMLAnchorElement&&e.hasAttribute("href"))||e instanceof HTMLInputElement&&"hidden"!==e.type||!(!(e instanceof HTMLAudioElement||e instanceof HTMLVideoElement)||!e.hasAttribute("controls"))||!(!(e instanceof HTMLImageElement||e instanceof HTMLObjectElement)||!e.hasAttribute("usemap"))||!!(e.hasAttribute("tabindex")&&e.tabIndex>-1)}isFocusable(e){return!this.isHidden(e)&&!this.isNotTabbable(e)&&!!this.isInteractiveElement(e)}shouldSkipFocus(e){var t;return(null===(t=null==e?void 0:e.id)||void 0===t?void 0:t.split(" ").indexOf("md-combobox-listbox"))>-1}handleFindFocusableSlot(e,t){const s=e.assignedNodes().filter((e=>e.nodeType===e.ELEMENT_NODE));if(s.length){const e=s[0].parentElement;e&&this.findFocusable(e,t)}}findFocusable(e,t){const s=Array.from(e.children);for(const e of s)if(!this.isHidden(e)){if(this.shouldSkipFocus(e))break;if(this.isFocusable(e)&&t.add(e),e.shadowRoot)this.findFocusable(e.shadowRoot,t);else if("SLOT"===e.tagName){const s=e;this.handleFindFocusableSlot(s,t)}else this.findFocusable(e,t)}return[...t]}isEqualFocusNode(e,t){return e.nodeType>=0&&t.isEqualNode(e)&&t==e}findElement(e){return this.focusableElements.findIndex((t=>this.isEqualFocusNode(e,t)))}calculateNextFocusIndex(e,t){return t?e>0?e-1:this.shouldWrapFocus()?this.focusableElements.length-1:0:e+1<this.focusableElements.length?e+1:this.shouldWrapFocus()?0:this.focusableElements.length-1}focusTrap(e){const t=this.getDeepActiveElement(),s=this.findElement(t);if(e)-1===s&&this.focusTrapIndex-1>0?this.focusTrapIndex--:this.focusTrapIndex=this.calculateNextFocusIndex(s,e);else if(-1===s&&this.focusTrapIndex+1<this.focusableElements.length)this.focusTrapIndex++;else if(s===this.focusableElements.length-1&&0===this.focusTrapIndex){const e=this.focusableElements[this.focusTrapIndex];e&&this.tryFocus(e)}else this.focusTrapIndex=this.calculateNextFocusIndex(s,e)}hasAutofocus(e){return e.hasAttribute("autofocus")}setInitialFocus(e=0,t=!1){let s=-1;this.initialFocusComplete=!1,this.focusableElements.length&&!t&&(s=this.focusableElements.findIndex(this.hasAutofocus)),this.focusableElements.length&&-1===s&&("object"==typeof e?s=this.findElement(e):"number"==typeof e&&(s=e)),this.focusableElements[s]&&(this.focusTrapIndex=s)}setFocusOnTrigger(e){if(!e)return;const t=this.getDeepNestedTriggerElement(e);if(t.length>0){const e=this.findElement(t[0]);this.focusTrapIndex=e}}getDeepNestedTriggerElement(e){return e.shadowRoot?this.findFocusable(e.shadowRoot,new Set):this.isFocusable(e)?[e]:this.findFocusable(e,new Set)}setFocusableElements(){this.shadowRoot?this.focusableElements=this.findFocusable(this.shadowRoot,new Set):console.warn("shadow root is not available")}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return c(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise((e=>setTimeout(e,0))),this.setFocusableElements()}))}handleKeydownFocusTrap(e){e.code!==i.Uz.Tab||e.shiftKey&&e.code!==i.Uz.Tab||this.activeFocusTrap&&this.focusableElements.length&&(e.shiftKey?(e.preventDefault(),this.focusTrap(!0)):(e.preventDefault(),this.focusTrap(!1)))}activateFocusTrap(e=!0){e&&this.dispatchEvent(new CustomEvent("on-focus-trap",{bubbles:!0,composed:!0,cancelable:!0})),this.activeFocusTrap=!0}deactivateFocusTrap(e=!0){this.activeFocusTrap=!1,this.focusTrapIndex=-1,this.removeAttribute("focus-trap-index"),e&&this.dispatchEvent(new CustomEvent("on-focus-untrap",{bubbles:!0,composed:!0,cancelable:!0}))}handleClickInsideTrap(e){const t=e.composedPath(),s=t.findIndex((e=>-1!==this.findElement(e)));if(-1!==s){const e=t[s],i=this.findElement(e);-1!==i&&(this.focusTrapIndex=i)}}manageNewElement(e){requestAnimationFrame((()=>{this.setFocusableElements();const t=this.findElement(e);-1!==t&&(this.focusTrapIndex=t)}))}handleFocusVisible(e){const t=(e.detail?e.detail.sourceEvent:e).composedPath()[0];-1===(e.detail?this.findElement(t):-1)&&t!==this&&this.manageNewElement(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeydownFocusTrap),this.addEventListener("focus-visible",this.handleFocusVisible),this.addEventListener("on-focus-trap",this.handleChildFocusTrap),this.addEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.addEventListener("click",this.handleOutsideTrapClick),document.addEventListener("on-widget-update",this.updateFocusableElements),this.addEventListener("input-clear",this.handleFocusOnClear)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydownFocusTrap),this.removeEventListener("focus-visible",this.handleFocusVisible),this.removeEventListener("on-focus-trap",this.handleChildFocusTrap),this.removeEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.removeEventListener("click",this.handleOutsideTrapClick),document.removeEventListener("on-widget-update",this.updateFocusableElements),this.removeEventListener("input-clear",this.handleFocusOnClear),this.focusableTimer&&clearTimeout(this.focusableTimer)}}return l([(0,n.internalProperty)()],t.prototype,"focusableElements",void 0),l([(0,n.internalProperty)()],t.prototype,"initialFocusComplete",void 0),l([(0,n.internalProperty)()],t.prototype,"focusableTimer",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"active-focus-trap"})],t.prototype,"activeFocusTrap",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"prevent-click-outside"})],t.prototype,"preventClickOutside",void 0),l([(0,n.property)({type:Number,reflect:!0,attribute:"focus-trap-index"})],t.prototype,"focusTrapIndex",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],t.prototype,"preventScroll",void 0),(0,o.B)(r,t),t}}}]);
|
package/dist/754.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[754,3135,8373],{28373:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(90195),n=s(41488),o=s(18889),a=s(32972),
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[754,3135,8373],{28373:(e,t,s)=>{s.d(t,{d:()=>r});var i=s(90195),n=s(41488),o=s(18889),a=s(32972),l=function(e,t,s,i){var n,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,s,a):n(t,s))||a);return o>3&&a&&Object.defineProperty(t,s,a),a},c=function(e,t,s,i){return new(s||(s=Promise))((function(n,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function l(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,l)}c((i=i.apply(e,t||[])).next())}))};const r=e=>{if((0,o.V)(r,e))return e;class t extends((0,a.y)(e)){constructor(){super(...arguments),this.focusableElements=[],this.initialFocusComplete=!1,this.focusableTimer=[],this.activeFocusTrap=!1,this.preventClickOutside=!1,this.focusTrapIndex=-1,this.preventScroll=!1,this.shouldWrapFocus=()=>!0,this.handleFocusOnClear=()=>{this.focusTrap(!0)},this.handleOutsideTrapClick=e=>{let t=!1;const s=e.composedPath();s.length&&(t=!!s.find((e=>e===this)),t||this.preventClickOutside||!this.activeFocusTrap?t&&this.activeFocusTrap&&this.initialFocusComplete&&this.handleClickInsideTrap(e):this.deactivateFocusTrap())},this.updateFocusableElements=()=>{this.focusableTimer&&(clearTimeout(this.focusableTimer),this.focusableElements=[]),this.focusableTimer=setTimeout((()=>{this.setFocusableElements()}),10)},this.handleChildFocusTrap=e=>{e.target!==this&&(e.stopPropagation(),this.deactivateFocusTrap(!1))},this.handleChildFocusUntrap=e=>{e.target!==this&&(e.stopPropagation(),this.activateFocusTrap(!1))}}updated(e){if(super.updated(e),e.has("focusTrapIndex")){const t=e.get("focusTrapIndex"),s=this.focusableElements[t];s&&(s.blur(),s.toggleAttribute("focus-visible",!1));const i=this.focusableElements[this.focusTrapIndex];i&&this.tryFocus(i)}}tryFocus(e){requestAnimationFrame((()=>c(this,void 0,void 0,(function*(){this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),void 0!==e.updateComplete&&(yield e.updateComplete),document.hasFocus()&&this.isElementFocused(e)&&e.focus({preventScroll:this.preventScroll}),this.initialFocusComplete||(this.initialFocusComplete=!0)}))))}domRectCollection(e){return 0===e.getClientRects().length}viewportPosition(e){const{width:t,height:s}=e.getBoundingClientRect(),{offsetWidth:i,offsetHeight:n}=e;return i+n+s+t===0}isNotVisible(e){return"SLOT"!==e.tagName&&(this.viewportPosition(e)||this.domRectCollection(e))}hasHiddenStyle(e){const t=e.style;return t?"none"===t.display||"0"===t.opacity||"hidden"===t.visibility||"collapse"===t.visibility:e instanceof HTMLElement==0}hasComputedHidden(e){const t=getComputedStyle(e);return"hidden"===t.visibility||"0"===t.height}isHidden(e){return e.hasAttribute("hidden")||e.hasAttribute("aria-hidden")&&"true"===e.getAttribute("aria-hidden")||this.hasHiddenStyle(e)||this.isNotVisible(e)||this.hasComputedHidden(e)}isNotTabbable(e){return"-1"===e.getAttribute("tabindex")}isInteractiveElement(e){return e instanceof HTMLButtonElement||e instanceof HTMLDetailsElement||e instanceof HTMLEmbedElement||e instanceof HTMLIFrameElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||!!(e instanceof HTMLAnchorElement&&e.hasAttribute("href"))||e instanceof HTMLInputElement&&"hidden"!==e.type||!(!(e instanceof HTMLAudioElement||e instanceof HTMLVideoElement)||!e.hasAttribute("controls"))||!(!(e instanceof HTMLImageElement||e instanceof HTMLObjectElement)||!e.hasAttribute("usemap"))||!!(e.hasAttribute("tabindex")&&e.tabIndex>-1)}isFocusable(e){return!this.isHidden(e)&&!this.isNotTabbable(e)&&!!this.isInteractiveElement(e)}shouldSkipFocus(e){var t;return(null===(t=null==e?void 0:e.id)||void 0===t?void 0:t.split(" ").indexOf("md-combobox-listbox"))>-1}handleFindFocusableSlot(e,t){const s=e.assignedNodes().filter((e=>e.nodeType===e.ELEMENT_NODE));if(s.length){const e=s[0].parentElement;e&&this.findFocusable(e,t)}}findFocusable(e,t){const s=Array.from(e.children);for(const e of s)if(!this.isHidden(e)){if(this.shouldSkipFocus(e))break;if(this.isFocusable(e)&&t.add(e),e.shadowRoot)this.findFocusable(e.shadowRoot,t);else if("SLOT"===e.tagName){const s=e;this.handleFindFocusableSlot(s,t)}else this.findFocusable(e,t)}return[...t]}isEqualFocusNode(e,t){return e.nodeType>=0&&t.isEqualNode(e)&&t==e}findElement(e){return this.focusableElements.findIndex((t=>this.isEqualFocusNode(e,t)))}calculateNextFocusIndex(e,t){return t?e>0?e-1:this.shouldWrapFocus()?this.focusableElements.length-1:0:e+1<this.focusableElements.length?e+1:this.shouldWrapFocus()?0:this.focusableElements.length-1}focusTrap(e){const t=this.getDeepActiveElement(),s=this.findElement(t);if(e)-1===s&&this.focusTrapIndex-1>0?this.focusTrapIndex--:this.focusTrapIndex=this.calculateNextFocusIndex(s,e);else if(-1===s&&this.focusTrapIndex+1<this.focusableElements.length)this.focusTrapIndex++;else if(s===this.focusableElements.length-1&&0===this.focusTrapIndex){const e=this.focusableElements[this.focusTrapIndex];e&&this.tryFocus(e)}else this.focusTrapIndex=this.calculateNextFocusIndex(s,e)}hasAutofocus(e){return e.hasAttribute("autofocus")}setInitialFocus(e=0,t=!1){let s=-1;this.initialFocusComplete=!1,this.focusableElements.length&&!t&&(s=this.focusableElements.findIndex(this.hasAutofocus)),this.focusableElements.length&&-1===s&&("object"==typeof e?s=this.findElement(e):"number"==typeof e&&(s=e)),this.focusableElements[s]&&(this.focusTrapIndex=s)}setFocusOnTrigger(e){if(!e)return;const t=this.getDeepNestedTriggerElement(e);if(t.length>0){const e=this.findElement(t[0]);this.focusTrapIndex=e}}getDeepNestedTriggerElement(e){return e.shadowRoot?this.findFocusable(e.shadowRoot,new Set):this.isFocusable(e)?[e]:this.findFocusable(e,new Set)}setFocusableElements(){this.shadowRoot?this.focusableElements=this.findFocusable(this.shadowRoot,new Set):console.warn("shadow root is not available")}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return c(this,void 0,void 0,(function*(){t.firstUpdated.call(this,e),yield new Promise((e=>setTimeout(e,0))),this.setFocusableElements()}))}handleKeydownFocusTrap(e){e.code!==i.Uz.Tab||e.shiftKey&&e.code!==i.Uz.Tab||this.activeFocusTrap&&this.focusableElements.length&&(e.shiftKey?(e.preventDefault(),this.focusTrap(!0)):(e.preventDefault(),this.focusTrap(!1)))}activateFocusTrap(e=!0){e&&this.dispatchEvent(new CustomEvent("on-focus-trap",{bubbles:!0,composed:!0,cancelable:!0})),this.activeFocusTrap=!0}deactivateFocusTrap(e=!0){this.activeFocusTrap=!1,this.focusTrapIndex=-1,this.removeAttribute("focus-trap-index"),e&&this.dispatchEvent(new CustomEvent("on-focus-untrap",{bubbles:!0,composed:!0,cancelable:!0}))}handleClickInsideTrap(e){const t=e.composedPath(),s=t.findIndex((e=>-1!==this.findElement(e)));if(-1!==s){const e=t[s],i=this.findElement(e);-1!==i&&(this.focusTrapIndex=i)}}manageNewElement(e){requestAnimationFrame((()=>{this.setFocusableElements();const t=this.findElement(e);-1!==t&&(this.focusTrapIndex=t)}))}handleFocusVisible(e){const t=(e.detail?e.detail.sourceEvent:e).composedPath()[0];-1===(e.detail?this.findElement(t):-1)&&t!==this&&this.manageNewElement(t)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeydownFocusTrap),this.addEventListener("focus-visible",this.handleFocusVisible),this.addEventListener("on-focus-trap",this.handleChildFocusTrap),this.addEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.addEventListener("click",this.handleOutsideTrapClick),document.addEventListener("on-widget-update",this.updateFocusableElements),this.addEventListener("input-clear",this.handleFocusOnClear)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeydownFocusTrap),this.removeEventListener("focus-visible",this.handleFocusVisible),this.removeEventListener("on-focus-trap",this.handleChildFocusTrap),this.removeEventListener("on-focus-untrap",this.handleChildFocusUntrap),document.removeEventListener("click",this.handleOutsideTrapClick),document.removeEventListener("on-widget-update",this.updateFocusableElements),this.removeEventListener("input-clear",this.handleFocusOnClear),this.focusableTimer&&clearTimeout(this.focusableTimer)}}return l([(0,n.internalProperty)()],t.prototype,"focusableElements",void 0),l([(0,n.internalProperty)()],t.prototype,"initialFocusComplete",void 0),l([(0,n.internalProperty)()],t.prototype,"focusableTimer",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"active-focus-trap"})],t.prototype,"activeFocusTrap",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"prevent-click-outside"})],t.prototype,"preventClickOutside",void 0),l([(0,n.property)({type:Number,reflect:!0,attribute:"focus-trap-index"})],t.prototype,"focusTrapIndex",void 0),l([(0,n.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],t.prototype,"preventScroll",void 0),(0,o.B)(r,t),t}}}]);
|
package/dist/8612.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1465,8612],{5657:(e,t,i)=>{i.d(t,{LG:()=>
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1465,8612],{5657:(e,t,i)=>{i.d(t,{LG:()=>l,Um:()=>d,i0:()=>n});var a=i(41488),o=i(40333),m=i(31465);const n=(e,t,i,o,m)=>a.html`${e?r(t,i,o,m):c(t,i,m)}`,s=(e,t,i,m)=>a.html`<md-avatar
|
|
2
2
|
size="32"
|
|
3
3
|
type=${i}
|
|
4
4
|
state=${e?"active":"rest"}
|
|
5
5
|
presence-type=${null!=t?t:""}
|
|
6
6
|
newMomentum
|
|
7
7
|
>${null!=m?m:o.nothing}</md-avatar
|
|
8
|
-
>`,r=(e,t,i,o)=>{switch(e.toLowerCase()){case m.r.PROGRESSIVE_CAMPAIGN:case m.r.CALLBACK:case m.r.TELEPHONY:return s(t,i,"channel-call");case m.r.OUTBOUND_TELEPHONY:return s(t,i,"channel-callback");case m.r.INBOUND_TELEPHONY:return s(t,i,"channel-call-inbound");case m.r.APPLE_MESSAGES:return s(t,i,"channel-apple-chat");case m.r.OUTBOUND_CAMPAIGN:return s(t,i,"channel-campaign");case m.r.CHAT:return s(t,i,"channel-chat");case m.r.EMAIL:return s(t,i,"channel-email-inbound");case m.r.SMS:return s(t,i,"channel-sms-inbound");case m.r.FACEBOOK:return s(t,i,"channel-fb-messenger");case m.r.WHATSAPP:return s(t,i,"channel-whats-app");case m.r.MESSENGER:return s(t,i,"channel-facebook");case m.r.MIDCALL_TELEPHONY:return s(t,i,"channel-monitoring");case m.r.OUTBOUND_EMAIL:return s(t,i,"channel-email-outbound");case m.r.OUTBOUND_SMS:return s(t,i,"channel-sms-outbound");case m.r.SOCIAL_X:return s(t,i,"channel-twitter-x");case m.r.VIBER:return s(t,i,"channel-viber");case m.r.WECHAT:return s(t,i,"channel-we-chat");case m.r.WEBEX:return s(t,i,"channel-webex");case m.r.GOOGLE_MESSAGES:return s(t,i,"channel-custom",a.html`<img height="32px" width="32px" src="${o}" />`);case m.r.ICON_SRC:return s(t,i,"channel-custom",a.html`<img height="20px" width="20px" src="${o}" />`);default:return s(t,i,"channel-custom",a.html`<slot name="task-type"></slot>`)}},
|
|
8
|
+
>`,r=(e,t,i,o)=>{switch(e.toLowerCase()){case m.r.PROGRESSIVE_CAMPAIGN:case m.r.CALLBACK:case m.r.TELEPHONY:return s(t,i,"channel-call");case m.r.OUTBOUND_TELEPHONY:return s(t,i,"channel-callback");case m.r.INBOUND_TELEPHONY:return s(t,i,"channel-call-inbound");case m.r.APPLE_MESSAGES:return s(t,i,"channel-apple-chat");case m.r.OUTBOUND_CAMPAIGN:return s(t,i,"channel-campaign");case m.r.CHAT:return s(t,i,"channel-chat");case m.r.EMAIL:return s(t,i,"channel-email-inbound");case m.r.SMS:return s(t,i,"channel-sms-inbound");case m.r.FACEBOOK:return s(t,i,"channel-fb-messenger");case m.r.WHATSAPP:return s(t,i,"channel-whats-app");case m.r.MESSENGER:return s(t,i,"channel-facebook");case m.r.MIDCALL_TELEPHONY:return s(t,i,"channel-monitoring");case m.r.OUTBOUND_EMAIL:return s(t,i,"channel-email-outbound");case m.r.OUTBOUND_SMS:return s(t,i,"channel-sms-outbound");case m.r.SOCIAL_X:return s(t,i,"channel-twitter-x");case m.r.VIBER:return s(t,i,"channel-viber");case m.r.WECHAT:return s(t,i,"channel-we-chat");case m.r.WEBEX:return s(t,i,"channel-webex");case m.r.GOOGLE_MESSAGES:return s(t,i,"channel-custom",a.html`<img height="32px" width="32px" src="${o}" />`);case m.r.ICON_SRC:return s(t,i,"channel-custom",a.html`<img height="20px" width="20px" src="${o}" />`);default:return s(t,i,"channel-custom",a.html`<slot name="task-type"></slot>`)}},l=e=>{switch(e){case m.j.CONSULTING:return a.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case m.j.PLAY:return a.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case m.j.HOLD:return a.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case m.j.CONFERENCE:return a.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case m.j.TRANSFERED:return a.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case m.j.COURTESY_CALLBACK:return a.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case m.j.CAMPAIGN:return a.html` <md-icon name="announcement-bold" size="12" iconSet="momentumDesign"></md-icon> `;default:return a.html` <slot name="task-status"></slot> `}},c=(e,t,i)=>{switch(e.toLowerCase()){case m.r.TELEPHONY:return a.html`
|
|
9
9
|
<md-badge color="green" circle>
|
|
10
10
|
<md-icon name="handset-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
11
11
|
</md-badge>
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
<md-badge bgColor="#25D366" circle>
|
|
57
57
|
<md-icon name="whatsApp_16" iconSet="momentumUI" color="white-100"></md-icon>
|
|
58
58
|
</md-badge>
|
|
59
|
-
`;default:return a.html` <slot name="task-type"></slot> `}},d=(e,t,i)=>{if(e<=0)return i.removeAttribute("has-messages"),o.nothing;i.setAttribute("has-messages","true");const m=e>99?"99+":e.toString();return t?a.html` <md-badge color="unreadcount"> ${m} </md-badge>`:a.html` <span class="new-chat-quantity">${m}</span> `}},31465:(e,t,i)=>{i.d(t,{j:()=>a,r:()=>o});const a={CONSULTING:"consulting",PLAY:"play",HOLD:"hold",CONFERENCE:"conference",TRANSFERED:"transfered",COURTESY_CALLBACK:"courtesy_callback",CAMPAIGN:"campaign"},o={TELEPHONY:"telephony",OUTBOUND_TELEPHONY:"outbound telephony",INBOUND_TELEPHONY:"inbound telephony",OUTBOUND_CAMPAIGN:"outbound-campaign",CALLBACK:"callback",CHAT:"chat",PROGRESSIVE_CAMPAIGN:"progressive_campaign",MIDCALL_TELEPHONY:"midcall telephony",APPLE_MESSAGES:"applemessages",ICON_SRC:"icon src",EMAIL:"email",SMS:"sms",FACEBOOK:"facebook",WHATSAPP:"whatsapp",MESSENGER:"messenger",OUTBOUND_EMAIL:"outboundemail",OUTBOUND_SMS:"outboundsms",SOCIAL_X:"socialx",VIBER:"viber",WECHAT:"wechat",WEBEX:"webex",GOOGLE_MESSAGES:"googlemessages"}},50182:(e,t,i)=>{i.d(t,{A:()=>a});const a=i(41488).css`:host{width:100%}.md-taskitem{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:stretch;border-radius:.5rem;color:var(--md-secondary-text-color);cursor:pointer;margin-bottom:4px;min-height:5rem;padding:.75rem;position:relative;width:auto;z-index:0}.md-taskitem.selected{background-color:var(--taskitem-pressed-bg-color,#fff);box-shadow:0 .125rem .25rem rgba(0,0,0,.16)}.md-taskitem.selected .md-taskitem__content_chat,.md-taskitem.selected .md-taskitem__content_popover_title,.md-taskitem.selected .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem.selected .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:hover{background-color:var(--taskitem-hover-bg-color)}.md-taskitem:hover .md-taskitem__content_chat,.md-taskitem:hover .md-taskitem__content_popover_title,.md-taskitem:hover .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem:hover .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:active{background-color:var(--taskitem-pressed-bg-color)}.md-taskitem:active .md-taskitem__content_chat,.md-taskitem:active .md-taskitem__content_popover_title,.md-taskitem:active .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem:active .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:focus{background:var(--taskitem-focus-bg-color);box-shadow:none;outline:0}.md-taskitem:focus::after{box-shadow:0 0 0 .125rem var(--taskitem-focus-border-color,#007aa3)}.md-taskitem::after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:-1;border-radius:.5rem;margin:-.125rem}.md-taskitem__mediatype{margin-right:.5rem;position:relative;width:2.625rem}.md-taskitem__mediatype img{max-width:fit-content}.md-taskitem__mediatype .md-taskitem__status{align-items:center;display:inline-flex;justify-content:space-around;position:absolute;background:var(--taskitem-status-bg-color);border-radius:50%;bottom:-4px;color:var(--taskitem-status-text-color);height:1.25rem;right:-4px;width:1.25rem}.md-taskitem__mediatype .md-taskitem__status md-icon{height:.75rem}.md-taskitem__mediatype .md-taskitem__status md-icon::part(icon){vertical-align:top}.md-taskitem__mediatype .md-taskitem__status.hold{background:var(--taskitem-status-pause-bg-color)}.md-taskitem__content{align-content:stretch;align-items:flex-start;align-self:stretch;display:flex;flex:0 1 auto;flex-direction:column;justify-content:center;width:calc(100% - (2.625rem + 6.25rem))}.md-taskitem__content_popover_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--taskitem-text-color);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:.9375rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:1.1875rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_title.mainTitle{color:var(--taskitem-text-color);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif)}.md-taskitem__content_title.display-only-title{margin-bottom:0;width:6.25rem}.md-taskitem__content_inner{display:flex;flex:0 1 auto;width:100%}.md-taskitem__content_queue{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:.875rem;width:100%}.md-taskitem__content_chat{color:var(--taskitem-chat-text-color);display:flex;font-size:12px;line-height:.875rem;margin-top:.5rem;position:relative;width:100%}.md-taskitem__content_chat .new-chat_massages{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:2.5rem;width:calc(100% - .5rem)}.md-taskitem__addition{align-items:flex-end;display:flex;flex-direction:column;margin-left:.5rem;text-align:right;width:6.25rem}.md-taskitem__addition .new-chat-quantity{background:var(--taskitem-chat-quantity-bg-color);border-radius:9px;color:var(--taskitem-chat-quantity-text-color);display:inline-block;font-size:10px;line-height:.875rem;min-width:18px;padding:.125rem .25rem;text-align:center}:host([is-restyle]) .md-taskitem{padding:.5rem .75rem;justify-content:space-between}:host([is-restyle]) .md-taskitem__mediatype{margin-right:.75rem;white-space:nowrap;width:auto}:host([is-restyle]) .md-taskitem .md-taskitem__content{width:auto;min-width:0;flex:1}:host([is-restyle]) .md-taskitem .md-taskitem__content_popover_title,:host([is-restyle]) .md-taskitem .md-taskitem__content_title{font-size:1rem;font-weight:500;line-height:24px;margin:0;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);color:var(--taskitem-restyle-text-color)}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue{font-size:.875rem;line-height:20px;color:var(--taskitem-text-color);width:auto}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time{font-size:.875rem;line-height:20px;color:var(--taskitem-text-color);margin-left:4px;min-width:4.375rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time_dot{background-color:var(--taskitem-restyle-dot-color);border-radius:50%;height:.25rem;width:.25rem;display:inline-flex;margin:3px 0}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time ::slotted(*){display:inline-flex}:host([is-restyle]) .md-taskitem .md-taskitem__content_chat{margin:0;font-size:.875rem;line-height:20px;color:var(--taskitem-text-color)}:host([is-restyle]) .md-taskitem .md-taskitem__content_chat .new-chat_massages{padding:0}:host([is-restyle]) .md-taskitem__addition{white-space:nowrap;margin-left:.75rem;width:auto}:host([is-restyle]) .md-taskitem__addition.empty_addition{margin:0}:host([is-restyle]) .md-taskitem .avatar-badge::part(badge){height:2rem;width:2rem;background-color:var(--avatar-darkgray-bg-color)}:host([is-restyle]) .md-taskitem.selected .avatar-badge::part(badge){background-color:var(--avatar-white-bg-color)}:host([is-restyle]) .md-taskitem.selected .md-taskitem__content_popover_title,:host([is-restyle]) .md-taskitem.selected .md-taskitem__content_title{font-weight:700}:host([is-restyle]) .md-taskitem::after{margin:0}:host([is-restyle][disabled]) .md-taskitem{cursor:not-allowed;pointer-events:none}:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_chat,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_popover_title,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_queue,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_title{color:var(--taskitem-restyle-text-disabled-color)}:host([is-restyle][has-messages=true]) .md-taskitem__content_popover_title ::part(tooltip_reference),:host([is-restyle][has-messages=true]) .md-taskitem__content_title ::part(tooltip_reference){font-weight:700!important}:host([is-restyle][has-messages=true]) .md-taskitem__addition{margin-left:.75rem!important}@media(forced-colors:active){.md-taskitem:focus{outline:1px solid Highlight}.md-taskitem.selected,.md-taskitem:hover{forced-color-adjust:none;outline:1px solid Highlight;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem:active{forced-color-adjust:none;outline:1px solid HighlightText;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem__addition .new-chat-quantity{forced-color-adjust:auto}}`}}]);
|
|
59
|
+
`;default:return a.html` <slot name="task-type"></slot> `}},d=(e,t,i)=>{if(e<=0)return i.removeAttribute("has-messages"),o.nothing;i.setAttribute("has-messages","true");const m=e>99?"99+":e.toString();return t?a.html` <md-badge color="unreadcount"> ${m} </md-badge>`:a.html` <span class="new-chat-quantity">${m}</span> `}},31465:(e,t,i)=>{i.d(t,{j:()=>a,r:()=>o});const a={CONSULTING:"consulting",PLAY:"play",HOLD:"hold",CONFERENCE:"conference",TRANSFERED:"transfered",COURTESY_CALLBACK:"courtesy_callback",CAMPAIGN:"campaign"},o={TELEPHONY:"telephony",OUTBOUND_TELEPHONY:"outbound telephony",INBOUND_TELEPHONY:"inbound telephony",OUTBOUND_CAMPAIGN:"outbound-campaign",CALLBACK:"callback",CHAT:"chat",PROGRESSIVE_CAMPAIGN:"progressive_campaign",MIDCALL_TELEPHONY:"midcall telephony",APPLE_MESSAGES:"applemessages",ICON_SRC:"icon src",EMAIL:"email",SMS:"sms",FACEBOOK:"facebook",WHATSAPP:"whatsapp",MESSENGER:"messenger",OUTBOUND_EMAIL:"outboundemail",OUTBOUND_SMS:"outboundsms",SOCIAL_X:"socialx",VIBER:"viber",WECHAT:"wechat",WEBEX:"webex",GOOGLE_MESSAGES:"googlemessages"}},50182:(e,t,i)=>{i.d(t,{A:()=>a});const a=i(41488).css`:host{width:100%}.md-taskitem{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:stretch;border-radius:.5rem;color:var(--md-secondary-text-color);cursor:pointer;margin-bottom:4px;min-height:5rem;padding:.75rem;position:relative;width:auto;z-index:0}.md-taskitem.selected{background-color:var(--taskitem-pressed-bg-color,#fff);box-shadow:0 .125rem .25rem rgba(0,0,0,.16)}.md-taskitem.selected .md-taskitem__content_chat,.md-taskitem.selected .md-taskitem__content_popover_title,.md-taskitem.selected .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem.selected .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:hover{background-color:var(--taskitem-hover-bg-color)}.md-taskitem:hover .md-taskitem__content_chat,.md-taskitem:hover .md-taskitem__content_popover_title,.md-taskitem:hover .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem:hover .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:active{background-color:var(--taskitem-pressed-bg-color)}.md-taskitem:active .md-taskitem__content_chat,.md-taskitem:active .md-taskitem__content_popover_title,.md-taskitem:active .md-taskitem__content_queue{color:var(--taskitem-selected-text-color)}.md-taskitem:active .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color)}.md-taskitem:focus{background:var(--taskitem-focus-bg-color);box-shadow:none;outline:0}.md-taskitem:focus::after{box-shadow:0 0 0 .125rem var(--taskitem-focus-border-color,#007aa3)}.md-taskitem::after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:-1;border-radius:.5rem;margin:-.125rem}.md-taskitem__mediatype{margin-right:.5rem;position:relative;width:2.625rem}.md-taskitem__mediatype img{max-width:fit-content}.md-taskitem__mediatype .md-taskitem__status{align-items:center;display:inline-flex;justify-content:space-around;position:absolute;background:var(--taskitem-status-bg-color);border-radius:50%;bottom:-4px;color:var(--taskitem-status-text-color);height:1.25rem;right:-4px;width:1.25rem}.md-taskitem__mediatype .md-taskitem__status md-icon{height:.75rem}.md-taskitem__mediatype .md-taskitem__status md-icon::part(icon){vertical-align:top}.md-taskitem__mediatype .md-taskitem__status.hold{background:var(--taskitem-status-pause-bg-color)}.md-taskitem__content{align-content:stretch;align-items:flex-start;align-self:stretch;display:flex;flex:0 1 auto;flex-direction:column;justify-content:center;width:calc(100% - (2.625rem + 6.25rem))}.md-taskitem__content_popover_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--taskitem-text-color);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:.9375rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_popover_title.popover-item-title{margin-bottom:0}.md-taskitem__content_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:1.1875rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_title.mainTitle{color:var(--taskitem-text-color);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif)}.md-taskitem__content_title.display-only-title{margin-bottom:0;width:6.25rem}.md-taskitem__content_inner{display:flex;flex:0 1 auto;width:100%}.md-taskitem__content_queue{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:.875rem;width:100%}.md-taskitem__content_chat{color:var(--taskitem-chat-text-color);display:flex;font-size:12px;line-height:.875rem;margin-top:.5rem;position:relative;width:100%}.md-taskitem__content_chat .new-chat_massages{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:2.5rem;width:calc(100% - .5rem)}.md-taskitem__addition{align-items:flex-end;display:flex;flex-direction:column;margin-left:.5rem;text-align:right;width:6.25rem}.md-taskitem__addition .new-chat-quantity{background:var(--taskitem-chat-quantity-bg-color);border-radius:9px;color:var(--taskitem-chat-quantity-text-color);display:inline-block;font-size:10px;line-height:.875rem;min-width:18px;padding:.125rem .25rem;text-align:center}:host([is-restyle]) .md-taskitem{padding:.5rem .75rem;justify-content:space-between}:host([is-restyle]) .md-taskitem__mediatype{margin-right:.75rem;white-space:nowrap;width:auto}:host([is-restyle]) .md-taskitem .md-taskitem__content{width:auto;min-width:0;flex:1}:host([is-restyle]) .md-taskitem .md-taskitem__content_popover_title,:host([is-restyle]) .md-taskitem .md-taskitem__content_title{font-size:1rem;font-weight:500;line-height:24px;margin:0;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);color:var(--taskitem-restyle-text-color)}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue{font-size:.875rem;line-height:20px;color:var(--taskitem-text-color);width:auto}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time{font-size:.875rem;line-height:20px;color:var(--taskitem-text-color);margin-left:4px;min-width:4.375rem;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time_dot{background-color:var(--taskitem-restyle-dot-color);border-radius:50%;height:.25rem;width:.25rem;display:inline-flex;margin:3px 0}:host([is-restyle]) .md-taskitem .md-taskitem__content_queue_time ::slotted(*){display:inline-flex}:host([is-restyle]) .md-taskitem .md-taskitem__content_chat{margin:0;font-size:.875rem;line-height:20px;color:var(--taskitem-text-color)}:host([is-restyle]) .md-taskitem .md-taskitem__content_chat .new-chat_massages{padding:0}:host([is-restyle]) .md-taskitem__addition{white-space:nowrap;margin-left:.75rem;width:auto}:host([is-restyle]) .md-taskitem__addition.empty_addition{margin:0}:host([is-restyle]) .md-taskitem .avatar-badge::part(badge){height:2rem;width:2rem;background-color:var(--avatar-darkgray-bg-color)}:host([is-restyle]) .md-taskitem.selected .avatar-badge::part(badge){background-color:var(--avatar-white-bg-color)}:host([is-restyle]) .md-taskitem.selected .md-taskitem__content_popover_title,:host([is-restyle]) .md-taskitem.selected .md-taskitem__content_title{font-weight:700}:host([is-restyle]) .md-taskitem::after{margin:0}:host([is-restyle][disabled]) .md-taskitem{cursor:not-allowed;pointer-events:none}:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_chat,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_popover_title,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_queue,:host([is-restyle][disabled]) .md-taskitem .md-taskitem__content_title{color:var(--taskitem-restyle-text-disabled-color)}:host([is-restyle][has-messages=true]) .md-taskitem__content_popover_title ::part(tooltip_reference),:host([is-restyle][has-messages=true]) .md-taskitem__content_title ::part(tooltip_reference){font-weight:700!important}:host([is-restyle][has-messages=true]) .md-taskitem__addition{margin-left:.75rem!important}@media(forced-colors:active){.md-taskitem:focus{outline:1px solid Highlight}.md-taskitem.selected,.md-taskitem:hover{forced-color-adjust:none;outline:1px solid Highlight;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem:active{forced-color-adjust:none;outline:1px solid HighlightText;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem__addition .new-chat-quantity{forced-color-adjust:auto}}`}}]);
|