@momentum-ui/web-components 2.25.2 → 2.25.4

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.
@@ -63,7 +63,7 @@
63
63
  id="${this.getCopyTabId(e)}"
64
64
  aria-label=${e.ariaLabel}
65
65
  aria-controls="${this.getAriaControlId(e)}"
66
- @click="${()=>this.handleOverlayClose()}"
66
+ @click=${()=>this.handleOverlayClose()}
67
67
  tabIndex="${this.tabHiddenIdPositiveTabIndex===e.id?0:-1}"
68
68
  role="menuitem"
69
69
  ?newMomentum=${this.newMomentum}
@@ -80,8 +80,8 @@
80
80
  max-height="${"288px"}"
81
81
  class="md-menu-overlay__more ${(0,h.classMap)({"md-menu-overlay__more--hidden":this.isMoreTabMenuMeasured&&!this.isMoreTabMenuVisible})}"
82
82
  placement="bottom-end"
83
- @menu-overlay-open="${()=>this.isMoreTabMenuOpen=!0}"
84
- @menu-overlay-close="${()=>this.isMoreTabMenuOpen=!1}"
83
+ @menu-overlay-open=${()=>this.isMoreTabMenuOpen=!0}
84
+ @menu-overlay-close=${()=>this.isMoreTabMenuOpen=!1}
85
85
  >
86
86
  ${this.moreMenuButtonTemplate}
87
87
  <div
