@momentum-ui/web-components 3.2.14 → 3.2.16

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.
Files changed (35) hide show
  1. package/dist/2273.js +2 -2
  2. package/dist/7137.js +1 -1
  3. package/dist/9189.js +5 -4
  4. package/dist/comp/md-card-alert-entry.js +30 -34
  5. package/dist/comp/md-combobox-entry.js +2 -2
  6. package/dist/comp/md-input-entry.js +5 -4
  7. package/dist/comp/md-table-advanced-entry.js +10 -10
  8. package/dist/esm/2273.js +2 -2
  9. package/dist/esm/4654.js +2 -2
  10. package/dist/esm/7137.js +1 -1
  11. package/dist/esm/9189.js +5 -4
  12. package/dist/esm/comp/md-card-alert-entry.js +26 -30
  13. package/dist/esm/comp/md-input-entry.js +5 -4
  14. package/dist/esm/comp/md-table-advanced-entry.js +1 -1
  15. package/dist/esm/index-entry.js +32 -35
  16. package/dist/esm/index.js +1 -1
  17. package/dist/index-entry.js +147 -150
  18. package/dist/index.js +1 -1
  19. package/dist/types/[sandbox]/examples/card-alert.d.ts +0 -1
  20. package/dist/types/[sandbox]/examples/editable-field.d.ts +1 -1
  21. package/dist/types/components/avatar/Avatar.d.ts +3 -3
  22. package/dist/types/components/badge/Badge.d.ts +1 -1
  23. package/dist/types/components/button/Button.d.ts +2 -2
  24. package/dist/types/components/card-alert/CardAlert.d.ts +8 -3
  25. package/dist/types/components/card-alert/CardAlert.stories.d.ts +1 -5
  26. package/dist/types/components/chip/Chip.d.ts +3 -3
  27. package/dist/types/components/combobox/ComboBox.d.ts +4 -4
  28. package/dist/types/components/dropdown/Dropdown.d.ts +2 -2
  29. package/dist/types/components/editable-textfield/EditableTextfield.d.ts +1 -1
  30. package/dist/types/components/input/Input.d.ts +10 -6
  31. package/dist/types/components/radio/Radio.d.ts +1 -1
  32. package/dist/types/components/table-advanced/TableAdvanced.d.ts +1 -0
  33. package/dist/types/components/taskitem/TaskItem.utils.d.ts +1 -1
  34. package/dist/types/internal-components/color-table/ColorTable.d.ts +1 -1
  35. package/package.json +1 -1
