@momentum-ui/web-components 3.2.9 → 3.2.10

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.
@@ -1,12 +1,12 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,n,r,a,d)=>(()=>{"use strict";var l,p={621(e,t,i){i.r(t),i.d(t,{Dropdown:()=>s}),i(1821);var s,o=i(2900),n=i(7704),r=i(2050),a=i(4084),d=i(7161),l=i(429),p=i(5125),h=i(291),u=i(8175),c=i(318),m=i(5057),y=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},f=function(e,t,i,s){return new(i||(i=Promise))(function(o,n){function r(e){try{d(s.next(e))}catch(e){n(e)}}function a(e){try{d(s.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}d((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)(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 o.Uz.Tab:this.expanded&&(e.stopPropagation(),this.collapse());break;case o.Uz.Space:case o.Uz.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case o.Uz.ArrowDown:this.expanded?this.focusNext():this.expand();break;case o.Uz.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case o.Uz.Home:this.expanded?this.focusFirst():this.expand();break;case o.Uz.End:this.expanded?this.focusLast():this.expand();break;case o.Uz.Escape||o.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(o.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: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}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 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.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(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(){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:s}=this.optionsList.getBoundingClientRect(),o=this.optionsListItems[e],n=this.optionsListItems[e+1]||o,r=this.optionsListItems[e-1]||o,a=n.getBoundingClientRect(),d=r.getBoundingClientRect();a.bottom>s?t=a.bottom-s+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
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,n,r,a,l)=>(()=>{"use strict";var d,p={621(e,t,i){i.r(t),i.d(t,{Dropdown:()=>s}),i(1821);var s,o=i(2900),n=i(7704),r=i(2050),a=i(4084),l=i(7161),d=i(429),p=i(5125),h=i(291),u=i(8175),c=i(318),m=i(5057),y=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},f=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 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||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(){this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex&&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 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: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
3
  class="help-text ${(0,p.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
4
4
  .message=${this.helpText}
5
5
  style=${(0,c.styleMap)({width:"100%"})}
6
6
  ></md-help-text>
7
- `:d.nothing}messagesTemplate(){return this.messages&&this.messages.length?d.html`
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,u.repeat)(this.messages,(e,t)=>d.html`
9
+ ${(0,u.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 @@
15
15
  ></md-help-text>
16
16
  `)}
17
17
  </div>
18
- `:d.nothing}iconTemplate(){return d.html`
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 d.html`
27
+ `}clearButtonTemplate(){return l.html`
27
28
  <button
28
29
  type="button"
29
30
  class="md-dropdown-button clear"
@@ -39,10 +40,11 @@
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 d.html`
47
+ `}arrowButtonTemplate(){return l.html`
46
48
  <button
47
49
  type="button"
48
50
  class="md-dropdown-button arrow-down"
@@ -55,54 +57,54 @@
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 d.html`
62
+ `}render(){return l.html`
61
63
  <div class="md-dropdown ${(0,p.classMap)(this.dropDownClassMap)}" part="dropdown">
62
- ${this.searchable?d.html`
64
+ ${this.searchable?l.html`
63
65
  <div part="group" class="group" ?readonly=${this.readOnly}>
64
- ${this.leftIcon?this.iconTemplate():d.nothing}
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?d.nothing:this.shouldChangeButton()?this.clearButtonTemplate():this.arrowButtonTemplate()}
85
+ ${this.compact||!this.searchable?l.nothing:this.shouldChangeButton()?this.clearButtonTemplate():this.arrowButtonTemplate()}
85
86
  </div>
86
- `:d.html`
87
+ `:l.html`
87
88
  <label
88
89
  class="md-dropdown-label ${(0,p.classMap)({"md-new-dropdown-label":this.newMomentum})}"
89
90
  aria-expanded="${this.expanded}"
90
- aria-label="${this.title}"
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?d.html`<span class="md-dropdown-label--left-icon">${this.iconTemplate()}</span>`:d.nothing}
100
+ ${this.leftIcon?l.html`<span class="md-dropdown-label--left-icon" aria-hidden="true">${this.iconTemplate()}</span>`:l.nothing}
100
101
  <span
101
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 @@
114
116
  aria-label="${this.labelTitle}"
115
117
  aria-hidden="${!this.expanded}"
116
118
  part="dropdown-options"
117
- tabindex=${(0,h.ifDefined)(-1===this.customTabIndex?void 0:this.customTabIndex)}
119
+ tabindex=${(0,h.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
118
120
  >
119
- ${this.filteredOptions.map((e,t)=>d.html`
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)(-1===this.customTabIndex?void 0:this.customTabIndex)}
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 @@
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
- `}};y([(0,l.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),y([(0,l.property)({type:Array})],i.prototype,"options",void 0),y([(0,l.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),y([(0,l.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),y([(0,l.property)({type:Object})],i.prototype,"defaultOption",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),y([(0,l.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),y([(0,l.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),y([(0,l.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),y([(0,l.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),y([(0,l.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),y([(0,l.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,l.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),y([(0,l.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),y([(0,l.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),y([(0,l.property)({type:Boolean})],i.prototype,"pill",void 0),y([(0,l.property)({type:String})],i.prototype,"helpText",void 0),y([(0,l.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,l.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,l.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),y([(0,l.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),y([(0,l.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),y([(0,l.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),y([(0,l.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),y([(0,l.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),y([(0,l.state)()],i.prototype,"ariaLabelForDropdown",void 0),y([(0,l.state)()],i.prototype,"dropdownRenderOptions",void 0),y([(0,l.state)()],i.prototype,"selectedKey",void 0),y([(0,l.state)()],i.prototype,"expanded",void 0),y([(0,l.state)()],i.prototype,"focusedIndex",void 0),y([(0,l.query)("label")],i.prototype,"label",void 0),y([(0,l.query)(".md-dropdown-input")],i.prototype,"input",void 0),y([(0,l.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),y([(0,l.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=y([(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))},2022(e){e.exports=n},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=d},318(e){e.exports=s},5314(e){e.exports=a}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,u),i.exports}u.m=p,l=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(d=0;d<l.length;d++){for(var[t,i,s]=l[d],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){l.splice(d--,1);var a=i();void 0!==a&&(e=a)}}return e}s=s||0;for(var d=l.length;d>0&&l[d-1][2]>s;d--)l[d]=l[d-1];l[d]=[t,i,s]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},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),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={561:0,2942:0,5323:0,7704:0,7711:0,8180:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[n,r,a]=i,d=0;if(n.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(a)var l=a(u)}for(t&&t(i);d<n.length;d++)o=n[d],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(l)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2050,8138,5057],()=>u(621));return u.O(c)})());
150
+ `}};y([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),y([(0,d.property)({type:Array})],i.prototype,"options",void 0),y([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),y([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),y([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),y([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),y([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),y([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),y([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),y([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),y([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),y([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),y([(0,d.property)({type:String})],i.prototype,"helpText",void 0),y([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),y([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),y([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),y([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),y([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),y([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),y([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),y([(0,d.state)()],i.prototype,"selectedKey",void 0),y([(0,d.state)()],i.prototype,"expanded",void 0),y([(0,d.state)()],i.prototype,"focusedIndex",void 0),y([(0,d.query)("label")],i.prototype,"label",void 0),y([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),y([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),y([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=y([(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))},2022(e){e.exports=n},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=l},318(e){e.exports=s},5314(e){e.exports=a}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,u),i.exports}u.m=p,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.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},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),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={561:0,2942:0,5323:0,7704:0,7711:0,8180:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[n,r,a]=i,l=0;if(n.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(a)var d=a(u)}for(t&&t(i);l<n.length;l++)o=n[l],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2050,8138,5057],()=>u(621));return u.O(c)})());
package/dist/esm/3639.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __webpack_esm_id__=3639;export const __webpack_esm_ids__=[3639,6020];export const __webpack_esm_modules__={3639(t,e,i){i(5983);var s,a=i(9609),d=i(878),r=i(2050),o=i(4084),n=i(2927),h=i(8899),c=i(4955),l=i(3517),p=i(3842),y=function(t,e,i,s){var a,d=arguments.length,r=d<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(d<3?a(r):d>3?a(e,i,r):a(e,i))||r);return d>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,d.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=t=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))},this.isDateInRange=()=>{var t;const e=this.parentRangePicker,i=null==e?void 0:e.startDate,s=null==e?void 0:e.endDate;if(!i||!s)return!1;const a=(null===(t=this.day)||void 0===t?void 0:t.isValid)?this.day.toSQLDate():null;if(!a)return!1;const d=a>i&&a<s,r=a===i,o=a===s;return!this.isPrimarySelection()&&(d||r||o)},this.handleKeyDown=t=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,r.QZ)("md-date-range-picker",this)}updated(t){var e,i;super.updated(t),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(e=this.button.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.firstElementChild)}isEndingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.lastElementChild)}isStartDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[o.A,p.A]}render(){var t;const e=(0,d.WV)(this.day,(null===(t=this.datePickerProps)||void 0===t?void 0:t.locale)||"en").toFormat("D, dd MMMM yyyy");return n.html`
1
+ export const __webpack_esm_id__=3639;export const __webpack_esm_ids__=[3639,6020];export const __webpack_esm_modules__={3639(t,e,i){i(5983);var s,a=i(9609),d=i(878),r=i(2050),o=i(4084),n=i(2927),h=i(8899),c=i(4955),l=i(3517),p=i(3842),y=function(t,e,i,s){var a,d=arguments.length,r=d<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(d<3?a(r):d>3?a(e,i,r):a(e,i))||r);return d>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,d.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=t=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))},this.isDateInRange=()=>{var t;const e=this.parentRangePicker,i=null==e?void 0:e.startDate,s=null==e?void 0:e.endDate;if(!i||!s)return!1;const a=(null===(t=this.day)||void 0===t?void 0:t.isValid)?this.day.toSQLDate():null;if(!a)return!1;const d=a>i&&a<s,r=a===i,o=a===s;return!this.isPrimarySelection()&&(d||r||o)},this.handleKeyDown=t=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,r.QZ)("md-date-range-picker",this)}updated(t){var e,i;super.updated(t),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(e=this.button.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.firstElementChild)}isEndingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.lastElementChild)}isStartDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[o.A,p.A]}render(){var t;const e=(0,d.WV)(this.day,(null===(t=this.datePickerProps)||void 0===t?void 0:t.locale)||"en").toFormat("dd MMMM yyyy"),i=this.selected||this.isStartDate()||this.isEndDate()?`${e}, selected`:e;return n.html`
2
2
  <md-button
3
3
  circle
4
4
  size=${32}
@@ -7,8 +7,8 @@ export const __webpack_esm_id__=3639;export const __webpack_esm_ids__=[3639,6020
7
7
  class="md-datepicker__day ${(0,c.classMap)(this.getDayClassMap)}"
8
8
  @click=${t=>{this.disabled||this.handleClick(t)}}
9
9
  @keydown=${t=>this.handleKeyDown(t)}
10
- ariaLabel=${`${e}`}
11
- title=${`${e}`}
10
+ ariaLabel=${i}
11
+ title=${e}
12
12
  aria-selected=${(0,l.ifDefined)(this.selected)}
13
13
  tab-index=${this.focused?"0":"-1"}
14
14
  >
package/dist/esm/5057.js CHANGED
@@ -1 +1 @@
1
- export const __webpack_esm_id__=5057;export const __webpack_esm_ids__=[5057];export const __webpack_esm_modules__={5057(o,r,d){d.d(r,{A:()=>e});const e=d(2927).css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color));border-radius:var(--dropdown-group-radius);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--left-icon{margin-right:calc(.25rem*2);align-self:center;cursor:pointer;height:15px;display:flex}:host .md-dropdown-label--left-icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label--icon{transition:all .15s linear;align-self:center;background:rgba(0,0,0,0);border:0;cursor:pointer;margin:0;margin-left:calc(.25rem*2);outline:0;padding:0;padding-top:calc(.25rem/2);position:relative;vertical-align:bottom;height:inherit;display:flex}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-list-border-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:99;padding:calc(var(--dropdown-list-padding)/16*1rem)}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem;border-radius:calc(var(--dropdown-list-item-border-radius)/16*1rem);height:calc(var(--dropdown-list-item-height)/16*1rem)}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-hover);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--dropdown-list-item-border-focus)}:host .md-dropdown-option[selected]{background-color:var(--dropdown-list-item-bg-color-focus);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--dropdown-list-item-border-focus)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown__expanded .md-dropdown-button.arrow-down{transform:rotate(180deg)}:host .md-dropdown--pill .group,:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host .md-dropdown .group{align-items:start;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color));border-radius:var(--dropdown-group-radius);display:flex;min-height:2rem;padding:0 .75rem;height:2.125rem}:host .md-dropdown .group md-icon{color:var(--md-primary-text-color,#545454);cursor:pointer;fill:var(--md-secondary-text-color,#545454);height:100%}:host .md-dropdown .group md-icon:focus{box-shadow:none;outline:0;box-shadow:0 0 0 .125rem var(--md-focus-border-color,#545454)}:host .md-dropdown .group:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-dropdown .group:active{background-color:var(--dropdown-bg-color-active)}:host .md-dropdown .group input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:rgba(0,0,0,0);border:0;color:var(--md-primary-text-color);display:inline-block;flex:1 1 auto;height:2rem;outline:0}:host .md-dropdown .group input::placeholder{color:var(--md-secondary-text-color)}:host .md-dropdown .group ::input-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host .md-dropdown .group .md-dropdown-left-icon{margin-right:.25rem}:host .md-dropdown .md-dropdown-button[disabled] md-icon{color:var(--md-disabled-text-color,#b2b2b2)}:host .md-dropdown .md-dropdown-input[readonly]{pointer-events:none}:host .md-dropdown.md-error .group,:host .md-dropdown.md-error .group:active{border-color:var(--input-error-border-color)!important}:host .md-dropdown.md-warning .group,:host .md-dropdown.md-warning .group:active{border-color:var(--input-warning-border-color)!important}:host .md-dropdown.md-success .group,:host .md-dropdown.md-success .group:active{border-color:var(--input-success-border-color)!important}:host .help-text,:host .md-dropbox__messages{padding-top:.375rem}:host .group[readonly]{border-color:var(--dropdown-border-color-disabled)!important}:host .group[readonly] md-icon{color:var(--dropdown-bg-color-disabled)!important}:host .md-dropdown-button{transition:all .15s linear;align-self:center;background:rgba(0,0,0,0);border:0;cursor:pointer;margin:0;margin-left:calc(.25rem*2);outline:0;padding:0;position:relative;width:1.25rem;height:1.25rem;display:flex;align-items:center;justify-content:center}:host .md-dropdown-button md-icon{color:var(--combobox-dropdown-item-icon-color)}:host .md-combobox-button.clear{height:auto;padding:.115rem}:host .md-combobox-button.arrow-down:focus,:host .md-combobox-button.clear:focus{outline:2px solid var(--button-focus-ring-color,#007aa3)}:host .md-new-dropdown{height:2rem}:host .md-new-dropdown-label{background-color:var(--dropdown-bg-color-default);border-radius:8px}:host .md-new-dropdown-label--text{color:var(--md-primary-text-color)}:host .md-new-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-new-dropdown-label:active{background-color:var(--dropdown-bg-color-active)}:host .md-new-dropdown-label:focus{background-color:var(--dropdown-bg-color-focus)}:host .md-new-dropdown .group{height:2rem;border-radius:.5rem;background-color:rgba(0,0,0,0);padding-right:.5rem}:host(:active) .md-new-dropdown .group,:host(:active) .md-new-dropdown-label{outline:2px solid var(--input-default-outline-color);outline-offset:.125rem;box-shadow:none;border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color))!important}:host([focus-visible]) .md-dropdown-label{border-color:var(--dropdown-border-color-focus);box-shadow:none;outline:0}:host([focus-visible]) .group{border-color:var(--dropdown-border-color-focus);background-color:var(--dropdown-bg-color-focus)}:host([focus-visible]) .md-new-dropdown .group,:host([focus-visible]) .md-new-dropdown-label{outline:2px solid var(--dropdown-border-color-focus)!important;outline-offset:.125rem!important;box-shadow:none;border-color:var(--combobox-focus-new-border-color)}:host([disabled]) .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown-label:active,:host([disabled]) .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown-label:hover>md-icon{opacity:.3}:host([disabled]) .md-dropdown-label:focus-visible{border-color:var(--dropdown-border-color-focus);outline:0}:host([disabled]) .group{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .group md-icon{opacity:.3}:host([disabled]) .group:active,:host([disabled]) .group:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .group:focus-visible{border-color:var(--dropdown-border-color-focus);outline:0}:host([disabled]) md-help-text{color:var(--md-disabled-text-color,#b2b2b2)}:host([disabled]) .md-new-dropdown-label{background-color:var(--dropdown-bg-color-disabled,transparent);border-color:var(--dropdown-border-color-disabled,#b2b2b2);outline:0!important;box-shadow:none}:host([disabled]) .md-new-dropdown-label--text{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown-label .md-dropdown-label--icon md-icon{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown-label:active,:host([disabled]) .md-new-dropdown-label:hover{background-color:var(--dropdown-bg-color-disabled,transparent);pointer-events:none;outline:0!important;box-shadow:none;border-color:var(--dropdown-border-color-disabled,#b2b2b2)}:host([disabled]) .md-new-dropdown-label:focus-visible{border-color:var(--dropdown-border-color-disabled);outline:0!important;box-shadow:none}:host([disabled]) .md-new-dropdown .group{background:rgba(0,0,0,0);border-color:var(--dropdown-border-color-disabled);pointer-events:none;outline:0!important}:host([disabled]) .md-new-dropdown .group input{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown .group input::placeholder{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown .group:active,:host([disabled]) .md-new-dropdown .group:hover{border-color:var(--dropdown-border-color-disabled)}:host([disabled]) .md-new-dropdown .group:focus-visible{border-color:var(--dropdown-border-color-disabled)}@media(forced-colors:active){:host([focus-visible]) .md-dropdown .md-dropdown-label{border:2px solid Highlight}:host([focus-visible]) .md-dropdown .md-dropdown-label--text{forced-color-adjust:none;background-color:Canvas;color:CanvasText}:host([focus-visible]) .md-dropdown-list{border:1px solid CanvasText}:host .md-dropdown-option[focused]{forced-color-adjust:none;background-color:Highlight;color:HighlightText}:host .group input{color:HighlightText}:host .group input::placeholder{color:GrayText}:host([disabled]) .md-dropdown .md-dropdown-label{border:1px solid GrayText}:host([disabled]) .group,:host([disabled]) .group:active{border:1px solid GrayText!important;outline:0!important}:host([disabled]) .group input,:host([disabled]) .group:active input{color:GrayText}:host([disabled]) .group input::placeholder,:host([disabled]) .group:active input::placeholder{color:GrayText}}`}};
1
+ export const __webpack_esm_id__=5057;export const __webpack_esm_ids__=[5057];export const __webpack_esm_modules__={5057(o,r,d){d.d(r,{A:()=>e});const e=d(2927).css`:host(:focus){box-shadow:none!important;outline:0!important}:host .md-dropdown{display:flex;flex-direction:column;position:relative}:host .md-dropdown-select{display:none}:host .md-dropdown-label{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color));border-radius:var(--dropdown-group-radius);min-height:2rem;padding:0 .75rem}:host .md-dropdown-label--text{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--md-secondary-text-color);line-height:2rem;outline:0;width:6.25rem;flex:1 0 auto}:host .md-dropdown-label--left-icon{margin-right:calc(.25rem*2);align-self:center;cursor:pointer;height:15px;display:flex}:host .md-dropdown-label--left-icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label--icon{transition:all .15s linear;align-self:center;background:rgba(0,0,0,0);border:0;cursor:pointer;margin:0;margin-left:calc(.25rem*2);outline:0;padding:0;padding-top:calc(.25rem/2);position:relative;vertical-align:bottom;height:inherit;display:flex}:host .md-dropdown-label--icon md-icon{color:var(--md-primary-text-color,#f7f7f7)}:host .md-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-dropdown-label:active{background-color:var(--dropdown-bg-color-active)}:host .md-dropdown-list{list-style:none;margin:0;padding:0;display:none;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-list-border-color);border-radius:.5rem;box-shadow:0 4px 8px rgba(0,0,0,.16),0 0 1px rgba(0,0,0,.16);left:0;overflow:auto;overflow-x:hidden;position:absolute;top:calc(100% + .25rem);width:100%;z-index:99;padding:calc(var(--dropdown-list-padding)/16*1rem)}:host .md-dropdown-option{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-primary-text-color,#f7f7f7);padding:.4375rem .75rem .5rem;border-radius:calc(var(--dropdown-list-item-border-radius)/16*1rem);height:calc(var(--dropdown-list-item-height)/16*1rem)}:host .md-dropdown-option .select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:default;width:calc(100% - 1rem);display:block}:host .md-dropdown-option:hover{background-color:var(--dropdown-list-item-bg-color-hover)}:host .md-dropdown-option[focused]{background-color:var(--dropdown-list-item-bg-color-hover);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--dropdown-list-item-border-focus)}:host .md-dropdown-option[selected]{background-color:var(--dropdown-list-item-bg-color-focus);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--dropdown-list-item-border-focus)}:host .md-dropdown__expanded .md-dropdown-list{display:block}:host .md-dropdown__expanded .md-dropdown-label--icon{transform:rotate(180deg)}:host .md-dropdown__expanded .md-dropdown-button.arrow-down{transform:rotate(180deg)}:host .md-dropdown--pill .group,:host .md-dropdown--pill .md-dropdown-label{border-radius:18px}:host .md-dropdown .group{align-items:start;background-color:var(--md-primary-bg-color);border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color));border-radius:var(--dropdown-group-radius);display:flex;min-height:2rem;padding:0 .75rem;height:2.125rem}:host .md-dropdown .group md-icon{color:var(--md-primary-text-color,#545454);cursor:pointer;fill:var(--md-secondary-text-color,#545454);height:100%}:host .md-dropdown .group md-icon:focus{box-shadow:none;outline:0;box-shadow:0 0 0 .125rem var(--md-focus-border-color,#545454)}:host .md-dropdown .group:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-dropdown .group:active{background-color:var(--dropdown-bg-color-active)}:host .md-dropdown .group input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:rgba(0,0,0,0);border:0;color:var(--md-primary-text-color);display:inline-block;flex:1 1 auto;height:2rem;outline:0}:host .md-dropdown .group input::placeholder{color:var(--md-secondary-text-color)}:host .md-dropdown .group ::input-placeholder{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;width:100%}:host .md-dropdown .group .md-dropdown-left-icon{margin-right:.25rem}:host .md-dropdown .md-dropdown-button[disabled] md-icon{color:var(--md-disabled-text-color,#b2b2b2)}:host .md-dropdown .md-dropdown-input[readonly]{pointer-events:none}:host .md-dropdown.md-error .group,:host .md-dropdown.md-error .group:active{border-color:var(--input-error-border-color)!important}:host .md-dropdown.md-warning .group,:host .md-dropdown.md-warning .group:active{border-color:var(--input-warning-border-color)!important}:host .md-dropdown.md-success .group,:host .md-dropdown.md-success .group:active{border-color:var(--input-success-border-color)!important}:host .help-text,:host .md-dropbox__messages{padding-top:.375rem}:host .group[readonly]{border-color:var(--dropdown-border-color-disabled)!important}:host .group[readonly] md-icon{color:var(--dropdown-bg-color-disabled)!important}:host .md-dropdown-button{transition:all .15s linear;align-self:center;background:rgba(0,0,0,0);border:0;cursor:pointer;margin:0;margin-left:calc(.25rem*2);outline:0;padding:0;position:relative;width:1.25rem;height:1.25rem;display:flex;align-items:center;justify-content:center}:host .md-dropdown-button md-icon{color:var(--combobox-dropdown-item-icon-color)}:host .md-dropdown-button.clear:focus-visible{outline:2px solid var(--button-focus-ring-color);border-radius:.125rem}:host .md-combobox-button.clear{height:auto;padding:.115rem}:host .md-combobox-button.arrow-down:focus,:host .md-combobox-button.clear:focus{outline:2px solid var(--button-focus-ring-color)}:host .md-new-dropdown{height:2rem}:host .md-new-dropdown-label{background-color:var(--dropdown-bg-color-default);border-radius:8px}:host .md-new-dropdown-label--text{color:var(--md-primary-text-color)}:host .md-new-dropdown-label:hover{background-color:var(--dropdown-bg-color-hover)}:host .md-new-dropdown-label:active{background-color:var(--dropdown-bg-color-active)}:host .md-new-dropdown-label:focus{background-color:var(--dropdown-bg-color-focus)}:host .md-new-dropdown .group{height:2rem;border-radius:.5rem;background-color:rgba(0,0,0,0);padding-right:.5rem;align-items:center}:host .md-new-dropdown .md-dropdown-list{border:1px solid var(--dropdown-list-border-color)}:host .md-new-dropdown .md-dropdown-option:active{background-color:var(--dropdown-list-item-bg-color-focus)}:host .md-new-dropdown .md-dropdown-option[selected]{background-color:rgba(0,0,0,0);box-shadow:none}:host .md-new-dropdown .md-dropdown-option[selected]:hover{background-color:var(--dropdown-list-item-bg-color-hover)}:host .md-new-dropdown .md-dropdown-option[selected]:active{background-color:var(--dropdown-list-item-bg-color-focus)}:host .md-new-dropdown .md-dropdown-option[focused]{background-color:rgba(0,0,0,0);box-shadow:none;outline:0;box-shadow:0 0 0 .09375rem var(--dropdown-list-item-border-focus)}:host .md-new-dropdown .md-dropdown-option[focused]:hover{background-color:var(--dropdown-list-item-bg-color-hover)}:host .md-new-dropdown .md-dropdown-option[focused]:active{background-color:var(--dropdown-list-item-bg-color-focus)}:host .md-new-dropdown .md-dropdown-option--icon{flex-shrink:0;display:flex;align-items:center;margin-left:auto}:host(:active) .md-new-dropdown .group,:host(:active) .md-new-dropdown-label{outline:2px solid var(--input-default-outline-color);outline-offset:.125rem;box-shadow:none;border:1px solid var(--dropdown-border-color,var(--md-secondary-seperator-color))!important}:host(:active) .md-new-dropdown.md-dropdown__expanded .group,:host(:active) .md-new-dropdown.md-dropdown__expanded .md-new-dropdown-label{outline:0!important}:host([focus-visible]) .md-dropdown-label{border-color:var(--dropdown-border-color-focus);box-shadow:none;outline:0}:host([focus-visible]) .group{border-color:var(--dropdown-border-color-focus);background-color:var(--dropdown-bg-color-focus)}:host([focus-visible]) .group:has(.md-dropdown-button:focus-visible){border-color:var(--dropdown-border-color);background-color:rgba(0,0,0,0);outline:0!important}:host([focus-visible]) .md-new-dropdown .group,:host([focus-visible]) .md-new-dropdown-label{outline:2px solid var(--dropdown-border-color-focus)!important;outline-offset:.125rem!important;box-shadow:none;border-color:var(--combobox-focus-new-border-color)}:host([focus-visible]) .md-new-dropdown .group:has(.md-dropdown-button:focus-visible){outline:0!important;border-color:var(--dropdown-border-color)}:host([focus-visible]) .md-new-dropdown.md-dropdown__expanded .group,:host([focus-visible]) .md-new-dropdown.md-dropdown__expanded .md-new-dropdown-label{outline:0!important}:host([disabled]) .md-dropdown-label{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .md-dropdown-label:active,:host([disabled]) .md-dropdown-label:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .md-dropdown-label:active>md-icon,:host([disabled]) .md-dropdown-label:hover>md-icon{opacity:.3}:host([disabled]) .md-dropdown-label:focus-visible{border-color:var(--dropdown-border-color-focus);outline:0}:host([disabled]) .group{background-color:var(--md-tertiary-bg-color)}:host([disabled]) .group md-icon{opacity:.3}:host([disabled]) .group:active,:host([disabled]) .group:hover{background-color:var(--md-tertiary-bg-color);pointer-events:none}:host([disabled]) .group:focus-visible{border-color:var(--dropdown-border-color-focus);outline:0}:host([disabled]) md-help-text{color:var(--md-disabled-text-color,#b2b2b2)}:host([disabled]) .md-new-dropdown-label{background-color:var(--dropdown-bg-color-disabled,transparent);border-color:var(--dropdown-border-color-disabled,#b2b2b2);outline:0!important;box-shadow:none}:host([disabled]) .md-new-dropdown-label--text{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown-label .md-dropdown-label--icon md-icon{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown-label:active,:host([disabled]) .md-new-dropdown-label:hover{background-color:var(--dropdown-bg-color-disabled,transparent);pointer-events:none;outline:0!important;box-shadow:none;border-color:var(--dropdown-border-color-disabled,#b2b2b2)}:host([disabled]) .md-new-dropdown-label:focus-visible{border-color:var(--dropdown-border-color-disabled);outline:0!important;box-shadow:none}:host([disabled]) .md-new-dropdown .group{background:rgba(0,0,0,0);border-color:var(--dropdown-border-color-disabled);pointer-events:none;outline:0!important}:host([disabled]) .md-new-dropdown .group input{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown .group input::placeholder{color:var(--md-disabled-text-color)}:host([disabled]) .md-new-dropdown .group:active,:host([disabled]) .md-new-dropdown .group:hover{border-color:var(--dropdown-border-color-disabled)}:host([disabled]) .md-new-dropdown .group:focus-visible{border-color:var(--dropdown-border-color-disabled)}@media(forced-colors:active){:host([focus-visible]) .md-dropdown .md-dropdown-label{border:2px solid Highlight}:host([focus-visible]) .md-dropdown .md-dropdown-label--text{forced-color-adjust:none;background-color:Canvas;color:CanvasText}:host([focus-visible]) .md-dropdown-list{border:1px solid CanvasText}:host .md-dropdown-option[focused]{forced-color-adjust:none;background-color:Highlight;color:HighlightText}:host .group input{color:HighlightText}:host .group input::placeholder{color:GrayText}:host([disabled]) .md-dropdown .md-dropdown-label{border:1px solid GrayText}:host([disabled]) .group,:host([disabled]) .group:active{border:1px solid GrayText!important;outline:0!important}:host([disabled]) .group input,:host([disabled]) .group:active input{color:GrayText}:host([disabled]) .group input::placeholder,:host([disabled]) .group:active input::placeholder{color:GrayText}}`}};
package/dist/esm/6020.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __webpack_esm_id__=6020;export const __webpack_esm_ids__=[3639,6020];export const __webpack_esm_modules__={3639(t,e,i){i.d(e,{X:()=>s}),i(5983);var s,a=i(9609),d=i(878),r=i(2050),o=i(4084),n=i(2927),h=i(8899),c=i(4955),l=i(3517),p=i(3842),y=function(t,e,i,s){var a,d=arguments.length,r=d<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(d<3?a(r):d>3?a(e,i,r):a(e,i))||r);return d>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,d.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=t=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))},this.isDateInRange=()=>{var t;const e=this.parentRangePicker,i=null==e?void 0:e.startDate,s=null==e?void 0:e.endDate;if(!i||!s)return!1;const a=(null===(t=this.day)||void 0===t?void 0:t.isValid)?this.day.toSQLDate():null;if(!a)return!1;const d=a>i&&a<s,r=a===i,o=a===s;return!this.isPrimarySelection()&&(d||r||o)},this.handleKeyDown=t=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,r.QZ)("md-date-range-picker",this)}updated(t){var e,i;super.updated(t),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(e=this.button.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.firstElementChild)}isEndingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.lastElementChild)}isStartDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[o.A,p.A]}render(){var t;const e=(0,d.WV)(this.day,(null===(t=this.datePickerProps)||void 0===t?void 0:t.locale)||"en").toFormat("D, dd MMMM yyyy");return n.html`
1
+ export const __webpack_esm_id__=6020;export const __webpack_esm_ids__=[3639,6020];export const __webpack_esm_modules__={3639(t,e,i){i.d(e,{X:()=>s}),i(5983);var s,a=i(9609),d=i(878),r=i(2050),o=i(4084),n=i(2927),h=i(8899),c=i(4955),l=i(3517),p=i(3842),y=function(t,e,i,s){var a,d=arguments.length,r=d<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(r=(d<3?a(r):d>3?a(e,i,r):a(e,i))||r);return d>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,d.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=t=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))},this.isDateInRange=()=>{var t;const e=this.parentRangePicker,i=null==e?void 0:e.startDate,s=null==e?void 0:e.endDate;if(!i||!s)return!1;const a=(null===(t=this.day)||void 0===t?void 0:t.isValid)?this.day.toSQLDate():null;if(!a)return!1;const d=a>i&&a<s,r=a===i,o=a===s;return!this.isPrimarySelection()&&(d||r||o)},this.handleKeyDown=t=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:t}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,r.QZ)("md-date-range-picker",this)}updated(t){var e,i;super.updated(t),this.disabled=this.filterParams&&(0,d.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,d.ro)(this.day,(0,d.tB)()),this.selected=this.datePickerProps&&(0,d.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,d.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(e=this.button.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.firstElementChild)}isEndingRangeEdge(){var t;return this===(null===(t=this.parentNode)||void 0===t?void 0:t.lastElementChild)}isStartDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var t;return(null===(t=this.parentRangePicker)||void 0===t?void 0:t.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[o.A,p.A]}render(){var t;const e=(0,d.WV)(this.day,(null===(t=this.datePickerProps)||void 0===t?void 0:t.locale)||"en").toFormat("dd MMMM yyyy"),i=this.selected||this.isStartDate()||this.isEndDate()?`${e}, selected`:e;return n.html`
2
2
  <md-button
3
3
  circle
4
4
  size=${32}
@@ -7,8 +7,8 @@ export const __webpack_esm_id__=6020;export const __webpack_esm_ids__=[3639,6020
7
7
  class="md-datepicker__day ${(0,c.classMap)(this.getDayClassMap)}"
8
8
  @click=${t=>{this.disabled||this.handleClick(t)}}
9
9
  @keydown=${t=>this.handleKeyDown(t)}
10
- ariaLabel=${`${e}`}
11
- title=${`${e}`}
10
+ ariaLabel=${i}
11
+ title=${e}
12
12
  aria-selected=${(0,l.ifDefined)(this.selected)}
13
13
  tab-index=${this.focused?"0":"-1"}
14
14
  >
package/dist/esm/837.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __webpack_esm_id__=837;export const __webpack_esm_ids__=[837];export const __webpack_esm_modules__={837(t,e,i){i.d(e,{$:()=>r}),i(8371),i(1821),i(9773);var r,o=i(9609),a=i(878),n=i(4084),s=i(2927),d=i(8899),h=i(3842),c=function(t,e,i,r){var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.monthFormat="MMMM yyyy",this.filterParams=void 0,this.handleMonthChange=void 0,this.onRetry=void 0,this.datePickerProps=void 0,this.errorMessages={},this.shortDay=!1,this.isDatePickerMonthLoading=!1,this.isDatePickerMonthError=!1,this.viewAnchorDate=(0,a.tB)(),this.localeMonth=void 0,this.setDate=(t,e)=>{this.viewAnchorDate=t,null==e||e()},this.increaseMonth=t=>{const{handleMonthChange:e}=this,{viewAnchorDate:i}=this;this.setDate((0,a.PS)(i,1),()=>e&&e(t,this.viewAnchorDate))},this.decreaseMonth=t=>{const{handleMonthChange:e}=this,{viewAnchorDate:i}=this;this.setDate((0,a.SL)(i,1),()=>e&&e(t,this.viewAnchorDate))},this.handleRetryClick=()=>{this.onRetry&&this.onRetry()},this.renderMonthName=()=>s.html` <div class="md-datepicker__navigation--current-month" aria-live="polite">${this.localeMonth}</div> `,this.renderPreviousMonthButton=()=>{var t,e;const i=(null===(t=this.filterParams)||void 0===t?void 0:t.minDate)&&(0,a.PD)(this.viewAnchorDate,null===(e=this.filterParams)||void 0===e?void 0:e.minDate);return s.html`
1
+ export const __webpack_esm_id__=837;export const __webpack_esm_ids__=[837];export const __webpack_esm_modules__={837(e,t,i){i.d(t,{$:()=>r}),i(8371),i(1821),i(9773);var r,o=i(9609),a=i(878),n=i(4084),s=i(2927),d=i(8899),h=i(3842),c=function(e,t,i,r){var o,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends s.LitElement{constructor(){super(...arguments),this.monthFormat="MMMM yyyy",this.filterParams=void 0,this.handleMonthChange=void 0,this.onRetry=void 0,this.datePickerProps=void 0,this.errorMessages={},this.shortDay=!1,this.isDatePickerMonthLoading=!1,this.isDatePickerMonthError=!1,this.viewAnchorDate=(0,a.tB)(),this.localeMonth=void 0,this.setDate=(e,t)=>{this.viewAnchorDate=e,null==t||t()},this.increaseMonth=e=>{const{handleMonthChange:t}=this,{viewAnchorDate:i}=this;this.setDate((0,a.PS)(i,1),()=>t&&t(e,this.viewAnchorDate))},this.decreaseMonth=e=>{const{handleMonthChange:t}=this,{viewAnchorDate:i}=this;this.setDate((0,a.SL)(i,1),()=>t&&t(e,this.viewAnchorDate))},this.handleRetryClick=()=>{this.onRetry&&this.onRetry()},this.renderMonthName=()=>s.html` <div class="md-datepicker__navigation--current-month" aria-live="polite">${this.localeMonth}</div> `,this.renderPreviousMonthButton=()=>{var e,t;const i=(null===(e=this.filterParams)||void 0===e?void 0:e.minDate)&&(0,a.PD)(this.viewAnchorDate,null===(t=this.filterParams)||void 0===t?void 0:t.minDate);return s.html`
2
2
  <md-button
3
3
  variant="ghost"
4
4
  circle
@@ -8,11 +8,10 @@ export const __webpack_esm_id__=837;export const __webpack_esm_ids__=[837];expor
8
8
  title=${"previous month"}
9
9
  ?disabled=${i}
10
10
  @click=${!i&&this.decreaseMonth}
11
- tabindex="-1"
12
11
  >
13
12
  <md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
14
13
  </md-button>
15
- `},this.renderNextMonthButton=()=>{var t,e;const i=(null===(t=this.filterParams)||void 0===t?void 0:t.maxDate)&&(0,a.FO)(this.viewAnchorDate,null===(e=this.filterParams)||void 0===e?void 0:e.maxDate);return s.html`
14
+ `},this.renderNextMonthButton=()=>{var e,t;const i=(null===(e=this.filterParams)||void 0===e?void 0:e.maxDate)&&(0,a.FO)(this.viewAnchorDate,null===(t=this.filterParams)||void 0===t?void 0:t.maxDate);return s.html`
16
15
  <md-button
17
16
  variant="ghost"
18
17
  circle
@@ -22,10 +21,9 @@ export const __webpack_esm_id__=837;export const __webpack_esm_ids__=[837];expor
22
21
  title=${"next month"}
23
22
  ?disabled=${i}
24
23
  @click=${!i&&this.increaseMonth}
25
- tabindex="-1"
26
24
  ><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
27
25
  </md-button>
28
- `},this.header=()=>{var t;const e=(0,a.mK)(this.viewAnchorDate,null===(t=this.datePickerProps)||void 0===t?void 0:t.weekStart);return[].concat([0,1,2,3,4,5,6].map(t=>{var i;const r=(0,a.fi)((0,a.WV)(e,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),t),o=(0,a.XN)(r),n=this.getWeekDayName(o,r);return s.html` <div class="md-datepicker__day--name">${n}</div> `}))}}connectedCallback(){var t,e,i;super.connectedCallback(),this.viewAnchorDate=(null===(t=this.datePickerProps)||void 0===t?void 0:t.focused)||(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected)||(0,a.tB)(),this.localeMonth=(0,a.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(t){var e,i,r,o,n;super.updated(t),t.has("datePickerProps")&&(null===(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected.invalidReason)&&(this.viewAnchorDate=this.datePickerProps.selected||(0,a.tB)()),this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,a.WV)(this.viewAnchorDate,null===(r=this.datePickerProps)||void 0===r?void 0:r.locale):this.viewAnchorDate).toFormat(this.monthFormat)),t.has("viewAnchorDate")&&(this.localeMonth=((null===(o=this.datePickerProps)||void 0===o?void 0:o.locale)?(0,a.WV)(this.viewAnchorDate,null===(n=this.datePickerProps)||void 0===n?void 0:n.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(t,e){return this.shortDay?(0,a.XY)(t,e):(0,a.DY)(t,e)}renderLoader(){return s.html`
26
+ `},this.header=()=>{var e;const t=(0,a.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var i;const r=(0,a.fi)((0,a.WV)(t,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),e),o=(0,a.XN)(r),n=this.getWeekDayName(o,r);return s.html` <div class="md-datepicker__day--name">${n}</div> `}))}}connectedCallback(){var e,t,i;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,a.tB)(),this.localeMonth=(0,a.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,i,r,o,n,s;if(super.updated(e),e.has("datePickerProps")){const n=e.get("datePickerProps"),s=null===(t=this.datePickerProps)||void 0===t?void 0:t.selected,d=null===(i=this.datePickerProps)||void 0===i?void 0:i.focused;if(null===(null==s?void 0:s.invalidReason)&&(!(null==n?void 0:n.selected)||!(0,a.ro)(n.selected,s))&&(this.viewAnchorDate=s||(0,a.tB)()),null==d?void 0:d.isValid){const e=!(null==n?void 0:n.focused)||!(0,a.ro)(n.focused,d),t=d.month!==this.viewAnchorDate.month||d.year!==this.viewAnchorDate.year;e&&t&&(this.viewAnchorDate=d)}this.localeMonth=((null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)?(0,a.WV)(this.viewAnchorDate,null===(o=this.datePickerProps)||void 0===o?void 0:o.locale):this.viewAnchorDate).toFormat(this.monthFormat)}e.has("viewAnchorDate")&&(this.localeMonth=((null===(n=this.datePickerProps)||void 0===n?void 0:n.locale)?(0,a.WV)(this.viewAnchorDate,null===(s=this.datePickerProps)||void 0===s?void 0:s.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,a.XY)(e,t):(0,a.DY)(e,t)}renderLoader(){return s.html`
29
27
  <div class="md-datepicker__loading">
30
28
  <div class="md-datepicker__loading-text">${this.errorMessages.LOADING}</div>
31
29
  <md-spinner size="32"></md-spinner>
@@ -63,4 +61,4 @@ export const __webpack_esm_id__=837;export const __webpack_esm_ids__=[837];expor
63
61
  </div>
64
62
  `}static get styles(){return[n.A,h.A]}render(){return s.html`
65
63
  <div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
66
- `}};c([(0,d.property)({attribute:!1})],e.prototype,"monthFormat",void 0),c([(0,d.property)({attribute:!1})],e.prototype,"filterParams",void 0),c([(0,d.property)({attribute:!1})],e.prototype,"handleMonthChange",void 0),c([(0,d.property)({attribute:!1})],e.prototype,"onRetry",void 0),c([(0,d.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),c([(0,d.property)({type:Object,attribute:!1})],e.prototype,"errorMessages",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"short-day"})],e.prototype,"shortDay",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],e.prototype,"isDatePickerMonthLoading",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],e.prototype,"isDatePickerMonthError",void 0),c([(0,d.state)()],e.prototype,"viewAnchorDate",void 0),c([(0,d.state)()],e.prototype,"localeMonth",void 0),e=c([(0,o.w)("md-datepicker-calendar")],e),t.ELEMENT=e}(r||(r={}))}};
64
+ `}};c([(0,d.property)({attribute:!1})],t.prototype,"monthFormat",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"filterParams",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),c([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),c([(0,d.state)()],t.prototype,"viewAnchorDate",void 0),c([(0,d.state)()],t.prototype,"localeMonth",void 0),t=c([(0,o.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(r||(r={}))}};
package/dist/esm/8663.js CHANGED
@@ -1,4 +1,4 @@
1
- export const __webpack_esm_id__=8663;export const __webpack_esm_ids__=[8663];export const __webpack_esm_modules__={8663(e,t,i){i.d(t,{l:()=>o});var o,a=i(2900),r=i(3876),s=i(9609),l=i(878),n=i(3331),d=i(2927),p=i(8899),h=i(3517),c=i(9642),u=(i(9189),i(708),i(405)),m=(i(837),i(3842)),v=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends d.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.handleDateInputChange=e=>{var t,i;this.useISOFormat?this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value:this.value=null===(i=this.selectedDate)||void 0===i?void 0:i.toLocaleString(c.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,i;this.usePopover?e?null===(t=this.popoverController)||void 0===t||t.show():null===(i=this.popoverController)||void 0===i||i.hide():this.menuOverlay.isOpen=e,this.isMenuOverlayOpen=e},this.setPreSelection=e=>{const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};(0,l.t_)(e,t)||(this.focusedDate=e)},this.handleInputKeyDown=e=>{e.code===a.Uz.ArrowDown&&this.setOpen(!0)},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let i=!1;const o=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),i=!0;break;case"Escape":this.setOpen(!1);break;case"ArrowUp":this.setPreSelection((0,l.WB)(o,1)),i=!0;break;case"ArrowLeft":this.setPreSelection((0,l.gg)(o,1)),i=!0;break;case"ArrowRight":this.setPreSelection((0,l.fi)(o,1)),i=!0;break;case"ArrowDown":this.setPreSelection((0,l.J4)(o,1)),i=!0}i&&(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(c.DateTime.DATE_FULL)}`:"Choose Date"},this.getValidRegexString=()=>this.includesTime?n.b.ISOString:n.b.ISODateString}get computedNewMomentum(){return void 0!==this.newMomentum?this.newMomentum:r.vz.isMomentumV2Enabled}static get styles(){return m.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=c.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 i=e.detail.date,o=e.detail.sourceEvent;this.setPreSelection(i),this.dispatchEvent(new CustomEvent("date-pre-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:o,data:i}})),(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&"apply-button-clicked"!==(null==o?void 0:o.type)||(this.setSelected(i,o),this.shouldCloseOnSelect&&this.setOpen(!1))}getISODateTime(e){return this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate()}setSelected(e,t){const i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!(0,l.t_)(e,i)){const t=this.getISODateTime(e);this.selectedDate=e,this.useISOFormat?this.value=t:this.value=e.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale})}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))}validateDateString(e){if(!e&&""!==e)return!0;if(this.useISOFormat){const t=RegExp(this.getValidRegexString()),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return!!e&&t.test(e)&&!(0,l.t_)((0,l.mA)(e),i)}const t=(0,l.gq)(this.locale);return c.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,i,o,a,r;return!this.controlButtons||this.isDatePickerMonthLoading||this.isDatePickerMonthError?d.nothing:d.html`
1
+ export const __webpack_esm_id__=8663;export const __webpack_esm_ids__=[8663];export const __webpack_esm_modules__={8663(e,t,i){i.d(t,{l:()=>o});var o,a=i(2900),r=i(3876),s=i(9609),l=i(878),n=i(3331),d=i(2927),p=i(8899),h=i(3517),c=i(9642),u=(i(9189),i(708),i(405)),m=(i(837),i(3842)),v=function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends d.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,i;this.useISOFormat?this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value:this.value=null===(i=this.selectedDate)||void 0===i?void 0:i.toLocaleString(c.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,i;this.usePopover?e?null===(t=this.popoverController)||void 0===t||t.show():null===(i=this.popoverController)||void 0===i||i.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 a.Uz.ArrowDown:e.preventDefault(),this.isCalendarOpen||(this.openedViaKeyboard=!0,this.setOpen(!0));break;case a.Uz.Escape:this.isCalendarOpen&&(e.preventDefault(),e.stopPropagation(),this.setOpen(!1),this.focusDateInput())}},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let i=!1;const o=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),i=!0;break;case"Escape":this.setOpen(!1),i=!0;break;case"ArrowUp":this.setPreSelection((0,l.WB)(o,1)),i=!0;break;case"ArrowLeft":this.setPreSelection((0,l.gg)(o,1)),i=!0;break;case"ArrowRight":this.setPreSelection((0,l.fi)(o,1)),i=!0;break;case"ArrowDown":this.setPreSelection((0,l.J4)(o,1)),i=!0}i&&(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(c.DateTime.DATE_FULL)}`:"Choose Date"},this.getValidRegexString=()=>this.includesTime?n.b.ISOString:n.b.ISODateString}get computedNewMomentum(){return void 0!==this.newMomentum?this.newMomentum:r.vz.isMomentumV2Enabled}static get styles(){return m.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=c.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 i=e.detail.date,o=e.detail.sourceEvent;this.setPreSelection(i),this.dispatchEvent(new CustomEvent("date-pre-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:o,data:i}})),(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&"apply-button-clicked"!==(null==o?void 0:o.type)||(this.setSelected(i,o),this.shouldCloseOnSelect&&this.setOpen(!1))}getISODateTime(e){return this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate()}setSelected(e,t){const i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!(0,l.t_)(e,i)){const t=this.getISODateTime(e);this.selectedDate=e,this.useISOFormat?this.value=t:this.value=e.toLocaleString(c.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,i,o;return this.usePopover?null!==(t=null===(e=this.popoverController)||void 0===e?void 0:e.isVisible())&&void 0!==t&&t:null!==(o=null===(i=this.menuOverlay)||void 0===i?void 0:i.isOpen)&&void 0!==o&&o}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 i,o,a,r,s,l;const n=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("md-datepicker-calendar"),d=null===(o=null==n?void 0:n.shadowRoot)||void 0===o?void 0:o.querySelector("md-datepicker-month"),p=null===(a=null==d?void 0:d.shadowRoot)||void 0===a?void 0:a.querySelectorAll("md-datepicker-week");if(p){for(const e of Array.from(p)){const t=null===(r=e.shadowRoot)||void 0===r?void 0:r.querySelector("md-datepicker-day[focused]");if(t){const e=null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector("md-button"),i=null===(l=null==e?void 0:e.shadowRoot)||void 0===l?void 0:l.querySelector("button");if(i)return void i.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()),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return!!e&&t.test(e)&&!(0,l.t_)((0,l.mA)(e),i)}const t=(0,l.gq)(this.locale);return c.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,i,o,a,r;return!this.controlButtons||this.isDatePickerMonthLoading||this.isDatePickerMonthError?d.nothing:d.html`
2
2
  <div class="control-buttons">
3
3
  ${this.controlButtons.cancel?d.html`
4
4
  <md-button
@@ -36,6 +36,8 @@ export const __webpack_esm_id__=8663;export const __webpack_esm_ids__=[8663];exp
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
@@ -91,6 +93,8 @@ export const __webpack_esm_id__=8663;export const __webpack_esm_ids__=[8663];exp
91
93
  custom-width="272px"
92
94
  ?disabled=${this.disabled}
93
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?d.html`
96
100
  <span slot="menu-trigger">
package/dist/esm/953.js CHANGED
@@ -8,7 +8,6 @@ export const __webpack_esm_id__=953;export const __webpack_esm_ids__=[405,837,95
8
8
  title=${"previous month"}
9
9
  ?disabled=${i}
10
10
  @click=${!i&&this.decreaseMonth}
11
- tabindex="-1"
12
11
  >
13
12
  <md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
14
13
  </md-button>
@@ -22,10 +21,9 @@ export const __webpack_esm_id__=953;export const __webpack_esm_ids__=[405,837,95
22
21
  title=${"next month"}
23
22
  ?disabled=${i}
24
23
  @click=${!i&&this.increaseMonth}
25
- tabindex="-1"
26
24
  ><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
27
25
  </md-button>
28
- `},this.header=()=>{var e;const t=(0,s.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var i;const o=(0,s.fi)((0,s.WV)(t,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),e),r=(0,s.XN)(o),n=this.getWeekDayName(r,o);return l.html` <div class="md-datepicker__day--name">${n}</div> `}))}}connectedCallback(){var e,t,i;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,s.tB)(),this.localeMonth=(0,s.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,i,o,r,n;super.updated(e),e.has("datePickerProps")&&(null===(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected.invalidReason)&&(this.viewAnchorDate=this.datePickerProps.selected||(0,s.tB)()),this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,s.WV)(this.viewAnchorDate,null===(o=this.datePickerProps)||void 0===o?void 0:o.locale):this.viewAnchorDate).toFormat(this.monthFormat)),e.has("viewAnchorDate")&&(this.localeMonth=((null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)?(0,s.WV)(this.viewAnchorDate,null===(n=this.datePickerProps)||void 0===n?void 0:n.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,s.XY)(e,t):(0,s.DY)(e,t)}renderLoader(){return l.html`
26
+ `},this.header=()=>{var e;const t=(0,s.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var i;const o=(0,s.fi)((0,s.WV)(t,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),e),r=(0,s.XN)(o),n=this.getWeekDayName(r,o);return l.html` <div class="md-datepicker__day--name">${n}</div> `}))}}connectedCallback(){var e,t,i;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,s.tB)(),this.localeMonth=(0,s.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,i,o,r,n,l;if(super.updated(e),e.has("datePickerProps")){const n=e.get("datePickerProps"),l=null===(t=this.datePickerProps)||void 0===t?void 0:t.selected,h=null===(i=this.datePickerProps)||void 0===i?void 0:i.focused;if(null===(null==l?void 0:l.invalidReason)&&(!(null==n?void 0:n.selected)||!(0,s.ro)(n.selected,l))&&(this.viewAnchorDate=l||(0,s.tB)()),null==h?void 0:h.isValid){const e=!(null==n?void 0:n.focused)||!(0,s.ro)(n.focused,h),t=h.month!==this.viewAnchorDate.month||h.year!==this.viewAnchorDate.year;e&&t&&(this.viewAnchorDate=h)}this.localeMonth=((null===(o=this.datePickerProps)||void 0===o?void 0:o.locale)?(0,s.WV)(this.viewAnchorDate,null===(r=this.datePickerProps)||void 0===r?void 0:r.locale):this.viewAnchorDate).toFormat(this.monthFormat)}e.has("viewAnchorDate")&&(this.localeMonth=((null===(n=this.datePickerProps)||void 0===n?void 0:n.locale)?(0,s.WV)(this.viewAnchorDate,null===(l=this.datePickerProps)||void 0===l?void 0:l.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,s.XY)(e,t):(0,s.DY)(e,t)}renderLoader(){return l.html`
29
27
  <div class="md-datepicker__loading">
30
28
  <div class="md-datepicker__loading-text">${this.errorMessages.LOADING}</div>
31
29
  <md-spinner size="32"></md-spinner>
@@ -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),l=i(9609),a=i(3203),d=i(4084),o=i(2927),n=i(8899),h=i(3013),c=function(t,e,i,s){var r,l=arguments.length,a=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var d=t.length-1;d>=0;d--)(r=t[d])&&(a=(l<3?r(a):l>3?r(e,i,a):r(e,i))||a);return l>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.prefixId="item-";let e=class extends((0,a.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,l;const{ArrowDown:a,ArrowUp:d,Tab:o,Space:n,Enter:h}=r.Uz,{code:c}=e,p=c===a,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===(l=this.shadowRoot)||void 0===l?void 0:l.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`
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,l;!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===(l=e.querySelector("md-checkbox"))||void 0===l||l.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"),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`
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,l.w)("md-advance-list")],e),t.ELEMENT=e}(s||(s={}))},2927(e,i,s){var r,l;e.exports=(r={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html},l={},s.d(l,r),l)},8899(t,i,s){var r,l;t.exports=(r={property:()=>e.property,query:()=>e.query,state:()=>e.state},l={},s.d(l,r),l)}},l={};function a(t){var e=l[t];if(void 0!==e)return e.exports;var i=l[t]={exports:{}};return r[t](i,i.exports,a),i.exports}a.m=r,i=[],a.O=(t,e,s,r)=>{if(!e){var l=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||l>=r)&&Object.keys(a.O).every(t=>a.O[t](e[o]))?e.splice(o--,1):(d=!1,r<l&&(l=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]},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{a as __webpack_require__};s={3079:0},a.C=t=>{var e,i,{__webpack_esm_ids__:r,__webpack_esm_modules__:l,__webpack_esm_runtime__:d}=t,o=0;for(e in l)a.o(l,e)&&(a.m[e]=l[e]);for(d&&d(a);o<r.length;o++)i=r[o],a.o(s,i)&&s[i]&&s[i][0](),s[r[o]]=0;a.O()},a.O.j=t=>0===s[t];import*as d from"../9609.js";a.C(d);import*as o from"../4084.js";a.C(o);import*as n from"../519.js";a.C(n);import*as h from"../8441.js";a.C(h);import*as c from"../9983.js";a.C(c);import*as p from"../3013.js";a.C(p);var u=a.O(void 0,[9609,4084,519,8441,9983,3013],()=>a(2170));const v=(u=a.O(u)).L;export{v as AdvanceList};
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};