@@ -30,7 +30,7 @@
30
30
  `)():a.nothing}
31
31
  <slot></slot>
32
32
  </span>
33
- `}};h([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),h([(0,l.property)({type:String})],e.prototype,"color",void 0),h([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),h([(0,l.property)({type:String})],e.prototype,"textColor",void 0),h([(0,l.property)({type:String})],e.prototype,"height",void 0),h([(0,l.property)({type:String})],e.prototype,"width",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"outlined",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"compact",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"circle",void 0),h([(0,l.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),h([(0,l.property)({type:Number})],e.prototype,"size",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"split",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),h([(0,l.property)({type:String})],e.prototype,"tabIndexing",void 0),h([(0,l.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=h([(0,o.w)("md-badge")],e),t.ELEMENT=e}(s||(s={}))},85314:t=>{t.exports=a},86610:(t,e,i)=>{i.r(e),i.d(e,{TaskItem:()=>s}),i(38028),i(63704),i(61200);var s,o=i(31890),r=i(26272),l=i(41488),a=i(40333),n=i(23968),p=i(31465),d=i(5657),m=i(50182),h=i(97822),c=function(t,e,i,s){var o,r=arguments.length,l=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(r<3?o(l):r>3?o(e,i,l):o(e,i))||l);return r>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.mediaType=p.r.TELEPHONY,this.status="",this.popovertitle="",this.queue="",this.queueTimeLabel="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.disabled=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.isRestyle=!1,this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.additionEmptyMargin=!1}get title(){return this.displayTitle}set title(t){this.titleValue=t,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(t){this.itemTitleValue=t,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(t){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.blur()}handleKeyDown(t){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:t.code},bubbles:!0,composed:!0}))}getAriaLabel(){var t,e,i,s;if(this.customAriaLabel)return this.customAriaLabel;let o=this.queue;if(!o){const i=this.querySelector('[slot="queue"]');if(i){o=null!==(e=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==e?e:i.innerText.trim();const s=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(o);if(s){const[,t=0,e,i]=s.map(Number);(new Date).setHours(t,e,i),o=o.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${t?t+" hours ":""}${e} minutes ${i} seconds`)}}}const r=this.querySelector('[slot="queue-time"]');let l=this.queueTimeLabel;return r&&(l+=`${null!==(s=null===(i=r.textContent)||void 0===i?void 0:i.trim())&&void 0!==s?s:r.innerText.trim()}`),`${this.mediaType} ${this.status} ${this.popovertitle} ${this.itemTitle} ${o} ${l} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,m.A]}get sanitizedTabIndexForContainer(){var t;return null!==(t=parseInt(this.tabIndexForContainer))&&void 0!==t?t:0}handleAdditionSlotChange(){var t;const e=(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-taskitem__addition")).getBoundingClientRect();this.additionEmptyMargin=0===e.width&&0===e.height}render(){return l.html`
33
+ `}};h([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),h([(0,l.property)({type:String})],e.prototype,"color",void 0),h([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),h([(0,l.property)({type:String})],e.prototype,"textColor",void 0),h([(0,l.property)({type:String})],e.prototype,"height",void 0),h([(0,l.property)({type:String})],e.prototype,"width",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"outlined",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"compact",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"circle",void 0),h([(0,l.property)({type:Number,attribute:"circle-size"})],e.prototype,"circleSize",void 0),h([(0,l.property)({type:Number})],e.prototype,"size",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"split",void 0),h([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),h([(0,l.property)({type:String})],e.prototype,"tabIndexing",void 0),h([(0,l.property)({type:String})],e.prototype,"ariaHiddenSplits",void 0),e=h([(0,o.w)("md-badge")],e),t.ELEMENT=e}(s||(s={}))},85314:t=>{t.exports=a},86610:(t,e,i)=>{i.r(e),i.d(e,{TaskItem:()=>s}),i(38028),i(63704),i(61200);var s,o=i(31890),r=i(26272),l=i(41488),a=i(40333),n=i(23968),p=i(97822),d=i(31465),m=i(5657),h=i(50182),c=function(t,e,i,s){var o,r=arguments.length,l=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(r<3?o(l):r>3?o(e,i,l):o(e,i))||l);return r>3&&l&&Object.defineProperty(e,i,l),l};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.mediaType=d.r.TELEPHONY,this.status="",this.popovertitle="",this.queue="",this.queueTimeLabel="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.disabled=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.isRestyle=!1,this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.additionEmptyMargin=!1}get title(){return this.displayTitle}set title(t){this.titleValue=t,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(t){this.itemTitleValue=t,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(t){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.blur()}handleKeyDown(t){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:t.code},bubbles:!0,composed:!0}))}getAriaLabel(){var t,e,i,s;if(this.customAriaLabel)return this.customAriaLabel;let o=this.queue;if(!o){const i=this.querySelector('[slot="queue"]');if(i){o=null!==(e=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==e?e:i.innerText.trim();const s=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(o);if(s){const[,t=0,e,i]=s.map(Number);(new Date).setHours(t,e,i),o=o.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${t?t+" hours ":""}${e} minutes ${i} seconds`)}}}const r=this.querySelector('[slot="queue-time"]');let l=this.queueTimeLabel;return r&&(l+=`${null!==(s=null===(i=r.textContent)||void 0===i?void 0:i.trim())&&void 0!==s?s:r.innerText.trim()}`),`${this.mediaType} ${this.status} ${this.popovertitle} ${this.itemTitle} ${o} ${l} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[r.A,h.A]}get sanitizedTabIndexForContainer(){var t;return null!==(t=parseInt(this.tabIndexForContainer))&&void 0!==t?t:0}handleAdditionSlotChange(){var t;const e=(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-taskitem__addition")).getBoundingClientRect();this.additionEmptyMargin=0===e.width&&0===e.height}render(){return l.html`
34
34
  <div
35
35
  part="task-item-container"
36
36
  class="md-taskitem ${(0,n.classMap)({selected:this.selected})}"
@@ -39,11 +39,11 @@
39
39
  @click=${t=>this.handleClick(t)}
40
40
  @keydown=${t=>this.handleKeyDown(t)}
41
41
  aria-label=${this.getAriaLabel()}
42
- aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
42
+ aria-disabled=${(0,p.ifDefined)(this.disabled||void 0)}
43
43
  >
44
44
  <div class="md-taskitem__mediatype">
45
- ${(0,d.i0)(this.isRestyle,this.mediaType,this.selected,this.status,this.iconSrc)}
46
- ${this.status&&!this.isRestyle?l.html` <span class=${`md-taskitem__status ${this.status}`}> ${(0,d.LG)(this.status)} </span> `:a.nothing}
45
+ ${(0,m.i0)(this.isRestyle,this.mediaType,this.selected,this.status,this.iconSrc)}
46
+ ${this.status&&!this.isRestyle?l.html` <span class=${`md-taskitem__status ${this.status}`}> ${(0,m.LG)(this.status)} </span> `:a.nothing}
47
47
  </div>
48
48
  <div class="md-taskitem__content" part="task-item-content">
49
49
  ${this.popovertitle?l.html`
@@ -56,7 +56,9 @@
56
56
  class="md-taskitem__content_title ${(0,n.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
57
57
  ><md-tooltip placement="bottom" slot-to-tooltip>${this.itemTitle}</md-tooltip></span
58
58
  >
59
- `:l.html` <span class="md-taskitem__content_popover_title popover-item-title"><slot name="title"></slot></span> `}
59
+ `:l.html`
60
+ <span class="md-taskitem__content_popover_title popover-item-title"><slot name="title"></slot></span>
61
+ `}
60
62
  <div class="md-taskitem__content_inner">
