@momentum-ui/web-components 3.0.0-alpha.1 → 3.0.0-alpha.2
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/1873.js +2 -0
- package/dist/2555.js +5 -5
- package/dist/6752.js +1 -1
- package/dist/679.js +16 -16
- package/dist/comp/md-badge-entry.js +5 -5
- package/dist/comp/md-badge.js +1 -1
- package/dist/comp/md-card-v2-entry.js +7 -7
- package/dist/comp/md-card-v2.js +1 -1
- package/dist/comp/md-coachmark-popover-entry.js +5 -5
- package/dist/comp/md-coachmark-popover.js +1 -1
- package/dist/comp/md-country-code-picker-entry.js +8 -8
- package/dist/comp/md-country-code-picker.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-range-picker.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker.js +1 -1
- package/dist/comp/md-phone-input-entry.js +9 -9
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-popover-entry.js +5 -5
- package/dist/comp/md-popover.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-tabs.js +1 -1
- package/dist/comp/md-task-item-entry.js +12 -12
- package/dist/comp/md-task-item.js +1 -1
- package/dist/index-entry.js +213 -213
- package/dist/index.js +1 -1
- package/dist/types/components/badge/Badge.d.ts +1 -2
- package/dist/types/components/badge/NotificationBadge.d.ts +1 -1
- package/dist/types/components/floating-button-bar/FloatingButtonBar.d.ts +2 -2
- package/dist/types/components/grabber/Grabber.d.ts +1 -1
- package/dist/types/components/skeleton/Skeleton.d.ts +20 -0
- package/dist/types/components/taskitem/TaskItem.utils.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/1990.js +0 -2
- package/dist/1990.js.LICENSE.txt +0 -5
- package/dist/4371.js +0 -2
- package/dist/4371.js.LICENSE.txt +0 -5
- package/dist/4935.js +0 -2
- package/dist/4935.js.LICENSE.txt +0 -5
- package/dist/6683.js +0 -2
- package/dist/7228.js +0 -2
- package/dist/7228.js.LICENSE.txt +0 -5
- package/dist/9609.js +0 -2
- package/dist/9609.js.LICENSE.txt +0 -5
- /package/dist/{6683.js.LICENSE.txt → 1873.js.LICENSE.txt} +0 -0
package/dist/1873.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1873.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1873,6752],{11873:(t,e,s)=>{s.d(e,{H:()=>r});var i=s(36752);class n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const r=(o=class extends n{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const s=t.element.classList;for(const t of this.st)t in e||(s.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(s.add(t),this.st.add(t)):(s.remove(t),this.st.delete(t)))}return i.c0}},(...t)=>({_$litDirective$:o,values:t}));var o},36752:(t,e,s)=>{s.d(e,{c0:()=>x,s6:()=>b});const i=globalThis,n=i.trustedTypes,r=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+h,$=`<${l}>`,a=document,c=()=>a.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,d="[ \t\n\f\r]",p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,u=/-->/g,g=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,f=/"/g,y=/^(?:script|style|textarea|title)$/i,H=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),x=(H(1),H(2),H(3),Symbol.for("lit-noChange")),b=Symbol.for("lit-nothing"),N=new WeakMap,T=a.createTreeWalker(a,129);function M(t,e){if(!_(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==r?r.createHTML(e):e}const C=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":3===e?"<math>":"",l=p;for(let e=0;e<s;e++){const s=t[e];let a,c,A=-1,_=0;for(;_<s.length&&(l.lastIndex=_,c=l.exec(s),null!==c);)_=l.lastIndex,l===p?"!--"===c[1]?l=u:void 0!==c[1]?l=g:void 0!==c[2]?(y.test(c[2])&&(n=RegExp("</"+c[2],"g")),l=m):void 0!==c[3]&&(l=m):l===m?">"===c[0]?(l=n??p,A=-1):void 0===c[1]?A=-2:(A=l.lastIndex-c[2].length,a=c[1],l=void 0===c[3]?m:'"'===c[3]?f:v):l===f||l===v?l=m:l===u||l===g?l=p:(l=m,n=void 0);const d=l===m&&t[e+1].startsWith("/>")?" ":"";r+=l===p?s+$:A>=0?(i.push(a),s.slice(0,A)+o+s.slice(A)+h+d):s+h+(-2===A?e:d)}return[M(t,r+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class w{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,$=0;const a=t.length-1,A=this.parts,[_,d]=C(t,e);if(this.el=w.createElement(_,s),T.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=T.nextNode())&&A.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(o)){const e=d[$++],s=i.getAttribute(t).split(h),n=/([.?@])?(.*)/.exec(e);A.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?j:"?"===n[1]?O:"@"===n[1]?R:U}),i.removeAttribute(t)}else t.startsWith(h)&&(A.push({type:6,index:r}),i.removeAttribute(t));if(y.test(i.tagName)){const t=i.textContent.split(h),e=t.length-1;if(e>0){i.textContent=n?n.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],c()),T.nextNode(),A.push({type:2,index:++r});i.append(t[e],c())}}}else if(8===i.nodeType)if(i.data===l)A.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(h,t+1));)A.push({type:7,index:r}),t+=h.length-1}r++}}static createElement(t,e){const s=a.createElement("template");return s.innerHTML=t,s}}function S(t,e,s=t,i){if(e===x)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const r=A(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),void 0===r?n=void 0:(n=new r(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=S(t,n._$AS(t,e.values),n,i)),e}class E{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??a).importNode(e,!0);T.currentNode=i;let n=T.nextNode(),r=0,o=0,h=s[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new I(n,n.nextSibling,this,t):1===h.type?e=new h.ctor(n,h.name,h.strings,this,t):6===h.type&&(e=new B(n,this,t)),this._$AV.push(e),h=s[++o]}r!==h?.index&&(n=T.nextNode(),r++)}return T.currentNode=a,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class I{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),A(t)?t===b||null==t||""===t?(this._$AH!==b&&this._$AR(),this._$AH=b):t!==this._$AH&&t!==x&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>_(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==b&&A(this._$AH)?this._$AA.nextSibling.data=t:this.T(a.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=w.createElement(M(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new E(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new w(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new I(this.O(c()),this.O(c()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class U{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=b,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=b}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=S(this,t,e,0),r=!A(t)||t!==this._$AH&&t!==x,r&&(this._$AH=t);else{const i=t;let o,h;for(t=n[0],o=0;o<n.length-1;o++)h=S(this,i[s+o],e,o),h===x&&(h=this._$AH[o]),r||=!A(h)||h!==this._$AH[o],h===b?t=b:t!==b&&(t+=(h??"")+n[o+1]),this._$AH[o]=h}r&&!i&&this.j(t)}j(t){t===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class j extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===b?void 0:t}}class O extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==b)}}class R extends U{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??b)===x)return;const s=this._$AH,i=t===b&&s!==b||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==b&&(s===b||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class B{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const L=i.litHtmlPolyfillSupport;L?.(w,I),(i.litHtmlVersions??=[]).push("3.3.1")}}]);
|
package/dist/2555.js
CHANGED
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
`}connectedCallback(){var e,t,i;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,s.tB)(),this.localeMonth=(0,s.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,i,r,o,n;super.updated(e),e.has("datePickerProps")&&(null===(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected.invalidReason)&&(this.viewAnchorDate=this.datePickerProps.selected||(0,s.tB)()),this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,s.WV)(this.viewAnchorDate,null===(r=this.datePickerProps)||void 0===r?void 0:r.locale):this.viewAnchorDate).toFormat(this.monthFormat)),e.has("viewAnchorDate")&&(this.localeMonth=((null===(o=this.datePickerProps)||void 0===o?void 0:o.locale)?(0,s.WV)(this.viewAnchorDate,null===(n=this.datePickerProps)||void 0===n?void 0:n.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,s.XY)(e,t):(0,s.DY)(e,t)}static get styles(){return[n.A,h.A]}render(){return l.html`
|
|
46
46
|
<div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
|
|
47
|
-
`}};d([(0,a.property)({attribute:!1})],t.prototype,"monthFormat",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"filterParams",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),d([(0,a.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),d([(0,a.state)()],t.prototype,"viewAnchorDate",void 0),d([(0,a.state)()],t.prototype,"localeMonth",void 0),t=d([(0,o.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(r||(r={}))},66677:(e,t,i)=>{function r(e,t,i){let r;return function(...o){const s=this,n=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||e.apply(s,o)},t),n&&e.apply(s,o)}}function o(e,t){return function t(i){if(!i||i===document||i===window)return null;const r=i.closest(e);return null!=r?r:t(i.getRootNode().host)}(t)}function s(e,t=document){var i;const r=t instanceof ShadowRoot||t instanceof Document?t.querySelector(e):null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector(e);if(r)return r;const o=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of o){const i=s(e,t);if(i)return i}return null}function n(e,t=document){if(t instanceof ShadowRoot||t instanceof Document){const i=t.getElementById(e);if(i)return i}const i=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of i){const i=n(e,t);if(i)return i}return null}function l(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}i.d(t,{QZ:()=>o,XI:()=>n,dw:()=>l,qi:()=>s,sg:()=>r})},71128:(e,t,i)=>{i.d(t,{PopoverController:()=>f}),i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(87161),a=i(36752),h=i(54765),d=i(70429),c=i(68419),p=i(36365),u=i(3998),v=i(33759),m=i(86210),g=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},y=function(e,t,i,r){return new(i||(i=Promise))(function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(n,l)}a((r=r.apply(e,t||[])).next())})};class f{show(e){}hide(){}toggle(){}isVisible(){return!1}}let E=class extends((0,o.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=c.zY.TRIGGER,this.placement=c.zY.PLACEMENT,this.strategy=c.zY.STRATEGY,this.color=c.zY.COLOR,this.visible=c.zY.VISIBLE,this.offset=c.zY.OFFSET,this.focusTrap=c.zY.FOCUS_TRAP,this.preventScroll=c.zY.PREVENT_SCROLL,this.showArrow=c.zY.ARROW,this.closeButton=c.zY.CLOSE_BUTTON,this.interactive=c.zY.INTERACTIVE,this.delay=c.zY.DELAY,this.hideOnEscape=c.zY.HIDE_ON_ESCAPE,this.hideOnBlur=c.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=c.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=c.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=c.zY.FOCUS_BACK,this.backdrop=c.zY.BACKDROP,this.flip=c.zY.FLIP,this.size=c.zY.SIZE,this.zIndex=c.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=c.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=c.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=c.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||u.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{u.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,s.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new v.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return y(this,void 0,void 0,function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,p.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return y(this,void 0,void 0,function*(){e.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),p.T.onDestroyedPopover(this),u.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return y(this,void 0,void 0,function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(c.ME).includes(this.placement)?this.placement:c.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter(e=>Object.values(c.tr).includes(e));this.setAttribute("trigger",e.length>0?this.trigger:c.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),e.has("color")&&this.setAttribute("color",Object.values(c.o$).includes(this.color)?this.color:c.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return y(this,void 0,void 0,function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)u.S.peek()!==this&&u.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),p.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),u.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,p.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}handleCreatePopoverFirstUpdate(){return y(this,void 0,void 0,function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>y(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return l.html`
|
|
47
|
+
`}};d([(0,a.property)({attribute:!1})],t.prototype,"monthFormat",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"filterParams",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),d([(0,a.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),d([(0,a.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),d([(0,a.state)()],t.prototype,"viewAnchorDate",void 0),d([(0,a.state)()],t.prototype,"localeMonth",void 0),t=d([(0,o.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(r||(r={}))},66677:(e,t,i)=>{function r(e,t,i){let r;return function(...o){const s=this,n=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||e.apply(s,o)},t),n&&e.apply(s,o)}}function o(e,t){return function t(i){if(!i||i===document||i===window)return null;const r=i.closest(e);return null!=r?r:t(i.getRootNode().host)}(t)}function s(e,t=document){var i;const r=t instanceof ShadowRoot||t instanceof Document?t.querySelector(e):null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector(e);if(r)return r;const o=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of o){const i=s(e,t);if(i)return i}return null}function n(e,t=document){if(t instanceof ShadowRoot||t instanceof Document){const i=t.getElementById(e);if(i)return i}const i=Array.from(t.querySelectorAll("*")).map(e=>{var t;return null!==(t=e.shadowRoot)&&void 0!==t?t:null}).filter(e=>null!==e);for(const t of i){const i=n(e,t);if(i)return i}return null}function l(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}i.d(t,{QZ:()=>o,XI:()=>n,dw:()=>l,qi:()=>s,sg:()=>r})},71128:(e,t,i)=>{i.d(t,{PopoverController:()=>y}),i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(87161),a=i(70429),h=i(20291),d=i(68419),c=i(36365),p=i(3998),u=i(33759),v=i(86210),m=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},g=function(e,t,i,r){return new(i||(i=Promise))(function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(n,l)}a((r=r.apply(e,t||[])).next())})};class y{show(e){}hide(){}toggle(){}isVisible(){return!1}}let f=class extends((0,o.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=d.zY.TRIGGER,this.placement=d.zY.PLACEMENT,this.strategy=d.zY.STRATEGY,this.color=d.zY.COLOR,this.visible=d.zY.VISIBLE,this.offset=d.zY.OFFSET,this.focusTrap=d.zY.FOCUS_TRAP,this.preventScroll=d.zY.PREVENT_SCROLL,this.showArrow=d.zY.ARROW,this.closeButton=d.zY.CLOSE_BUTTON,this.interactive=d.zY.INTERACTIVE,this.delay=d.zY.DELAY,this.hideOnEscape=d.zY.HIDE_ON_ESCAPE,this.hideOnBlur=d.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=d.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=d.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=d.zY.FOCUS_BACK,this.backdrop=d.zY.BACKDROP,this.flip=d.zY.FLIP,this.size=d.zY.SIZE,this.zIndex=d.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=d.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=d.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=d.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||p.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{p.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,s.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return g(this,void 0,void 0,function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,c.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return g(this,void 0,void 0,function*(){e.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),c.T.onDestroyedPopover(this),p.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return g(this,void 0,void 0,function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(d.ME).includes(this.placement)?this.placement:d.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter(e=>Object.values(d.tr).includes(e));this.setAttribute("trigger",e.length>0?this.trigger:d.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),e.has("color")&&this.setAttribute("color",Object.values(d.o$).includes(this.color)?this.color:d.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return g(this,void 0,void 0,function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)p.S.peek()!==this&&p.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),c.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),p.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,c.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}handleCreatePopoverFirstUpdate(){return g(this,void 0,void 0,function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>g(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return l.html`
|
|
48
48
|
<div class="popover-hover-bridge"></div>
|
|
49
49
|
${this.closeButton?l.html` <md-button
|
|
50
50
|
class="popover-close"
|
|
51
51
|
hasRemoveStyle
|
|
52
52
|
size="20"
|
|
53
53
|
circle
|
|
54
|
-
ariaLabel=${(0,h.
|
|
54
|
+
ariaLabel=${(0,h.ifDefined)(this.closeButtonAriaLabel)||""}
|
|
55
55
|
@button-click="${this.hidePopover}"
|
|
56
56
|
>
|
|
57
57
|
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
58
|
-
</md-button>`:
|
|
59
|
-
${this.showArrow?l.html`<div class="popover-arrow"></div>`:
|
|
58
|
+
</md-button>`:l.nothing}
|
|
59
|
+
${this.showArrow?l.html`<div class="popover-arrow"></div>`:l.nothing}
|
|
60
60
|
<div part="popover-content">
|
|
61
61
|
<slot></slot>
|
|
62
62
|
</div>
|
|
63
|
-
`}static get styles(){return[
|
|
63
|
+
`}static get styles(){return[v.A]}};m([(0,a.property)({type:String,reflect:!0})],f.prototype,"id",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"triggerID",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"trigger",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"placement",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"strategy",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"color",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],f.prototype,"visible",void 0),m([(0,a.property)({type:Number,reflect:!0})],f.prototype,"offset",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],f.prototype,"focusTrap",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],f.prototype,"preventScroll",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],f.prototype,"showArrow",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"close-button"})],f.prototype,"closeButton",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],f.prototype,"interactive",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"delay",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],f.prototype,"hideOnEscape",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],f.prototype,"hideOnBlur",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],f.prototype,"hideOnWindowBlur",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],f.prototype,"hideOnOutsideClick",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],f.prototype,"focusBackToTrigger",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],f.prototype,"backdrop",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],f.prototype,"flip",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],f.prototype,"size",void 0),m([(0,a.property)({type:Number,reflect:!0,attribute:"z-index"})],f.prototype,"zIndex",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"append-to"})],f.prototype,"appendTo",void 0),m([(0,a.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],f.prototype,"closeButtonAriaLabel",void 0),m([(0,a.property)({type:String,reflect:!0})],f.prototype,"role",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],f.prototype,"ariaLabelledby",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"aria-describedby"})],f.prototype,"ariaDescribedby",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],f.prototype,"disableAriaExpanded",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],f.prototype,"animationFrame",void 0),m([(0,a.property)({type:Object,attribute:!1})],f.prototype,"controller",null),f=m([(0,r.w)("md-popover")],f)}}]);
|
package/dist/6752.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6752.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[
|
|
2
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[6752],{36752:(t,e,s)=>{s.d(e,{s6:()=>N});const i=globalThis,n=i.trustedTypes,o=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",r=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+r,$=`<${l}>`,A=document,_=()=>A.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,d="[ \t\n\f\r]",p=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,u=/-->/g,g=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,f=/"/g,y=/^(?:script|style|textarea|title)$/i,H=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),x=(H(1),H(2),H(3),Symbol.for("lit-noChange")),N=Symbol.for("lit-nothing"),b=new WeakMap,T=A.createTreeWalker(A,129);function C(t,e){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(e):e}const M=(t,e)=>{const s=t.length-1,i=[];let n,o=2===e?"<svg>":3===e?"<math>":"",l=p;for(let e=0;e<s;e++){const s=t[e];let A,_,c=-1,a=0;for(;a<s.length&&(l.lastIndex=a,_=l.exec(s),null!==_);)a=l.lastIndex,l===p?"!--"===_[1]?l=u:void 0!==_[1]?l=g:void 0!==_[2]?(y.test(_[2])&&(n=RegExp("</"+_[2],"g")),l=m):void 0!==_[3]&&(l=m):l===m?">"===_[0]?(l=n??p,c=-1):void 0===_[1]?c=-2:(c=l.lastIndex-_[2].length,A=_[1],l=void 0===_[3]?m:'"'===_[3]?f:v):l===f||l===v?l=m:l===u||l===g?l=p:(l=m,n=void 0);const d=l===m&&t[e+1].startsWith("/>")?" ":"";o+=l===p?s+$:c>=0?(i.push(A),s.slice(0,c)+h+s.slice(c)+r+d):s+r+(-2===c?e:d)}return[C(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class w{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,$=0;const A=t.length-1,c=this.parts,[a,d]=M(t,e);if(this.el=w.createElement(a,s),T.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=T.nextNode())&&c.length<A;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(h)){const e=d[$++],s=i.getAttribute(t).split(r),n=/([.?@])?(.*)/.exec(e);c.push({type:1,index:o,name:n[2],strings:s,ctor:"."===n[1]?O:"?"===n[1]?R:"@"===n[1]?B:U}),i.removeAttribute(t)}else t.startsWith(r)&&(c.push({type:6,index:o}),i.removeAttribute(t));if(y.test(i.tagName)){const t=i.textContent.split(r),e=t.length-1;if(e>0){i.textContent=n?n.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],_()),T.nextNode(),c.push({type:2,index:++o});i.append(t[e],_())}}}else if(8===i.nodeType)if(i.data===l)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(r,t+1));)c.push({type:7,index:o}),t+=r.length-1}o++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function S(t,e,s=t,i){if(e===x)return e;let n=void 0!==i?s._$Co?.[i]:s._$Cl;const o=c(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t),n._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=n:s._$Cl=n),void 0!==n&&(e=S(t,n._$AS(t,e.values),n,i)),e}class E{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??A).importNode(e,!0);T.currentNode=i;let n=T.nextNode(),o=0,h=0,r=s[0];for(;void 0!==r;){if(o===r.index){let e;2===r.type?e=new I(n,n.nextSibling,this,t):1===r.type?e=new r.ctor(n,r.name,r.strings,this,t):6===r.type&&(e=new W(n,this,t)),this._$AV.push(e),r=s[++h]}o!==r?.index&&(n=T.nextNode(),o++)}return T.currentNode=A,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class I{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),c(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==x&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>a(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==N&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=w.createElement(C(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new E(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=b.get(t.strings);return void 0===e&&b.set(t.strings,e=new w(t)),e}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new I(this.O(_()),this.O(_()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class U{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=N}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(void 0===n)t=S(this,t,e,0),o=!c(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const i=t;let h,r;for(t=n[0],h=0;h<n.length-1;h++)r=S(this,i[s+h],e,h),r===x&&(r=this._$AH[h]),o||=!c(r)||r!==this._$AH[h],r===N?t=N:t!==N&&(t+=(r??"")+n[h+1]),this._$AH[h]=r}o&&!i&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class O extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}}class R extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==N)}}class B extends U{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??N)===x)return;const s=this._$AH,i=t===N&&s!==N||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==N&&(s===N||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const j=i.litHtmlPolyfillSupport;j?.(w,I),(i.litHtmlVersions??=[]).push("3.3.1")}}]);
|
package/dist/679.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[679,1465],{5657:(e,t,i)=>{i.d(t,{LG:()=>
|
|
1
|
+
"use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[679,1465],{5657:(e,t,i)=>{i.d(t,{LG:()=>r,Um:()=>c,i0:()=>n});var a=i(87161),o=i(31465);const n=(e,t,i,o,n)=>a.html`${e?s(t,i,o,n):l(t,i,n)}`,m=(e,t,i,o)=>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
|
-
>${null!=o?o:a.
|
|
8
|
-
>`,
|
|
7
|
+
>${null!=o?o:a.nothing}</md-avatar
|
|
8
|
+
>`,s=(e,t,i,n)=>{switch(e.toLowerCase()){case o.r.PROGRESSIVE_CAMPAIGN:case o.r.CALLBACK:case o.r.TELEPHONY:return m(t,i,"channel-call");case o.r.OUTBOUND_TELEPHONY:return m(t,i,"channel-callback");case o.r.INBOUND_TELEPHONY:return m(t,i,"channel-call-inbound");case o.r.APPLE_MESSAGES:return m(t,i,"channel-apple-chat");case o.r.OUTBOUND_CAMPAIGN:return m(t,i,"channel-campaign");case o.r.CHAT:return m(t,i,"channel-chat");case o.r.EMAIL:return m(t,i,"channel-email-inbound");case o.r.SMS:return m(t,i,"channel-sms-inbound");case o.r.FACEBOOK:return m(t,i,"channel-fb-messenger");case o.r.WHATSAPP:return m(t,i,"channel-whats-app");case o.r.MESSENGER:return m(t,i,"channel-facebook");case o.r.MIDCALL_TELEPHONY:return m(t,i,"channel-monitoring");case o.r.OUTBOUND_EMAIL:return m(t,i,"channel-email-outbound");case o.r.OUTBOUND_SMS:return m(t,i,"channel-sms-outbound");case o.r.SOCIAL_X:return m(t,i,"channel-twitter-x");case o.r.VIBER:return m(t,i,"channel-viber");case o.r.WECHAT:return m(t,i,"channel-we-chat");case o.r.WEBEX:return m(t,i,"channel-webex");case o.r.OUTBOUND_CHAT:return m(t,i,"channel-chat-outbound");case o.r.GOOGLE_MESSAGES:return m(t,i,"channel-custom",a.html`<img height="32px" width="32px" src="${n}" />`);case o.r.ICON_SRC:return m(t,i,"channel-custom",a.html`<img height="20px" width="20px" src="${n}" />`);default:return m(t,i,"channel-custom",a.html`<slot name="task-type"></slot>`)}},r=e=>{switch(e){case o.j.CONSULTING:return a.html` <md-icon name="headset-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.PLAY:return a.html` <md-icon name="play-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.HOLD:return a.html` <md-icon name="pause-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.j.CONFERENCE:return a.html` <md-icon name="meet-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.TRANSFERED:return a.html` <md-icon name="assign-privilege-bold" size="16" iconSet="momentumDesign"></md-icon> `;case o.j.COURTESY_CALLBACK:return a.html` <md-icon name="callrate-bold" size="12" iconSet="momentumDesign"></md-icon> `;case o.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> `}},l=(e,t,i)=>{switch(e.toLowerCase()){case o.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>
|
|
12
|
-
`;case o.r.OUTBOUND_TELEPHONY:return a.
|
|
12
|
+
`;case o.r.OUTBOUND_TELEPHONY:return a.html`
|
|
13
13
|
<md-badge color="green" circle>
|
|
14
14
|
<md-icon name="outgoing-call-legacy-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
15
15
|
</md-badge>
|
|
16
|
-
`;case o.r.INBOUND_TELEPHONY:return a.
|
|
16
|
+
`;case o.r.INBOUND_TELEPHONY:return a.html`
|
|
17
17
|
<md-badge color="green" circle>
|
|
18
18
|
<md-icon name="incoming-call-legacy-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
19
19
|
</md-badge>
|
|
20
|
-
`;case o.r.APPLE_MESSAGES:case o.r.MIDCALL_TELEPHONY:case o.r.ICON_SRC:return a.
|
|
20
|
+
`;case o.r.APPLE_MESSAGES:case o.r.MIDCALL_TELEPHONY:case o.r.ICON_SRC:return a.html`
|
|
21
21
|
<md-badge circle>
|
|
22
22
|
<img src="${i}" />
|
|
23
23
|
</md-badge>
|
|
24
|
-
`;case o.r.CALLBACK:return a.
|
|
24
|
+
`;case o.r.CALLBACK:return a.html`
|
|
25
25
|
<md-badge color="lime" circle>
|
|
26
26
|
<md-icon name="icon-icon-callback_18"></md-icon>
|
|
27
27
|
</md-badge>
|
|
28
|
-
`;case o.r.PROGRESSIVE_CAMPAIGN:return a.
|
|
28
|
+
`;case o.r.PROGRESSIVE_CAMPAIGN:return a.html`
|
|
29
29
|
<md-badge color="green" circle>
|
|
30
30
|
<md-icon name="icon-icon-campaign_18"></md-icon>
|
|
31
31
|
</md-badge>
|
|
32
|
-
`;case o.r.OUTBOUND_CAMPAIGN:return a.
|
|
32
|
+
`;case o.r.OUTBOUND_CAMPAIGN:return a.html`
|
|
33
33
|
<md-avatar
|
|
34
34
|
title="Channel Campaign"
|
|
35
35
|
type="channel-campaign"
|
|
36
36
|
avatar-style="default"
|
|
37
37
|
state=${t?"active":"rest"}
|
|
38
38
|
></md-avatar>
|
|
39
|
-
`;case o.r.CHAT:return a.
|
|
39
|
+
`;case o.r.CHAT:return a.html`
|
|
40
40
|
<md-badge color="blue" circle>
|
|
41
41
|
<md-icon name="chat-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
42
42
|
</md-badge>
|
|
43
|
-
`;case o.r.EMAIL:return a.
|
|
43
|
+
`;case o.r.EMAIL:return a.html`
|
|
44
44
|
<md-badge color="violet" circle>
|
|
45
45
|
<md-icon name="email-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
46
46
|
</md-badge>
|
|
47
|
-
`;case o.r.SMS:return a.
|
|
47
|
+
`;case o.r.SMS:return a.html`
|
|
48
48
|
<md-badge color="darkmint" circle>
|
|
49
49
|
<md-icon name="sms-filled" size="20" iconSet="momentumDesign" color="white-100"></md-icon>
|
|
50
50
|
</md-badge>
|
|
51
|
-
`;case o.r.FACEBOOK:return a.
|
|
51
|
+
`;case o.r.FACEBOOK:return a.html`
|
|
52
52
|
<md-badge bgColor="#0078FF" circle>
|
|
53
53
|
<md-icon name="messenger_16" iconSet="momentumUI" color="white-100"></md-icon>
|
|
54
54
|
</md-badge>
|
|
55
|
-
`;case o.r.WHATSAPP:return a.
|
|
55
|
+
`;case o.r.WHATSAPP:return a.html`
|
|
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
|
-
`;case o.r.OUTBOUND_CHAT:return a.
|
|
59
|
+
`;case o.r.OUTBOUND_CHAT:return a.html`
|
|
60
60
|
<md-badge color="blue" circle>
|
|
61
61
|
<md-icon name="chat-outbound-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
62
62
|
</md-badge>
|
|
63
|
-
`;default:return a.
|
|
63
|
+
`;default:return a.html` <slot name="task-type"></slot> `}},c=(e,t,i)=>{if(e<=0)return i.removeAttribute("has-messages"),a.nothing;i.setAttribute("has-messages","true");const o=e>99?"99+":e.toString();return t?a.html` <md-badge color="unreadcount"> ${o} </md-badge>`:a.html` <span class="new-chat-quantity">${o}</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",OUTBOUND_CHAT:"outbound_chat"}},52339:(e,t,i)=>{i.d(t,{A:()=>a});const a=i(87161).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-inline-end:.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-inline-end:2.5rem;width:calc(100% - .5rem)}.md-taskitem__addition{align-items:flex-end;display:flex;flex-direction:column;margin-inline-start:.5rem;text-align:end;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-inline-end:.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-inline-start: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-inline-start:.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-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif)}: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-inline-end:.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}}`}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/if-defined.js"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/if-defined.js")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/if-defined.js"]);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i,r)=>(()=>{"use strict";var o,s={20291:t=>{t.exports=r},63704:(t,e,i)=>{i.r(e),i.d(e,{Badge:()=>r});var r,o=i(31890),s=i(4313),d=i(87161),l=i(70429),p=i(85125),n=i(20291),a=i(15427),h=i(49480),c=function(t,e,i,r){var o,s=arguments.length,d=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(d=(s<3?o(d):s>3?o(e,i,d):o(e,i))||d);return s>3&&d&&Object.defineProperty(e,i,d),d};!function(t){let e=class extends d.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.circleSize=a.zj[40],this.small=!1,this.split=!1,this.disabled=!1,this.tabIndexing="",this.ariaHiddenSplits="",this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:d.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:d.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:d.nothing,this.renderWidth=()=>this.width?`width: ${this.width};`:d.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height||this.width?d.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host .md-badge {
|
|
4
4
|
${this.renderBgColor()};
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
${this.renderWidth()};
|
|
8
8
|
}
|
|
9
9
|
</style>
|
|
10
|
-
`:
|
|
10
|
+
`:d.nothing}static get styles(){return[s.A,h.A]}get computedAriaHiddenSplits(){return"true"===this.ariaHiddenSplits||"false"!==this.ariaHiddenSplits&&void 0}get computedTabIndex(){const t=parseInt(this.tabIndexing);return isNaN(t)?void 0:t}render(){const t={"md-badge--circle":this.circle,[`md-badge--circle-${this.circleSize}`]:this.circle,"md-badge--split":this.split,"md-badge--compact":this.compact,"md-badge--small":this.small||24===this.size,[`md-badge--size-${this.size}`]:!!this.size&&24!==this.size,"md-badge--outline":this.outlined,"md-badge--disabled":this.disabled,[`md-badge--${this.color}`]:!this.disabled&&this.color};return d.html`
|
|
11
11
|
${this.getStyles()}
|
|
12
12
|
<span
|
|
13
13
|
tabindex=${(0,n.ifDefined)(this.computedTabIndex)}
|
|
14
14
|
part="badge"
|
|
15
|
-
class="md-badge ${(0,
|
|
15
|
+
class="md-badge ${(0,p.classMap)(t)}"
|
|
16
16
|
aria-label=${this.ariaLabel}
|
|
17
17
|
>
|
|
18
18
|
${this.split?(()=>d.html`
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
name="split-right"
|
|
28
28
|
class="split split-right"
|
|
29
29
|
></slot>
|
|
30
|
-
`)():
|
|
30
|
+
`)():d.nothing}
|
|
31
31
|
<slot></slot>
|
|
32
32
|
</span>
|
|
33
|
-
`}};
|
|
33
|
+
`}};c([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,l.property)({type:String})],e.prototype,"color",void 0),c([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,l.property)({type:String})],e.prototype,"textColor",void 0),c([(0,l.property)({type:String})],e.prototype,"height",void 0),c([(0,l.property)({type:String})],e.prototype,"width",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"outlined",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"compact",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"circle",void 0),c([(0,l.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),c([(0,l.property)({type:Number})],e.prototype,"size",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"split",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:String})],e.prototype,"tabIndexing",void 0),c([(0,l.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=c([(0,o.w)("md-badge")],e),t.ELEMENT=e}(r||(r={}))},70429:t=>{t.exports=e},85125:t=>{t.exports=i},87161:e=>{e.exports=t}},d={};function l(t){var e=d[t];if(void 0!==e)return e.exports;var i=d[t]={exports:{}};return s[t](i,i.exports,l),i.exports}l.m=s,o=[],l.O=(t,e,i,r)=>{if(!e){var s=1/0;for(a=0;a<o.length;a++){for(var[e,i,r]=o[a],d=!0,p=0;p<e.length;p++)(!1&r||s>=r)&&Object.keys(l.O).every(t=>l.O[t](e[p]))?e.splice(p--,1):(d=!1,r<s&&(s=r));if(d){o.splice(a--,1);var n=i();void 0!==n&&(t=n)}}return t}r=r||0;for(var a=o.length;a>0&&o[a-1][2]>r;a--)o[a]=o[a-1];o[a]=[e,i,r]},l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8111:0};l.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,d,p]=i,n=0;if(s.some(e=>0!==t[e])){for(r in d)l.o(d,r)&&(l.m[r]=d[r]);if(p)var a=p(l)}for(e&&e(i);n<s.length;n++)o=s[n],l.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return l.O(a)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var p=l.O(void 0,[1890,4313,9480,5427],()=>l(63704));return l.O(p)})());
|
package/dist/comp/md-badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../
|
|
1
|
+
require("../1890"),require("../4313"),require("../9480"),require("../5427"),module.exports=require("../comp/md-badge-entry");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","luxon"],t);else{var r="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("luxon")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e.luxon);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t,r,i,o,a,s,n,d)=>(()=>{"use strict";var l,c={10318:e=>{e.exports=i},20291:e=>{e.exports=o},32022:e=>{e.exports=a},60554:e=>{e.exports=s},65796:e=>{e.exports=d},70429:e=>{e.exports=t},85125:e=>{e.exports=r},85314:e=>{e.exports=n},87161:t=>{t.exports=e},90827:(e,t,r)=>{r.r(t),r.d(t,{CardState:()=>
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","luxon"],t);else{var r="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("luxon")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e.luxon);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t,r,i,o,a,s,n,d)=>(()=>{"use strict";var l,c={10318:e=>{e.exports=i},20291:e=>{e.exports=o},32022:e=>{e.exports=a},60554:e=>{e.exports=s},65796:e=>{e.exports=d},70429:e=>{e.exports=t},85125:e=>{e.exports=r},85314:e=>{e.exports=n},87161:t=>{t.exports=e},90827:(e,t,r)=>{r.r(t),r.d(t,{CardState:()=>m,CardV2:()=>u}),r(96798),r(61200),r(83192);var i=r(31890),o=r(4313),a=r(87161),s=r(70429),n=r(85125),d=r(65796),l=r(80622),c=function(e,t,r,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s};const p="hh:mm:ss";var m,u;!function(e){e.DEFAULT="default",e.ACTIVE="active",e.INACTIVE="inactive"}(m||(m={})),function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.state=m.DEFAULT,this.identifier=void 0,this.header=void 0,this.info=void 0,this.data=void 0,this.createdTime=0,this.active=!1,this.expandable=!1,this.expandAriaLabel="Expand for more details",this.renderedData=""}connectedCallback(){super.connectedCallback(),this.checkForExtraInfoSlot()}disconnectedCallback(){super.disconnectedCallback(),this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}static get styles(){return[o.A,l.A]}get isCardActive(){return this.state===m.ACTIVE}update(e){super.update(e),(e.has("active")||e.has("data")||e.has("createdTime"))&&this.calculateRenderedData()}expandCardToggled(){var e;this.state=this.isCardActive?m.DEFAULT:m.ACTIVE,this.dispatchEvent(new CustomEvent("expand-card-toggled",{detail:{identifier:null!==(e=this.identifier)&&void 0!==e?e:"",active:this.isCardActive},bubbles:!0,composed:!0}))}checkForExtraInfoSlot(){var e;(null===(e=this.extraInfoSlot)||void 0===e?void 0:e.assignedNodes().length)>0?this.setAttribute("has-extra-info",""):this.removeAttribute("has-extra-info")}handleExtraInfoSlotChange(e){this.checkForExtraInfoSlot()}get cardClassMap(){return{"md-card-v2":!0,[`md-card--${this.state}`]:!0}}get contentClassMap(){return{"md-card-v2-content":!0,inactive:this.state===m.INACTIVE}}get footerExpandClassMap(){return{"md-card-v2-footer-expand":!0,hidden:!this.expandable}}get expandCardHandler(){return this.expandable?this.expandCardToggled:null}renderHeader(){return a.html`
|
|
2
2
|
<div class="md-card-v2-header-title">
|
|
3
3
|
<h3>${this.header}</h3>
|
|
4
4
|
${this.info?a.html`
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
<md-icon slot="icon" name="info-badge-filled" iconSet="momentumDesign"></md-icon>
|
|
8
8
|
</md-button>
|
|
9
9
|
</md-tooltip>
|
|
10
|
-
`:
|
|
10
|
+
`:a.nothing}
|
|
11
11
|
</div>
|
|
12
12
|
`}renderExpandButton(){return a.html`
|
|
13
|
-
<div class="${(0,n.
|
|
13
|
+
<div class="${(0,n.classMap)(this.footerExpandClassMap)}">
|
|
14
14
|
<md-button ariaLabel="${this.expandAriaLabel}" circle size="28">
|
|
15
15
|
<md-icon
|
|
16
16
|
slot="icon"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
${this.renderExpandButton()}
|
|
29
29
|
</div>
|
|
30
|
-
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=
|
|
31
|
-
<div class="${(0,n.
|
|
30
|
+
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=d.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p),this.interval=window.setInterval(()=>{this.renderedData=d.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p)},1e3))}render(){return a.html`
|
|
31
|
+
<div class="${(0,n.classMap)(this.cardClassMap)}" @click=${this.expandCardHandler}>
|
|
32
32
|
<div class="md-card-v2-header">${this.renderHeader()}</div>
|
|
33
|
-
<div class="${(0,n.
|
|
33
|
+
<div class="${(0,n.classMap)(this.contentClassMap)}">
|
|
34
34
|
<h2>${this.renderedData}</h2>
|
|
35
35
|
<div class="md-card-v2-content-extra-info">
|
|
36
36
|
<slot name="card-extra-info" @slotchange=${this.handleExtraInfoSlotChange}></slot>
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
${this.renderFooter()}
|
|
40
40
|
</div>
|
|
41
|
-
`}};
|
|
41
|
+
`}};c([(0,s.property)({type:String})],t.prototype,"state",void 0),c([(0,s.property)({type:String})],t.prototype,"identifier",void 0),c([(0,s.property)({type:String})],t.prototype,"header",void 0),c([(0,s.property)({type:String})],t.prototype,"info",void 0),c([(0,s.property)({type:String})],t.prototype,"data",void 0),c([(0,s.property)({type:Number})],t.prototype,"createdTime",void 0),c([(0,s.property)({type:Boolean})],t.prototype,"active",void 0),c([(0,s.property)({type:Boolean,reflect:!0})],t.prototype,"expandable",void 0),c([(0,s.property)({type:String,attribute:"expand-aria-label"})],t.prototype,"expandAriaLabel",void 0),c([(0,s.query)('slot[name="card-extra-info"]')],t.prototype,"extraInfoSlot",void 0),c([(0,s.state)()],t.prototype,"interval",void 0),c([(0,s.state)()],t.prototype,"renderedData",void 0),t=c([(0,i.w)("md-card-v2")],t),e.ELEMENT=t}(u||(u={}))}},p={};function m(e){var t=p[e];if(void 0!==t)return t.exports;var r=p[e]={exports:{}};return c[e](r,r.exports,m),r.exports}m.m=c,l=[],m.O=(e,t,r,i)=>{if(!t){var o=1/0;for(d=0;d<l.length;d++){for(var[t,r,i]=l[d],a=!0,s=0;s<t.length;s++)(!1&i||o>=i)&&Object.keys(m.O).every(e=>m.O[e](t[s]))?t.splice(s--,1):(a=!1,i<o&&(o=i));if(a){l.splice(d--,1);var n=r();void 0!==n&&(e=n)}}return e}i=i||0;for(var d=l.length;d>0&&l[d-1][2]>i;d--)l[d]=l[d-1];l[d]=[t,r,i]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var r in t)m.o(t,r)&&!m.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1521:0};m.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,[a,s,n]=r,d=0;if(a.some(t=>0!==e[t])){for(i in s)m.o(s,i)&&(m.m[i]=s[i]);if(n)var l=n(m)}for(t&&t(r);d<a.length;d++)o=a[d],m.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return m.O(l)},r=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var u=m.O(void 0,[6633,1890,4313,510,6283,5087,2176,6798,6865,1200,8889,8373,4624,591,768,195,6677,2848,7919,3192,5382,622],()=>m(90827));return m.O(u)})());
|
package/dist/comp/md-card-v2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../6633"),require("../
|
|
1
|
+
require("../6633"),require("../1890"),require("../4313"),require("../510"),require("../6283"),require("../5087"),require("../2176"),require("../6798"),require("../6865"),require("../1200"),require("../8889"),require("../8373"),require("../4624"),require("../591"),require("../768"),require("../195"),require("../6677"),require("../2848"),require("../7919"),require("../3192"),require("../5382"),require("../622"),module.exports=require("../comp/md-card-v2-entry");
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
${this.renderHeader()} ${this.renderBody()} ${this.renderFooter()}
|
|
51
51
|
</div>
|
|
52
52
|
</md-popover>
|
|
53
|
-
`}};h([(0,l.property)({type:String})],t.prototype,"placement",void 0),h([(0,l.property)({type:String,reflect:!0})],t.prototype,"triggerID",void 0),h([(0,l.property)({type:String})],t.prototype,"headerIconName",void 0),h([(0,l.property)({type:String})],t.prototype,"header",void 0),h([(0,l.property)({type:String})],t.prototype,"message",void 0),h([(0,l.property)({type:Boolean})],t.prototype,"show",void 0),h([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],t.prototype,"hideCloseButton",void 0),h([(0,l.property)({type:String})],t.prototype,"primaryButton",void 0),h([(0,l.property)({type:String})],t.prototype,"secondaryButton",void 0),h([(0,l.property)({type:String})],t.prototype,"linkText",void 0),h([(0,l.property)({type:String})],t.prototype,"href",void 0),h([(0,l.query)(".md-coachmark__trigger-component")],t.prototype,"triggerComponent",void 0),h([(0,l.query)(".md-coachmark__popper")],t.prototype,"popper",void 0),t=h([(0,o.w)("md-coachmark-popover")],t),e.ELEMENT=t}(r||(r={}))},32022:e=>{e.exports=s},60554:e=>{e.exports=n},70429:e=>{e.exports=t},71128:(e,t,i)=>{i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(87161),a=i(36752),p=i(54765),h=i(70429),c=i(68419),d=i(36365),u=i(3998),v=i(33759),m=i(86210),g=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},y=function(e,t,i,r){return new(i||(i=Promise))(function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(n,l)}a((r=r.apply(e,t||[])).next())})};let f=class extends((0,o.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=c.zY.TRIGGER,this.placement=c.zY.PLACEMENT,this.strategy=c.zY.STRATEGY,this.color=c.zY.COLOR,this.visible=c.zY.VISIBLE,this.offset=c.zY.OFFSET,this.focusTrap=c.zY.FOCUS_TRAP,this.preventScroll=c.zY.PREVENT_SCROLL,this.showArrow=c.zY.ARROW,this.closeButton=c.zY.CLOSE_BUTTON,this.interactive=c.zY.INTERACTIVE,this.delay=c.zY.DELAY,this.hideOnEscape=c.zY.HIDE_ON_ESCAPE,this.hideOnBlur=c.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=c.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=c.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=c.zY.FOCUS_BACK,this.backdrop=c.zY.BACKDROP,this.flip=c.zY.FLIP,this.size=c.zY.SIZE,this.zIndex=c.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=c.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=c.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=c.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||u.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{u.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,s.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new v.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return y(this,void 0,void 0,function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,d.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return y(this,void 0,void 0,function*(){e.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),d.T.onDestroyedPopover(this),u.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return y(this,void 0,void 0,function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(c.ME).includes(this.placement)?this.placement:c.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter(e=>Object.values(c.tr).includes(e));this.setAttribute("trigger",e.length>0?this.trigger:c.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),e.has("color")&&this.setAttribute("color",Object.values(c.o$).includes(this.color)?this.color:c.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return y(this,void 0,void 0,function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)u.S.peek()!==this&&u.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),d.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),u.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,d.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}handleCreatePopoverFirstUpdate(){return y(this,void 0,void 0,function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>y(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return l.html`
|
|
53
|
+
`}};h([(0,l.property)({type:String})],t.prototype,"placement",void 0),h([(0,l.property)({type:String,reflect:!0})],t.prototype,"triggerID",void 0),h([(0,l.property)({type:String})],t.prototype,"headerIconName",void 0),h([(0,l.property)({type:String})],t.prototype,"header",void 0),h([(0,l.property)({type:String})],t.prototype,"message",void 0),h([(0,l.property)({type:Boolean})],t.prototype,"show",void 0),h([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],t.prototype,"hideCloseButton",void 0),h([(0,l.property)({type:String})],t.prototype,"primaryButton",void 0),h([(0,l.property)({type:String})],t.prototype,"secondaryButton",void 0),h([(0,l.property)({type:String})],t.prototype,"linkText",void 0),h([(0,l.property)({type:String})],t.prototype,"href",void 0),h([(0,l.query)(".md-coachmark__trigger-component")],t.prototype,"triggerComponent",void 0),h([(0,l.query)(".md-coachmark__popper")],t.prototype,"popper",void 0),t=h([(0,o.w)("md-coachmark-popover")],t),e.ELEMENT=t}(r||(r={}))},32022:e=>{e.exports=s},60554:e=>{e.exports=n},70429:e=>{e.exports=t},71128:(e,t,i)=>{i(96798),i(61200);var r=i(31890),o=i(28373),s=i(66677),n=i(5784),l=i(87161),a=i(70429),p=i(20291),h=i(68419),c=i(36365),d=i(3998),u=i(33759),v=i(86210),m=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n},g=function(e,t,i,r){return new(i||(i=Promise))(function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(n,l)}a((r=r.apply(e,t||[])).next())})};let y=class extends((0,o.d)(l.LitElement)){set controller(e){e?(e.show=(e=!1)=>this.showPopover(e),e.hide=()=>this.hidePopover(),e.toggle=()=>this.togglePopoverVisible(),e.isVisible=()=>this.visible,this._controller=e):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=h.zY.TRIGGER,this.placement=h.zY.PLACEMENT,this.strategy=h.zY.STRATEGY,this.color=h.zY.COLOR,this.visible=h.zY.VISIBLE,this.offset=h.zY.OFFSET,this.focusTrap=h.zY.FOCUS_TRAP,this.preventScroll=h.zY.PREVENT_SCROLL,this.showArrow=h.zY.ARROW,this.closeButton=h.zY.CLOSE_BUTTON,this.interactive=h.zY.INTERACTIVE,this.delay=h.zY.DELAY,this.hideOnEscape=h.zY.HIDE_ON_ESCAPE,this.hideOnBlur=h.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=h.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=h.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=h.zY.FOCUS_BACK,this.backdrop=h.zY.BACKDROP,this.flip=h.zY.FLIP,this.size=h.zY.SIZE,this.zIndex=h.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=h.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=h.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=h.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=e=>{const t=e.composedPath();this.triggerElement&&t.includes(this.triggerElement)||t.includes(this)||d.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=e=>{this.visible&&"Escape"===e.code&&(e.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=e=>{const t=e.relatedTarget;!t||this.isElementInPopover(t)?t||setTimeout(()=>{const e=(0,s.dw)();this.isElementInPopover(e)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(e=!1)=>{this.cancelCloseDelay(),e&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{d.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,s.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=e=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(e)||this.togglePopoverVisible()},this.utils=new u.h(this),this.preventClickOutside=!0}firstUpdated(e){const t=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return g(this,void 0,void 0,function*(){t.firstUpdated.call(this,e),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,c.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const e=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return g(this,void 0,void 0,function*(){e.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),c.T.onDestroyedPopover(this),d.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const e=this.getRootNode();if(this.triggerElement=(0,s.qi)(`[id="${this.triggerID}"]`,e),!this.triggerElement){const t=null==e?void 0:e.host;if(t){const e=t.querySelector("[slot]");(null==e?void 0:e.id)===this.triggerID&&(this.triggerElement=e)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==e||e.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==e||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(e){const t=Object.create(null,{updated:{get:()=>super.updated}});return g(this,void 0,void 0,function*(){if(t.updated.call(this,e),e.has("visible")){const t=e.get("visible")||!1;yield this.isOpenUpdated(t,this.visible),this.utils.updateAriaExpandedAttribute()}if(e.has("placement")&&this.setAttribute("placement",Object.values(h.ME).includes(this.placement)?this.placement:h.zY.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){const e=this.trigger.split(" ").filter(e=>Object.values(h.tr).includes(e));this.setAttribute("trigger",e.length>0?this.trigger:h.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),e.has("color")&&this.setAttribute("color",Object.values(h.o$).includes(this.color)?this.color:h.zY.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(e.has("interactive")||e.has("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility(),e.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),e.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(e){return!!e&&(!!this.contains(e)||(0,s.QZ)("md-popover",e)===this)}isOpenUpdated(e,t){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:e=>super.preventScroll=e}});return g(this,void 0,void 0,function*(){var r,o,s,n;if(e!==t&&this.triggerElement)if(t)d.S.peek()!==this&&d.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(r=this.activateFocusTrap)||void 0===r||r.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),c.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),d.S.removeItem(this),this.backdropElement&&(null===(o=this.backdropElement)||void 0===o||o.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(s=this.deactivateFocusTrap)||void 0===s||s.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const e=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==e&&"alertdialog"!==e||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(n=this.setFocusOnDeepestNestedElement)||void 0===n||n.call(this,this.triggerElement)),this.previousActiveElement=null,c.T.onHidePopover(this)}})}isRectOverTrigger(e,t){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}return!1}isMouseOverTrigger(e){const{clientX:t,clientY:i}=e instanceof MouseEvent?e:{clientX:0,clientY:0};return this.isRectOverTrigger(t,i)}handleCreatePopoverFirstUpdate(){return g(this,void 0,void 0,function*(){var e,t;this.visible&&this.interactive&&(null===(e=this.setFocusableElements)||void 0===e||e.call(this),yield this.updateComplete,null===(t=this.setInitialFocus)||void 0===t||t.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const e=[(0,n.shift)()];let t=this.offset;if(this.flip&&e.push((0,n.flip)()),this.size){const t=this.renderRoot.querySelector('[part="popover-content"]');e.push((0,n.size)({apply({availableHeight:e}){t&&Object.assign(t.style,{maxHeight:`${e}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;t=Math.sqrt(2*i**2)/2+this.offset,e.push((0,n.arrow)({element:this.arrowElement,padding:12}))}e.push((0,n.offset)(t)),this.cleanupAutoUpdate=(0,n.autoUpdate)(this.triggerElement,this,()=>g(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:t,y:i,middlewareData:r,placement:o}=yield(0,n.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:e,strategy:this.strategy});this.utils.updatePopoverStyle(t,i),r.arrow&&this.arrowElement&&this.utils.updateArrowStyle(r.arrow,o),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(o)}),{animationFrame:this.animationFrame})}render(){return l.html`
|
|
54
54
|
<div class="popover-hover-bridge"></div>
|
|
55
55
|
${this.closeButton?l.html` <md-button
|
|
56
56
|
class="popover-close"
|
|
57
57
|
hasRemoveStyle
|
|
58
58
|
size="20"
|
|
59
59
|
circle
|
|
60
|
-
ariaLabel=${(0,p.
|
|
60
|
+
ariaLabel=${(0,p.ifDefined)(this.closeButtonAriaLabel)||""}
|
|
61
61
|
@button-click="${this.hidePopover}"
|
|
62
62
|
>
|
|
63
63
|
<md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
64
|
-
</md-button>`:
|
|
65
|
-
${this.showArrow?l.html`<div class="popover-arrow"></div>`:
|
|
64
|
+
</md-button>`:l.nothing}
|
|
65
|
+
${this.showArrow?l.html`<div class="popover-arrow"></div>`:l.nothing}
|
|
66
66
|
<div part="popover-content">
|
|
67
67
|
<slot></slot>
|
|
68
68
|
</div>
|
|
69
|
-
`}static get styles(){return[
|
|
69
|
+
`}static get styles(){return[v.A]}};m([(0,a.property)({type:String,reflect:!0})],y.prototype,"id",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"triggerID",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"trigger",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"placement",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"strategy",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"color",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,"visible",void 0),m([(0,a.property)({type:Number,reflect:!0})],y.prototype,"offset",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],y.prototype,"focusTrap",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],y.prototype,"preventScroll",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],y.prototype,"showArrow",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"close-button"})],y.prototype,"closeButton",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,"interactive",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"delay",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],y.prototype,"hideOnEscape",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],y.prototype,"hideOnBlur",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],y.prototype,"hideOnWindowBlur",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],y.prototype,"hideOnOutsideClick",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],y.prototype,"focusBackToTrigger",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,"backdrop",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,"flip",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,"size",void 0),m([(0,a.property)({type:Number,reflect:!0,attribute:"z-index"})],y.prototype,"zIndex",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"append-to"})],y.prototype,"appendTo",void 0),m([(0,a.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],y.prototype,"closeButtonAriaLabel",void 0),m([(0,a.property)({type:String,reflect:!0})],y.prototype,"role",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0),m([(0,a.property)({type:String,reflect:!0,attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],y.prototype,"disableAriaExpanded",void 0),m([(0,a.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],y.prototype,"animationFrame",void 0),m([(0,a.property)({type:Object,attribute:!1})],y.prototype,"controller",null),y=m([(0,r.w)("md-popover")],y)},85125:e=>{e.exports=i},85314:e=>{e.exports=l},87161:t=>{t.exports=e}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return h[e](i,i.exports,d),i.exports}d.m=h,p=[],d.O=(e,t,i,r)=>{if(!t){var o=1/0;for(a=0;a<p.length;a++){for(var[t,i,r]=p[a],s=!0,n=0;n<t.length;n++)(!1&r||o>=r)&&Object.keys(d.O).every(e=>d.O[e](t[n]))?t.splice(n--,1):(s=!1,r<o&&(o=r));if(s){p.splice(a--,1);var l=i();void 0!==l&&(e=l)}}return e}r=r||0;for(var a=p.length;a>0&&p[a-1][2]>r;a--)p[a]=p[a-1];p[a]=[t,i,r]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3413:0,4131:0};d.O.j=t=>0===e[t];var t=(t,i)=>{var r,o,[s,n,l]=i,a=0;if(s.some(t=>0!==e[t])){for(r in n)d.o(n,r)&&(d.m[r]=n[r]);if(l)var p=l(d)}for(t&&t(i);a<s.length;a++)o=s[a],d.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return d.O(p)},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=d.O(void 0,[6633,1890,4313,510,6283,5087,2176,6798,6865,1200,2576,8210,1270,3135,8345,1439,2924],()=>d(29895));return d.O(u)})());
|