@momentum-ui/web-components 3.2.9 → 3.2.11
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/2245.js +12 -11
- package/dist/2273.js +10 -7
- package/dist/3639.js +2 -3
- package/dist/378.js +18 -0
- package/dist/5057.js +1 -1
- package/dist/6005.js +1 -1
- package/dist/8663.js +5 -1
- package/dist/9189.js +3 -3
- package/dist/953.js +3 -5
- package/dist/comp/md-advance-list-entry.js +1 -1
- package/dist/comp/md-avatar-entry.js +5 -4
- package/dist/comp/md-avatar.js +1 -1
- package/dist/comp/md-chat-message-entry.js +1 -1
- package/dist/comp/md-chat-message.js +1 -1
- package/dist/comp/md-combobox-entry.js +24 -21
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +4 -6
- package/dist/comp/md-datepicker-day-entry.js +2 -3
- package/dist/comp/md-datepicker-entry.js +7 -3
- package/dist/comp/md-dropdown-entry.js +32 -23
- package/dist/comp/md-floating-modal-entry.js +24 -13
- package/dist/comp/md-grabber-entry.js +12 -8
- package/dist/comp/md-input-entry.js +14 -14
- package/dist/comp/md-meeting-alert-entry.js +1 -1
- package/dist/comp/md-meeting-alert.js +1 -1
- package/dist/comp/md-tabs-entry.js +16 -16
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-task-item.js +1 -1
- package/dist/esm/2245.js +5 -4
- package/dist/esm/2273.js +36 -33
- package/dist/esm/3639.js +2 -3
- package/dist/esm/378.js +18 -0
- package/dist/esm/4626.js +12 -11
- package/dist/esm/4654.js +10 -7
- package/dist/esm/5057.js +1 -1
- package/dist/esm/6005.js +1 -1
- package/dist/esm/6020.js +2 -3
- package/dist/esm/837.js +6 -8
- package/dist/esm/8663.js +5 -1
- package/dist/esm/9189.js +5 -5
- package/dist/esm/953.js +3 -5
- package/dist/esm/comp/md-advance-list-entry.js +3 -3
- package/dist/esm/comp/md-avatar-entry.js +1 -1
- package/dist/esm/comp/md-avatar.js +1 -1
- package/dist/esm/comp/md-chat-message-entry.js +1 -1
- package/dist/esm/comp/md-chat-message.js +1 -1
- package/dist/esm/comp/md-date-range-picker-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-entry.js +13 -9
- package/dist/esm/comp/md-dropdown-entry.js +36 -27
- package/dist/esm/comp/md-floating-modal-entry.js +24 -13
- package/dist/esm/comp/md-grabber-entry.js +10 -6
- package/dist/esm/comp/md-input-entry.js +4 -4
- package/dist/esm/comp/md-meeting-alert-entry.js +1 -1
- package/dist/esm/comp/md-meeting-alert.js +1 -1
- package/dist/esm/comp/md-tabs-entry.js +15 -15
- package/dist/esm/comp/md-task-item-entry.js +1 -1
- package/dist/esm/comp/md-task-item.js +1 -1
- package/dist/esm/index-entry.js +63 -39
- package/dist/esm/index.js +1 -1
- package/dist/index-entry.js +229 -204
- package/dist/index.js +1 -1
- package/dist/types/components/avatar/Avatar.constants.d.ts +2 -1
- package/dist/types/components/avatar/Avatar.d.ts +3 -0
- package/dist/types/components/combobox/ComboBox.d.ts +1 -1
- package/dist/types/components/date-range-picker/DateRangePicker.d.ts +1 -0
- package/dist/types/components/datepicker/DatePicker.d.ts +6 -0
- package/dist/types/components/dropdown/Dropdown.d.ts +1 -0
- package/dist/types/components/floating-modal/FloatingModal.d.ts +10 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -0
- package/dist/types/components/input/Input.d.ts +1 -0
- package/dist/types/components/tabs/Tabs.d.ts +1 -0
- package/package.json +1 -1
- package/dist/4621.js +0 -18
- package/dist/esm/4621.js +0 -18
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"@lit-labs/virtualizer";import*as t from"lit";import*as e from"lit/decorators.js";var i,s,r={2170(t,e,i){i.d(e,{L:()=>s});var s,r=i(2900),
|
|
1
|
+
import"@lit-labs/virtualizer";import*as t from"lit";import*as e from"lit/decorators.js";var i,s,r={2170(t,e,i){i.d(e,{L:()=>s});var s,r=i(2900),a=i(9609),l=i(3203),d=i(4084),o=i(2927),n=i(8899),h=i(3013),c=function(t,e,i,s){var r,a=arguments.length,l=a<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 d=t.length-1;d>=0;d--)(r=t[d])&&(l=(a<3?r(l):a>3?r(e,i,l):r(e,i))||l);return a>3&&l&&Object.defineProperty(e,i,l),l};!function(t){t.prefixId="item-";let e=class extends((0,l.y)(o.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i,s,a;const{ArrowDown:l,ArrowUp:d,Tab:o,Space:n,Enter:h}=r.Uz,{code:c}=e,p=c===l,u=c===d,v=c===o,m=c===n,I=c===h;if(p||u){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);p?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id,null===(s=this.virtualizer)||void 0===s||s.scrollToIndex(this.scrollIndex,"start"))}else if(v)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((m||I)&&(e.preventDefault(),this.activeId)){const e=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector(`#${t.prefixId}${this.activeId}`);e&&("true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.updateItemSelection(e))}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(e,i)=>{if(!e)return o.html`<div class="default-wrapper-error">Invalid item</div>`;if(!e.id)return console.warn(`AdvanceList.renderItem: item missing id at index ${i}`,e),o.html`<div class="default-wrapper-error">Item missing ID</div>`;try{return"status-indicator"===e.id?o.html`
|
|
2
2
|
<div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
|
|
3
3
|
`:o.html`
|
|
4
4
|
<div
|
|
@@ -19,7 +19,7 @@ import"@lit-labs/virtualizer";import*as t from"lit";import*as e from"lit/decorat
|
|
|
19
19
|
height: ${this.containerHeight};
|
|
20
20
|
}
|
|
21
21
|
</style>
|
|
22
|
-
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>t&&t.id&&!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&requestAnimationFrame(()=>this.updateSelectedState()),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,s,r,
|
|
22
|
+
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>t&&t.id&&!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&requestAnimationFrame(()=>this.updateSelectedState()),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange()),t.has("activeId")&&this.isUserNavigated&&requestAnimationFrame(()=>this.updateSelectedState())}setCheckboxAttributes(t,e){var i,s,r,a;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(a=e.querySelector("md-checkbox"))||void 0===a||a.removeAttribute("checked"):null===(r=e.querySelector("md-checkbox"))||void 0===r||r.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,s;const r=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,r),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),this.isUserNavigated&&e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),s=t.composedPath(),r=i.find(t=>s.includes(t));if(r)return(null==r?void 0:r.hasAttribute("disabled"))||"true"===(null==r?void 0:r.getAttribute("aria-disabled"))?0:r}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value&&this.value.length>0&&this.value[0]?`${t.prefixId}${this.value[0]}`:""}render(){return o.html`
|
|
23
23
|
${this.getStyles()}
|
|
24
24
|
<div
|
|
25
25
|
class="md-advance-list-wrapper virtual-scroll"
|
|
@@ -35,4 +35,4 @@ import"@lit-labs/virtualizer";import*as t from"lit";import*as e from"lit/decorat
|
|
|
35
35
|
@rangeChanged=${this.handleRangeChange}
|
|
36
36
|
></lit-virtualizer>
|
|
37
37
|
</div>
|
|
38
|
-
`}};c([(0,n.property)({type:Array})],e.prototype,"items",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isLoading",void 0),c([(0,n.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),c([(0,n.property)({type:Array})],e.prototype,"value",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleList",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaLabelList",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isError",void 0),c([(0,n.property)({type:String})],e.prototype,"containerHeight",void 0),c([(0,n.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"focusReset",void 0),c([(0,n.property)({type:Array})],e.prototype,"disabledItems",void 0),c([(0,n.property)({type:Number})],e.prototype,"totalRecords",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),c([(0,n.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),c([(0,n.query)("lit-virtualizer")],e.prototype,"virtualizer",void 0),c([(0,n.state)()],e.prototype,"scrollIndex",void 0),c([(0,n.state)()],e.prototype,"activeId",void 0),c([(0,n.state)()],e.prototype,"selectedItemsIds",void 0),c([(0,n.state)()],e.prototype,"isUserNavigated",void 0),e=c([(0,
|
|
38
|
+
`}};c([(0,n.property)({type:Array})],e.prototype,"items",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isLoading",void 0),c([(0,n.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),c([(0,n.property)({type:Array})],e.prototype,"value",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleList",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaLabelList",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isError",void 0),c([(0,n.property)({type:String})],e.prototype,"containerHeight",void 0),c([(0,n.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"focusReset",void 0),c([(0,n.property)({type:Array})],e.prototype,"disabledItems",void 0),c([(0,n.property)({type:Number})],e.prototype,"totalRecords",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),c([(0,n.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),c([(0,n.query)("lit-virtualizer")],e.prototype,"virtualizer",void 0),c([(0,n.state)()],e.prototype,"scrollIndex",void 0),c([(0,n.state)()],e.prototype,"activeId",void 0),c([(0,n.state)()],e.prototype,"selectedItemsIds",void 0),c([(0,n.state)()],e.prototype,"isUserNavigated",void 0),e=c([(0,a.w)("md-advance-list")],e),t.ELEMENT=e}(s||(s={}))},2927(e,i,s){var r,a;e.exports=(r={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html},a={},s.d(a,r),a)},8899(t,i,s){var r,a;t.exports=(r={property:()=>e.property,query:()=>e.query,state:()=>e.state},a={},s.d(a,r),a)}},a={};function l(t){var e=a[t];if(void 0!==e)return e.exports;var i=a[t]={exports:{}};return r[t](i,i.exports,l),i.exports}l.m=r,i=[],l.O=(t,e,s,r)=>{if(!e){var a=1/0;for(h=0;h<i.length;h++){for(var[e,s,r]=i[h],d=!0,o=0;o<e.length;o++)(!1&r||a>=r)&&Object.keys(l.O).every(t=>l.O[t](e[o]))?e.splice(o--,1):(d=!1,r<a&&(a=r));if(d){i.splice(h--,1);var n=s();void 0!==n&&(t=n)}}return t}r=r||0;for(var h=i.length;h>0&&i[h-1][2]>r;h--)i[h]=i[h-1];i[h]=[e,s,r]},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);export{l as __webpack_require__};s={3079:0},l.C=t=>{var e,i,{__webpack_esm_ids__:r,__webpack_esm_modules__:a,__webpack_esm_runtime__:d}=t,o=0;for(e in a)l.o(a,e)&&(l.m[e]=a[e]);for(d&&d(l);o<r.length;o++)i=r[o],l.o(s,i)&&s[i]&&s[i][0](),s[r[o]]=0;l.O()},l.O.j=t=>0===s[t];import*as d from"../9609.js";l.C(d);import*as o from"../4084.js";l.C(o);import*as n from"../519.js";l.C(n);import*as h from"../8441.js";l.C(h);import*as c from"../9983.js";l.C(c);import*as p from"../3013.js";l.C(p);var u=l.O(void 0,[9609,4084,519,8441,9983,3013],()=>l(2170));const v=(u=l.O(u)).L;export{v as AdvanceList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as o from"@momentum-ui/utils/lib/getColorValue";import*as t from"lit";import*as s from"lit/decorators.js";import*as e from"lit/directives/class-map.js";import*as a from"lit/directives/if-defined.js";import*as m from"lit/directives/style-map.js";import*as i from"lit/directives/until.js";import*as p from"mobx";var f,l,n={9500(o,t,s){var e,a;o.exports=(e={default:()=>r.default},a={},s.d(a,e),a)},3496(r,t,s){var e,a;r.exports=(e={default:()=>o.default},a={},s.d(a,e),a)},2927(r,o,s){var e,a;r.exports=(e={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html,nothing:()=>t.nothing},a={},s.d(a,e),a)},8899(r,o,t){var e,a;r.exports=(e={property:()=>s.property,query:()=>s.query,state:()=>s.state},a={},t.d(a,e),a)},4955(r,o,t){var s,a;r.exports=(s={classMap:()=>e.classMap},a={},t.d(a,s),a)},3517(r,o,t){var s,e;r.exports=(s={ifDefined:()=>a.ifDefined},e={},t.d(e,s),e)},1156(r,o,t){var s,e;r.exports=(s={styleMap:()=>m.styleMap},e={},t.d(e,s),e)},1666(r,o,t){var s,e;r.exports=(s={until:()=>i.until},e={},t.d(e,s),e)},4980(r,o,t){var s,e;r.exports=(s={action:()=>p.action,observable:()=>p.observable},e={},t.d(e,s),e)}},d={};function v(r){var o=d[r];if(void 0!==o)return o.exports;var t=d[r]={exports:{}};return n[r](t,t.exports,v),t.exports}v.m=n,f=[],v.O=(r,o,t,s)=>{if(!o){var e=1/0;for(p=0;p<f.length;p++){for(var[o,t,s]=f[p],a=!0,m=0;m<o.length;m++)(!1&s||e>=s)&&Object.keys(v.O).every(r=>v.O[r](o[m]))?o.splice(m--,1):(a=!1,s<e&&(e=s));if(a){f.splice(p--,1);var i=t();void 0!==i&&(r=i)}}return r}s=s||0;for(var p=f.length;p>0&&f[p-1][2]>s;p--)f[p]=f[p-1];f[p]=[o,t,s]},v.d=(r,o)=>{for(var t in o)v.o(o,t)&&!v.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},v.o=(r,o)=>Object.prototype.hasOwnProperty.call(r,o);export{v as __webpack_require__};l={502:0,1745:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8115:0,8442:0},v.C=r=>{var o,t,{__webpack_esm_ids__:s,__webpack_esm_modules__:e,__webpack_esm_runtime__:a}=r,m=0;for(o in e)v.o(e,o)&&(v.m[o]=e[o]);for(a&&a(v);m<s.length;m++)t=s[m],v.o(l,t)&&l[t]&&l[t][0](),l[s[m]]=0;v.O()},v.O.j=r=>0===l[r];import*as j from"../9609.js";v.C(j);import*as c from"../4084.js";v.C(c);import*as u from"../3305.js";v.C(u);import*as C from"../4739.js";v.C(C);import*as _ from"../7154.js";v.C(_);import*as x from"../9773.js";v.C(x);import*as b from"../5983.js";v.C(b);import*as y from"../9488.js";v.C(y);import*as O from"../1821.js";v.C(O);import*as h from"../519.js";v.C(h);import*as g from"../6325.js";v.C(g);import*as k from"../4449.js";v.C(k);import*as w from"../1392.js";v.C(w);import*as M from"../1618.js";v.C(M);import*as q from"../
|
|
1
|
+
import*as r from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as o from"@momentum-ui/utils/lib/getColorValue";import*as t from"lit";import*as s from"lit/decorators.js";import*as e from"lit/directives/class-map.js";import*as a from"lit/directives/if-defined.js";import*as m from"lit/directives/style-map.js";import*as i from"lit/directives/until.js";import*as p from"mobx";var f,l,n={9500(o,t,s){var e,a;o.exports=(e={default:()=>r.default},a={},s.d(a,e),a)},3496(r,t,s){var e,a;r.exports=(e={default:()=>o.default},a={},s.d(a,e),a)},2927(r,o,s){var e,a;r.exports=(e={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html,nothing:()=>t.nothing},a={},s.d(a,e),a)},8899(r,o,t){var e,a;r.exports=(e={property:()=>s.property,query:()=>s.query,state:()=>s.state},a={},t.d(a,e),a)},4955(r,o,t){var s,a;r.exports=(s={classMap:()=>e.classMap},a={},t.d(a,s),a)},3517(r,o,t){var s,e;r.exports=(s={ifDefined:()=>a.ifDefined},e={},t.d(e,s),e)},1156(r,o,t){var s,e;r.exports=(s={styleMap:()=>m.styleMap},e={},t.d(e,s),e)},1666(r,o,t){var s,e;r.exports=(s={until:()=>i.until},e={},t.d(e,s),e)},4980(r,o,t){var s,e;r.exports=(s={action:()=>p.action,observable:()=>p.observable},e={},t.d(e,s),e)}},d={};function v(r){var o=d[r];if(void 0!==o)return o.exports;var t=d[r]={exports:{}};return n[r](t,t.exports,v),t.exports}v.m=n,f=[],v.O=(r,o,t,s)=>{if(!o){var e=1/0;for(p=0;p<f.length;p++){for(var[o,t,s]=f[p],a=!0,m=0;m<o.length;m++)(!1&s||e>=s)&&Object.keys(v.O).every(r=>v.O[r](o[m]))?o.splice(m--,1):(a=!1,s<e&&(e=s));if(a){f.splice(p--,1);var i=t();void 0!==i&&(r=i)}}return r}s=s||0;for(var p=f.length;p>0&&f[p-1][2]>s;p--)f[p]=f[p-1];f[p]=[o,t,s]},v.d=(r,o)=>{for(var t in o)v.o(o,t)&&!v.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},v.o=(r,o)=>Object.prototype.hasOwnProperty.call(r,o);export{v as __webpack_require__};l={502:0,1745:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8115:0,8442:0},v.C=r=>{var o,t,{__webpack_esm_ids__:s,__webpack_esm_modules__:e,__webpack_esm_runtime__:a}=r,m=0;for(o in e)v.o(e,o)&&(v.m[o]=e[o]);for(a&&a(v);m<s.length;m++)t=s[m],v.o(l,t)&&l[t]&&l[t][0](),l[s[m]]=0;v.O()},v.O.j=r=>0===l[r];import*as j from"../9609.js";v.C(j);import*as c from"../4084.js";v.C(c);import*as u from"../3305.js";v.C(u);import*as C from"../4739.js";v.C(C);import*as _ from"../7154.js";v.C(_);import*as x from"../9773.js";v.C(x);import*as b from"../5983.js";v.C(b);import*as y from"../9488.js";v.C(y);import*as O from"../1821.js";v.C(O);import*as h from"../519.js";v.C(h);import*as g from"../6325.js";v.C(g);import*as k from"../4449.js";v.C(k);import*as w from"../1392.js";v.C(w);import*as M from"../1618.js";v.C(M);import*as q from"../378.js";v.C(q);import*as D from"../9244.js";v.C(D);import*as E from"../2245.js";v.C(E);var L=v.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,6325,4449,1392,1618,378,9244,2245],()=>v(2245));const P=(L=v.O(L)).e;export{P as Avatar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../9609.js";import"../4084.js";import"../3305.js";import"../4739.js";import"../7154.js";import"../9773.js";import"../5983.js";import"../9488.js";import"../1821.js";import"../519.js";import"../6325.js";import"../4449.js";import"../1392.js";import"../1618.js";import"../
|
|
1
|
+
import"../9609.js";import"../4084.js";import"../3305.js";import"../4739.js";import"../7154.js";import"../9773.js";import"../5983.js";import"../9488.js";import"../1821.js";import"../519.js";import"../6325.js";import"../4449.js";import"../1392.js";import"../1618.js";import"../378.js";import"../9244.js";import"../2245.js";export*from"../comp/md-avatar-entry.js";
|
|
@@ -31,4 +31,4 @@ import*as t from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as e
|
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
|
-
`}};d([(0,p.property)({type:String})],e.prototype,"title",void 0),d([(0,p.property)({type:String})],e.prototype,"src",void 0),d([(0,p.property)({type:String})],e.prototype,"time",void 0),d([(0,p.property)({type:String})],e.prototype,"label",void 0),d([(0,p.property)({type:String})],e.prototype,"status",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"isSelected",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"self",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),d([(0,p.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=d([(0,i.w)("md-chat-message")],e),t.ELEMENT=e}(r||(r={}))},9500(e,s,r){var i,o;e.exports=(i={default:()=>t.default},o={},r.d(o,i),o)},3496(t,s,r){var i,o;t.exports=(i={default:()=>e.default},o={},r.d(o,i),o)},2927(t,e,r){var i,o;t.exports=(i={LitElement:()=>s.LitElement,css:()=>s.css,html:()=>s.html,nothing:()=>s.nothing},o={},r.d(o,i),o)},8899(t,e,s){var i,o;t.exports=(i={property:()=>r.property,query:()=>r.query,state:()=>r.state},o={},s.d(o,i),o)},4955(t,e,s){var r,o;t.exports=(r={classMap:()=>i.classMap},o={},s.d(o,r),o)},3517(t,e,s){var r,i;t.exports=(r={ifDefined:()=>o.ifDefined},i={},s.d(i,r),i)},1156(t,e,s){var r,i;t.exports=(r={styleMap:()=>a.styleMap},i={},s.d(i,r),i)},1666(t,e,s){var r,i;t.exports=(r={until:()=>p.until},i={},s.d(i,r),i)},4980(t,e,s){var r,i;t.exports=(r={action:()=>m.action,observable:()=>m.observable},i={},s.d(i,r),i)}},n={};function v(t){var e=n[t];if(void 0!==e)return e.exports;var s=n[t]={exports:{}};return c[t](s,s.exports,v),s.exports}v.m=c,l=[],v.O=(t,e,s,r)=>{if(!e){var i=1/0;for(m=0;m<l.length;m++){for(var[e,s,r]=l[m],o=!0,a=0;a<e.length;a++)(!1&r||i>=r)&&Object.keys(v.O).every(t=>v.O[t](e[a]))?e.splice(a--,1):(o=!1,r<i&&(i=r));if(o){l.splice(m--,1);var p=s();void 0!==p&&(t=p)}}return t}r=r||0;for(var m=l.length;m>0&&l[m-1][2]>r;m--)l[m]=l[m-1];l[m]=[e,s,r]},v.d=(t,e)=>{for(var s in e)v.o(e,s)&&!v.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{v as __webpack_require__};d={502:0,1745:0,4545:0,4928:0,5369:0,6060:0,6920:0,7684:0,8111:0,8115:0,8442:0},v.C=t=>{var e,s,{__webpack_esm_ids__:r,__webpack_esm_modules__:i,__webpack_esm_runtime__:o}=t,a=0;for(e in i)v.o(i,e)&&(v.m[e]=i[e]);for(o&&o(v);a<r.length;a++)s=r[a],v.o(d,s)&&d[s]&&d[s][0](),d[r[a]]=0;v.O()},v.O.j=t=>0===d[t];import*as f from"../9609.js";v.C(f);import*as y from"../4084.js";v.C(y);import*as h from"../3305.js";v.C(h);import*as u from"../4739.js";v.C(u);import*as g from"../7154.js";v.C(g);import*as b from"../9773.js";v.C(b);import*as j from"../5983.js";v.C(j);import*as _ from"../9488.js";v.C(_);import*as C from"../1821.js";v.C(C);import*as x from"../519.js";v.C(x);import*as S from"../6325.js";v.C(S);import*as O from"../4449.js";v.C(O);import*as k from"../1392.js";v.C(k);import*as T from"../1618.js";v.C(T);import*as $ from"../
|
|
34
|
+
`}};d([(0,p.property)({type:String})],e.prototype,"title",void 0),d([(0,p.property)({type:String})],e.prototype,"src",void 0),d([(0,p.property)({type:String})],e.prototype,"time",void 0),d([(0,p.property)({type:String})],e.prototype,"label",void 0),d([(0,p.property)({type:String})],e.prototype,"status",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"isSelected",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),d([(0,p.property)({type:Boolean})],e.prototype,"self",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),d([(0,p.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),d([(0,p.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=d([(0,i.w)("md-chat-message")],e),t.ELEMENT=e}(r||(r={}))},9500(e,s,r){var i,o;e.exports=(i={default:()=>t.default},o={},r.d(o,i),o)},3496(t,s,r){var i,o;t.exports=(i={default:()=>e.default},o={},r.d(o,i),o)},2927(t,e,r){var i,o;t.exports=(i={LitElement:()=>s.LitElement,css:()=>s.css,html:()=>s.html,nothing:()=>s.nothing},o={},r.d(o,i),o)},8899(t,e,s){var i,o;t.exports=(i={property:()=>r.property,query:()=>r.query,state:()=>r.state},o={},s.d(o,i),o)},4955(t,e,s){var r,o;t.exports=(r={classMap:()=>i.classMap},o={},s.d(o,r),o)},3517(t,e,s){var r,i;t.exports=(r={ifDefined:()=>o.ifDefined},i={},s.d(i,r),i)},1156(t,e,s){var r,i;t.exports=(r={styleMap:()=>a.styleMap},i={},s.d(i,r),i)},1666(t,e,s){var r,i;t.exports=(r={until:()=>p.until},i={},s.d(i,r),i)},4980(t,e,s){var r,i;t.exports=(r={action:()=>m.action,observable:()=>m.observable},i={},s.d(i,r),i)}},n={};function v(t){var e=n[t];if(void 0!==e)return e.exports;var s=n[t]={exports:{}};return c[t](s,s.exports,v),s.exports}v.m=c,l=[],v.O=(t,e,s,r)=>{if(!e){var i=1/0;for(m=0;m<l.length;m++){for(var[e,s,r]=l[m],o=!0,a=0;a<e.length;a++)(!1&r||i>=r)&&Object.keys(v.O).every(t=>v.O[t](e[a]))?e.splice(a--,1):(o=!1,r<i&&(i=r));if(o){l.splice(m--,1);var p=s();void 0!==p&&(t=p)}}return t}r=r||0;for(var m=l.length;m>0&&l[m-1][2]>r;m--)l[m]=l[m-1];l[m]=[e,s,r]},v.d=(t,e)=>{for(var s in e)v.o(e,s)&&!v.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{v as __webpack_require__};d={502:0,1745:0,4545:0,4928:0,5369:0,6060:0,6920:0,7684:0,8111:0,8115:0,8442:0},v.C=t=>{var e,s,{__webpack_esm_ids__:r,__webpack_esm_modules__:i,__webpack_esm_runtime__:o}=t,a=0;for(e in i)v.o(i,e)&&(v.m[e]=i[e]);for(o&&o(v);a<r.length;a++)s=r[a],v.o(d,s)&&d[s]&&d[s][0](),d[r[a]]=0;v.O()},v.O.j=t=>0===d[t];import*as f from"../9609.js";v.C(f);import*as y from"../4084.js";v.C(y);import*as h from"../3305.js";v.C(h);import*as u from"../4739.js";v.C(u);import*as g from"../7154.js";v.C(g);import*as b from"../9773.js";v.C(b);import*as j from"../5983.js";v.C(j);import*as _ from"../9488.js";v.C(_);import*as C from"../1821.js";v.C(C);import*as x from"../519.js";v.C(x);import*as S from"../6325.js";v.C(S);import*as O from"../4449.js";v.C(O);import*as k from"../1392.js";v.C(k);import*as T from"../1618.js";v.C(T);import*as $ from"../378.js";v.C($);import*as D from"../9244.js";v.C(D);import*as E from"../4626.js";v.C(E);import*as L from"../9316.js";v.C(L);var w=v.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,6325,4449,1392,1618,378,9244,4626,9316],()=>v(5558));const M=(w=v.O(w)).c;export{M as ChatMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../9609.js";import"../4084.js";import"../3305.js";import"../4739.js";import"../7154.js";import"../9773.js";import"../5983.js";import"../9488.js";import"../1821.js";import"../519.js";import"../6325.js";import"../4449.js";import"../1392.js";import"../1618.js";import"../
|
|
1
|
+
import"../9609.js";import"../4084.js";import"../3305.js";import"../4739.js";import"../7154.js";import"../9773.js";import"../5983.js";import"../9488.js";import"../1821.js";import"../519.js";import"../6325.js";import"../4449.js";import"../1392.js";import"../1618.js";import"../378.js";import"../9244.js";import"../4626.js";import"../9316.js";export*from"../comp/md-chat-message-entry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"@floating-ui/dom";import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as
|
|
1
|
+
import*as t from"@floating-ui/dom";import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as a from"@momentum-ui/utils/lib/getColorValue";import*as r from"@popperjs/core/lib/modifiers/arrow";import*as s from"@popperjs/core/lib/modifiers/flip";import*as i from"@popperjs/core/lib/modifiers/offset";import*as o from"@popperjs/core/lib/modifiers/preventOverflow";import*as n from"@popperjs/core/lib/popper-lite";import*as l from"lit";import*as p from"lit/decorators.js";import*as m from"lit/directives/class-map.js";import*as d from"lit/directives/if-defined.js";import*as f from"lit/directives/repeat.js";import*as h from"lit/directives/style-map.js";import*as u from"luxon";import*as c from"mobx";var D,v,g={6243(t,e,a){a.d(e,{U:()=>m});var r=a(9609),s=a(878),i=a(8899),o=a(9642),n=a(8663),l=function(t,e,a,r){var s,i=arguments.length,o=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,a,r);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(i<3?s(o):i>3?s(e,a,o):s(e,a))||o);return i>3&&o&&Object.defineProperty(e,a,o),o};const p=" - ";var m;!function(t){let e=class extends n.l.ELEMENT{constructor(){super(...arguments),this.startDate=void 0,this.endDate=void 0,this.maxRangeLength=void 0,this.originalFilterDate=void 0,this.updateValue=()=>{if(this.startDate&&this.endDate){const t=t=>this.useISOFormat?t:o.DateTime.fromISO(t).toLocaleString(o.DateTime.DATE_SHORT,{locale:this.locale}),e=t(this.startDate),a=t(this.endDate);this.value=`${e}${p}${a}`}},this.isValueValid=()=>{var t,e;if(!this.validateDate)return!0;const a=null!==(e=null===(t=this.value)||void 0===t?void 0:t.split(p))&&void 0!==e?e:[];return 2===a.length&&this.validateDateString(a[0])&&this.validateDateString(a[1])},this.getDefaultAriaLabel=()=>{if(this.startDate&&this.endDate){const t=o.DateTime.fromISO(this.startDate),e=o.DateTime.fromISO(this.endDate);if(t.isValid&&e.isValid)return`Choose Date Range, currently selected range is ${t.toLocaleString(o.DateTime.DATE_FULL)} to ${e.toLocaleString(o.DateTime.DATE_FULL)}`}return"Choose Date Range"}}connectedCallback(){super.connectedCallback(),super.render(),this.addEventListener("date-pre-selection-change",this.handleDateSelection),this.parseInitialValue(),this.updateValue(),this.maxRangeLength&&(this.originalFilterDate=this.filterDate,this.updateFilterDate())}parseInitialValue(){if(this.value&&!this.startDate&&!this.endDate&&this.useISOFormat){const t=this.value.split(p);if(2===t.length){const e=o.DateTime.fromISO(t[0].trim()),a=o.DateTime.fromISO(t[1].trim());e.isValid&&a.isValid&&(this.startDate=e.toSQLDate(),this.endDate=a.toSQLDate(),this.focusedDate=e,this.selectedDate=e)}}}updateFilterDate(){this.maxRangeLength&&(this.filterDate=this.createCombinedFilter())}createCombinedFilter(){return t=>{if(this.originalFilterDate&&this.originalFilterDate(t))return!0;const e="string"==typeof t?o.DateTime.fromISO(t):t;if(!this.maxRangeLength||!this.startDate||this.endDate)return!1;const a=o.DateTime.fromISO(this.startDate),r=a.plus({days:this.maxRangeLength-1}).startOf("day"),s=a.minus({days:this.maxRangeLength-1}).startOf("day"),i=e.startOf("day");return i>r||i<s}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("date-pre-selection-change",this.handleDateSelection)}updated(t){var e;if(t.has("value")&&(null===(e=this.value)||void 0===e?void 0:e.includes(p))){const e=new Map(t);e.delete("value"),super.updated(e)}else super.updated(t);!t.has("startDate")&&!t.has("endDate")||t.has("focusedDate")||this.updateValue()}getPlaceHolderString(){if(this.placeholder)return this.placeholder;if(this.useISOFormat)return`YYYY-MM-DD${p}YYYY-MM-DD`;const t=(0,s.gq)(this.locale).toUpperCase();return`${t}${p}${t}`}setSelected(){}dateToSqlTranslate(t){return t.toSQLDate()}onApplyClick(){this.emitDateRange(),this.updateValue(),this.shouldCloseOnSelect&&this.setOpen(!1)}handleDateSelection(t){var e;const a=t.detail.data;a&&(this.selectedDate=a,this.focusedDate=a,this.startDate?this.endDate?(this.startDate=this.dateToSqlTranslate(a),this.endDate=void 0):a<o.DateTime.fromISO(this.startDate)?(this.endDate=this.startDate,this.startDate=this.dateToSqlTranslate(a)):this.endDate=this.dateToSqlTranslate(a):this.startDate=this.dateToSqlTranslate(a),this.updateFilterDate(),(null===(e=this.controlButtons)||void 0===e?void 0:e.apply)||(this.emitDateRange(),this.updateValue()))}emitDateRange(){if(!this.startDate||!this.endDate)return;const t=new CustomEvent("date-range-change",{detail:{startDate:this.startDate,endDate:this.endDate}});this.dispatchEvent(t)}};l([(0,i.property)({type:String,attribute:"start-date",reflect:!0})],e.prototype,"startDate",void 0),l([(0,i.property)({type:String,attribute:"end-date",reflect:!0})],e.prototype,"endDate",void 0),l([(0,i.property)({type:Number,attribute:"max-range-length"})],e.prototype,"maxRangeLength",void 0),e=l([(0,r.w)("md-date-range-picker")],e),t.ELEMENT=e}(m||(m={}))},4098(e,a,r){var s,i;e.exports=(s={arrow:()=>t.arrow,autoUpdate:()=>t.autoUpdate,computePosition:()=>t.computePosition,flip:()=>t.flip,offset:()=>t.offset,shift:()=>t.shift,size:()=>t.size},i={},r.d(i,s),i)},9500(t,a,r){var s,i;t.exports=(s={default:()=>e.default},i={},r.d(i,s),i)},3496(t,e,r){var s,i;t.exports=(s={default:()=>a.default},i={},r.d(i,s),i)},9644(t,e,a){var s,i;t.exports=(s={default:()=>r.default},i={},a.d(i,s),i)},9324(t,e,a){var r,i;t.exports=(r={default:()=>s.default},i={},a.d(i,r),i)},9520(t,e,a){var r,s;t.exports=(r={default:()=>i.default},s={},a.d(s,r),s)},6521(t,e,a){var r,s;t.exports=(r={default:()=>o.default},s={},a.d(s,r),s)},9709(t,e,a){var r,s;t.exports=(r={createPopper:()=>n.createPopper,defaultModifiers:()=>n.defaultModifiers},s={},a.d(s,r),s)},2927(t,e,a){var r,s;t.exports=(r={LitElement:()=>l.LitElement,css:()=>l.css,html:()=>l.html,nothing:()=>l.nothing},s={},a.d(s,r),s)},8899(t,e,a){var r,s;t.exports=(r={property:()=>p.property,query:()=>p.query,queryAssignedNodes:()=>p.queryAssignedNodes,state:()=>p.state},s={},a.d(s,r),s)},4955(t,e,a){var r,s;t.exports=(r={classMap:()=>m.classMap},s={},a.d(s,r),s)},3517(t,e,a){var r,s;t.exports=(r={ifDefined:()=>d.ifDefined},s={},a.d(s,r),s)},2577(t,e,a){var r,s;t.exports=(r={repeat:()=>f.repeat},s={},a.d(s,r),s)},1156(t,e,a){var r,s;t.exports=(r={styleMap:()=>h.styleMap},s={},a.d(s,r),s)},9642(t,e,a){var r,s;t.exports=(r={DateTime:()=>u.DateTime},s={},a.d(s,r),s)},4980(t,e,a){var r,s;t.exports=(r={action:()=>c.action,computed:()=>c.computed,makeObservable:()=>c.makeObservable,observable:()=>c.observable},s={},a.d(s,r),s)}},j={};function C(t){var e=j[t];if(void 0!==e)return e.exports;var a=j[t]={exports:{}};return g[t](a,a.exports,C),a.exports}C.m=g,D=[],C.O=(t,e,a,r)=>{if(!e){var s=1/0;for(l=0;l<D.length;l++){for(var[e,a,r]=D[l],i=!0,o=0;o<e.length;o++)(!1&r||s>=r)&&Object.keys(C.O).every(t=>C.O[t](e[o]))?e.splice(o--,1):(i=!1,r<s&&(s=r));if(i){D.splice(l--,1);var n=a();void 0!==n&&(t=n)}}return t}r=r||0;for(var l=D.length;l>0&&D[l-1][2]>r;l--)D[l]=D[l-1];D[l]=[e,a,r]},C.d=(t,e)=>{for(var a in e)C.o(e,a)&&!C.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},C.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),C.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{C as __webpack_require__};v={502:0,1745:0,2105:0,2169:0,3413:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8442:0},C.C=t=>{var e,a,{__webpack_esm_ids__:r,__webpack_esm_modules__:s,__webpack_esm_runtime__:i}=t,o=0;for(e in s)C.o(s,e)&&(C.m[e]=s[e]);for(i&&i(C);o<r.length;o++)a=r[o],C.o(v,a)&&v[a]&&v[a][0](),v[r[o]]=0;C.O()},C.O.j=t=>0===v[t];import*as b from"../9609.js";C.C(b);import*as y from"../4084.js";C.C(y);import*as O from"../3305.js";C.C(O);import*as x from"../4739.js";C.C(x);import*as S from"../7154.js";C.C(S);import*as T from"../9773.js";C.C(T);import*as L from"../5983.js";C.C(L);import*as _ from"../9488.js";C.C(_);import*as w from"../1821.js";C.C(w);import*as R from"../519.js";C.C(R);import*as E from"../8441.js";C.C(E);import*as F from"../2797.js";C.C(F);import*as I from"../9983.js";C.C(I);import*as V from"../4700.js";C.C(V);import*as k from"../3970.js";C.C(k);import*as M from"../7906.js";C.C(M);import*as q from"../9336.js";C.C(q);import*as P from"../9146.js";C.C(P);import*as $ from"../2369.js";C.C($);import*as U from"../3842.js";C.C(U);import*as Y from"../9189.js";C.C(Y);import*as A from"../708.js";C.C(A);import*as N from"../2492.js";C.C(N);import*as Q from"../3639.js";C.C(Q);import*as z from"../3331.js";C.C(z);import*as H from"../3876.js";C.C(H);import*as B from"../801.js";C.C(B);import*as G from"../878.js";C.C(G);import*as J from"../8371.js";C.C(J);import*as K from"../953.js";C.C(K);import*as W from"../8663.js";C.C(W);var X=C.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,4700,3970,7906,9336,9146,2369,3842,9189,708,2492,3639,3331,3876,801,878,8371,953,8663],()=>C(6243));const Z=(X=C.O(X)).U;export{Z as DateRangePicker};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as o from"@momentum-ui/utils/lib/getColorValue";import*as i from"@popperjs/core/lib/modifiers/arrow";import*as r from"@popperjs/core/lib/modifiers/flip";import*as a from"@popperjs/core/lib/modifiers/offset";import*as s from"@popperjs/core/lib/modifiers/preventOverflow";import*as l from"@popperjs/core/lib/popper-lite";import*as n from"lit";import*as p from"lit/decorators.js";import*as d from"lit/directives/class-map.js";import*as
|
|
1
|
+
import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as o from"@momentum-ui/utils/lib/getColorValue";import*as i from"@popperjs/core/lib/modifiers/arrow";import*as r from"@popperjs/core/lib/modifiers/flip";import*as a from"@popperjs/core/lib/modifiers/offset";import*as s from"@popperjs/core/lib/modifiers/preventOverflow";import*as l from"@popperjs/core/lib/popper-lite";import*as n from"lit";import*as p from"lit/decorators.js";import*as d from"lit/directives/class-map.js";import*as h from"lit/directives/if-defined.js";import*as m from"lit/directives/repeat.js";import*as u from"lit/directives/style-map.js";import*as c from"luxon";import*as v from"mobx";var y,f,D={8663(e,t,o){o.d(t,{l:()=>i});var i,r=o(2900),a=o(3876),s=o(9609),l=o(878),n=o(3331),p=o(2927),d=o(8899),h=o(3517),m=o(9642),u=(o(9189),o(708),o(405)),c=(o(837),o(3842)),v=function(e,t,o,i){var r,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,o,s):r(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends p.LitElement{constructor(){super(...arguments),this.shouldCloseOnSelect=!1,this.maxDate=void 0,this.minDate=void 0,this.value=void 0,this.weekStart="Sunday",this.placeholder=void 0,this.locale=void 0,this.useISOFormat=!0,this.validateDate=!0,this.includesTime=!1,this.disabled=!1,this.htmlId="",this.label="",this.ariaLabel=null,this.displayValue=null,this.required=!1,this.errorMessage="",this.customTrigger=!1,this.isMenuOverlayOpen=!1,this.newMomentum=void 0,this.disableUserTextInput=!1,this.compactInput=void 0,this.controlButtons=void 0,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.usePopover=!1,this.triggerID="date-trigger",this.animationFrame=!1,this.isDatePickerMonthLoading=!1,this.isDatePickerMonthError=!1,this.errorMessages={},this.selectedDate=(0,l.tB)(),this.focusedDate=(0,l.tB)(),this.filterDate=void 0,this.onRetry=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.popoverController=null,this.openedViaKeyboard=!1,this.handleDateInputChange=e=>{var t,o;this.useISOFormat?this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value:this.value=null===(o=this.selectedDate)||void 0===o?void 0:o.toLocaleString(m.DateTime.DATE_SHORT,{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,value:this.value}}))},this.setOpen=e=>{var t,o;this.usePopover?e?null===(t=this.popoverController)||void 0===t||t.show():null===(o=this.popoverController)||void 0===o||o.hide():this.menuOverlay.isOpen=e,this.isMenuOverlayOpen=e},this.setPreSelection=e=>{if(!(null==e?void 0:e.isValid))return;const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};(0,l.t_)(e,t)||(this.focusedDate=e)},this.handleOverlayOpened=()=>{this.isMenuOverlayOpen=!0,this.openedViaKeyboard&&(this.openedViaKeyboard=!1,this.focusCalendarDay())},this.handleOverlayClosed=()=>{this.isMenuOverlayOpen=!1,this.focusDateInput()},this.handleInputKeyDown=e=>{switch(e.code){case r.Uz.ArrowDown:e.preventDefault(),this.isCalendarOpen||(this.openedViaKeyboard=!0,this.setOpen(!0));break;case r.Uz.Escape:this.isCalendarOpen&&(e.preventDefault(),e.stopPropagation(),this.setOpen(!1),this.focusDateInput())}},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let o=!1;const i=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),o=!0;break;case"Escape":this.setOpen(!1),o=!0;break;case"ArrowUp":this.setPreSelection((0,l.WB)(i,1)),o=!0;break;case"ArrowLeft":this.setPreSelection((0,l.gg)(i,1)),o=!0;break;case"ArrowRight":this.setPreSelection((0,l.fi)(i,1)),o=!0;break;case"ArrowDown":this.setPreSelection((0,l.J4)(i,1)),o=!0}o&&(t.stopPropagation(),t.preventDefault())},this.getDefaultAriaLabel=()=>{var e;return(null===(e=this.selectedDate)||void 0===e?void 0:e.isValid)?`Choose Date, selected date is ${this.selectedDate.toLocaleString(m.DateTime.DATE_FULL)}`:"Choose Date"},this.getValidRegexString=()=>this.includesTime?n.b.ISOString:n.b.ISODateString}get computedNewMomentum(){return void 0!==this.newMomentum?this.newMomentum:a.vz.isMomentumV2Enabled}static get styles(){return c.A}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&(this.maxDateData=(0,l.mA)(this.maxDate)),this.usePopover&&(this.popoverController=new u.I)}firstUpdated(e){super.firstUpdated(e),!this.value&&this.showDefaultNowDate&&(this.value=this.getFormattedDate(this.selectedDate))}updated(e){super.updated(e),this.value&&e.has("value")&&(this.useISOFormat?this.selectedDate=(0,l.mA)(this.value):this.selectedDate=m.DateTime.fromFormat(this.value,(0,l.gq)(this.locale),{locale:this.locale}),this.setPreSelection(this.selectedDate)),e.has("locale")&&this.render(),this.minDate&&e.has("minDate")&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&e.has("maxDate")&&(this.maxDateData=(0,l.mA)(this.maxDate)),!this.usePopover&&e.has("usePopover")&&(this.popoverController=new u.I)}handleSelect(e){var t;const o=e.detail.date,i=e.detail.sourceEvent;this.setPreSelection(o),this.dispatchEvent(new CustomEvent("date-pre-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:i,data:o}})),(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&"apply-button-clicked"!==(null==i?void 0:i.type)||(this.setSelected(o,i),this.shouldCloseOnSelect&&this.setOpen(!1))}getISODateTime(e){return this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate()}setSelected(e,t){const o={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!(0,l.t_)(e,o)){const t=this.getISODateTime(e);this.selectedDate=e,this.useISOFormat?this.value=t:this.value=e.toLocaleString(m.DateTime.DATE_SHORT,{locale:this.locale})}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))}get isCalendarOpen(){var e,t,o,i;return this.usePopover?null!==(t=null===(e=this.popoverController)||void 0===e?void 0:e.isVisible())&&void 0!==t&&t:null!==(i=null===(o=this.menuOverlay)||void 0===o?void 0:o.isOpen)&&void 0!==i&&i}focusDateInput(){requestAnimationFrame(()=>{var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".date-input");null==t||t.focus()})}focusCalendarDay(){const e=t=>{requestAnimationFrame(()=>{var o,i,r,a,s,l;const n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector("md-datepicker-calendar"),p=null===(i=null==n?void 0:n.shadowRoot)||void 0===i?void 0:i.querySelector("md-datepicker-month"),d=null===(r=null==p?void 0:p.shadowRoot)||void 0===r?void 0:r.querySelectorAll("md-datepicker-week");if(d){for(const e of Array.from(d)){const t=null===(a=e.shadowRoot)||void 0===a?void 0:a.querySelector("md-datepicker-day[focused]");if(t){const e=null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector("md-button"),o=null===(l=null==e?void 0:e.shadowRoot)||void 0===l?void 0:l.querySelector("button");if(o)return void o.focus()}}t>0&&e(t-1)}else t>0&&e(t-1)})};e(8)}validateDateString(e){if(!e&&""!==e)return!0;if(this.useISOFormat){const t=RegExp(this.getValidRegexString()),o={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return!!e&&t.test(e)&&!(0,l.t_)((0,l.mA)(e),o)}const t=(0,l.gq)(this.locale);return m.DateTime.fromFormat(e,t,{locale:this.locale}).isValid}isValueValid(){return!this.validateDate||this.validateDateString(this.value)}get messageArray(){return this.errorMessage?[{message:this.errorMessage,type:"error"}]:this.isValueValid()?[]:[{message:"",type:"error"}]}onCancelClick(){this.setOpen(!1)}onApplyClick(){this.handleSelect(new CustomEvent("day-select",{detail:{date:this.focusedDate,sourceEvent:new Event("apply-button-clicked")}}))}renderControlButtons(){var e,t,o,i,r,a;return!this.controlButtons||this.isDatePickerMonthLoading||this.isDatePickerMonthError?p.nothing:p.html`
|
|
2
2
|
<div class="control-buttons">
|
|
3
3
|
${this.controlButtons.cancel?p.html`
|
|
4
4
|
<md-button
|
|
5
5
|
class="cancel-button"
|
|
6
|
-
aria-label=${(0,
|
|
6
|
+
aria-label=${(0,h.ifDefined)(null===(e=this.controlButtons.cancel)||void 0===e?void 0:e.ariaLabel)}
|
|
7
7
|
?disabled=${null!==(o=null===(t=this.controlButtons.cancel)||void 0===t?void 0:t.disabled)&&void 0!==o&&o}
|
|
8
8
|
@button-click=${this.onCancelClick}
|
|
9
9
|
variant="secondary"
|
|
@@ -14,7 +14,7 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
14
14
|
${this.controlButtons.apply?p.html`
|
|
15
15
|
<md-button
|
|
16
16
|
class="apply-button"
|
|
17
|
-
aria-label=${(0,
|
|
17
|
+
aria-label=${(0,h.ifDefined)(null===(i=this.controlButtons.apply)||void 0===i?void 0:i.ariaLabel)}
|
|
18
18
|
?disabled=${null!==(a=null===(r=this.controlButtons.apply)||void 0===r?void 0:r.disabled)&&void 0!==a&&a}
|
|
19
19
|
@button-click=${this.onApplyClick}
|
|
20
20
|
variant="primary"
|
|
@@ -23,12 +23,12 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
23
23
|
</md-button>
|
|
24
24
|
`:null}
|
|
25
25
|
</div>
|
|
26
|
-
`}getPlaceHolderString(){var e;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(e=this.locale)&&void 0!==e?e:
|
|
26
|
+
`}getPlaceHolderString(){var e;return this.placeholder?this.placeholder:this.useISOFormat?"YYYY-MM-DD":(0,l.gq)(null!==(e=this.locale)&&void 0!==e?e:m.DateTime.local().locale).toUpperCase()}getFormattedDate(e){return e?this.useISOFormat?this.getISODateTime(e):this.includesTime?e.toLocaleString(m.DateTime.DATETIME_SHORT,{locale:this.locale}):e.toLocaleString(m.DateTime.DATE_SHORT,{locale:this.locale}):null}getAriaLabel(){var e;return null!==(e=this.ariaLabel)&&void 0!==e?e:this.getDefaultAriaLabel()}get isAriaExpanded(){return this.isMenuOverlayOpen?"true":"false"}renderPopover(){var e,t;return p.html`
|
|
27
27
|
<md-popover
|
|
28
28
|
trigger="click"
|
|
29
29
|
.triggerID=${this.triggerID}
|
|
30
30
|
placement="bottom"
|
|
31
|
-
strategy=${(0,
|
|
31
|
+
strategy=${(0,h.ifDefined)(this.positioningStrategy)}
|
|
32
32
|
hide-on-escape
|
|
33
33
|
hide-on-outside-click
|
|
34
34
|
focus-trap
|
|
@@ -36,6 +36,8 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
36
36
|
.controller=${this.popoverController}
|
|
37
37
|
?animation-frame=${this.animationFrame}
|
|
38
38
|
.offset=${15}
|
|
39
|
+
@shown=${this.handleOverlayOpened}
|
|
40
|
+
@hidden=${this.handleOverlayClosed}
|
|
39
41
|
>
|
|
40
42
|
<div class="date-overlay-content">
|
|
41
43
|
<md-datepicker-calendar
|
|
@@ -65,7 +67,7 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
65
67
|
ariaRole="combobox"
|
|
66
68
|
?newMomentum=${this.computedNewMomentum}
|
|
67
69
|
placeholder=${this.getPlaceHolderString()}
|
|
68
|
-
value=${null!==(e=this.displayValue)&&void 0!==e?e:(0,
|
|
70
|
+
value=${null!==(e=this.displayValue)&&void 0!==e?e:(0,h.ifDefined)(null!==(t=this.value)&&void 0!==t?t:void 0)}
|
|
69
71
|
.disableUserTextInput=${this.disableUserTextInput}
|
|
70
72
|
htmlId=${this.htmlId}
|
|
71
73
|
label=${this.label}
|
|
@@ -90,7 +92,9 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
90
92
|
is-date-picker
|
|
91
93
|
custom-width="272px"
|
|
92
94
|
?disabled=${this.disabled}
|
|
93
|
-
positioning-strategy=${(0,
|
|
95
|
+
positioning-strategy=${(0,h.ifDefined)(this.positioningStrategy)}
|
|
96
|
+
@menu-overlay-open=${this.handleOverlayOpened}
|
|
97
|
+
@menu-overlay-close=${this.handleOverlayClosed}
|
|
94
98
|
>
|
|
95
99
|
${this.customTrigger?p.html`
|
|
96
100
|
<span slot="menu-trigger">
|
|
@@ -103,7 +107,7 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
103
107
|
ariaRole="combobox"
|
|
104
108
|
?newMomentum=${this.computedNewMomentum}
|
|
105
109
|
placeholder=${this.getPlaceHolderString()}
|
|
106
|
-
value=${null!==(e=this.displayValue)&&void 0!==e?e:(0,
|
|
110
|
+
value=${null!==(e=this.displayValue)&&void 0!==e?e:(0,h.ifDefined)(null!==(t=this.value)&&void 0!==t?t:void 0)}
|
|
107
111
|
.disableUserTextInput=${this.disableUserTextInput}
|
|
108
112
|
htmlId=${this.htmlId}
|
|
109
113
|
label=${this.label}
|
|
@@ -140,4 +144,4 @@ import*as e from"@floating-ui/dom";import*as t from"@momentum-ui/icons/data/mome
|
|
|
140
144
|
${this.renderControlButtons()}
|
|
141
145
|
</div>
|
|
142
146
|
</md-menu-overlay>
|
|
143
|
-
`}render(){return this.usePopover?this.renderPopover():this.renderMenuOverlay()}};v([(0,d.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),v([(0,d.property)({type:String})],t.prototype,"maxDate",void 0),v([(0,d.property)({type:String})],t.prototype,"minDate",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"value",void 0),v([(0,d.property)({type:String})],t.prototype,"weekStart",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),v([(0,d.property)({type:String})],t.prototype,"locale",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"useISOFormat",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"validateDate",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),v([(0,d.property)({type:String})],t.prototype,"htmlId",void 0),v([(0,d.property)({type:String})],t.prototype,"label",void 0),v([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),v([(0,d.property)({type:String})],t.prototype,"displayValue",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"required",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),v([(0,d.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"isMenuOverlayOpen",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disableUserTextInput",void 0),v([(0,d.property)({type:Boolean,attribute:"compact-input"})],t.prototype,"compactInput",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"controlButtons",void 0),v([(0,d.property)({type:String,attribute:"positioning-strategy"})],t.prototype,"positioningStrategy",void 0),v([(0,d.property)({type:Boolean,attribute:"show-default-now-date"})],t.prototype,"showDefaultNowDate",void 0),v([(0,d.property)({type:Boolean,attribute:"use-popover"})],t.prototype,"usePopover",void 0),v([(0,d.property)({type:String,attribute:"triggerID"})],t.prototype,"triggerID",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],t.prototype,"animationFrame",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),v([(0,d.state)()],t.prototype,"selectedDate",void 0),v([(0,d.state)()],t.prototype,"focusedDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"filterDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),v([(0,d.state)()],t.prototype,"maxDateData",void 0),v([(0,d.state)()],t.prototype,"minDateData",void 0),v([(0,d.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),v([(0,d.query)("md-popover")],t.prototype,"popoverElement",void 0),t=v([(0,s.w)("md-datepicker")],t),e.ELEMENT=t}(i||(i={}))},4098(t,o,i){var r,a;t.exports=(r={arrow:()=>e.arrow,autoUpdate:()=>e.autoUpdate,computePosition:()=>e.computePosition,flip:()=>e.flip,offset:()=>e.offset,shift:()=>e.shift,size:()=>e.size},a={},i.d(a,r),a)},9500(e,o,i){var r,a;e.exports=(r={default:()=>t.default},a={},i.d(a,r),a)},3496(e,t,i){var r,a;e.exports=(r={default:()=>o.default},a={},i.d(a,r),a)},9644(e,t,o){var r,a;e.exports=(r={default:()=>i.default},a={},o.d(a,r),a)},9324(e,t,o){var i,a;e.exports=(i={default:()=>r.default},a={},o.d(a,i),a)},9520(e,t,o){var i,r;e.exports=(i={default:()=>a.default},r={},o.d(r,i),r)},6521(e,t,o){var i,r;e.exports=(i={default:()=>s.default},r={},o.d(r,i),r)},9709(e,t,o){var i,r;e.exports=(i={createPopper:()=>l.createPopper,defaultModifiers:()=>l.defaultModifiers},r={},o.d(r,i),r)},2927(e,t,o){var i,r;e.exports=(i={LitElement:()=>n.LitElement,css:()=>n.css,html:()=>n.html,nothing:()=>n.nothing},r={},o.d(r,i),r)},8899(e,t,o){var i,r;e.exports=(i={property:()=>p.property,query:()=>p.query,queryAssignedNodes:()=>p.queryAssignedNodes,state:()=>p.state},r={},o.d(r,i),r)},4955(e,t,o){var i,r;e.exports=(i={classMap:()=>d.classMap},r={},o.d(r,i),r)},3517(e,t,o){var i,r;e.exports=(i={ifDefined:()=>
|
|
147
|
+
`}render(){return this.usePopover?this.renderPopover():this.renderMenuOverlay()}};v([(0,d.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),v([(0,d.property)({type:String})],t.prototype,"maxDate",void 0),v([(0,d.property)({type:String})],t.prototype,"minDate",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"value",void 0),v([(0,d.property)({type:String})],t.prototype,"weekStart",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),v([(0,d.property)({type:String})],t.prototype,"locale",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"useISOFormat",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"validateDate",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),v([(0,d.property)({type:String})],t.prototype,"htmlId",void 0),v([(0,d.property)({type:String})],t.prototype,"label",void 0),v([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),v([(0,d.property)({type:String})],t.prototype,"displayValue",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"required",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),v([(0,d.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"isMenuOverlayOpen",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disableUserTextInput",void 0),v([(0,d.property)({type:Boolean,attribute:"compact-input"})],t.prototype,"compactInput",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"controlButtons",void 0),v([(0,d.property)({type:String,attribute:"positioning-strategy"})],t.prototype,"positioningStrategy",void 0),v([(0,d.property)({type:Boolean,attribute:"show-default-now-date"})],t.prototype,"showDefaultNowDate",void 0),v([(0,d.property)({type:Boolean,attribute:"use-popover"})],t.prototype,"usePopover",void 0),v([(0,d.property)({type:String,attribute:"triggerID"})],t.prototype,"triggerID",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],t.prototype,"animationFrame",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),v([(0,d.state)()],t.prototype,"selectedDate",void 0),v([(0,d.state)()],t.prototype,"focusedDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"filterDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),v([(0,d.state)()],t.prototype,"maxDateData",void 0),v([(0,d.state)()],t.prototype,"minDateData",void 0),v([(0,d.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),v([(0,d.query)("md-popover")],t.prototype,"popoverElement",void 0),t=v([(0,s.w)("md-datepicker")],t),e.ELEMENT=t}(i||(i={}))},4098(t,o,i){var r,a;t.exports=(r={arrow:()=>e.arrow,autoUpdate:()=>e.autoUpdate,computePosition:()=>e.computePosition,flip:()=>e.flip,offset:()=>e.offset,shift:()=>e.shift,size:()=>e.size},a={},i.d(a,r),a)},9500(e,o,i){var r,a;e.exports=(r={default:()=>t.default},a={},i.d(a,r),a)},3496(e,t,i){var r,a;e.exports=(r={default:()=>o.default},a={},i.d(a,r),a)},9644(e,t,o){var r,a;e.exports=(r={default:()=>i.default},a={},o.d(a,r),a)},9324(e,t,o){var i,a;e.exports=(i={default:()=>r.default},a={},o.d(a,i),a)},9520(e,t,o){var i,r;e.exports=(i={default:()=>a.default},r={},o.d(r,i),r)},6521(e,t,o){var i,r;e.exports=(i={default:()=>s.default},r={},o.d(r,i),r)},9709(e,t,o){var i,r;e.exports=(i={createPopper:()=>l.createPopper,defaultModifiers:()=>l.defaultModifiers},r={},o.d(r,i),r)},2927(e,t,o){var i,r;e.exports=(i={LitElement:()=>n.LitElement,css:()=>n.css,html:()=>n.html,nothing:()=>n.nothing},r={},o.d(r,i),r)},8899(e,t,o){var i,r;e.exports=(i={property:()=>p.property,query:()=>p.query,queryAssignedNodes:()=>p.queryAssignedNodes,state:()=>p.state},r={},o.d(r,i),r)},4955(e,t,o){var i,r;e.exports=(i={classMap:()=>d.classMap},r={},o.d(r,i),r)},3517(e,t,o){var i,r;e.exports=(i={ifDefined:()=>h.ifDefined},r={},o.d(r,i),r)},2577(e,t,o){var i,r;e.exports=(i={repeat:()=>m.repeat},r={},o.d(r,i),r)},1156(e,t,o){var i,r;e.exports=(i={styleMap:()=>u.styleMap},r={},o.d(r,i),r)},9642(e,t,o){var i,r;e.exports=(i={DateTime:()=>c.DateTime},r={},o.d(r,i),r)},4980(e,t,o){var i,r;e.exports=(i={action:()=>v.action,computed:()=>v.computed,makeObservable:()=>v.makeObservable,observable:()=>v.observable},r={},o.d(r,i),r)}},g={};function b(e){var t=g[e];if(void 0!==t)return t.exports;var o=g[e]={exports:{}};return D[e](o,o.exports,b),o.exports}b.m=D,y=[],b.O=(e,t,o,i)=>{if(!t){var r=1/0;for(n=0;n<y.length;n++){for(var[t,o,i]=y[n],a=!0,s=0;s<t.length;s++)(!1&i||r>=i)&&Object.keys(b.O).every(e=>b.O[e](t[s]))?t.splice(s--,1):(a=!1,i<r&&(r=i));if(a){y.splice(n--,1);var l=o();void 0!==l&&(e=l)}}return e}i=i||0;for(var n=y.length;n>0&&y[n-1][2]>i;n--)y[n]=y[n-1];y[n]=[t,o,i]},b.d=(e,t)=>{for(var o in t)b.o(t,o)&&!b.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{b as __webpack_require__};f={502:0,1586:0,1745:0,2169:0,3413:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8442:0,8663:0},b.C=e=>{var t,o,{__webpack_esm_ids__:i,__webpack_esm_modules__:r,__webpack_esm_runtime__:a}=e,s=0;for(t in r)b.o(r,t)&&(b.m[t]=r[t]);for(a&&a(b);s<i.length;s++)o=i[s],b.o(f,o)&&f[o]&&f[o][0](),f[i[s]]=0;b.O()},b.O.j=e=>0===f[e];import*as S from"../9609.js";b.C(S);import*as O from"../4084.js";b.C(O);import*as w from"../3305.js";b.C(w);import*as $ from"../4739.js";b.C($);import*as C from"../7154.js";b.C(C);import*as k from"../9773.js";b.C(k);import*as x from"../5983.js";b.C(x);import*as M from"../9488.js";b.C(M);import*as j from"../1821.js";b.C(j);import*as I from"../519.js";b.C(I);import*as P from"../8441.js";b.C(P);import*as E from"../2797.js";b.C(E);import*as T from"../9983.js";b.C(T);import*as A from"../4700.js";b.C(A);import*as B from"../3970.js";b.C(B);import*as L from"../7906.js";b.C(L);import*as V from"../9336.js";b.C(V);import*as R from"../9146.js";b.C(R);import*as _ from"../2369.js";b.C(_);import*as q from"../3842.js";b.C(q);import*as F from"../9189.js";b.C(F);import*as U from"../708.js";b.C(U);import*as N from"../2492.js";b.C(N);import*as K from"../3639.js";b.C(K);import*as z from"../3331.js";b.C(z);import*as H from"../3876.js";b.C(H);import*as Y from"../801.js";b.C(Y);import*as J from"../878.js";b.C(J);import*as W from"../8371.js";b.C(W);import*as G from"../953.js";b.C(G);var Q=b.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,4700,3970,7906,9336,9146,2369,3842,9189,708,2492,3639,3331,3876,801,878,8371,953],()=>b(8663));const X=(Q=b.O(Q)).l;export{X as DatePicker};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t from"@momentum-ui/utils/lib/getColorValue";import*as i from"lit";import*as o from"lit/decorators.js";import*as s from"lit/directives/class-map.js";import*as n from"lit/directives/if-defined.js";import*as r from"lit/directives/repeat.js";import*as a from"lit/directives/style-map.js";import*as d from"mobx";var p,l,h={621(e,t,i){i.d(t,{m:()=>o}),i(1821);var o,s=i(2900),n=i(7704),r=i(2050),a=i(4084),d=i(2927),p=i(8899),l=i(4955),h=i(3517),c=i(2577),u=i(1156),m=i(5057),y=function(e,t,i,o){var s,n=arguments.length,r=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(n<3?s(r):n>3?s(t,i,r):s(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t,i,o){return new(i||(i=Promise))(function(s,n){function r(e){try{d(o.next(e))}catch(e){n(e)}}function a(e){try{d(o.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}d((o=o.apply(e,t||[])).next())})};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.yC)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new t,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||this.expanded&&this.collapse())},this.onKeyDown=e=>{switch(e.code){case s.Uz.Tab:this.expanded&&(e.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case s.Uz.ArrowDown:this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape||s.Uz.Backspace:this.expanded&&(e.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(e=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:e}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}}),this.searchable&&this.setInitialValue()}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.dropdownRenderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&(this.focusToIndex(e),this.searchable&&this.setInitialValue())}if("expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const e=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(e,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var e;if(this.options.length){const t=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey),i=null==t?void 0:t.option;i&&(this.setInputValue(this.getOptionValue(i)),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(this.getOptionValue(i)),this.requestUpdate())}}getOptionValue(e){return this.isOptionObject(e)&&!this.optionValue?Object.values(e)[0]:this.isOptionObject(e)?e[this.optionValue]:e}getOptionId(e){return this.isOptionObject(e)?e[this.optionId]:e}isOptionObject(e){return"object"==typeof e&&null!==e}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==e.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(e.push(o),t.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.dropdownRenderOptions=t}updateListDOM(){return f(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return f(this,void 0,void 0,function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)}px`;this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))})}handleFocusIn(e){var t;this.disabled&&this.readOnly||null===(t=super.handleFocusIn)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){var t;null===(t=super.handleFocusOut)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[a.A,m.A]}get filteredOptions(){const e=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!e.trim())return this.dropdownRenderOptions;const t=this.dropdownRenderOptions.filter(t=>t.value.toLowerCase().includes(e.toLowerCase()));return 0===t.length?[{key:"no-result",value:"No Result",disabled:!0}]:t}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(e){this.expanded=e}updateOnNextFrame(e){requestAnimationFrame(e)}setInputValue(e=""){this.input.value=e}shouldChangeButton(){const e=this.input&&this.input.value.length>0;return e&&document.dispatchEvent(new CustomEvent("on-widget-update")),e}toggleVisualListBox(e){var t,i;if(!this.readOnly){if(e.target.classList.contains("md-dropdown-input"))e.target.focus();else if("md-icon"===e.target.localName){const o=null===(i=null===(t=e.target.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.parentElement;if(o){const e=o.querySelector(".md-dropdown-input");setTimeout(()=>{e.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus()}}handleRemoveAll(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var e;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){this.expanded=!0;const e=-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";document.dispatchEvent(new CustomEvent("on-widget-update")),this.label.setAttribute("aria-activedescendant",e),this.optionsList&&this.optionsList.focus(),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1,this.searchable||this.label.setAttribute("aria-activedescendant","")}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.dropdownRenderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.label.focus(),this.toggle()}focusFirst(){this.dropdownRenderOptions.length&&(this.focusedIndex=0)}focusLast(){this.dropdownRenderOptions.length&&(this.focusedIndex=this.dropdownRenderOptions.length-1)}focusNext(){this.dropdownRenderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.dropdownRenderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.dropdownRenderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.dropdownRenderOptions.length&&e>=0&&e<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=e)}focusToIndexWithOption(e){const t=this.dropdownRenderOptions.findIndex(t=>t.key===e.key);this.dropdownRenderOptions.length&&t>=0&&t<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=t)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return f(this,void 0,void 0,function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[e],n=this.optionsListItems[e+1]||s,r=this.optionsListItems[e-1]||s,a=n.getBoundingClientRect(),d=r.getBoundingClientRect();a.bottom>o?t=a.bottom-o+2:d.top<i&&(t=d.top-i-2),this.optionsList.scrollTop+=t}t()})})})}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),i=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:i[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(e){const t=e.target.value;this.inputValue=t.trim(),this.notifyInputValueChanged(t.trim())}helpTextTemplate(){return this.helpText?d.html`
|
|
1
|
+
import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t from"@momentum-ui/utils/lib/getColorValue";import*as i from"lit";import*as s from"lit/decorators.js";import*as o from"lit/directives/class-map.js";import*as n from"lit/directives/if-defined.js";import*as r from"lit/directives/repeat.js";import*as a from"lit/directives/style-map.js";import*as l from"mobx";var d,p,h={621(e,t,i){i.d(t,{m:()=>s}),i(1821);var s,o=i(2900),n=i(7704),r=i(2050),a=i(4084),l=i(2927),d=i(8899),p=i(4955),h=i(3517),c=i(2577),u=i(1156),m=i(5057),f=function(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t,i,s){return new(i||(i=Promise))(function(o,n){function r(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}l((s=s.apply(e,t||[])).next())})};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new t,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||this.expanded&&this.collapse())},this.onKeyDown=e=>{var t;if(!this.disabled&&!this.readOnly)switch(e.code){case o.Uz.Tab:this.expanded&&(e.stopPropagation(),this.collapse());break;case o.Uz.Space:case o.Uz.Enter:{const i=e.composedPath()[0];if(null===(t=i.closest)||void 0===t?void 0:t.call(i,".md-dropdown-button"))break;e.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case o.Uz.ArrowDown:e.preventDefault(),this.expanded?this.focusNext():this.expand();break;case o.Uz.ArrowUp:e.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case o.Uz.Home:e.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case o.Uz.End:e.preventDefault(),this.expanded?this.focusLast():this.expand();break;case o.Uz.Escape:case o.Uz.Backspace:this.expanded&&(e.preventDefault(),e.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(e=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:e}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}}),this.searchable&&this.setInitialValue()}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t&&this.dropdownRenderOptions.some(e=>e.key===this.selectedKey)){const e=this.filteredOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e),this.searchable&&this.setInitialValue()}if("expanded"===t&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===t&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const e=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(e,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var e;if(this.options.length){const t=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey),i=null==t?void 0:t.option;if(i){const t=this.getOptionValue(i);this.inputValue=t,this.setInputValue(t),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(t)}}}getOptionValue(e){return this.isOptionObject(e)&&!this.optionValue?Object.values(e)[0]:this.isOptionObject(e)?e[this.optionValue]:e}getOptionId(e){return this.isOptionObject(e)?e[this.optionId]:e}isOptionObject(e){return"object"==typeof e&&null!==e}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,i)=>{const{key:s,value:o}=this.getOptionKeyValuePair(i);return-1!==e.indexOf(s)?console.error(`Dropdown already have option key: "${s}". Ignoring `):s?(e.push(s),t.push({key:s,value:o,option:i})):console.error(`Dropdown key is not defined: "${s}". (value: "${o}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.dropdownRenderOptions=t}updateActiveDescendant(){const e=this.searchable?this.input:this.label;if(e){const t=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";e.setAttribute("aria-activedescendant",t)}}updateListDOM(){return y(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return y(this,void 0,void 0,function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)}px`;this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))})}handleFocusIn(e){var t;this.disabled||null===(t=super.handleFocusIn)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){var t;null===(t=super.handleFocusOut)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[a.A,m.A]}get filteredOptions(){const e=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!e.trim())return this.dropdownRenderOptions;const t=this.dropdownRenderOptions.filter(t=>t.value.toLowerCase().includes(e.toLowerCase()));return 0===t.length?[{key:"no-result",value:"No Result",disabled:!0}]:t}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(e){this.expanded=e}updateOnNextFrame(e){requestAnimationFrame(e)}setInputValue(e=""){this.input.value=e}shouldChangeButton(){const e=this.input&&this.input.value.length>0;return e&&document.dispatchEvent(new CustomEvent("on-widget-update")),e}toggleVisualListBox(e){var t,i;if(!this.readOnly){if(e.target.classList.contains("md-dropdown-input"))e.target.focus();else if("md-icon"===e.target.localName){const s=null===(i=null===(t=e.target.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.parentElement;if(s){const e=s.querySelector(".md-dropdown-input");setTimeout(()=>{e.focus()},10)}}this.expanded?this.collapse():(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.expand()),this.input.focus()}}handleRemoveAll(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var e;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const e=this.filteredOptions.findIndex(e=>e.key===this.selectedKey);-1!==e?this.focusedIndex=e:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(null==e?void 0:e.option){const t=this.getOptionValue(e.option);this.inputValue=t,this.setInputValue(t)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.filteredOptions[this.focusedIndex];if(!e||"no-result"===e.key)return;const t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in e&&e.option||e.key}})))}}onLabelClick(){this.label.focus(),this.readOnly||this.toggle()}focusFirst(){this.filteredOptions.length&&(this.focusedIndex=0)}focusLast(){this.filteredOptions.length&&(this.focusedIndex=this.filteredOptions.length-1)}focusNext(){this.filteredOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.filteredOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.filteredOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusToIndexWithOption(e){const t=this.filteredOptions.findIndex(t=>t.key===e.key);this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return y(this,void 0,void 0,function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:i,bottom:s}=this.optionsList.getBoundingClientRect(),o=this.optionsListItems[e],n=this.optionsListItems[e+1]||o,r=this.optionsListItems[e-1]||o,a=n.getBoundingClientRect(),l=r.getBoundingClientRect();a.bottom>s?t=a.bottom-s+2:l.top<i&&(t=l.top-i-2),this.optionsList.scrollTop+=t}t()})})})}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),i=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:i[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(e){const t=e.target.value;this.inputValue=t.trim(),this.notifyInputValueChanged(t.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
2
2
|
<md-help-text
|
|
3
|
-
class="help-text ${(0,
|
|
3
|
+
class="help-text ${(0,p.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
4
4
|
.message=${this.helpText}
|
|
5
5
|
style=${(0,u.styleMap)({width:"100%"})}
|
|
6
6
|
></md-help-text>
|
|
7
|
-
`:
|
|
7
|
+
`:l.nothing}messagesTemplate(){return this.messages&&this.messages.length?l.html`
|
|
8
8
|
<div id="${this.htmlId}-message" part="message" class="md-dropbox__messages">
|
|
9
|
-
${(0,c.repeat)(this.messages,(e,t)=>
|
|
9
|
+
${(0,c.repeat)(this.messages,(e,t)=>l.html`
|
|
10
10
|
<md-help-text
|
|
11
11
|
.message=${e}
|
|
12
12
|
.id=${this.messageArr[t].id||""}
|
|
@@ -15,15 +15,16 @@ import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t
|
|
|
15
15
|
></md-help-text>
|
|
16
16
|
`)}
|
|
17
17
|
</div>
|
|
18
|
-
`:
|
|
18
|
+
`:l.nothing}iconTemplate(){return l.html`
|
|
19
19
|
<md-icon
|
|
20
20
|
class="md-dropdown-left-icon"
|
|
21
21
|
name="${this.leftIcon}"
|
|
22
22
|
size="16"
|
|
23
23
|
iconSet="momentumDesign"
|
|
24
|
+
aria-hidden="true"
|
|
24
25
|
@click=${this.toggleVisualListBox}
|
|
25
26
|
></md-icon>
|
|
26
|
-
`}clearButtonTemplate(){return
|
|
27
|
+
`}clearButtonTemplate(){return l.html`
|
|
27
28
|
<button
|
|
28
29
|
type="button"
|
|
29
30
|
class="md-dropdown-button clear"
|
|
@@ -39,10 +40,11 @@ import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t
|
|
|
39
40
|
name="cancel-bold"
|
|
40
41
|
size="16"
|
|
41
42
|
iconSet="momentumDesign"
|
|
43
|
+
aria-hidden="true"
|
|
42
44
|
style="height: ${this.clearIconHeight};"
|
|
43
45
|
></md-icon>
|
|
44
46
|
</button>
|
|
45
|
-
`}arrowButtonTemplate(){return
|
|
47
|
+
`}arrowButtonTemplate(){return l.html`
|
|
46
48
|
<button
|
|
47
49
|
type="button"
|
|
48
50
|
class="md-dropdown-button arrow-down"
|
|
@@ -55,54 +57,54 @@ import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t
|
|
|
55
57
|
?disabled=${this.disabled}
|
|
56
58
|
@click=${this.toggleVisualListBox}
|
|
57
59
|
>
|
|
58
|
-
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
60
|
+
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
59
61
|
</button>
|
|
60
|
-
`}render(){return
|
|
61
|
-
<div class="md-dropdown ${(0,
|
|
62
|
-
${this.searchable?
|
|
62
|
+
`}render(){return l.html`
|
|
63
|
+
<div class="md-dropdown ${(0,p.classMap)(this.dropDownClassMap)}" part="dropdown">
|
|
64
|
+
${this.searchable?l.html`
|
|
63
65
|
<div part="group" class="group" ?readonly=${this.readOnly}>
|
|
64
|
-
${this.leftIcon?this.iconTemplate():
|
|
66
|
+
${this.leftIcon?this.iconTemplate():l.nothing}
|
|
65
67
|
<input
|
|
66
68
|
class="md-dropdown-input"
|
|
67
69
|
type="text"
|
|
68
70
|
role="combobox"
|
|
69
71
|
aria-autocomplete="both"
|
|
70
|
-
aria-label=${this.title}
|
|
72
|
+
aria-label=${(0,h.ifDefined)(this.inputValue?void 0:this.title)}
|
|
71
73
|
part="dropdown-input"
|
|
72
74
|
aria-expanded=${this.expanded}
|
|
73
|
-
placeholder=${this.placeholder}
|
|
75
|
+
placeholder=${this.inputValue?"":this.placeholder}
|
|
74
76
|
aria-controls="md-dropdown-list"
|
|
75
77
|
?readonly=${this.readOnly}
|
|
76
78
|
?disabled=${this.disabled}
|
|
77
79
|
?autofocus=${this.autofocus}
|
|
78
|
-
title=${this.title}
|
|
79
80
|
tabindex="0"
|
|
80
81
|
.value=${this.inputValue}
|
|
81
82
|
@click=${this.toggleVisualListBox}
|
|
82
83
|
@input=${this.handleInput}
|
|
83
84
|
/>
|
|
84
|
-
${this.compact||!this.searchable?
|
|
85
|
+
${this.compact||!this.searchable?l.nothing:this.shouldChangeButton()?this.clearButtonTemplate():this.arrowButtonTemplate()}
|
|
85
86
|
</div>
|
|
86
|
-
`:
|
|
87
|
+
`:l.html`
|
|
87
88
|
<label
|
|
88
|
-
class="md-dropdown-label ${(0,
|
|
89
|
+
class="md-dropdown-label ${(0,p.classMap)({"md-new-dropdown-label":this.newMomentum})}"
|
|
89
90
|
aria-expanded="${this.expanded}"
|
|
90
|
-
aria-label="${this.
|
|
91
|
+
aria-label="${this.labelTitle}"
|
|
91
92
|
aria-controls="md-dropdown-list"
|
|
92
93
|
aria-haspopup="listbox"
|
|
93
94
|
?disabled=${this.disabled}
|
|
94
95
|
@click=${this.onLabelClick}
|
|
95
96
|
part="dropdown-header"
|
|
96
97
|
role="combobox"
|
|
97
|
-
tabindex="0"
|
|
98
|
+
tabindex="${this.newMomentum&&this.disabled?-1:0}"
|
|
98
99
|
>
|
|
99
|
-
${this.leftIcon?
|
|
100
|
+
${this.leftIcon?l.html`<span class="md-dropdown-label--left-icon" aria-hidden="true">${this.iconTemplate()}</span>`:l.nothing}
|
|
100
101
|
<span
|
|
101
|
-
class="md-dropdown-label--text ${(0,
|
|
102
|
+
class="md-dropdown-label--text ${(0,p.classMap)({"md-new-dropdown-label--text":this.newMomentum})}"
|
|
103
|
+
aria-hidden="true"
|
|
102
104
|
>
|
|
103
105
|
${this.labelTitle}</span
|
|
104
106
|
>
|
|
105
|
-
<span class="md-dropdown-label--icon">
|
|
107
|
+
<span class="md-dropdown-label--icon" aria-hidden="true">
|
|
106
108
|
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
107
109
|
</span>
|
|
108
110
|
</label>
|
|
@@ -114,14 +116,14 @@ import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t
|
|
|
114
116
|
aria-label="${this.labelTitle}"
|
|
115
117
|
aria-hidden="${!this.expanded}"
|
|
116
118
|
part="dropdown-options"
|
|
117
|
-
tabindex=${(0,h.ifDefined)(
|
|
119
|
+
tabindex=${(0,h.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
118
120
|
>
|
|
119
|
-
${this.filteredOptions.map((e,t)=>
|
|
121
|
+
${this.filteredOptions.map((e,t)=>l.html`
|
|
120
122
|
<li
|
|
121
123
|
id="combo-${t}"
|
|
122
124
|
class="md-dropdown-option"
|
|
123
125
|
role="option"
|
|
124
|
-
tabindex=${(0,h.ifDefined)(
|
|
126
|
+
tabindex=${(0,h.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
125
127
|
aria-label="${e.value}"
|
|
126
128
|
label="${e.value}"
|
|
127
129
|
aria-selected="${e.key===this.selectedKey}"
|
|
@@ -133,9 +135,16 @@ import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t
|
|
|
133
135
|
<span class="select-label" part="label">
|
|
134
136
|
<span>${e.value}</span>
|
|
135
137
|
</span>
|
|
138
|
+
${this.newMomentum&&e.key===this.selectedKey?l.html`<md-icon
|
|
139
|
+
class="md-dropdown-option--icon"
|
|
140
|
+
name="check-bold"
|
|
141
|
+
size="16"
|
|
142
|
+
iconSet="momentumDesign"
|
|
143
|
+
aria-hidden="true"
|
|
144
|
+
></md-icon>`:l.nothing}
|
|
136
145
|
</li>
|
|
137
146
|
`)}
|
|
138
147
|
</ul>
|
|
139
148
|
</div>
|
|
140
149
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
141
|
-
`}};
|
|
150
|
+
`}};f([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),f([(0,d.property)({type:Array})],i.prototype,"options",void 0),f([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),f([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),f([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),f([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),f([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),f([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),f([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),f([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),f([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),f([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),f([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),f([(0,d.property)({type:String})],i.prototype,"helpText",void 0),f([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),f([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),f([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),f([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),f([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),f([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),f([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),f([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),f([(0,d.state)()],i.prototype,"selectedKey",void 0),f([(0,d.state)()],i.prototype,"expanded",void 0),f([(0,d.state)()],i.prototype,"focusedIndex",void 0),f([(0,d.query)("label")],i.prototype,"label",void 0),f([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),f([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),f([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=f([(0,n.wW)("md-dropdown")],i),e.ELEMENT=i}(s||(s={}))},7704(e,t,i){i.d(t,{wW:()=>o.w,yC:()=>s.y}),i(2364);var s=i(3203),o=(i(9938),i(5201),i(4781),i(608),i(9609))},9500(t,i,s){var o,n;t.exports=(o={default:()=>e.default},n={},s.d(n,o),n)},3496(e,i,s){var o,n;e.exports=(o={default:()=>t.default},n={},s.d(n,o),n)},2927(e,t,s){var o,n;e.exports=(o={LitElement:()=>i.LitElement,css:()=>i.css,html:()=>i.html,nothing:()=>i.nothing},n={},s.d(n,o),n)},8899(e,t,i){var o,n;e.exports=(o={property:()=>s.property,query:()=>s.query,queryAll:()=>s.queryAll,state:()=>s.state},n={},i.d(n,o),n)},4955(e,t,i){var s,n;e.exports=(s={classMap:()=>o.classMap},n={},i.d(n,s),n)},3517(e,t,i){var s,o;e.exports=(s={ifDefined:()=>n.ifDefined},o={},i.d(o,s),o)},2577(e,t,i){var s,o;e.exports=(s={repeat:()=>r.repeat},o={},i.d(o,s),o)},1156(e,t,i){var s,o;e.exports=(s={styleMap:()=>a.styleMap},o={},i.d(o,s),o)},4980(e,t,i){var s,o;e.exports=(s={action:()=>l.action,observable:()=>l.observable},o={},i.d(o,s),o)}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return h[e](i,i.exports,u),i.exports}u.m=h,d=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(l=0;l<d.length;l++){for(var[t,i,s]=d[l],n=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(u.O).every(e=>u.O[e](t[r]))?t.splice(r--,1):(n=!1,s<o&&(o=s));if(n){d.splice(l--,1);var a=i();void 0!==a&&(e=a)}}return e}s=s||0;for(var l=d.length;l>0&&d[l-1][2]>s;l--)d[l]=d[l-1];d[l]=[t,i,s]},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{u as __webpack_require__};p={502:0,561:0,1745:0,2169:0,2942:0,4545:0,4928:0,5323:0,5369:0,6060:0,6920:0,7704:0,7711:0,8111:0,8180:0,8442:0},u.C=e=>{var t,i,{__webpack_esm_ids__:s,__webpack_esm_modules__:o,__webpack_esm_runtime__:n}=e,r=0;for(t in o)u.o(o,t)&&(u.m[t]=o[t]);for(n&&n(u);r<s.length;r++)i=s[r],u.o(p,i)&&p[i]&&p[i][0](),p[s[r]]=0;u.O()},u.O.j=e=>0===p[e];import*as m from"../9609.js";u.C(m);import*as f from"../4084.js";u.C(f);import*as y from"../3305.js";u.C(y);import*as b from"../4739.js";u.C(b);import*as v from"../7154.js";u.C(v);import*as g from"../9773.js";u.C(g);import*as x from"../5983.js";u.C(x);import*as w from"../9488.js";u.C(w);import*as O from"../1821.js";u.C(O);import*as I from"../2364.js";u.C(I);import*as $ from"../9938.js";u.C($);import*as L from"../4781.js";u.C(L);import*as C from"../5201.js";u.C(C);import*as k from"../5584.js";u.C(k);import*as T from"../8227.js";u.C(T);import*as A from"../2050.js";u.C(A);import*as E from"../8138.js";u.C(E);import*as D from"../5057.js";u.C(D);var j=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2050,8138,5057],()=>u(621));const V=(j=u.O(j)).m;export{V as Dropdown};
|