61
63
  ${this.displayOnlyTitle?a.nothing:l.html`
62
64
  <span class="md-taskitem__content_queue">
@@ -83,8 +85,8 @@
83
85
  ${this.lastmessage?a.nothing:l.html` <slot name="lastmessage"></slot> `}
84
86
  </div>
85
87
  <div class="md-taskitem__addition ${(0,n.classMap)({empty_addition:this.additionEmptyMargin})}">
86
- <slot @slotchange="${this.handleAdditionSlotChange}"></slot>
87
- ${(0,d.Um)(this.quantity,this.isRestyle,this)}
88
+ <slot @slotchange=${this.handleAdditionSlotChange}></slot>
89
+ ${(0,m.Um)(this.quantity,this.isRestyle,this)}
88
90
  </div>
89
91
  </div>
90
92
  `}};c([(0,l.property)({type:String})],e.prototype,"mediaType",void 0),c([(0,l.property)({type:String})],e.prototype,"status",void 0),c([(0,l.property)({type:String})],e.prototype,"popovertitle",void 0),c([(0,l.property)({type:String})],e.prototype,"queue",void 0),c([(0,l.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"accepted",void 0),c([(0,l.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),c([(0,l.property)({type:Number})],e.prototype,"quantity",void 0),c([(0,l.property)({type:String})],e.prototype,"lastmessage",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"selected",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:String})],e.prototype,"customAriaLabel",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSrc",void 0),c([(0,l.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),c([(0,l.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),c([(0,l.property)({type:String,reflect:!0})],e.prototype,"title",null),c([(0,l.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),c([(0,l.internalProperty)()],e.prototype,"additionEmptyMargin",void 0),e=c([(0,o.w)("md-task-item")],e),t.ELEMENT=e}(s||(s={}))},97822:t=>{t.exports=o}},h={};function c(t){var e=h[t];if(void 0!==e)return e.exports;var i=h[t]={exports:{}};return m[t](i,i.exports,c),i.exports}c.m=m,d=[],c.O=(t,e,i,s)=>{if(!e){var o=1/0;for(n=0;n<d.length;n++){for(var[e,i,s]=d[n],r=!0,l=0;l<e.length;l++)(!1&s||o>=s)&&Object.keys(c.O).every(t=>c.O[t](e[l]))?e.splice(l--,1):(r=!1,s<o&&(o=s));if(r){d.splice(n--,1);var a=i();void 0!==a&&(t=a)}}return t}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[e,i,s]},c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var i in e)c.o(e,i)&&!c.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8111:0,8339:0};c.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,l,a]=i,n=0;if(r.some(e=>0!==t[e])){for(s in l)c.o(l,s)&&(c.m[s]=l[s]);if(a)var p=a(c)}for(e&&e(i);n<r.length;n++)o=r[n],c.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return c.O(p)},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 u=c.O(void 0,[6633,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,3553,6877,6700,8923,7119,8028,2019,8612,5427],()=>c(86610));return c.O(u)})());
@@ -12,9 +12,9 @@
12
12
  max=${(0,h.ifDefined)(e.max)}
13
13
  maxLength=${2}
14
14
  placeholder="${y[t]}"
15
- @input-change="${e=>this.handleTimeChange(e,t)}"
16
- @input-keydown="${e=>this.handleTimeKeyDown(e,t)}"
17
- @input-blur="${e=>this.handleTimeBlur(e,t)}"
15
+ @input-change=${e=>this.handleTimeChange(e,t)}
16
+ @input-keydown=${e=>this.handleTimeKeyDown(e,t)}
17
+ @input-blur=${e=>this.handleTimeBlur(e,t)}
18
18
  .messageArr=${[{message:"",type:this.messageType(this.timeValidity[t])}]}
19
19
  .ariaLabel="${t}-input"
20
20
  ariaInvalid="${!this.timeValidity[t]}"
@@ -31,7 +31,7 @@
31
31
  no-clear-icon
32
32
  .inputValue=${this.timeValue[s.R5.AM_PM]}
33
33
  .ariaLabel=${this.timeValue[s.R5.AM_PM]}
34
- @change-selected="${t=>this.handleTimeChange(t,s.R5.AM_PM)}"
34
+ @change-selected=${t=>this.handleTimeChange(t,s.R5.AM_PM)}
35
35
  >
36
36
  </md-combobox>
37
37
  `}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}connectedCallback(){super.connectedCallback(),this.initializeTimeValues()}updated(t){super.updated(t),["value","locale","twentyFourHourFormat","showDefaultNowTime","timeSpecificity"].some(e=>t.has(e))&&this.initializeTimeValues()}initializeTimeValues(){if(this.showDefaultNowTime||this.value){const t=this.value||(0,r.tB)().toISOTime({suppressMilliseconds:!0});t&&this.updateValue(t)}else{const t=c.DateTime.now().setLocale(this.locale),e=this.getLocaleTimeFormat(t);this.finalTwentyFourFormat=this.twentyFourHourFormat||e;const i=this.timeSpecificity===s.R5.MINUTE||this.timeSpecificity===s.R5.SECOND,o=this.timeSpecificity===s.R5.SECOND;this.timeValue={[s.R5.HOUR]:"",[s.R5.MINUTE]:i?"":"00",[s.R5.SECOND]:o?"":"00",[s.R5.AM_PM]:"AM"}}}updateValue(t){const e=t||this.value;if(!e)return;this.timeObject=c.DateTime.fromISO(e,{locale:this.locale});const i=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||i,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}dispatchTimeChangeEvent(){this.dispatchEvent(new CustomEvent("time-selection-change",{bubbles:!0,composed:!0,detail:{time:this.value,data:this.timeObject,isValid:this.isEntireTimeValid()}}))}handleTimeChange(t,e){var i,o,r;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const a=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==s.R5.AM_PM&&2===a.length&&"0"!==a[0]||"00"===a)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),s=(t+1)%i.length;if(t<i.length-1){const t=null===(r=i[s].shadowRoot)||void 0===r?void 0:r.querySelector("input");null==t||t.focus()}}}else e===s.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const o=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!o)return void console.warn("srcEvent is undefined");const{key:r}=o;r===s.Uz.ArrowDown||r===s.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[l.A,p.A]}render(){return n.html`