@momentum-ui/web-components 3.2.22 → 3.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3842.js +1 -1
- package/dist/4739.js +1 -1
- package/dist/6325.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +2 -2
- package/dist/comp/md-activity-button-entry.js +2 -2
- package/dist/comp/md-advance-list-entry.js +2 -2
- package/dist/comp/md-alert-banner-entry.js +2 -2
- package/dist/comp/md-alert-entry.js +2 -2
- package/dist/comp/md-audio-player-entry.js +2 -2
- package/dist/comp/md-avatar-entry.js +2 -2
- package/dist/comp/md-button-entry.js +2 -2
- package/dist/comp/md-card-ai-entry.js +2 -2
- package/dist/comp/md-card-alert-entry.js +2 -2
- package/dist/comp/md-card-entry.js +2 -2
- package/dist/comp/md-card-v2-entry.js +2 -2
- package/dist/comp/md-chat-message-entry.js +2 -2
- package/dist/comp/md-checkbox-entry.js +2 -2
- package/dist/comp/md-coachmark-entry.js +2 -2
- package/dist/comp/md-coachmark-popover-entry.js +2 -2
- package/dist/comp/md-combobox-entry.js +2 -2
- package/dist/comp/md-country-code-picker-entry.js +2 -2
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-time-picker-entry.js +2 -2
- package/dist/comp/md-datepicker-calendar-entry.js +2 -2
- package/dist/comp/md-datepicker-day-entry.js +2 -2
- package/dist/comp/md-datepicker-entry.js +2 -2
- package/dist/comp/md-datepicker-month-entry.js +2 -2
- package/dist/comp/md-datepicker-week-entry.js +2 -2
- package/dist/comp/md-dropdown-entry.js +5 -5
- package/dist/comp/md-editable-field-entry.js +2 -2
- package/dist/comp/md-favorite-entry.js +2 -2
- package/dist/comp/md-floating-minimize-entry.js +2 -2
- package/dist/comp/md-floating-modal-entry.js +2 -2
- package/dist/comp/md-grabber-entry.js +2 -2
- package/dist/comp/md-icon-entry.js +2 -2
- package/dist/comp/md-input-entry.js +2 -2
- package/dist/comp/md-input-file.js +2 -2
- package/dist/comp/md-meeting-alert-entry.js +2 -2
- package/dist/comp/md-menu-overlay-entry.js +2 -2
- package/dist/comp/md-modal-entry.js +2 -2
- package/dist/comp/md-pagination-entry.js +2 -2
- package/dist/comp/md-phone-input-entry.js +2 -2
- package/dist/comp/md-popover-entry.js +2 -2
- package/dist/comp/md-presence-entry.js +2 -2
- package/dist/comp/md-table-advanced-entry.js +2 -2
- package/dist/comp/md-table-entry.js +2 -2
- package/dist/comp/md-tabs-entry.js +2 -2
- package/dist/comp/md-task-item-entry.js +2 -2
- package/dist/comp/md-timepicker-entry.js +2 -2
- package/dist/esm/3842.js +1 -1
- package/dist/esm/4739.js +1 -1
- package/dist/esm/6325.js +1 -1
- package/dist/esm/comp/md-dropdown-entry.js +19 -19
- package/dist/esm/index-entry.js +5 -5
- package/dist/index-entry.js +7 -7
- package/dist/types/components/dropdown/Dropdown.d.ts +1 -0
- package/dist/types/components/dropdown/Dropdown.stories.d.ts +3 -0
- package/package.json +1 -1
package/dist/esm/index-entry.js
CHANGED
|
@@ -911,7 +911,7 @@ import*as t from"luxon";var e={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(
|
|
|
911
911
|
<slot></slot>
|
|
912
912
|
${this.extended?n.html` <slot name="extended"></slot> `:n.nothing}
|
|
913
913
|
</div>
|
|
914
|
-
`}};p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=p([(0,a.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{m:()=>o}),i(1821);var o,s=i(2900),a=i(7704),r=i(2050),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(5057),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},v=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,a.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 e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,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 t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return v(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return v(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}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(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.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(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.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(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return v(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],a=this.optionsListItems[t+1]||s,r=this.optionsListItems[t-1]||s,n=a.getBoundingClientRect(),l=r.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.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(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
914
|
+
`}};p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=p([(0,a.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{m:()=>o}),i(1821);var o,s=i(2900),a=i(7704),r=i(2050),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(5057),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},v=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,a.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 e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,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 t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return v(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return v(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}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(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.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(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.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(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return v(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],a=this.optionsListItems[t+1]||s,r=this.optionsListItems[t-1]||s,n=a.getBoundingClientRect(),l=r.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get comboboxAriaLabel(){return this.ariaLabel?`${this.ariaLabel}, ${this.labelTitle}`:this.labelTitle}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(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
915
915
|
<md-help-text
|
|
916
916
|
class="help-text ${(0,h.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
917
917
|
.message=${this.helpText}
|
|
@@ -982,7 +982,7 @@ import*as t from"luxon";var e={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(
|
|
|
982
982
|
type="text"
|
|
983
983
|
role="combobox"
|
|
984
984
|
aria-autocomplete="both"
|
|
985
|
-
aria-label=${(0,p.ifDefined)(this.inputValue?void 0:this.title)}
|
|
985
|
+
aria-label=${(0,p.ifDefined)(this.ariaLabel?this.ariaLabel:this.inputValue?void 0:this.title)}
|
|
986
986
|
part="dropdown-input"
|
|
987
987
|
aria-expanded=${this.expanded}
|
|
988
988
|
placeholder=${this.inputValue?"":this.placeholder}
|
|
@@ -1001,7 +1001,7 @@ import*as t from"luxon";var e={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(
|
|
|
1001
1001
|
<label
|
|
1002
1002
|
class="md-dropdown-label ${(0,h.classMap)({"md-new-dropdown-label":this.newMomentum})}"
|
|
1003
1003
|
aria-expanded="${this.expanded}"
|
|
1004
|
-
aria-label="${this.
|
|
1004
|
+
aria-label="${this.comboboxAriaLabel}"
|
|
1005
1005
|
aria-controls="md-dropdown-list"
|
|
1006
1006
|
aria-haspopup="listbox"
|
|
1007
1007
|
?disabled=${this.disabled}
|
|
@@ -1026,7 +1026,7 @@ import*as t from"luxon";var e={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(
|
|
|
1026
1026
|
id="md-dropdown-list"
|
|
1027
1027
|
class="md-dropdown-list"
|
|
1028
1028
|
role="listbox"
|
|
1029
|
-
aria-label="${this.labelTitle}"
|
|
1029
|
+
aria-label="${this.ariaLabel||this.labelTitle}"
|
|
1030
1030
|
aria-hidden="${!this.expanded}"
|
|
1031
1031
|
part="dropdown-options"
|
|
1032
1032
|
tabindex=${(0,p.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
@@ -1060,7 +1060,7 @@ import*as t from"luxon";var e={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(
|
|
|
1060
1060
|
</ul>
|
|
1061
1061
|
</div>
|
|
1062
1062
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
1063
|
-
`}};b([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),b([(0,d.property)({type:Array})],i.prototype,"options",void 0),b([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),b([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),b([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),b([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),b([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),b([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),b([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),b([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),b([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),b([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),b([(0,d.property)({type:String,
|
|
1063
|
+
`}};b([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),b([(0,d.property)({type:Array})],i.prototype,"options",void 0),b([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),b([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),b([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),b([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),b([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),b([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),b([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),b([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),b([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),b([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),b([(0,d.property)({type:String,attribute:"aria-label"})],i.prototype,"ariaLabel",void 0),b([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),b([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),b([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),b([(0,d.state)()],i.prototype,"selectedKey",void 0),b([(0,d.state)()],i.prototype,"expanded",void 0),b([(0,d.state)()],i.prototype,"focusedIndex",void 0),b([(0,d.query)("label")],i.prototype,"label",void 0),b([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),b([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),b([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=b([(0,a.wW)("md-dropdown")],i),t.ELEMENT=i}(o||(o={}))},7386(t,e,i){i.d(e,{I:()=>o}),i(9189);var o,s=i(9609),a=i(3331),r=i(4084),n=i(925),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(9956),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.alignment="left",this.disabled=!1,this.isEditing=!1,this.maxLines="",this.content="Click to edit text",this.message={type:"error",message:"That is not a valid input."},this.alert=!1,this.hideMessage=!1,this.pattern="",this.type=null,this.ariaLabel="editable field",this.ariaDescribedBy="",this.reportValidity=()=>{this.dispatchEvent(new Event("invalid",{bubbles:!1,cancelable:!0,composed:!0}))},this.checkValidity=t=>{let e=!0;const i=i=>{null===t.match(i)&&(e=!1)};if(this.pattern)i(new RegExp(this.pattern));else if(t&&this.type)switch(this.type){case"integer":i(new RegExp(a.b.integerString));break;case"decimal":i(new RegExp(a.b.decimalString))}return e},this.handleFocus=()=>{this.disabled||(this.isEditing=!0,this.setRange())},this.handleKeydown=t=>{var e,i;const{key:o,code:s}=t;if(!["Tab","Meta","Shift","Delete","Backspace","Arrow"].some(t=>s.includes(t)))if("integer"===this.type&&(o.includes(".")||"-"===o&&(null===(e=this.editableField)||void 0===e?void 0:e.innerText.includes("-"))))t.preventDefault();else if("integer"!==this.type&&"decimal"!==this.type||!s.match("Space")){if(this.type&&1===o.length){const e=((null===(i=this.editableField)||void 0===i?void 0:i.innerText.trim())||"")+o;("integer"!==this.type||/^-?\d*$/.test(e))&&("decimal"!==this.type||/^-?\d*\.?\d*$/.test(e))||t.preventDefault()}}else t.preventDefault()},this.handleBlur=()=>{var t,e,i;this.isEditing=!1,this.maxLines.length>0&&(null===(t=this.editableField)||void 0===t||t.scrollTo(0,0));const o=(null===(i=null===(e=this.editableField)||void 0===e?void 0:e.innerText)||void 0===i?void 0:i.trim())||"",s=n.default.sanitize(o);s!==this.content&&(this.content=s),this.alert=!1,this.handleValidation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleFocus)}firstUpdated(t){super.firstUpdated(t),this.innerText&&this.innerText.trim().length>0&&this.innerText.trim()!==this.content&&(this.content=this.innerText.trim())}setRange(){var t;if(this.editableField){const e=document.createRange(),i=window.getSelection(),o=this.editableField.childNodes[0];if(!o||o.nodeType!==Node.TEXT_NODE)return;const s=(null===(t=o.nodeValue)||void 0===t?void 0:t.length)||0;e.setStart(o,s),e.collapse(!0),i&&0===i.toString().length&&(i.removeAllRanges(),i.addRange(e)),this.maxLines.length>0&&(this.editableField.scrollTop=this.editableField.scrollHeight)}}handleValidation(){var t;(this.type||this.pattern)&&((null===(t=this.checkValidity)||void 0===t?void 0:t.call(this,this.content))||(this.reportValidity(),this.showAlert()))}showAlert(){this.alert=!0}static get styles(){return[r.A,c.A]}get overflowStyles(){return this.maxLines.length&&this.maxLines.length>0&&`max-height: ${2*parseInt(this.maxLines)}rem; -webkit-line-clamp: ${this.maxLines}; word-break: break-all;`}messagesTemplate(){var t,e,i;return this.alert?l.html`
|
|
1064
1064
|
<div class="md-editable-textfield__messages" style="display: ${this.hideMessage?"none":"block"}">
|
|
1065
1065
|
<md-help-text
|
|
1066
1066
|
id="alert-message"
|
package/dist/index-entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@floating-ui/dom"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("@lit-labs/virtualizer"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("@popperjs/core/lib"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("country-codes-list"),require("country-flags-svg"),require("dompurify"),require("highlight.js/lib/core"),require("libphonenumber-js"),require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/if-defined.js"),require("lit/directives/repeat.js"),require("lit/directives/style-map.js"),require("lit/directives/unsafe-html.js"),require("lit/directives/until.js"),require("luxon"),require("mobx"),require("papaparse"),require("sortablejs"));else if("function"==typeof define&&define.amd)define(["@floating-ui/dom","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/interact/index","@interactjs/modifiers","@lit-labs/virtualizer","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","@popperjs/core/lib","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","country-codes-list","country-flags-svg","dompurify","highlight.js/lib/core","libphonenumber-js","lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/if-defined.js","lit/directives/repeat.js","lit/directives/style-map.js","lit/directives/unsafe-html.js","lit/directives/until.js","luxon","mobx","papaparse","sortablejs"],e);else{var i="object"==typeof exports?e(require("@floating-ui/dom"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("@lit-labs/virtualizer"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("@popperjs/core/lib"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("country-codes-list"),require("country-flags-svg"),require("dompurify"),require("highlight.js/lib/core"),require("libphonenumber-js"),require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/if-defined.js"),require("lit/directives/repeat.js"),require("lit/directives/style-map.js"),require("lit/directives/unsafe-html.js"),require("lit/directives/until.js"),require("luxon"),require("mobx"),require("papaparse"),require("sortablejs")):e(t["@floating-ui/dom"],t["@interactjs/actions/drag"],t["@interactjs/actions/resize"],t["@interactjs/auto-start"],t["@interactjs/interact/index"],t["@interactjs/modifiers"],t["@lit-labs/virtualizer"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t["@popperjs/core/lib"],t["@popperjs/core/lib/modifiers/arrow"],t["@popperjs/core/lib/modifiers/flip"],t["@popperjs/core/lib/modifiers/offset"],t["@popperjs/core/lib/modifiers/preventOverflow"],t["@popperjs/core/lib/popper-lite"],t["country-codes-list"],t["country-flags-svg"],t.dompurify,t["highlight.js/lib/core"],t["libphonenumber-js"],t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/if-defined.js"],t["lit/directives/repeat.js"],t["lit/directives/style-map.js"],t["lit/directives/unsafe-html.js"],t["lit/directives/until.js"],t.luxon,t.mobx,t.papaparse,t.sortablejs);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,s,r,a,n,l,d,h,c,p,u,m,v,y,b,g,f,w,x,C,E,S,$,T,A,k,I,L,O)=>(()=>{"use strict";var M={3701(t,e,i){i.d(e,{Accordion:()=>o});var o,s=i(2900),r=i(7704),a=i(9609),n=i(4084),l=i(7161),d=i(429),h=i(742),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,r.TS)(l.LitElement)){constructor(){super(...arguments),this.multiple=!1,this.suppressContainerFocus=!1,this.doubleClickToExpand=!1,this.handleAccordionItemFocus=()=>{this.toggleAttribute("focusable",!0)},this.handleAccordionItemBlur=()=>{this.toggleAttribute("focusable",!1)}}get slotItem(){return this.accordionItemSlotElement}filterSlotted(){return this.accordionItemSlotElement.assignedElements()}switchFocusedAccordionItem(t){const e=this.slotted.findIndex(t=>t.hasAttribute("focus-visible")),i=this.slotted.length;let o=e;for(o=(i+o+t)%i;this.slotted[o].disabled;)o=(i+o+t)%i;this.focusAccordionItem(this.slotted[o])}focusAccordionItem(t){t.hasAttribute("focus-visible")||requestAnimationFrame(()=>t.header.focus())}setActiveAccordionItem(t){this.multiple?t.expanded=!t.expanded:(this.slotted.forEach(e=>{const i=e;i.expanded&&!e.isEqualNode(t)&&(i.expanded=!1)}),t.expanded=!0)}setupExpandedAccordionItems(){this.multiple||this.slotted.filter(t=>t.expanded).forEach((t,e)=>{const i=t;i.expanded&&e>0&&(i.expanded=!1)})}setupFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.addEventListener("focus",this.handleAccordionItemFocus),t.addEventListener("blur",this.handleAccordionItemBlur))})}removeFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.removeEventListener("focus",this.handleAccordionItemFocus),t.removeEventListener("blur",this.handleAccordionItemBlur))})}handleKeyDown(t){const{srcEvent:e}=t.detail,{code:i}=e;switch(i){case s.Uz.Space:case s.Uz.Enter:{const{target:e}=t;e&&this.setActiveAccordionItem(e);break}case s.Uz.ArrowDown:this.switchFocusedAccordionItem(1);break;case s.Uz.ArrowUp:this.switchFocusedAccordionItem(-1);break;case s.Uz.Home:{const t=this.slotted[0];this.focusAccordionItem(t);break}case s.Uz.End:{const t=this.slotted[this.slotted.length-1];this.focusAccordionItem(t);break}}}handleClick(t){const{target:e}=t,i=this.slotted.find(t=>t.isSameNode(e));i&&this.setActiveAccordionItem(i)}propagateDoubleClickSetting(){this.slotted.forEach(t=>{t.doubleClickToExpand=this.doubleClickToExpand})}updated(t){super.updated(t),t.has("slotted")&&(this.setupExpandedAccordionItems(),this.setupFocusAccordionItems(),this.propagateDoubleClickSetting())}connectedCallback(){super.connectedCallback(),this.addEventListener("accordion-item-keydown",this.handleKeyDown),this.addEventListener("accordion-item-click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accordion-item-keydown",this.handleKeyDown),this.removeEventListener("accordion-item-click",this.handleClick),this.removeFocusAccordionItems()}static get styles(){return[n.A,h.A]}render(){return l.html`
|
|
2
2
|
<div class="md-accordion" part="accordion">
|
|
3
3
|
<slot name="accordion-item"></slot>
|
|
4
4
|
</div>
|
|
@@ -1413,7 +1413,7 @@
|
|
|
1413
1413
|
<slot></slot>
|
|
1414
1414
|
${this.extended?n.html` <slot name="extended"></slot> `:n.nothing}
|
|
1415
1415
|
</div>
|
|
1416
|
-
`}};c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=c([(0,r.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{Dropdown:()=>o}),i(1821);var o,s=i(2900),r=i(7704),a=i(2050),n=i(4084),l=i(7161),d=i(429),h=i(5125),c=i(291),p=i(8175),u=i(318),m=i(5057),v=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},y=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.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 e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,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 t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return y(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return y(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}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(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.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(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.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(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return y(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],r=this.optionsListItems[t+1]||s,a=this.optionsListItems[t-1]||s,n=r.getBoundingClientRect(),l=a.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.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(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
1416
|
+
`}};c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=c([(0,r.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{Dropdown:()=>o}),i(1821);var o,s=i(2900),r=i(7704),a=i(2050),n=i(4084),l=i(7161),d=i(429),h=i(5125),c=i(291),p=i(8175),u=i(318),m=i(5057),v=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},y=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.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 e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,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 t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return y(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return y(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}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(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.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(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.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(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return y(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],r=this.optionsListItems[t+1]||s,a=this.optionsListItems[t-1]||s,n=r.getBoundingClientRect(),l=a.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get comboboxAriaLabel(){return this.ariaLabel?`${this.ariaLabel}, ${this.labelTitle}`:this.labelTitle}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(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
1417
1417
|
<md-help-text
|
|
1418
1418
|
class="help-text ${(0,h.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
1419
1419
|
.message=${this.helpText}
|
|
@@ -1484,7 +1484,7 @@
|
|
|
1484
1484
|
type="text"
|
|
1485
1485
|
role="combobox"
|
|
1486
1486
|
aria-autocomplete="both"
|
|
1487
|
-
aria-label=${(0,c.ifDefined)(this.inputValue?void 0:this.title)}
|
|
1487
|
+
aria-label=${(0,c.ifDefined)(this.ariaLabel?this.ariaLabel:this.inputValue?void 0:this.title)}
|
|
1488
1488
|
part="dropdown-input"
|
|
1489
1489
|
aria-expanded=${this.expanded}
|
|
1490
1490
|
placeholder=${this.inputValue?"":this.placeholder}
|
|
@@ -1503,7 +1503,7 @@
|
|
|
1503
1503
|
<label
|
|
1504
1504
|
class="md-dropdown-label ${(0,h.classMap)({"md-new-dropdown-label":this.newMomentum})}"
|
|
1505
1505
|
aria-expanded="${this.expanded}"
|
|
1506
|
-
aria-label="${this.
|
|
1506
|
+
aria-label="${this.comboboxAriaLabel}"
|
|
1507
1507
|
aria-controls="md-dropdown-list"
|
|
1508
1508
|
aria-haspopup="listbox"
|
|
1509
1509
|
?disabled=${this.disabled}
|
|
@@ -1528,7 +1528,7 @@
|
|
|
1528
1528
|
id="md-dropdown-list"
|
|
1529
1529
|
class="md-dropdown-list"
|
|
1530
1530
|
role="listbox"
|
|
1531
|
-
aria-label="${this.labelTitle}"
|
|
1531
|
+
aria-label="${this.ariaLabel||this.labelTitle}"
|
|
1532
1532
|
aria-hidden="${!this.expanded}"
|
|
1533
1533
|
part="dropdown-options"
|
|
1534
1534
|
tabindex=${(0,c.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
@@ -1562,7 +1562,7 @@
|
|
|
1562
1562
|
</ul>
|
|
1563
1563
|
</div>
|
|
1564
1564
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
1565
|
-
`}};v([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),v([(0,d.property)({type:Array})],i.prototype,"options",void 0),v([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),v([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),v([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),v([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),v([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),v([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),v([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),v([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),v([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),v([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),v([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),v([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),v([(0,d.property)({type:String})],i.prototype,"helpText",void 0),v([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),v([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),v([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),v([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),v([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),v([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),v([(0,d.property)({type:String,
|
|
1565
|
+
`}};v([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),v([(0,d.property)({type:Array})],i.prototype,"options",void 0),v([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),v([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),v([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),v([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),v([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),v([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),v([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),v([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),v([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),v([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),v([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),v([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),v([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),v([(0,d.property)({type:String})],i.prototype,"helpText",void 0),v([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),v([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),v([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),v([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),v([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),v([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),v([(0,d.property)({type:String,attribute:"aria-label"})],i.prototype,"ariaLabel",void 0),v([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),v([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),v([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),v([(0,d.state)()],i.prototype,"selectedKey",void 0),v([(0,d.state)()],i.prototype,"expanded",void 0),v([(0,d.state)()],i.prototype,"focusedIndex",void 0),v([(0,d.query)("label")],i.prototype,"label",void 0),v([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),v([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),v([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=v([(0,r.wW)("md-dropdown")],i),t.ELEMENT=i}(o||(o={}))},7386(t,e,i){i.d(e,{EditableTextfield:()=>o}),i(9189);var o,s=i(9609),r=i(3331),a=i(4084),n=i(1347),l=i.n(n),d=i(7161),h=i(429),c=i(5125),p=i(291),u=i(9956),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends d.LitElement{constructor(){super(...arguments),this.alignment="left",this.disabled=!1,this.isEditing=!1,this.maxLines="",this.content="Click to edit text",this.message={type:"error",message:"That is not a valid input."},this.alert=!1,this.hideMessage=!1,this.pattern="",this.type=null,this.ariaLabel="editable field",this.ariaDescribedBy="",this.reportValidity=()=>{this.dispatchEvent(new Event("invalid",{bubbles:!1,cancelable:!0,composed:!0}))},this.checkValidity=t=>{let e=!0;const i=i=>{null===t.match(i)&&(e=!1)};if(this.pattern)i(new RegExp(this.pattern));else if(t&&this.type)switch(this.type){case"integer":i(new RegExp(r.b.integerString));break;case"decimal":i(new RegExp(r.b.decimalString))}return e},this.handleFocus=()=>{this.disabled||(this.isEditing=!0,this.setRange())},this.handleKeydown=t=>{var e,i;const{key:o,code:s}=t;if(!["Tab","Meta","Shift","Delete","Backspace","Arrow"].some(t=>s.includes(t)))if("integer"===this.type&&(o.includes(".")||"-"===o&&(null===(e=this.editableField)||void 0===e?void 0:e.innerText.includes("-"))))t.preventDefault();else if("integer"!==this.type&&"decimal"!==this.type||!s.match("Space")){if(this.type&&1===o.length){const e=((null===(i=this.editableField)||void 0===i?void 0:i.innerText.trim())||"")+o;("integer"!==this.type||/^-?\d*$/.test(e))&&("decimal"!==this.type||/^-?\d*\.?\d*$/.test(e))||t.preventDefault()}}else t.preventDefault()},this.handleBlur=()=>{var t,e,i;this.isEditing=!1,this.maxLines.length>0&&(null===(t=this.editableField)||void 0===t||t.scrollTo(0,0));const o=(null===(i=null===(e=this.editableField)||void 0===e?void 0:e.innerText)||void 0===i?void 0:i.trim())||"",s=l().sanitize(o);s!==this.content&&(this.content=s),this.alert=!1,this.handleValidation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleFocus)}firstUpdated(t){super.firstUpdated(t),this.innerText&&this.innerText.trim().length>0&&this.innerText.trim()!==this.content&&(this.content=this.innerText.trim())}setRange(){var t;if(this.editableField){const e=document.createRange(),i=window.getSelection(),o=this.editableField.childNodes[0];if(!o||o.nodeType!==Node.TEXT_NODE)return;const s=(null===(t=o.nodeValue)||void 0===t?void 0:t.length)||0;e.setStart(o,s),e.collapse(!0),i&&0===i.toString().length&&(i.removeAllRanges(),i.addRange(e)),this.maxLines.length>0&&(this.editableField.scrollTop=this.editableField.scrollHeight)}}handleValidation(){var t;(this.type||this.pattern)&&((null===(t=this.checkValidity)||void 0===t?void 0:t.call(this,this.content))||(this.reportValidity(),this.showAlert()))}showAlert(){this.alert=!0}static get styles(){return[a.A,u.A]}get overflowStyles(){return this.maxLines.length&&this.maxLines.length>0&&`max-height: ${2*parseInt(this.maxLines)}rem; -webkit-line-clamp: ${this.maxLines}; word-break: break-all;`}messagesTemplate(){var t,e,i;return this.alert?d.html`
|
|
1566
1566
|
<div class="md-editable-textfield__messages" style="display: ${this.hideMessage?"none":"block"}">
|
|
1567
1567
|
<md-help-text
|
|
1568
1568
|
id="alert-message"
|
|
@@ -3116,4 +3116,4 @@
|
|
|
3116
3116
|
@click=${this.stopEventPropagation}
|
|
3117
3117
|
@keyup=${this.stopEventPropagation}
|
|
3118
3118
|
@keydown=${this.stopEventPropagation}
|
|
3119
|
-
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,$t.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===St.Uz.ArrowRight||t===St.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,$t.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==St.Uz.ArrowRight||this.expanded?t.key===St.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Tt}};kt([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),kt([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),kt([(0,y.property)({type:String})],e.prototype,"variant",void 0),kt([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),kt([(0,y.query)(".header")],e.prototype,"header",void 0),e=kt([(0,st.w)("md-list-item-v2")],e),t.ELEMENT=e}(At||(At={}));var It,Lt=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends v.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return v.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof At.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case St.Uz.ArrowDown:return(e+1)%i;case St.Uz.ArrowUp:return(e-1+i)%i;case St.Uz.Home:return 0;case St.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return Tt}};Lt([(0,y.property)({type:String})],e.prototype,"gap",void 0),Lt([(0,y.property)({type:String})],e.prototype,"orientation",void 0),Lt([(0,y.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=Lt([(0,st.w)("md-list-v2")],e),t.ELEMENT=e}(It||(It={}));var Ot=i(6131),Mt=i(8552),Dt=i(1161),Pt=i(7030),Rt=i(708),_t=i(4085),Bt=i(5410),zt=i(329),Ft=i(8751),Vt=i(5566),Nt=i(405),jt=i(3477),Ut=i(2708),qt=i(3949),Ht=i(8358);const Wt=v.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Kt,Gt=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends v.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,v.html`<slot></slot>`}static get styles(){return[Wt]}};Gt([(0,y.property)({type:String})],e.prototype,"width",void 0),Gt([(0,y.property)({type:String})],e.prototype,"height",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=Gt([(0,st.w)("md-skeleton")],e),t.ELEMENT=e}(Kt||(Kt={}));var Yt=i(3773),Xt=i(9773),Zt=i(7936),Qt=i(3273),Jt=i(120),te=i(6056),ee=i(8543),ie=i(1479),oe=i(1853),se=i(2218),re=i(6328),ae=i(7253),ne=i(3876)},3876(t,e,i){i.d(e,{ThemeManager:()=>s,registerThemeManagerGlobally:()=>a});var o=i(5314);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new s;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}i.d(e,["themeManager",0,r])},7704(t,e,i){i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),r=i(5201),a=i(4781),n=i(608),l=i(9609)},2050(t,e,i){function o(t,e,i){let o;return function(...s){const r=this,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(r,s)},e),a&&t.apply(r,s)}}function s(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function r(t,e){return e>=0&&e<t.length?t[e]:void 0}function a(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=a(t,e);if(i)return i}return null}function n(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=n(t,e);if(i)return i}return null}function l(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}i.d(e,{QZ:()=>s,Qx:()=>r,XI:()=>n,dw:()=>l,qi:()=>a,sg:()=>o}),i.d(e,["ws",0,(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),r=e.toLowerCase();let a=0,n=s.indexOf(r,a);for(;n>-1;)a=n+i,o.push([n,a]),n=s.indexOf(r,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let r=0;return o.forEach(([e,i])=>{r!==e&&s.push({range:[e,i],matching:!1,text:t.slice(r,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i}),r!==t.length&&s.push({range:[r],matching:!1,text:t.slice(r)}),s}])},7154(t,e,i){i.d(e,{o:()=>r,q:()=>a});var o=i(2900);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function r(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function a(t){return s.includes(t)}},5784(t){t.exports=b},8088(t){t.exports=E},7346(t){t.exports=S},9e3(t){t.exports=$},727(t){t.exports=T},3288(t){t.exports=A},3048(t){t.exports=l},2022(t){t.exports=r},554(t){t.exports=a},4893(t){t.exports=O},2962(t){t.exports=p},6538(t){t.exports=u},8250(t){t.exports=m},9371(t){t.exports=v},4863(t){t.exports=y},3060(t){t.exports=f},5875(t){t.exports=w},1347(t){t.exports=C},5001(t){t.exports=g},860(t){t.exports=k},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=s},8175(t){t.exports=h},318(t){t.exports=o},6968(t){t.exports=I},9756(t){t.exports=d},5796(t){t.exports=c},5314(t){t.exports=n},8187(t){t.exports=L},1891(t){t.exports=x}};const D={};function P(t){const e=D[t];if(void 0!==e)return e.exports;const i=D[t]={exports:{}};return M[t].call(i.exports,i,i.exports,P),i.exports}P.m=M,(()=>{const t=[];P.O=(e,i,o,s)=>{if(i){s=s||0;for(var r=t.length;r>0&&t[r-1][2]>s;r--)t[r]=t[r-1];return void(t[r]=[i,o,s])}let a=1/0;for(r=0;r<t.length;r++){let[i,o,s]=t[r],l=!0;for(var n=0;n<i.length;n++)(!1&s||a>=s)&&Object.keys(P.O).every(t=>P.O[t](i[n]))?i.splice(n--,1):(l=!1,s<a&&(a=s));if(l){t.splice(r--,1);const i=o();void 0!==i&&(e=i)}}return e}})(),P.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return P.d(e,{a:e}),e},P.d=(t,e)=>{if(Array.isArray(e))for(var i=0;i<e.length;){var o=e[i++],s=e[i++];P.o(t,o)?0===s&&i++:0===s?Object.defineProperty(t,o,{enumerable:!0,value:e[i++]}):Object.defineProperty(t,o,{enumerable:!0,get:s})}else for(var o in e)P.o(e,o)&&!P.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),P.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),P.r=t=>{Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{const t={378:0,445:0,502:0,519:0,555:0,561:0,708:0,762:0,801:0,953:0,1037:0,1266:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2169:0,2245:0,2273:0,2330:0,2369:0,2434:0,2708:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3413:0,3539:0,3639:0,3747:0,3876:0,3938:0,3943:0,4131:0,4139:0,4259:0,4431:0,4545:0,4908:0,4928:0,4958:0,4971:0,5156:0,5310:0,5323:0,5369:0,5517:0,5757:0,5983:0,6029:0,6060:0,6085:0,6132:0,6220:0,6433:0,6494:0,6587:0,6724:0,6753:0,6812:0,6834:0,6920:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7906:0,7927:0,8111:0,8115:0,8138:0,8180:0,8220:0,8334:0,8339:0,8371:0,8442:0,8510:0,8619:0,8654:0,8894:0,9189:0,9237:0,9613:0,9669:0,9773:0};P.O.j=e=>0===t[e];const e=(e,i)=>{let[o,s,r]=i;var a,n,l=0;if(o.some(e=>0!==t[e])){for(a in s)P.o(s,a)&&(P.m[a]=s[a]);if(r)var d=r(P)}for(e&&e(i);l<o.length;l++)n=o[l],P.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return P.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();let R=P.O(void 0,[7103,9609,4084,3305,4739,9488,2364,8441,2797,4700,3970,6343,7582,9336,9146,93,3842,7162,6325,4449,1392,2492,4047,1618,3331,3272,740,6631,9558,3543,878,7231,5846,742,4973,476,7262,8373,6816,3051,9431,6573,8663,861,5057,6005,8687,8881,1816,887,4839,5410,226,7137,9404,2297,7155,2670,513,9940,4242,1928,9956,2927,3013,9316,6429,7911,2991,9485,6843,3241],()=>P(371));return R=P.O(R),R})());
|
|
3119
|
+
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,$t.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===St.Uz.ArrowRight||t===St.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,$t.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==St.Uz.ArrowRight||this.expanded?t.key===St.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Tt}};kt([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),kt([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),kt([(0,y.property)({type:String})],e.prototype,"variant",void 0),kt([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),kt([(0,y.query)(".header")],e.prototype,"header",void 0),e=kt([(0,st.w)("md-list-item-v2")],e),t.ELEMENT=e}(At||(At={}));var It,Lt=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends v.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return v.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof At.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case St.Uz.ArrowDown:return(e+1)%i;case St.Uz.ArrowUp:return(e-1+i)%i;case St.Uz.Home:return 0;case St.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return Tt}};Lt([(0,y.property)({type:String})],e.prototype,"gap",void 0),Lt([(0,y.property)({type:String})],e.prototype,"orientation",void 0),Lt([(0,y.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=Lt([(0,st.w)("md-list-v2")],e),t.ELEMENT=e}(It||(It={}));var Ot=i(6131),Mt=i(8552),Dt=i(1161),Pt=i(7030),Rt=i(708),_t=i(4085),Bt=i(5410),zt=i(329),Ft=i(8751),Vt=i(5566),Nt=i(405),jt=i(3477),Ut=i(2708),qt=i(3949),Ht=i(8358);const Wt=v.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Kt,Gt=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends v.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,v.html`<slot></slot>`}static get styles(){return[Wt]}};Gt([(0,y.property)({type:String})],e.prototype,"width",void 0),Gt([(0,y.property)({type:String})],e.prototype,"height",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=Gt([(0,st.w)("md-skeleton")],e),t.ELEMENT=e}(Kt||(Kt={}));var Yt=i(3773),Xt=i(9773),Zt=i(7936),Qt=i(3273),Jt=i(120),te=i(6056),ee=i(8543),ie=i(1479),oe=i(1853),se=i(2218),re=i(6328),ae=i(7253),ne=i(3876)},3876(t,e,i){i.d(e,{ThemeManager:()=>s,registerThemeManagerGlobally:()=>a});var o=i(5314);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new s;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}i.d(e,["themeManager",0,r])},7704(t,e,i){i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),r=i(5201),a=i(4781),n=i(608),l=i(9609)},2050(t,e,i){function o(t,e,i){let o;return function(...s){const r=this,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(r,s)},e),a&&t.apply(r,s)}}function s(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function r(t,e){return e>=0&&e<t.length?t[e]:void 0}function a(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=a(t,e);if(i)return i}return null}function n(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=n(t,e);if(i)return i}return null}function l(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}i.d(e,{QZ:()=>s,Qx:()=>r,XI:()=>n,dw:()=>l,qi:()=>a,sg:()=>o}),i.d(e,["ws",0,(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),r=e.toLowerCase();let a=0,n=s.indexOf(r,a);for(;n>-1;)a=n+i,o.push([n,a]),n=s.indexOf(r,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let r=0;return o.forEach(([e,i])=>{r!==e&&s.push({range:[e,i],matching:!1,text:t.slice(r,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i}),r!==t.length&&s.push({range:[r],matching:!1,text:t.slice(r)}),s}])},7154(t,e,i){i.d(e,{o:()=>r,q:()=>a});var o=i(2900);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function r(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function a(t){return s.includes(t)}},5784(e){e.exports=t},8088(t){t.exports=e},7346(t){t.exports=i},9e3(t){t.exports=o},727(t){t.exports=s},3288(t){t.exports=r},3048(t){t.exports=a},2022(t){t.exports=n},554(t){t.exports=l},4893(t){t.exports=d},2962(t){t.exports=h},6538(t){t.exports=c},8250(t){t.exports=p},9371(t){t.exports=u},4863(t){t.exports=m},3060(t){t.exports=v},5875(t){t.exports=y},1347(t){t.exports=b},5001(t){t.exports=g},860(t){t.exports=f},7161(t){t.exports=w},429(t){t.exports=x},5125(t){t.exports=C},291(t){t.exports=E},8175(t){t.exports=S},318(t){t.exports=$},6968(t){t.exports=T},9756(t){t.exports=A},5796(t){t.exports=k},5314(t){t.exports=I},8187(t){t.exports=L},1891(t){t.exports=O}};const D={};function P(t){const e=D[t];if(void 0!==e)return e.exports;const i=D[t]={exports:{}};return M[t].call(i.exports,i,i.exports,P),i.exports}P.m=M,(()=>{const t=[];P.O=(e,i,o,s)=>{if(i){s=s||0;for(var r=t.length;r>0&&t[r-1][2]>s;r--)t[r]=t[r-1];return void(t[r]=[i,o,s])}let a=1/0;for(r=0;r<t.length;r++){let[i,o,s]=t[r],l=!0;for(var n=0;n<i.length;n++)(!1&s||a>=s)&&Object.keys(P.O).every(t=>P.O[t](i[n]))?i.splice(n--,1):(l=!1,s<a&&(a=s));if(l){t.splice(r--,1);const i=o();void 0!==i&&(e=i)}}return e}})(),P.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return P.d(e,{a:e}),e},P.d=(t,e)=>{if(Array.isArray(e))for(var i=0;i<e.length;){var o=e[i++],s=e[i++];P.o(t,o)?0===s&&i++:0===s?Object.defineProperty(t,o,{enumerable:!0,value:e[i++]}):Object.defineProperty(t,o,{enumerable:!0,get:s})}else for(var o in e)P.o(e,o)&&!P.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},P.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),P.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),P.r=t=>{Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{const t={378:0,445:0,502:0,519:0,555:0,561:0,708:0,762:0,801:0,953:0,1037:0,1266:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2169:0,2245:0,2273:0,2330:0,2369:0,2434:0,2708:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3413:0,3539:0,3639:0,3747:0,3876:0,3938:0,3943:0,4131:0,4139:0,4259:0,4431:0,4545:0,4908:0,4928:0,4958:0,4971:0,5156:0,5310:0,5323:0,5369:0,5517:0,5757:0,5983:0,6029:0,6060:0,6085:0,6132:0,6220:0,6433:0,6494:0,6587:0,6724:0,6753:0,6812:0,6834:0,6920:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7906:0,7927:0,8111:0,8115:0,8138:0,8180:0,8220:0,8334:0,8339:0,8371:0,8442:0,8510:0,8619:0,8654:0,8894:0,9189:0,9237:0,9613:0,9669:0,9773:0};P.O.j=e=>0===t[e];const e=(e,i)=>{let[o,s,r]=i;var a,n,l=0;if(o.some(e=>0!==t[e])){for(a in s)P.o(s,a)&&(P.m[a]=s[a]);if(r)var d=r(P)}for(e&&e(i);l<o.length;l++)n=o[l],P.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return P.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();let R=P.O(void 0,[7103,9609,4084,3305,4739,9488,2364,8441,2797,4700,3970,6343,7582,9336,9146,93,3842,7162,6325,4449,1392,2492,4047,1618,3331,3272,740,6631,9558,3543,878,7231,5846,742,4973,476,7262,8373,6816,3051,9431,6573,8663,861,5057,6005,8687,8881,1816,887,4839,5410,226,7137,9404,2297,7155,2670,513,9940,4242,1928,9956,2927,3013,9316,6429,7911,2991,9485,6843,3241],()=>P(371));return R=P.O(R),R})());
|