package/dist/2273.js CHANGED
@@ -113,7 +113,7 @@
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():a.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:a.nothing:this.renderWithoutVirtualScroll()}
package/dist/7137.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7137],{7137(e,r,t){t.d(r,{A:()=>a});const a=t(7161).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-live{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;gap:.25rem;flex-shrink:0}:host(md-card-alert) .md-card-alert-live-icon{color:var(--md-presence-active,#16a34a);animation:live-pulse 2s ease-in-out infinite}@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:.3}}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem}:host(md-card-alert) .md-card-alert-title{color:var(--md-primary-text-color);font-size:1rem;font-weight:700;margin:0;line-height:1.5rem}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}}]);
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[7137],{7137(e,t,r){r.d(t,{A:()=>a});const a=r(7161).css`:host(md-card-alert){display:block}:host(md-card-alert) .md-card-alert{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-secondary-bg-color);border:1px solid var(--md-quaternary-bg-color);border-radius:.75rem;box-sizing:border-box;box-shadow:0 2px 8px rgba(0,0,0,.1);gap:.75rem;padding:.75rem;width:22.9375rem}:host(md-card-alert) .md-card-alert--no-insight{height:329px;max-height:329px;min-height:329px}:host(md-card-alert) .md-card-alert:focus{outline:0}:host(md-card-alert) .md-card-alert-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;flex-wrap:nowrap}:host(md-card-alert) .md-card-alert-chips{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.375rem}:host(md-card-alert) .md-card-alert-timestamp{color:var(--md-secondary-text-color);font-size:.875rem;font-weight:400;flex-shrink:0}:host(md-card-alert) .md-card-alert-title-section{align-content:center;align-items:flex-start;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:.125rem;min-width:0;width:100%}:host(md-card-alert) .md-card-alert-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;color:var(--md-primary-text-color);display:-webkit-box;font-size:1rem;font-weight:700;height:3rem;line-height:1.5rem;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}:host(md-card-alert) .md-card-alert-subtitle{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;color:var(--md-secondary-text-color);font-size:.875rem;gap:.25rem;margin:0}:host(md-card-alert) .md-card-alert-subtitle-icon{flex-shrink:0;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-details{align-content:center;align-items:stretch;display:flex;flex-flow:column nowrap;justify-content:flex-start;background:var(--md-background-tertiary,#f3f4f6);border-radius:.5rem;gap:.1875rem;padding:.75rem}:host(md-card-alert) .md-card-alert-details-heading{color:var(--md-secondary-text-color);font-size:.875rem;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-row{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between}:host(md-card-alert) .md-card-alert-detail-label{color:var(--md-primary-text-color);font-size:.875rem;font-weight:700;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value{color:var(--md-primary-text-color);font-size:.875rem;text-align:right;margin-bottom:.125rem}:host(md-card-alert) .md-card-alert-detail-value--highlighted{color:var(--md-alert-error-text-color,#dc2626)}:host(md-card-alert) .md-card-alert-insight{align-content:center;align-items:flex-start;display:flex;flex-flow:row nowrap;justify-content:flex-start;background:var(--card-ai-blue-bg-color,#eff6ff);border-radius:.5rem;border:1px solid var(--badge-confidence-cobalt-border-color,#dbeafe);color:var(--md-primary-text-color);gap:.5rem;padding:.625rem .75rem}:host(md-card-alert) .md-card-alert-insight-icon{color:var(--badge-status-accent-text-color,#0284c7);flex-shrink:0;margin-top:.0625rem;--md-icon-size:1rem}:host(md-card-alert) .md-card-alert-insight-text{font-size:.875rem;line-height:1.25rem}:host(md-card-alert) .md-card-alert-actions{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-start;gap:.5rem}`}}]);
package/dist/9189.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9189],{9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,a=i(2900),o=i(9609),n=i(3203),r=i(4084),l=(i(2022),i(7161)),p=i(429),d=i(5125),h=i(291),u=i(8175),m=i(318),c=i(9336),y=function(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.ariaRole=void 0,this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==a.Uz.Space&&t!==a.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
1
+ "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[9189],{9189(e,t,i){i(7906),i(1821),i(2369),i(9773);var s,o=i(2900),a=i(9609),n=i(3203),r=i(4084),l=(i(2022),i(7161)),p=i(429),d=i(5125),h=i(291),u=i(8175),m=i(318),c=i(9336),y=function(e,t,i,s){var o,a=arguments.length,n=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(a<3?o(n):a>3?o(t,i,n):o(t,i))||n);return a>3&&n&&Object.defineProperty(t,i,n),n};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.y)(l.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.ariaRole=void 0,this.ariaAutocomplete=void 0,this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==o.Uz.Space&&t!==o.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:this.showDropdown?`${this.dropdownExpanded}`:void 0}get effectiveAriaAutocomplete(){return this.ariaAutocomplete||(this.showDropdown?"both":void 0)}get effectiveAriaRole(){return this.ariaRole||(this.showDropdown?"combobox":void 0)}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?l.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,d.classMap)(this.inputTemplateClassMap)}"
@@ -37,14 +37,15 @@
37
37
  type=${this.type}
38
38
  .value=${this.value}
39
39
  aria-describedby=${this.ariaDescribedBy}
40
- aria-controls=${this.ariaControls}
40
+ aria-controls=${(0,h.ifDefined)(this.ariaControls||void 0)}
41
+ aria-autocomplete=${(0,h.ifDefined)(this.effectiveAriaAutocomplete)}
41
42
  aria-expanded=${(0,h.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
42
43
  aria-label=${(0,h.ifDefined)(this.effectiveAriaLabel)}
43
44
  aria-invalid=${this.ariaInvalid}
44
45
  aria-errormessage=${`${this.htmlId}-message`}
45
46
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
46
47
  id=${this.htmlId}
47
- role=${(0,h.ifDefined)(this.ariaRole)}
48
+ role=${(0,h.ifDefined)(this.effectiveAriaRole)}
48
49
  placeholder=${this.placeholder}
49
50
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
50
51
  min=${(0,h.ifDefined)(this.min)}
@@ -154,4 +155,4 @@
154
155
  ${this.characterCountLabelTemplate()}
155
156
  </div>
156
157
  </div>
157
- `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
158
+ `}};y([(0,p.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,p.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,p.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,p.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,p.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,p.property)({type:String})],i.prototype,"id",void 0),y([(0,p.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,p.property)({type:String})],i.prototype,"label",void 0),y([(0,p.property)({type:String})],i.prototype,"helpText",void 0),y([(0,p.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,p.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaAutocomplete",void 0),y([(0,p.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,p.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,p.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,p.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,p.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,p.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,p.property)({type:String})],i.prototype,"shape",void 0),y([(0,p.property)({type:String})],i.prototype,"type",void 0),y([(0,p.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,p.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,p.property)({type:Object})],i.prototype,"control",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,p.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,p.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,p.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,p.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,p.query)(".md-input")],i.prototype,"input",void 0),y([(0,p.state)()],i.prototype,"isEditing",void 0),y([(0,p.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,p.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(s||(s={}))}}]);
@@ -1,16 +1,8 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,r,s,n,l)=>(()=>{"use strict";var a,d={4882(t,e,i){i.r(e),i.d(e,{CardAlert:()=>c}),i(5983),i(2583),i(1821);var o=i(9609),r=i(4084),s=i(7161),n=i(429),l=i(5125),a=i(7137),d=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const p={critical:{icon:"flag-filled",color:"negative"},warning:{icon:"warning-filled",color:"warning"}},h={live:"Live",dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var c;!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.timestamp="",this.live=!1,this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!0,this.expanded=!1,this.relativeTime=""}static get styles(){return[r.A,a.A]}get severityIcon(){var t,e;return null!==(e=null===(t=p[this.severity.toLowerCase()])||void 0===t?void 0:t.icon)&&void 0!==e?e:"info-circle-filled"}get severityColor(){var t,e;return null!==(e=null===(t=p[this.severity.toLowerCase()])||void 0===t?void 0:t.color)&&void 0!==e?e:"neutral"}updateRelativeTime(){this.timestamp&&!this.live&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&!this.live&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){(t.has("timestamp")||t.has("live"))&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.constructor.locale,i=Date.now(),o="number"==typeof t?t:new Date(t).getTime();if(isNaN(o))return"";const r=i-o;if(r<0)return e.justNow;const s=Math.floor(r/6e4);if(s<1)return e.justNow;if(s<60)return e.minutesAgo(s);const n=Math.floor(s/60);if(n<24)return e.hoursAgo(n);const l=Math.floor(n/24);return e.daysAgo(l)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){const t=this.constructor.locale;return this.live?s.html`<span class="md-card-alert-live"
2
- ><md-icon
3
- name="active-presence-small-filled"
4
- size="10"
5
- iconSet="momentumDesign"
6
- class="md-card-alert-live-icon"
7
- ></md-icon
8
- >${t.live}</span
9
- >`:this.relativeTime?s.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:s.nothing}renderHeader(){return this.severity||this.category||this.timestamp||this.live?s.html`
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx);for(var r in i)("object"==typeof exports?exports:t)[r]=i[r]}}(self,(t,e,i,r,o,s,n,a)=>(()=>{"use strict";var l,d={4882(t,e,i){i.r(e),i.d(e,{CardAlert:()=>m,CardAlertSeverity:()=>r}),i(5983),i(2583),i(1821);var r,o=i(9609),s=i(4084),n=i(7161),a=i(429),l=i(5125),d=i(7137),p=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.CRITICAL="critical",t.MEDIUM="medium"}(r||(r={}));const h={[r.CRITICAL]:{icon:"flag-filled",color:"negative"},[r.MEDIUM]:{icon:"warning-filled",color:"warning"}},c={dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var m;!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.timestamp="",this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!1,this.expanded=!1,this.relativeTime=""}static get styles(){return[s.A,d.A]}get normalizedSeverity(){var t;const e=(null!==(t=this.severity)&&void 0!==t?t:"").toLowerCase();return Object.values(r).includes(e)?e:void 0}get severityIcon(){return this.normalizedSeverity?h[this.normalizedSeverity].icon:"info-circle-filled"}get severityColor(){return this.normalizedSeverity?h[this.normalizedSeverity].color:"neutral"}get hasInsight(){var t;return(null!==(t=this.insight)&&void 0!==t?t:"").trim().length>0}get detailRows(){return Array.isArray(this.details)?this.details:[]}updateRelativeTime(){this.timestamp&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){t.has("timestamp")&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.constructor.locale,i=Date.now(),r="number"==typeof t?t:new Date(t).getTime();if(isNaN(r))return"";const o=i-r;if(o<0)return e.justNow;const s=Math.floor(o/6e4);if(s<1)return e.justNow;if(s<60)return e.minutesAgo(s);const n=Math.floor(s/60);if(n<24)return e.hoursAgo(n);const a=Math.floor(n/24);return e.daysAgo(a)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){return this.relativeTime?n.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:n.nothing}renderHeader(){return this.severity||this.category||this.timestamp?n.html`
10
2
  <div class="md-card-alert-header">
11
3
  <div class="md-card-alert-chips">
12
- ${this.severity?s.html`
13
- <md-chip value=${this.severity} color=${this.severityColor} small>
4
+ ${this.severity?n.html`
5
+ <md-chip color=${this.severityColor} small>
14
6
  <md-icon
15
7
  name=${this.severityIcon}
16
8
  size="14"
@@ -18,15 +10,15 @@
18
10
  slot="custom-left-content"
19
11
  ></md-icon>
20
12
  </md-chip>
21
- `:s.nothing}
22
- ${this.category?s.html`<md-chip value=${this.category} color="neutral" small></md-chip>`:s.nothing}
13
+ `:n.nothing}
14
+ ${this.category?n.html`<md-chip value=${this.category} color="neutral" small></md-chip>`:n.nothing}
23
15
  </div>
24
16
  ${this.renderTimestamp()}
25
17
  </div>
26
- `:s.nothing}renderTitleSection(){return this.title||this.queueName?s.html`
18
+ `:n.nothing}renderTitleSection(){return this.title||this.queueName?n.html`
27
19
  <div class="md-card-alert-title-section">
28
- ${this.title?s.html`<h3 class="md-card-alert-title">${this.title}</h3>`:s.nothing}
29
- ${this.queueName?s.html`
20
+ ${this.title?n.html`<h3 class="md-card-alert-title">${this.title}</h3>`:n.nothing}
21
+ ${this.queueName?n.html`
30
22
  <p class="md-card-alert-subtitle">
31
23
  <md-icon
32
24
  name="queue-contact-bold"
@@ -36,12 +28,12 @@
36
28
  ></md-icon>
37
29
  ${this.queueName}
38
30
  </p>
39
- `:s.nothing}
31
+ `:n.nothing}
40
32
  </div>
41
- `:s.nothing}renderDetails(){return this.details&&0!==this.details.length?s.html`
33
+ `:n.nothing}renderDetails(){return 0===this.detailRows.length?n.nothing:n.html`
42
34
  <div class="md-card-alert-details">
43
35
  <span class="md-card-alert-details-heading">${this.detailsHeading}</span>
44
- ${this.details.map(t=>s.html`
36
+ ${this.detailRows.map(t=>n.html`
45
37
  <div class="md-card-alert-detail-row">
46
38
  <span class="md-card-alert-detail-label">${t.label}</span>
47
39
  <span
@@ -51,12 +43,12 @@
51
43
  </div>
52
44
  `)}
53
45
  </div>
54
- `:s.nothing}renderInsight(){return this.insight?s.html`
46
+ `}renderInsight(){return this.hasInsight?n.html`
55
47
  <div class="md-card-alert-insight">
56
48
  <md-icon name="sparkle-filled" iconSet="momentumDesign" class="md-card-alert-insight-icon"></md-icon>
57
49
  <span class="md-card-alert-insight-text">${this.insight}</span>
58
50
  </div>
59
- `:s.nothing}renderActions(){return s.html`
51
+ `:n.nothing}renderActions(){return n.html`
60
52
  <div class="md-card-alert-actions">
61
53
  <md-button
62
54
  size="32"
@@ -66,13 +58,13 @@
66
58
  @click=${this.handlePrimaryAction}
67
59
  >
68
60
  <span slot="text">${this.primaryActionLabel}</span>
69
- ${this.primaryActionDropdown?s.html`<md-icon
61
+ ${this.primaryActionDropdown?n.html`<md-icon
70
62
  name=${this.expanded?"arrow-up-bold":"arrow-down-bold"}
71
63
  size="12"
72
64
  iconSet="momentumDesign"
73
- ></md-icon>`:s.nothing}
65
+ ></md-icon>`:n.nothing}
74
66
  </md-button>
75
- ${this.showDismiss?s.html`
67
+ ${this.showDismiss?n.html`
76
68
  <md-button
77
69
  size="32"
78
70
  variant="secondary"
@@ -83,14 +75,18 @@
83
75
  >
84
76
  <span slot="text">${this.constructor.locale.dismiss}</span>
85
77
  </md-button>
86
- `:s.nothing}
78
+ `:n.nothing}
87
79
  </div>
88
- `}render(){return s.html`
89
- <div class="md-card-alert" part="card" tabindex="0">
80
+ `}render(){return n.html`
81
+ <div
82
+ class=${(0,l.classMap)({"md-card-alert":!0,"md-card-alert--no-insight":!this.hasInsight})}
83
+ part="card"
84
+ tabindex="0"
85
+ >
90
86
  ${this.renderHeader()} ${this.renderTitleSection()} ${this.renderDetails()} ${this.renderInsight()}
91
87
  ${this.renderActions()}
92
88
  </div>
93
- `}};e.locale=Object.assign({},h),d([(0,n.property)({type:String})],e.prototype,"severity",void 0),d([(0,n.property)({type:String})],e.prototype,"category",void 0),d([(0,n.property)({type:String})],e.prototype,"timestamp",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"live",void 0),d([(0,n.property)({type:String})],e.prototype,"title",void 0),d([(0,n.property)({type:String})],e.prototype,"queueName",void 0),d([(0,n.property)({type:Array})],e.prototype,"details",void 0),d([(0,n.property)({type:String})],e.prototype,"insight",void 0),d([(0,n.property)({type:String})],e.prototype,"primaryActionLabel",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),d([(0,n.property)({type:String})],e.prototype,"detailsHeading",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"showDismiss",void 0),d([(0,n.property)({type:Boolean})],e.prototype,"expanded",void 0),d([(0,n.state)()],e.prototype,"relativeTime",void 0),e=d([(0,o.w)("md-card-alert")],e),t.ELEMENT=e}(c||(c={}))},2583(t,e,i){i(2708),i(9613);var o,r=i(2900),s=i(9609),n=i(4084),l=i(7161),a=i(429),d=i(5125),p=i(291),h=i(9558),c=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.shouldTruncateValue=!0,this.value="",this.textOverflow=!1,this.renderedText="",this.MAXWIDTH=115,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:l.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:l.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:l.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?l.html`
89
+ `}};e.locale=Object.assign({},c),p([(0,a.property)({type:String})],e.prototype,"severity",void 0),p([(0,a.property)({type:String})],e.prototype,"category",void 0),p([(0,a.property)({type:String})],e.prototype,"timestamp",void 0),p([(0,a.property)({type:String})],e.prototype,"title",void 0),p([(0,a.property)({type:String})],e.prototype,"queueName",void 0),p([(0,a.property)({type:Array})],e.prototype,"details",void 0),p([(0,a.property)({type:String})],e.prototype,"insight",void 0),p([(0,a.property)({type:String})],e.prototype,"primaryActionLabel",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),p([(0,a.property)({type:String})],e.prototype,"detailsHeading",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"showDismiss",void 0),p([(0,a.property)({type:Boolean})],e.prototype,"expanded",void 0),p([(0,a.state)()],e.prototype,"relativeTime",void 0),e=p([(0,o.w)("md-card-alert")],e),t.ELEMENT=e}(m||(m={}))},2583(t,e,i){i(2708),i(9613);var r,o=i(2900),s=i(9609),n=i(4084),a=i(7161),l=i(429),d=i(5125),p=i(291),h=i(9558),c=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.color="",this.bgColor="",this.textColor="",this.height="",this.icon="",this.iconColor="",this.iconSize="",this.role="group",this.id="",this.small=!1,this.readonly=!1,this.selected=!1,this.disabled=!1,this.determinateProgress=0,this.indeterminateProgress=!1,this.tooltipText="",this.tooltipPlacement="auto",this.iconSet="momentumUI",this.suppressDefaultMaxWidth=!1,this.decorative=!1,this.shouldTruncateValue=!0,this.value="",this.textOverflow=!1,this.renderedText="",this.MAXWIDTH=115,this.selectionChange=t=>{this.dispatchEvent(new CustomEvent("chip-selected",{composed:!0,bubbles:!0,detail:{selected:t}}))},this.handleClear=t=>{this.dispatchEvent(new CustomEvent("chip-deleted",{composed:!0,bubbles:!0,detail:{id:t}}))},this.handleSelect=()=>{this.disabled||(this.selected=!0,this.selectionChange(!0))},this.handleDeSelect=()=>{this.selected=!1,this.selectionChange(!1)},this.renderBgColor=()=>this.bgColor?`background-color: ${this.bgColor};`:a.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:a.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:a.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?a.html`
94
90
  <style>
95
91
  :host .md-chip {
96
92
  ${this.renderBgColor()};
@@ -98,7 +94,7 @@
98
94
  ${this.renderHeight()};
99
95
  }
100
96
  </style>
101
- `:l.nothing}connectedCallback(){super.connectedCallback(),this.truncStringPortion(this.value),this.setAttribute("role",this.role)}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("shouldTruncateValue"))&&this.truncStringPortion(this.value)}getTextWidth(t,e){const i=null!=e?e:getComputedStyle(this).font,o=document.createElement("canvas").getContext("2d");return o?(o.font=i,o.measureText(t).width):0}truncStringPortion(t){const e=this.getTextWidth(t);if(!this.shouldTruncateValue||e<this.MAXWIDTH)return this.renderedText=t,void(this.textOverflow=!1);const i=Array.from(t);let o=Math.min(4,i.length),r=Math.min(5,Math.max(0,i.length-o-1)),s=i.slice(0,o).join(""),n=i.slice(-r).join(""),l=`${s}…${n}`;if(this.getTextWidth(l)>this.MAXWIDTH)return this.renderedText=l,void(this.textOverflow=!0);for(;o+r<i.length;){let t=!1;if(o+r<i.length){const e=s+i[o],r=`${e}…${n}`;this.getTextWidth(r)<=this.MAXWIDTH&&(s=e,o+=1,l=r,t=!0)}if(o+r<i.length){const e=i[i.length-r-1]+n,o=`${s}…${e}`;this.getTextWidth(o)<=this.MAXWIDTH&&(n=e,r+=1,l=o,t=!0)}if(!t)break}this.renderedText=l,this.textOverflow=!0}handleClick(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("md-tooltip");null==e||e.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:null==e?void 0:e.placement,reference:null==e?void 0:e.reference,popper:null==e?void 0:e.popper}})),this.dispatchEvent(new CustomEvent("chip-interaction",{composed:!0,bubbles:!0,detail:{id:this.id}}))}handleKeydown(t){switch(t.code){case r.Uz.Space:case r.Uz.Enter:this.handleSelect(),this.handleClick()}}static get styles(){return[n.A,h.A]}loadingTemplate(){return this.determinateProgress||this.indeterminateProgress?this.determinateProgress?l.html`
97
+ `:a.nothing}connectedCallback(){super.connectedCallback(),this.truncStringPortion(this.value),this.setAttribute("role",this.role)}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("shouldTruncateValue"))&&this.truncStringPortion(this.value)}getTextWidth(t,e){const i=null!=e?e:getComputedStyle(this).font,r=document.createElement("canvas").getContext("2d");return r?(r.font=i,r.measureText(t).width):0}truncStringPortion(t){const e=this.getTextWidth(t);if(!this.shouldTruncateValue||e<this.MAXWIDTH)return this.renderedText=t,void(this.textOverflow=!1);const i=Array.from(t);let r=Math.min(4,i.length),o=Math.min(5,Math.max(0,i.length-r-1)),s=i.slice(0,r).join(""),n=i.slice(-o).join(""),a=`${s}…${n}`;if(this.getTextWidth(a)>this.MAXWIDTH)return this.renderedText=a,void(this.textOverflow=!0);for(;r+o<i.length;){let t=!1;if(r+o<i.length){const e=s+i[r],o=`${e}…${n}`;this.getTextWidth(o)<=this.MAXWIDTH&&(s=e,r+=1,a=o,t=!0)}if(r+o<i.length){const e=i[i.length-o-1]+n,r=`${s}…${e}`;this.getTextWidth(r)<=this.MAXWIDTH&&(n=e,o+=1,a=r,t=!0)}if(!t)break}this.renderedText=a,this.textOverflow=!0}handleClick(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("md-tooltip");null==e||e.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:null==e?void 0:e.placement,reference:null==e?void 0:e.reference,popper:null==e?void 0:e.popper}})),this.dispatchEvent(new CustomEvent("chip-interaction",{composed:!0,bubbles:!0,detail:{id:this.id}}))}handleKeydown(t){switch(t.code){case o.Uz.Space:case o.Uz.Enter:this.handleSelect(),this.handleClick()}}static get styles(){return[n.A,h.A]}loadingTemplate(){return this.determinateProgress||this.indeterminateProgress?this.determinateProgress?a.html`
102
98
  <md-progress-bar
103
99
  class="md-chip--loading"
104
100
  type="determinate"
@@ -106,9 +102,9 @@
106
102
  displayFormat="none"
107
103
  >
108
104
  </md-progress-bar>
109
- `:l.html`
105
+ `:a.html`
110
106
  <md-progress-bar class="md-chip--loading" type="indeterminate" displayFormat="none"></md-progress-bar>
111
- `:l.nothing}iconTemplate(){const t=this.disabled?"":this.iconColor;return this.icon?l.html`
107
+ `:a.nothing}iconTemplate(){const t=this.disabled?"":this.iconColor;return this.icon?a.html`
112
108
  <md-icon
113
109
  class="md-chip--icon"
114
110
  part="chip-icon"
@@ -118,7 +114,7 @@
118
114
  size="${(0,p.ifDefined)(this.iconSize)}"
119
115
  >
120
116
  </md-icon>
121
- `:l.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return l.html`<span part="text-content" class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth,"md-chip--interactive":!this.decorative},e=this.decorative?void 0:this.selected?"true":"false";return l.html`
117
+ `:a.nothing}getToolTipContent(){return this.tooltipText&&this.textOverflow?this.value===this.tooltipText?this.tooltipText:`${this.value}, ${this.tooltipText}`:this.tooltipText?this.tooltipText:this.value}get textContentClassMap(){return{"md-chip--textcontent":!0,"md-chip--suppress-default-max-width":this.suppressDefaultMaxWidth}}get textContentTemplate(){return a.html`<span part="text-content" class=${(0,d.classMap)(this.textContentClassMap)}> ${this.renderedText}</span>`}render(){const t={"md-chip--small":this.small,"md-chip--disabled":this.disabled,[`md-chip--${this.color}`]:this.color,"suppress-max-width":this.suppressDefaultMaxWidth,"md-chip--interactive":!this.decorative},e=this.decorative?void 0:this.selected?"true":"false";return a.html`
122
118
  ${this.getStyles()}
123
119
  <md-tooltip
124
120
  ?disabled=${!this.tooltipText&&!this.textOverflow}
@@ -137,8 +133,8 @@
137
133
  >
138
134
  ${this.loadingTemplate()} ${this.iconTemplate()}
139
135
  <slot name="custom-left-content" part="chip-left"> </slot>
140
- ${this.renderedText?this.textContentTemplate:l.nothing}
136
+ ${this.renderedText?this.textContentTemplate:a.nothing}
141
137
  <slot name="custom-right-content" part="chip-right"> </slot>
142
138
  </span>
143
139
  </md-tooltip>
144
- `}};c([(0,a.property)({type:String})],e.prototype,"color",void 0),c([(0,a.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,a.property)({type:String})],e.prototype,"textColor",void 0),c([(0,a.property)({type:String})],e.prototype,"height",void 0),c([(0,a.property)({type:String})],e.prototype,"icon",void 0),c([(0,a.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,a.property)({type:String})],e.prototype,"role",void 0),c([(0,a.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,a.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,a.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,a.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,a.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,a.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),c([(0,a.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,a.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,a.state)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},2022(t){t.exports=s},554(t){t.exports=n},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=r},318(t){t.exports=o},5314(t){t.exports=l}},p={};function h(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return d[t](i,i.exports,h),i.exports}h.m=d,a=[],h.O=(t,e,i,o)=>{if(!e){var r=1/0;for(d=0;d<a.length;d++){for(var[e,i,o]=a[d],s=!0,n=0;n<e.length;n++)(!1&o||r>=o)&&Object.keys(h.O).every(t=>h.O[t](e[n]))?e.splice(n--,1):(s=!1,o<r&&(r=o));if(s){a.splice(d--,1);var l=i();void 0!==l&&(t=l)}}return t}o=o||0;for(var d=a.length;d>0&&a[d-1][2]>o;d--)a[d]=a[d-1];a[d]=[e,i,o]},h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8619:0,8894:0};h.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[s,n,l]=i,a=0;if(s.some(e=>0!==t[e])){for(o in n)h.o(n,o)&&(h.m[o]=n[o]);if(l)var d=l(h)}for(e&&e(i);a<s.length;a++)r=s[a],h.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return h.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))})();var c=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,8227,2900,2050,6343,7582,9613,5323,6631,9558,2708,7137],()=>h(4882));return h.O(c)})());
140
+ `}};c([(0,l.property)({type:String})],e.prototype,"color",void 0),c([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),c([(0,l.property)({type:String})],e.prototype,"textColor",void 0),c([(0,l.property)({type:String})],e.prototype,"height",void 0),c([(0,l.property)({type:String})],e.prototype,"icon",void 0),c([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),c([(0,l.property)({type:String})],e.prototype,"role",void 0),c([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),c([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),c([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),c([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),c([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),c([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),c([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),c([(0,l.state)()],e.prototype,"renderedText",void 0),e=c([(0,s.w)("md-chip")],e),t.ELEMENT=e}(r||(r={}))},2022(t){t.exports=s},554(t){t.exports=n},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},318(t){t.exports=r},5314(t){t.exports=a}},p={};function h(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return d[t](i,i.exports,h),i.exports}h.m=d,l=[],h.O=(t,e,i,r)=>{if(!e){var o=1/0;for(d=0;d<l.length;d++){for(var[e,i,r]=l[d],s=!0,n=0;n<e.length;n++)(!1&r||o>=r)&&Object.keys(h.O).every(t=>h.O[t](e[n]))?e.splice(n--,1):(s=!1,r<o&&(o=r));if(s){l.splice(d--,1);var a=i();void 0!==a&&(t=a)}}return t}r=r||0;for(var d=l.length;d>0&&l[d-1][2]>r;d--)l[d]=l[d-1];l[d]=[e,i,r]},h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),h.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={8619:0,8894:0};h.O.j=e=>0===t[e];var e=(e,i)=>{var r,o,[s,n,a]=i,l=0;if(s.some(e=>0!==t[e])){for(r in n)h.o(n,r)&&(h.m[r]=n[r]);if(a)var d=a(h)}for(e&&e(i);l<s.length;l++)o=s[l],h.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return h.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))})();var c=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,8227,2900,2050,6343,7582,9613,5323,6631,9558,2708,7137],()=>h(4882));return h.O(c)})());
@@ -113,7 +113,7 @@
113
113
  class="md-combobox-option"
114
114
  aria-posinset=${i}
115
115
  aria-setsize=${s}
116
- role=${this.isMulti?"checkbox":"listitem"}
116
+ role=${this.isMulti?"checkbox":"option"}
117
117
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
118
118
  tabindex="-1"
119
119
  @click=${t=>this.handleListClick(t)}
@@ -198,7 +198,7 @@
198
198
  part="combobox-options"
199
199
  aria-label=${this.ariaLabel||this.label}
200
200
  style=${this.addStyle()}
201
- role=${(0,p.ifDefined)(this.checkForVirtualScroll()?void 0:"list")}
201
+ role=${(0,p.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
202
202
  >
203
203
  ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():h.nothing}
204
204
  ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:h.nothing:this.renderWithoutVirtualScroll()}
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,a,o,r,l,n)=>(()=>{"use strict";var d,p={9189(e,t,i){i.r(t),i.d(t,{Input:()=>S,ariaInvalidType:()=>C,containerSize:()=>v,iconNames:()=>$,iconPosition:()=>x,inputShape:()=>f,inputSize:()=>g,inputType:()=>b,nestedLevel:()=>w}),i(7906),i(1821),i(2369),i(9773);var s=i(2900),a=i(9609),o=i(3203),r=i(4084),l=i(2022),n=i(7161),d=i(429),p=i(5125),h=i(291),m=i(8175),u=i(318),c=i(9336),y=function(e,t,i,s){var a,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(o<3?a(r):o>3?a(t,i,r):a(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const v=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],g=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],b=["text","number","password","email","tel","checkbox"],f=["none","pill"],$=l,x=["before","after"],w=[0,1,2,3],C=["grammar","false","spelling","true"];var S;!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,o.y)(n.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.ariaRole=void 0,this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==s.Uz.Space&&t!==s.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:void 0}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?n.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,a,r,l,n)=>(()=>{"use strict";var d,p={9189(e,t,i){i.r(t),i.d(t,{Input:()=>S,ariaInvalidType:()=>C,containerSize:()=>v,iconNames:()=>$,iconPosition:()=>x,inputShape:()=>f,inputSize:()=>g,inputType:()=>b,nestedLevel:()=>w}),i(7906),i(1821),i(2369),i(9773);var s=i(2900),o=i(9609),a=i(3203),r=i(4084),l=i(2022),n=i(7161),d=i(429),p=i(5125),h=i(291),m=i(8175),u=i(318),c=i(9336),y=function(e,t,i,s){var o,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};const v=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],g=["small-1","small-2","small-3","small-4","small-5","small-6","small-7","small-8","small-9","small-10","small-11","small-12","medium-1","medium-2","medium-3","medium-4","medium-5","medium-6","medium-7","medium-8","medium-9","medium-10","medium-11","medium-12","large-1","large-2","large-3","large-4","large-5","large-6","large-7","large-8","large-9","large-10","large-11","large-12"],b=["text","number","password","email","tel","checkbox"],f=["none","pill"],$=l,x=["before","after"],w=[0,1,2,3],C=["grammar","false","spelling","true"];var S;!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,a.y)(n.LitElement)){constructor(){super(...arguments),this.ariaDescribedBy="",this.ariaInvalid="false",this.ariaLabel="",this.autofocus=!1,this.auxiliaryContentPosition=null,this.clear=!1,this.clearAriaLabel="",this.compact=!1,this.containerSize="small-12",this.disabled=!1,this.id="",this.inputSize="",this.isFilled=!1,this.isLoading=!1,this.label="",this.helpText="",this.hideMessage=!1,this.htmlId="",this.ariaRole=void 0,this.ariaAutocomplete=void 0,this.messageArr=[],this.min=void 0,this.max=void 0,this.maxLength=void 0,this.multi=!1,this.multiline=!1,this.name="",this.nestedLevel=0,this.placeholder="",this.readOnly=!1,this.required=!1,this.searchable=!1,this.secondaryLabel="",this.selectWhenInFocus=!1,this.shape="",this.type="text",this.value="",this.ariaControls="",this.ariaExpanded="",this.newMomentum=!1,this.disableUserTextInput=!1,this.autocomplete=void 0,this.showDropdown=!1,this.dropdownExpanded=!1,this.dropdownAriaLabel="Show options",this.maxSuggestedLength=void 0,this.isEditing=!1,this.hasRightSlotContent=!1,this.messageController=new t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var e;null===(e=this.input)||void 0===e||e.select()}focus(){var e;null===(e=this.input)||void 0===e||e.focus()}handleOutsideClick(e){let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||(this.input.blur(),this.isEditing=!1))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleFocus(e){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleMouseDown(e){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:e}})))}handleChange(e){var t;this.value=e.target.value,null===(t=this.control)||void 0===t||t.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:e,value:this.value}}))}handleBlur(e){var t;null===(t=this.control)||void 0===t||t.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:e}}))}handleClear(e){if("keydown"===e.type){const{code:t}=e;if(t!==s.Uz.Space&&t!==s.Uz.Enter)return;e.preventDefault(),e.stopPropagation()}else"click"===e.type&&(e.preventDefault(),e.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:e}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(e)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var e;this.hasRightSlotContent=(null===(e=this.inputSectionRightSlot)||void 0===e?void 0:e.assignedNodes().length)>0}handleDropdownClick(e){e.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:e,expanded:this.dropdownExpanded}}))}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}get inputClassMap(){return{"md-input--filled":this.isFilled,colums:!!this.containerSize,[`${this.containerSize}`]:!!this.containerSize,"md-read-only":this.readOnly,"md-disabled":this.disabled,[`md-${this.messageType}`]:!!this.messageType,[`md-input--nested-${this.nestedLevel}`]:!!this.nestedLevel,"md-multi":this.multi,"md-new-momentum":this.newMomentum}}get inputWrapperClassMap(){return{columns:!!this.inputSize,[`${this.inputSize}`]:!!this.inputSize}}get inputTemplateClassMap(){return{"md-input--multiline":this.multiline,"md-input--multi":this.multi,[`md-input--${this.shape}`]:!!this.shape,"md-input--compact":this.compact,"md-input--before":"before"===this.auxiliaryContentPosition||this.searchable,"md-input--after":"after"===this.auxiliaryContentPosition,"md-active":this.isEditing,"md-focus":this.isEditing,"md-read-only":this.readOnly,"md-disable-user-text-input":this.disableUserTextInput,"md-disabled":this.disabled,"md-dirty":!!this.value,"md-has-right-icon":this.hasRightIcon}}get ariaExpandedValue(){return"true"===this.ariaExpanded||"false"===this.ariaExpanded?this.ariaExpanded:this.showDropdown?`${this.dropdownExpanded}`:void 0}get effectiveAriaAutocomplete(){return this.ariaAutocomplete||(this.showDropdown?"both":void 0)}get effectiveAriaRole(){return this.ariaRole||(this.showDropdown?"combobox":void 0)}get hasRightIcon(){return!(!this.clear||this.disabled||!this.value||this.readOnly)||!!this.showDropdown||!this.compact&&this.hasRightSlotContent}get effectiveAriaLabel(){return this.ariaLabel||this.label||void 0}inputTemplate(){var e;return this.multiline?n.html`
2
2
  <textarea
3
3
  part="input"
4
4
  class="md-input ${(0,p.classMap)(this.inputTemplateClassMap)}"
@@ -37,14 +37,15 @@
37
37
  type=${this.type}
38
38
  .value=${this.value}
39
39
  aria-describedby=${this.ariaDescribedBy}
40
- aria-controls=${this.ariaControls}
40
+ aria-controls=${(0,h.ifDefined)(this.ariaControls||void 0)}
41
+ aria-autocomplete=${(0,h.ifDefined)(this.effectiveAriaAutocomplete)}
41
42
  aria-expanded=${(0,h.ifDefined)(null!==(e=this.ariaExpandedValue)&&void 0!==e?e:void 0)}
42
43
  aria-label=${(0,h.ifDefined)(this.effectiveAriaLabel)}
43
44
  aria-invalid=${this.ariaInvalid}
44
45
  aria-errormessage=${`${this.htmlId}-message`}
45
46
  aria-disabled=${(0,h.ifDefined)(this.disabled||void 0)}
46
47
  id=${this.htmlId}
47
- role=${(0,h.ifDefined)(this.ariaRole)}
48
+ role=${(0,h.ifDefined)(this.effectiveAriaRole)}
48
49
  placeholder=${this.placeholder}
49
50
  ?readonly=${this.readOnly||this.disabled||this.disableUserTextInput}
50
51
  min=${(0,h.ifDefined)(this.min)}
@@ -154,4 +155,4 @@
154
155
  ${this.characterCountLabelTemplate()}
155
156
  </div>
156
157
  </div>
157
- `}};y([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,d.property)({type:String})],i.prototype,"label",void 0),y([(0,d.property)({type:String})],i.prototype,"helpText",void 0),y([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,d.property)({type:String})],i.prototype,"shape",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,d.property)({type:Object})],i.prototype,"control",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,d.query)(".md-input")],i.prototype,"input",void 0),y([(0,d.state)()],i.prototype,"isEditing",void 0),y([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,a.w)("md-input")],i),e.ELEMENT=i}(S||(S={}))},2022(e){e.exports=o},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=a},8175(e){e.exports=n},318(e){e.exports=s},5314(e){e.exports=l}},h={};function m(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,m),i.exports}m.m=p,d=[],m.O=(e,t,i,s)=>{if(!t){var a=1/0;for(n=0;n<d.length;n++){for(var[t,i,s]=d[n],o=!0,r=0;r<t.length;r++)(!1&s||a>=s)&&Object.keys(m.O).every(e=>m.O[e](t[r]))?t.splice(r--,1):(o=!1,s<a&&(a=s));if(o){d.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[t,i,s]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var i in t)m.o(t,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1266:0,9189:0};m.O.j=t=>0===e[t];var t=(t,i)=>{var s,a,[o,r,l]=i,n=0;if(o.some(t=>0!==e[t])){for(s in r)m.o(r,s)&&(m.m[s]=r[s]);if(l)var d=l(m)}for(t&&t(i);n<o.length;n++)a=o[n],m.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return m.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,3970,7906,9336,2369],()=>m(9189));return m.O(u)})());
158
+ `}};y([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),y([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),y([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),y([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),y([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),y([(0,d.property)({type:String})],i.prototype,"label",void 0),y([(0,d.property)({type:String})],i.prototype,"helpText",void 0),y([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),y([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaAutocomplete",void 0),y([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),y([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),y([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),y([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),y([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),y([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),y([(0,d.property)({type:String})],i.prototype,"shape",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),y([(0,d.property)({type:Object})],i.prototype,"control",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),y([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),y([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),y([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),y([(0,d.query)(".md-input")],i.prototype,"input",void 0),y([(0,d.state)()],i.prototype,"isEditing",void 0),y([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),y([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=y([(0,o.w)("md-input")],i),e.ELEMENT=i}(S||(S={}))},2022(e){e.exports=a},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=n},318(e){e.exports=s},5314(e){e.exports=l}},h={};function m(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,m),i.exports}m.m=p,d=[],m.O=(e,t,i,s)=>{if(!t){var o=1/0;for(n=0;n<d.length;n++){for(var[t,i,s]=d[n],a=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(m.O).every(e=>m.O[e](t[r]))?t.splice(r--,1):(a=!1,s<o&&(o=s));if(a){d.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}s=s||0;for(var n=d.length;n>0&&d[n-1][2]>s;n--)d[n]=d[n-1];d[n]=[t,i,s]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var i in t)m.o(t,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1266:0,9189:0};m.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[a,r,l]=i,n=0;if(a.some(t=>0!==e[t])){for(s in r)m.o(r,s)&&(m.m[s]=r[s]);if(l)var d=l(m)}for(t&&t(i);n<a.length;n++)o=a[n],m.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return m.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,3970,7906,9336,2369],()=>m(9189));return m.O(u)})());
@@ -1,4 +1,4 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@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("lit/directives/unsafe-html.js"),require("papaparse"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@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","lit/directives/unsafe-html.js","papaparse"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@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("lit/directives/unsafe-html.js"),require("papaparse")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e["lit/directives/unsafe-html.js"],e.papaparse);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,s,r,l,n,a,d,p,c,h,m,u)=>(()=>{"use strict";var f,g={7936(e,t,i){i.r(t),i.d(t,{TableAdvanced:()=>b}),i(5983),i(1821),i(708);var o=i(9609),s=i(9938),r=i(4084),l=i(7161),n=i(429),a=i(5125),d=i(291),p=i(6968),c=i(8187),h=i.n(c),m=i(4841),u=i(597),f=i(9125),g=function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};const v=document.createElement("img");var b;v.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(e){let t=class extends((0,s.d)(l.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=e=>e.preventDefault(),this.eX=0,this.onResize=(e,t)=>{var i;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const o=e.target;null===(i=e.dataTransfer)||void 0===i||i.setDragImage(v,0,0);const s=this.COLS.map(e=>this.shadowRoot.querySelector(`th.col-index-${e.index}`));this.COLS.forEach((e,t)=>e.width=s[t].offsetWidth+"px"),this.updCols();const r=e.x;this.eX=e.x;let l=-1,n=-1,a=-1;const d=this.COLS[t.index-1],p=s[t.index],c=s[t.index-1],h=p.offsetWidth,m=c.offsetWidth,u=()=>{const e=this.eX;if(l!=e&&0!=e){l=e;const i=l-r;n=h-i,a=m+i,t.width=n+"px",d.width=a+"px",this.updCols()}},f=e=>this.eX=e.x,g=()=>{this.isResizing=!1,o.removeEventListener("drag",u),o.removeEventListener("dragend",g),document.removeEventListener("dragover",f)};o.addEventListener("drag",u),o.addEventListener("dragend",g),document.addEventListener("dragover",f)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(e){super.update(e),e.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var e;let t=0;const i=(e,i)=>{var o,s,r,l;const n=e.filters||(null===(s=null===(o=this.tableConfig.default)||void 0===o?void 0:o.col)||void 0===s?void 0:s.filters),a=n?"forString"==n?f.d.optionsString:"forNumber"==n?f.d.optionsNumber:n.length?n:null:null;this.COLS.push({options:Object.assign({},e),index:t++,group:i,sort:"default",sorter:e.sorter||(null===(l=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===l?void 0:l.sorter),isCollapsable:this.tableConfig.cols.collapse==e.id,filter:a?{list:a,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(e=>{"children"in e?e.children.forEach(t=>i(t,{name:e.groupName,length:e.children.length})):i(e)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)}populateData(){const e=this.COLS.length;if("csv"in this.tableData){const e=h().parse(this.tableData.csv,{skipEmptyLines:!0,transform:e=>e.trim()});if(e.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(e.errors,null,2));{const t=e.data;this.ROWS=t.map(e=>e.map(e=>({text:e})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(e=>e.map(e=>({text:e})));else{for(;this.tableData.list.length>e;)this.ROWS.push(this.tableData.list.splice(0,e).map(e=>({text:e})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(e=>({text:e})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const e=this.COLS.length;this.ROWS.reduce((e,t)=>e+t.length,0)%e==0?this.ROWS.forEach((t,i)=>{const o=t.length;o!=e&&(this.error=`DATA ERROR: Total number of cols (=${e}) and data[${i}] length (=${o}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const e=this.tableConfig.cellTemplates,t=Object.keys(e||{});e&&t.length&&this.ROWS.forEach((t,i)=>{t.forEach((t,o)=>{for(const s in e){const r=t.text.indexOf(s);if(-1!=r){const l=e[s],n=this.querySelector(`#${l.templateName}`);if(null==n){console.warn(`cellTemplates["${s}"]: Missing '${l.templateName}' template.`);continue}let a=t.text.replace(s,"");l.contentCb&&(a=l.contentCb({col:o,row:i,content:a,insertIndex:r})),this.ROWS[i][o]={text:a,template:{template:n,templateCb:l.templateCb,insertIndex:"replace"==l.contentUse?-1:r}};break}}})})}setDefaultFilterAndSort(){var e,t;const i=null===(e=this.tableConfig.default)||void 0===e?void 0:e.sort;if(i){const e=this.COLS.find(e=>e.options.id==i.colId);e?this.sort(e,i.order):console.warn(`Cant find ${i.colId} col - for sorting`)}const o=null===(t=this.tableConfig.default)||void 0===t?void 0:t.filter;if(o){const e=this.COLS.find(e=>e.options.id==o.colId);e?e.filter?(e.filter.selectedIndex=o.selectedIndex,e.filter.input=o.input,this.updCols(),this.filter(e)):console.warn(`Cant find filters on ${o.colId} col`):console.warn(`Cant find ${o.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const e=this.COLS[this.dragCol],t=this.COLS[this.dropCol],i=e.group,o=t.group,s=e.index,r=t.index;e.group=o,t.group=i,e.index=r,t.index=s,this.COLS[this.dragCol]=t,this.COLS[this.dropCol]=e,this.ROWS.forEach(e=>{const t=e[this.dragCol],i=e[this.dropCol];e[this.dragCol]=i,e[this.dropCol]=t}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(e,t){e.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(i=>{i.options.id==e.options.id?i.sort=t||("default"==i.sort?"ascending":"ascending"==i.sort?"descending":"default"):i.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:e.sort}))}filter(e){if(!e.filter)return;this.clearSelection(),this.drops=[];const t=e.filter.input.trim(),i=e.filter.list[e.filter.selectedIndex];e.filter.active=!!t,this.requestUpdate(),t?this["md-table-advanced-change"].emit({type:"filter-on",filter:i,input:t}):this["md-table-advanced-change"].emit({type:"filter-off",filter:e.filter.list[e.filter.selectedIndex]})}selectRow(e){var t;const i=e.row.idx,o=Object.prototype.hasOwnProperty.call(this.selected,i);"multiple"==(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)?(e.metaKey?o?delete this.selected[i]:this.selected[i]=!0:e.shiftKey||(this.selected={[i]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(e=>+e)})):o?this.clearSelection():(this.selected={[i]:!0},this["md-table-advanced-change"].emit({type:"select",index:i})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(e,t){e.stopPropagation(),this.expandedRowIdx[t]?(delete this.expandedRowIdx[t],this["md-table-advanced-change"].emit({type:"collapse",row:t})):(this.expandedRowIdx[t]=!0,this["md-table-advanced-change"].emit({type:"expand",row:t})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return l.html` <div>${this.error}</div> `;const{head:e}=this.tableConfig,t=(0,a.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return l.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@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("lit/directives/unsafe-html.js"),require("papaparse"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@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","lit/directives/unsafe-html.js","papaparse"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@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("lit/directives/unsafe-html.js"),require("papaparse")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e["lit/directives/unsafe-html.js"],e.papaparse);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,s,r,l,a,n,d,p,c,h,m,u)=>(()=>{"use strict";var f,g={7936(e,t,i){i.r(t),i.d(t,{TableAdvanced:()=>b}),i(5983),i(1821),i(708);var o=i(9609),s=i(9938),r=i(4084),l=i(7161),a=i(429),n=i(5125),d=i(291),p=i(6968),c=i(8187),h=i.n(c),m=i(4841),u=i(597),f=i(9125),g=function(e,t,i,o){var s,r=arguments.length,l=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(l=(r<3?s(l):r>3?s(t,i,l):s(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l};const v=document.createElement("img");var b;v.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(e){let t=class extends((0,s.d)(l.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=e=>e.preventDefault(),this.eX=0,this.onResize=(e,t)=>{var i;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const o=e.target;null===(i=e.dataTransfer)||void 0===i||i.setDragImage(v,0,0);const s=this.COLS.map(e=>this.shadowRoot.querySelector(`th.col-index-${e.index}`));this.COLS.forEach((e,t)=>e.width=s[t].offsetWidth+"px"),this.updCols();const r=e.x;this.eX=e.x;let l=-1,a=-1,n=-1;const d=this.COLS[t.index-1],p=s[t.index],c=s[t.index-1],h=p.offsetWidth,m=c.offsetWidth,u=()=>{const e=this.eX;if(l!=e&&0!=e){l=e;const i=l-r;a=h-i,n=m+i,t.width=a+"px",d.width=n+"px",this.updCols()}},f=e=>this.eX=e.x,g=()=>{this.isResizing=!1,o.removeEventListener("drag",u),o.removeEventListener("dragend",g),document.removeEventListener("dragover",f)};o.addEventListener("drag",u),o.addEventListener("dragend",g),document.addEventListener("dragover",f)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}willUpdate(e){var t;null===(t=super.willUpdate)||void 0===t||t.call(this,e),e.has("data")&&void 0!==e.get("data")&&(this.error="")}update(e){super.update(e),e.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var e;let t=0;const i=(e,i)=>{var o,s,r,l;const a=e.filters||(null===(s=null===(o=this.tableConfig.default)||void 0===o?void 0:o.col)||void 0===s?void 0:s.filters),n=a?"forString"==a?f.d.optionsString:"forNumber"==a?f.d.optionsNumber:a.length?a:null:null;this.COLS.push({options:Object.assign({},e),index:t++,group:i,sort:"default",sorter:e.sorter||(null===(l=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===l?void 0:l.sorter),isCollapsable:this.tableConfig.cols.collapse==e.id,filter:n?{list:n,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(e=>{"children"in e?e.children.forEach(t=>i(t,{name:e.groupName,length:e.children.length})):i(e)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)}populateData(){const e=this.COLS.length;if("csv"in this.tableData){const e=h().parse(this.tableData.csv,{skipEmptyLines:!0,transform:e=>e.trim()});if(e.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(e.errors,null,2));{const t=e.data;this.ROWS=t.map(e=>e.map(e=>({text:e})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(e=>e.map(e=>({text:e})));else{for(;this.tableData.list.length>e;)this.ROWS.push(this.tableData.list.splice(0,e).map(e=>({text:e})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(e=>({text:e})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const e=this.COLS.length;this.ROWS.reduce((e,t)=>e+t.length,0)%e==0?this.ROWS.forEach((t,i)=>{const o=t.length;o!=e&&(this.error=`DATA ERROR: Total number of cols (=${e}) and data[${i}] length (=${o}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const e=this.tableConfig.cellTemplates,t=Object.keys(e||{});e&&t.length&&this.ROWS.forEach((t,i)=>{t.forEach((t,o)=>{for(const s in e){const r=t.text.indexOf(s);if(-1!=r){const l=e[s],a=this.querySelector(`#${l.templateName}`);if(null==a){console.warn(`cellTemplates["${s}"]: Missing '${l.templateName}' template.`);continue}let n=t.text.replace(s,"");l.contentCb&&(n=l.contentCb({col:o,row:i,content:n,insertIndex:r})),this.ROWS[i][o]={text:n,template:{template:a,templateCb:l.templateCb,insertIndex:"replace"==l.contentUse?-1:r}};break}}})})}setDefaultFilterAndSort(){var e,t;const i=null===(e=this.tableConfig.default)||void 0===e?void 0:e.sort;if(i){const e=this.COLS.find(e=>e.options.id==i.colId);e?this.sort(e,i.order):console.warn(`Cant find ${i.colId} col - for sorting`)}const o=null===(t=this.tableConfig.default)||void 0===t?void 0:t.filter;if(o){const e=this.COLS.find(e=>e.options.id==o.colId);e?e.filter?(e.filter.selectedIndex=o.selectedIndex,e.filter.input=o.input,this.updCols(),this.filter(e)):console.warn(`Cant find filters on ${o.colId} col`):console.warn(`Cant find ${o.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const e=this.COLS[this.dragCol],t=this.COLS[this.dropCol],i=e.group,o=t.group,s=e.index,r=t.index;e.group=o,t.group=i,e.index=r,t.index=s,this.COLS[this.dragCol]=t,this.COLS[this.dropCol]=e,this.ROWS.forEach(e=>{const t=e[this.dragCol],i=e[this.dropCol];e[this.dragCol]=i,e[this.dropCol]=t}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(e,t){e.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(i=>{i.options.id==e.options.id?i.sort=t||("default"==i.sort?"ascending":"ascending"==i.sort?"descending":"default"):i.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:e.sort}))}filter(e){if(!e.filter)return;this.clearSelection(),this.drops=[];const t=e.filter.input.trim(),i=e.filter.list[e.filter.selectedIndex];e.filter.active=!!t,this.requestUpdate(),t?this["md-table-advanced-change"].emit({type:"filter-on",filter:i,input:t}):this["md-table-advanced-change"].emit({type:"filter-off",filter:e.filter.list[e.filter.selectedIndex]})}selectRow(e){var t;const i=e.row.idx,o=Object.prototype.hasOwnProperty.call(this.selected,i);"multiple"==(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)?(e.metaKey?o?delete this.selected[i]:this.selected[i]=!0:e.shiftKey||(this.selected={[i]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(e=>+e)})):o?this.clearSelection():(this.selected={[i]:!0},this["md-table-advanced-change"].emit({type:"select",index:i})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(e,t){e.stopPropagation(),this.expandedRowIdx[t]?(delete this.expandedRowIdx[t],this["md-table-advanced-change"].emit({type:"collapse",row:t})):(this.expandedRowIdx[t]=!0,this["md-table-advanced-change"].emit({type:"expand",row:t})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return l.html` <div>${this.error}</div> `;const{head:e}=this.tableConfig,t=(0,n.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return l.html`
2
2
  <div class="md-table-advanced">
3
3
  <slot></slot>
4
4
  <table class=${t} summary=${(0,d.ifDefined)(null==e?void 0:e.summary)}>
@@ -35,7 +35,7 @@
35
35
  <thead>
36
36
  ${e} ${i}
37
37
  </thead>
38
- `}sortIconTemplate(e){return"ascending"===e?l.html`<md-icon name="sort-descending-bold" size="16" iconSet="momentumDesign"></md-icon>`:"descending"===e?l.html`<md-icon name="sort-ascending-bold" size="16" iconSet="momentumDesign"></md-icon>`:l.html`<md-icon name="unsorted-bold" size="16" iconSet="momentumDesign"></md-icon>`}renderCol(e,t){var i,o;const s=null===(o=null===(i=e.filter)||void 0===i?void 0:i.list[e.filter.selectedIndex])||void 0===o?void 0:o.input,r=(0,a.classMap)({ascending:"ascending"==e.sort,descending:"descending"==e.sort});return l.html`
38
+ `}sortIconTemplate(e){return"ascending"===e?l.html`<md-icon name="sort-descending-bold" size="16" iconSet="momentumDesign"></md-icon>`:"descending"===e?l.html`<md-icon name="sort-ascending-bold" size="16" iconSet="momentumDesign"></md-icon>`:l.html`<md-icon name="unsorted-bold" size="16" iconSet="momentumDesign"></md-icon>`}renderCol(e,t){var i,o;const s=null===(o=null===(i=e.filter)||void 0===i?void 0:i.list[e.filter.selectedIndex])||void 0===o?void 0:o.input,r=(0,n.classMap)({ascending:"ascending"==e.sort,descending:"descending"==e.sort});return l.html`
39
39
  <th
40
40
  rowspan=${(0,d.ifDefined)(t)}
41
41
  width=${(0,d.ifDefined)(e.width?e.width:e.options.width)}
@@ -100,7 +100,7 @@
100
100
  `}renderColDrag(e){return this.tableConfig.cols.isDraggable?l.html`
101
101
  <div
102
102
  draggable="true"
103
- class="drag-area-col ${(0,a.classMap)({drag:-1!=this.dragCol,over:this.dropCol==e.index&&this.dropCol!=this.dragCol})}"
103
+ class="drag-area-col ${(0,n.classMap)({drag:-1!=this.dragCol,over:this.dropCol==e.index&&this.dropCol!=this.dragCol})}"
104
104
  @dragstart=${t=>{this.isResizing||-1!=this.dragRow||(this.dragCol=e.index,t.dataTransfer.setDragImage(t.target.parentNode,0,0))}}
105
105
  @dragenter=${()=>{this.isResizing||-1!=this.dragRow||(this.dropCol=e.index)}}
106
106
  @dragend=${()=>this.onDropCol()}
@@ -115,16 +115,16 @@
115
115
  ${this.renderRow(t,i)} ${o?t.children.map(e=>this.renderRow(e,i)):l.nothing}
116
116
  `})}
117
117
  </tbody>
118
- `}processTemplate(e){const t=document.importNode(e.content,!0);return Array.from(t.childNodes).map(e=>e.nodeType===Node.ELEMENT_NODE?e.outerHTML:e.nodeType===Node.TEXT_NODE&&e.textContent||"").join("")}processTemplateCallback(e){const t=document.importNode(e.template.content,!0);return e.cb({content:e.content,row:e.row,col:e.col,insertIndex:e.insertIndex,fragment:t}),Array.from(t.childNodes).map(e=>e.nodeType===Node.ELEMENT_NODE?e.outerHTML:e.nodeType===Node.TEXT_NODE&&e.textContent||"").join("")}renderRow(e,t){const i=Object.prototype.hasOwnProperty.call(this.selected,e.idx),o=(0,a.classMap)({selected:i,selectable:this.isSelectable&&!i,ghost:e.isGhost});return l.html`
118
+ `}processTemplate(e){const t=document.importNode(e.content,!0);return Array.from(t.childNodes).map(e=>e.nodeType===Node.ELEMENT_NODE?e.outerHTML:e.nodeType===Node.TEXT_NODE&&e.textContent||"").join("")}processTemplateCallback(e){const t=document.importNode(e.template.content,!0);return e.cb({content:e.content,row:e.row,col:e.col,insertIndex:e.insertIndex,fragment:t}),Array.from(t.childNodes).map(e=>e.nodeType===Node.ELEMENT_NODE?e.outerHTML:e.nodeType===Node.TEXT_NODE&&e.textContent||"").join("")}renderRow(e,t){const i=Object.prototype.hasOwnProperty.call(this.selected,e.idx),o=(0,n.classMap)({selected:i,selectable:this.isSelectable&&!i,ghost:e.isGhost});return l.html`
119
119
  <tr
120
120
  class=${o}
121
121
  tabindex=${(0,d.ifDefined)("true"===this.isRowFocusable?"0":void 0)}
122
122
  part=${e.first?"first-row":"row"}
123
123
  @click=${({shiftKey:t,metaKey:i})=>{this.isSelectable&&this.selectRow({row:e,shiftKey:t,metaKey:i})}}
124
124
  >
125
- ${e.cells.map((i,o)=>{var s;const r=this.COLS[o];let n=i.text;const a=i.template;a&&(n=a.templateCb?l.html`${(0,p.unsafeHTML)(this.processTemplateCallback({cb:a.templateCb,insertIndex:a.insertIndex,template:a.template,content:i.text,row:e.idx,col:o}))}`:l.html`${(0,p.unsafeHTML)(this.processTemplate(a.template))}`,-1!=a.insertIndex&&(n=l.html`
126
- ${a.insertIndex>0?i.text.substring(0,a.insertIndex):l.nothing} ${n}
127
- ${a.insertIndex<i.text.length-1?i.text.substring(a.insertIndex):l.nothing}
125
+ ${e.cells.map((i,o)=>{var s;const r=this.COLS[o];let a=i.text;const n=i.template;n&&(a=n.templateCb?l.html`${(0,p.unsafeHTML)(this.processTemplateCallback({cb:n.templateCb,insertIndex:n.insertIndex,template:n.template,content:i.text,row:e.idx,col:o}))}`:l.html`${(0,p.unsafeHTML)(this.processTemplate(n.template))}`,-1!=n.insertIndex&&(a=l.html`
126
+ ${n.insertIndex>0?i.text.substring(0,n.insertIndex):l.nothing} ${a}
127
+ ${n.insertIndex<i.text.length-1?i.text.substring(n.insertIndex):l.nothing}
128
128
  `));const d=(null===(s=this.tableConfig.rows)||void 0===s?void 0:s.isDraggable)&&"child"!=e.collapse,c=d&&-1!=this.dragRow&&this.dragRow!=e.idxDrag,h=d&&0==o,m=l.html`
129
129
  <div
130
130
  class="inner-cell"
@@ -158,9 +158,9 @@
158
158
  ${"collapsed"==e.collapse?l.html` <md-icon name="plus-bold" size="12" iconSet="momentumDesign"></md-icon> `:l.html` <md-icon name="minus-bold" size="12" iconSet="momentumDesign"></md-icon> `}
159
159
  </button>
160
160
  `:l.nothing}
161
- <span>${"child"==e.collapse?l.nothing:n}</span>
162
- `:l.html` <span>${n}</span> `}
161
+ <span>${"child"==e.collapse?l.nothing:a}</span>
162
+ `:l.html` <span>${a}</span> `}
163
163
  </div>
164
164
  `;return r.options.isHeader?l.html` <th part="cell-ishead" scope="row" title="${i.text}">${m}</th> `:l.html` <td part=${0===o?"first-cell":"cell"} title="${i.text}">${m}</td> `})}
165
165
  </tr>
166
- `}static get styles(){return[r.A,m.A]}};g([(0,n.property)({attribute:"config"})],t.prototype,"config",void 0),g([(0,n.property)({attribute:"data"})],t.prototype,"data",void 0),g([(0,n.property)({type:String})],t.prototype,"isRowFocusable",void 0),g([(0,u.Wj)()],t.prototype,"md-table-advanced-change",void 0),g([(0,n.state)()],t.prototype,"tableConfig",void 0),g([(0,n.state)()],t.prototype,"tableData",void 0),g([(0,n.state)()],t.prototype,"error",void 0),g([(0,n.state)()],t.prototype,"COLS",void 0),g([(0,n.state)()],t.prototype,"ROWS",void 0),g([(0,n.state)()],t.prototype,"dragRow",void 0),g([(0,n.state)()],t.prototype,"dropRow",void 0),g([(0,n.state)()],t.prototype,"drops",void 0),g([(0,n.state)()],t.prototype,"dragCol",void 0),g([(0,n.state)()],t.prototype,"dropCol",void 0),g([(0,n.queryAll)("tr[tabindex]")],t.prototype,"tableRaws",void 0),g([(0,u.sg)(500)],t.prototype,"filter",null),t=g([(0,o.w)("md-table-advanced")],t),e.ELEMENT=t}(b||(b={}))},2022(e){e.exports=r},554(e){e.exports=l},2962(e){e.exports=a},6538(e){e.exports=d},8250(e){e.exports=p},9371(e){e.exports=c},4863(e){e.exports=h},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=s},318(e){e.exports=o},6968(e){e.exports=m},5314(e){e.exports=n},8187(e){e.exports=u}},v={};function b(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={exports:{}};return g[e](i,i.exports,b),i.exports}b.m=g,f=[],b.O=(e,t,i,o)=>{if(!t){var s=1/0;for(a=0;a<f.length;a++){for(var[t,i,o]=f[a],r=!0,l=0;l<t.length;l++)(!1&o||s>=o)&&Object.keys(b.O).every(e=>b.O[e](t[l]))?t.splice(l--,1):(r=!1,o<s&&(s=o));if(r){f.splice(a--,1);var n=i();void 0!==n&&(e=n)}}return e}o=o||0;for(var a=f.length;a>0&&f[a-1][2]>o;a--)f[a]=f[a-1];f[a]=[t,i,o]},b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},b.d=(e,t)=>{for(var i in t)b.o(t,i)&&!b.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={4139:0};b.O.j=t=>0===e[t];var t=(t,i)=>{var o,s,[r,l,n]=i,a=0;if(r.some(t=>0!==e[t])){for(o in l)b.o(l,o)&&(b.m[o]=l[o]);if(n)var d=n(b)}for(t&&t(i);a<r.length;a++)s=r[a],b.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return b.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var x=b.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,2050,8441,9983,4700,9146,708,8881],()=>b(7936));return b.O(x)})());
166
+ `}static get styles(){return[r.A,m.A]}};g([(0,a.property)({attribute:"config"})],t.prototype,"config",void 0),g([(0,a.property)({attribute:"data"})],t.prototype,"data",void 0),g([(0,a.property)({type:String})],t.prototype,"isRowFocusable",void 0),g([(0,u.Wj)()],t.prototype,"md-table-advanced-change",void 0),g([(0,a.state)()],t.prototype,"tableConfig",void 0),g([(0,a.state)()],t.prototype,"tableData",void 0),g([(0,a.state)()],t.prototype,"error",void 0),g([(0,a.state)()],t.prototype,"COLS",void 0),g([(0,a.state)()],t.prototype,"ROWS",void 0),g([(0,a.state)()],t.prototype,"dragRow",void 0),g([(0,a.state)()],t.prototype,"dropRow",void 0),g([(0,a.state)()],t.prototype,"drops",void 0),g([(0,a.state)()],t.prototype,"dragCol",void 0),g([(0,a.state)()],t.prototype,"dropCol",void 0),g([(0,a.queryAll)("tr[tabindex]")],t.prototype,"tableRaws",void 0),g([(0,u.sg)(500)],t.prototype,"filter",null),t=g([(0,o.w)("md-table-advanced")],t),e.ELEMENT=t}(b||(b={}))},2022(e){e.exports=r},554(e){e.exports=l},2962(e){e.exports=n},6538(e){e.exports=d},8250(e){e.exports=p},9371(e){e.exports=c},4863(e){e.exports=h},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=s},318(e){e.exports=o},6968(e){e.exports=m},5314(e){e.exports=a},8187(e){e.exports=u}},v={};function b(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={exports:{}};return g[e](i,i.exports,b),i.exports}b.m=g,f=[],b.O=(e,t,i,o)=>{if(!t){var s=1/0;for(n=0;n<f.length;n++){for(var[t,i,o]=f[n],r=!0,l=0;l<t.length;l++)(!1&o||s>=o)&&Object.keys(b.O).every(e=>b.O[e](t[l]))?t.splice(l--,1):(r=!1,o<s&&(s=o));if(r){f.splice(n--,1);var a=i();void 0!==a&&(e=a)}}return e}o=o||0;for(var n=f.length;n>0&&f[n-1][2]>o;n--)f[n]=f[n-1];f[n]=[t,i,o]},b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},b.d=(e,t)=>{for(var i in t)b.o(t,i)&&!b.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={4139:0};b.O.j=t=>0===e[t];var t=(t,i)=>{var o,s,[r,l,a]=i,n=0;if(r.some(t=>0!==e[t])){for(o in l)b.o(l,o)&&(b.m[o]=l[o]);if(a)var d=a(b)}for(t&&t(i);n<r.length;n++)s=r[n],b.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return b.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var x=b.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,2050,8441,9983,4700,9146,708,8881],()=>b(7936));return b.O(x)})());