@momentum-ui/web-components 3.2.12 → 3.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/861.js +9 -2
- package/dist/comp/md-floating-minimize-entry.js +3 -3
- package/dist/comp/md-floating-modal-entry.js +6 -6
- package/dist/esm/1156.js +1 -0
- package/dist/esm/1280.js +1 -0
- package/dist/esm/1756.js +1 -0
- package/dist/esm/1821.js +1 -1
- package/dist/esm/1982.js +1 -0
- package/dist/esm/2451.js +1 -0
- package/dist/esm/2458.js +1 -0
- package/dist/esm/2577.js +1 -0
- package/dist/esm/2599.js +1 -0
- package/dist/esm/2927.js +1 -1
- package/dist/esm/3051.js +1 -1
- package/dist/esm/3155.js +1 -0
- package/dist/esm/3365.js +1 -0
- package/dist/esm/3517.js +1 -0
- package/dist/esm/3648.js +1 -0
- package/dist/esm/3876.js +1 -1
- package/dist/esm/4060.js +1 -0
- package/dist/esm/4137.js +1 -0
- package/dist/esm/4613.js +1 -0
- package/dist/esm/477.js +1 -0
- package/dist/esm/4955.js +1 -0
- package/dist/esm/4980.js +1 -0
- package/dist/esm/5308.js +1 -0
- package/dist/esm/5410.js +1 -1
- package/dist/esm/5432.js +1 -0
- package/dist/esm/546.js +1 -0
- package/dist/esm/5958.js +3 -3
- package/dist/esm/5983.js +1 -1
- package/dist/esm/6518.js +1 -0
- package/dist/esm/6525.js +1 -0
- package/dist/esm/6897.js +1 -0
- package/dist/esm/6933.js +1 -0
- package/dist/esm/6994.js +1 -0
- package/dist/esm/708.js +1 -1
- package/dist/esm/7119.js +1 -0
- package/dist/esm/7638.js +1 -0
- package/dist/esm/7755.js +1 -0
- package/dist/esm/7838.js +1 -0
- package/dist/esm/8165.js +1 -0
- package/dist/esm/8235.js +1 -0
- package/dist/esm/8497.js +1 -1
- package/dist/esm/861.js +9 -2
- package/dist/esm/8663.js +1 -1
- package/dist/esm/878.js +1 -1
- package/dist/esm/8899.js +1 -0
- package/dist/esm/9375.js +1 -0
- package/dist/esm/9500.js +1 -0
- package/dist/esm/9613.js +1 -1
- package/dist/esm/9642.js +1 -0
- package/dist/esm/comp/md-accordion-entry.js +2 -2
- package/dist/esm/comp/md-accordion-item-entry.js +2 -2
- package/dist/esm/comp/md-accordion-item.js +1 -1
- package/dist/esm/comp/md-accordion.js +1 -1
- package/dist/esm/comp/md-activity-button-entry.js +2 -2
- package/dist/esm/comp/md-activity-button.js +1 -1
- package/dist/esm/comp/md-advance-list-entry.js +2 -2
- package/dist/esm/comp/md-advance-list.js +1 -1
- package/dist/esm/comp/md-alert-banner-entry.js +10 -10
- package/dist/esm/comp/md-alert-banner.js +1 -1
- package/dist/esm/comp/md-alert-entry.js +9 -9
- package/dist/esm/comp/md-alert.js +1 -1
- package/dist/esm/comp/md-audio-player-entry.js +2 -2
- package/dist/esm/comp/md-audio-player.js +1 -1
- package/dist/esm/comp/md-avatar-entry.js +1 -1
- package/dist/esm/comp/md-avatar.js +1 -1
- package/dist/esm/comp/md-badge-entry.js +1 -1
- package/dist/esm/comp/md-badge.js +1 -1
- package/dist/esm/comp/md-breadcrumb-entry.js +5 -5
- package/dist/esm/comp/md-breadcrumb.js +1 -1
- package/dist/esm/comp/md-button-entry.js +2 -2
- package/dist/esm/comp/md-button-group-entry.js +2 -2
- package/dist/esm/comp/md-button-group.js +1 -1
- package/dist/esm/comp/md-button.js +1 -1
- package/dist/esm/comp/md-card-ai-entry.js +2 -2
- package/dist/esm/comp/md-card-ai.js +1 -1
- package/dist/esm/comp/md-card-entry.js +6 -6
- package/dist/esm/comp/md-card-v2-entry.js +6 -6
- package/dist/esm/comp/md-card-v2.js +1 -1
- package/dist/esm/comp/md-card.js +1 -1
- package/dist/esm/comp/md-chat-message-entry.js +2 -2
- package/dist/esm/comp/md-chat-message.js +1 -1
- package/dist/esm/comp/md-checkbox-entry.js +2 -2
- package/dist/esm/comp/md-checkbox.js +1 -1
- package/dist/esm/comp/md-checkboxgroup-entry.js +2 -2
- package/dist/esm/comp/md-checkboxgroup.js +1 -1
- package/dist/esm/comp/md-chip-entry.js +2 -2
- package/dist/esm/comp/md-chip.js +1 -1
- package/dist/esm/comp/md-coachmark-entry.js +8 -8
- package/dist/esm/comp/md-coachmark-popover-entry.js +3 -3
- package/dist/esm/comp/md-coachmark-popover.js +1 -1
- package/dist/esm/comp/md-coachmark.js +1 -1
- package/dist/esm/comp/md-combobox-entry.js +1 -1
- package/dist/esm/comp/md-combobox.js +1 -1
- package/dist/esm/comp/md-composite-avatar-entry.js +3 -3
- package/dist/esm/comp/md-composite-avatar.js +1 -1
- package/dist/esm/comp/md-country-code-picker-entry.js +1 -1
- package/dist/esm/comp/md-country-code-picker.js +1 -1
- package/dist/esm/comp/md-date-range-picker-entry.js +1 -1
- package/dist/esm/comp/md-date-range-picker.js +1 -1
- package/dist/esm/comp/md-date-time-picker-entry.js +2 -2
- package/dist/esm/comp/md-date-time-picker.js +1 -1
- package/dist/esm/comp/md-datepicker-calendar-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-calendar.js +1 -1
- package/dist/esm/comp/md-datepicker-day-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-day.js +1 -1
- package/dist/esm/comp/md-datepicker-entry.js +11 -11
- package/dist/esm/comp/md-datepicker-month-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-month.js +1 -1
- package/dist/esm/comp/md-datepicker-week-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-week.js +1 -1
- package/dist/esm/comp/md-datepicker.js +1 -1
- package/dist/esm/comp/md-draggable-entry.js +2 -2
- package/dist/esm/comp/md-draggable-item-entry.js +5 -5
- package/dist/esm/comp/md-draggable-item.js +1 -1
- package/dist/esm/comp/md-draggable.js +1 -1
- package/dist/esm/comp/md-dropdown-entry.js +16 -16
- package/dist/esm/comp/md-dropdown.js +1 -1
- package/dist/esm/comp/md-editable-field-entry.js +2 -2
- package/dist/esm/comp/md-editable-field.js +1 -1
- package/dist/esm/comp/md-favorite-entry.js +1 -1
- package/dist/esm/comp/md-favorite.js +1 -1
- package/dist/esm/comp/md-floating-minimize-entry.js +1 -1
- package/dist/esm/comp/md-floating-minimize.js +1 -1
- package/dist/esm/comp/md-floating-modal-entry.js +11 -11
- package/dist/esm/comp/md-floating-modal.js +1 -1
- package/dist/esm/comp/md-form-entry.js +2 -2
- package/dist/esm/comp/md-form.js +1 -1
- package/dist/esm/comp/md-grabber-entry.js +5 -5
- package/dist/esm/comp/md-grabber.js +1 -1
- package/dist/esm/comp/md-help-text-entry.js +1 -1
- package/dist/esm/comp/md-help-text.js +1 -1
- package/dist/esm/comp/md-icon-entry.js +5 -5
- package/dist/esm/comp/md-icon.js +1 -1
- package/dist/esm/comp/md-inpu.js +1 -1
- package/dist/esm/comp/md-input-entry.js +2 -2
- package/dist/esm/comp/md-input-file.js +4 -4
- package/dist/esm/comp/md-input.js +1 -1
- package/dist/esm/comp/md-label-entry.js +1 -1
- package/dist/esm/comp/md-label.js +1 -1
- package/dist/esm/comp/md-link-entry.js +14 -14
- package/dist/esm/comp/md-link.js +1 -1
- package/dist/esm/comp/md-list-entry.js +1 -1
- package/dist/esm/comp/md-list-item-entry.js +1 -1
- package/dist/esm/comp/md-list-item.js +1 -1
- package/dist/esm/comp/md-list.js +1 -1
- package/dist/esm/comp/md-loading-entry.js +1 -1
- package/dist/esm/comp/md-loading.js +1 -1
- package/dist/esm/comp/md-meeting-alert-entry.js +2 -2
- package/dist/esm/comp/md-meeting-alert.js +1 -1
- package/dist/esm/comp/md-menu-entry.js +3 -3
- package/dist/esm/comp/md-menu-item-entry.js +3 -3
- package/dist/esm/comp/md-menu-item.js +1 -1
- package/dist/esm/comp/md-menu-overlay-entry.js +5 -5
- package/dist/esm/comp/md-menu-overlay.js +1 -1
- package/dist/esm/comp/md-menu.js +1 -1
- package/dist/esm/comp/md-modal-entry.js +13 -13
- package/dist/esm/comp/md-modal.js +1 -1
- package/dist/esm/comp/md-pagination-entry.js +2 -2
- package/dist/esm/comp/md-pagination.js +1 -1
- package/dist/esm/comp/md-phone-input-entry.js +11 -11
- package/dist/esm/comp/md-phone-input.js +1 -1
- package/dist/esm/comp/md-popover-entry.js +1 -1
- package/dist/esm/comp/md-popover.js +1 -1
- package/dist/esm/comp/md-presence-entry.js +1 -1
- package/dist/esm/comp/md-presence.js +1 -1
- package/dist/esm/comp/md-progress-bar-entry.js +1 -1
- package/dist/esm/comp/md-progress-bar.js +1 -1
- package/dist/esm/comp/md-radio-entry.js +2 -2
- package/dist/esm/comp/md-radio.js +1 -1
- package/dist/esm/comp/md-radiogroup-entry.js +2 -2
- package/dist/esm/comp/md-radiogroup.js +1 -1
- package/dist/esm/comp/md-slider-entry.js +2 -2
- package/dist/esm/comp/md-slider.js +1 -1
- package/dist/esm/comp/md-spinner-entry.js +1 -1
- package/dist/esm/comp/md-spinner.js +1 -1
- package/dist/esm/comp/md-tab-entry.js +3 -3
- package/dist/esm/comp/md-tab-panel-entry.js +1 -1
- package/dist/esm/comp/md-tab-panel.js +1 -1
- package/dist/esm/comp/md-tab.js +1 -1
- package/dist/esm/comp/md-table-advanced-entry.js +5 -5
- package/dist/esm/comp/md-table-advanced.js +1 -1
- package/dist/esm/comp/md-table-entry.js +2 -2
- package/dist/esm/comp/md-table.js +1 -1
- package/dist/esm/comp/md-tabs-entry.js +3 -3
- package/dist/esm/comp/md-tabs.js +1 -1
- package/dist/esm/comp/md-task-item-entry.js +7 -7
- package/dist/esm/comp/md-task-item.js +1 -1
- package/dist/esm/comp/md-theme-entry.js +3 -3
- package/dist/esm/comp/md-theme.js +1 -1
- package/dist/esm/comp/md-timepicker-entry.js +3 -3
- package/dist/esm/comp/md-timepicker.js +1 -1
- package/dist/esm/comp/md-toggle-switch-entry.js +2 -2
- package/dist/esm/comp/md-toggle-switch.js +1 -1
- package/dist/esm/comp/md-tooltip-entry.js +3 -3
- package/dist/esm/comp/md-tooltip.js +1 -1
- package/dist/esm/index-entry.js +194 -194
- package/dist/esm/index.js +1 -1
- package/dist/esm/managers/thememanager-entry.js +1 -1
- package/dist/esm/managers/thememanager.js +1 -1
- package/dist/index-entry.js +6 -6
- package/dist/types/components/taskitem/TaskItem.constants.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/1618.js +0 -1
- package/dist/esm/2492.js +0 -1
- package/dist/esm/3013.js +0 -1
- package/dist/esm/3241.js +0 -1
- package/dist/esm/6429.js +0 -1
- package/dist/esm/6573.js +0 -1
- package/dist/esm/7262.js +0 -1
- package/dist/esm/8373.js +0 -1
- package/dist/esm/8881.js +0 -1
- package/dist/esm/9146.js +0 -1
- package/dist/esm/9488.js +0 -1
- package/dist/esm/9956.js +0 -1
package/dist/esm/index-entry.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as t from"luxon";var e,i,o={3701(t,e,i){i.d(e,{n:()=>o});var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=i(2927),d=i(8899),h=i(742),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.TS)(l.LitElement)){constructor(){super(...arguments),this.multiple=!1,this.suppressContainerFocus=!1,this.doubleClickToExpand=!1,this.handleAccordionItemFocus=()=>{this.toggleAttribute("focusable",!0)},this.handleAccordionItemBlur=()=>{this.toggleAttribute("focusable",!1)}}get slotItem(){return this.accordionItemSlotElement}filterSlotted(){return this.accordionItemSlotElement.assignedElements()}switchFocusedAccordionItem(t){const e=this.slotted.findIndex(t=>t.hasAttribute("focus-visible")),i=this.slotted.length;let o=e;for(o=(i+o+t)%i;this.slotted[o].disabled;)o=(i+o+t)%i;this.focusAccordionItem(this.slotted[o])}focusAccordionItem(t){t.hasAttribute("focus-visible")||requestAnimationFrame(()=>t.header.focus())}setActiveAccordionItem(t){this.multiple?t.expanded=!t.expanded:(this.slotted.forEach(e=>{const i=e;i.expanded&&!e.isEqualNode(t)&&(i.expanded=!1)}),t.expanded=!0)}setupExpandedAccordionItems(){this.multiple||this.slotted.filter(t=>t.expanded).forEach((t,e)=>{const i=t;i.expanded&&e>0&&(i.expanded=!1)})}setupFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.addEventListener("focus",this.handleAccordionItemFocus),t.addEventListener("blur",this.handleAccordionItemBlur))})}removeFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.removeEventListener("focus",this.handleAccordionItemFocus),t.removeEventListener("blur",this.handleAccordionItemBlur))})}handleKeyDown(t){const{srcEvent:e}=t.detail,{code:i}=e;switch(i){case s.Uz.Space:case s.Uz.Enter:{const{target:e}=t;e&&this.setActiveAccordionItem(e);break}case s.Uz.ArrowDown:this.switchFocusedAccordionItem(1);break;case s.Uz.ArrowUp:this.switchFocusedAccordionItem(-1);break;case s.Uz.Home:{const t=this.slotted[0];this.focusAccordionItem(t);break}case s.Uz.End:{const t=this.slotted[this.slotted.length-1];this.focusAccordionItem(t);break}}}handleClick(t){const{target:e}=t,i=this.slotted.find(t=>t.isSameNode(e));i&&this.setActiveAccordionItem(i)}propagateDoubleClickSetting(){this.slotted.forEach(t=>{t.doubleClickToExpand=this.doubleClickToExpand})}updated(t){super.updated(t),t.has("slotted")&&(this.setupExpandedAccordionItems(),this.setupFocusAccordionItems(),this.propagateDoubleClickSetting())}connectedCallback(){super.connectedCallback(),this.addEventListener("accordion-item-keydown",this.handleKeyDown),this.addEventListener("accordion-item-click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accordion-item-keydown",this.handleKeyDown),this.removeEventListener("accordion-item-click",this.handleClick),this.removeFocusAccordionItems()}static get styles(){return[n.A,h.A]}render(){return l.html`
|
|
2
2
|
<div class="md-accordion" part="accordion">
|
|
3
3
|
<slot name="accordion-item"></slot>
|
|
4
4
|
</div>
|
|
5
|
-
`}};p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"multiple",void 0),p([(0,d.property)({type:Boolean,attribute:"suppress-container-focus"})],e.prototype,"suppressContainerFocus",void 0),p([(0,d.property)({type:Boolean,attribute:"double-click-to-expand"})],e.prototype,"doubleClickToExpand",void 0),p([(0,d.query)('slot[name="accordion-item"]')],e.prototype,"accordionItemSlotElement",void 0),e=p([(0,
|
|
5
|
+
`}};p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"multiple",void 0),p([(0,d.property)({type:Boolean,attribute:"suppress-container-focus"})],e.prototype,"suppressContainerFocus",void 0),p([(0,d.property)({type:Boolean,attribute:"double-click-to-expand"})],e.prototype,"doubleClickToExpand",void 0),p([(0,d.query)('slot[name="accordion-item"]')],e.prototype,"accordionItemSlotElement",void 0),e=p([(0,r.w)("md-accordion")],e),t.ELEMENT=e}(o||(o={}))},4466(t,e,i){i.d(e,{A:()=>o}),i(1821);var o,s=i(7704),a=i(9609),r=i(93),n=i(4084),l=i(2927),d=i(8899),h=i(3517),p=i(742),c=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.yC)(l.LitElement)){constructor(){super(...arguments),this._expanded=!1,this._level=3,this.uniqueId=(0,r.O)("accordion-item"),this.label="",this.disabled=!1,this.doubleClickToExpand=!1}get expanded(){return this._expanded}set expanded(t){const e=this._expanded;this._expanded=t,t?(this.notifyAccordionFocus(),this.notifyExpandedHeader()):this.notifyCollapsedHeader(),this.requestUpdate("expanded",e)}get level(){return this._level}set level(t){const e=this.level;t<1||t>6?(console.warn("Please set appropriate section heading level"),this._level=3):this._level=t,this.requestUpdate("level",e)}notifyExpandedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-expanded",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyCollapsedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-collapsed",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyAccordionFocus(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}firstUpdated(t){super.firstUpdated(t),this.setAttribute("id",this.uniqueId)}static get styles(){return[n.A,p.A]}isClickOnExpanderIcon(t){var e;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".md-accordion-expander-icon");return!!i&&t.composedPath().includes(i)}handleClickEvent(t){if(this.disabled)return;const e="dblclick"===t.type,i="click"===t.type&&this.isClickOnExpanderIcon(t);(this.doubleClickToExpand?e||i:!e)&&this.dispatchEvent(new CustomEvent("accordion-item-click",{detail:{srcEvent:t},composed:!0,bubbles:!0}))}handleKeyDown(t){this.disabled||this.dispatchEvent(new CustomEvent("accordion-item-keydown",{detail:{srcEvent:t},bubbles:!0,composed:!0}))}render(){return l.html`
|
|
6
6
|
<div class="md-accordion-item">
|
|
7
7
|
<div role="heading" aria-level=${this.level} class="md-accordion-header" part="accordion-header">
|
|
8
8
|
<button
|
|
@@ -41,7 +41,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
41
41
|
<slot></slot>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
|
-
`}};c([(0,d.property)({type:String})],e.prototype,"label",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([(0,d.property)({type:Boolean,attribute:"double-click-to-expand"})],e.prototype,"doubleClickToExpand",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",null),c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"level",null),c([(0,d.query)(".md-accordion-expander")],e.prototype,"header",void 0),e=c([(0,
|
|
44
|
+
`}};c([(0,d.property)({type:String})],e.prototype,"label",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),c([(0,d.property)({type:Boolean,attribute:"double-click-to-expand"})],e.prototype,"doubleClickToExpand",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",null),c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"level",null),c([(0,d.query)(".md-accordion-expander")],e.prototype,"header",void 0),e=c([(0,a.w)("md-accordion-item")],e),t.ELEMENT=e}(o||(o={}))},2160(t,e,i){i.d(e,{uo:()=>h}),i(5983),i(1821);var o=i(9609),s=i(4084),a=i(2927),r=i(8899),n=i(6616),l=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const d=["chat","camera","contact-card","meetings","whiteboard","files","share-screen","tasks"];var h;!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.ariaLabel="",this.disabled=!1,this.label="",this.size="68",this._type="chat"}get type(){return this._type}set type(t){const e=this.type;d.includes(t)?this._type=t:this._type="chat",this.requestUpdate("type",e)}get buttonToIconSizeMapping(){return{56:"24",68:"28",84:"36"}}get formatClass(){return{"md-activity":!0,[`md-activity__${this.type}`]:this.type}}static get styles(){return[s.A,n.A]}render(){return a.html`
|
|
45
45
|
<md-button
|
|
46
46
|
aria-label=${this.ariaLabel}
|
|
47
47
|
circle
|
|
@@ -53,7 +53,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
53
53
|
>
|
|
54
54
|
<md-icon name=${`icon-${this.type}_${this.buttonToIconSizeMapping[this.size]}`}></md-icon>
|
|
55
55
|
</md-button>
|
|
56
|
-
`}};l([(0,
|
|
56
|
+
`}};l([(0,r.property)({type:String})],e.prototype,"ariaLabel",void 0),l([(0,r.property)({type:Boolean})],e.prototype,"disabled",void 0),l([(0,r.property)({type:String})],e.prototype,"label",void 0),l([(0,r.property)({type:String})],e.prototype,"size",void 0),l([(0,r.property)({type:String})],e.prototype,"type",null),e=l([(0,o.w)("md-activity-button")],e),t.ELEMENT=e}(h||(h={}))},9236(t,e,i){i.d(e,{L:()=>o});var o,s=i(2900),a=i(9609),r=i(3203),n=i(4084),l=(i(6650),i(2927)),d=i(8899),h=i(3013),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.prefixId="item-";let e=class extends((0,r.y)(l.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i,o,a;const{ArrowDown:r,ArrowUp:n,Tab:l,Space:d,Enter:h}=s.Uz,{code:p}=e,c=p===r,u=p===n,m=p===l,b=p===d,v=p===h;if(c||u){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);c?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id,null===(o=this.virtualizer)||void 0===o||o.scrollToIndex(this.scrollIndex,"start"))}else if(m)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((b||v)&&(e.preventDefault(),this.activeId)){const e=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector(`#${t.prefixId}${this.activeId}`);e&&("true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.updateItemSelection(e))}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(e,i)=>{if(!e)return l.html`<div class="default-wrapper-error">Invalid item</div>`;if(!e.id)return console.warn(`AdvanceList.renderItem: item missing id at index ${i}`,e),l.html`<div class="default-wrapper-error">Item missing ID</div>`;try{return"status-indicator"===e.id?l.html`
|
|
57
57
|
<div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
|
|
58
58
|
`:l.html`
|
|
59
59
|
<div
|
|
@@ -74,7 +74,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
74
74
|
height: ${this.containerHeight};
|
|
75
75
|
}
|
|
76
76
|
</style>
|
|
77
|
-
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>t&&t.id&&!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&requestAnimationFrame(()=>this.updateSelectedState()),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange()),t.has("activeId")&&this.isUserNavigated&&requestAnimationFrame(()=>this.updateSelectedState())}setCheckboxAttributes(t,e){var i,o,s,
|
|
77
|
+
`}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>t&&t.id&&!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&requestAnimationFrame(()=>this.updateSelectedState()),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange()),t.has("activeId")&&this.isUserNavigated&&requestAnimationFrame(()=>this.updateSelectedState())}setCheckboxAttributes(t,e){var i,o,s,a;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?null===(a=e.querySelector("md-checkbox"))||void 0===a||a.removeAttribute("checked"):null===(s=e.querySelector("md-checkbox"))||void 0===s||s.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,o;const s=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,s),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),this.isUserNavigated&&e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),o=t.composedPath(),s=i.find(t=>o.includes(t));if(s)return(null==s?void 0:s.hasAttribute("disabled"))||"true"===(null==s?void 0:s.getAttribute("aria-disabled"))?0:s}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value&&this.value.length>0&&this.value[0]?`${t.prefixId}${this.value[0]}`:""}render(){return l.html`
|
|
78
78
|
${this.getStyles()}
|
|
79
79
|
<div
|
|
80
80
|
class="md-advance-list-wrapper virtual-scroll"
|
|
@@ -90,7 +90,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
90
90
|
@rangeChanged=${this.handleRangeChange}
|
|
91
91
|
></lit-virtualizer>
|
|
92
92
|
</div>
|
|
93
|
-
`}};p([(0,d.property)({type:Array})],e.prototype,"items",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isLoading",void 0),p([(0,d.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),p([(0,d.property)({type:Array})],e.prototype,"value",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaRoleList",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaLabelList",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isError",void 0),p([(0,d.property)({type:String})],e.prototype,"containerHeight",void 0),p([(0,d.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"focusReset",void 0),p([(0,d.property)({type:Array})],e.prototype,"disabledItems",void 0),p([(0,d.property)({type:Number})],e.prototype,"totalRecords",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),p([(0,d.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),p([(0,d.query)("lit-virtualizer")],e.prototype,"virtualizer",void 0),p([(0,d.state)()],e.prototype,"scrollIndex",void 0),p([(0,d.state)()],e.prototype,"activeId",void 0),p([(0,d.state)()],e.prototype,"selectedItemsIds",void 0),p([(0,d.state)()],e.prototype,"isUserNavigated",void 0),e=p([(0,
|
|
93
|
+
`}};p([(0,d.property)({type:Array})],e.prototype,"items",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isLoading",void 0),p([(0,d.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),p([(0,d.property)({type:Array})],e.prototype,"value",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaRoleList",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),p([(0,d.property)({type:String})],e.prototype,"ariaLabelList",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isError",void 0),p([(0,d.property)({type:String})],e.prototype,"containerHeight",void 0),p([(0,d.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"focusReset",void 0),p([(0,d.property)({type:Array})],e.prototype,"disabledItems",void 0),p([(0,d.property)({type:Number})],e.prototype,"totalRecords",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),p([(0,d.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),p([(0,d.query)("lit-virtualizer")],e.prototype,"virtualizer",void 0),p([(0,d.state)()],e.prototype,"scrollIndex",void 0),p([(0,d.state)()],e.prototype,"activeId",void 0),p([(0,d.state)()],e.prototype,"selectedItemsIds",void 0),p([(0,d.state)()],e.prototype,"isUserNavigated",void 0),e=p([(0,a.w)("md-advance-list")],e),t.ELEMENT=e}(o||(o={}))},9144(t,e,i){i.d(e,{ZT:()=>o}),i(5983),i(1821);var o,s=i(9609),a=i(7154),r=i(4084),n=i(2927),l=i(8899),d=i(4955),h=i(4839),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.type="",this.titleText="",this.message="",this.closable=!1,this.show=!1,this.closeAriaLabel="Close Banner",this.showBannerTypeIcon=!1,this.showRefreshButton=!1,this.alignment="center"}connectedCallback(){super.connectedCallback()}onHide(){this.show=!this.show,this.dispatchEvent(new CustomEvent("alertBanner-hide"))}onRefreshClick(){this.dispatchEvent(new CustomEvent("alertBanner-refresh-button-click"))}handleKeyDown(t){const{code:e}=t;(0,a.o)(e)&&this.onHide()}get isLeadingAlignment(){return"leading"===this.alignment}static get styles(){return[r.A,h.A]}getIconForType(){switch(this.type){case"error":return"error-legacy-bold";case"warning":return"warning-bold";case"success":return"check-circle-bold";default:return"info-circle-bold"}}get alertBannerClassMap(){return{"md-alert-banner":!0,[`md-alert-banner--${this.type}`]:this.type,"md-alert-banner--leading":this.isLeadingAlignment||this.titleText,closable:this.closable,"with-title":!!this.titleText}}get alertBannerTextClassMap(){return{"md-alert-banner__text":!0,"md-alert-banner__with-title":!!this.titleText,leading:this.isLeadingAlignment||this.titleText}}get alertBannerRightClassMap(){return{trailing:this.isLeadingAlignment||this.titleText}}get closeButtonTemplate(){const t=this.titleText?"close-div with-title":"close-div";return n.html`
|
|
94
94
|
<div class="${t}">
|
|
95
95
|
<md-button
|
|
96
96
|
class="md-alert-banner__close"
|
|
@@ -153,52 +153,52 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
153
153
|
${t}
|
|
154
154
|
</div>
|
|
155
155
|
`:n.nothing}
|
|
156
|
-
`}};p([(0,l.property)({type:String})],e.prototype,"type",void 0),p([(0,l.property)({type:String})],e.prototype,"titleText",void 0),p([(0,l.property)({type:String})],e.prototype,"message",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"closable",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,l.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"showBannerTypeIcon",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"showRefreshButton",void 0),p([(0,l.property)({type:String})],e.prototype,"alignment",void 0),e=p([(0,s.w)("md-alert-banner")],e),t.ELEMENT=e}(o||(o={}))},5925(t,e,i){i.d(e,{F:()=>o}),i(1821),i(5095);var o,s=i(9609),
|
|
156
|
+
`}};p([(0,l.property)({type:String})],e.prototype,"type",void 0),p([(0,l.property)({type:String})],e.prototype,"titleText",void 0),p([(0,l.property)({type:String})],e.prototype,"message",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"closable",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,l.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"showBannerTypeIcon",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"showRefreshButton",void 0),p([(0,l.property)({type:String})],e.prototype,"alignment",void 0),e=p([(0,s.w)("md-alert-banner")],e),t.ELEMENT=e}(o||(o={}))},5925(t,e,i){i.d(e,{F:()=>o}),i(1821),i(5095);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(226),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.closable=!1,this.message="",this.show=!1,this.internalClose=!0,this.title="",this.btnlabel="Close",this.type="default",this.inline=!1,this.newMomentum=!1,this.primaryButton="",this.primaryButtonVariant="primary",this.primaryButtonColor="",this.secondaryButton="",this.link=!1,this.showMore=!1,this.href="",this.hasFooterSlotContent=!1,this.renderIconTemplate=()=>{switch(this.type){case"error":return r.html`
|
|
157
157
|
<md-icon
|
|
158
158
|
name="error-legacy-bold"
|
|
159
159
|
size="${this.newMomentum?24:32}"
|
|
160
160
|
iconSet="momentumDesign"
|
|
161
161
|
color="var(--md-alert-error-text-color, red)"
|
|
162
162
|
></md-icon>
|
|
163
|
-
`;case"info":return
|
|
163
|
+
`;case"info":return r.html`
|
|
164
164
|
<md-icon
|
|
165
165
|
name="info-circle-bold"
|
|
166
166
|
size="${this.newMomentum?24:32}"
|
|
167
167
|
iconSet="momentumDesign"
|
|
168
168
|
color="var(--md-alert-info-text-color, blue)"
|
|
169
169
|
></md-icon>
|
|
170
|
-
`;case"success":return
|
|
170
|
+
`;case"success":return r.html`
|
|
171
171
|
<md-icon
|
|
172
172
|
name="check-circle-bold"
|
|
173
173
|
size="${this.newMomentum?24:32}"
|
|
174
174
|
iconSet="momentumDesign"
|
|
175
175
|
color="var(--md-alert-success-text-color, green)"
|
|
176
176
|
></md-icon>
|
|
177
|
-
`;case"warn":case"warning":return
|
|
177
|
+
`;case"warn":case"warning":return r.html`
|
|
178
178
|
<md-icon
|
|
179
179
|
name="warning-bold"
|
|
180
180
|
size="${this.newMomentum?24:32}"
|
|
181
181
|
iconSet="momentumDesign"
|
|
182
182
|
color="var(--md-alert-warning-text-color, orange)"
|
|
183
183
|
></md-icon>
|
|
184
|
-
`;case"message":return
|
|
184
|
+
`;case"message":return r.html`
|
|
185
185
|
<md-icon
|
|
186
186
|
name="chat-bold"
|
|
187
187
|
size="${this.newMomentum?24:32}"
|
|
188
188
|
iconSet="momentumDesign"
|
|
189
189
|
color="var(--alert-title-text-color)"
|
|
190
190
|
></md-icon>
|
|
191
|
-
`;case"loading":return
|
|
191
|
+
`;case"loading":return r.html`<md-spinner size="24"></md-spinner>`;default:return r.html` <slot name="alert-icon"></slot> `}}}connectedCallback(){super.connectedCallback(),this.updateFooterSlotInUse()}close(){this.dispatchEvent(new CustomEvent("alert-close",{composed:!0,bubbles:!0})),this.internalClose&&(this.show=!1)}static get styles(){return[a.A,d.A]}get alertClassMap(){return{[`md-alert--${this.type}`]:!!this.type,"md-alert__inline":this.inline}}get slottedFooterClassMap(){return{"is-empty":!this.hasFooterSlotContent}}legacyRender(){return r.html`
|
|
192
192
|
<div role="alert" aria-live="polite" part="alert" class="md-alert ${(0,l.classMap)(this.alertClassMap)}">
|
|
193
193
|
<div class="md-alert__icon aria-hidden=true">${this.renderIconTemplate()}</div>
|
|
194
194
|
<div part="content" class="md-alert__content">
|
|
195
|
-
${this.title&&""!==this.title?
|
|
195
|
+
${this.title&&""!==this.title?r.html` <div class="md-alert__title" role="heading" aria-level="1">${this.title}</div> `:r.nothing}
|
|
196
196
|
<div class="md-alert__message">
|
|
197
197
|
${this.message}
|
|
198
198
|
<slot name="alert-body"></slot>
|
|
199
199
|
</div>
|
|
200
200
|
</div>
|
|
201
|
-
${this.closable?
|
|
201
|
+
${this.closable?r.html`
|
|
202
202
|
<div class="md-alert__button">
|
|
203
203
|
<md-button
|
|
204
204
|
ariaLabel="${this.btnlabel}"
|
|
@@ -210,15 +210,15 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
210
210
|
<md-icon slot="icon" name="cancel-bold" size="18" iconSet="momentumDesign"></md-icon>
|
|
211
211
|
</md-button>
|
|
212
212
|
</div>
|
|
213
|
-
`:
|
|
213
|
+
`:r.html`
|
|
214
214
|
<div class="md-alert__footer">
|
|
215
215
|
<slot name="alert-footer"></slot>
|
|
216
216
|
</div>
|
|
217
217
|
`}
|
|
218
218
|
</div>
|
|
219
|
-
`}renderNewAlertDefaultFooter(){return
|
|
219
|
+
`}renderNewAlertDefaultFooter(){return r.html`
|
|
220
220
|
<div class="md-new-alert__footer">
|
|
221
|
-
${this.link?
|
|
221
|
+
${this.link?r.html`
|
|
222
222
|
<md-link href="${this.href}">
|
|
223
223
|
<span class="md-new-alert__link"
|
|
224
224
|
>Link
|
|
@@ -231,33 +231,33 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
231
231
|
</md-icon>
|
|
232
232
|
</span>
|
|
233
233
|
</md-link>
|
|
234
|
-
`:
|
|
235
|
-
${this.secondaryButton?
|
|
234
|
+
`:r.nothing}
|
|
235
|
+
${this.secondaryButton?r.html` <md-button variant="secondary" .clickFunction="${this.secondaryButtonClickFunction}">
|
|
236
236
|
${this.secondaryButton}
|
|
237
|
-
</md-button>`:
|
|
238
|
-
${this.primaryButton?
|
|
237
|
+
</md-button>`:r.nothing}
|
|
238
|
+
${this.primaryButton?r.html`<md-button
|
|
239
239
|
variant=${this.primaryButtonVariant}
|
|
240
240
|
color=${this.primaryButtonColor}
|
|
241
241
|
.clickFunction="${this.primaryButtonClickFunction}"
|
|
242
242
|
>
|
|
243
243
|
${this.primaryButton}
|
|
244
|
-
</md-button>`:
|
|
244
|
+
</md-button>`:r.nothing}
|
|
245
245
|
</div>
|
|
246
|
-
`}handleSlotContentChange(t){this.updateFooterSlotInUse()}updateFooterSlotInUse(){var t;this.hasFooterSlotContent=(null===(t=this.alertFooterSlot)||void 0===t?void 0:t.assignedNodes().length)>0}renderSlottedFooter(){return
|
|
246
|
+
`}handleSlotContentChange(t){this.updateFooterSlotInUse()}updateFooterSlotInUse(){var t;this.hasFooterSlotContent=(null===(t=this.alertFooterSlot)||void 0===t?void 0:t.assignedNodes().length)>0}renderSlottedFooter(){return r.html` <div class="md-new-alert__footer ${(0,l.classMap)(this.slottedFooterClassMap)}">
|
|
247
247
|
<slot name="alert-footer" @slotchange=${this.handleSlotContentChange}></slot>
|
|
248
|
-
</div>`}newRender(){var t,e;return
|
|
248
|
+
</div>`}newRender(){var t,e;return r.html`
|
|
249
249
|
<div role="alert" aria-live="polite" part="alert" class="md-new-alert ${(0,l.classMap)(this.alertClassMap)}">
|
|
250
250
|
<div class="md-new-alert__body">
|
|
251
251
|
<div class="md-new-alert__icon aria-hidden=true">${this.renderIconTemplate()}</div>
|
|
252
252
|
<div part="content" class="md-new-alert__content">
|
|
253
|
-
${this.title&&""!==this.title?
|
|
253
|
+
${this.title&&""!==this.title?r.html` <div class="md-new-alert__title" role="heading" aria-level="1">${this.title}</div> `:r.nothing}
|
|
254
254
|
<div class="md-new-alert__message" part="message" title="${null===(t=this.message)||void 0===t?void 0:t.trim()}">
|
|
255
255
|
<span class="md-new-alert__message_span" part="text">${null===(e=this.message)||void 0===e?void 0:e.trim()}</span>
|
|
256
256
|
<slot name="alert-body"></slot>
|
|
257
|
-
${this.showMore?
|
|
257
|
+
${this.showMore?r.html`<md-link href=${this.href} inline>Show more...</md-link>`:r.nothing}
|
|
258
258
|
</div>
|
|
259
259
|
</div>
|
|
260
|
-
${this.closable?
|
|
260
|
+
${this.closable?r.html`
|
|
261
261
|
<div class="md-new-alert__button">
|
|
262
262
|
<md-button
|
|
263
263
|
ariaLabel="${this.btnlabel}"
|
|
@@ -269,11 +269,11 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
269
269
|
<md-icon slot="icon" name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
270
270
|
</md-button>
|
|
271
271
|
</div>
|
|
272
|
-
`:
|
|
272
|
+
`:r.nothing}
|
|
273
273
|
</div>
|
|
274
274
|
${this.primaryButton||this.secondaryButton||this.link?this.renderNewAlertDefaultFooter():this.renderSlottedFooter()}
|
|
275
275
|
</div>
|
|
276
|
-
`}get alertRender(){return this.newMomentum?this.newRender():this.legacyRender()}render(){return
|
|
276
|
+
`}get alertRender(){return this.newMomentum?this.newRender():this.legacyRender()}render(){return r.html` ${this.show?this.alertRender:r.nothing} `}};h([(0,n.property)({type:Boolean})],e.prototype,"closable",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"internalClose",void 0),h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"btnlabel",void 0),h([(0,n.property)({type:String})],e.prototype,"type",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"inline",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"newMomentum",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonVariant",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonColor",void 0),h([(0,n.property)()],e.prototype,"primaryButtonClickFunction",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)()],e.prototype,"secondaryButtonClickFunction",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"link",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showMore",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)('slot[name="alert-footer"]')],e.prototype,"alertFooterSlot",void 0),h([(0,n.state)()],e.prototype,"hasFooterSlotContent",void 0),e=h([(0,s.w)("md-alert")],e),t.ELEMENT=e}(o||(o={}))},3764(t,e,i){i.d(e,{Y$:()=>u}),i(5983),i(1821),i(9613);var o=i(2900),s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(9404),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const p=[{value:.25,label:"0.25"},{value:.5,label:"0.50"},{value:.75,label:"0.75"},{value:1,label:"Normal"},{value:1.25,label:"1.25"},{value:1.5,label:"1.50"},{value:1.75,label:"1.75"},{value:2,label:"2"}],c={playBtn:{ariaLabel:"Play",tooltipText:"Play"},pauseBtn:{ariaLabel:"Pause",tooltipText:"Pause"},duration:{ariaLabel:"Duration:",tooltipText:"Duration"},timeline:{ariaLabel:"Audio Seekbar",tooltipText:"Audio Seekbar"},volumeBtn:{ariaLabel:"Mute / Unmute Audio",tooltipText:"Mute / Unmute"},volumeSlider:{ariaLabel:"Volume level",tooltipText:"Volume level"},playbackSpeedBtn:{ariaLabel:"Playback speed",tooltipText:"Playback speed"}};var u;!function(t){let e=class extends r.LitElement{constructor(){super(),this.src="",this.events=[],this.isPlaying=!1,this.isMuted=!1,this.duration=0,this.volume=100,this.currentTime=0,this.showSpeedPopup=!1,this.playbackSpeed=1,this.volumeExpanded=!1,this.bufferedRange=0,this.selectedPlaybackSpeed=this.playbackSpeed,this.currentlySelectingPlaybackSpeed=!1,this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>"speed-btn"===t.id),e||(this.showSpeedPopup=!1))},this.handleKeyDown=t=>{const{code:e}=t;switch(e){case o.Uz.ArrowLeft:this.volumeExpanded?this.setVolumeKeydown(this.volume-.01):this.setTimeKeydown(this.currentTime-1);break;case o.Uz.ArrowRight:this.volumeExpanded?this.setVolumeKeydown(this.volume+.01):this.setTimeKeydown(this.currentTime+1);break;case o.Uz.ArrowUp:if(this.showSpeedPopup){this.currentlySelectingPlaybackSpeed=!0;const e=p.findIndex(t=>t.value===this.selectedPlaybackSpeed),i=Math.max(0,e-1);this.selectedPlaybackSpeed=p[i].value,t.preventDefault(),this.currentlySelectingPlaybackSpeed=!1}break;case o.Uz.ArrowDown:if(this.showSpeedPopup){this.currentlySelectingPlaybackSpeed=!0;const e=p.findIndex(t=>t.value===this.selectedPlaybackSpeed),i=Math.min(p.length-1,e+1);this.selectedPlaybackSpeed=p[i].value,t.preventDefault(),this.currentlySelectingPlaybackSpeed=!1}break;case o.Uz.Enter:this.showSpeedPopup&&(this.setPlaybackSpeed(this.selectedPlaybackSpeed),t.preventDefault())}},this.audio=new Audio,this.setAudioEventListeners(),this.labelMap=c}firstUpdated(t){super.firstUpdated(t),t.has("src")&&(this.audio.src=this.src)}updated(t){super.updated(t),t.has("src")&&(this.audio.src=this.src)}connectedCallback(){super.connectedCallback(),this.requestUpdate("src"),document.addEventListener("click",this.onOutsideClick),document.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onOutsideClick),document.removeEventListener("keydown",this.handleKeyDown),this.audio.pause(),this.isPlaying=!1}setAudioEventListeners(){this.audio.onloadeddata=()=>{this.duration=this.audio.duration,this.audio.volume=.75},this.audio.onerror=()=>{this.audio.src&&this.dispatchEvent(new CustomEvent("playback-error",{composed:!0,bubbles:!0}))},this.audio.onended=()=>{this.audio.currentTime=0,this.isPlaying=!1},this.audio.ontimeupdate=()=>{this.currentTime=this.audio.currentTime},this.audio.onvolumechange=()=>{this.volume=this.audio.volume},this.audio.onprogress=()=>{this.audio.buffered.length>0&&(this.bufferedRange=this.audio.buffered.end(this.audio.buffered.length-1))}}togglePlay(){this.isPlaying=!this.isPlaying,this.isPlaying?(this.audio.play(),this.dispatchEvent(new CustomEvent("play-clicked",{composed:!0,bubbles:!0}))):this.audio.pause()}toTimecode(t){const e=Math.floor(t);return`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`}setTime(t){const e=this.getBarPercentage(t,"timeline"),i=Math.floor(e*this.duration);this.audio.currentTime=i}setVolumeElement(t){this.volumeElement="volume"===t.target.className?t.target:t.target.parentElement}handleVolumeChange(t){let e=!1;this.setVolumeElement(t),this.setVolume(t);const i=t=>{e||(e=!0),this.volumeExpanded?this.setVolume(t):s()},o=()=>{s()},s=()=>{e=!1,window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",i),window.addEventListener("mouseup",o),t.preventDefault()}getVolumeFromSlider(t){if(null===this.volumeElement)return 0;const e=this.volumeElement.getBoundingClientRect(),i=t.clientX-e.x;return Math.max(0,Math.min(1,i/e.width))}setVolume(t){const e=this.getVolumeFromSlider(t);this.audio.volume=e}getBarPercentage(t,e){const i=(t.target.className===e?t.target:t.target.parentElement).getBoundingClientRect();return(t.clientX-i.x)/i.width}toggleSoundMute(){this.isMuted=!this.isMuted,this.audio.muted=this.isMuted}toggleSpeedPopup(){this.showSpeedPopup=!this.showSpeedPopup}setTimeKeydown(t){t>this.duration?(this.currentTime=this.duration,this.audio.currentTime=this.duration):t<0?(this.currentTime=0,this.audio.currentTime=0):(this.currentTime=t,this.audio.currentTime=t)}setVolumeKeydown(t){t>1?(this.volume=1,this.audio.volume=1):t<0?(this.isMuted||this.toggleSoundMute(),this.volume=0,this.audio.volume=0):(this.isMuted&&this.toggleSoundMute(),this.volume=t,this.audio.volume=t)}get popupClassMap(){return{"popup-open":this.showSpeedPopup}}setPlaybackSpeed(t){this.playbackSpeed=t,this.selectedPlaybackSpeed=t,this.audio.playbackRate=this.playbackSpeed,this.showSpeedPopup=!1}toggleVolumeExpand(t){this.volumeExpanded=t}static get styles(){return[a.A,d.A]}render(){return r.html`
|
|
277
277
|
<div class="md-audio-player">
|
|
278
278
|
<div class="inner-container">
|
|
279
279
|
<div class="play-container">
|
|
@@ -287,7 +287,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
287
287
|
@click=${this.togglePlay}
|
|
288
288
|
aria-label="${this.isPlaying?this.labelMap.pauseBtn.ariaLabel:this.labelMap.playBtn.ariaLabel}"
|
|
289
289
|
>
|
|
290
|
-
${this.isPlaying?
|
|
290
|
+
${this.isPlaying?r.html` <md-icon slot="icon" name="pause-bold" size="16" iconSet="momentumDesign"></md-icon> `:r.html` <md-icon slot="icon" name="play-bold" size="16" iconSet="momentumDesign"></md-icon> `}
|
|
291
291
|
</md-button>
|
|
292
292
|
</md-tooltip>
|
|
293
293
|
</div>
|
|
@@ -334,9 +334,9 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
334
334
|
aria-label="${this.labelMap.volumeBtn.ariaLabel}"
|
|
335
335
|
@click=${this.toggleSoundMute}
|
|
336
336
|
>
|
|
337
|
-
${this.isMuted?
|
|
337
|
+
${this.isMuted?r.html`
|
|
338
338
|
<md-icon slot="icon" name="speaker-muted-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
339
|
-
`:
|
|
339
|
+
`:r.html` <md-icon slot="icon" name="speaker-bold" size="16" iconSet="momentumDesign"></md-icon> `}
|
|
340
340
|
</md-button>
|
|
341
341
|
</md-tooltip>
|
|
342
342
|
</div>
|
|
@@ -348,13 +348,13 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
348
348
|
</md-tooltip>
|
|
349
349
|
<div class="speed-popup ${(0,l.classMap)(this.popupClassMap)}">
|
|
350
350
|
<ul id="speed-popup-menu">
|
|
351
|
-
${p.map(t=>{const e=this.selectedPlaybackSpeed==t.value&&!this.currentlySelectingPlaybackSpeed;return
|
|
351
|
+
${p.map(t=>{const e=this.selectedPlaybackSpeed==t.value&&!this.currentlySelectingPlaybackSpeed;return r.html`
|
|
352
352
|
<li
|
|
353
353
|
class=${e?"speed-popup-selected-speed":""}
|
|
354
354
|
@click=${()=>this.setPlaybackSpeed(t.value)}
|
|
355
355
|
>
|
|
356
356
|
<span>${t.label}</span>
|
|
357
|
-
${this.playbackSpeed==t.value?
|
|
357
|
+
${this.playbackSpeed==t.value?r.html`
|
|
358
358
|
<md-icon
|
|
359
359
|
slot="icon"
|
|
360
360
|
color="md-blue-60"
|
|
@@ -362,7 +362,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
362
362
|
size="16"
|
|
363
363
|
iconSet="momentumDesign"
|
|
364
364
|
></md-icon>
|
|
365
|
-
`:
|
|
365
|
+
`:r.nothing}
|
|
366
366
|
</li>
|
|
367
367
|
`})}
|
|
368
368
|
</ul>
|
|
@@ -370,32 +370,32 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
370
370
|
</div>
|
|
371
371
|
</div>
|
|
372
372
|
</div>
|
|
373
|
-
`}};h([(0,n.property)({type:String})],e.prototype,"src",void 0),h([(0,n.property)({type:Object})],e.prototype,"labelMap",void 0),h([(0,n.state)()],e.prototype,"events",void 0),h([(0,n.state)()],e.prototype,"audio",void 0),h([(0,n.state)()],e.prototype,"volumeElement",void 0),h([(0,n.state)()],e.prototype,"isPlaying",void 0),h([(0,n.state)()],e.prototype,"isMuted",void 0),h([(0,n.state)()],e.prototype,"duration",void 0),h([(0,n.state)()],e.prototype,"volume",void 0),h([(0,n.state)()],e.prototype,"currentTime",void 0),h([(0,n.state)()],e.prototype,"showSpeedPopup",void 0),h([(0,n.state)()],e.prototype,"playbackSpeed",void 0),h([(0,n.state)()],e.prototype,"volumeExpanded",void 0),h([(0,n.state)()],e.prototype,"bufferedRange",void 0),h([(0,n.state)()],e.prototype,"selectedPlaybackSpeed",void 0),h([(0,n.state)()],e.prototype,"currentlySelectingPlaybackSpeed",void 0),e=h([(0,s.w)("md-audio-player")],e),t.ELEMENT=e}(u||(u={}))},4470(t,e,i){i.d(e,{mS:()=>s,uW:()=>o});const o=["bot","group","self","typing",""],s={active:"Available",meeting:"In a meeting",schedule:"Scheduled",call:"On a call",dnd:"Do not disturb",presenting:"Presenting","quiet-hours":"Quiet hours",away:"Away",idle:"Idle",inactive:"Inactive","away-calling":"Away",ooo:"Out of office",busy:"Busy","on-mobile":"On mobile","on-device":"On device","on-hold":"On hold",engaged:"Engaged",rona:"Unavailable",wrapup:"Wrap up"}},9124(t,e,i){i.d(e,{X:()=>o});var o,s=i(9609),
|
|
373
|
+
`}};h([(0,n.property)({type:String})],e.prototype,"src",void 0),h([(0,n.property)({type:Object})],e.prototype,"labelMap",void 0),h([(0,n.state)()],e.prototype,"events",void 0),h([(0,n.state)()],e.prototype,"audio",void 0),h([(0,n.state)()],e.prototype,"volumeElement",void 0),h([(0,n.state)()],e.prototype,"isPlaying",void 0),h([(0,n.state)()],e.prototype,"isMuted",void 0),h([(0,n.state)()],e.prototype,"duration",void 0),h([(0,n.state)()],e.prototype,"volume",void 0),h([(0,n.state)()],e.prototype,"currentTime",void 0),h([(0,n.state)()],e.prototype,"showSpeedPopup",void 0),h([(0,n.state)()],e.prototype,"playbackSpeed",void 0),h([(0,n.state)()],e.prototype,"volumeExpanded",void 0),h([(0,n.state)()],e.prototype,"bufferedRange",void 0),h([(0,n.state)()],e.prototype,"selectedPlaybackSpeed",void 0),h([(0,n.state)()],e.prototype,"currentlySelectingPlaybackSpeed",void 0),e=h([(0,s.w)("md-audio-player")],e),t.ELEMENT=e}(u||(u={}))},4470(t,e,i){i.d(e,{mS:()=>s,uW:()=>o});const o=["bot","group","self","typing",""],s={active:"Available",meeting:"In a meeting",schedule:"Scheduled",call:"On a call",dnd:"Do not disturb",presenting:"Presenting","quiet-hours":"Quiet hours",away:"Away",idle:"Idle",inactive:"Inactive","away-calling":"Away",ooo:"Out of office",busy:"Busy","on-mobile":"On mobile","on-device":"On device","on-hold":"On hold",engaged:"Engaged",rona:"Unavailable",wrapup:"Wrap up"}},9124(t,e,i){i.d(e,{X:()=>o});var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(6325),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.size=0}static get styles(){return[a.A,d.A]}get avatarClassMap(){return{[`md-composite-avatar--${this.size}`]:!!this.size}}render(){return r.html`
|
|
374
374
|
<div class="md-composite-avatar ${(0,l.classMap)(this.avatarClassMap)}">
|
|
375
375
|
<slot></slot>
|
|
376
376
|
</div>
|
|
377
|
-
`}};h([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=h([(0,s.w)("md-composite-avatar")],e),t.ELEMENT=e}(o||(o={}))},4958(t,e,i){i.d(e,{M_:()=>
|
|
377
|
+
`}};h([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=h([(0,s.w)("md-composite-avatar")],e),t.ELEMENT=e}(o||(o={}))},4958(t,e,i){i.d(e,{M_:()=>r,UZ:()=>a,ZE:()=>s,su:()=>n,zY:()=>l,zj:()=>o});const o={24:24,32:32,36:36,40:40,48:48,64:64,72:72,88:88,124:124},s={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},a={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},r={PRIMARY:"primary",SECONDARY:"secondary"},n={SUCCESS:"success",WARNING:"warning",ERROR:"error"},l=(Object.assign(Object.assign({},r),n),{TYPE:s.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:r.PRIMARY,ICON_SIZE:12})},3445(t,e,i){i.d(e,{Q:()=>o});var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(3517),d=i(2577),h=i(9485),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.label="Breadcrumb",this.navCrumbs=[]}static get styles(){return[a.A,h.A]}setLastAnchorCurrent(){var t;(null===(t=this.anchors)||void 0===t?void 0:t.length)&&this.anchors[this.anchors.length-1].setAttribute("aria-current","page")}firstUpdated(t){super.firstUpdated(t),this.setLastAnchorCurrent()}update(t){super.update(t),t.has("navCrumbs")&&this.setLastAnchorCurrent()}handleClick(t){var e;const i=t.target;if(null===(e=this.anchors)||void 0===e?void 0:e.length){const t=Array.from(this.anchors).indexOf(i);-1!==t&&(this.navCrumbs=[...this.navCrumbs.splice(0,t+1)])}}render(){return r.html`
|
|
378
378
|
<nav aria-label="${(0,l.ifDefined)(this.label?this.label:void 0)}" class="md-breadcrumb">
|
|
379
379
|
<ul @click=${t=>this.handleClick(t)}>
|
|
380
|
-
${(0,d.repeat)(this.navCrumbs,t=>t.link,t=>
|
|
380
|
+
${(0,d.repeat)(this.navCrumbs,t=>t.link,t=>r.html`
|
|
381
381
|
<li>
|
|
382
382
|
<a href="${t.link}"> ${t.label} </a>
|
|
383
383
|
</li>
|
|
384
384
|
`)}
|
|
385
385
|
</ul>
|
|
386
386
|
</nav>
|
|
387
|
-
`}};p([(0,n.property)({type:String,attribute:"aria-label"})],e.prototype,"label",void 0),p([(0,n.property)({type:Array,attribute:"nav-crumbs",reflect:!0})],e.prototype,"navCrumbs",void 0),p([(0,n.queryAll)("a[href]")],e.prototype,"anchors",void 0),e=p([(0,s.w)("md-breadcrumb")],e),t.ELEMENT=e}(o||(o={}))},2890(t,e,i){i.d(e,{e:()=>o});var o,s=i(2900),
|
|
387
|
+
`}};p([(0,n.property)({type:String,attribute:"aria-label"})],e.prototype,"label",void 0),p([(0,n.property)({type:Array,attribute:"nav-crumbs",reflect:!0})],e.prototype,"navCrumbs",void 0),p([(0,n.queryAll)("a[href]")],e.prototype,"anchors",void 0),e=p([(0,s.w)("md-breadcrumb")],e),t.ELEMENT=e}(o||(o={}))},2890(t,e,i){i.d(e,{e:()=>o});var o,s=i(2900),a=i(7704),r=i(4084),n=i(2927),l=i(8899),d=i(2670),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.TS)((0,a.yC)(n.LitElement))){constructor(){super(...arguments),this.active=0,this.tabIndex=0,this.newMomentum=!1,this._disabled=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-disabled",`${t}`),this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}get slotElement(){return this.buttonSlot}static get styles(){return[r.A,d.A]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","group")}setButtonTabIndex(){this.slotted.forEach(t=>t.tabIndex=-1)}updated(t){super.updated(t),t.has("slotted")&&(this.setButtonTabIndex(),this.setFirstActive())}get selectedBtnValue(){return this.slotted[this.active].value}notifySelectedChange(){this.dispatchEvent(new CustomEvent("button-group-change",{detail:{selected:this.selectedBtnValue},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}setSelected(t){var e,i;const o=this.findSelectedBtnIndex();-1!==o&&o!==t&&(null===(e=this.slotted[o])||void 0===e||e.toggleAttribute("selected",!1)),null===(i=this.slotted[t])||void 0===i||i.toggleAttribute("selected",!0)}setFirstActive(){-1===this.findSelectedBtnIndex()&&this.setSelected(this.active)}findBtnIndex(t){const e=t.composedPath();return this.slotted.findIndex(t=>e.includes(t))}findSelectedBtnIndex(){return this.slotted.findIndex(t=>t.hasAttribute("selected"))}isBtnDisabled(t){return this.slotted[t].disabled}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}switchBtnOnArrowPress(t,e=1){const i=this.getAvailableSelectedIndex(t,e);-1!==i&&(this.active=i,this.setSelected(i),this.notifySelectedChange())}getAvailableSelectedIndex(t,e=1){const i=this.slotted.length;for(let o=0,s=t;o<i;o+=1,s+=e){s<0?s=i-1:s>=i&&(s=0);const t=this.slotted[s];if(this.isFocusable(t))return s}return-1}isFocusable(t){return!t.hasAttribute("disabled")&&!t.hasAttribute("hidden")}handleClick(t){const e=this.findBtnIndex(t);-1!==e&&(this.isBtnDisabled(e)||(this.active=e,this.setSelected(e),this.notifySelectedChange()))}handleKeyDown(t){const{code:e}=t;switch(e){case s.Uz.Enter:case s.Uz.Space:this.isBtnDisabled(this.active)||(this.setSelected(this.active),this.notifySelectedChange());break;case s.Uz.ArrowLeft:0===this.active?this.switchBtnOnArrowPress(this.slotted.length-1,-1):this.switchBtnOnArrowPress(this.active-1,-1);break;case s.Uz.ArrowRight:this.active===this.slotted.length-1?this.switchBtnOnArrowPress(0):this.switchBtnOnArrowPress(this.active+1)}}render(){return n.html`
|
|
388
388
|
<div role="group" class="md-button-group" part="button-group">
|
|
389
389
|
<slot name="button"></slot>
|
|
390
390
|
</div>
|
|
391
|
-
`}};h([(0,l.property)({type:Number,reflect:!0})],e.prototype,"active",void 0),h([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"newMomentum",void 0),h([(0,l.query)("slot[name='button']")],e.prototype,"buttonSlot",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),e=h([(0,
|
|
391
|
+
`}};h([(0,l.property)({type:Number,reflect:!0})],e.prototype,"active",void 0),h([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"newMomentum",void 0),h([(0,l.query)("slot[name='button']")],e.prototype,"buttonSlot",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),e=h([(0,a.wW)("md-button-group")],e),t.ELEMENT=e}(o||(o={}))},5983(t,e,i){i.d(e,{$n:()=>o});var o,s=i(6616),a=(i(9773),i(9609)),r=i(7154),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(680),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this._active=!1,this._tabIndex=0,this.ariaLabel="",this.ariaLabelledBy="",this.ariaLive="",this.ariaExpanded="",this.ariaHaspopup="false",this.ariaPressed="",this.circle=!1,this.rounded=!1,this.color="",this.containerLarge=!1,this.disabled=!1,this.href="",this.id="",this.value="",this.keyboardKey="",this.label="",this.loading=!1,this.outline=!1,this.hasRemoveStyle=!1,this.size="32",this.tag="button",this.type="button",this.role="button",this.variant="secondary",this.width="",this.maxWidth="",this.activityType="",this.iconActive=!1,this.isActive=!1,this.autofocus=!1,this.renderWidth=()=>this.width?`width: ${this.width};`:l.nothing,this.renderMaxWidth=()=>this.maxWidth?`max-width: ${this.maxWidth};`:l.nothing,this.getStyles=()=>{if(this.width||this.maxWidth)return l.html`
|
|
392
392
|
<style>
|
|
393
393
|
:host .md-button--${this.size} {
|
|
394
394
|
${this.renderWidth()};
|
|
395
395
|
${this.renderMaxWidth()};
|
|
396
396
|
}
|
|
397
397
|
</style>
|
|
398
|
-
`},this.iconTemplate=()=>this.loading?l.html` <md-spinner size="16"></md-spinner> `:l.html` <slot name="icon"></slot> `,this.textTemplate=()=>this.circle&&this.hasIcon?l.nothing:l.html` <slot name="text"></slot> `}get active(){return this._active}set active(t){const e=this._active;this._active=t,this.requestUpdate("active",e)}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}firstUpdated(t){super.firstUpdated(t),this.autofocus&&requestAnimationFrame(()=>{this.manageAutoFocus()})}manageAutoFocus(t){(null!=t?t:this).focus()}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}blur(){var t;null===(t=this.button)||void 0===t||t.blur()}handleKeyDown(t){if(this.disabled)return;const{code:e}=t;(0,
|
|
398
|
+
`},this.iconTemplate=()=>this.loading?l.html` <md-spinner size="16"></md-spinner> `:l.html` <slot name="icon"></slot> `,this.textTemplate=()=>this.circle&&this.hasIcon?l.nothing:l.html` <slot name="text"></slot> `}get active(){return this._active}set active(t){const e=this._active;this._active=t,this.requestUpdate("active",e)}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}firstUpdated(t){super.firstUpdated(t),this.autofocus&&requestAnimationFrame(()=>{this.manageAutoFocus()})}manageAutoFocus(t){(null!=t?t:this).focus()}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}blur(){var t;null===(t=this.button)||void 0===t||t.blur()}handleKeyDown(t){if(this.disabled)return;const{code:e}=t;(0,r.o)(e)&&this.dispatchEvent(new CustomEvent("button-keydown",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleClick(t){var e;this.disabled||(null===(e=this.clickFunction)||void 0===e||e.call(this),this.dispatchEvent(new CustomEvent("button-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})))}static get styles(){return[n.A,c.A,s.A]}get buttonClassMap(){return{"md-button--circle":this.circle,"md-button--rounded":this.rounded,"md-button--none":this.hasRemoveStyle,"md-button--outline":this.outline,active:this.active&&!this.disabled,disabled:this.disabled&&!this.active,isActive:this.isActive,[`md-button--${this.size}`]:!this.hasRemoveStyle,[`md-button--${this.color}`]:!this.hasRemoveStyle&&!!this.color,[`md-activity__${this.activityType}`]:!!this.activityType,"md-activity":!!this.activityType,"md-button--icon":this.iconActive,"md-button--onlyicon":this.hasIcon&&!this.slottedText,"md-button--placeholder-text":!0===this.isPlaceholderText}}get slottedText(){var t;return null===(t=this.querySelector("[slot=text]"))||void 0===t?void 0:t.textContent}get hasIcon(){return null!==this.querySelector("[slot=icon]")||this.loading}childrenTemplate(){return l.html`
|
|
399
399
|
<span part="button-children" class="md-button__children">
|
|
400
400
|
${this.iconTemplate()} ${this.textTemplate()}
|
|
401
401
|
<slot></slot>
|
|
@@ -466,7 +466,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
466
466
|
<div part="button-label" class="md-button__label">${this.label}</div>
|
|
467
467
|
</div>
|
|
468
468
|
`:l.html` ${this.buttonTemplate(this.tag)} `}
|
|
469
|
-
`}};u([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"active",null),u([(0,d.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),u([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLabelledBy",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLive",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaExpanded",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaHaspopup",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaPressed",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"circle",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"rounded",void 0),u([(0,d.property)({type:String})],e.prototype,"color",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"containerLarge",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:String})],e.prototype,"href",void 0),u([(0,d.property)({type:String})],e.prototype,"id",void 0),u([(0,d.property)({type:String})],e.prototype,"value",void 0),u([(0,d.property)({type:String})],e.prototype,"keyboardKey",void 0),u([(0,d.property)({type:String})],e.prototype,"label",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"loading",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"outline",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"hasRemoveStyle",void 0),u([(0,d.property)({type:String})],e.prototype,"size",void 0),u([(0,d.property)({type:String})],e.prototype,"tag",void 0),u([(0,d.property)({type:String})],e.prototype,"type",void 0),u([(0,d.property)({type:String})],e.prototype,"role",void 0),u([(0,d.property)({type:String})],e.prototype,"variant",void 0),u([(0,d.property)({type:String})],e.prototype,"width",void 0),u([(0,d.property)({type:String})],e.prototype,"maxWidth",void 0),u([(0,d.property)({type:String})],e.prototype,"activityType",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"iconActive",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"isActive",void 0),u([(0,d.property)({type:String,attribute:"aria-describedby"})],e.prototype,"ariaDescribedBy",void 0),u([(0,d.property)({attribute:!1})],e.prototype,"clickFunction",void 0),u([(0,d.property)({type:Boolean,attribute:"is-placeholder-text"})],e.prototype,"isPlaceholderText",void 0),u([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),u([(0,d.query)(".md-button")],e.prototype,"button",void 0),e=u([(0,
|
|
469
|
+
`}};u([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"active",null),u([(0,d.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),u([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLabelledBy",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLive",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaExpanded",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaHaspopup",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaPressed",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"circle",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"rounded",void 0),u([(0,d.property)({type:String})],e.prototype,"color",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"containerLarge",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:String})],e.prototype,"href",void 0),u([(0,d.property)({type:String})],e.prototype,"id",void 0),u([(0,d.property)({type:String})],e.prototype,"value",void 0),u([(0,d.property)({type:String})],e.prototype,"keyboardKey",void 0),u([(0,d.property)({type:String})],e.prototype,"label",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"loading",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"outline",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"hasRemoveStyle",void 0),u([(0,d.property)({type:String})],e.prototype,"size",void 0),u([(0,d.property)({type:String})],e.prototype,"tag",void 0),u([(0,d.property)({type:String})],e.prototype,"type",void 0),u([(0,d.property)({type:String})],e.prototype,"role",void 0),u([(0,d.property)({type:String})],e.prototype,"variant",void 0),u([(0,d.property)({type:String})],e.prototype,"width",void 0),u([(0,d.property)({type:String})],e.prototype,"maxWidth",void 0),u([(0,d.property)({type:String})],e.prototype,"activityType",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"iconActive",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"isActive",void 0),u([(0,d.property)({type:String,attribute:"aria-describedby"})],e.prototype,"ariaDescribedBy",void 0),u([(0,d.property)({attribute:!1})],e.prototype,"clickFunction",void 0),u([(0,d.property)({type:Boolean,attribute:"is-placeholder-text"})],e.prototype,"isPlaceholderText",void 0),u([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),u([(0,d.query)(".md-button")],e.prototype,"button",void 0),e=u([(0,a.w)("md-button")],e),t.ELEMENT=e}(o||(o={}))},7224(t,e,i){i.d(e,{p:()=>s}),i(5983),i(1821);var o,s,a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(4955),h=i(5308),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.USER_QUERY="user_query",t.RESPONSE="response"}(o||(o={})),function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.id="",this.title="",this.cardText="",this.timestamp="",this.summariseMoreVisible=!1,this.variant=o.RESPONSE,this.copyChecked=!1,this.thumbsUpChecked=!1,this.thumbsDownChecked=!1}static get styles(){return[r.A,h.A]}thumbsUpToggled(){this.thumbsDownChecked=!1,this.thumbsUpChecked=!this.thumbsUpChecked,this.dispatchEvent(new CustomEvent("thumbs-up-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}thumbsDownToggled(){this.thumbsUpChecked=!1,this.thumbsDownChecked=!this.thumbsDownChecked,this.dispatchEvent(new CustomEvent("thumbs-down-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}summariseMoreToggled(){this.dispatchEvent(new CustomEvent("summarise-more-toggled",{detail:{id:this.id},bubbles:!0,composed:!0}))}copyToggled(){navigator.clipboard.writeText(this.cardText),this.copyChecked=!0,setTimeout(()=>{this.copyChecked=!1},2e3)}get bottomBorderRadiusClass(){return this.timestamp?"with-bottom-border-radius":"no-bottom-border-radius"}get cardTextClassMap(){return{"md-card-ai-card-body-user-query":this.variant===o.USER_QUERY,[`md-card-ai-card-body-response-${this.bottomBorderRadiusClass}`]:this.variant===o.RESPONSE}}renderHeader(){return this.variant===o.RESPONSE&&""!==this.title?n.html`
|
|
470
470
|
<div class="md-card-ai-header">
|
|
471
471
|
<slot name="card-header-aside">
|
|
472
472
|
<md-icon name="cisco-ai-assistant-color-gradient" iconSet="momentumBrandVisuals"></md-icon>
|
|
@@ -542,18 +542,18 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
542
542
|
${this.renderHeader()}
|
|
543
543
|
<div class="content-margin">${this.renderCardText()} ${this.renderFooter()}</div>
|
|
544
544
|
</div>
|
|
545
|
-
`}};p([(0,l.property)({type:String})],e.prototype,"id",void 0),p([(0,l.property)({type:String})],e.prototype,"title",void 0),p([(0,l.property)({type:String})],e.prototype,"cardText",void 0),p([(0,l.property)({type:String})],e.prototype,"timestamp",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"summariseMoreVisible",void 0),p([(0,l.property)({type:String})],e.prototype,"variant",void 0),p([(0,l.state)()],e.prototype,"copyChecked",void 0),p([(0,l.state)()],e.prototype,"thumbsUpChecked",void 0),p([(0,l.state)()],e.prototype,"thumbsDownChecked",void 0),e=p([(0,
|
|
545
|
+
`}};p([(0,l.property)({type:String})],e.prototype,"id",void 0),p([(0,l.property)({type:String})],e.prototype,"title",void 0),p([(0,l.property)({type:String})],e.prototype,"cardText",void 0),p([(0,l.property)({type:String})],e.prototype,"timestamp",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"summariseMoreVisible",void 0),p([(0,l.property)({type:String})],e.prototype,"variant",void 0),p([(0,l.state)()],e.prototype,"copyChecked",void 0),p([(0,l.state)()],e.prototype,"thumbsUpChecked",void 0),p([(0,l.state)()],e.prototype,"thumbsDownChecked",void 0),e=p([(0,a.w)("md-card-ai")],e),t.ELEMENT=e}(s||(s={}))},7540(t,e,i){i.d(e,{h:()=>u}),i(5983),i(1821),i(9613);var o=i(9609),s=i(4084),a=i(2927),r=i(8899),n=i(4955),l=i(9642),d=i(513),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const p="hh:mm:ss";var c,u;!function(t){t.DEFAULT="default",t.ACTIVE="active",t.INACTIVE="inactive"}(c||(c={})),function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.state=c.DEFAULT,this.identifier=void 0,this.header=void 0,this.info=void 0,this.data=void 0,this.createdTime=0,this.active=!1,this.expandable=!1,this.expandAriaLabel="Expand for more details",this.renderedData=""}connectedCallback(){super.connectedCallback(),this.checkForExtraInfoSlot()}disconnectedCallback(){super.disconnectedCallback(),this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}static get styles(){return[s.A,d.A]}get isCardActive(){return this.state===c.ACTIVE}willUpdate(t){super.willUpdate(t),(t.has("active")||t.has("data")||t.has("createdTime"))&&this.calculateRenderedData()}expandCardToggled(){var t;this.state=this.isCardActive?c.DEFAULT:c.ACTIVE,this.dispatchEvent(new CustomEvent("expand-card-toggled",{detail:{identifier:null!==(t=this.identifier)&&void 0!==t?t:"",active:this.isCardActive},bubbles:!0,composed:!0}))}checkForExtraInfoSlot(){var t;(null===(t=this.extraInfoSlot)||void 0===t?void 0:t.assignedNodes().length)>0?this.setAttribute("has-extra-info",""):this.removeAttribute("has-extra-info")}handleExtraInfoSlotChange(t){this.checkForExtraInfoSlot()}get cardClassMap(){return{"md-card-v2":!0,[`md-card--${this.state}`]:!0}}get contentClassMap(){return{"md-card-v2-content":!0,inactive:this.state===c.INACTIVE}}get footerExpandClassMap(){return{"md-card-v2-footer-expand":!0,hidden:!this.expandable}}get expandCardHandler(){return this.expandable?this.expandCardToggled:null}renderHeader(){return a.html`
|
|
546
546
|
<div class="md-card-v2-header-title">
|
|
547
547
|
<h3>${this.header}</h3>
|
|
548
|
-
${this.info?
|
|
548
|
+
${this.info?a.html`
|
|
549
549
|
<md-tooltip message="${this.info}" placement="top">
|
|
550
550
|
<md-button ariaLabel="${this.header}, ${this.data}, ${this.info}" size="20" variant="ghost" circle>
|
|
551
551
|
<md-icon slot="icon" name="info-badge-filled" iconSet="momentumDesign"></md-icon>
|
|
552
552
|
</md-button>
|
|
553
553
|
</md-tooltip>
|
|
554
|
-
`:
|
|
554
|
+
`:a.nothing}
|
|
555
555
|
</div>
|
|
556
|
-
`}renderExpandButton(){return
|
|
556
|
+
`}renderExpandButton(){return a.html`
|
|
557
557
|
<div class="${(0,n.classMap)(this.footerExpandClassMap)}">
|
|
558
558
|
<md-button ariaLabel="${this.expandAriaLabel}" circle size="28">
|
|
559
559
|
<md-icon
|
|
@@ -564,14 +564,14 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
564
564
|
></md-icon>
|
|
565
565
|
</md-button>
|
|
566
566
|
</div>
|
|
567
|
-
`}renderFooter(){return
|
|
567
|
+
`}renderFooter(){return a.html`
|
|
568
568
|
<div class="md-card-v2-footer">
|
|
569
569
|
<div class="md-card-v2-footer-content">
|
|
570
570
|
<slot name="card-footer-content"></slot>
|
|
571
571
|
</div>
|
|
572
572
|
${this.renderExpandButton()}
|
|
573
573
|
</div>
|
|
574
|
-
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p),this.interval=window.setInterval(()=>{this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p)},1e3))}render(){return
|
|
574
|
+
`}calculateRenderedData(){this.clearInterval(),!this.active&&this.data?this.renderedData=this.data:this.active&&this.createdTime>0&&(this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p),this.interval=window.setInterval(()=>{this.renderedData=l.Duration.fromMillis(Date.now()-this.createdTime).toFormat(p)},1e3))}render(){return a.html`
|
|
575
575
|
<div class="${(0,n.classMap)(this.cardClassMap)}" @click=${this.expandCardHandler}>
|
|
576
576
|
<div class="md-card-v2-header">${this.renderHeader()}</div>
|
|
577
577
|
<div class="${(0,n.classMap)(this.contentClassMap)}">
|
|
@@ -582,7 +582,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
582
582
|
</div>
|
|
583
583
|
${this.renderFooter()}
|
|
584
584
|
</div>
|
|
585
|
-
`}};h([(0,
|
|
585
|
+
`}};h([(0,r.property)({type:String})],e.prototype,"state",void 0),h([(0,r.property)({type:String})],e.prototype,"identifier",void 0),h([(0,r.property)({type:String})],e.prototype,"header",void 0),h([(0,r.property)({type:String})],e.prototype,"info",void 0),h([(0,r.property)({type:String})],e.prototype,"data",void 0),h([(0,r.property)({type:Number})],e.prototype,"createdTime",void 0),h([(0,r.property)({type:Boolean})],e.prototype,"active",void 0),h([(0,r.property)({type:Boolean,reflect:!0})],e.prototype,"expandable",void 0),h([(0,r.property)({type:String,attribute:"expand-aria-label"})],e.prototype,"expandAriaLabel",void 0),h([(0,r.query)('slot[name="card-extra-info"]')],e.prototype,"extraInfoSlot",void 0),h([(0,r.state)()],e.prototype,"interval",void 0),h([(0,r.state)()],e.prototype,"renderedData",void 0),e=h([(0,o.w)("md-card-v2")],e),t.ELEMENT=e}(u||(u={}))},1499(t,e,i){i.d(e,{Z:()=>o}),i(5983),i(23),i(1821),i(6131),i(8552),i(708),i(9613);var o,s=i(9609),a=i(4084),r=i(2927),n=i(2577),l=i(2900),d=i(4242),h=i(8899),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.title="title",this.subtitle="",this.id="",this.info="",this.infoAriaLabel="Card Info",this.menuAriaLabel="Card Menu",this.menuOptions=[]}static get styles(){return[a.A,d.A]}handleCardClick(){this.dispatchEvent(new CustomEvent("card-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardKeyDown(t){t.code!==l.Uz.Enter&&t.code!==l.Uz.Space||this.dispatchEvent(new CustomEvent("card-keydown",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleCardMenuEvent(t,e){t.stopPropagation();const i=e.toLowerCase();this.dispatchEvent(new CustomEvent("card-menu-click",{detail:{id:this.id,type:i},bubbles:!0,composed:!0}))}handleCardMenuKeyDown(t,e){t.preventDefault(),this.dispatchEvent(new CustomEvent("card-menu-keydown",{detail:{id:this.id,type:e.toLowerCase(),keyCode:t.code},bubbles:!0,composed:!0}))}render(){return r.html`
|
|
586
586
|
<div
|
|
587
587
|
class="md-card"
|
|
588
588
|
id="${this.id}"
|
|
@@ -602,7 +602,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
602
602
|
</slot>
|
|
603
603
|
</div>
|
|
604
604
|
<div class="md-card-header-actions">
|
|
605
|
-
${this.info?
|
|
605
|
+
${this.info?r.html`
|
|
606
606
|
<md-tooltip message="${this.info}" placement="bottom">
|
|
607
607
|
<md-button
|
|
608
608
|
ariaLabel="${this.infoAriaLabel}"
|
|
@@ -613,8 +613,8 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
613
613
|
<md-icon slot="icon" name="info-circle-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
614
614
|
</md-button>
|
|
615
615
|
</md-tooltip>
|
|
616
|
-
`:
|
|
617
|
-
${this.menuOptions.length?
|
|
616
|
+
`:r.nothing}
|
|
617
|
+
${this.menuOptions.length?r.html`
|
|
618
618
|
<md-menu-overlay class="md-card-menu" placement="bottom-start">
|
|
619
619
|
<md-button
|
|
620
620
|
ariaLabel="${this.menuAriaLabel}"
|
|
@@ -627,7 +627,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
627
627
|
</md-button>
|
|
628
628
|
<div class="md-card-menu-list-items" style="width: 100%;">
|
|
629
629
|
<md-list>
|
|
630
|
-
${(0,n.repeat)(this.menuOptions,(t,e)=>
|
|
630
|
+
${(0,n.repeat)(this.menuOptions,(t,e)=>r.html`
|
|
631
631
|
<md-list-item
|
|
632
632
|
class="${"menu-item-"+e}"
|
|
633
633
|
slot="list-item"
|
|
@@ -639,7 +639,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
639
639
|
</md-list>
|
|
640
640
|
</div>
|
|
641
641
|
</md-menu-overlay>
|
|
642
|
-
`:
|
|
642
|
+
`:r.nothing}
|
|
643
643
|
</div>
|
|
644
644
|
</div>
|
|
645
645
|
<div class="md-card-content">
|
|
@@ -649,7 +649,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
649
649
|
<slot name="footer"> </slot>
|
|
650
650
|
</div>
|
|
651
651
|
</div>
|
|
652
|
-
`}};p([(0,h.property)({type:String})],e.prototype,"title",void 0),p([(0,h.property)({type:String})],e.prototype,"subtitle",void 0),p([(0,h.property)({type:String})],e.prototype,"id",void 0),p([(0,h.property)({type:String})],e.prototype,"info",void 0),p([(0,h.property)({type:String,attribute:"info-aria-label"})],e.prototype,"infoAriaLabel",void 0),p([(0,h.property)({type:String,attribute:"menu-aria-label"})],e.prototype,"menuAriaLabel",void 0),p([(0,h.property)({type:Array})],e.prototype,"menuOptions",void 0),e=p([(0,s.w)("md-card")],e),t.ELEMENT=e}(o||(o={}))},5558(t,e,i){i.d(e,{c:()=>o}),i(2245);var o,s=i(9609),
|
|
652
|
+
`}};p([(0,h.property)({type:String})],e.prototype,"title",void 0),p([(0,h.property)({type:String})],e.prototype,"subtitle",void 0),p([(0,h.property)({type:String})],e.prototype,"id",void 0),p([(0,h.property)({type:String})],e.prototype,"info",void 0),p([(0,h.property)({type:String,attribute:"info-aria-label"})],e.prototype,"infoAriaLabel",void 0),p([(0,h.property)({type:String,attribute:"menu-aria-label"})],e.prototype,"menuAriaLabel",void 0),p([(0,h.property)({type:Array})],e.prototype,"menuOptions",void 0),e=p([(0,s.w)("md-card")],e),t.ELEMENT=e}(o||(o={}))},5558(t,e,i){i.d(e,{c:()=>o}),i(2245);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(3517),d=i(9316),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.title="",this.src="",this.time="",this.label="Avatar",this.status="",this.clickableTimestamp=!1,this.isSelected=!1,this.self=!1}get computedAvatarType(){return void 0!==this.avatarType?this.avatarType:this.self?"self":void 0}get computedYouLabel(){return this.selfLabel||"You"}get isSelfType(){return void 0===this.avatarType?this.self:"self"===this.avatarType}timeStampClicked(){this.dispatchEvent(new CustomEvent("timestamp-clicked",{bubbles:!0,composed:!0}))}static get styles(){return[a.A,d.A]}render(){return r.html`
|
|
653
653
|
<div class="md-chat-message">
|
|
654
654
|
<div class="md-chat-message_avatar">
|
|
655
655
|
<md-avatar
|
|
@@ -667,11 +667,11 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
667
667
|
<div class="md-chat-message_title">
|
|
668
668
|
<span>${this.isSelfType?this.computedYouLabel:this.title}</span>
|
|
669
669
|
</div>
|
|
670
|
-
${this.clickableTimestamp?
|
|
670
|
+
${this.clickableTimestamp?r.html`<md-link
|
|
671
671
|
class="md-chat-message_time"
|
|
672
672
|
@click=${t=>{t.preventDefault(),this.timeStampClicked()}}
|
|
673
673
|
>${this.time}</md-link
|
|
674
|
-
>`:
|
|
674
|
+
>`:r.html`<div class="md-chat-message_time" title="">${this.time}</div>`}
|
|
675
675
|
<div class="md-chat-message_status" title="">${this.status}</div>
|
|
676
676
|
<div class="md-chat-message_custom_content" title="">
|
|
677
677
|
<slot name="custom-content"></slot>
|
|
@@ -682,7 +682,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
682
682
|
</div>
|
|
683
683
|
</div>
|
|
684
684
|
</div>
|
|
685
|
-
`}};h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"src",void 0),h([(0,n.property)({type:String})],e.prototype,"time",void 0),h([(0,n.property)({type:String})],e.prototype,"label",void 0),h([(0,n.property)({type:String})],e.prototype,"status",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"isSelected",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"self",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),h([(0,n.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=h([(0,s.w)("md-chat-message")],e),t.ELEMENT=e}(o||(o={}))},8381(t,e,i){i.d(e,{S:()=>o}),i(1821);var o,s=i(2900),
|
|
685
|
+
`}};h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"src",void 0),h([(0,n.property)({type:String})],e.prototype,"time",void 0),h([(0,n.property)({type:String})],e.prototype,"label",void 0),h([(0,n.property)({type:String})],e.prototype,"status",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"clickableTimestamp",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"isSelected",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"self-label"})],e.prototype,"selfLabel",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"self",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"avatar-color"})],e.prototype,"avatarColor",void 0),h([(0,n.property)({type:String,reflect:!0,attribute:"avatar-type"})],e.prototype,"avatarType",void 0),h([(0,n.property)({type:Number,reflect:!0,attribute:"avatar-size"})],e.prototype,"avatarSize",void 0),e=h([(0,s.w)("md-chat-message")],e),t.ELEMENT=e}(o||(o={}))},8381(t,e,i){i.d(e,{S:()=>o}),i(1821);var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=i(2927),d=i(8899),h=i(4973),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.yC)(l.LitElement)){constructor(){super(...arguments),this.autofocus=!1,this._checked=!1,this._indeterminate=!1,this._disabled=!1,this.label="",this.tabIndex=0}get checked(){return this._checked}set checked(t){const e=this._checked;this._checked=t,this.requestUpdate("checked",e)}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=this._indeterminate;this._indeterminate=t,this.requestUpdate("indeterminate",e)}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}static get styles(){return[n.A,h.A]}toggleCheckbox(){this.checked=!this.checked}isCheckboxActive(){return this.disabled||this.indeterminate}handleClick(t){this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t))}handleKeyDown(t){const{code:e}=t;e!==s.Uz.Space&&e!==s.Uz.Enter||(t.preventDefault(),this.isCheckboxActive()?t.stopPropagation():(this.toggleCheckbox(),this.handleChange(t)))}handleChange(t){this.dispatchEvent(new CustomEvent("checkbox-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,checked:this.checked}}))}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","checkbox"),this.label&&this.setAttribute("aria-label",this.label)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("indeterminate")&&this.indeterminate&&(this.checked=!1),(t.has("checked")||t.has("indeterminate"))&&(this.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",`${this.checked}`)),t.has("disabled")&&this.setAttribute("aria-disabled",`${this.disabled}`)}updated(t){super.updated(t),t.has("indeterminate")&&(this.input.indeterminate=this.indeterminate)}get checkboxIconName(){return this.checked?"check-bold":this.indeterminate?"minus-bold":null}checkboxIconTemplate(){const t=this.checkboxIconName;return t?l.html`<md-icon name="${t}" iconSet="momentumDesign" size="16"></md-icon>`:l.nothing}checkboxBoxTemplate(){return l.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return l.html`
|
|
686
686
|
<input
|
|
687
687
|
class="checkbox-input"
|
|
688
688
|
type="checkbox"
|
|
@@ -696,11 +696,11 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
696
696
|
${this.checkboxBoxTemplate()}
|
|
697
697
|
<slot></slot>
|
|
698
698
|
</label>
|
|
699
|
-
`}};p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([(0,d.property)({type:String})],e.prototype,"label",void 0),p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([(0,d.query)(".checkbox-input")],e.prototype,"input",void 0),e=p([(0,
|
|
699
|
+
`}};p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([(0,d.property)({type:String})],e.prototype,"label",void 0),p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([(0,d.query)(".checkbox-input")],e.prototype,"input",void 0),e=p([(0,r.w)("md-checkbox")],e),t.ELEMENT=e}(o||(o={}))},4870(t,e,i){i.d(e,{$:()=>o});var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=i(2927),d=i(8899),h=i(4973),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.Io)(l.LitElement)){constructor(){super(...arguments),this.label="group",this.alignment="vertical"}static get styles(){return[n.A,h.A]}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown)}switchCheckboxOnArrowPress(t,e=1){const i=super.getAvailableSelectedIndex(t,e);-1!==i&&(this.selected=i)}handleKeyDown(t){const{code:e}=t;switch(e){case s.Uz.ArrowUp:case s.Uz.ArrowLeft:t.stopPropagation(),0===this.selected?this.switchCheckboxOnArrowPress(this.slotted.length-1,-1):this.switchCheckboxOnArrowPress(this.selected-1,-1);break;case s.Uz.ArrowDown:case s.Uz.ArrowRight:t.stopPropagation(),this.selected===this.slotted.length-1?this.switchCheckboxOnArrowPress(0):this.switchCheckboxOnArrowPress(this.selected+1)}}get slotElement(){return this.checkboxSlot}render(){return l.html`
|
|
700
700
|
<div role="group" aria-labelledby="id-group-label">
|
|
701
701
|
<slot name="checkbox"></slot>
|
|
702
702
|
</div>
|
|
703
|
-
`}};p([(0,d.property)({type:String,attribute:"group-label"})],e.prototype,"label",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),p([(0,d.query)("slot[name='checkbox']")],e.prototype,"checkboxSlot",void 0),e=p([(0,
|
|
703
|
+
`}};p([(0,d.property)({type:String,attribute:"group-label"})],e.prototype,"label",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),p([(0,d.query)("slot[name='checkbox']")],e.prototype,"checkboxSlot",void 0),e=p([(0,r.w)("md-checkboxgroup")],e),t.ELEMENT=e}(o||(o={}))},2583(t,e,i){i.d(e,{v:()=>o}),i(2708),i(9613);var o,s=i(2900),a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(4955),h=i(3517),p=i(9558),c=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.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};`:n.nothing,this.renderTextColor=()=>this.textColor?`color: ${this.textColor};`:n.nothing,this.renderHeight=()=>this.height?`height: ${this.height};`:n.nothing,this.getStyles=()=>this.bgColor||this.textColor||this.height?n.html`
|
|
704
704
|
<style>
|
|
705
705
|
:host .md-chip {
|
|
706
706
|
${this.renderBgColor()};
|
|
@@ -708,7 +708,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
708
708
|
${this.renderHeight()};
|
|
709
709
|
}
|
|
710
710
|
</style>
|
|
711
|
-
`:n.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),s=Math.min(5,Math.max(0,i.length-o-1)),
|
|
711
|
+
`:n.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),s=Math.min(5,Math.max(0,i.length-o-1)),a=i.slice(0,o).join(""),r=i.slice(-s).join(""),n=`${a}…${r}`;if(this.getTextWidth(n)>this.MAXWIDTH)return this.renderedText=n,void(this.textOverflow=!0);for(;o+s<i.length;){let t=!1;if(o+s<i.length){const e=a+i[o],s=`${e}…${r}`;this.getTextWidth(s)<=this.MAXWIDTH&&(a=e,o+=1,n=s,t=!0)}if(o+s<i.length){const e=i[i.length-s-1]+r,o=`${a}…${e}`;this.getTextWidth(o)<=this.MAXWIDTH&&(r=e,s+=1,n=o,t=!0)}if(!t)break}this.renderedText=n,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 s.Uz.Space:case s.Uz.Enter:this.handleSelect(),this.handleClick()}}static get styles(){return[r.A,p.A]}loadingTemplate(){return this.determinateProgress||this.indeterminateProgress?this.determinateProgress?n.html`
|
|
712
712
|
<md-progress-bar
|
|
713
713
|
class="md-chip--loading"
|
|
714
714
|
type="determinate"
|
|
@@ -751,36 +751,36 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
751
751
|
<slot name="custom-right-content" part="chip-right"> </slot>
|
|
752
752
|
</span>
|
|
753
753
|
</md-tooltip>
|
|
754
|
-
`}};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,
|
|
754
|
+
`}};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,a.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},7744(t,e,i){i.d(e,{x:()=>o}),i(5983),i(1821),i(405);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(2991),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.placement="bottom",this.triggerID="",this.headerIconName=void 0,this.header=void 0,this.message=void 0,this.show=!1,this.hideCloseButton=!1,this.href="",this.slotContent=null}static get styles(){return[a.A,d.A]}connectedCallback(){super.connectedCallback()}notifyCustomEvent(t){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:{placement:this.placement,triggerComponent:this.triggerComponent,popper:this.popper}}))}notifyCoachCreate(){this.notifyCustomEvent("coach-create")}notifyPrimaryButtonAction(){this.notifyCustomEvent("primary-button-action")}notifySecondaryButtonAction(){this.notifyCustomEvent("secondary-button-action")}notifyLinkAction(){this.notifyCustomEvent("link-action")}notifyCoachClose(){this.notifyCustomEvent("coachmark-close")}handleSlotChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent=t)}}updated(t){super.updated(t),t.has("show")&&(this.show?this.notifyCoachCreate():this.notifyCoachClose())}coachmarkContentTemplate(){return r.html`
|
|
755
755
|
<div class="md-coachmark__content">
|
|
756
|
-
${this.message?this.message:
|
|
756
|
+
${this.message?this.message:r.html` <slot name="coachmark-content" @slotchange=${this.handleSlotChange}></slot> `}
|
|
757
757
|
</div>
|
|
758
|
-
`}renderHeader(){return
|
|
758
|
+
`}renderHeader(){return r.html`
|
|
759
759
|
<div class="header-container ${(0,l.classMap)({"hide-close":this.hideCloseButton})}">
|
|
760
|
-
${this.headerIconName?
|
|
761
|
-
${this.header?
|
|
760
|
+
${this.headerIconName?r.html`<md-icon name=${this.headerIconName} size="16" iconSet="momentumDesign"></md-icon>`:""}
|
|
761
|
+
${this.header?r.html`<span class="header-title">${this.header}</span>`:""}
|
|
762
762
|
</div>
|
|
763
|
-
`}renderBody(){return
|
|
763
|
+
`}renderBody(){return r.html` <div class="body-container">${this.coachmarkContentTemplate()}</div> `}renderFooter(){return r.html`
|
|
764
764
|
<div class="footer-container">
|
|
765
|
-
${this.primaryButton?
|
|
765
|
+
${this.primaryButton?r.html`<md-button
|
|
766
766
|
variant="inverted-primary"
|
|
767
767
|
size="28"
|
|
768
768
|
@button-click=${()=>this.notifyPrimaryButtonAction()}
|
|
769
769
|
>
|
|
770
770
|
${this.primaryButton}</md-button
|
|
771
771
|
>`:""}
|
|
772
|
-
${this.secondaryButton?
|
|
772
|
+
${this.secondaryButton?r.html`<md-button
|
|
773
773
|
variant="inverted-secondary"
|
|
774
774
|
size="28"
|
|
775
775
|
@button-click=${()=>this.notifySecondaryButtonAction()}
|
|
776
776
|
>
|
|
777
777
|
${this.secondaryButton}</md-button
|
|
778
778
|
>`:""}
|
|
779
|
-
${this.linkText?
|
|
779
|
+
${this.linkText?r.html`<a href=${this.href} @click=${()=>this.notifyLinkAction()} target="_blank" rel="noreferrer">
|
|
780
780
|
${this.linkText}</a
|
|
781
781
|
>`:""}
|
|
782
782
|
</div>
|
|
783
|
-
`}render(){return
|
|
783
|
+
`}render(){return r.html`
|
|
784
784
|
<slot name="trigger"></slot>
|
|
785
785
|
<md-popover
|
|
786
786
|
class="md-coachmark"
|
|
@@ -803,14 +803,14 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
803
803
|
${this.renderHeader()} ${this.renderBody()} ${this.renderFooter()}
|
|
804
804
|
</div>
|
|
805
805
|
</md-popover>
|
|
806
|
-
`}};h([(0,n.property)({type:String})],e.prototype,"placement",void 0),h([(0,n.property)({type:String,reflect:!0})],e.prototype,"triggerID",void 0),h([(0,n.property)({type:String})],e.prototype,"headerIconName",void 0),h([(0,n.property)({type:String})],e.prototype,"header",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],e.prototype,"hideCloseButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"linkText",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)(".md-coachmark__trigger-component")],e.prototype,"triggerComponent",void 0),h([(0,n.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),e=h([(0,s.w)("md-coachmark-popover")],e),t.ELEMENT=e}(o||(o={}))},1869(t,e,i){i.d(e,{i:()=>o}),i(5983);var o,s=i(7704),
|
|
806
|
+
`}};h([(0,n.property)({type:String})],e.prototype,"placement",void 0),h([(0,n.property)({type:String,reflect:!0})],e.prototype,"triggerID",void 0),h([(0,n.property)({type:String})],e.prototype,"headerIconName",void 0),h([(0,n.property)({type:String})],e.prototype,"header",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean,reflect:!0,attribute:"hide-close-button"})],e.prototype,"hideCloseButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"linkText",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)(".md-coachmark__trigger-component")],e.prototype,"triggerComponent",void 0),h([(0,n.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),e=h([(0,s.w)("md-coachmark-popover")],e),t.ELEMENT=e}(o||(o={}))},1869(t,e,i){i.d(e,{i:()=>o}),i(5983);var o,s=i(7704),a=i(9609),r=i(2050),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(887),c=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.dY)(l.LitElement)){constructor(){super(...arguments),this.message="",this.actionname="Next",this.hidebutton=!1,this.placement="auto",this.show=!1,this.color="default",this.slotContent=null}connectedCallback(){super.connectedCallback()}notifyCoachCreate(){this.dispatchEvent(new CustomEvent("coach-create",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}coachAction(){this.dispatchEvent(new CustomEvent("coach-action",{bubbles:!0,composed:!0,detail:{popper:this.popper}}))}handleSlotChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent=t)}}update(t){var e;super.update(t),t.has("show")&&this.show&&(this.setFocusableElements(),(null===(e=this.focusableElements)||void 0===e?void 0:e.length)&&this.focusableElements[0].focus())}get coachWrapClassMap(){return{"md-coachmark--active":!!this.show}}get coachClassMap(){return{[`md-coachmark__popper--${this.placement}`]:!!this.placement,[`md-coachmark__popper--${this.color}`]:!!this.color}}static get styles(){return[n.A,p.A]}coachmarkContentTemplate(){return l.html`
|
|
807
807
|
<div class="md-coachmark__content">
|
|
808
808
|
${this.message?this.message:l.html` <slot name="coachmark-content" @slotchange=${this.handleSlotChange}></slot> `}
|
|
809
809
|
<div class="md-coachmark__action">
|
|
810
810
|
${this.hidebutton?l.html` <slot name="coachmark-action"></slot> `:l.html` <md-button variant="secondary" @button-click=${this.coachAction}>${this.actionname}</md-button> `}
|
|
811
811
|
</div>
|
|
812
812
|
</div>
|
|
813
|
-
`}wrappedCoachmarkContentTemplate(){const t=(0,
|
|
813
|
+
`}wrappedCoachmarkContentTemplate(){const t=(0,r.QZ)("md-theme",this);return"momentumV2"===(null==t?void 0:t.theme)?l.html`
|
|
814
814
|
<md-theme theme="momentumV2" ?darkTheme=${!t.darkTheme}>
|
|
815
815
|
${this.coachmarkContentTemplate()}
|
|
816
816
|
</md-theme>
|
|
@@ -824,7 +824,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
824
824
|
<slot></slot>
|
|
825
825
|
</div>
|
|
826
826
|
</div>
|
|
827
|
-
`}};c([(0,d.property)({type:String})],e.prototype,"message",void 0),c([(0,d.property)({type:String})],e.prototype,"actionname",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"hidebutton",void 0),c([(0,d.property)({type:String})],e.prototype,"placement",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"show",void 0),c([(0,d.property)({type:String})],e.prototype,"color",void 0),c([(0,d.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),c([(0,d.query)(".md-coachmark__reference")],e.prototype,"reference",void 0),e=c([(0,
|
|
827
|
+
`}};c([(0,d.property)({type:String})],e.prototype,"message",void 0),c([(0,d.property)({type:String})],e.prototype,"actionname",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"hidebutton",void 0),c([(0,d.property)({type:String})],e.prototype,"placement",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"show",void 0),c([(0,d.property)({type:String})],e.prototype,"color",void 0),c([(0,d.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),c([(0,d.query)(".md-coachmark__reference")],e.prototype,"reference",void 0),e=c([(0,a.w)("md-coachmark")],e),t.ELEMENT=e}(o||(o={}))},6243(t,e,i){i.d(e,{U:()=>h});var o=i(9609),s=i(878),a=i(8899),r=i(9642),n=i(8663),l=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const d=" - ";var h;!function(t){let e=class extends n.l.ELEMENT{constructor(){super(...arguments),this.startDate=void 0,this.endDate=void 0,this.maxRangeLength=void 0,this.originalFilterDate=void 0,this.updateValue=()=>{if(this.startDate&&this.endDate){const t=t=>this.useISOFormat?t:r.DateTime.fromISO(t).toLocaleString(r.DateTime.DATE_SHORT,{locale:this.locale}),e=t(this.startDate),i=t(this.endDate);this.value=`${e}${d}${i}`}},this.isValueValid=()=>{var t,e;if(!this.validateDate)return!0;const i=null!==(e=null===(t=this.value)||void 0===t?void 0:t.split(d))&&void 0!==e?e:[];return 2===i.length&&this.validateDateString(i[0])&&this.validateDateString(i[1])},this.getDefaultAriaLabel=()=>{if(this.startDate&&this.endDate){const t=r.DateTime.fromISO(this.startDate),e=r.DateTime.fromISO(this.endDate);if(t.isValid&&e.isValid)return`Choose Date Range, currently selected range is ${t.toLocaleString(r.DateTime.DATE_FULL)} to ${e.toLocaleString(r.DateTime.DATE_FULL)}`}return"Choose Date Range"}}connectedCallback(){super.connectedCallback(),super.render(),this.addEventListener("date-pre-selection-change",this.handleDateSelection),this.parseInitialValue(),this.updateValue(),this.maxRangeLength&&(this.originalFilterDate=this.filterDate,this.updateFilterDate())}parseInitialValue(){if(this.value&&!this.startDate&&!this.endDate&&this.useISOFormat){const t=this.value.split(d);if(2===t.length){const e=r.DateTime.fromISO(t[0].trim()),i=r.DateTime.fromISO(t[1].trim());e.isValid&&i.isValid&&(this.startDate=e.toSQLDate(),this.endDate=i.toSQLDate(),this.focusedDate=e,this.selectedDate=e)}}}updateFilterDate(){this.maxRangeLength&&(this.filterDate=this.createCombinedFilter())}createCombinedFilter(){return t=>{if(this.originalFilterDate&&this.originalFilterDate(t))return!0;const e="string"==typeof t?r.DateTime.fromISO(t):t;if(!this.maxRangeLength||!this.startDate||this.endDate)return!1;const i=r.DateTime.fromISO(this.startDate),o=i.plus({days:this.maxRangeLength-1}).startOf("day"),s=i.minus({days:this.maxRangeLength-1}).startOf("day"),a=e.startOf("day");return a>o||a<s}}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("date-pre-selection-change",this.handleDateSelection)}updated(t){var e;if(t.has("value")&&(null===(e=this.value)||void 0===e?void 0:e.includes(d))){const e=new Map(t);e.delete("value"),super.updated(e)}else super.updated(t);!t.has("startDate")&&!t.has("endDate")||t.has("focusedDate")||this.updateValue()}getPlaceHolderString(){if(this.placeholder)return this.placeholder;if(this.useISOFormat)return`YYYY-MM-DD${d}YYYY-MM-DD`;const t=(0,s.gq)(this.locale).toUpperCase();return`${t}${d}${t}`}setSelected(){}dateToSqlTranslate(t){return t.toSQLDate()}onApplyClick(){this.emitDateRange(),this.updateValue(),this.shouldCloseOnSelect&&this.setOpen(!1)}handleDateSelection(t){var e;const i=t.detail.data;i&&(this.selectedDate=i,this.focusedDate=i,this.startDate?this.endDate?(this.startDate=this.dateToSqlTranslate(i),this.endDate=void 0):i<r.DateTime.fromISO(this.startDate)?(this.endDate=this.startDate,this.startDate=this.dateToSqlTranslate(i)):this.endDate=this.dateToSqlTranslate(i):this.startDate=this.dateToSqlTranslate(i),this.updateFilterDate(),(null===(e=this.controlButtons)||void 0===e?void 0:e.apply)||(this.emitDateRange(),this.updateValue()))}emitDateRange(){if(!this.startDate||!this.endDate)return;const t=new CustomEvent("date-range-change",{detail:{startDate:this.startDate,endDate:this.endDate}});this.dispatchEvent(t)}};l([(0,a.property)({type:String,attribute:"start-date",reflect:!0})],e.prototype,"startDate",void 0),l([(0,a.property)({type:String,attribute:"end-date",reflect:!0})],e.prototype,"endDate",void 0),l([(0,a.property)({type:Number,attribute:"max-range-length"})],e.prototype,"maxRangeLength",void 0),e=l([(0,o.w)("md-date-range-picker")],e),t.ELEMENT=e}(h||(h={}))},9597(t,e,i){i.d(e,{K:()=>o}),i(9189),i(708);var o,s=i(9609),a=i(878),r=i(4084),n=i(2927),l=i(8899),d=i(3517),h=i(9642),p=i(2900),c=i(6843),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.weekStartDays=["Sunday","Monday"];let e=class extends n.LitElement{constructor(){super(...arguments),this.maxDate=void 0,this.minDate=void 0,this.weekStart="Sunday",this.ariaLabel="",this.twoDigitAutoTab=!1,this.shouldCloseOnSelect=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=p.R5.SECOND,this.dateValue=void 0,this.timeValue="00:00:00-08:00",this.value=void 0,this.disableDateValidation=!1,this.locale=void 0,this.placeholder=void 0,this.useISOFormat=!0,this.disabled=!1,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.compactInput=void 0,this.controlButtons=void 0,this.fullDateTime=void 0,this.selectedTimeObject=void 0,this.selectedDateObject=(0,a.tB)(),this.handleDateChange=t=>{var e,i;this.selectedDateObject=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.data,this.dateValue=null===(i=this.selectedDateObject)||void 0===i?void 0:i.toISODate(),this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleTimeChange=t=>{var e,i,o;this.selectedTimeObject=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.data,this.timeValue=null===(i=this.selectedTimeObject)||void 0===i?void 0:i.startOf("second").toISOTime({suppressMilliseconds:!0}),(null===(o=this.controlButtons)||void 0===o?void 0:o.apply)||this.combineDateAndTimeValues(this.dateValue,this.timeValue)},this.handleDateTimeInputChange=t=>{var e;this.value=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.value},this.parseValueForVisuals=t=>{t&&(this.dateValue=t.split("T")[0],this.timeValue=t.split("T")[1])},this.updateDateTimeObject=()=>{this.value?this.fullDateTime=h.DateTime.fromISO(this.value,{locale:this.locale}):this.fullDateTime=h.DateTime.fromISO("",{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-time-change",{bubbles:!0,composed:!0,detail:{dateTimeString:this.value,dateTime:this.fullDateTime,locale:this.locale,twentyFourHourFormat:this.twentyFourHourFormat}}))},this.combineDateAndTimeValues=(t,e)=>{t&&(this.value=e?`${t}T${e}`:t)}}firstUpdated(t){var e;if(super.firstUpdated(t),!this.value&&this.showDefaultNowDate){const t=null===(e=this.selectedDateObject)||void 0===e?void 0:e.toISODate();this.combineDateAndTimeValues(t,this.timeValue)}}updated(t){var e;super.updated(t),t.has("value")&&(this.value&&this.parseValueForVisuals(this.value),this.updateDateTimeObject()),this.dateValue&&this.timeValue&&!(null===(e=this.controlButtons)||void 0===e?void 0:e.apply)&&(t.has("dateValue")||t.has("timeValue"))&&this.combineDateAndTimeValues(this.dateValue,this.timeValue),this.value&&t.has("locale")&&(this.fullDateTime=h.DateTime.fromISO(this.value,{locale:this.locale}))}get placeholderValue(){return this.placeholder?this.placeholder:"YYYY-MM-DDTHH:MM:SS-HH:MM"}static get styles(){return[r.A,c.A]}get displayValue(){if(!this.useISOFormat&&this.fullDateTime&&this.fullDateTime.isValid)return this.fullDateTime.toLocaleString(h.DateTime.DATETIME_MED,{locale:this.locale})}render(){var t;return n.html`
|
|
828
828
|
<md-datepicker
|
|
829
829
|
includes-time
|
|
830
830
|
?disabled=${this.disabled}
|
|
@@ -859,11 +859,11 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
859
859
|
</div>
|
|
860
860
|
</md-datepicker>
|
|
861
861
|
</div>
|
|
862
|
-
`}};u([(0,l.property)({type:String})],e.prototype,"maxDate",void 0),u([(0,l.property)({type:String})],e.prototype,"minDate",void 0),u([(0,l.property)({type:String})],e.prototype,"weekStart",void 0),u([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,l.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),u([(0,l.property)({type:Boolean,attribute:"should-close-on-select"})],e.prototype,"shouldCloseOnSelect",void 0),u([(0,l.property)({type:Boolean,attribute:"twenty-four-hour-format"})],e.prototype,"twentyFourHourFormat",void 0),u([(0,l.property)({type:String})],e.prototype,"timeSpecificity",void 0),u([(0,l.property)({type:String,attribute:"date-value"})],e.prototype,"dateValue",void 0),u([(0,l.property)({type:String,attribute:"time-value"})],e.prototype,"timeValue",void 0),u([(0,l.property)({type:String,reflect:!0})],e.prototype,"value",void 0),u([(0,l.property)({type:Boolean,attribute:"disable-date-validation"})],e.prototype,"disableDateValidation",void 0),u([(0,l.property)({type:String})],e.prototype,"locale",void 0),u([(0,l.property)({type:String,attribute:"placeholder"})],e.prototype,"placeholder",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"useISOFormat",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,l.property)({type:String,attribute:"positioning-strategy"})],e.prototype,"positioningStrategy",void 0),u([(0,l.property)({type:Boolean,attribute:"show-default-now-date"})],e.prototype,"showDefaultNowDate",void 0),u([(0,l.property)({type:Boolean,attribute:"compact-input"})],e.prototype,"compactInput",void 0),u([(0,l.property)({type:Object,attribute:!1})],e.prototype,"controlButtons",void 0),u([(0,l.state)()],e.prototype,"fullDateTime",void 0),u([(0,l.state)()],e.prototype,"selectedTimeObject",void 0),u([(0,l.state)()],e.prototype,"selectedDateObject",void 0),u([(0,l.query)("md-datepicker")],e.prototype,"datePicker",void 0),u([(0,l.query)("md-timepicker")],e.prototype,"timePicker",void 0),e=u([(0,s.w)("md-date-time-picker")],e),t.ELEMENT=e}(o||(o={}))},8306(t,e,i){i.d(e,{s:()=>o});var o,s=i(7704),
|
|
862
|
+
`}};u([(0,l.property)({type:String})],e.prototype,"maxDate",void 0),u([(0,l.property)({type:String})],e.prototype,"minDate",void 0),u([(0,l.property)({type:String})],e.prototype,"weekStart",void 0),u([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,l.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),u([(0,l.property)({type:Boolean,attribute:"should-close-on-select"})],e.prototype,"shouldCloseOnSelect",void 0),u([(0,l.property)({type:Boolean,attribute:"twenty-four-hour-format"})],e.prototype,"twentyFourHourFormat",void 0),u([(0,l.property)({type:String})],e.prototype,"timeSpecificity",void 0),u([(0,l.property)({type:String,attribute:"date-value"})],e.prototype,"dateValue",void 0),u([(0,l.property)({type:String,attribute:"time-value"})],e.prototype,"timeValue",void 0),u([(0,l.property)({type:String,reflect:!0})],e.prototype,"value",void 0),u([(0,l.property)({type:Boolean,attribute:"disable-date-validation"})],e.prototype,"disableDateValidation",void 0),u([(0,l.property)({type:String})],e.prototype,"locale",void 0),u([(0,l.property)({type:String,attribute:"placeholder"})],e.prototype,"placeholder",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"useISOFormat",void 0),u([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,l.property)({type:String,attribute:"positioning-strategy"})],e.prototype,"positioningStrategy",void 0),u([(0,l.property)({type:Boolean,attribute:"show-default-now-date"})],e.prototype,"showDefaultNowDate",void 0),u([(0,l.property)({type:Boolean,attribute:"compact-input"})],e.prototype,"compactInput",void 0),u([(0,l.property)({type:Object,attribute:!1})],e.prototype,"controlButtons",void 0),u([(0,l.state)()],e.prototype,"fullDateTime",void 0),u([(0,l.state)()],e.prototype,"selectedTimeObject",void 0),u([(0,l.state)()],e.prototype,"selectedDateObject",void 0),u([(0,l.query)("md-datepicker")],e.prototype,"datePicker",void 0),u([(0,l.query)("md-timepicker")],e.prototype,"timePicker",void 0),e=u([(0,s.w)("md-date-time-picker")],e),t.ELEMENT=e}(o||(o={}))},8306(t,e,i){i.d(e,{s:()=>o});var o,s=i(7704),a=i(2050),r=i(4084),n=i(2927),l=i(8899),d=i(6933),h=i(9431),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.TS)(n.LitElement)){constructor(){super(...arguments),this.delay=0,this.animation=0,this.handle="",this.filter="",this.easing="",this.direction="vertical",this.group=null,this.draggableItems="md-draggable-item",this.ghostClass="",this.chosenClass="",this.dragClass="",this.fallbackClass="",this.swapThreshold=1,this.touchStartThreshold=0,this.forceFallback=!1,this.sort=!1,this.disabled=!1,this.editable=!1,this.sortableInstance=null,this.handleOnChange=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-change",t)},this.handleOnClone=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-clone",t)},this.handleOnUnchoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-unchoose",t)},this.handleOnRemove=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-remove",t)},this.handleOnAdd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-add",t)},this.handleOnChoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-choose",t)},this.handleOnEnd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-end",t)},this.handleOnMove=(0,a.sg)(t=>{t.stopPropagation(),this.dispatchDragEvent("drag-move",t)},100),this.handleOnStart=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-start",t)}}static get styles(){return[r.A,h.A]}get slotElement(){return this.draggableSlot}generateOptions(){return Object.assign(Object.assign({},this.group&&{group:this.group}),{disabled:this.disabled,animation:this.animation,sort:this.sort,delay:this.delay,handle:this.handle,easing:this.easing,filter:this.filter,swapThreshold:this.swapThreshold,touchStartThreshold:this.touchStartThreshold,draggable:this.draggableItems,direction:this.direction,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,fallbackClass:this.fallbackClass,forceFallback:this.forceFallback,onStart:this.handleOnStart,onMove:this.handleOnMove,onEnd:this.handleOnEnd,onChoose:this.handleOnChoose,onAdd:this.handleOnAdd,onRemove:this.handleOnRemove,onUnchoose:this.handleOnUnchoose,onClone:this.handleOnClone,onChange:this.handleOnChange})}initializeSortable(){this.sortableInstance||(this.sortableInstance=d.default.create(this,this.generateOptions()))}dispatchDragEvent(t,e){this.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}cleanupSortable(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)}connectedCallback(){super.connectedCallback(),this.initializeSortable()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupSortable()}setSortableOption(t,e){this.sortableInstance&&void 0!==this.sortableInstance.option(t)&&this.sortableInstance.option(t,e)}updateSortableInstance(t){for(const e of t.keys()){const t=this[e];this.setSortableOption(e,t)}}updated(t){super.updated(t),this.updateSortableInstance(t)}slottedChanged(){this.initializeSortable()}render(){return n.html`
|
|
863
863
|
<div class="md-draggable" part="draggable" aria-disabled=${this.disabled}>
|
|
864
864
|
<slot name="draggable-item"></slot>
|
|
865
865
|
</div>
|
|
866
|
-
`}};p([(0,l.property)({type:Number})],e.prototype,"delay",void 0),p([(0,l.property)({type:Number})],e.prototype,"animation",void 0),p([(0,l.property)({type:String})],e.prototype,"handle",void 0),p([(0,l.property)({type:String})],e.prototype,"filter",void 0),p([(0,l.property)({type:String})],e.prototype,"easing",void 0),p([(0,l.property)({type:String})],e.prototype,"direction",void 0),p([(0,l.property)({type:Object})],e.prototype,"group",void 0),p([(0,l.property)({type:String,attribute:"draggable-items"})],e.prototype,"draggableItems",void 0),p([(0,l.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),p([(0,l.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),p([(0,l.property)({type:String,attribute:"drag-class"})],e.prototype,"dragClass",void 0),p([(0,l.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),p([(0,l.property)({type:Number,attribute:"swap-threshold"})],e.prototype,"swapThreshold",void 0),p([(0,l.property)({type:Number,attribute:"touch-start-threshold"})],e.prototype,"touchStartThreshold",void 0),p([(0,l.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"sort",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),p([(0,l.query)("slot[name='draggable-item']")],e.prototype,"draggableSlot",void 0),e=p([(0,s.wW)("md-draggable")],e),t.ELEMENT=e}(o||(o={}))},5730(t,e,i){i.d(e,{T:()=>o});var o,s=i(7704),
|
|
866
|
+
`}};p([(0,l.property)({type:Number})],e.prototype,"delay",void 0),p([(0,l.property)({type:Number})],e.prototype,"animation",void 0),p([(0,l.property)({type:String})],e.prototype,"handle",void 0),p([(0,l.property)({type:String})],e.prototype,"filter",void 0),p([(0,l.property)({type:String})],e.prototype,"easing",void 0),p([(0,l.property)({type:String})],e.prototype,"direction",void 0),p([(0,l.property)({type:Object})],e.prototype,"group",void 0),p([(0,l.property)({type:String,attribute:"draggable-items"})],e.prototype,"draggableItems",void 0),p([(0,l.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),p([(0,l.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),p([(0,l.property)({type:String,attribute:"drag-class"})],e.prototype,"dragClass",void 0),p([(0,l.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),p([(0,l.property)({type:Number,attribute:"swap-threshold"})],e.prototype,"swapThreshold",void 0),p([(0,l.property)({type:Number,attribute:"touch-start-threshold"})],e.prototype,"touchStartThreshold",void 0),p([(0,l.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"sort",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),p([(0,l.query)("slot[name='draggable-item']")],e.prototype,"draggableSlot",void 0),e=p([(0,s.wW)("md-draggable")],e),t.ELEMENT=e}(o||(o={}))},5730(t,e,i){i.d(e,{T:()=>o});var o,s=i(7704),a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(4955),h=i(9431),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.disabled=!1,this.extended=!1,this.editable=!1}static get styles(){return[r.A,h.A]}get draggableItemClassMap(){return{extended:this.extended,default:!this.extended,disabled:this.disabled}}render(){return n.html`
|
|
867
867
|
<div
|
|
868
868
|
class="md-draggable-item ${(0,d.classMap)(this.draggableItemClassMap)}"
|
|
869
869
|
part="draggable-item"
|
|
@@ -873,7 +873,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
873
873
|
<slot></slot>
|
|
874
874
|
${this.extended?n.html` <slot name="extended"></slot> `:n.nothing}
|
|
875
875
|
</div>
|
|
876
|
-
`}};p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=p([(0,r.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{m:()=>o}),i(1821);var o,s=i(2900),r=i(7704),a=i(2050),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(5057),b=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},v=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return v(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return v(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.focus()},10)}}this.expanded?this.collapse():(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.expand()),this.input.focus()}}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.key}})))}}onLabelClick(){this.label.focus(),this.readOnly||this.toggle()}focusFirst(){this.filteredOptions.length&&(this.focusedIndex=0)}focusLast(){this.filteredOptions.length&&(this.focusedIndex=this.filteredOptions.length-1)}focusNext(){this.filteredOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.filteredOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.filteredOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return v(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],r=this.optionsListItems[t+1]||s,a=this.optionsListItems[t-1]||s,n=r.getBoundingClientRect(),l=a.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
876
|
+
`}};p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"extended",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),e=p([(0,a.w)("md-draggable-item")],e),t.ELEMENT=e}(o||(o={}))},621(t,e,i){i.d(e,{m:()=>o}),i(1821);var o,s=i(2900),a=i(7704),r=i(2050),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(5057),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},v=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,a.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{var e;if(!this.disabled&&!this.readOnly)switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:{const i=t.composedPath()[0];if(null===(e=i.closest)||void 0===e?void 0:e.call(i,".md-dropdown-button"))break;t.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case s.Uz.ArrowDown:t.preventDefault(),this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:t.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:t.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:t.preventDefault(),this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape:case s.Uz.Backspace:this.expanded&&(t.preventDefault(),t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e&&this.dropdownRenderOptions.some(t=>t.key===this.selectedKey)){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&this.focusToIndex(t),this.searchable&&this.setInitialValue()}if("expanded"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===e&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;if(i){const e=this.getOptionValue(i);this.inputValue=e,this.setInputValue(e),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(e)}}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateActiveDescendant(){const t=this.searchable?this.input:this.label;if(t){const e=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";t.setAttribute("aria-activedescendant",e)}}updateListDOM(){return v(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return v(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.focus()},10)}}this.expanded?this.collapse():(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.expand()),this.input.focus()}}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const t=this.filteredOptions.findIndex(t=>t.key===this.selectedKey);-1!==t?this.focusedIndex=t:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(null==t?void 0:t.option){const e=this.getOptionValue(t.option);this.inputValue=e,this.setInputValue(e)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.filteredOptions[this.focusedIndex];if(!t||"no-result"===t.key)return;const e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in t&&t.option||t.key}})))}}onLabelClick(){this.label.focus(),this.readOnly||this.toggle()}focusFirst(){this.filteredOptions.length&&(this.focusedIndex=0)}focusLast(){this.filteredOptions.length&&(this.focusedIndex=this.filteredOptions.length-1)}focusNext(){this.filteredOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.filteredOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.filteredOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(t){this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.filteredOptions.findIndex(e=>e.key===t.key);this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return v(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],a=this.optionsListItems[t+1]||s,r=this.optionsListItems[t-1]||s,n=a.getBoundingClientRect(),l=r.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
877
877
|
<md-help-text
|
|
878
878
|
class="help-text ${(0,h.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
879
879
|
.message=${this.helpText}
|
|
@@ -1022,7 +1022,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1022
1022
|
</ul>
|
|
1023
1023
|
</div>
|
|
1024
1024
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
1025
|
-
`}};b([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),b([(0,d.property)({type:Array})],i.prototype,"options",void 0),b([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),b([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),b([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),b([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),b([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),b([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),b([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),b([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),b([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),b([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),b([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),b([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),b([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),b([(0,d.state)()],i.prototype,"selectedKey",void 0),b([(0,d.state)()],i.prototype,"expanded",void 0),b([(0,d.state)()],i.prototype,"focusedIndex",void 0),b([(0,d.query)("label")],i.prototype,"label",void 0),b([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),b([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),b([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=b([(0,
|
|
1025
|
+
`}};b([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),b([(0,d.property)({type:Array})],i.prototype,"options",void 0),b([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),b([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),b([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),b([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),b([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),b([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),b([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),b([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),b([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),b([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),b([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),b([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),b([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),b([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),b([(0,d.state)()],i.prototype,"selectedKey",void 0),b([(0,d.state)()],i.prototype,"expanded",void 0),b([(0,d.state)()],i.prototype,"focusedIndex",void 0),b([(0,d.query)("label")],i.prototype,"label",void 0),b([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),b([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),b([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=b([(0,a.wW)("md-dropdown")],i),t.ELEMENT=i}(o||(o={}))},7386(t,e,i){i.d(e,{I:()=>o}),i(9189);var o,s=i(9609),a=i(3331),r=i(4084),n=i(925),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(9956),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.alignment="left",this.disabled=!1,this.isEditing=!1,this.maxLines="",this.content="Click to edit text",this.message={type:"error",message:"That is not a valid input."},this.alert=!1,this.hideMessage=!1,this.pattern="",this.type=null,this.ariaLabel="editable field",this.ariaDescribedBy="",this.reportValidity=()=>{this.dispatchEvent(new Event("invalid",{bubbles:!1,cancelable:!0,composed:!0}))},this.checkValidity=t=>{let e=!0;const i=i=>{null===t.match(i)&&(e=!1)};if(this.pattern)i(new RegExp(this.pattern));else if(t&&this.type)switch(this.type){case"integer":i(new RegExp(a.b.integerString));break;case"decimal":i(new RegExp(a.b.decimalString))}return e},this.handleFocus=()=>{this.disabled||(this.isEditing=!0,this.setRange())},this.handleKeydown=t=>{var e,i;const{key:o,code:s}=t;if(!["Tab","Meta","Shift","Delete","Backspace","Arrow"].some(t=>s.includes(t)))if("integer"===this.type&&(o.includes(".")||"-"===o&&(null===(e=this.editableField)||void 0===e?void 0:e.innerText.includes("-"))))t.preventDefault();else if("integer"!==this.type&&"decimal"!==this.type||!s.match("Space")){if(this.type&&1===o.length){const e=((null===(i=this.editableField)||void 0===i?void 0:i.innerText.trim())||"")+o;("integer"!==this.type||/^-?\d*$/.test(e))&&("decimal"!==this.type||/^-?\d*\.?\d*$/.test(e))||t.preventDefault()}}else t.preventDefault()},this.handleBlur=()=>{var t,e,i;this.isEditing=!1,this.maxLines.length>0&&(null===(t=this.editableField)||void 0===t||t.scrollTo(0,0));const o=(null===(i=null===(e=this.editableField)||void 0===e?void 0:e.innerText)||void 0===i?void 0:i.trim())||"",s=n.default.sanitize(o);s!==this.content&&(this.content=s),this.alert=!1,this.handleValidation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.handleFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.handleFocus)}firstUpdated(t){super.firstUpdated(t),this.innerText&&this.innerText.trim().length>0&&this.innerText.trim()!==this.content&&(this.content=this.innerText.trim())}setRange(){var t;if(this.editableField){const e=document.createRange(),i=window.getSelection(),o=this.editableField.childNodes[0];if(!o||o.nodeType!==Node.TEXT_NODE)return;const s=(null===(t=o.nodeValue)||void 0===t?void 0:t.length)||0;e.setStart(o,s),e.collapse(!0),i&&0===i.toString().length&&(i.removeAllRanges(),i.addRange(e)),this.maxLines.length>0&&(this.editableField.scrollTop=this.editableField.scrollHeight)}}handleValidation(){var t;(this.type||this.pattern)&&((null===(t=this.checkValidity)||void 0===t?void 0:t.call(this,this.content))||(this.reportValidity(),this.showAlert()))}showAlert(){this.alert=!0}static get styles(){return[r.A,c.A]}get overflowStyles(){return this.maxLines.length&&this.maxLines.length>0&&`max-height: ${2*parseInt(this.maxLines)}rem; -webkit-line-clamp: ${this.maxLines}; word-break: break-all;`}messagesTemplate(){var t,e,i;return this.alert?l.html`
|
|
1026
1026
|
<div class="md-editable-textfield__messages" style="display: ${this.hideMessage?"none":"block"}">
|
|
1027
1027
|
<md-help-text
|
|
1028
1028
|
id="alert-message"
|
|
@@ -1051,19 +1051,19 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1051
1051
|
.innerText=${this.content}
|
|
1052
1052
|
></div>
|
|
1053
1053
|
${this.messagesTemplate()}
|
|
1054
|
-
`}};u([(0,d.property)({type:String})],
|
|
1054
|
+
`}};u([(0,d.property)({type:String})],e.prototype,"alignment",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"isEditing",void 0),u([(0,d.property)({type:String,attribute:"max-lines",reflect:!0})],e.prototype,"maxLines",void 0),u([(0,d.property)({type:String,reflect:!0})],e.prototype,"content",void 0),u([(0,d.property)({type:Object})],e.prototype,"message",void 0),u([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"alert",void 0),u([(0,d.property)({type:Boolean})],e.prototype,"hideMessage",void 0),u([(0,d.property)({type:String})],e.prototype,"pattern",void 0),u([(0,d.property)({type:String})],e.prototype,"type",void 0),u([(0,d.property)({type:String})],e.prototype,"ariaLabel",void 0),u([(0,d.property)({type:String,attribute:"aria-described-by"})],e.prototype,"ariaDescribedBy",void 0),u([(0,d.query)(".md-editable-textfield")],e.prototype,"editableField",void 0),e=u([(0,s.w)("md-editable-field")],e),t.ELEMENT=e}(o||(o={}))},4262(t,e,i){i.d(e,{o:()=>o}),i(5983),i(1821);var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=(i(4358),i(1660),i(4886),i(5109)),d=(i(6014),i(2927)),h=i(8899),p=i(3517),c=(i(5958),i(7262)),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.yC)((0,a.TS)(d.LitElement))){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.aspectRatio=!1,this.centered=!1,this.fixed=!1,this.full=!1,this.closeAriaLabel="Close Modal",this.resizeAriaLabel="Resize Modal",this.maximizeScreenLabel="Maximize Modal",this.minimizeAriaLabel="Minimize Modal",this.moveAriaLabel="Move Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.previouslyFocusedElement=null,this.applyInitialPosition=!0,this.handleModalKeyDown=t=>{this.show&&t.code===s.Uz.Escape&&(t.preventDefault(),t.stopPropagation(),this.handleClose(t))},this.resizeMoveListener=t=>{const{target:e}=t;let i=parseFloat(e.getAttribute("data-x"))||0,o=parseFloat(e.getAttribute("data-y"))||0;e.style.setProperty("width",`${t.rect.width}px`,"important"),e.style.setProperty("height",`${t.rect.height}px`,"important");const{initialX:s,initialY:a}=this.getInitialPosition();i+=t.deltaRect.left+s,o+=t.deltaRect.top+a,this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.resizeEndListener=()=>{this.setContainerRect()},this.getInitialPosition=()=>{var t,e;return this.applyInitialPosition&&this.position?{initialX:Number(null===(t=this.position)||void 0===t?void 0:t.x),initialY:Number(null===(e=this.position)||void 0===e?void 0:e.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:e}=t,{x:i,y:o}=this.getTransformValues(t);this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()},this.MOVE_STEP=10,this.handleMoveKeyDown=t=>{if(!this.container)return;const{code:e}=t;let i=0,o=0;switch(e){case"ArrowUp":o=-this.MOVE_STEP;break;case"ArrowDown":o=this.MOVE_STEP;break;case"ArrowLeft":i=-this.MOVE_STEP;break;case"ArrowRight":i=this.MOVE_STEP;break;default:return}t.preventDefault(),t.stopPropagation();const s=parseFloat(this.container.getAttribute("data-x")||"0")+i,a=parseFloat(this.container.getAttribute("data-y")||"0")+o;this.setTargetPosition(this.container,s,a),this.containerTransform=`translate(${s}px, ${a}px)`,this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:`${s}`,y:`${a}`}}}))}}static get styles(){return[n.A,c.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.capturePreviouslyFocusedElement(),this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance(),this.focusModalOnOpen()):(this.cleanContainerStyles(),this.destroyInteractInstance(),this.restoreFocusAfterClose())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition(),t.has("minimize")&&!0===t.get("minimize")&&!1===this.minimize&&this.show&&this.focusModalOnOpen()}getDeepActiveElementFromDocument(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}capturePreviouslyFocusedElement(){var t;const e=this.getDeepActiveElementFromDocument();e&&e!==document.body?(null===(t=this.shadowRoot)||void 0===t?void 0:t.contains(e))||this.contains(e)||(this.previouslyFocusedElement=e):this.previouslyFocusedElement=null}focusModalOnOpen(){requestAnimationFrame(()=>{var t;if(!this.show||!this.container)return;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-floating__header md-button.md-floating__header-button");e?e.focus():(this.container.setAttribute("tabindex","-1"),this.container.focus())})}restoreFocusAfterClose(){const t=this.previouslyFocusedElement;this.previouslyFocusedElement=null,t&&t.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}isNewPositionNotSame(){var t,e,i,o;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(e=this.position)||void 0===e?void 0:e.x)||Number(null===(i=this.container)||void 0===i?void 0:i.getAttribute("data-y"))!==(null===(o=this.position)||void 0===o?void 0:o.y)}setInitialTargetPosition(){var t,e;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.position)||void 0===t?void 0:t.x),Number(null===(e=this.position)||void 0===e?void 0:e.y))}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),e=this.container.getAttribute("data-y");return t&&e?(this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:e}}})),`translate(${t}px, ${e}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame(()=>{return t=this,e=void 0,o=function*(){yield this.updateComplete,this.containerRect=this.container.getBoundingClientRect(),this.dispatchEvent(new CustomEvent("floating-modal-resize",{composed:!0,bubbles:!0,detail:{size:this.containerRect}})),this.containerTransform=this.getContainerTransform()},new((i=void 0)||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())});var t,e,i,o})}setInteractInstance(){requestAnimationFrame(()=>{this.container&&((0,l.default)(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&(0,l.default)(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[l.default.modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[l.default.modifiers.restrictSize({max:"parent"})]})]:void 0}))})}handleClose(t){this.show=!1,this.full=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleMinimize(){this.minimizable&&(this.dragOccured||(this.minimize=!this.minimize,this.dispatchEvent(new CustomEvent("floating-modal-minimize",{composed:!0,bubbles:!0,detail:{minimize:this.minimize}}))),this.dragOccured=!1)}handleToggleExpandCollapse(){this.full=!this.full}getTransformValues(t){const{target:e,dx:i,dy:o}=t,{initialX:s,initialY:a}=this.getInitialPosition();return{x:(parseFloat(e.getAttribute("data-x"))||0)+i+s,y:(parseFloat(e.getAttribute("data-y"))||0)+o+a}}setTargetPosition(t,e,i){t.style.transform=`translate(${e}px, ${i}px)`,t.setAttribute("data-x",`${e}`),t.setAttribute("data-y",`${i}`)}destroyInteractInstance(){this.container&&l.default.isSet(this.container)&&(0,l.default)(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return d.html`
|
|
1055
1055
|
${this.show?d.html`
|
|
1056
1056
|
<div
|
|
1057
1057
|
class="md-floating ${this.fixed?"fixed":""} ${this.minimize?"hide":""}"
|
|
1058
1058
|
part="floating"
|
|
1059
1059
|
role="dialog"
|
|
1060
|
-
aria-label=${(0,p.ifDefined)(this.label||void 0)}
|
|
1060
|
+
aria-label=${(0,p.ifDefined)(this.heading||this.label||void 0)}
|
|
1061
1061
|
aria-modal="true"
|
|
1062
1062
|
@keydown=${this.handleModalKeyDown}
|
|
1063
1063
|
style=${(0,p.ifDefined)(this.containerRect?this.centered?`\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n ${this.full?"width: 100% !important; height: 100% !important;":""}\n `:`width: ${this.full?"100% !important":`${this.containerRect.width}px !important`};\n height: ${this.full?"100% !important":`${this.containerRect.height}px !important`};\n top: ${this.full?"0 !important":""};\n left: ${this.full?"0 !important":""};\n bottom: ${this.full?"0 !important":""};\n right: ${this.full?"0 !important":""};\n ${this.full?"transform: none !important":""};\n ${this.full?"":`transform: ${this.position?`translate(${this.position.x}px, ${this.position.y}px)`:this.containerTransform} !important`};`:void 0)}
|
|
1064
1064
|
>
|
|
1065
1065
|
<div class="md-floating__header">
|
|
1066
|
-
<div class="md-floating__header-text">
|
|
1066
|
+
<div class="md-floating__header-text" aria-hidden="true">
|
|
1067
1067
|
${this.heading?d.html` ${this.heading} `:d.html`
|
|
1068
1068
|
${!this.minimize&&this.headerSlot}
|
|
1069
1069
|
<slot name="header"></slot>
|
|
@@ -1119,7 +1119,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1119
1119
|
<slot></slot>
|
|
1120
1120
|
</div>
|
|
1121
1121
|
</div>
|
|
1122
|
-
${this.minimizable?d.html` <div class="md-floating-min-parent" part="minimize-floating"
|
|
1122
|
+
${this.minimizable?d.html` <div class="md-floating-min-parent" part="minimize-floating">
|
|
1123
1123
|
<md-floating-modal-minimized
|
|
1124
1124
|
class="float-modal-min"
|
|
1125
1125
|
part="floating-minimized"
|
|
@@ -1136,7 +1136,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1136
1136
|
</md-floating-modal-minimized>
|
|
1137
1137
|
</div>`:d.nothing}
|
|
1138
1138
|
`:d.nothing}
|
|
1139
|
-
`}};u([(0,h.property)({type:String})],e.prototype,"heading",void 0),u([(0,h.property)({type:String})],e.prototype,"label",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"aspect-ratio"})],e.prototype,"aspectRatio",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"centered"})],e.prototype,"centered",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"fixed-strategy"})],e.prototype,"fixed",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"full-screen"})],e.prototype,"full",void 0),u([(0,h.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"resize-aria-label"})],e.prototype,"resizeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"maximize-aria-label"})],e.prototype,"maximizeScreenLabel",void 0),u([(0,h.property)({type:String,attribute:"minimize-aria-label"})],e.prototype,"minimizeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"move-aria-label"})],e.prototype,"moveAriaLabel",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"maximizable",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"resizable",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),u([(0,h.property)({type:Object})],e.prototype,"position",void 0),u([(0,h.property)({type:Object})],e.prototype,"minPosition",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"minimizable",void 0),u([(0,h.property)({type:Object})],e.prototype,"containerRect",void 0),u([(0,h.state)()],e.prototype,"dragOccured",void 0),u([(0,h.query)(".md-floating")],e.prototype,"container",void 0),u([(0,h.query)(".md-floating__body")],e.prototype,"body",void 0),u([(0,h.query)(".md-floating__header")],e.prototype,"header",void 0),u([(0,h.query)(".md-floating-min-parent")],e.prototype,"minimizedHeader",void 0),u([(0,h.query)('slot[name="header"]')],e.prototype,"headerSlot",void 0),e=u([(0,
|
|
1139
|
+
`}};u([(0,h.property)({type:String})],e.prototype,"heading",void 0),u([(0,h.property)({type:String})],e.prototype,"label",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"aspect-ratio"})],e.prototype,"aspectRatio",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"centered"})],e.prototype,"centered",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"fixed-strategy"})],e.prototype,"fixed",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"full-screen"})],e.prototype,"full",void 0),u([(0,h.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"resize-aria-label"})],e.prototype,"resizeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"maximize-aria-label"})],e.prototype,"maximizeScreenLabel",void 0),u([(0,h.property)({type:String,attribute:"minimize-aria-label"})],e.prototype,"minimizeAriaLabel",void 0),u([(0,h.property)({type:String,attribute:"move-aria-label"})],e.prototype,"moveAriaLabel",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"maximizable",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"resizable",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),u([(0,h.property)({type:Object})],e.prototype,"position",void 0),u([(0,h.property)({type:Object})],e.prototype,"minPosition",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"minimizable",void 0),u([(0,h.property)({type:Object})],e.prototype,"containerRect",void 0),u([(0,h.state)()],e.prototype,"dragOccured",void 0),u([(0,h.query)(".md-floating")],e.prototype,"container",void 0),u([(0,h.query)(".md-floating__body")],e.prototype,"body",void 0),u([(0,h.query)(".md-floating__header")],e.prototype,"header",void 0),u([(0,h.query)(".md-floating-min-parent")],e.prototype,"minimizedHeader",void 0),u([(0,h.query)('slot[name="header"]')],e.prototype,"headerSlot",void 0),e=u([(0,r.w)("md-floating-modal")],e),t.ELEMENT=e}(o||(o={}))},9147(t,e,i){i.d(e,{l:()=>o});var o,s=i(7704),a=i(2927),r=i(8899),n=i(3517),l=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.TS)(a.LitElement)){constructor(){super(...arguments),this.rel="",this.name="",this.action="",this.label="",this.method="get",this.target="_self",this.enctype="application/x-www-form-urlencoded",this.novalidate=!1,this.charset="UTF-8",this.isvalid=!1,this.token="on",this.allowRedirect=!1,this.autofillname="input-name",this.formElement=[],this.handleSubmit=t=>{t.preventDefault(),this.validated()&&this.submitForm()},this.handleFormSubmit=t=>{this.allowRedirect||t.preventDefault(),this.dispatchEvent(new CustomEvent("form-submitted",{composed:!0,bubbles:!0}))}}get formMethod(){return"GET"===this.method?"get":"POST"===this.method?"post":this.method}isSubmittable(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement}isDisabled(t){return t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")}findSubmittable(t,e){const i=Array.from(t.children);for(const t of i)if(!this.isDisabled(t))if(this.isSubmittable(t)&&e.add(t),t.shadowRoot)this.findSubmittable(t.shadowRoot,e);else if("SLOT"===t.tagName){const i=t.assignedElements();if(i.length){const{parentElement:t}=i[0];t&&this.findSubmittable(t,e)}}else this.findSubmittable(t,e);return[...e]}validated(){return!!this.novalidate||this.isvalid}submitForm(){const{form:t}=this;t.requestSubmit?t.requestSubmit():t.submit()}get submitButton(){return this.querySelector("button[type='submit']")||this.querySelector("input[type='submit']")||this.querySelector("md-button[type='submit']")}disconnectedCallback(){super.disconnectedCallback(),this.cleanupWrappedForms(),this.teardownEvents()}deleteWrappedForm(t){t.removeEventListener("submit",this.handleFormSubmit)}cleanupWrappedForms(){const{formElement:t}=this;if(t.length)for(const e of t)this.deleteWrappedForm(e);this.formElement=[]}createWrappedForm(t){const e=document.createElement("form");e.addEventListener("submit",this.handleFormSubmit);const{parentNode:i}=t;t.autocomplete=this.token,t.id||(t.id=this.autofillname),t.name||(t.name=this.autofillname),i&&(this.formElement.push(e),i.insertBefore(e,t),e.append(t))}teardownEvents(){this.submitButton&&this.submitButton.removeEventListener("click",this.handleSubmit)}setupEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.handleSubmit)}setupSubmittable(){const t=this.findSubmittable(this.form,new Set);if(t.length)for(const e of t)this.createWrappedForm(e)}slottedChanged(){this.setupSubmittable(),this.setupEvents()}render(){return a.html`
|
|
1140
1140
|
<form
|
|
1141
1141
|
class="md-form"
|
|
1142
1142
|
role="form"
|
|
@@ -1154,7 +1154,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1154
1154
|
>
|
|
1155
1155
|
<slot></slot>
|
|
1156
1156
|
</form>
|
|
1157
|
-
`}};l([(0,
|
|
1157
|
+
`}};l([(0,r.property)({type:String})],e.prototype,"rel",void 0),l([(0,r.property)({type:String})],e.prototype,"name",void 0),l([(0,r.property)({type:String})],e.prototype,"action",void 0),l([(0,r.property)({type:String})],e.prototype,"label",void 0),l([(0,r.property)({type:String})],e.prototype,"method",void 0),l([(0,r.property)({type:String})],e.prototype,"target",void 0),l([(0,r.property)({type:String})],e.prototype,"enctype",void 0),l([(0,r.property)({type:Boolean,reflect:!0,attribute:"no-validate"})],e.prototype,"novalidate",void 0),l([(0,r.property)({type:String,reflect:!0,attribute:"accept-charset"})],e.prototype,"charset",void 0),l([(0,r.property)({type:Boolean,reflect:!0,attribute:"is-valid"})],e.prototype,"isvalid",void 0),l([(0,r.property)({type:String,attribute:"autofill-token"})],e.prototype,"token",void 0),l([(0,r.property)({type:Boolean,attribute:"allow-redirect"})],e.prototype,"allowRedirect",void 0),l([(0,r.property)({type:String,attribute:"autofill-name"})],e.prototype,"autofillname",void 0),l([(0,r.query)(".md-form")],e.prototype,"form",void 0),e=l([(0,s.wW)("md-form")],e),t.ELEMENT=e}(o||(o={}))},8637(t,e,i){i.d(e,{I:()=>o}),i(1821);var o,s=i(3876),a=i(7704),r=i(9609),n=i(7154),l=i(4084),d=i(2927),h=i(8899),p=i(4955),c=i(3517),u=i(7155),m=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.yC)(d.LitElement)){constructor(){super(...arguments),this.label="Expand",this.checkedLabel="Collapse",this.hovered=!1,this.disabled=!1,this.checked=!1,this.visible=!0,this.focused=!1,this.disableClickToggle=!1,this.alignment="leading",this.dragger=!1,this.shadow=!1}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}static get styles(){return[l.A,u.A]}toggleGrabber(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("grabber-toggled",{detail:{checked:this.checked},bubbles:!0,composed:!0})))}handleMouseDown(){this.disableClickToggle||this.toggleGrabber()}handleKeyDown(t){this.disableClickToggle||(0,n.o)(t.code)&&(t.preventDefault(),this.toggleGrabber())}handleMouseEnter(){this.hovered=!0,this.dispatchHoverEvent()}handleMouseLeave(){this.hovered=!1,this.dispatchHoverEvent()}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}dispatchHoverEvent(){this.dispatchEvent(new CustomEvent("grabber-hover-changed",{bubbles:!0,composed:!0,detail:{hovered:this.hovered}}))}get currentLabel(){return this.checked?this.checkedLabel:this.label}get collapsed(){return!this.checked}get grabberClassMap(){return{"md-grabber--active":this.checked,"md-grabber--disabled":this.disabled,"md-grabber--dragger":this.dragger,[`md-grabber--${this.alignment}`]:this.alignment,visible:this.visible||this.focused,"md-grabber--rtl":this.isRtl}}get grabberContainerClassMap(){return{[`${this.alignment}`]:!0,shadow:this.shadow&&(this.visible||this.checked)}}get isRtl(){return"rtl"===getComputedStyle(this).direction}get iconName(){if(this.dragger)return"list-menu-bold";if("leading"===this.alignment||"trailing"===this.alignment){const t=this.isRtl?"arrow-right-bold":"arrow-left-bold",e=this.isRtl?"arrow-left-bold":"arrow-right-bold";return this.checked?t:e}return this.checked?"arrow-up-bold":"arrow-down-bold"}get iconSize(){return this.dragger||!1===s.vz.isMomentumV2Enabled?"10":"12"}render(){return d.html`
|
|
1158
1158
|
<div class="md-grabber__container ${(0,p.classMap)(this.grabberContainerClassMap)}">
|
|
1159
1159
|
<button
|
|
1160
1160
|
class="md-grabber ${(0,p.classMap)(this.grabberClassMap)}"
|
|
@@ -1179,7 +1179,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1179
1179
|
></md-icon>
|
|
1180
1180
|
</button>
|
|
1181
1181
|
</div>
|
|
1182
|
-
`}};m([(0,h.property)({type:String})],e.prototype,"label",void 0),m([(0,h.property)({type:String})],e.prototype,"checkedLabel",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hovered",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"checked",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"visible",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"focused",void 0),m([(0,h.property)({type:Boolean,attribute:"disable-click-toggle"})],e.prototype,"disableClickToggle",void 0),m([(0,h.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"dragger",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"shadow",void 0),e=m([(0,
|
|
1182
|
+
`}};m([(0,h.property)({type:String})],e.prototype,"label",void 0),m([(0,h.property)({type:String})],e.prototype,"checkedLabel",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hovered",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"checked",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"visible",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"focused",void 0),m([(0,h.property)({type:Boolean,attribute:"disable-click-toggle"})],e.prototype,"disableClickToggle",void 0),m([(0,h.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"dragger",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"shadow",void 0),e=m([(0,r.w)("md-grabber")],e),t.ELEMENT=e}(o||(o={}))},1821(t,e,i){i.d(e,{In:()=>o}),i(5983);var o,s=i(9609),a=i(4084),r=i(9500),n=i(3496),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(1156),u=i(7955),m=i(9837),b=i(7253),v=i(1722),y=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){var e;let i=e=class extends l.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this.abortController=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`);break;case"name-changed":console.warn(`[@momentum-ui/web-component] Icon: The name changed to '${e[0]}' before the SVG icon '${e[1]}' finished loading; skipping outdated result.`)}}}renewSignal(){var t;return null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=new AbortController,this.abortController.signal}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.abortController)||void 0===t||t.abort(),this.abortController=null}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i,o,s;if(this.isSvgAlreadyLoaded(t))return;const a=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"),r=this.renewSignal(),n=yield(0,v.Jp)(this.computedSvgPath,t,"svg",r);if(!n)return;const l=null===(i=this.svgIcon)||void 0===i?void 0:i.getAttribute("class");a===l?(this.svgIcon=n,null===(o=this.svgIcon)||void 0===o||o.setAttribute("class",`icon ${t}`),null===(s=this.svgIcon)||void 0===s||s.setAttribute("part","icon"),this.setSvgIconAttributes()):this.consoleHandler("name-changed",[null!=l?l:"",t])},new((o=void 0)||(o=Promise))(function(t,a){function r(t){try{l(s.next(t))}catch(t){a(t)}}function n(t){try{l(s.throw(t))}catch(t){a(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:b.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:(0,n.default)(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":r.default.includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[a.A,m.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return l.html`
|
|
1183
1183
|
<i
|
|
1184
1184
|
part="icon"
|
|
1185
1185
|
id=${this.id}
|
|
@@ -1204,7 +1204,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1204
1204
|
>
|
|
1205
1205
|
${this.svgIcon?this.svgIcon:l.nothing}
|
|
1206
1206
|
</div>
|
|
1207
|
-
`}};i.designLookup=new Map(Object.entries(u)),y([(0,d.property)({type:String})],i.prototype,"color",void 0),y([(0,d.property)({type:String})],i.prototype,"description",void 0),y([(0,d.property)({type:String})],i.prototype,"name",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"size",void 0),y([(0,d.property)({type:String})],i.prototype,"title",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaHidden",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isActive",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),y([(0,d.property)({type:String})],i.prototype,"iconSet",void 0),y([(0,d.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),y([(0,d.state)()],i.prototype,"svgIcon",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",null),i=e=y([(0,s.w)("md-icon")],i),t.ELEMENT=i}(o||(o={}))},6436(t,e,i){i.d(e,{b:()=>o}),i(5983);var o,s=i(7704),
|
|
1207
|
+
`}};i.designLookup=new Map(Object.entries(u)),y([(0,d.property)({type:String})],i.prototype,"color",void 0),y([(0,d.property)({type:String})],i.prototype,"description",void 0),y([(0,d.property)({type:String})],i.prototype,"name",void 0),y([(0,d.property)({type:String})],i.prototype,"id",void 0),y([(0,d.property)({type:String})],i.prototype,"size",void 0),y([(0,d.property)({type:String})],i.prototype,"title",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaHidden",void 0),y([(0,d.property)({type:String})],i.prototype,"type",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isActive",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"isComboBoxIcon",void 0),y([(0,d.property)({type:Boolean})],i.prototype,"sizeOverrided",void 0),y([(0,d.property)({type:String})],i.prototype,"iconSet",void 0),y([(0,d.property)({type:String,attribute:"svg-url"})],i.prototype,"svgUrl",void 0),y([(0,d.state)()],i.prototype,"svgIcon",void 0),y([(0,d.property)({type:String})],i.prototype,"ariaLabel",null),i=e=y([(0,s.w)("md-icon")],i),t.ELEMENT=i}(o||(o={}))},6436(t,e,i){i.d(e,{b:()=>o}),i(5983);var o,s=i(7704),a=i(4084),r=i(6579),n=i(2927),l=i(8899),d=i(3517),h=i(3241),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},c=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.acceptLanguage="javascript",this.getLocalization="Input File",this.acceptTypes="",this.fileName=""}static get styles(){return[a.A,h.A]}triggerFileLoad(t){t.preventDefault(),this.input.click()}handleFile(t){return c(this,void 0,void 0,function*(){t.preventDefault();const e=this.input.files;if(e&&0!==e.length)for(const t of e){this.fileName=t.name;try{yield this.readFile(t)}catch(t){console.error("Error reading file",t)}}})}readFile(t){return new Promise((e,i)=>{const o=new FileReader;o.onload=t=>{e(t.target.result)},o.onerror=t=>i(t),o.readAsText(t)})}importLanguage(t){return c(this,void 0,void 0,function*(){try{const{default:e}=yield import(`highlight.js/lib/languages/${t}`);r.default.registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}})}getAllAcceptTypes(){const t=r.default.listLanguages();return t.length?t.map(t=>r.default.getLanguage(`${t}`).aliases).map(t=>t.map(t=>`.${t}`)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage)}render(){return n.html`
|
|
1208
1208
|
<div class="md-input-file">
|
|
1209
1209
|
<label for="file-input">
|
|
1210
1210
|
<md-button color="blue" class="md-input-file-btn" @click=${this.triggerFileLoad}>
|
|
@@ -1220,7 +1220,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1220
1220
|
@change=${t=>this.handleFile(t)}
|
|
1221
1221
|
/>
|
|
1222
1222
|
</div>
|
|
1223
|
-
`}};p([(0,l.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),p([(0,l.property)({type:String})],e.prototype,"getLocalization",void 0),p([(0,l.query)("input[type='file']")],e.prototype,"input",void 0),p([(0,l.state)()],e.prototype,"acceptTypes",void 0),p([(0,l.state)()],e.prototype,"fileName",void 0),e=p([(0,s.wW)("md-input-file")],e),t.ELEMENT=e}(o||(o={}))},9189(t,e,i){i.d(e,{pd:()=>o}),i(7906),i(1821),i(2369),i(9773);var o,s=i(2900),
|
|
1223
|
+
`}};p([(0,l.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),p([(0,l.property)({type:String})],e.prototype,"getLocalization",void 0),p([(0,l.query)("input[type='file']")],e.prototype,"input",void 0),p([(0,l.state)()],e.prototype,"acceptTypes",void 0),p([(0,l.state)()],e.prototype,"fileName",void 0),e=p([(0,s.wW)("md-input-file")],e),t.ELEMENT=e}(o||(o={}))},9189(t,e,i){i.d(e,{pd:()=>o}),i(7906),i(1821),i(2369),i(9773);var o,s=i(2900),a=i(9609),r=i(3203),n=i(4084),l=(i(9500),i(2927)),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(9336),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.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 e}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick)}select(){var t;null===(t=this.input)||void 0===t||t.select()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}handleOutsideClick(t){let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.input.blur(),this.isEditing=!1))}handleKeyDown(t){this.dispatchEvent(new CustomEvent("input-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleFocus(t){this.disabled||(this.isEditing=!0,this.selectWhenInFocus&&this.select(),this.dispatchEvent(new CustomEvent("input-focus",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleMouseDown(t){this.disabled||(this.isEditing=!0,this.dispatchEvent(new CustomEvent("input-mousedown",{bubbles:!0,composed:!0,detail:{srcEvent:t}})))}handleChange(t){var e;this.value=t.target.value,null===(e=this.control)||void 0===e||e.setValue(this.value),this.dispatchEvent(new CustomEvent("input-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:this.value}}))}handleBlur(t){var e;null===(e=this.control)||void 0===e||e.markAsTouched(),this.isEditing=!1,this.dispatchEvent(new CustomEvent("input-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}handleClear(t){if("keydown"===t.type){const{code:e}=t;if(e!==s.Uz.Space&&e!==s.Uz.Enter)return;t.preventDefault(),t.stopPropagation()}else"click"===t.type&&(t.preventDefault(),t.stopPropagation());this.input.focus(),this.dispatchEvent(new CustomEvent("input-clear",{bubbles:!0,composed:!0,detail:{srcEvent:t}})),document.dispatchEvent(new CustomEvent("on-widget-update")),this.handleChange(t)}handleLabelClick(){this.input.focus()}handleRighSlotChange(){var t;this.hasRightSlotContent=(null===(t=this.inputSectionRightSlot)||void 0===t?void 0:t.assignedNodes().length)>0}handleDropdownClick(t){t.preventDefault(),this.dropdownExpanded=!this.dropdownExpanded,this.dispatchEvent(new CustomEvent("input-dropdown-click",{bubbles:!0,composed:!0,detail:{srcEvent:t,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 t;return this.multiline?l.html`
|
|
1224
1224
|
<textarea
|
|
1225
1225
|
part="input"
|
|
1226
1226
|
class="md-input ${(0,h.classMap)(this.inputTemplateClassMap)}"
|
|
@@ -1376,7 +1376,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1376
1376
|
${this.characterCountLabelTemplate()}
|
|
1377
1377
|
</div>
|
|
1378
1378
|
</div>
|
|
1379
|
-
`}};b([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),b([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),b([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),b([(0,d.property)({type:String})],i.prototype,"id",void 0),b([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),b([(0,d.property)({type:String})],i.prototype,"label",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),b([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),b([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),b([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),b([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),b([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),b([(0,d.property)({type:String})],i.prototype,"shape",void 0),b([(0,d.property)({type:String})],i.prototype,"type",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Object})],i.prototype,"control",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),b([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),b([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),b([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),b([(0,d.query)(".md-input")],i.prototype,"input",void 0),b([(0,d.state)()],i.prototype,"isEditing",void 0),b([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),b([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=b([(0,
|
|
1379
|
+
`}};b([(0,d.property)({type:String})],i.prototype,"ariaDescribedBy",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaInvalid",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaLabel",void 0),b([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,d.property)({type:String})],i.prototype,"auxiliaryContentPosition",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"clear",void 0),b([(0,d.property)({type:String})],i.prototype,"clearAriaLabel",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"compact",void 0),b([(0,d.property)({type:String})],i.prototype,"containerSize",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"disabled",void 0),b([(0,d.property)({type:String})],i.prototype,"id",void 0),b([(0,d.property)({type:String})],i.prototype,"inputSize",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isFilled",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"isLoading",void 0),b([(0,d.property)({type:String})],i.prototype,"label",void 0),b([(0,d.property)({type:String})],i.prototype,"helpText",void 0),b([(0,d.property)({type:Boolean,attribute:"hide-message",reflect:!0})],i.prototype,"hideMessage",void 0),b([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaRole",void 0),b([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,d.property)({type:Number,reflect:!0})],i.prototype,"min",void 0),b([(0,d.property)({type:Number,reflect:!0})],i.prototype,"max",void 0),b([(0,d.property)({type:Number})],i.prototype,"maxLength",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"multi",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"multiline",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"name",void 0),b([(0,d.property)({type:Number})],i.prototype,"nestedLevel",void 0),b([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"readOnly",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"required",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"searchable",void 0),b([(0,d.property)({type:String})],i.prototype,"secondaryLabel",void 0),b([(0,d.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),b([(0,d.property)({type:String})],i.prototype,"shape",void 0),b([(0,d.property)({type:String})],i.prototype,"type",void 0),b([(0,d.property)({type:String,reflect:!0})],i.prototype,"value",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaControls",void 0),b([(0,d.property)({type:String})],i.prototype,"ariaExpanded",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),b([(0,d.property)({type:Object})],i.prototype,"control",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"disableUserTextInput",void 0),b([(0,d.property)({type:String})],i.prototype,"autocomplete",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"showDropdown",void 0),b([(0,d.property)({type:Boolean})],i.prototype,"dropdownExpanded",void 0),b([(0,d.property)({type:String})],i.prototype,"dropdownAriaLabel",void 0),b([(0,d.property)({type:Number})],i.prototype,"maxSuggestedLength",void 0),b([(0,d.query)(".md-input")],i.prototype,"input",void 0),b([(0,d.state)()],i.prototype,"isEditing",void 0),b([(0,d.query)('slot[name="input-section-right"]')],i.prototype,"inputSectionRightSlot",void 0),b([(0,d.state)()],i.prototype,"hasRightSlotContent",void 0),i=b([(0,a.w)("md-input")],i),t.ELEMENT=i}(o||(o={}))},5095(t,e,i){i.d(e,{N_:()=>o});var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(3517),h=i(476),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.color="",this.ariaLabel="",this.ariaRole="link",this.disabled=!1,this.inline=!1,this.inlineStyle=void 0,this.inverted=void 0,this.href="",this.tag="a",this.target="_self",this.size=void 0,this._tabIndex=0,this.autofocus=!1}get tabIndex(){return this._tabIndex}set tabIndex(t){const e=this._tabIndex;this._tabIndex=t,this.requestUpdate("tabIndex",e)}static get styles(){return[a.A,h.A]}firstUpdated(){this.autofocus&&requestAnimationFrame(()=>{this.focus()})}focus(){var t;null===(t=this.linkRef)||void 0===t||t.focus()}blur(){var t;null===(t=this.linkRef)||void 0===t||t.blur()}get linkClassNamesInfo(){return{[`md-link--${this.color}`]:this.color,"md-link--inline":this.inline,[`md-link--inline-style-${this.inlineStyle}`]:!!this.inlineStyle,[`${this.size}`]:!!this.size,inverted:!0===this.inverted,disabled:this.disabled}}get linkElement(){switch(this.tag){case"div":return r.html`
|
|
1380
1380
|
<div
|
|
1381
1381
|
class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
|
|
1382
1382
|
tabindex=${this.tabIndex}
|
|
@@ -1387,7 +1387,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1387
1387
|
>
|
|
1388
1388
|
<slot></slot>
|
|
1389
1389
|
</div>
|
|
1390
|
-
`;case"span":return
|
|
1390
|
+
`;case"span":return r.html`
|
|
1391
1391
|
<span
|
|
1392
1392
|
class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
|
|
1393
1393
|
tabindex=${this.tabIndex}
|
|
@@ -1398,7 +1398,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1398
1398
|
>
|
|
1399
1399
|
<slot></slot>
|
|
1400
1400
|
</span>
|
|
1401
|
-
`;default:return
|
|
1401
|
+
`;default:return r.html`
|
|
1402
1402
|
<a
|
|
1403
1403
|
class="md-link ${(0,l.classMap)(this.linkClassNamesInfo)}"
|
|
1404
1404
|
.target="${this.target}"
|
|
@@ -1411,7 +1411,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1411
1411
|
>
|
|
1412
1412
|
<slot></slot>
|
|
1413
1413
|
</a>
|
|
1414
|
-
`}}render(){return
|
|
1414
|
+
`}}render(){return r.html` ${this.linkElement} `}};p([(0,n.property)({type:String,attribute:!1})],e.prototype,"color",void 0),p([(0,n.property)({type:String})],e.prototype,"ariaLabel",void 0),p([(0,n.property)({type:String})],e.prototype,"ariaRole",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"inline",void 0),p([(0,n.property)({type:String,attribute:"inline-style"})],e.prototype,"inlineStyle",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"inverted",void 0),p([(0,n.property)({type:String})],e.prototype,"href",void 0),p([(0,n.property)({type:String})],e.prototype,"tag",void 0),p([(0,n.property)({type:String})],e.prototype,"target",void 0),p([(0,n.property)({type:String})],e.prototype,"size",void 0),p([(0,n.property)({type:Number,attribute:"tab-index",reflect:!0})],e.prototype,"tabIndex",null),p([(0,n.property)({type:Boolean})],e.prototype,"autofocus",void 0),p([(0,n.query)(".md-link")],e.prototype,"linkRef",void 0),e=p([(0,s.w)("md-link")],e),t.ELEMENT=e}(o||(o={}))},7030(t,e,i){i.d(e,{A:()=>o}),i(2245),i(5983),i(1821);var o,s=i(2900),a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(6341),h=i(3006),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.attendees=[{title:"Attendee",src:null,alt:"Attendee"}],this.closeAriaLabel="close",this.onKeyDown=null,this.onSnooze=null,this.message="",this.snoozeAriaLabel="snooze",this.role="button",this.show=!1,this.src="",this.status="",this.userStyles="",this.title="",this._onSnooze=t=>{this.dispatchEvent(new CustomEvent("snooze",{composed:!0,detail:{srcEvent:t}}))},this._onClose=t=>{this.dispatchEvent(new CustomEvent("close",{composed:!0,detail:{srcEvent:t}}))},this.handleSnooze=t=>{this.onSnooze?this.onSnooze(t):this._onSnooze(t),t.stopPropagation()},this.handleClose=t=>{this._onClose(t),t.stopPropagation()},this.handleKeyDown=t=>{if(t.code===s.Uz.Escape&&this.handleClose(t),t.code===s.Uz.Enter||t.code===s.Uz.Space){switch(t.target.attributes.getNamedItem("aria-label").value){case"close":this.handleClose(t);break;case"snooze":this.handleSnooze(t)}t.preventDefault()}this.onKeyDown&&this.onKeyDown(t)}}getStyles(){return n.html`
|
|
1415
1415
|
<style>
|
|
1416
1416
|
::slotted(img) {
|
|
1417
1417
|
display: inline-block;
|
|
@@ -1423,7 +1423,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1423
1423
|
}
|
|
1424
1424
|
${this.userStyles}
|
|
1425
1425
|
</style>
|
|
1426
|
-
`}static get styles(){return[
|
|
1426
|
+
`}static get styles(){return[r.A,h.A]}render(){const{attendees:t,message:e,onSnooze:i,role:o,src:s,status:a,title:r,closeAriaLabel:l,show:h,snoozeAriaLabel:p}=this;return n.html`
|
|
1427
1427
|
${this.getStyles()}
|
|
1428
1428
|
${h?n.html`
|
|
1429
1429
|
<div
|
|
@@ -1432,10 +1432,10 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1432
1432
|
@keydown=${t=>this.handleKeyDown(t)}
|
|
1433
1433
|
role=${o}
|
|
1434
1434
|
>
|
|
1435
|
-
<slot name="custom-avatar"> ${t.length>=2?(0,d.o)(t):n.html` <md-avatar title=${
|
|
1435
|
+
<slot name="custom-avatar"> ${t.length>=2?(0,d.o)(t):n.html` <md-avatar title=${r} label="avatar" src=${s} tabindex="-1"></md-avatar> `} </slot>
|
|
1436
1436
|
<div class=${"md-alert__content "+(i?"":" md-alert__content--wide")}>
|
|
1437
|
-
<div class="md-alert__title" title=${
|
|
1438
|
-
<div class="md-alert__status" title=${
|
|
1437
|
+
<div class="md-alert__title" title=${r}>${r}</div>
|
|
1438
|
+
<div class="md-alert__status" title=${a}>${a}</div>
|
|
1439
1439
|
<div class="md-alert__message" title=${e}>${e}</div>
|
|
1440
1440
|
</div>
|
|
1441
1441
|
${i?n.html`
|
|
@@ -1465,13 +1465,13 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1465
1465
|
</slot>
|
|
1466
1466
|
</div>
|
|
1467
1467
|
`:n.nothing}
|
|
1468
|
-
`}};p([(0,l.property)({type:Array})],e.prototype,"attendees",void 0),p([(0,l.property)({type:String})],e.prototype,"closeAriaLabel",void 0),p([(0,l.property)({attribute:!1})],e.prototype,"onKeyDown",void 0),p([(0,l.property)({attribute:!1})],e.prototype,"onSnooze",void 0),p([(0,l.property)({type:String})],e.prototype,"message",void 0),p([(0,l.property)({type:String})],e.prototype,"snoozeAriaLabel",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,l.property)({type:String})],e.prototype,"src",void 0),p([(0,l.property)({type:String})],e.prototype,"status",void 0),p([(0,l.property)({type:String})],e.prototype,"userStyles",void 0),p([(0,l.property)({type:String})],e.prototype,"title",void 0),e=p([(0,
|
|
1468
|
+
`}};p([(0,l.property)({type:Array})],e.prototype,"attendees",void 0),p([(0,l.property)({type:String})],e.prototype,"closeAriaLabel",void 0),p([(0,l.property)({attribute:!1})],e.prototype,"onKeyDown",void 0),p([(0,l.property)({attribute:!1})],e.prototype,"onSnooze",void 0),p([(0,l.property)({type:String})],e.prototype,"message",void 0),p([(0,l.property)({type:String})],e.prototype,"snoozeAriaLabel",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,l.property)({type:String})],e.prototype,"src",void 0),p([(0,l.property)({type:String})],e.prototype,"status",void 0),p([(0,l.property)({type:String})],e.prototype,"userStyles",void 0),p([(0,l.property)({type:String})],e.prototype,"title",void 0),e=p([(0,a.w)("md-meeting-alert")],e),t.ELEMENT=e}(o||(o={}))},708(t,e,i){i.d(e,{W1:()=>s});var o,s,a=i(2900),r=i(9609),n=i(9938),l=i(2050),d=i(9644),h=i(9324),p=i(9520),c=i(6521),u=i(9709),m=i(2927),b=i(8899),v=i(3517),y=i(9146),g=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},f=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};!function(t){t.small="260px",t.large="370px"}(o||(o={})),function(t){let e=class extends((0,n.d)(m.LitElement)){constructor(){super(...arguments),this._isOpen=!1,this.size="large",this.maxHeight="",this.customWidth="",this.showArrow=!1,this.disabled=!1,this.placement="bottom",this.allowHoverToggle=!1,this.ariaRole="menu",this.ariaLabel="",this.isDatePicker=!1,this.overlayOffset=15,this.keepOpenOnWindowBlur=!1,this.positioningStrategy=void 0,this.popperInstance=null,this.triggerElement=null,this._componentAddedAriaExpanded=!1,this.updateActiveMenuOverlayOpened=e=>{var i;this===e.target&&(null===(i=t.ELEMENT.activeOverlay)||void 0===i||i.push(e.target))},this.updateActiveMenuOverlayClosed=e=>{var i,o;const s=t.ELEMENT.activeOverlay.indexOf(e.target);this===e.target&&-1!==s&&(t.ELEMENT.activeOverlay.splice(s,1),t.ELEMENT.activeOverlay.length>0?(null===(i=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===i||i.setFocusableElements(),null===(o=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===o||o.focusOnNestedTrigger(this.triggerElement)):this.setFocusableElements())},this.handleTriggerClick=()=>{this.toggleOverlay()},this.setOverlay=(0,l.sg)(t=>{this.disabled||(this.isOpen=t)},100),this.expandPopup=()=>{this.setOverlay(!0)},this.collapsePopup=()=>{this.setOverlay(!1)},this.handleOutsideOverlayKeydown=e=>f(this,void 0,void 0,function*(){let i=!1;const o=e.composedPath();o.length&&(i=!!o.find(t=>t===this),!i)||!this.overlayContainer||e.code!==a.Uz.Escape||(e.preventDefault(),(t.ELEMENT.activeOverlay.length>0?t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1]:void 0)===this&&(this.isOpen=!1,yield this.updateComplete,this.focusOnTrigger()))}),this.handleTriggerKeyDown=t=>f(this,void 0,void 0,function*(){switch(t.code){case a.Uz.Space:case a.Uz.Enter:t.preventDefault(),this.toggleOverlay(),this.isOpen||(yield this.updateComplete,this.focusOnTrigger())}}),this.handleOutsideOverlayClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.preventClickOutside||(this.isOpen=!1))}}get isOpen(){return this._isOpen}set isOpen(t){const e=this._isOpen;this._isOpen=t,this.handleInstance(t),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",t),this.requestUpdate("isOpen",e)}static get styles(){return[y.A,m.css`
|
|
1469
1469
|
.md-menu-overlay .overlay-content {
|
|
1470
1470
|
max-height: var(--md-menu-overlay-max-height, calc(100vh - 48px));
|
|
1471
1471
|
width: var(--md-menu-overlay-width, 370px);
|
|
1472
1472
|
overflow-y: var(--md-menu-overlay-overflow-y, auto);
|
|
1473
1473
|
}
|
|
1474
|
-
`]}updateCSSProperties(){const t=this.maxHeight||"calc(100vh - 48px)",e=this.isDatePicker?"visible":"auto";let i;i=this.customWidth?this.customWidth:"small"===this.size?o.small:o.large,this.style.setProperty("--md-menu-overlay-max-height",t),this.style.setProperty("--md-menu-overlay-width",i),this.style.setProperty("--md-menu-overlay-overflow-y",e)}firstUpdated(t){super.firstUpdated(t),this.updateCSSProperties()}updated(t){if(super.updated(t),(t.has("maxHeight")||t.has("customWidth")||t.has("size")||t.has("isDatePicker"))&&this.updateCSSProperties(),t.has("isOpen")){const e=t.get("isOpen");this.isOpen?(this.activateFocusTrap(),this.dispatchMenuOpen(),document.addEventListener("menu-item-click",this.handleTriggerClick),requestAnimationFrame(()=>{document.addEventListener("click",this.handleOutsideOverlayClick)}),this.updateTriggerElementAriaExpanded()):!0===e&&(this.deactivateFocusTrap(),this.dispatchMenuClose(),document.removeEventListener("menu-item-click",this.handleTriggerClick),document.removeEventListener("click",this.handleOutsideOverlayClick),this.updateTriggerElementAriaExpanded())}t.has("showArrow")&&this.arrow&&this.arrow.toggleAttribute("data-show",this.showArrow)}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.updateComplete.then(()=>{this.handleTriggerSlotChange()})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.removeTriggerEventListeners()}checkIsInputField(t){var e;return"md-input"===(null===(e=null==t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.triggerElement.hasAttribute("aria-expanded")||this._componentAddedAriaExpanded?this._componentAddedAriaExpanded?this.isOpen?this.triggerElement.setAttribute("aria-expanded","true"):(this.triggerElement.removeAttribute("aria-expanded"),this._componentAddedAriaExpanded=!1):this.triggerElement.setAttribute("aria-expanded",this.isOpen?"true":"false"):(this.triggerElement.setAttribute("aria-expanded",this.isOpen?"true":"false"),this._componentAddedAriaExpanded=!0),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded",this.isOpen?"true":"false"))}handleTriggerSlotChange(){this.removeTriggerEventListeners(),this.setupTriggerEventListeners(),this.updateTriggerElementAriaExpanded(),this.popperInstance&&this.destroy(),this.isOpen&&(this.create(),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",this.isOpen))}removeTriggerEventListeners(){this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}setupTriggerEventListeners(){if(this.trigger){if(this.triggerElement=this.trigger[0],!this.triggerElement)return;this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")}}update(t){super.update(t)}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(t){t?this.create():this.destroy()}create(){var t;if(this.triggerElement){const e=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(".overlay-content");this.popperInstance=(0,u.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>f(this,void 0,void 0,function*(){var t;this.isOpen&&(null===(t=this.popperInstance)||void 0===t||t.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())}),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...u.defaultModifiers,h.default,p.default,c.default,d.default,{name:"preventOverflow",options:{padding:16}},{name:"offset",options:{offset:({placement:t,reference:e})=>"left-end"===t||"right-end"===t?[e.height+e.y+3,14]:[0,this.overlayOffset]}},{name:"arrow",options:{element:this.arrow,padding:5}},{name:"computeStyles",options:{adaptive:!0}},{name:"constrainToViewport",enabled:!0,phase:"afterWrite",requires:["computeStyles"],fn:({state:t})=>{if(!e)return;const i=t.elements.popper,o=i.getBoundingClientRect(),s=window.innerHeight;let
|
|
1474
|
+
`]}updateCSSProperties(){const t=this.maxHeight||"calc(100vh - 48px)",e=this.isDatePicker?"visible":"auto";let i;i=this.customWidth?this.customWidth:"small"===this.size?o.small:o.large,this.style.setProperty("--md-menu-overlay-max-height",t),this.style.setProperty("--md-menu-overlay-width",i),this.style.setProperty("--md-menu-overlay-overflow-y",e)}firstUpdated(t){super.firstUpdated(t),this.updateCSSProperties()}updated(t){if(super.updated(t),(t.has("maxHeight")||t.has("customWidth")||t.has("size")||t.has("isDatePicker"))&&this.updateCSSProperties(),t.has("isOpen")){const e=t.get("isOpen");this.isOpen?(this.activateFocusTrap(),this.dispatchMenuOpen(),document.addEventListener("menu-item-click",this.handleTriggerClick),requestAnimationFrame(()=>{document.addEventListener("click",this.handleOutsideOverlayClick)}),this.updateTriggerElementAriaExpanded()):!0===e&&(this.deactivateFocusTrap(),this.dispatchMenuClose(),document.removeEventListener("menu-item-click",this.handleTriggerClick),document.removeEventListener("click",this.handleOutsideOverlayClick),this.updateTriggerElementAriaExpanded())}t.has("showArrow")&&this.arrow&&this.arrow.toggleAttribute("data-show",this.showArrow)}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.updateComplete.then(()=>{this.handleTriggerSlotChange()})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.removeTriggerEventListeners()}checkIsInputField(t){var e;return"md-input"===(null===(e=null==t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.triggerElement.hasAttribute("aria-expanded")||this._componentAddedAriaExpanded?this._componentAddedAriaExpanded?this.isOpen?this.triggerElement.setAttribute("aria-expanded","true"):(this.triggerElement.removeAttribute("aria-expanded"),this._componentAddedAriaExpanded=!1):this.triggerElement.setAttribute("aria-expanded",this.isOpen?"true":"false"):(this.triggerElement.setAttribute("aria-expanded",this.isOpen?"true":"false"),this._componentAddedAriaExpanded=!0),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded",this.isOpen?"true":"false"))}handleTriggerSlotChange(){this.removeTriggerEventListeners(),this.setupTriggerEventListeners(),this.updateTriggerElementAriaExpanded(),this.popperInstance&&this.destroy(),this.isOpen&&(this.create(),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",this.isOpen))}removeTriggerEventListeners(){this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}setupTriggerEventListeners(){if(this.trigger){if(this.triggerElement=this.trigger[0],!this.triggerElement)return;this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")}}update(t){super.update(t)}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(t){t?this.create():this.destroy()}create(){var t;if(this.triggerElement){const e=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(".overlay-content");this.popperInstance=(0,u.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>f(this,void 0,void 0,function*(){var t;this.isOpen&&(null===(t=this.popperInstance)||void 0===t||t.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())}),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...u.defaultModifiers,h.default,p.default,c.default,d.default,{name:"preventOverflow",options:{padding:16}},{name:"offset",options:{offset:({placement:t,reference:e})=>"left-end"===t||"right-end"===t?[e.height+e.y+3,14]:[0,this.overlayOffset]}},{name:"arrow",options:{element:this.arrow,padding:5}},{name:"computeStyles",options:{adaptive:!0}},{name:"constrainToViewport",enabled:!0,phase:"afterWrite",requires:["computeStyles"],fn:({state:t})=>{if(!e)return;const i=t.elements.popper,o=i.getBoundingClientRect(),s=window.innerHeight;let a;a=(t.placement||"").startsWith("top")?o.bottom-16:s-o.top-16,a>0&&e.scrollHeight>a?(i.style.maxHeight=`${a}px`,i.style.overflow="hidden",e.style.maxHeight=`${a}px`,e.style.overflowY="auto"):(i.style.removeProperty("max-height"),i.style.removeProperty("overflow"),e.style.removeProperty("max-height"),e.style.removeProperty("overflow-y"))}}]})}}destroy(){var t;if(this.popperInstance){this.overlayContainer&&(this.overlayContainer.style.removeProperty("max-height"),this.overlayContainer.style.removeProperty("overflow"));const e=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(".overlay-content");e&&(e.style.removeProperty("max-height"),e.style.removeProperty("overflow-y")),this.popperInstance.destroy(),this.popperInstance=null}}toggleOverlay(){this.disabled||(this.isOpen=!this.isOpen)}focusOnTrigger(){requestAnimationFrame(()=>{var t;(null===(t=this.focusableElements)||void 0===t?void 0:t.length)&&this.focusableElements[0].focus()})}focusInsideOverlay(){this.focusableElements&&(this.focusableElements.length>1?this.setInitialFocus(1):this.focusableElements.length&&this.setInitialFocus())}focusOnNestedTrigger(t){var e;null===(e=this.setFocusOnTrigger)||void 0===e||e.call(this,t)}handleWindowBlurEvent(){this._isOpen&&!this.keepOpenOnWindowBlur&&(this.isOpen=!1)}render(){return m.html`
|
|
1475
1475
|
<div class="md-menu-overlay">
|
|
1476
1476
|
<slot @slotchange=${this.handleTriggerSlotChange} name="menu-trigger"></slot>
|
|
1477
1477
|
<div
|
|
@@ -1487,13 +1487,13 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1487
1487
|
</div>
|
|
1488
1488
|
</div>
|
|
1489
1489
|
</div>
|
|
1490
|
-
`}};e.activeOverlay=[],g([(0,b.property)({type:Boolean,attribute:"is-open",reflect:!0})],e.prototype,"isOpen",null),g([(0,b.property)({type:String})],e.prototype,"size",void 0),g([(0,b.property)({type:String,attribute:"max-height"})],e.prototype,"maxHeight",void 0),g([(0,b.property)({type:String,attribute:"custom-width"})],e.prototype,"customWidth",void 0),g([(0,b.property)({type:Boolean,attribute:"show-arrow"})],e.prototype,"showArrow",void 0),g([(0,b.property)({type:Boolean})],e.prototype,"disabled",void 0),g([(0,b.property)({type:String})],e.prototype,"placement",void 0),g([(0,b.property)({type:Boolean,attribute:"allow-hover-toggle"})],e.prototype,"allowHoverToggle",void 0),g([(0,b.property)({type:String})],e.prototype,"ariaRole",void 0),g([(0,b.property)({type:String})],e.prototype,"ariaLabel",void 0),g([(0,b.property)({type:Boolean,attribute:"is-date-picker"})],e.prototype,"isDatePicker",void 0),g([(0,b.property)({type:Number,attribute:"overlay-offset"})],e.prototype,"overlayOffset",void 0),g([(0,b.property)({type:Boolean,attribute:"keep-open-on-window-blur"})],e.prototype,"keepOpenOnWindowBlur",void 0),g([(0,b.query)(".overlay-container")],e.prototype,"overlayContainer",void 0),g([(0,b.query)(".overlay-arrow")],e.prototype,"arrow",void 0),g([(0,b.property)({type:String,attribute:"positioning-strategy"})],e.prototype,"positioningStrategy",void 0),g([(0,b.queryAssignedNodes)({slot:"menu-trigger",flatten:!0})],e.prototype,"trigger",void 0),e=g([(0,
|
|
1490
|
+
`}};e.activeOverlay=[],g([(0,b.property)({type:Boolean,attribute:"is-open",reflect:!0})],e.prototype,"isOpen",null),g([(0,b.property)({type:String})],e.prototype,"size",void 0),g([(0,b.property)({type:String,attribute:"max-height"})],e.prototype,"maxHeight",void 0),g([(0,b.property)({type:String,attribute:"custom-width"})],e.prototype,"customWidth",void 0),g([(0,b.property)({type:Boolean,attribute:"show-arrow"})],e.prototype,"showArrow",void 0),g([(0,b.property)({type:Boolean})],e.prototype,"disabled",void 0),g([(0,b.property)({type:String})],e.prototype,"placement",void 0),g([(0,b.property)({type:Boolean,attribute:"allow-hover-toggle"})],e.prototype,"allowHoverToggle",void 0),g([(0,b.property)({type:String})],e.prototype,"ariaRole",void 0),g([(0,b.property)({type:String})],e.prototype,"ariaLabel",void 0),g([(0,b.property)({type:Boolean,attribute:"is-date-picker"})],e.prototype,"isDatePicker",void 0),g([(0,b.property)({type:Number,attribute:"overlay-offset"})],e.prototype,"overlayOffset",void 0),g([(0,b.property)({type:Boolean,attribute:"keep-open-on-window-blur"})],e.prototype,"keepOpenOnWindowBlur",void 0),g([(0,b.query)(".overlay-container")],e.prototype,"overlayContainer",void 0),g([(0,b.query)(".overlay-arrow")],e.prototype,"arrow",void 0),g([(0,b.property)({type:String,attribute:"positioning-strategy"})],e.prototype,"positioningStrategy",void 0),g([(0,b.queryAssignedNodes)({slot:"menu-trigger",flatten:!0})],e.prototype,"trigger",void 0),e=g([(0,r.w)("md-menu-overlay")],e),t.ELEMENT=e}(s||(s={}))},4085(t,e,i){i.d(e,{W:()=>o});var o,s=i(2900),a=i(9609),r=i(4781),n=i(608),l=i(93),d=i(4084),h=i(2927),p=i(8899),c=i(4955),u=i(5410),m=i(3051),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,n.T)((0,r.I)(h.LitElement))){constructor(){super(...arguments),this.justified=!1,this.direction="horizontal",this.items=[],this.itemsHash={},this.itemsIdxHash={}}getNormalizedItemId(t){return t.replace("more-menu-item-","")}static get styles(){return[d.A,m.A]}get slotItem(){return this.menuSlotElement}linkMenuItems(){return t=this,e=void 0,o=function*(){const{items:t}=this;t.forEach((t,e)=>{const i=(0,l.O)("menu");t.setAttribute("id",i),t.setAttribute("aria-controls",i),t.selected=this.selected===e}),this.itemsHash=this.items.reduce((t,e)=>(t[e.id]=e,t),{}),this.itemsIdxHash=this.items.reduce((t,e,i)=>(t[e.id]=i,t),{})},new((i=void 0)||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())});var t,e,i,o}setupMenuItems(){if(this.menuSlotElement){const t=this.menuSlotElement.assignedElements({flatten:!0});this.getChildrenFromTree({children:t},this.items)}}getChildrenFromTree(t,e){t.children.forEach(t=>{t instanceof u.D.ELEMENT&&e.push(t),this.getChildrenFromTree({children:Array.from(t.children)},e)})}updateSelectedItem(t){const e=this.slotted.findIndex(t=>t.hasAttribute("selected"));e!==t&&(this.items&&[e,t].forEach(t=>{const e=this.items[t];null==e||e.toggleAttribute("selected")}),this.dispatchEvent(new CustomEvent("selected-menu-item",{detail:{value:t},composed:!0,bubbles:!0})),this.changeSelectedItemIdx(t))}changeSelectedItemIdx(t){this.selected=t}handleItemClick(t){const{id:e}=t.detail,i=this.itemsHash[this.getNormalizedItemId(e)];if(i&&!i.disabled){const t=this.itemsIdxHash[i.id];-1!==t&&this.updateSelectedItem(t)}}handleItemKeydown(t){const{key:e,id:i}=t.detail;switch(e){case s.Uz.End:this.changeSelectedItemIdx(this.items.length-1);break;case s.Uz.Home:this.changeSelectedItemIdx(0);break;case s.Uz.ArrowLeft:case s.Uz.ArrowUp:0===this.selected?this.changeSelectedItemIdx(this.items.length-1):this.changeSelectedItemIdx(this.selected-1);break;case s.Uz.ArrowRight:case s.Uz.ArrowDown:this.selected===this.items.length-1?this.changeSelectedItemIdx(0):this.changeSelectedItemIdx(this.selected+1);break;case s.Uz.Enter:case s.Uz.Space:const t=this.slotted.findIndex(t=>t.id===i&&!t.disabled);-1!==t&&this.updateSelectedItem(t)}}connectedCallback(){super.connectedCallback(),this.addEventListener("menu-item-click",this.handleItemClick),this.addEventListener("menu-item-keydown",this.handleItemKeydown)}disconnectedCallback(){super.connectedCallback(),this.removeEventListener("menu-item-click",this.handleItemClick),this.removeEventListener("menu-item-keydown",this.handleItemKeydown)}onSlotChange(){this.setupMenuItems(),this.linkMenuItems()}get menuClassMap(){return{[`md-menu--${this.direction}`]:this.direction,justified:this.justified}}render(){return h.html`
|
|
1491
1491
|
<nav class="md-menu ${(0,c.classMap)(this.menuClassMap)}">
|
|
1492
1492
|
<ul class="md-menu-list">
|
|
1493
1493
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
1494
1494
|
</ul>
|
|
1495
1495
|
</nav>
|
|
1496
|
-
`}};b([(0,p.property)({type:Boolean})],e.prototype,"justified",void 0),b([(0,p.property)({type:String})],e.prototype,"direction",void 0),b([(0,p.query)("slot")],e.prototype,"menuSlotElement",void 0),b([(0,p.query)("md-menu-overlay")],e.prototype,"menuSubElement",void 0),e=b([(0,
|
|
1496
|
+
`}};b([(0,p.property)({type:Boolean})],e.prototype,"justified",void 0),b([(0,p.property)({type:String})],e.prototype,"direction",void 0),b([(0,p.query)("slot")],e.prototype,"menuSlotElement",void 0),b([(0,p.query)("md-menu-overlay")],e.prototype,"menuSubElement",void 0),e=b([(0,a.w)("md-menu")],e),t.ELEMENT=e}(o||(o={}))},329(t,e,i){i.d(e,{aF:()=>o}),i(5983),i(1821);var o,s=i(2900),a=i(3876),r=i(7704),n=i(9609),l=i(4084),d=i(2927),h=i(8899),p=i(4955),c=i(3517),u=i(6005),m=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,r.dY)(d.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.alignment=void 0,this.animating=!1,this.handleCloseOutside=t=>{t.code===s.Uz.Escape&&(t.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1))}}static get styles(){return[l.A,u.A]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(t){super.update(t),t.has("show")&&(this.show?this.modalFadeIn():!0===t.get("show")&&this.modalFadeOut())}get computedAlignment(){return void 0===this.alignment?a.vz.isMomentumV2Enabled?"leading":"center":this.alignment}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){var t;(null===(t=this.focusableElements)||void 0===t?void 0:t.length)&&this.setInitialFocus()}handleKeyDown(t){t.code!==s.Uz.Enter&&t.code!==s.Uz.Space||this.show&&(this.show=!0)}transitionPromise(t){return new Promise(e=>{const i=()=>{t.removeEventListener("transitionend",i),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{t.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};t.addEventListener("transitionend",i),t.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return t=this,e=void 0,o=function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())},new((i=void 0)||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())});var t,e,i,o}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),this.notifyModalClose()}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1)}hideModal(){this.animating=!1,this.show=!1}topCloseBtnTemplate(){return d.html`
|
|
1497
1497
|
${this.showCloseButton?d.html`
|
|
1498
1498
|
<md-button
|
|
1499
1499
|
variant="ghost"
|
|
@@ -1565,15 +1565,15 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1565
1565
|
</div>
|
|
1566
1566
|
</div>
|
|
1567
1567
|
`:d.nothing}
|
|
1568
|
-
`}};m([(0,h.property)({type:Boolean})],e.prototype,"show",void 0),m([(0,h.property)({type:String})],e.prototype,"headerLabel",void 0),m([(0,h.property)({type:String})],e.prototype,"headerMessage",void 0),m([(0,h.property)({type:String})],e.prototype,"htmlId",void 0),m([(0,h.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelClose",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaDescription",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),m([(0,h.property)({type:String})],e.prototype,"size",void 0),m([(0,h.property)({type:String})],e.prototype,"closeBtnName",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hideFooter",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hideHeader",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"disableInitialFocus",void 0),m([(0,h.property)({type:String})],e.prototype,"alignment",void 0),m([(0,h.state)()],e.prototype,"animating",void 0),m([(0,h.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=m([(0,n.w)("md-modal")],e),t.ELEMENT=e}(o||(o={}))},8751(t,e,i){i.d(e,{d:()=>o}),i(5983),i(1821);var o,s=i(9609),
|
|
1568
|
+
`}};m([(0,h.property)({type:Boolean})],e.prototype,"show",void 0),m([(0,h.property)({type:String})],e.prototype,"headerLabel",void 0),m([(0,h.property)({type:String})],e.prototype,"headerMessage",void 0),m([(0,h.property)({type:String})],e.prototype,"htmlId",void 0),m([(0,h.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelClose",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelCancel",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaLabelSubmit",void 0),m([(0,h.property)({type:String})],e.prototype,"ariaDescription",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"showCloseButton",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"backdropClickExit",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"noExitOnEsc",void 0),m([(0,h.property)({type:String})],e.prototype,"size",void 0),m([(0,h.property)({type:String})],e.prototype,"closeBtnName",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hideFooter",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"hideHeader",void 0),m([(0,h.property)({type:Boolean})],e.prototype,"disableInitialFocus",void 0),m([(0,h.property)({type:String})],e.prototype,"alignment",void 0),m([(0,h.state)()],e.prototype,"animating",void 0),m([(0,h.query)(".md-modal__backdrop")],e.prototype,"backDrop",void 0),e=m([(0,n.w)("md-modal")],e),t.ELEMENT=e}(o||(o={}))},8751(t,e,i){i.d(e,{d:()=>o}),i(5983),i(1821);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(9940),d=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this._currentPage=1,this.hasDots=!1,this.onlyDots=!1,this.noNavigation=!1,this.totalPage=0,this.visiblePage=3}get currentPage(){return this._currentPage}set currentPage(t){const e=this._currentPage;this._currentPage=t,this.notifyPageChange(e,t),this.requestUpdate("currentPage",e)}static get styles(){return[a.A,l.A]}computePrevious(t){1!==t&&t!==this.currentPage&&(this.currentPage-=1)}computeNext(t){t<=this.totalPage&&t!==this.currentPage&&(this.currentPage+=1)}computeFirst(){this.currentPage>=1&&(this.currentPage=1)}computeLast(){this.currentPage>=1&&(this.currentPage=this.totalPage)}computeCurrent(t){this.currentPage=t}notifyPageChange(t,e){this.dispatchEvent(new CustomEvent("page-change",{composed:!0,bubbles:!0,detail:{oldPage:t,newPage:e}}))}get hasPreviousPage(){return this.currentPage<=1}get hasNextPage(){return this.currentPage>=this.totalPage}computePageList(t){if(this.totalPage>this.visiblePage&&t){const[t,e,i]=[this.currentPage-1,this.currentPage,this.currentPage+1];let o=[];if(e<=this.visiblePage-1)return o=[...Array(this.visiblePage)].map((t,e)=>1+e),o.push("..."),o.push(this.totalPage),o;if(this.totalPage-e<=this.visiblePage-2){o=[],o.push(1),o.push("...");const t=[...Array(this.visiblePage)].map((t,e)=>this.totalPage-this.visiblePage+1+e);return o.concat(t)}return[1,"...",t,e,i,"...",this.totalPage]}return[...Array(this.totalPage)].map((t,e)=>1+e)}pagesTemplate(t){return this.computePageList(t).map(t=>"..."===t?r.html` <li class="page-ellipsis">${t}</li> `:r.html`
|
|
1569
1569
|
<li @click=${()=>this.computeCurrent(t)} aria-current=${t===this.currentPage}>
|
|
1570
1570
|
${t}
|
|
1571
1571
|
</li>
|
|
1572
|
-
`)}dotsTemplate(t){return this.computePageList(t).map(t=>"..."===t?
|
|
1572
|
+
`)}dotsTemplate(t){return this.computePageList(t).map(t=>"..."===t?r.nothing:r.html`
|
|
1573
1573
|
<li @click=${()=>this.computeCurrent(t)} aria-current=${t===this.currentPage}></li>
|
|
1574
|
-
`)}render(){return
|
|
1574
|
+
`)}render(){return r.html`
|
|
1575
1575
|
<nav class="md-pagination" role="navigation" part="pagination">
|
|
1576
|
-
${this.noNavigation?
|
|
1576
|
+
${this.noNavigation?r.nothing:r.html`
|
|
1577
1577
|
<md-button
|
|
1578
1578
|
class="md-pagination-nav"
|
|
1579
1579
|
ariaLabel="First Page"
|
|
@@ -1600,22 +1600,22 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1600
1600
|
</md-button>
|
|
1601
1601
|
`}
|
|
1602
1602
|
<div class="md-pagination-container">
|
|
1603
|
-
${this.onlyDots?
|
|
1603
|
+
${this.onlyDots?r.html`
|
|
1604
1604
|
<ul class="md-pagination-dots" part="pagination-only-dots">
|
|
1605
1605
|
${this.dotsTemplate(!1)}
|
|
1606
1606
|
</ul>
|
|
1607
|
-
`:
|
|
1607
|
+
`:r.html`
|
|
1608
1608
|
<ul class="md-pagination-list" part=pagination-list">
|
|
1609
1609
|
${this.pagesTemplate(!0)}
|
|
1610
1610
|
</ul>
|
|
1611
1611
|
`}
|
|
1612
|
-
${this.hasDots&&!this.onlyDots?
|
|
1612
|
+
${this.hasDots&&!this.onlyDots?r.html`
|
|
1613
1613
|
<ul class="md-pagination-dots" part="pagination-dots">
|
|
1614
1614
|
${this.dotsTemplate(!0)}
|
|
1615
1615
|
</ul>
|
|
1616
|
-
`:
|
|
1616
|
+
`:r.nothing}
|
|
1617
1617
|
</div>
|
|
1618
|
-
${this.noNavigation?
|
|
1618
|
+
${this.noNavigation?r.nothing:r.html`
|
|
1619
1619
|
<md-button
|
|
1620
1620
|
class="md-pagination-nav"
|
|
1621
1621
|
ariaLabel="Previous Page"
|
|
@@ -1642,8 +1642,8 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1642
1642
|
</md-button>
|
|
1643
1643
|
`}
|
|
1644
1644
|
</nav>
|
|
1645
|
-
`}};d([(0,n.property)({type:Boolean,attribute:"dots"})],e.prototype,"hasDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],e.prototype,"onlyDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],e.prototype,"noNavigation",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"total-page"})],e.prototype,"totalPage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"visible-page"})],e.prototype,"visiblePage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"current-page"})],e.prototype,"currentPage",null),e=d([(0,s.w)("md-pagination")],e),t.ELEMENT=e}(o||(o={}))},
|
|
1646
|
-
<div class=${(0,
|
|
1645
|
+
`}};d([(0,n.property)({type:Boolean,attribute:"dots"})],e.prototype,"hasDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],e.prototype,"onlyDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],e.prototype,"noNavigation",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"total-page"})],e.prototype,"totalPage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"visible-page"})],e.prototype,"visiblePage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"current-page"})],e.prototype,"currentPage",null),e=d([(0,s.w)("md-pagination")],e),t.ELEMENT=e}(o||(o={}))},5566(t,e,i){i.d(e,{L:()=>o}),i(2273),i(6709),i(9189);var o,s=i(9609),a=i(8682),r=i(2927),n=i(8899),l=i(4955),d=i(6429),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.numberPlaceholder="Enter Phone Number",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.value="",this.errorMessage="",this.showErrorMessage=!1,this.countryCodeAriaLabel="",this.dialNumberAriaLabel="",this.clearAriaLabel="Clear Input",this.clearCountryCodeAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.countryCode="US",this.formattedValue="",this.isValid=!0}get isRtl(){try{if(!this.isConnected)return!1;const t=getComputedStyle(this);return"rtl"===(null==t?void 0:t.direction)}catch(t){return!1}}connectedCallback(){super.connectedCallback(),""===this.id&&(this.id=`md-phone-input-${Math.random().toString(36).substring(2,6)}`),this.validateInput(this.value)}validateNumber(){this.isValid=!this.value||(0,a.isValidNumberForRegion)(this.value,this.countryCode)}handleCountryChange(t){var e,i;const o=t.detail.srcEvent;o.detail.value&&(null===(e=o.detail.value)||void 0===e?void 0:e.id)?(this.countryCallingCode=o.detail.value.id,this.countryCode=null===(i=o.detail.value.id.split(",")[2])||void 0===i?void 0:i.trim()):(this.countryCode="US",this.countryCallingCode=""),this.validateNumber(),this.dispatchEvent(new CustomEvent("countrycode-change",{bubbles:!0,composed:!0,detail:{srcEvent:o,isValid:this.isValid}}))}handlePhoneChange(t){this.value=t.detail.value,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-change",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleKeydown(t){this.isValid=!0,t.stopPropagation(),this.dispatchEvent(new CustomEvent("phoneinput-keydown",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}handleBlur(t){this.validateInput(this.value),this.validateNumber(),t.stopPropagation(),this.removeCountryCode(),this.dispatchEvent(new CustomEvent("phoneinput-blur",{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.countryCallingCode}${this.value}`,isValid:this.isValid,phoneNumber:this.value}}))}removeCountryCode(){var t;const e=null===(t=this.countryCallingCode.split(",")[0])||void 0===t?void 0:t.trim();if(this.value.startsWith(e)){const t=this.value.slice(e.length).replace(/^-/,"");this.value=t}}validateInput(t){this.formattedValue=new a.AsYouType(this.countryCode).input(t)}get flagClassMap(){return{"new-momentum":this.newMomentum}}get containerClassMap(){return{"md-phone-input__container":!0,rtl:this.isRtl}}static get styles(){return[d.A]}render(){return r.html`
|
|
1646
|
+
<div class=${(0,l.classMap)(this.containerClassMap)}>
|
|
1647
1647
|
<md-country-code-picker
|
|
1648
1648
|
part="md-country-code-picker"
|
|
1649
1649
|
exportparts="option: option"
|
|
@@ -1678,7 +1678,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1678
1678
|
.messageArr="${!this.isValid||this.showErrorMessage?[{type:"error",id:this.id,ariaLive:"polite",message:this.errorMessage}]:[]}"
|
|
1679
1679
|
></md-input>
|
|
1680
1680
|
</div>
|
|
1681
|
-
`}};
|
|
1681
|
+
`}};h([(0,n.property)({type:String,reflect:!0})],e.prototype,"codePlaceholder",void 0),h([(0,n.property)({type:String})],e.prototype,"numberPlaceholder",void 0),h([(0,n.property)({type:String,attribute:"country-calling-code"})],e.prototype,"countryCallingCode",void 0),h([(0,n.property)({type:Boolean,attribute:"show-flags"})],e.prototype,"showFlags",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"pill",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),h([(0,n.property)({type:String})],e.prototype,"value",void 0),h([(0,n.property)({type:String})],e.prototype,"errorMessage",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showErrorMessage",void 0),h([(0,n.property)({type:String})],e.prototype,"countryCodeAriaLabel",void 0),h([(0,n.property)({type:String})],e.prototype,"dialNumberAriaLabel",void 0),h([(0,n.property)({type:String})],e.prototype,"clearAriaLabel",void 0),h([(0,n.property)({type:String})],e.prototype,"clearCountryCodeAriaLabel",void 0),h([(0,n.property)({type:String})],e.prototype,"id",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"newMomentum",void 0),h([(0,n.state)()],e.prototype,"countryCode",void 0),h([(0,n.state)()],e.prototype,"formattedValue",void 0),h([(0,n.state)()],e.prototype,"isValid",void 0),e=h([(0,s.w)("md-phone-input")],e),t.ELEMENT=e}(o||(o={}))},3949(t,e,i){i.d(e,{s:()=>o});var o,s=i(7704),a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(4955),h=i(3517),p=i(7231),c=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.label="",this.value="",this.message="",this.hideMessage=!1,this.ariaLabel="",this.autofocus=!1,this._disabled=!1,this.checked=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}get inputAriaLabel(){var t,e,i,o;const s=(null===(t=this.message)||void 0===t?void 0:t.length)?` - ${this.message}`:"";if(null===(e=this.ariaLabel)||void 0===e?void 0:e.length)return this.ariaLabel;if(null===(i=this.label)||void 0===i?void 0:i.length)return this.label+s;const a=null===(o=this.textContent)||void 0===o?void 0:o.trim();return(null==a?void 0:a.length)?a+s:s}static get styles(){return[r.A,p.A]}get helpTextClassMap(){return{"md-radio-help-text--hide":this.hideMessage}}messagesTemplate(){var t;return(null===(t=this.message)||void 0===t?void 0:t.length)?n.html`
|
|
1682
1682
|
<div class="${(0,d.classMap)(this.helpTextClassMap)}">
|
|
1683
1683
|
<md-help-text class="help-text-radio" newMomentum role="alert" aria-live="assertive">
|
|
1684
1684
|
${this.message}
|
|
@@ -1714,11 +1714,11 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1714
1714
|
</div>
|
|
1715
1715
|
</div>
|
|
1716
1716
|
${this.messagesTemplate()}
|
|
1717
|
-
`}};c([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"message",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"hideMessage",void 0),c([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"checked",void 0),e=c([(0,
|
|
1717
|
+
`}};c([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"message",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"hideMessage",void 0),c([(0,l.property)({type:String})],e.prototype,"ariaLabel",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"checked",void 0),e=c([(0,a.w)("md-radio")],e),t.ELEMENT=e}(o||(o={}))},8358(t,e,i){i.d(e,{z:()=>o});var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=i(2927),d=i(8899),h=i(7231),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.Io)(l.LitElement)){constructor(){super(...arguments),this.label="group",this.checked=-1,this.alignment="vertical",this._disabled=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.requestUpdate("disabled",e)}firstUpdated(t){super.firstUpdated(t),this.setAttribute("role","radiogroup"),this.setAttribute("aria-label",this.label)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("slotted")||t.has("checked"))&&this.setFirstChecked()}get selectedRadioValue(){return this.slotted[this.selected].value}notifySelectedChange(){this.dispatchEvent(new CustomEvent("radio-change",{detail:{selected:this.selectedRadioValue},bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}setFirstChecked(){-1!==this.checked&&(this.selected=this.checked,this.setChecked(this.checked))}findRadioIndex(t){const e=t.composedPath();return this.slotted.findIndex(t=>e.includes(t))}findCheckedRadioIndex(){return this.slotted.findIndex(t=>t.checked)}setChecked(t){const e=this.findCheckedRadioIndex();-1!==e&&e!==t&&this.slotted[e]&&(this.slotted[e].checked=!1),this.slotted[t]&&(this.slotted[t].checked=!0)}switchRadioOnArrowPress(t,e=1){const i=super.getAvailableSelectedIndex(t,e);-1!==i&&(this.selected=i,this.setChecked(i),this.notifySelectedChange())}isRadioDisabled(t){return this.slotted[t].disabled}handleClick(t){if(this.disabled)return!1;const e=this.findRadioIndex(t);-1!==e&&(this.isRadioDisabled(e)||(this.selected=e,this.setChecked(e),this.notifySelectedChange()))}handleKeyDown(t){if(this.disabled)return!1;const{code:e}=t;switch(e){case s.Uz.Enter:case s.Uz.Space:this.isRadioDisabled(this.selected)||(this.setChecked(this.selected),this.notifySelectedChange(),t.stopPropagation(),t.preventDefault());break;case s.Uz.ArrowUp:case s.Uz.ArrowLeft:0===this.selected?this.switchRadioOnArrowPress(this.slotted.length-1,-1):this.switchRadioOnArrowPress(this.selected-1,-1),t.stopPropagation(),t.preventDefault();break;case s.Uz.ArrowDown:case s.Uz.ArrowRight:this.selected===this.slotted.length-1?this.switchRadioOnArrowPress(0):this.switchRadioOnArrowPress(this.selected+1),t.stopPropagation(),t.preventDefault()}}get slotElement(){return this.radioSlot}static get styles(){return[n.A,h.A]}clearSelection(){const t=this.findCheckedRadioIndex();-1!=t&&(this.checked=-1,this.slotted[t].checked=!1)}render(){return l.html`
|
|
1718
1718
|
<div class="radio-group-container" part="radio-group-container">
|
|
1719
1719
|
<slot name="radio"></slot>
|
|
1720
1720
|
</div>
|
|
1721
|
-
`}};p([(0,d.property)({type:String,attribute:"group-label"})],e.prototype,"label",void 0),p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"checked",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),p([(0,d.query)("slot[name='radio']")],e.prototype,"radioSlot",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),e=p([(0,
|
|
1721
|
+
`}};p([(0,d.property)({type:String,attribute:"group-label"})],e.prototype,"label",void 0),p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"checked",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"alignment",void 0),p([(0,d.query)("slot[name='radio']")],e.prototype,"radioSlot",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),e=p([(0,r.w)("md-radiogroup")],e),t.ELEMENT=e}(o||(o={}))},3773(t,e,i){i.d(e,{A:()=>o});var o,s=i(2900),a=i(7704),r=i(9609),n=i(4084),l=i(2927),d=i(8899),h=i(3517),p=i(2577),c=i(1156),u=i(2297),m=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.yC)(l.LitElement)){constructor(){super(...arguments),this._disabled=!1,this._now=0,this.min=0,this.max=100,this.hideValue=!1,this.text=0,this.label="slider",this.step=0,this.dragging=!1}get now(){return this._now}set now(t){const e=this._now;t<this.min||t>this.max?console.warn("Please select correct value"):(this._now=Math.round(t),this.requestUpdate("now",e))}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,this.setAttribute("aria-disabled",`${t}`),this.tabIndex=t?-1:0,this.requestUpdate("disabled",e)}get pointerPosition(){const t=this.max-this.min;return(this.now-this.min)/t*100}get isRtl(){return"rtl"===getComputedStyle(this).direction}calculateHandlePosition(t){const{width:e,left:i}=this.getBoundingClientRect(),{clientX:o}=t;let s=(o-i)/e;return this.isRtl&&(s=1-s),this.min+(this.max-this.min)*s}moveSliderTo(t){this.disabled||(t>this.max?this.now=this.max:t<this.min?this.now=this.min:this.now=t)}trackMouseEvent(){if(!this.currentMouseEvent||!this.dragging)return;const t=this.calculateHandlePosition(this.currentMouseEvent),e=this.now;this.moveSliderTo(t),this.notifyChanging(e,this.now),requestAnimationFrame(()=>{this.trackMouseEvent()})}ticksTemplate(){const{min:t,max:e,step:i}=this,o=Math.round((e-t)/i),s=new Array(o+1).fill(0,0,o+1).map((e,o)=>t+o*i).filter(i=>i>=t&&i<=e);return l.html`
|
|
1722
1722
|
<div class="md-slider__hashlabel">${(0,p.repeat)(s,t=>l.html` <div class="tick">${t}</div> `)}</div>
|
|
1723
1723
|
`}displayValueTemplate(){return l.html` <span class="md-slider__value"> ${this.now} </span> `}notifyChanges(){this.dispatchEvent(new CustomEvent("slider-change",{bubbles:!0,composed:!0,detail:{value:this.now}}))}notifyChanging(t,e){t!==e&&this.dispatchEvent(new CustomEvent("slider-changing",{bubbles:!0,composed:!0,detail:{oldValue:t,newValue:e}}))}handleMouseDown(t){if(t.preventDefault(),this.disabled)return;const e=t=>{this.currentMouseEvent=t},i=t=>{this.focus(),this.currentMouseEvent=t,document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i),requestAnimationFrame(()=>{this.dragging=!1,this.notifyChanges()})};document.addEventListener("mousemove",e),document.addEventListener("mouseup",i),this.focus(),this.dragging=!0,this.currentMouseEvent=t,requestAnimationFrame(()=>{this.trackMouseEvent()})}handleKeyDown(t){const{code:e}=t,i=this.now;switch(e){case s.Uz.ArrowLeft:this.moveSliderTo(this.now+(this.isRtl?1:-1));break;case s.Uz.ArrowRight:this.moveSliderTo(this.now+(this.isRtl?-1:1));break;case s.Uz.ArrowDown:this.moveSliderTo(this.now-1);break;case s.Uz.ArrowUp:this.moveSliderTo(this.now+1);break;case s.Uz.Home:this.moveSliderTo(this.min);break;case s.Uz.End:this.moveSliderTo(this.max)}this.notifyChanging(i,this.now);const o=()=>{document.removeEventListener("keyup",o),this.notifyChanges()};document.addEventListener("keyup",o)}get sliderPointerStyleMap(){return{"inset-inline-start":`${this.pointerPosition}%`}}get sliderSelectionStyleMap(){return{"inset-inline-end":`calc(100% - ${this.pointerPosition}%)`}}static get styles(){return[n.A,u.A]}firstUpdated(t){super.firstUpdated(t),this.setAttribute("tabindex",this.disabled?"-1":"0")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.handleMouseDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mousedown",this.handleMouseDown)}render(){return l.html`
|
|
1724
1724
|
<div class="md-slider">
|
|
@@ -1736,27 +1736,27 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1736
1736
|
></span>
|
|
1737
1737
|
${this.step?this.ticksTemplate():l.nothing} ${this.hideValue?l.nothing:this.displayValueTemplate()}
|
|
1738
1738
|
</div>
|
|
1739
|
-
`}};m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,d.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,d.property)({type:Number})],e.prototype,"text",void 0),m([(0,d.property)({type:String})],e.prototype,"label",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,d.state)()],e.prototype,"dragging",void 0),e=m([(0,
|
|
1739
|
+
`}};m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,d.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,d.property)({type:Number})],e.prototype,"text",void 0),m([(0,d.property)({type:String})],e.prototype,"label",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,d.state)()],e.prototype,"dragging",void 0),e=m([(0,r.w)("md-slider")],e),t.ELEMENT=e}(o||(o={}))},7936(t,e,i){i.d(e,{v:()=>y}),i(5983),i(1821),i(708);var o=i(9609),s=i(9938),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(3517),h=i(7638),p=i(6897),c=i(4841),u=i(597),m=i(9125),b=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const v=document.createElement("img");var y;v.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(t){let e=class extends((0,s.d)(r.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=t=>t.preventDefault(),this.eX=0,this.onResize=(t,e)=>{var i;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const o=t.target;null===(i=t.dataTransfer)||void 0===i||i.setDragImage(v,0,0);const s=this.COLS.map(t=>this.shadowRoot.querySelector(`th.col-index-${t.index}`));this.COLS.forEach((t,e)=>t.width=s[e].offsetWidth+"px"),this.updCols();const a=t.x;this.eX=t.x;let r=-1,n=-1,l=-1;const d=this.COLS[e.index-1],h=s[e.index],p=s[e.index-1],c=h.offsetWidth,u=p.offsetWidth,m=()=>{const t=this.eX;if(r!=t&&0!=t){r=t;const i=r-a;n=c-i,l=u+i,e.width=n+"px",d.width=l+"px",this.updCols()}},b=t=>this.eX=t.x,y=()=>{this.isResizing=!1,o.removeEventListener("drag",m),o.removeEventListener("dragend",y),document.removeEventListener("dragover",b)};o.addEventListener("drag",m),o.addEventListener("dragend",y),document.addEventListener("dragover",b)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(t){super.update(t),t.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(t){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(t){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var t;let e=0;const i=(t,i)=>{var o,s,a,r;const n=t.filters||(null===(s=null===(o=this.tableConfig.default)||void 0===o?void 0:o.col)||void 0===s?void 0:s.filters),l=n?"forString"==n?m.d.optionsString:"forNumber"==n?m.d.optionsNumber:n.length?n:null:null;this.COLS.push({options:Object.assign({},t),index:e++,group:i,sort:"default",sorter:t.sorter||(null===(r=null===(a=this.tableConfig.default)||void 0===a?void 0:a.col)||void 0===r?void 0:r.sorter),isCollapsable:this.tableConfig.cols.collapse==t.id,filter:l?{list:l,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(t=>{"children"in t?t.children.forEach(e=>i(e,{name:t.groupName,length:t.children.length})):i(t)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)}populateData(){const t=this.COLS.length;if("csv"in this.tableData){const t=p.default.parse(this.tableData.csv,{skipEmptyLines:!0,transform:t=>t.trim()});if(t.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(t.errors,null,2));{const e=t.data;this.ROWS=e.map(t=>t.map(t=>({text:t})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(t=>t.map(t=>({text:t})));else{for(;this.tableData.list.length>t;)this.ROWS.push(this.tableData.list.splice(0,t).map(t=>({text:t})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(t=>({text:t})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const t=this.COLS.length;this.ROWS.reduce((t,e)=>t+e.length,0)%t==0?this.ROWS.forEach((e,i)=>{const o=e.length;o!=t&&(this.error=`DATA ERROR: Total number of cols (=${t}) 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 t=this.tableConfig.cellTemplates,e=Object.keys(t||{});t&&e.length&&this.ROWS.forEach((e,i)=>{e.forEach((e,o)=>{for(const s in t){const a=e.text.indexOf(s);if(-1!=a){const r=t[s],n=this.querySelector(`#${r.templateName}`);if(null==n){console.warn(`cellTemplates["${s}"]: Missing '${r.templateName}' template.`);continue}let l=e.text.replace(s,"");r.contentCb&&(l=r.contentCb({col:o,row:i,content:l,insertIndex:a})),this.ROWS[i][o]={text:l,template:{template:n,templateCb:r.templateCb,insertIndex:"replace"==r.contentUse?-1:a}};break}}})})}setDefaultFilterAndSort(){var t,e;const i=null===(t=this.tableConfig.default)||void 0===t?void 0:t.sort;if(i){const t=this.COLS.find(t=>t.options.id==i.colId);t?this.sort(t,i.order):console.warn(`Cant find ${i.colId} col - for sorting`)}const o=null===(e=this.tableConfig.default)||void 0===e?void 0:e.filter;if(o){const t=this.COLS.find(t=>t.options.id==o.colId);t?t.filter?(t.filter.selectedIndex=o.selectedIndex,t.filter.input=o.input,this.updCols(),this.filter(t)):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 t=this.COLS[this.dragCol],e=this.COLS[this.dropCol],i=t.group,o=e.group,s=t.index,a=e.index;t.group=o,e.group=i,t.index=a,e.index=s,this.COLS[this.dragCol]=e,this.COLS[this.dropCol]=t,this.ROWS.forEach(t=>{const e=t[this.dragCol],i=t[this.dropCol];t[this.dragCol]=i,t[this.dropCol]=e}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(t,e){t.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(i=>{i.options.id==t.options.id?i.sort=e||("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:t.sort}))}filter(t){if(!t.filter)return;this.clearSelection(),this.drops=[];const e=t.filter.input.trim(),i=t.filter.list[t.filter.selectedIndex];t.filter.active=!!e,this.requestUpdate(),e?this["md-table-advanced-change"].emit({type:"filter-on",filter:i,input:e}):this["md-table-advanced-change"].emit({type:"filter-off",filter:t.filter.list[t.filter.selectedIndex]})}selectRow(t){var e;const i=t.row.idx,o=Object.prototype.hasOwnProperty.call(this.selected,i);"multiple"==(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)?(t.metaKey?o?delete this.selected[i]:this.selected[i]=!0:t.shiftKey||(this.selected={[i]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(t=>+t)})):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(t,e){t.stopPropagation(),this.expandedRowIdx[e]?(delete this.expandedRowIdx[e],this["md-table-advanced-change"].emit({type:"collapse",row:e})):(this.expandedRowIdx[e]=!0,this["md-table-advanced-change"].emit({type:"expand",row:e})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return r.html` <div>${this.error}</div> `;const{head:t}=this.tableConfig,e=(0,l.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return r.html`
|
|
1740
1740
|
<div class="md-table-advanced">
|
|
1741
1741
|
<slot></slot>
|
|
1742
1742
|
<table class=${e} summary=${(0,d.ifDefined)(null==t?void 0:t.summary)}>
|
|
1743
|
-
${(null==t?void 0:t.caption)?
|
|
1743
|
+
${(null==t?void 0:t.caption)?r.html`
|
|
1744
1744
|
<caption>
|
|
1745
1745
|
${null==t?void 0:t.caption}
|
|
1746
|
-
${(null==t?void 0:t.tableDescription)?
|
|
1746
|
+
${(null==t?void 0:t.tableDescription)?r.html` <span style="position: absolute; top: -30em">${null==t?void 0:t.tableDescription}</span> `:r.nothing}
|
|
1747
1747
|
</caption>
|
|
1748
|
-
`:(null==t?void 0:t.tableDescription)?
|
|
1748
|
+
`:(null==t?void 0:t.tableDescription)?r.html`
|
|
1749
1749
|
<caption>
|
|
1750
1750
|
<span style="position: absolute; top: -30em">${null==t?void 0:t.tableDescription}</span>
|
|
1751
1751
|
</caption>
|
|
1752
|
-
`:
|
|
1752
|
+
`:r.nothing}
|
|
1753
1753
|
${this.renderHead()} ${this.renderBody()}
|
|
1754
1754
|
</table>
|
|
1755
1755
|
</div>
|
|
1756
|
-
`}ariaSortOrder(t){return"ascending"===t||"descending"===t?t:"none"}renderHead(){let t=
|
|
1757
|
-
${this.COLS.map(t=>t.group?e!=t.group.name?(e=t.group.name,
|
|
1756
|
+
`}ariaSortOrder(t){return"ascending"===t||"descending"===t?t:"none"}renderHead(){let t=r.nothing;const e=this.COLS.reduce((t,e)=>!!e.group||t,!1);if(e){let e="";t=r.html`
|
|
1757
|
+
${this.COLS.map(t=>t.group?e!=t.group.name?(e=t.group.name,r.html` <colgroup span=${t.group.length}></colgroup> `):void 0:r.html` <col /> `)}
|
|
1758
1758
|
<tr tabindex="0">
|
|
1759
|
-
${this.COLS.map(t=>t.group?e!=t.group.name?(e=t.group.name,
|
|
1759
|
+
${this.COLS.map(t=>t.group?e!=t.group.name?(e=t.group.name,r.html`
|
|
1760
1760
|
<th colspan=${t.group.length} scope="colgroup" title="${t.group.name}">
|
|
1761
1761
|
<div class="head-inner-cell">
|
|
1762
1762
|
<span>${t.group.name}</span>
|
|
@@ -1765,15 +1765,15 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1765
1765
|
</th>
|
|
1766
1766
|
`):void 0:this.renderCol(t,2))}
|
|
1767
1767
|
</tr>
|
|
1768
|
-
`}const i=
|
|
1768
|
+
`}const i=r.html`
|
|
1769
1769
|
<tr tabindex="0">
|
|
1770
1770
|
${this.COLS.map(t=>e?t.group?this.renderCol(t):void 0:this.renderCol(t))}
|
|
1771
1771
|
</tr>
|
|
1772
|
-
`;return
|
|
1772
|
+
`;return r.html`
|
|
1773
1773
|
<thead>
|
|
1774
1774
|
${t} ${i}
|
|
1775
1775
|
</thead>
|
|
1776
|
-
`}sortIconTemplate(t){return"ascending"===t?
|
|
1776
|
+
`}sortIconTemplate(t){return"ascending"===t?r.html`<md-icon name="sort-descending-bold" size="16" iconSet="momentumDesign"></md-icon>`:"descending"===t?r.html`<md-icon name="sort-ascending-bold" size="16" iconSet="momentumDesign"></md-icon>`:r.html`<md-icon name="unsorted-bold" size="16" iconSet="momentumDesign"></md-icon>`}renderCol(t,e){var i,o;const s=null===(o=null===(i=t.filter)||void 0===i?void 0:i.list[t.filter.selectedIndex])||void 0===o?void 0:o.input,a=(0,l.classMap)({ascending:"ascending"==t.sort,descending:"descending"==t.sort});return r.html`
|
|
1777
1777
|
<th
|
|
1778
1778
|
rowspan=${(0,d.ifDefined)(e)}
|
|
1779
1779
|
width=${(0,d.ifDefined)(t.width?t.width:t.options.width)}
|
|
@@ -1788,23 +1788,23 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1788
1788
|
|
|
1789
1789
|
<div class="head-inner-cell">
|
|
1790
1790
|
<!-- SORT -->
|
|
1791
|
-
${t.sorter?
|
|
1792
|
-
<button class="sortable ${
|
|
1791
|
+
${t.sorter?r.html`
|
|
1792
|
+
<button class="sortable ${a}" @click=${()=>this.sort(t)}>
|
|
1793
1793
|
${t.options.title} ${this.sortIconTemplate(t.sort)}
|
|
1794
1794
|
</button>
|
|
1795
|
-
`:
|
|
1795
|
+
`:r.html` <span>${t.options.title}</span> `}
|
|
1796
1796
|
|
|
1797
1797
|
<!-- FILTER -->
|
|
1798
|
-
${t.filter?
|
|
1798
|
+
${t.filter?r.html`
|
|
1799
1799
|
<div class="filter-wrap">
|
|
1800
|
-
${t.filter.active?
|
|
1800
|
+
${t.filter.active?r.html`
|
|
1801
1801
|
<md-icon
|
|
1802
1802
|
class="filter-active"
|
|
1803
1803
|
name="filter-bold"
|
|
1804
1804
|
size="16"
|
|
1805
1805
|
iconSet="momentumDesign"
|
|
1806
1806
|
></md-icon>
|
|
1807
|
-
`:
|
|
1807
|
+
`:r.nothing}
|
|
1808
1808
|
<md-menu-overlay placement="bottom" class="filter" custom-width="188px">
|
|
1809
1809
|
<md-button class="filter-icon" slot="menu-trigger" color="color-none" size="size-none">
|
|
1810
1810
|
<md-icon slot="icon" name="filter-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
@@ -1814,7 +1814,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1814
1814
|
name="filter-type"
|
|
1815
1815
|
@change=${e=>{t.filter.selectedIndex=e.target.value,this.updCols(),this.filter(t)}}
|
|
1816
1816
|
>
|
|
1817
|
-
${t.filter.list.map((e,i)=>
|
|
1817
|
+
${t.filter.list.map((e,i)=>r.html`
|
|
1818
1818
|
<option value=${i} ?selected=${t.filter.selectedIndex==i}>${e.label}</option>
|
|
1819
1819
|
`)}
|
|
1820
1820
|
</select>
|
|
@@ -1829,13 +1829,13 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1829
1829
|
</div>
|
|
1830
1830
|
</md-menu-overlay>
|
|
1831
1831
|
</div>
|
|
1832
|
-
`:
|
|
1832
|
+
`:r.nothing}
|
|
1833
1833
|
|
|
1834
1834
|
<!-- RESIZE -->
|
|
1835
1835
|
${this.renderColResize(t)}
|
|
1836
1836
|
</div>
|
|
1837
1837
|
</th>
|
|
1838
|
-
`}renderColDrag(t){return this.tableConfig.cols.isDraggable?
|
|
1838
|
+
`}renderColDrag(t){return this.tableConfig.cols.isDraggable?r.html`
|
|
1839
1839
|
<div
|
|
1840
1840
|
draggable="true"
|
|
1841
1841
|
class="drag-area-col ${(0,l.classMap)({drag:-1!=this.dragCol,over:this.dropCol==t.index&&this.dropCol!=this.dragCol})}"
|
|
@@ -1843,34 +1843,34 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1843
1843
|
@dragenter=${()=>{this.isResizing||-1!=this.dragRow||(this.dropCol=t.index)}}
|
|
1844
1844
|
@dragend=${()=>this.onDropCol()}
|
|
1845
1845
|
></div>
|
|
1846
|
-
`:
|
|
1847
|
-
${t.index>0?
|
|
1846
|
+
`:r.nothing}renderColResize(t){return this.tableConfig.cols.isResizable?r.html`
|
|
1847
|
+
${t.index>0?r.html`
|
|
1848
1848
|
<div class="resize" draggable="true" @dragstart=${e=>this.onResize(e,t)}></div>
|
|
1849
|
-
`:
|
|
1850
|
-
`:
|
|
1849
|
+
`:r.nothing}
|
|
1850
|
+
`:r.nothing}renderBody(){let t=this.ROWS.map((t,e)=>({cells:t,idx:e,idxDrag:e,collapse:"none",first:0===e,isGhost:!1,children:[]}));const e=this.COLS.length;t=t.filter(t=>{var i;for(let o=0;o<e;o++){const e=this.COLS[o];if((null===(i=e.filter)||void 0===i?void 0:i.active)&&!e.filter.list[e.filter.selectedIndex].predicate(t.cells[o].text,e.filter.input))return!1}return!0});const i=this.COLS.find(t=>"default"!=t.sort);if(i){const e=this.ROWS.map((t,e)=>({v:t[i.index].text,i:e})),o="ascending"==i.sort?1:-1;let s=[];if("byNumber"==i.sorter)s=e.sort((t,e)=>1==o?+t.v-+e.v:+e.v-+t.v);else if("byString"==i.sorter)s=e.sort((t,e)=>t.v==e.v?0:t.v>e.v?o:-o);else if("function"==typeof i.sorter){const t=i.sorter;s=e.sort((e,i)=>t(e.v,i.v,o))}t=s.map(e=>t[e.i])}const o=this.COLS.find(t=>t.isCollapsable);if(o){const e=o.index,i=t.reduce((t,i)=>{const o=i.cells[e].text,s=t.find(t=>t.key==o);return s?(i.collapse="child",s.children.push(i)):t.push({key:o,root:i,children:[]}),t},[]);t=[],i.forEach(e=>{t.push(e.root),e.root.collapse=0==e.children.length?"none":this.expandedRowIdx[e.root.idx]?"expanded":"collapsed",e.root.children=e.children})}return this.drops.forEach(({0:e,1:i})=>{t.splice(i,0,t.splice(e,1)[0])}),t.forEach((t,e)=>t.idxDrag=e),-1!=this.dragRow&&(t[this.dragRow].isGhost=!0,-1!=this.dropRow&&t.splice(this.dropRow,0,t.splice(this.dragRow,1)[0])),r.html`
|
|
1851
1851
|
<tbody>
|
|
1852
|
-
${t.map(e=>{const i=t.length,o=e.children.length>0&&"expanded"==e.collapse&&!e.isGhost;return
|
|
1853
|
-
${this.renderRow(e,i)} ${o?e.children.map(t=>this.renderRow(t,i)):
|
|
1852
|
+
${t.map(e=>{const i=t.length,o=e.children.length>0&&"expanded"==e.collapse&&!e.isGhost;return r.html`
|
|
1853
|
+
${this.renderRow(e,i)} ${o?e.children.map(t=>this.renderRow(t,i)):r.nothing}
|
|
1854
1854
|
`})}
|
|
1855
1855
|
</tbody>
|
|
1856
|
-
`}processTemplate(t){const e=document.importNode(t.content,!0);return Array.from(e.childNodes).map(t=>t.nodeType===Node.ELEMENT_NODE?t.outerHTML:t.nodeType===Node.TEXT_NODE&&t.textContent||"").join("")}processTemplateCallback(t){const e=document.importNode(t.template.content,!0);return t.cb({content:t.content,row:t.row,col:t.col,insertIndex:t.insertIndex,fragment:e}),Array.from(e.childNodes).map(t=>t.nodeType===Node.ELEMENT_NODE?t.outerHTML:t.nodeType===Node.TEXT_NODE&&t.textContent||"").join("")}renderRow(t,e){const i=Object.prototype.hasOwnProperty.call(this.selected,t.idx),o=(0,l.classMap)({selected:i,selectable:this.isSelectable&&!i,ghost:t.isGhost});return
|
|
1856
|
+
`}processTemplate(t){const e=document.importNode(t.content,!0);return Array.from(e.childNodes).map(t=>t.nodeType===Node.ELEMENT_NODE?t.outerHTML:t.nodeType===Node.TEXT_NODE&&t.textContent||"").join("")}processTemplateCallback(t){const e=document.importNode(t.template.content,!0);return t.cb({content:t.content,row:t.row,col:t.col,insertIndex:t.insertIndex,fragment:e}),Array.from(e.childNodes).map(t=>t.nodeType===Node.ELEMENT_NODE?t.outerHTML:t.nodeType===Node.TEXT_NODE&&t.textContent||"").join("")}renderRow(t,e){const i=Object.prototype.hasOwnProperty.call(this.selected,t.idx),o=(0,l.classMap)({selected:i,selectable:this.isSelectable&&!i,ghost:t.isGhost});return r.html`
|
|
1857
1857
|
<tr
|
|
1858
1858
|
class=${o}
|
|
1859
1859
|
tabindex=${(0,d.ifDefined)("true"===this.isRowFocusable?"0":void 0)}
|
|
1860
1860
|
part=${t.first?"first-row":"row"}
|
|
1861
1861
|
@click=${({shiftKey:e,metaKey:i})=>{this.isSelectable&&this.selectRow({row:t,shiftKey:e,metaKey:i})}}
|
|
1862
1862
|
>
|
|
1863
|
-
${t.cells.map((i,o)=>{var s;const
|
|
1864
|
-
${l.insertIndex>0?i.text.substring(0,l.insertIndex):
|
|
1865
|
-
${l.insertIndex<i.text.length-1?i.text.substring(l.insertIndex):
|
|
1866
|
-
`));const d=(null===(s=this.tableConfig.rows)||void 0===s?void 0:s.isDraggable)&&"child"!=t.collapse,p=d&&-1!=this.dragRow&&this.dragRow!=t.idxDrag,c=d&&0==o,u=
|
|
1863
|
+
${t.cells.map((i,o)=>{var s;const a=this.COLS[o];let n=i.text;const l=i.template;l&&(n=l.templateCb?r.html`${(0,h.unsafeHTML)(this.processTemplateCallback({cb:l.templateCb,insertIndex:l.insertIndex,template:l.template,content:i.text,row:t.idx,col:o}))}`:r.html`${(0,h.unsafeHTML)(this.processTemplate(l.template))}`,-1!=l.insertIndex&&(n=r.html`
|
|
1864
|
+
${l.insertIndex>0?i.text.substring(0,l.insertIndex):r.nothing} ${n}
|
|
1865
|
+
${l.insertIndex<i.text.length-1?i.text.substring(l.insertIndex):r.nothing}
|
|
1866
|
+
`));const d=(null===(s=this.tableConfig.rows)||void 0===s?void 0:s.isDraggable)&&"child"!=t.collapse,p=d&&-1!=this.dragRow&&this.dragRow!=t.idxDrag,c=d&&0==o,u=r.html`
|
|
1867
1867
|
<div
|
|
1868
1868
|
class="inner-cell"
|
|
1869
1869
|
draggable="false"
|
|
1870
1870
|
@dragstart=${()=>{this.isResizing||-1!=this.dragCol||(this.dragRow=t.idxDrag)}}
|
|
1871
1871
|
@dragend=${()=>this.onDropRow()}
|
|
1872
1872
|
>
|
|
1873
|
-
${p?
|
|
1873
|
+
${p?r.html`
|
|
1874
1874
|
<div
|
|
1875
1875
|
class="drag-area top"
|
|
1876
1876
|
@dragenter=${()=>{if(0==this.dragRow){const e=t.idxDrag-1;this.dropRow=e>=0?e:0}else this.dropRow=t.idxDrag}}
|
|
@@ -1879,8 +1879,8 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1879
1879
|
class="drag-area bottom"
|
|
1880
1880
|
@dragenter=${()=>{if(0==this.dragRow)this.dropRow=t.idxDrag;else{const i=t.idxDrag+1;this.dropRow=i<e?i:e-1}}}
|
|
1881
1881
|
></div>
|
|
1882
|
-
`:
|
|
1883
|
-
${c?
|
|
1882
|
+
`:r.nothing}
|
|
1883
|
+
${c?r.html`
|
|
1884
1884
|
<md-icon
|
|
1885
1885
|
class="drag-handle"
|
|
1886
1886
|
@mousedown=${t=>{this.isResizing||-1!=this.dragCol||(this.dragRowElem=t.target.parentNode,this.dragRowElem.setAttribute("draggable","true"))}}
|
|
@@ -1889,27 +1889,27 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1889
1889
|
iconSet="momentumDesign"
|
|
1890
1890
|
>
|
|
1891
1891
|
</md-icon>
|
|
1892
|
-
`:
|
|
1893
|
-
${
|
|
1894
|
-
${"expanded"==t.collapse||"collapsed"==t.collapse?
|
|
1892
|
+
`:r.nothing}
|
|
1893
|
+
${a.isCollapsable?r.html`
|
|
1894
|
+
${"expanded"==t.collapse||"collapsed"==t.collapse?r.html`
|
|
1895
1895
|
<button class="row-collapsible" @click=${e=>this.collapseToggle(e,t.idx)}>
|
|
1896
|
-
${"collapsed"==t.collapse?
|
|
1896
|
+
${"collapsed"==t.collapse?r.html` <md-icon name="plus-bold" size="12" iconSet="momentumDesign"></md-icon> `:r.html` <md-icon name="minus-bold" size="12" iconSet="momentumDesign"></md-icon> `}
|
|
1897
1897
|
</button>
|
|
1898
|
-
`:
|
|
1899
|
-
<span>${"child"==t.collapse?
|
|
1900
|
-
`:
|
|
1898
|
+
`:r.nothing}
|
|
1899
|
+
<span>${"child"==t.collapse?r.nothing:n}</span>
|
|
1900
|
+
`:r.html` <span>${n}</span> `}
|
|
1901
1901
|
</div>
|
|
1902
|
-
`;return
|
|
1902
|
+
`;return a.options.isHeader?r.html` <th part="cell-ishead" scope="row" title="${i.text}">${u}</th> `:r.html` <td part=${0===o?"first-cell":"cell"} title="${i.text}">${u}</td> `})}
|
|
1903
1903
|
</tr>
|
|
1904
|
-
`}static get styles(){return[
|
|
1904
|
+
`}static get styles(){return[a.A,c.A]}};b([(0,n.property)({attribute:"config"})],e.prototype,"config",void 0),b([(0,n.property)({attribute:"data"})],e.prototype,"data",void 0),b([(0,n.property)({type:String})],e.prototype,"isRowFocusable",void 0),b([(0,u.Wj)()],e.prototype,"md-table-advanced-change",void 0),b([(0,n.state)()],e.prototype,"tableConfig",void 0),b([(0,n.state)()],e.prototype,"tableData",void 0),b([(0,n.state)()],e.prototype,"error",void 0),b([(0,n.state)()],e.prototype,"COLS",void 0),b([(0,n.state)()],e.prototype,"ROWS",void 0),b([(0,n.state)()],e.prototype,"dragRow",void 0),b([(0,n.state)()],e.prototype,"dropRow",void 0),b([(0,n.state)()],e.prototype,"drops",void 0),b([(0,n.state)()],e.prototype,"dragCol",void 0),b([(0,n.state)()],e.prototype,"dropCol",void 0),b([(0,n.queryAll)("tr[tabindex]")],e.prototype,"tableRaws",void 0),b([(0,u.sg)(500)],e.prototype,"filter",null),e=b([(0,o.w)("md-table-advanced")],e),t.ELEMENT=e}(y||(y={}))},3273(t,e,i){i.d(e,{X:()=>o}),i(1821);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(6897),h=i(1928),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.tabledata="",this.zebra=!1,this.clean=!1,this.sorting=!1,this.nodata="No data Loaded",this.stickheader=!1,this.label="Table",this.noBorders=!1,this.format="default",this.warning=[],this.errors=[],this.sort={columnName:"",sortting:!1},this.csvData=void 0,this.config={quoteChar:'"',escapeChar:'""',header:!1,preview:0,comments:!1,step:void 0,complete:void 0}}connectedCallback(){super.connectedCallback(),this.results=d.default.parse(this.tabledata,this.config),this.headerRow=this.results.data[0],this.csvData=this.results.data.slice(1,this.results.data.length)}get rowItem(){return this.rowTable}linkCellItems(){const t=this.rowTable;null==t||t.forEach((t,e)=>{this.warning.forEach(i=>{e+1===i.row&&t.querySelectorAll('td[role="cell"').forEach((t,e)=>{e+1===i.col&&(t.classList.add("warning"),t.insertAdjacentHTML("beforeend",'<md-icon name="warning-regular" size="24" iconSet="momentumDesign" color="var(--md-alert-warning-text-color)"></md-icon>'))})}),this.errors.forEach(i=>{e+1===i.row&&t.querySelectorAll('td[role="cell"').forEach((t,e)=>{e+1===i.col&&(t.classList.add("error"),t.insertAdjacentHTML("beforeend",'<md-icon name="clear-bold" size="24" iconSet="momentumDesign" color="var(--md-alert-error-text-color)"></md-icon>'))})})})}sortTab(t,e){const i=t.target,o=Array.from(this.csvData),s=this.headerRow.indexOf(e);e!==this.sort.columnName||!0!==this.sort.sortting?(o.sort(function(t,e){const i=t[s].toLowerCase(),o=e[s].toLowerCase();return i>o?1:i<o?-1:0}),this.sort.sortting=!0,i.classList.remove("sortedZyx"),i.classList.add("sortedAbc")):(o.reverse(),this.sort.sortting=!1,i.classList.remove("sortedAbc"),i.classList.add("sortedZyx")),this.sort.columnName=e,this.csvData=o,this.requestUpdate("csvData")}willUpdate(t){super.willUpdate(t),t.has("tabledata")&&(this.results=d.default.parse(this.tabledata,this.config),this.headerRow=this.results.data[0],this.csvData=this.results.data.slice(1,this.results.data.length))}updated(t){super.updated(t),t.has("tabledata")&&this.linkCellItems()}static get styles(){return[a.A,h.A]}get tableClassMap(){return{"md-table--clean":this.clean,"md-table--no-borders":this.noBorders,"md-table--stripped":this.zebra,"md-table--sorting":this.sorting}}getSortTemplate(t){return this.sort.columnName!==t?r.nothing:r.html`
|
|
1905
1905
|
<md-icon
|
|
1906
1906
|
name=${this.sort.sortting?"sort-descending-bold":"sort-ascending-bold"}
|
|
1907
1907
|
iconSet="momentumDesign"
|
|
1908
1908
|
size="16"
|
|
1909
1909
|
></md-icon>
|
|
1910
|
-
`}render(){return
|
|
1910
|
+
`}render(){return r.html`
|
|
1911
1911
|
<div class=${"md-table-container "+(this.stickheader?"md-table-container_stickly":"")}>
|
|
1912
|
-
${0!=this.csvData.length?
|
|
1912
|
+
${0!=this.csvData.length?r.html`
|
|
1913
1913
|
<table
|
|
1914
1914
|
class="md-table ${(0,l.classMap)(this.tableClassMap)}"
|
|
1915
1915
|
tabindex="0"
|
|
@@ -1918,21 +1918,21 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1918
1918
|
>
|
|
1919
1919
|
<thead class="md-table__header" role="rowgroup" tabindex="0">
|
|
1920
1920
|
<tr role="row">
|
|
1921
|
-
${this.headerRow.map(t=>
|
|
1921
|
+
${this.headerRow.map(t=>r.html`
|
|
1922
1922
|
<th role="columnheader">
|
|
1923
|
-
${this.sorting?
|
|
1923
|
+
${this.sorting?r.html`
|
|
1924
1924
|
<a @click=${e=>this.sortTab(e,t)}>
|
|
1925
1925
|
${t}${this.getSortTemplate(t)}
|
|
1926
1926
|
</a>
|
|
1927
|
-
`:
|
|
1927
|
+
`:r.html` ${t}`}
|
|
1928
1928
|
</th>
|
|
1929
1929
|
`)}
|
|
1930
1930
|
</tr>
|
|
1931
1931
|
</thead>
|
|
1932
1932
|
<tbody class="md-table__body" role="rowgroup">
|
|
1933
|
-
${this.csvData.map((t,e)=>
|
|
1933
|
+
${this.csvData.map((t,e)=>r.html`
|
|
1934
1934
|
<tr tabindex="0" role="row" part=${0===e?"first-row":"row"}>
|
|
1935
|
-
${t.map((t,e)=>{const i="number"===this.format&&0!==e?Number(t).toLocaleString():t;return
|
|
1935
|
+
${t.map((t,e)=>{const i="number"===this.format&&0!==e?Number(t).toLocaleString():t;return r.html`
|
|
1936
1936
|
<td part=${0===e?"left-cell":"cell"} role="cell">
|
|
1937
1937
|
<span>${i}</span>
|
|
1938
1938
|
</td>
|
|
@@ -1941,9 +1941,9 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1941
1941
|
`)}
|
|
1942
1942
|
</tbody>
|
|
1943
1943
|
</table>
|
|
1944
|
-
`:
|
|
1944
|
+
`:r.html` <p>${this.nodata}</p> `}
|
|
1945
1945
|
</div>
|
|
1946
|
-
`}};p([(0,n.property)({type:String})],e.prototype,"tabledata",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"zebra",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"clean",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"sorting",void 0),p([(0,n.property)({type:String})],e.prototype,"nodata",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"stickheader",void 0),p([(0,n.property)({type:String})],e.prototype,"label",void 0),p([(0,n.property)({type:Boolean,attribute:"no-borders"})],e.prototype,"noBorders",void 0),p([(0,n.property)({type:String})],e.prototype,"format",void 0),p([(0,n.property)({type:Array})],e.prototype,"warning",void 0),p([(0,n.property)({type:Array})],e.prototype,"errors",void 0),p([(0,n.state)()],e.prototype,"sort",void 0),p([(0,n.state)()],e.prototype,"csvData",void 0),p([(0,n.queryAll)('.md-table__body tr[role="row"]')],e.prototype,"rowTable",void 0),e=p([(0,s.w)("md-table")],e),t.ELEMENT=e}(o||(o={}))},120(t,e,i){i.d(e,{o:()=>m,y:()=>u});var o=i(2900),s=i(7704),
|
|
1946
|
+
`}};p([(0,n.property)({type:String})],e.prototype,"tabledata",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"zebra",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"clean",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"sorting",void 0),p([(0,n.property)({type:String})],e.prototype,"nodata",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"stickheader",void 0),p([(0,n.property)({type:String})],e.prototype,"label",void 0),p([(0,n.property)({type:Boolean,attribute:"no-borders"})],e.prototype,"noBorders",void 0),p([(0,n.property)({type:String})],e.prototype,"format",void 0),p([(0,n.property)({type:Array})],e.prototype,"warning",void 0),p([(0,n.property)({type:Array})],e.prototype,"errors",void 0),p([(0,n.state)()],e.prototype,"sort",void 0),p([(0,n.state)()],e.prototype,"csvData",void 0),p([(0,n.queryAll)('.md-table__body tr[role="row"]')],e.prototype,"rowTable",void 0),e=p([(0,s.w)("md-table")],e),t.ELEMENT=e}(o||(o={}))},120(t,e,i){i.d(e,{o:()=>m,y:()=>u});var o=i(2900),s=i(7704),a=i(9609),r=i(7154),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3272),c=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const u=22;var m;!function(t){let e=class extends((0,s.yC)(l.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.ariaLabel="",this.closable="",this.name="",this.isCrossVisible=!1,this.role="tab",this.type="line",this.newMomentum=!1,this.onlyIcon=!1,this.variant="ghost",this.visibleTab=!1,this.size=28,this._disabled=!1,this._selected=0===this.tabIndex,this.vertical=!1,this.viewportHidden=!1}get disabled(){return this._disabled}set disabled(t){const e=this._disabled;this._disabled=t,t?this.tabDisabled():this.tabEnabled(),this.requestUpdate("disabled",e)}tabDisabled(){-1!==this.tabIndex&&(this.tabIndex=-1),this.setAttribute("aria-disabled","true")}tabEnabled(){-1===this.tabIndex&&this.selected&&(this.tabIndex=0),this.removeAttribute("aria-disabled")}get selected(){return this._selected}set selected(t){const e=this._selected;this._selected=t,t?(this.setAttribute("aria-selected","true"),this.tabIndex=0,this.notifySelectedTab()):(this.tabIndex=-1,this.removeAttribute("aria-selected")),this.requestUpdate("selected",e)}static get styles(){return[n.A,p.A]}handleClick(t){t.preventDefault(),this.id&&this.dispatchEvent(new CustomEvent("tab-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleKeydown(t){if((0,r.o)(t.code)){if(this.disabled)return void t.preventDefault();this.handleClick(t)}}handleCrossKeydown(t){t.stopPropagation(),t.code===o.Uz.Enter&&this.handleCrossEventDispatch()}handleCrossClick(t){t.preventDefault(),!0!==this.disabled&&this.handleCrossEventDispatch()}handleCrossEventDispatch(){this.id&&("auto"===this.closable?this.dispatchEvent(new CustomEvent("tab-cross-click",{detail:{id:this.id},bubbles:!0,composed:!0})):"custom"===this.closable&&this.dispatchEvent(new CustomEvent("tab-close-click",{detail:{id:this.id,name:this.name},bubbles:!0,composed:!0})))}notifySelectedTab(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}update(t){super.update(t),t.has("disabled")&&this.disabled&&(this.selected=!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}firstUpdated(t){super.firstUpdated(t)}renderCrossButton(){return l.html`
|
|
1947
1947
|
<md-button
|
|
1948
1948
|
variant="ghost"
|
|
1949
1949
|
size="size-none"
|
|
@@ -1972,7 +1972,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1972
1972
|
@click=${t=>this.handleClick(t)}
|
|
1973
1973
|
@keydown=${t=>this.handleKeydown(t)}
|
|
1974
1974
|
></button>
|
|
1975
|
-
`}};c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,d.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),c([(0,d.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),c([(0,d.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),c([(0,d.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),c([(0,d.property)({type:String,attribute:"role",reflect:!0})],e.prototype,"role",void 0),c([(0,d.property)({type:String,reflect:!0})],e.prototype,"type",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),c([(0,d.property)({type:String})],e.prototype,"variant",void 0),c([(0,d.property)({type:Boolean,attribute:"visible-tab",reflect:!0})],e.prototype,"visibleTab",void 0),c([(0,d.property)({type:Number})],e.prototype,"size",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=c([(0,r.w)("md-tab")],e),t.ELEMENT=e}(m||(m={}))},6056(t,e,i){i.d(e,{K:()=>o});var o,s=i(7704),r=i(9609),a=i(4084),n=i(2927),l=i(8899),d=i(3272),h=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.selected=!1,this.name="",this.focusablePanel="true"}static get styles(){return[a.A,d.A]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tabpanel")}firstUpdated(t){super.firstUpdated(t),"true"===this.focusablePanel&&this.setAttribute("tabindex","0")}render(){return n.html` <slot></slot> `}};h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),h([(0,l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),h([(0,l.property)({type:String,attribute:"focusable-panel"})],e.prototype,"focusablePanel",void 0),e=h([(0,r.w)("md-tab-panel")],e),t.ELEMENT=e}(o||(o={}))},8543(t,e,i){i.d(e,{t:()=>I}),i(1821),i(708),i(9613);var o=i(2900),s=i(7704),r=i(2050),a=i(93),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(7638),b=i(6933),v=i(7103),y=i(3272),g=i(120),f=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},w=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};const C="tab-more",E="more-menu-copy-",T="visibleToVisible",x="visibleToHidden",$="hiddenToVisible",S="hiddenToHidden",k="previous",A="next",L="fromMoreTabs";var I;!function(t){let e=class extends((0,s.UM)((0,s.Io)((0,s.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabPanelHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>w(this,void 0,void 0,function*(){var e,i,o,s,r,a,n,l,d,h;t.stopPropagation();const p=t.oldIndex,c=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],b=this.getDragDirection(t);if(void 0!==p&&void 0!==c){switch(b){case x:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const o=u[p],s=m.slice(-1)[0],r=c===this.tabsFilteredAsHiddenList.length?c-1:c;m.splice(r,0,o),m.pop();const a=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));a.push(s),this.tabsFilteredAsVisibleList=[...a],this.tabsFilteredAsHiddenList=[...m];break}case T:{const t=u[p];u.splice(p,1),u.splice(c,0,t),this.tabsFilteredAsVisibleList=u,c===this.tabsFilteredAsVisibleList.length-1&&(null===(s=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[this.visibleTabsContainerElement.children.length-1])||void 0===s||s.remove());const e=this.visibleTabsContainerElement.children[p],i=this.visibleTabsContainerElement.children[c];if(!e||!i)return;null===(r=this.visibleTabsContainerElement)||void 0===r||r.replaceChild(i,e),null===(a=this.visibleTabsContainerElement)||void 0===a||a.insertBefore(e,i);break}case $:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[p],i=u.slice(-1)[0];m.splice(p,1),m.splice(0,0,i);const o=c===this.tabsFilteredAsVisibleList.length?c-1:c;u.splice(o,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case S:{const t=m[p];m.splice(p,1),m.splice(c,0,t),this.tabsFilteredAsHiddenList=m,c===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(E,"")}static get styles(){return[n.A,y.A]}ensureTabsUpdateComplete(t){return w(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+g.y:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+g.y:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return w(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,o,s,r,a;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(o=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===o?void 0:o.length)){const e=null===(r=null===(s=null==t?void 0:t.querySelector("slot"))||void 0===s?void 0:s.assignedNodes({flatten:!0})[0])||void 0===r?void 0:r.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(a=null==t?void 0:t.children[0])||void 0===a||a.appendChild(e))}});const o=i.length;if(this.tabsListElement&&o){const s=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const r=this.measureTabsOffsetWidth(),a=i.reduce((t,e,i)=>t+r[i],0);if(a){yield this.setupMoreTab();let t=!0;s<a&&(t=!1);const e=[];let n=0;i.forEach((i,a)=>{n+=r[a];const l=!t&&n+(a<o-1?this.moreTabMenuOffsetWidth:0)>s;e.push({isTabInViewportHidden:l,tabOffsetWidth:r[a]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected(),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget())}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateAriaControlsElements(){this.visibleTabsContainerElement&&this.visibleTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])}),this.hiddenTabsContainerElement&&this.hiddenTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])})}getHiddenTabFocusTarget(t){return t&&!t.disabled&&this.isTabInMoreMenu(t)?t:this.tabsFilteredAsHiddenList.find(t=>t.selected&&!t.disabled)||this.tabsFilteredAsHiddenList.find(t=>!t.disabled)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,o;const s=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",r=null!==(o=e.getAttribute("name"))&&void 0!==o?o:"";return this.tabsOrderPrefsArray.indexOf(s)-this.tabsOrderPrefsArray.indexOf(r)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return w(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,o=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,s)=>{const r=(0,a.O)("tabs"),n="tab_"+r,l="tab_panel_"+r;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=o===s,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[s];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=o===s,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let s=o;for(;s<t.length&&t[s].disabled;)s++;s=s===t.length?0:s,t[s].selected=!0,e[s].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabPanelHash=this.tabs.reduce((t,i,o)=>(e[o]&&(t[i.id]=e[o]),t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?x:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?$:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?S:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(i))}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const o=this.tabsHash[this.getNormalizedTabId(t)];if(o&&!o.disabled&&("auto"===o.closable||"custom"===o.closable)){const o=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(o)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:o}=this,s=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&o&&(this.setSelectedAttribute((0,r.Qx)(i,s),(0,r.Qx)(o,s),!1),this.setSelectedAttribute((0,r.Qx)(i,t),(0,r.Qx)(o,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const o=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(o,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id;let o=e.findIndex(t=>t.id===i);-1===o&&(o=t);const s=[];e.forEach(t=>{s.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:o,tabsOrder:s},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,o;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(o=this.hiddenTabsContainerElement)||void 0===o?void 0:o.children[t];e&&this.moveFocusToTab(i)}const s=t-this.tabsFilteredAsVisibleList.length,r=this.tabsFilteredAsHiddenList[s];this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(r))}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,o;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const s=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<s;e++)if((null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,o,s;const r=this.getCurrentIndex(t),a=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===k?n=0===r?a.length-1:r-1:e===A&&(n=r===a.length-1?0:r+1),this.moveFocusToTab(a[n]);const t=a[n],o=t.getBoundingClientRect(),s=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return s&&(o.left>=s.left&&o.right<=s.right&&o.top>=s.top&&o.bottom<=s.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(a[n]),0)}const l=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children,d=null!==(s=null==l?void 0:l.length)&&void 0!==s?s:0;l&&0!==d&&(e===k?n=0===r?d-1:r-1:e===A?n=r===d-1?0:r+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,v.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,s,r,a,n,l,d,h;const p=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==p?void 0:p.id)))return!1;let c;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?c=t.composedPath()[0].id:t.originalTarget&&(c=t.originalTarget.id),!c)return;const u=this.getNormalizedTabId(c);this.dispatchKeydownEvent(t,u);const m=t.code,{shiftKey:b}=t,v=!!this.isMoreTabMenuVisible&&u===C,y=v&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(u)],g=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,f=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1;switch(m){case o.Uz.Tab:v&&!this.isMoreTabMenuOpen&&b&&(t.preventDefault(),this.moveFocusToAdjacentTab(c,L));break;case o.Uz.End:v||(g?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(s=this.tabsFilteredAsVisibleList)||void 0===s?void 0:s.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(r=this.hiddenTabsContainerElement)||void 0===r?void 0:r.children[(null===(a=this.tabsFilteredAsHiddenList)||void 0===a?void 0:a.length)-1])));break;case o.Uz.Home:g?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case o.Uz.ArrowLeft:v||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?A:k));break;case o.Uz.ArrowRight:v||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?k:A));break;case o.Uz.ArrowUp:if(v);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?w:this.selected-1);else if(f&&y){t.preventDefault(),t.stopPropagation();const e=this.tabsHiddenIdxHash[y.id],i=this.tabsFilteredAsHiddenList.length,o=(e-1+i)%i,s=this.tabsFilteredAsHiddenList[o];this.updateHiddenIdPositiveTabIndex(s),this.moveFocusToTab(null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[o])}break;case o.Uz.ArrowDown:if(v);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===w?0:this.selected+1);else if(f&&y){t.preventDefault(),t.stopPropagation();const e=(this.tabsHiddenIdxHash[y.id]+1)%this.tabsFilteredAsHiddenList.length,i=this.tabsFilteredAsHiddenList[e];this.updateHiddenIdPositiveTabIndex(i),this.moveFocusToTab(null===(h=this.hiddenTabsContainerElement)||void 0===h?void 0:h.children[e])}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(v)this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget());else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e),f&&this.handleOverlayClose())}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return w(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=b.default.create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=b.default.create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return w(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}willUpdate(t){var e,i;if(null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("selectedIndex")&&(this.selected=this.selectedIndex),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(t){super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged(),this.isMoreTabMenuVisible&&this.moreTabMenuElement&&(this.moreTabMenuElement.tabIndex=0),(this.visibleTabsContainerElement||this.hiddenTabsContainerElement)&&requestAnimationFrame(()=>this.updateAriaControlsElements())}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
|
|
1975
|
+
`}};c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,d.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),c([(0,d.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),c([(0,d.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),c([(0,d.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),c([(0,d.property)({type:String,attribute:"role",reflect:!0})],e.prototype,"role",void 0),c([(0,d.property)({type:String,reflect:!0})],e.prototype,"type",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),c([(0,d.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),c([(0,d.property)({type:String})],e.prototype,"variant",void 0),c([(0,d.property)({type:Boolean,attribute:"visible-tab",reflect:!0})],e.prototype,"visibleTab",void 0),c([(0,d.property)({type:Number})],e.prototype,"size",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=c([(0,a.w)("md-tab")],e),t.ELEMENT=e}(m||(m={}))},6056(t,e,i){i.d(e,{K:()=>o});var o,s=i(7704),a=i(9609),r=i(4084),n=i(2927),l=i(8899),d=i(3272),h=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.selected=!1,this.name="",this.focusablePanel="true"}static get styles(){return[r.A,d.A]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tabpanel")}firstUpdated(t){super.firstUpdated(t),"true"===this.focusablePanel&&this.setAttribute("tabindex","0")}render(){return n.html` <slot></slot> `}};h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),h([(0,l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),h([(0,l.property)({type:String,attribute:"focusable-panel"})],e.prototype,"focusablePanel",void 0),e=h([(0,a.w)("md-tab-panel")],e),t.ELEMENT=e}(o||(o={}))},8543(t,e,i){i.d(e,{t:()=>I}),i(1821),i(708),i(9613);var o=i(2900),s=i(7704),a=i(2050),r=i(93),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(2577),u=i(1156),m=i(7638),b=i(6933),v=i(7103),y=i(3272),g=i(120),f=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},w=function(t,e,i,o){return new(i||(i=Promise))(function(s,a){function r(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,n)}l((o=o.apply(t,e||[])).next())})};const C="tab-more",E="more-menu-copy-",T="visibleToVisible",x="visibleToHidden",$="hiddenToVisible",S="hiddenToHidden",k="previous",A="next",L="fromMoreTabs";var I;!function(t){let e=class extends((0,s.UM)((0,s.Io)((0,s.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabPanelHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>w(this,void 0,void 0,function*(){var e,i,o,s,a,r,n,l,d,h;t.stopPropagation();const p=t.oldIndex,c=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],b=this.getDragDirection(t);if(void 0!==p&&void 0!==c){switch(b){case x:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const o=u[p],s=m.slice(-1)[0],a=c===this.tabsFilteredAsHiddenList.length?c-1:c;m.splice(a,0,o),m.pop();const r=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));r.push(s),this.tabsFilteredAsVisibleList=[...r],this.tabsFilteredAsHiddenList=[...m];break}case T:{const t=u[p];u.splice(p,1),u.splice(c,0,t),this.tabsFilteredAsVisibleList=u,c===this.tabsFilteredAsVisibleList.length-1&&(null===(s=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[this.visibleTabsContainerElement.children.length-1])||void 0===s||s.remove());const e=this.visibleTabsContainerElement.children[p],i=this.visibleTabsContainerElement.children[c];if(!e||!i)return;null===(a=this.visibleTabsContainerElement)||void 0===a||a.replaceChild(i,e),null===(r=this.visibleTabsContainerElement)||void 0===r||r.insertBefore(e,i);break}case $:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[p],i=u.slice(-1)[0];m.splice(p,1),m.splice(0,0,i);const o=c===this.tabsFilteredAsVisibleList.length?c-1:c;u.splice(o,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case S:{const t=m[p];m.splice(p,1),m.splice(c,0,t),this.tabsFilteredAsHiddenList=m,c===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(E,"")}static get styles(){return[n.A,y.A]}ensureTabsUpdateComplete(t){return w(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+g.y:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+g.y:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return w(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,o,s,a,r;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(o=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===o?void 0:o.length)){const e=null===(a=null===(s=null==t?void 0:t.querySelector("slot"))||void 0===s?void 0:s.assignedNodes({flatten:!0})[0])||void 0===a?void 0:a.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(r=null==t?void 0:t.children[0])||void 0===r||r.appendChild(e))}});const o=i.length;if(this.tabsListElement&&o){const s=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const a=this.measureTabsOffsetWidth(),r=i.reduce((t,e,i)=>t+a[i],0);if(r){yield this.setupMoreTab();let t=!0;s<r&&(t=!1);const e=[];let n=0;i.forEach((i,r)=>{n+=a[r];const l=!t&&n+(r<o-1?this.moreTabMenuOffsetWidth:0)>s;e.push({isTabInViewportHidden:l,tabOffsetWidth:a[r]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected(),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget())}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateAriaControlsElements(){this.visibleTabsContainerElement&&this.visibleTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])}),this.hiddenTabsContainerElement&&this.hiddenTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])})}getHiddenTabFocusTarget(t){return t&&!t.disabled&&this.isTabInMoreMenu(t)?t:this.tabsFilteredAsHiddenList.find(t=>t.selected&&!t.disabled)||this.tabsFilteredAsHiddenList.find(t=>!t.disabled)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,o;const s=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",a=null!==(o=e.getAttribute("name"))&&void 0!==o?o:"";return this.tabsOrderPrefsArray.indexOf(s)-this.tabsOrderPrefsArray.indexOf(a)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return w(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,o=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,s)=>{const a=(0,r.O)("tabs"),n="tab_"+a,l="tab_panel_"+a;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=o===s,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[s];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=o===s,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let s=o;for(;s<t.length&&t[s].disabled;)s++;s=s===t.length?0:s,t[s].selected=!0,e[s].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabPanelHash=this.tabs.reduce((t,i,o)=>(e[o]&&(t[i.id]=e[o]),t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?x:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?$:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?S:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(i))}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const o=this.tabsHash[this.getNormalizedTabId(t)];if(o&&!o.disabled&&("auto"===o.closable||"custom"===o.closable)){const o=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(o)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:o}=this,s=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&o&&(this.setSelectedAttribute((0,a.Qx)(i,s),(0,a.Qx)(o,s),!1),this.setSelectedAttribute((0,a.Qx)(i,t),(0,a.Qx)(o,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const o=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(o,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id;let o=e.findIndex(t=>t.id===i);-1===o&&(o=t);const s=[];e.forEach(t=>{s.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:o,tabsOrder:s},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,o;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(o=this.hiddenTabsContainerElement)||void 0===o?void 0:o.children[t];e&&this.moveFocusToTab(i)}const s=t-this.tabsFilteredAsVisibleList.length,a=this.tabsFilteredAsHiddenList[s];this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(a))}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,o;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const s=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<s;e++)if((null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,o,s;const a=this.getCurrentIndex(t),r=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===k?n=0===a?r.length-1:a-1:e===A&&(n=a===r.length-1?0:a+1),this.moveFocusToTab(r[n]);const t=r[n],o=t.getBoundingClientRect(),s=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return s&&(o.left>=s.left&&o.right<=s.right&&o.top>=s.top&&o.bottom<=s.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(r[n]),0)}const l=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children,d=null!==(s=null==l?void 0:l.length)&&void 0!==s?s:0;l&&0!==d&&(e===k?n=0===a?d-1:a-1:e===A?n=a===d-1?0:a+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,v.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,s,a,r,n,l,d,h;const p=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==p?void 0:p.id)))return!1;let c;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?c=t.composedPath()[0].id:t.originalTarget&&(c=t.originalTarget.id),!c)return;const u=this.getNormalizedTabId(c);this.dispatchKeydownEvent(t,u);const m=t.code,{shiftKey:b}=t,v=!!this.isMoreTabMenuVisible&&u===C,y=v&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(u)],g=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,f=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1;switch(m){case o.Uz.Tab:v&&!this.isMoreTabMenuOpen&&b&&(t.preventDefault(),this.moveFocusToAdjacentTab(c,L));break;case o.Uz.End:v||(g?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(s=this.tabsFilteredAsVisibleList)||void 0===s?void 0:s.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(a=this.hiddenTabsContainerElement)||void 0===a?void 0:a.children[(null===(r=this.tabsFilteredAsHiddenList)||void 0===r?void 0:r.length)-1])));break;case o.Uz.Home:g?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case o.Uz.ArrowLeft:v||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?A:k));break;case o.Uz.ArrowRight:v||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?k:A));break;case o.Uz.ArrowUp:if(v);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?w:this.selected-1);else if(f&&y){t.preventDefault(),t.stopPropagation();const e=this.tabsHiddenIdxHash[y.id],i=this.tabsFilteredAsHiddenList.length,o=(e-1+i)%i,s=this.tabsFilteredAsHiddenList[o];this.updateHiddenIdPositiveTabIndex(s),this.moveFocusToTab(null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[o])}break;case o.Uz.ArrowDown:if(v);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===w?0:this.selected+1);else if(f&&y){t.preventDefault(),t.stopPropagation();const e=(this.tabsHiddenIdxHash[y.id]+1)%this.tabsFilteredAsHiddenList.length,i=this.tabsFilteredAsHiddenList[e];this.updateHiddenIdPositiveTabIndex(i),this.moveFocusToTab(null===(h=this.hiddenTabsContainerElement)||void 0===h?void 0:h.children[e])}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(v)this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget());else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e),f&&this.handleOverlayClose())}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return w(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=b.default.create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=b.default.create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return w(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}willUpdate(t){var e,i;if(null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("selectedIndex")&&(this.selected=this.selectedIndex),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(t){super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged(),this.isMoreTabMenuVisible&&this.moreTabMenuElement&&(this.moreTabMenuElement.tabIndex=0),(this.visibleTabsContainerElement||this.hiddenTabsContainerElement)&&requestAnimationFrame(()=>this.updateAriaControlsElements())}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
|
|
1976
1976
|
<md-tab
|
|
1977
1977
|
slot="menu-trigger"
|
|
1978
1978
|
id="${C}"
|
|
@@ -1999,7 +1999,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
1999
1999
|
></md-icon>
|
|
2000
2000
|
</md-tab>
|
|
2001
2001
|
`}get moreMenuListTemplate(){return l.html`
|
|
2002
|
-
${(0,c.repeat)(this.tabsFilteredAsHiddenList,()=>(0,
|
|
2002
|
+
${(0,c.repeat)(this.tabsFilteredAsHiddenList,()=>(0,r.O)("menuitem_tabs"),t=>l.html`
|
|
2003
2003
|
<md-tab
|
|
2004
2004
|
slot="draggable-item"
|
|
2005
2005
|
?disabled=${t.disabled}
|
|
@@ -2101,7 +2101,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2101
2101
|
>
|
|
2102
2102
|
<slot name="panel" @slotchange=${this.initializeTabs}></slot>
|
|
2103
2103
|
</div>
|
|
2104
|
-
`}};f([(0,d.property)({type:Boolean})],e.prototype,"justified",void 0),f([(0,d.property)({type:Boolean,attribute:"hug-tabs"})],e.prototype,"hugTabs",void 0),f([(0,d.property)({type:String})],e.prototype,"overflowLabel",void 0),f([(0,d.property)({type:Boolean,attribute:"draggable"})],e.prototype,"draggable",void 0),f([(0,d.property)({type:String,reflect:!0})],e.prototype,"direction",void 0),f([(0,d.property)({type:Number,attribute:"more-items-scroll-limit"})],e.prototype,"moreItemsScrollLimit",void 0),f([(0,d.property)({type:Number,reflect:!0,attribute:"selected-index"})],e.prototype,"selectedIndex",null),f([(0,d.property)({type:Number})],e.prototype,"animation",void 0),f([(0,d.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),f([(0,d.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),f([(0,d.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),f([(0,d.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),f([(0,d.property)({type:String,attribute:"tabs-id"})],e.prototype,"tabsId",void 0),f([(0,d.property)({type:Boolean,attribute:"persist-selection"})],e.prototype,"persistSelection",void 0),f([(0,d.property)({type:String,attribute:"comp-unique-id"})],e.prototype,"compUniqueId",void 0),f([(0,d.property)({type:String})],e.prototype,"type",void 0),f([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),f([(0,d.property)({type:String})],e.prototype,"variant",void 0),f([(0,d.property)({type:Boolean,attribute:"scroll-arrow"})],e.prototype,"scrollArrow",void 0),f([(0,d.property)({type:String,attribute:"left-arrow-aria-label"})],e.prototype,"leftArrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"right-arrow-aria-label"})],e.prototype,"rightArrowAriaLabel",void 0),f([(0,d.property)({type:Number})],e.prototype,"size",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuVisible",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuMeasured",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuOpen",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuSelected",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuScrollable",void 0),f([(0,d.state)()],e.prototype,"moreTabMenuOffsetWidth",void 0),f([(0,d.state)()],e.prototype,"moreTabMenuMaxHeight",void 0),f([(0,d.state)()],e.prototype,"tabsViewportDataList",void 0),f([(0,d.state)()],e.prototype,"tabsFilteredAsVisibleList",void 0),f([(0,d.state)()],e.prototype,"tabsFilteredAsHiddenList",void 0),f([(0,d.state)()],e.prototype,"noTabsVisible",void 0),f([(0,d.state)()],e.prototype,"defaultTabsOrderArray",void 0),f([(0,d.state)()],e.prototype,"tabsOrderPrefsArray",void 0),f([(0,d.state)()],e.prototype,"isMoreTabTruncated",void 0),f([(0,d.state)()],e.prototype,"showLeftArrow",void 0),f([(0,d.state)()],e.prototype,"showRightArrow",void 0),f([(0,d.query)("slot[name='tab']")],e.prototype,"tabSlotElement",void 0),f([(0,d.query)("slot[name='panel']")],e.prototype,"panelSlotElement",void 0),f([(0,d.query)(".md-tab__list[part='tabs-list']")],e.prototype,"tabsListElement",void 0),f([(0,d.query)(".md-tabs__settings[part='md-tabs__settings']")],e.prototype,"tabsSettingsElement",void 0),f([(0,d.query)(".md-menu-overlay__more_tab")],e.prototype,"moreTabMenuElement",void 0),f([(0,d.query)("md-menu-overlay")],e.prototype,"menuOverlayElement",void 0),f([(0,d.query)(".md-tab__list[part='tabs-more-list']")],e.prototype,"tabsMoreListElement",void 0),f([(0,d.queryAll)(".md-menu-overlay__more_list md-tab")],e.prototype,"tabsCopyHiddenListElements",void 0),f([(0,d.query)("#visible-tabs-list")],e.prototype,"visibleTabsContainerElement",void 0),f([(0,d.query)("#tabs-more-list")],e.prototype,"hiddenTabsContainerElement",void 0),e=f([(0,s.wW)("md-tabs")],e),t.ELEMENT=e}(I||(I={}))},1479(t,e,i){i.d(e,{L:()=>o}),i(2245),i(7901),i(1821);var o,s=i(9609),
|
|
2104
|
+
`}};f([(0,d.property)({type:Boolean})],e.prototype,"justified",void 0),f([(0,d.property)({type:Boolean,attribute:"hug-tabs"})],e.prototype,"hugTabs",void 0),f([(0,d.property)({type:String})],e.prototype,"overflowLabel",void 0),f([(0,d.property)({type:Boolean,attribute:"draggable"})],e.prototype,"draggable",void 0),f([(0,d.property)({type:String,reflect:!0})],e.prototype,"direction",void 0),f([(0,d.property)({type:Number,attribute:"more-items-scroll-limit"})],e.prototype,"moreItemsScrollLimit",void 0),f([(0,d.property)({type:Number,reflect:!0,attribute:"selected-index"})],e.prototype,"selectedIndex",null),f([(0,d.property)({type:Number})],e.prototype,"animation",void 0),f([(0,d.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),f([(0,d.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),f([(0,d.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),f([(0,d.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),f([(0,d.property)({type:String,attribute:"tabs-id"})],e.prototype,"tabsId",void 0),f([(0,d.property)({type:Boolean,attribute:"persist-selection"})],e.prototype,"persistSelection",void 0),f([(0,d.property)({type:String,attribute:"comp-unique-id"})],e.prototype,"compUniqueId",void 0),f([(0,d.property)({type:String})],e.prototype,"type",void 0),f([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),f([(0,d.property)({type:String})],e.prototype,"variant",void 0),f([(0,d.property)({type:Boolean,attribute:"scroll-arrow"})],e.prototype,"scrollArrow",void 0),f([(0,d.property)({type:String,attribute:"left-arrow-aria-label"})],e.prototype,"leftArrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"right-arrow-aria-label"})],e.prototype,"rightArrowAriaLabel",void 0),f([(0,d.property)({type:Number})],e.prototype,"size",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuVisible",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuMeasured",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuOpen",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuSelected",void 0),f([(0,d.state)()],e.prototype,"isMoreTabMenuScrollable",void 0),f([(0,d.state)()],e.prototype,"moreTabMenuOffsetWidth",void 0),f([(0,d.state)()],e.prototype,"moreTabMenuMaxHeight",void 0),f([(0,d.state)()],e.prototype,"tabsViewportDataList",void 0),f([(0,d.state)()],e.prototype,"tabsFilteredAsVisibleList",void 0),f([(0,d.state)()],e.prototype,"tabsFilteredAsHiddenList",void 0),f([(0,d.state)()],e.prototype,"noTabsVisible",void 0),f([(0,d.state)()],e.prototype,"defaultTabsOrderArray",void 0),f([(0,d.state)()],e.prototype,"tabsOrderPrefsArray",void 0),f([(0,d.state)()],e.prototype,"isMoreTabTruncated",void 0),f([(0,d.state)()],e.prototype,"showLeftArrow",void 0),f([(0,d.state)()],e.prototype,"showRightArrow",void 0),f([(0,d.query)("slot[name='tab']")],e.prototype,"tabSlotElement",void 0),f([(0,d.query)("slot[name='panel']")],e.prototype,"panelSlotElement",void 0),f([(0,d.query)(".md-tab__list[part='tabs-list']")],e.prototype,"tabsListElement",void 0),f([(0,d.query)(".md-tabs__settings[part='md-tabs__settings']")],e.prototype,"tabsSettingsElement",void 0),f([(0,d.query)(".md-menu-overlay__more_tab")],e.prototype,"moreTabMenuElement",void 0),f([(0,d.query)("md-menu-overlay")],e.prototype,"menuOverlayElement",void 0),f([(0,d.query)(".md-tab__list[part='tabs-more-list']")],e.prototype,"tabsMoreListElement",void 0),f([(0,d.queryAll)(".md-menu-overlay__more_list md-tab")],e.prototype,"tabsCopyHiddenListElements",void 0),f([(0,d.query)("#visible-tabs-list")],e.prototype,"visibleTabsContainerElement",void 0),f([(0,d.query)("#tabs-more-list")],e.prototype,"hiddenTabsContainerElement",void 0),e=f([(0,s.wW)("md-tabs")],e),t.ELEMENT=e}(I||(I={}))},1479(t,e,i){i.d(e,{L:()=>o}),i(2245),i(7901),i(1821);var o,s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(3517),h=i(9244),p=i(5076),c=i(8634),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.mediaType=h.r.TELEPHONY,this.status="",this.popovertitle="",this.queue="",this.queueTimeLabel="",this.accepted=!1,this.displayOnlyTitle=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.disabled=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.isRestyle=!1,this.displayTitle="",this.titleValue="",this.itemTitleValue="",this.additionEmptyMargin=!1}get title(){return this.displayTitle}set title(t){this.titleValue=t,this.updateTitle()}get itemTitle(){return this.displayTitle}set itemTitle(t){this.itemTitleValue=t,this.updateTitle()}updateTitle(){this.itemTitleValue?this.displayTitle=this.itemTitleValue:this.displayTitle=this.titleValue}handleClick(t){this.dispatchEvent(new CustomEvent("taskitem-click",{composed:!0,bubbles:!0,detail:{srcEvent:t}})),this.blur()}handleKeyDown(t){this.dispatchEvent(new CustomEvent("taskitem-keydown",{detail:{key:t.code},bubbles:!0,composed:!0}))}getAriaLabel(){var t,e,i,o;if(this.customAriaLabel)return this.customAriaLabel;let s=this.queue;if(!s){const i=this.querySelector('[slot="queue"]');if(i){s=null!==(e=null===(t=i.textContent)||void 0===t?void 0:t.trim())&&void 0!==e?e:i.innerText.trim();const o=/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/.exec(s);if(o){const[,t=0,e,i]=o.map(Number);(new Date).setHours(t,e,i),s=s.replace(/(?:([01]?\d|2[0-3]):)?([0-5]?\d):([0-5]?\d)/,`${t?t+" hours ":""}${e} minutes ${i} seconds`)}}}const a=this.querySelector('[slot="queue-time"]');let r=this.queueTimeLabel;return a&&(r+=`${null!==(o=null===(i=a.textContent)||void 0===i?void 0:i.trim())&&void 0!==o?o:a.innerText.trim()}`),`${this.mediaType} ${this.status} ${this.popovertitle} ${this.itemTitle} ${s} ${r} ${this.quantity?this.quantity:""} ${this.lastmessage}`}static get styles(){return[a.A,c.A]}get sanitizedTabIndexForContainer(){var t;return null!==(t=parseInt(this.tabIndexForContainer))&&void 0!==t?t:0}handleAdditionSlotChange(){var t;const e=(null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-taskitem__addition")).getBoundingClientRect();this.additionEmptyMargin=0===e.width&&0===e.height}render(){return r.html`
|
|
2105
2105
|
<div
|
|
2106
2106
|
part="task-item-container"
|
|
2107
2107
|
class="md-taskitem ${(0,l.classMap)({selected:this.selected})}"
|
|
@@ -2113,56 +2113,56 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2113
2113
|
>
|
|
2114
2114
|
<div class="md-taskitem__mediatype">
|
|
2115
2115
|
${(0,p.i0)(this.isRestyle,this.mediaType,this.selected,this.status,this.iconSrc)}
|
|
2116
|
-
${this.status&&!this.isRestyle?
|
|
2116
|
+
${this.status&&!this.isRestyle?r.html` <span class=${`md-taskitem__status ${this.status}`}> ${(0,p.LG)(this.status)} </span> `:r.nothing}
|
|
2117
2117
|
</div>
|
|
2118
2118
|
<div class="md-taskitem__content" part="task-item-content">
|
|
2119
|
-
${this.popovertitle?
|
|
2119
|
+
${this.popovertitle?r.html`
|
|
2120
2120
|
<span class="md-taskitem__content_popover_title"
|
|
2121
2121
|
><md-tooltip placement="bottom" slot-to-tooltip>${this.popovertitle}</md-tooltip></span
|
|
2122
2122
|
>
|
|
2123
|
-
`:
|
|
2124
|
-
${this.itemTitle?
|
|
2123
|
+
`:r.nothing}
|
|
2124
|
+
${this.itemTitle?r.html`
|
|
2125
2125
|
<span
|
|
2126
2126
|
class="md-taskitem__content_title ${(0,l.classMap)({mainTitle:!this.popovertitle,"display-only-title":this.displayOnlyTitle})}"
|
|
2127
2127
|
><md-tooltip placement="bottom" slot-to-tooltip>${this.itemTitle}</md-tooltip></span
|
|
2128
2128
|
>
|
|
2129
|
-
`:
|
|
2129
|
+
`:r.html`
|
|
2130
2130
|
<span class="md-taskitem__content_popover_title popover-item-title"><slot name="title"></slot></span>
|
|
2131
2131
|
`}
|
|
2132
2132
|
<div class="md-taskitem__content_inner">
|
|
2133
|
-
${this.displayOnlyTitle?
|
|
2133
|
+
${this.displayOnlyTitle?r.nothing:r.html`
|
|
2134
2134
|
<span class="md-taskitem__content_queue">
|
|
2135
2135
|
<md-tooltip placement="bottom" slot-to-tooltip>
|
|
2136
|
-
${this.queue.length>0?this.queue:
|
|
2136
|
+
${this.queue.length>0?this.queue:r.html` <slot name="queue"></slot> `}
|
|
2137
2137
|
</md-tooltip>
|
|
2138
2138
|
</span>
|
|
2139
2139
|
`}
|
|
2140
|
-
${this.queueTimeLabel.length>0||this.querySelector('[slot="queue-time"]')?
|
|
2140
|
+
${this.queueTimeLabel.length>0||this.querySelector('[slot="queue-time"]')?r.html`
|
|
2141
2141
|
<span class="md-taskitem__content_queue_time">
|
|
2142
2142
|
<div class="md-taskitem__content_queue_time_dot"></div>
|
|
2143
2143
|
${this.queueTimeLabel}
|
|
2144
2144
|
<slot name="queue-time"></slot>
|
|
2145
2145
|
</span>
|
|
2146
|
-
`:
|
|
2146
|
+
`:r.nothing}
|
|
2147
2147
|
</div>
|
|
2148
|
-
${this.lastmessage?
|
|
2148
|
+
${this.lastmessage?r.html`
|
|
2149
2149
|
<span class="md-taskitem__content_chat">
|
|
2150
2150
|
<span class="new-chat_massages">
|
|
2151
2151
|
<md-tooltip placement="bottom" slot-to-tooltip> ${this.lastmessage} </md-tooltip></span
|
|
2152
2152
|
>
|
|
2153
2153
|
</span>
|
|
2154
|
-
`:
|
|
2155
|
-
${this.lastmessage?
|
|
2154
|
+
`:r.nothing}
|
|
2155
|
+
${this.lastmessage?r.nothing:r.html` <slot name="lastmessage"></slot> `}
|
|
2156
2156
|
</div>
|
|
2157
2157
|
<div class="md-taskitem__addition ${(0,l.classMap)({empty_addition:this.additionEmptyMargin})}">
|
|
2158
2158
|
<slot @slotchange=${this.handleAdditionSlotChange}></slot>
|
|
2159
2159
|
${(0,p.Um)(this.quantity,this.isRestyle,this)}
|
|
2160
2160
|
</div>
|
|
2161
2161
|
</div>
|
|
2162
|
-
`}};u([(0,n.property)({type:String})],e.prototype,"mediaType",void 0),u([(0,n.property)({type:String})],e.prototype,"status",void 0),u([(0,n.property)({type:String})],e.prototype,"popovertitle",void 0),u([(0,n.property)({type:String})],e.prototype,"queue",void 0),u([(0,n.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"accepted",void 0),u([(0,n.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),u([(0,n.property)({type:Number})],e.prototype,"quantity",void 0),u([(0,n.property)({type:String})],e.prototype,"lastmessage",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"selected",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,n.property)({type:String})],e.prototype,"customAriaLabel",void 0),u([(0,n.property)({type:String})],e.prototype,"iconSrc",void 0),u([(0,n.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),u([(0,n.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),u([(0,n.property)({type:String,reflect:!0})],e.prototype,"title",null),u([(0,n.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),u([(0,n.state)()],e.prototype,"additionEmptyMargin",void 0),e=u([(0,s.w)("md-task-item")],e),t.ELEMENT=e}(o||(o={}))},
|
|
2162
|
+
`}};u([(0,n.property)({type:String})],e.prototype,"mediaType",void 0),u([(0,n.property)({type:String})],e.prototype,"status",void 0),u([(0,n.property)({type:String})],e.prototype,"popovertitle",void 0),u([(0,n.property)({type:String})],e.prototype,"queue",void 0),u([(0,n.property)({type:String,attribute:"queue-time-label"})],e.prototype,"queueTimeLabel",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"accepted",void 0),u([(0,n.property)({type:Boolean,attribute:"display-only-title"})],e.prototype,"displayOnlyTitle",void 0),u([(0,n.property)({type:Number})],e.prototype,"quantity",void 0),u([(0,n.property)({type:String})],e.prototype,"lastmessage",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"selected",void 0),u([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),u([(0,n.property)({type:String})],e.prototype,"customAriaLabel",void 0),u([(0,n.property)({type:String})],e.prototype,"iconSrc",void 0),u([(0,n.property)({type:String})],e.prototype,"tabIndexForContainer",void 0),u([(0,n.property)({type:Boolean,attribute:"is-restyle"})],e.prototype,"isRestyle",void 0),u([(0,n.property)({type:String,reflect:!0})],e.prototype,"title",null),u([(0,n.property)({type:String,reflect:!0,attribute:"item-title"})],e.prototype,"itemTitle",null),u([(0,n.state)()],e.prototype,"additionEmptyMargin",void 0),e=u([(0,s.w)("md-task-item")],e),t.ELEMENT=e}(o||(o={}))},1853(t,e,i){i.d(e,{Sx:()=>o});var o,s=i(9609),a=i(2335),r=i(9709),n=i(2927),l=i(8899),d=i(6343),h=i(6573),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends n.LitElement{constructor(){super(...arguments),this.darkTheme=!1,this.lumos=!1,this.activeTheme=h.dW,this.placement="bottom",this.popperInstance=null,this.activeTooltipTrigger=null,this.handleTooltipRemoved=()=>{this.hideVirtualTooltip(),this.activeTooltipTrigger=null}}setTheme(){return"momentum"===this.theme?this.darkTheme?h.Pm:h.f3:"lumos"===this.theme?this.darkTheme?h.Lu:h.dW:"momentumV2"===this.theme?this.darkTheme?h.Pm:h.f3:this.lumos?this.darkTheme?h.Lu:h.dW:this.darkTheme?h.Pm:h.f3}getStyleElement(){return document.createElement("style")}applyStyle(){const t=this.shadowRoot;if("adoptedStyleSheets"in document){const e=new CSSStyleSheet;e.replaceSync(this.activeTheme),t.adoptedStyleSheets=[e]}else{const e=this.getStyleElement();e.textContent=this.activeTheme.cssText,t.appendChild(e)}}removeChildFromVirtualPopper(){for(;this.virtualWrapper.firstElementChild;)this.virtualWrapper.firstElementChild.remove()}setInitStyleToVirtualReference(){const{style:t}=this.virtualReference;t.top="0",t.bottom="0",t.left="0",t.right="0",t.width="0",t.height="0",t.zIndex="-1"}setStyleToVirtualReference(t){const{style:e}=this.virtualReference,{top:i,bottom:o,left:s,right:a,width:r,height:n}=t;e.position="fixed",e.top=`${i}px`,e.bottom=`${o}px`,e.left=`${s}px`,e.right=`${a}px`,e.width=`${r}px`,e.height=`${n}px`,e.zIndex="-1"}setVirtualReferencePosition(t){const e=t.getBoundingClientRect();this.setStyleToVirtualReference(e)}initVirtualElements(t,e,i){const o=t.cloneNode(!0);this.virtualWrapper.hasChildNodes()&&this.removeChildFromVirtualPopper(),this.virtualWrapper.append(o),i&&this.setVirtualSlotContent(i),this.setVirtualReferencePosition(e)}setVirtualSlotContent(t){if(this.virtualTooltipContent){for(;this.virtualTooltipContent.firstElementChild;)this.virtualTooltipContent.firstElementChild.remove();t.forEach(t=>this.virtualTooltipContent.append(t))}}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.activeTheme=this.setTheme())}updated(t){super.updated(t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.dispatchEvent(new CustomEvent("theme-changed",{composed:!0,bubbles:!0,detail:{darkTheme:this.darkTheme,lumos:this.lumos,theme:this.theme}})),this.applyStyle())}handleVirtualTooltipCreate(t){t.stopPropagation();const{popper:e,placement:i,reference:o,slotContent:s}=t.detail;this.activeTooltipTrigger=o,this.placement=i,this.initVirtualElements(e,o,s),this.startContinuousPositionTracking(o),this.showVirtualTooltip()}startContinuousPositionTracking(t){this.stopContinuousPositionTracking();const e=()=>{this.activeTooltipTrigger===t&&this.popperInstance&&(this.setVirtualReferencePosition(t),this.popperInstance.update(),this.positionTrackingId=requestAnimationFrame(e))};this.positionTrackingId=requestAnimationFrame(e)}stopContinuousPositionTracking(){this.positionTrackingId&&(cancelAnimationFrame(this.positionTrackingId),this.positionTrackingId=void 0)}handleVirtualTooltipDestroy(t){t.stopPropagation(),this.hideVirtualTooltip(),this.activeTooltipTrigger===t.detail.reference&&(this.activeTooltipTrigger=null)}handleVirtualTooltipChangeMessage(t){var e;const{popper:i,reference:o}=t.detail;if(this.activeTooltipTrigger!==o)return;const s=i.querySelector(".md-tooltip__content"),a=this.virtualWrapper.querySelector(".md-tooltip__content");if(s&&a){const t=s.textContent,i=a.textContent;t&&i&&(a.textContent=t,null===(e=this.popperInstance)||void 0===e||e.update())}}handleVirtualTooltipSlotChange(t){const{slotContent:e}=t.detail;e&&this.setVirtualSlotContent(e)}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}createPopperInstance(t){if(this.virtualPopper){const e=8,i=4;this.popperInstance=(0,a.createPopper)(this.virtualReference,this.virtualPopper,{placement:t,modifiers:[...r.defaultModifiers,a.flip,a.offset,a.arrow,{name:"offset",options:{offset:({placement:t})=>{const o=e+i;return t.startsWith("left")||t.startsWith("right")||t.startsWith("top")||t.startsWith("bottom")?[0,o]:[8,8]}}},...this.virtualArrow?[{name:"arrow",options:{element:this.virtualArrow,padding:e}}]:[]]})}}get virtualPopper(){return this.shadowRoot.querySelector(".md-tooltip__popper")}get virtualArrow(){return this.shadowRoot.querySelector(".md-tooltip__arrow")}get virtualTooltipContent(){return this.shadowRoot.querySelector(".md-tooltip__content")}showVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!0),this.createPopperInstance(this.placement))}hideVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!1),this.destroyPopperInstance(),this.stopContinuousPositionTracking(),this.setInitStyleToVirtualReference())}setupEvents(){this.addEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.addEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.addEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.addEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.addEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}teardownEvents(){this.removeEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.removeEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.removeEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.removeEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.removeEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}disconnectedCallback(){super.disconnectedCallback(),this.stopContinuousPositionTracking(),this.teardownEvents()}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return i=this,o=void 0,a=function*(){e.firstUpdated.call(this,t),yield new Promise(t=>setTimeout(t,0)),this.setupEvents()},new((s=void 0)||(s=Promise))(function(t,e){function r(t){try{l(a.next(t))}catch(t){e(t)}}function n(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(r,n)}l((a=a.apply(i,o||[])).next())});var i,o,s,a}static get styles(){return[h.dW]}render(){return n.html`
|
|
2163
2163
|
<div class="theme-wrapper" part="theme-wrapper">
|
|
2164
2164
|
<style>
|
|
2165
|
-
${
|
|
2165
|
+
${d.A} .theme-wrapper {
|
|
2166
2166
|
width: 100%;
|
|
2167
2167
|
}
|
|
2168
2168
|
</style>
|
|
@@ -2170,7 +2170,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2170
2170
|
<div class="md-tooltip" data-virtual-global-popper></div>
|
|
2171
2171
|
<div data-virtual-global-reference></div>
|
|
2172
2172
|
</div>
|
|
2173
|
-
`}};
|
|
2173
|
+
`}};p([(0,l.property)({type:Boolean})],e.prototype,"darkTheme",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"lumos",void 0),p([(0,l.property)({type:String})],e.prototype,"theme",void 0),p([(0,l.state)()],e.prototype,"activeTheme",void 0),p([(0,l.query)("[data-virtual-global-popper]")],e.prototype,"virtualWrapper",void 0),p([(0,l.query)("[data-virtual-global-reference]")],e.prototype,"virtualReference",void 0),e=p([(0,s.w)("md-theme")],e),t.ELEMENT=e}(o||(o={}))},2218(t,e,i){i.d(e,{AG:()=>g}),i(2273),i(9189);var o=i(2900),s=i(9609),a=i(878),r=i(3331),n=i(4084),l=i(2927),d=i(8899),h=i(4955),p=i(3517),c=i(9642),u=i(7911),m=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const b=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND,o.R5.AM_PM],v=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND],y={[o.R5.HOUR]:"HH",[o.R5.MINUTE]:"MM",[o.R5.SECOND]:"SS",[o.R5.AM_PM]:"AM"};var g;!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.twoDigitAutoTab=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=o.R5.SECOND,this.locale="en-US",this.value=null,this.showDefaultNowTime=!0,this.finalTwentyFourFormat=!1,this.timeObject=(0,a.tB)(),this.tabNext=!1,this.timeValue={[o.R5.HOUR]:"12",[o.R5.MINUTE]:"00",[o.R5.SECOND]:"00",[o.R5.AM_PM]:"AM"},this.timeValidity={[o.R5.HOUR]:!0,[o.R5.MINUTE]:!0,[o.R5.SECOND]:!0,[o.R5.AM_PM]:!0},this.addLeadingZeros=t=>{if(t){if(0===t.length)return"00";if(1===t.length)return`0${t}`}return t},this.formatAndValidate=(t,e)=>{if(t&&(this.updateValidity(t,e),this.timeValidity[e]))return this.addLeadingZeros(t)},this.getLocaleTimeFormat=t=>{const e=t.toFormat("tt"),[,i]=e.split(" ");return!i},this.updateTimeValues=()=>{let t;t=this.finalTwentyFourFormat?this.timeObject.toFormat("HH:mm:ss"):this.timeObject.toFormat("hh:mm:ss a");const[e,i]=t.split(" "),s=e.split(":");v.forEach(t=>{const e=this.formatAndValidate(s.shift(),t);e&&(t===o.R5.HOUR&&i&&(this.timeValue[o.R5.AM_PM]=i),this.timeValue[t]=e)})},this.updateValidity=(t,e)=>{let i=!0;if(!this.showDefaultNowTime&&!this.value&&!t)return void(this.timeValidity[e]=!0);const s=e=>{null===t.match(e)&&(i=!1)};switch(e){case o.R5.HOUR:this.finalTwentyFourFormat?s(new RegExp(r.b.twentyFourHourString)):s(new RegExp(r.b.hourString));break;case o.R5.MINUTE:case o.R5.SECOND:s(new RegExp(r.b.minuteSecondString));break;case o.R5.AM_PM:s(new RegExp(r.b.amPmString))}this.timeValidity[e]=i},this.to12HourFormat=(t,e)=>{if(!this.finalTwentyFourFormat&&this.timeValidity[o.R5.HOUR]&&this.timeValidity[o.R5.AM_PM]){let i=Number(e);return"PM"===t?i=12+i%12:i%=12,i}},this.isEntireTimeValid=()=>{const t=[o.R5.HOUR];this.timeSpecificity!==o.R5.MINUTE&&this.timeSpecificity!==o.R5.SECOND||t.push(o.R5.MINUTE),this.timeSpecificity===o.R5.SECOND&&t.push(o.R5.SECOND),this.finalTwentyFourFormat||t.push(o.R5.AM_PM);const e=t.every(t=>this.timeValidity[t]);return(this.showDefaultNowTime||this.value||t.every(t=>!!this.timeValue[t]))&&e},this.updateTimeUnit=t=>{var e,i;if(this.updateValidity(this.timeValue[t],t),this.showDefaultNowTime||this.value){if(this.timeObject&&this.timeValidity[t]){if(t!==o.R5.AM_PM)this.timeObject=null===(e=this.timeObject)||void 0===e?void 0:e.set({[t]:Number(this.timeValue[t])});else{const t=this.to12HourFormat(this.timeValue[o.R5.AM_PM],this.timeValue[o.R5.HOUR]);void 0!==t&&(this.timeObject=null===(i=this.timeObject)||void 0===i?void 0:i.set({hour:t}))}this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0})||this.value,this.dispatchTimeChangeEvent())}}else{const t=this.timeValue[o.R5.HOUR]||"00",e=this.timeValue[o.R5.MINUTE]||"00",i=this.timeValue[o.R5.SECOND]||"00";try{let s=`${t}:${e}:${i}`;!this.finalTwentyFourFormat&&this.timeValue[o.R5.AM_PM]&&(s+=` ${this.timeValue[o.R5.AM_PM]}`),this.timeObject=c.DateTime.fromFormat(s,this.finalTwentyFourFormat?"HH:mm:ss":"hh:mm:ss a"),this.timeObject.isValid&&this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.dispatchTimeChangeEvent())}catch(t){console.warn("Failed to construct time object:")}}},this.formatTimeUnit=t=>{if(1===this.timeValue[t].length)"0"!==this.timeValue[t]&&(this.timeValue[t]="0"+this.timeValue[t]);else if(this.timeValue[t].length>2&&"0"===this.timeValue[t][0]){const e=this.timeValue[t].substring(1);RegExp(r.b.noPrecedingZerosString).test(e)&&(this.timeValue[t]=e)}this.requestUpdate()},this.messageType=t=>t?"":"error",this.generateTimeBox=t=>{const e=(i=this.finalTwentyFourFormat,{[o.R5.HOUR]:{type:"number",min:i?0:1,max:i?23:12},[o.R5.MINUTE]:{type:"number",min:0,max:59},[o.R5.SECOND]:{type:"number",min:0,max:59},[o.R5.AM_PM]:{type:"text",min:void 0,max:void 0}})[t];var i;return l.html`
|
|
2174
2174
|
${t===o.R5.MINUTE||t===o.R5.SECOND?l.html` <span class="colon-separator">:</span> `:l.nothing}
|
|
2175
2175
|
<md-input
|
|
2176
2176
|
newMomentum
|
|
@@ -2206,7 +2206,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2206
2206
|
@change-selected=${t=>this.handleTimeChange(t,o.R5.AM_PM)}
|
|
2207
2207
|
>
|
|
2208
2208
|
</md-combobox>
|
|
2209
|
-
`}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}connectedCallback(){super.connectedCallback(),this.initializeTimeValues()}updated(t){super.updated(t),["value","locale","twentyFourHourFormat","showDefaultNowTime","timeSpecificity"].some(e=>t.has(e))&&this.initializeTimeValues()}initializeTimeValues(){if(this.showDefaultNowTime||this.value){const t=this.value||(0,
|
|
2209
|
+
`}get timePickerClassMap(){return{"twenty-four-hour-format":this.finalTwentyFourFormat}}connectedCallback(){super.connectedCallback(),this.initializeTimeValues()}updated(t){super.updated(t),["value","locale","twentyFourHourFormat","showDefaultNowTime","timeSpecificity"].some(e=>t.has(e))&&this.initializeTimeValues()}initializeTimeValues(){if(this.showDefaultNowTime||this.value){const t=this.value||(0,a.tB)().toISOTime({suppressMilliseconds:!0});t&&this.updateValue(t)}else{const t=c.DateTime.now().setLocale(this.locale),e=this.getLocaleTimeFormat(t);this.finalTwentyFourFormat=this.twentyFourHourFormat||e;const i=this.timeSpecificity===o.R5.MINUTE||this.timeSpecificity===o.R5.SECOND,s=this.timeSpecificity===o.R5.SECOND;this.timeValue={[o.R5.HOUR]:"",[o.R5.MINUTE]:i?"":"00",[o.R5.SECOND]:s?"":"00",[o.R5.AM_PM]:"AM"}}}updateValue(t){const e=t||this.value;if(!e)return;this.timeObject=c.DateTime.fromISO(e,{locale:this.locale});const i=this.getLocaleTimeFormat(this.timeObject);this.finalTwentyFourFormat=this.twentyFourHourFormat||i,this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.updateTimeValues()}dispatchTimeChangeEvent(){this.dispatchEvent(new CustomEvent("time-selection-change",{bubbles:!0,composed:!0,detail:{time:this.value,data:this.timeObject,isValid:this.isEntireTimeValid()}}))}handleTimeChange(t,e){var i,s,a;this.timeValue[e]=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.value,this.requestUpdate(),this.formatTimeUnit(e);const r=this.timeValue[e];if(this.twoDigitAutoTab&&this.tabNext&&(e!==o.R5.AM_PM&&2===r.length&&"0"!==r[0]||"00"===r)){t.preventDefault();const e=null==t?void 0:t.target,i=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelectorAll("md-input, md-combobox");if(i){const t=Array.prototype.findIndex.call(i,t=>null==e?void 0:e.isEqualNode(t)),o=(t+1)%i.length;if(t<i.length-1){const t=null===(a=i[o].shadowRoot)||void 0===a?void 0:a.querySelector("input");null==t||t.focus()}}}else e===o.R5.AM_PM&&this.updateTimeUnit(e);t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-change`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`,isValid:this.timeValidity[e]}}))}handleTimeKeyDown(t,e){var i;const s=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.srcEvent;if(!s)return void console.warn("srcEvent is undefined");const{key:a}=s;a===o.Uz.ArrowDown||a===o.Uz.ArrowUp?this.tabNext=!1:this.tabNext=!0,this.timeValidity[e]=!0,this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-keydown`,{bubbles:!0,composed:!0,detail:{srcEvent:t,value:`${this.timeValue[e]}`}}))}handleTimeBlur(t,e){"0"===this.timeValue[e]&&(this.timeValue[e]="00"),this.updateTimeUnit(e),this.requestUpdate(),t.stopPropagation(),this.dispatchEvent(new CustomEvent(`${e}-blur`,{bubbles:!0,composed:!0,detail:{srcEvent:t,time:this.value,isValid:this.timeValidity[e]}}))}static get styles(){return[n.A,u.A]}render(){return l.html`
|
|
2210
2210
|
<div class="md-timepicker ${(0,h.classMap)(this.timePickerClassMap)}">
|
|
2211
2211
|
<div class="time-inputs-wrapper">
|
|
2212
2212
|
${this.generateTimeBox(o.R5.HOUR)}
|
|
@@ -2215,16 +2215,16 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2215
2215
|
${this.finalTwentyFourFormat?l.nothing:this.generateAmPmComboBox()}
|
|
2216
2216
|
</div>
|
|
2217
2217
|
</div>
|
|
2218
|
-
`}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,s.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},6328(t,e,i){i.d(e,{j:()=>u}),i(2369);var o=i(7704),s=i(9609),
|
|
2218
|
+
`}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,s.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},6328(t,e,i){i.d(e,{j:()=>u}),i(2369);var o=i(7704),s=i(9609),a=i(4084),r=i(2927),n=i(8899),l=i(4955),d=i(3517),h=i(8687),p=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};const c="md-toggle-switch__accessible-description";var u;!function(t){let e=class extends((0,o.yC)(r.LitElement)){constructor(){super(...arguments),this.htmlId="",this.label="toggle",this.description=void 0,this.checked=!1,this.disabled=!1,this.small=!1,this.smaller=!1,this.alignLabel="right",this.autofocus=!1}handleClick(){this.disabled||(this.checked=!this.checked)}get toggleSwitchClassMap(){return{"md-toggle-switch--small":this.small,"md-toggle-switch--smaller":this.smaller}}switchTemplate(){return"left"===this.alignLabel?r.html`
|
|
2219
2219
|
<slot></slot>
|
|
2220
2220
|
<span
|
|
2221
2221
|
class="md-toggle-switch__label__container md-toggle-switch__label__container__left"
|
|
2222
2222
|
part="toggle-label"
|
|
2223
2223
|
></span>
|
|
2224
|
-
`:
|
|
2224
|
+
`:r.html`
|
|
2225
2225
|
<span class="md-toggle-switch__label__container" part="toggle-label"></span>
|
|
2226
2226
|
<slot></slot>
|
|
2227
|
-
`}render(){return
|
|
2227
|
+
`}render(){return r.html`
|
|
2228
2228
|
<div
|
|
2229
2229
|
class="md-input-container md-toggle-switch ${(0,l.classMap)(this.toggleSwitchClassMap)}"
|
|
2230
2230
|
@click=${this.handleClick}
|
|
@@ -2242,13 +2242,13 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2242
2242
|
aria-describedby=${(0,d.ifDefined)(this.description?c:void 0)}
|
|
2243
2243
|
/>
|
|
2244
2244
|
<md-label .htmlFor=${this.htmlId} class="md-toggle-switch__label"> ${this.switchTemplate()} </md-label>
|
|
2245
|
-
${this.description&&
|
|
2245
|
+
${this.description&&r.html`
|
|
2246
2246
|
<div id=${c} class="md-toggle-switch__accessible-description">
|
|
2247
2247
|
${this.description}
|
|
2248
2248
|
</div>
|
|
2249
2249
|
`}
|
|
2250
2250
|
</div>
|
|
2251
|
-
`}static get styles(){return[
|
|
2251
|
+
`}static get styles(){return[a.A,h.A]}};p([(0,n.property)({type:String})],e.prototype,"htmlId",void 0),p([(0,n.property)({type:String})],e.prototype,"label",void 0),p([(0,n.property)({type:String})],e.prototype,"description",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"checked",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,n.property)({type:Boolean})],e.prototype,"smaller",void 0),p([(0,n.property)({type:String})],e.prototype,"alignLabel",void 0),p([(0,n.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),e=p([(0,s.w)("md-toggle-switch")],e),t.ELEMENT=e}(u||(u={}))},9613(t,e,i){i.d(e,{m_:()=>o});var o,s=i(2900),a=i(7704),r=i(9609),n=i(2050),l=i(4084),d=i(2927),h=i(8899),p=i(4955),c=i(6343),u=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends((0,a.UM)((0,a.yC)(d.LitElement))){constructor(){super(...arguments),this.message="",this.placement="auto",this.disabled=!1,this.opened=!1,this.slotToTooltip=!1,this.slotContent=null,this._keyDownListener=t=>{this.handleKeyDown(t)},this._wheelListener=t=>{this.opened&&this.notifyTooltipDestroy()}}hasMessage(){return this.message&&this.message.trim().length>0}hasSlotContent(){return this.slotContent&&this.slotContent.length>0}get hasTooltipContent(){return this.hasMessage()||this.hasSlotContent()}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._keyDownListener),window.addEventListener("wheel",this._wheelListener,{passive:!0})}disconnectedCallback(){this.notifyTooltipDisconnected(),super.disconnectedCallback(),document.removeEventListener("keydown",this._keyDownListener),window.removeEventListener("wheel",this._wheelListener)}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),(0,n.sg)(()=>{this.slotToTooltip&&(this.disabled=this.reference&&!this.isContentTruncated(this.reference))},100)()}handleFocusIn(t){super.handleFocusIn&&super.handleFocusIn(t),this.notifyTooltipCreate()}handleFocusOut(t){super.handleFocusOut&&super.handleFocusOut(t),this.notifyTooltipDestroy()}openTooltip(){this.dispatchEvent(new CustomEvent("tooltip-create",{bubbles:!0,composed:!0,detail:Object.assign({placement:this.placement,reference:this.reference,popper:this.popper},!this.message&&{slotContent:this.slotContent})}))}notifyTooltipDisconnected(){document.dispatchEvent(new CustomEvent("tooltip-disconnected",{bubbles:!0,composed:!0,detail:{}}))}closeTooltip(){this.dispatchEvent(new CustomEvent("tooltip-destroy",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeMessage(){this.dispatchEvent(new CustomEvent("tooltip-message",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}changeSlotContent(t){this.dispatchEvent(new CustomEvent("tooltip-slot",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper,slotContent:t}}))}notifyTooltipCreate(){!this.disabled&&this.hasTooltipContent&&(this.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(t){t.code===s.Uz.Escape&&this.notifyTooltipDestroy()}handleSlotContentChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent&&this.changeSlotContent(t),this.slotContent=t)}}updated(t){super.updated(t),t.has("opened")&&(this.opened?this.openTooltip():this.closeTooltip()),t.has("message")&&this.changeMessage(),t.has("disabled")&&this.opened&&(this.opened=!1)}handleSlotChanged(t){const e=t.target;if(this.slotToTooltip&&e){const t=e.assignedNodes({flatten:!0}).map(t=>t.textContent).join(" ").trim();this.message=t,this.disabled=this.reference&&!this.isContentTruncated(this.reference)}}isContentTruncated(t){return t.scrollWidth>t.clientWidth}get tooltipClassMap(){return{"md-tooltip--disabled":this.disabled}}render(){return d.html`
|
|
2252
2252
|
<div class="md-tooltip ${(0,p.classMap)(this.tooltipClassMap)}">
|
|
2253
2253
|
<div class="md-tooltip__popper" role="tooltip" part="tooltip-popper">
|
|
2254
2254
|
<div id="md-tooltip__content" class="md-tooltip__content" part="tooltip-content">
|
|
@@ -2269,7 +2269,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2269
2269
|
<slot @slotchange=${this.handleSlotChanged}></slot>
|
|
2270
2270
|
</div>
|
|
2271
2271
|
</div>
|
|
2272
|
-
`}static get styles(){return[l.A,c.A]}};u([(0,h.property)({type:String})],e.prototype,"message",void 0),u([(0,h.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],e.prototype,"slotToTooltip",void 0),u([(0,h.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),u([(0,h.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=u([(0,
|
|
2272
|
+
`}static get styles(){return[l.A,c.A]}};u([(0,h.property)({type:String})],e.prototype,"message",void 0),u([(0,h.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],e.prototype,"slotToTooltip",void 0),u([(0,h.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),u([(0,h.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=u([(0,r.w)("md-tooltip")],e),t.ELEMENT=e}(o||(o={}))},2900(t,e,i){var o,s,a,r;i.d(e,{R5:()=>s,Uz:()=>o,iw:()=>r}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(o||(o={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(s||(s={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(a||(a={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(r||(r={}))},371(t,e,i){i.d(e,{nD:()=>o.n,As:()=>s.A,uo:()=>a.uo,Lj:()=>r.L,Fc:()=>l.F,ZT:()=>n.ZT,Fu:()=>mt,Y$:()=>d.Y$,eu:()=>h.e,uW:()=>p.uW,Ex:()=>u.E,Qp:()=>x.Q,$n:()=>S.$n,e2:()=>$.e,Zp:()=>L.Z,pI:()=>k.p,h$:()=>A.h,cM:()=>I.c,Sc:()=>M.S,$Q:()=>D.$,vu:()=>O.v,iU:()=>_.i,xw:()=>R.x,BY:()=>F,a3:()=>N.a,Xz:()=>c.X,YQ:()=>V.Y,lr:()=>q.l,$5:()=>K.$,XE:()=>W.X,j_:()=>Y.j,xx:()=>G.x,Ur:()=>U.U,K7:()=>H.K,sx:()=>X.s,T_:()=>Z.T,ms:()=>Q.m,I:()=>J.I,NG:()=>tt.N,Uz:()=>at,gQ:()=>rt.g,oH:()=>nt.o,lV:()=>bt.l,Yp:()=>dt,MJ:()=>ht,gE:()=>pt,IJ:()=>vt.I,$9:()=>yt.$,In:()=>f.In,pd:()=>ft.pd,bT:()=>gt.b,JU:()=>wt.J,N_:()=>Ct.N_,B8:()=>Lt.B,ck:()=>It.c,Eu:()=>$t,Pj:()=>kt,Rh:()=>Mt.R,A1:()=>Dt.A,DE:()=>Rt.W,Dr:()=>_t.D,W1:()=>Ot.W1,aF:()=>Pt.aF,vd:()=>T,dK:()=>Bt.d,LR:()=>zt.L,AM:()=>Ft.A,IE:()=>Ft.I,Cq:()=>jt.C,z2:()=>Nt.z,pO:()=>Vt.s,z6:()=>Ut.z,EA:()=>qt,Ap:()=>Wt.A,y$:()=>Yt.y,oz:()=>Zt.o,Kp:()=>Qt.K,XI:()=>Xt.X,v1:()=>Gt.v,tU:()=>Jt.t,L2:()=>te.L,Sx:()=>ee.Sx,ew:()=>ae.N_,AG:()=>ie.AG,jF:()=>oe.j,m_:()=>et.m_,k0:()=>ct,Ou:()=>se.O,IB:()=>ae.IB,vz:()=>ae.vz});var o=i(3701),s=i(4466),a=i(2160),r=i(9236),n=i(9144),l=i(5925),d=i(3764),h=i(2245),p=i(4470),c=i(9124),u=i(7901),m=i(7704),b=i(2927),v=i(8899),y=i(4955),g=i(3517),f=i(1821),w=i(4958);const C=b.css`:host{color:var(--badge-notification-primary-foreground-color);font-size:var(--font-size-body-small,.75rem);font-weight:var(--brand-font-weight-medium,500);line-height:var(--font-lineheight-body-small,1rem);font-family:var(--brand-font-medium);box-sizing:border-box;align-items:center;display:flex;height:fit-content;justify-content:center;width:fit-content}.md-notification-badge-overlay{outline:.0625rem solid var(--badge-notification-overlay-border-color)}.md-notification-badge-text{box-sizing:border-box;padding:0 .25rem;border-radius:6.25rem;min-width:1rem;display:flex;justify-content:center;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-icon{padding:2px;size:1rem;border-radius:50%;box-sizing:border-box}.md-notification-badge-icon__primary{background-color:var(--badge-notification-primary-background-color);color:var(--badge-notification-primary-foreground-color)}.md-notification-badge-icon__success{background-color:var(--badge-notification-success-background-color);color:var(--badge-notification-success-foreground-color)}.md-notification-badge-icon__warning{background-color:var(--badge-notification-warning-background-color);color:var(--badge-notification-warning-foreground-color)}.md-notification-badge-icon__error{background-color:var(--badge-notification-error-background-color);color:var(--badge-notification-error-foreground-color)}.md-notification-badge-icon__secondary{background-color:var(--badge-notification-secondary-background-color);color:var(--badge-notification-secondary-foreground-color)}@media(forced-colors:active){.md-notification-badge-dot,.md-notification-badge-icon,.md-notification-badge-text{outline:.125rem solid}}`;var E=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let T=class extends b.LitElement{constructor(){super(...arguments),this.variant=w.zY.VARIANT,this.maxCounter=w.zY.MAX_COUNTER,this.overlay=!1,this.ariaLabel=null}static get styles(){return[C]}getCounterText(t,e){return void 0===e||"number"!=typeof e||0===t?"":e>t?`${t}+`:t>w.zY.MAX_COUNTER_LIMIT||e>w.zY.MAX_COUNTER_LIMIT?`${w.zY.MAX_COUNTER_LIMIT}+`:e.toString()}getBadgeIcon(t,e){return b.html`
|
|
2273
2273
|
<md-icon
|
|
2274
2274
|
class="md-notification-badge-icon ${(0,y.classMap)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
|
|
2275
2275
|
iconSet="momentumDesign"
|
|
@@ -2282,7 +2282,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2282
2282
|
<div class="md-notification-badge-text ${(0,y.classMap)({"md-notification-badge-overlay":this.overlay})}">
|
|
2283
2283
|
${this.getCounterText(this.maxCounter,this.counter)}
|
|
2284
2284
|
</div>
|
|
2285
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(w.M_).includes(this.variant)&&(this.variant=w.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case w.ZE.ICON:return this.getBadgeIcon(t||"",i);case w.ZE.COUNTER:return this.getBadgeCounterText();case w.ZE.SUCCESS:return this.getBadgeIcon(w.UZ.SUCCESS_ICON_NAME,w.su.SUCCESS);case w.ZE.WARNING:return this.getBadgeIcon(w.UZ.WARNING_ICON_NAME,w.su.WARNING);case w.ZE.ERROR:return this.getBadgeIcon(w.UZ.ERROR_ICON_NAME,w.su.ERROR);case w.ZE.DOT:default:return this.type=w.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};E([(0,v.property)({type:String,reflect:!0})],T.prototype,"type",void 0),E([(0,v.property)({type:String,reflect:!0})],T.prototype,"variant",void 0),E([(0,v.property)({type:Number})],T.prototype,"counter",void 0),E([(0,v.property)({type:Number,attribute:"max-counter",reflect:!0})],T.prototype,"maxCounter",void 0),E([(0,v.property)({type:Boolean})],T.prototype,"overlay",void 0),E([(0,v.property)({type:String,attribute:"icon-name"})],T.prototype,"iconName",void 0),E([(0,v.property)({type:String,attribute:"aria-label"})],T.prototype,"ariaLabel",void 0),T=E([(0,m.wW)("md-notification-badge")],T);var x=i(3445),$=i(2890),S=i(5983),k=i(7224),A=i(7540),L=i(1499),I=i(5558),M=i(8381),D=i(4870),O=i(2583),R=i(7744),_=i(1869),P=i(4084),B=i(6579);const z=b.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var F,j=function(t,e,i,o){var s,
|
|
2285
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(w.M_).includes(this.variant)&&(this.variant=w.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case w.ZE.ICON:return this.getBadgeIcon(t||"",i);case w.ZE.COUNTER:return this.getBadgeCounterText();case w.ZE.SUCCESS:return this.getBadgeIcon(w.UZ.SUCCESS_ICON_NAME,w.su.SUCCESS);case w.ZE.WARNING:return this.getBadgeIcon(w.UZ.WARNING_ICON_NAME,w.su.WARNING);case w.ZE.ERROR:return this.getBadgeIcon(w.UZ.ERROR_ICON_NAME,w.su.ERROR);case w.ZE.DOT:default:return this.type=w.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};E([(0,v.property)({type:String,reflect:!0})],T.prototype,"type",void 0),E([(0,v.property)({type:String,reflect:!0})],T.prototype,"variant",void 0),E([(0,v.property)({type:Number})],T.prototype,"counter",void 0),E([(0,v.property)({type:Number,attribute:"max-counter",reflect:!0})],T.prototype,"maxCounter",void 0),E([(0,v.property)({type:Boolean})],T.prototype,"overlay",void 0),E([(0,v.property)({type:String,attribute:"icon-name"})],T.prototype,"iconName",void 0),E([(0,v.property)({type:String,attribute:"aria-label"})],T.prototype,"ariaLabel",void 0),T=E([(0,m.wW)("md-notification-badge")],T);var x=i(3445),$=i(2890),S=i(5983),k=i(7224),A=i(7540),L=i(1499),I=i(5558),M=i(8381),D=i(4870),O=i(2583),R=i(7744),_=i(1869),P=i(4084),B=i(6579);const z=b.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var F,j=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[P.A,z]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const t=this.slotNodes.find(t=>"CODE"===t.tagName);if(t){const e=t.textContent;e&&this.highlightBlock(e)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const t=this.slotUrl.find(t=>t);if(t){const e=t.textContent;e&&this.copyUrl(e)}}}highlightBlock(t){t&&(this.codeBlock.innerText=t),B.default.highlightElement(this.codeBlock)}copyUrl(t){this.codeUrl.innerText=t,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||this.selectTarget(this.codeUrl)}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(t){console.warn("Copy text failed"),this.copied=!1}}select(t){const e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e&&(e.removeAllRanges(),e.addRange(i))}selectTarget(t){this.select(t),this.copyText()}importLanguage(t){return e=this,i=void 0,s=function*(){try{const{default:e}=yield import(`highlight.js/lib/languages/${t}`);B.default.registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((o=void 0)||(o=Promise))(function(t,a){function r(t){try{l(s.next(t))}catch(t){a(t)}}function n(t){try{l(s.throw(t))}catch(t){a(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(r,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}getAllAcceptTypes(){const t=B.default.listLanguages();return t.length?t.map(t=>B.default.getLanguage(`${t}`).aliases).map(t=>t.map(t=>`.${t}`)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),t.has("acceptTypes")&&this.highlightBlock()}render(){return b.html`
|
|
2286
2286
|
<div class="md-code-editor" part="code-editor">
|
|
2287
2287
|
<div class="md-code-editor-header">
|
|
2288
2288
|
<div class="md-code-editor-name">
|
|
@@ -2315,7 +2315,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2315
2315
|
</pre>
|
|
2316
2316
|
</div>
|
|
2317
2317
|
</div>
|
|
2318
|
-
`}};j([(0,v.property)({type:String})],e.prototype,"copyLocalization",void 0),j([(0,v.property)({type:String})],e.prototype,"copiedLocalization",void 0),j([(0,v.property)({type:String})],e.prototype,"method",void 0),j([(0,v.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),j([(0,v.property)({type:String})],e.prototype,"url",void 0),j([(0,v.query)("input[type='file']")],e.prototype,"input",void 0),j([(0,v.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),j([(0,v.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),j([(0,v.state)()],e.prototype,"disableCopyButton",void 0),j([(0,v.state)()],e.prototype,"acceptTypes",void 0),j([(0,v.state)()],e.prototype,"copied",void 0),j([(0,v.queryAssignedNodes)({slot:"code-block"})],e.prototype,"slotNodes",void 0),j([(0,v.queryAssignedNodes)({slot:"code-url"})],e.prototype,"slotUrl",void 0),e=j([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(F||(F={}));var N=i(2273),V=i(6709),U=i(6243),H=i(9597),q=i(8663),K=i(837),W=i(3639),Y=i(8371),G=i(801),X=i(8306),Z=i(5730),Q=i(621),J=i(
|
|
2318
|
+
`}};j([(0,v.property)({type:String})],e.prototype,"copyLocalization",void 0),j([(0,v.property)({type:String})],e.prototype,"copiedLocalization",void 0),j([(0,v.property)({type:String})],e.prototype,"method",void 0),j([(0,v.property)({type:String,attribute:"accept-language"})],e.prototype,"acceptLanguage",void 0),j([(0,v.property)({type:String})],e.prototype,"url",void 0),j([(0,v.query)("input[type='file']")],e.prototype,"input",void 0),j([(0,v.query)(".md-code-editor-code-block")],e.prototype,"codeBlock",void 0),j([(0,v.query)(".md-code-editor-url")],e.prototype,"codeUrl",void 0),j([(0,v.state)()],e.prototype,"disableCopyButton",void 0),j([(0,v.state)()],e.prototype,"acceptTypes",void 0),j([(0,v.state)()],e.prototype,"copied",void 0),j([(0,v.queryAssignedNodes)({slot:"code-block"})],e.prototype,"slotNodes",void 0),j([(0,v.queryAssignedNodes)({slot:"code-url"})],e.prototype,"slotUrl",void 0),e=j([(0,m.wW)("md-code-editor")],e),t.ELEMENT=e}(F||(F={}));var N=i(2273),V=i(6709),U=i(6243),H=i(9597),q=i(8663),K=i(837),W=i(3639),Y=i(8371),G=i(801),X=i(8306),Z=i(5730),Q=i(621),J=i(7386),tt=i(23),et=i(9613),it=i(9609);const ot=b.css`:host{display:inline-flex;align-items:center;height:1.75rem;border-radius:1.5625rem;background-color:var(--floating-button-bar-bg-color);box-shadow:var(--md-elevation-1);padding:.25rem .5rem;gap:.5rem}.button{display:inline-flex;align-items:center;justify-content:center}.button.pill::part(button){font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.cancel{color:var(--floating-button-bar-secondary-color)}.label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}.label.primary{font-family:var(--brand-font-medium);color:var(--floating-button-bar-primary-color);flex:1;min-width:0;justify-content:center}.label.secondary{color:var(--floating-button-bar-secondary-color);padding-right:4px}.separator{width:1px;height:.75rem;background-color:var(--floating-button-bar-secondary-color)}md-tooltip::part(tooltip_reference){display:flex;align-items:center}`;var st=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let at=class extends b.LitElement{constructor(){super(...arguments),this.leadingLabel="",this.closeButtonAriaLabel="",this.showCloseButton=!0,this.actions=[]}static get styles(){return[ot]}onCancelButttonAction(){this.dispatchEvent(new CustomEvent("cancel-button-action",{composed:!0,bubbles:!0}))}get closeButtonTemplate(){return b.html`
|
|
2319
2319
|
<md-tooltip
|
|
2320
2320
|
message="${(0,g.ifDefined)(this.closeButtonAriaLabel)}"
|
|
2321
2321
|
?disabled=${!this.closeButtonAriaLabel}
|
|
@@ -2347,7 +2347,7 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2347
2347
|
`}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return b.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return b.html`
|
|
2348
2348
|
${this.showCloseButton?this.closeButtonTemplate:b.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
|
|
2349
2349
|
${this.actions.map(t=>this.getActionGroupTemplate(t))}
|
|
2350
|
-
`}};st([(0,v.property)({type:String})],
|
|
2350
|
+
`}};st([(0,v.property)({type:String})],at.prototype,"leadingLabel",void 0),st([(0,v.property)({type:String})],at.prototype,"closeButtonAriaLabel",void 0),st([(0,v.property)({type:Boolean})],at.prototype,"showCloseButton",void 0),st([(0,v.property)({type:Array})],at.prototype,"actions",void 0),at=st([(0,it.w)("md-floating-button-bar")],at);var rt=i(5958),nt=i(4262);class lt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class dt extends lt{constructor(t,e=[]){var i;super(),this.controls=t,this.arrayValidators=e,this.inArrayValidation=!1,this.childChanged=()=>{this.inArrayValidation||this.runArrayValidators(),this.emitChange()},this.arrayValidators=e;for(const t of this.controls)null===(i=t.onChange)||void 0===i||i.call(t,()=>{this.childChanged()}),this.childChanged()}at(t){return this.controls[t]}runArrayValidators(){if(this.arrayValidators.length){this.inArrayValidation=!0;try{for(const t of this.arrayValidators)t(this)}finally{this.inArrayValidation=!1}}}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>{this.childChanged()}),this.childChanged()}removeAt(t){this.controls.splice(t,1),this.childChanged()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.childChanged()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ht extends lt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.groupErrors=[],this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length&&0===this.groupErrors.length}get errors(){return[...this.touched?this.validationErrors:[],...this.groupErrors]}addGroupError(t){const e=this.groupErrors.filter(e=>e.type!==t.type);this.groupErrors=[...e,t],this.emitChange()}clearGroupErrorsByType(t){const e=this.groupErrors.filter(e=>e.type!==t);e.length!==this.groupErrors.length&&(this.groupErrors=e,this.emitChange())}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends lt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ct={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null,nonNegative:()=>t=>null==t?null:t<0?{type:"nonNegative"}:null},ut="increasingOnly",mt={strictIncreasingOnly:function(t){return e=>{const i=e.getControls();let o=null;for(const e of i)t(e).clearGroupErrorsByType(ut);for(const e of i){const i=t(e),s=i.value;if(null==s||Number.isNaN(s))break;if(null!=o&&Number(s)<=Number(o)){i.addGroupError({type:ut,count:o});break}o=s}}}};var bt=i(9147),vt=i(8637),yt=i(7906),gt=i(6436),ft=i(9189),wt=i(2369),Ct=i(5095),Et=i(2900),Tt=i(7154);const xt=b.css`:host{--list-item-border-radius:0;--list-item-expand-duration:400ms;--list-item-hover-bg-color:var(--md-button-secondary-hover-bg-color);--list-item-active-bg-color:var(--md-button-secondary-pressed-bg-color);--list-item-disabled-bg-color:none;--list-item-disabled-text-color:var(--md-textColor-disabled);--list-item-primary-label-color:var(--md-textColor-primary);--list-item-secondary-label-color:var(--md-textColor-secondary);--list-item-primary-label-font-size:14px;--list-item-secondary-label-font-size:12px;--list-item-bg-color:none;border-radius:var(--list-item-border-radius);background-color:var(--list-item-bg-color)}:host(:focus-visible){box-shadow:none!important}:host([variant=inset-rectangle]){--list-item-border-radius:0.5rem}:host([variant=inset-pill]){--list-item-border-radius:3.125rem}:host([disabled]){--list-item-primary-label-color:var(--list-item-disabled-text-color);--list-item-secondary-label-color:var(--list-item-disabled-text-color);--list-item-bg-color:var(--list-item-disabled-bg-color)}.header{border-radius:var(--list-item-border-radius);padding:.5rem;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.header:hover:not(:disabled){background-color:var(--list-item-hover-bg-color)}.header:active:not(:disabled){background-color:var(--list-item-active-bg-color)}:host(:focus-visible) .header{box-shadow:0 0 0 .125rem var(--list-focus-border-color)}:host::part(header-leading),:host::part(header-trailing){display:flex;align-items:center;gap:.5rem}:host::part(primary-label),:host::part(secondary-label),:host::part(tertiary-label){display:block;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host::part(primary-label){font-size:var(--list-item-primary-label-font-size);color:var(--list-item-primary-label-color)}:host::part(secondary-label),:host::part(tertiary-label){font-size:var(--list-item-secondary-label-font-size);color:var(--list-item-secondary-label-color)}.expand-icon{transition:transform var(--list-item-expand-duration)}.panel-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--list-item-expand-duration) ease-out}.expandable-content{min-height:0;visibility:hidden;transform:translateY(-15px);margin:0 10px;transition:all var(--list-item-expand-duration)}:host([expanded]) .panel-container{padding-top:0;grid-template-rows:1fr}:host([expanded]) .expandable-content{visibility:visible;transform:translateY(0);margin:10px}:host([expanded]) .expand-icon{transform:rotate(90deg)}:host{--md-list-v2-gap:0;--md-list-v2-orientation:column;padding:0;margin:0;display:flex;flex-direction:var(--md-list-v2-orientation);gap:var(--md-list-v2-gap)}:host([orientation=horizontal]){--md-list-v2-orientation:row}:host([gap=sm]){--md-list-v2-gap:0.25rem}:host([gap=md]){--md-list-v2-gap:0.5rem}:host([gap=lg]){--md-list-v2-gap:1rem}`;var $t,St=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return b.html`
|
|
2351
2351
|
<slot name="content">
|
|
2352
2352
|
<div class="header">
|
|
2353
2353
|
<div part="header-leading">
|
|
@@ -2398,4 +2398,4 @@ import"@lit-labs/virtualizer";import{default as t}from"dompurify";import{AsYouTy
|
|
|
2398
2398
|
@click=${this.stopEventPropagation}
|
|
2399
2399
|
@keyup=${this.stopEventPropagation}
|
|
2400
2400
|
@keydown=${this.stopEventPropagation}
|
|
2401
|
-
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,Tt.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===Et.Uz.ArrowRight||t===Et.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,Tt.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==Et.Uz.ArrowRight||this.expanded?t.key===Et.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return xt}};St([(0,v.property)({type:String,reflect:!0})],e.prototype,"label",void 0),St([(0,v.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),St([(0,v.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),St([(0,v.property)({type:Boolean})],e.prototype,"expandable",void 0),St([(0,v.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),St([(0,v.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),St([(0,v.property)({type:String})],e.prototype,"variant",void 0),St([(0,v.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),St([(0,v.query)(".header")],e.prototype,"header",void 0),e=St([(0,it.w)("md-list-item-v2")],e),t.ELEMENT=e}($t||($t={}));var kt,At=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return b.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof $t.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case Et.Uz.ArrowDown:return(e+1)%i;case Et.Uz.ArrowUp:return(e-1+i)%i;case Et.Uz.Home:return 0;case Et.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return xt}};At([(0,v.property)({type:String})],e.prototype,"gap",void 0),At([(0,v.property)({type:String})],e.prototype,"orientation",void 0),At([(0,v.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=At([(0,it.w)("md-list-v2")],e),t.ELEMENT=e}(kt||(kt={}));var Lt=i(6131),It=i(8552),Mt=i(1161),Dt=i(7030),Ot=i(708),Rt=i(4085),_t=i(5410),Pt=i(329),Bt=i(8751),zt=i(2455),Ft=i(405),jt=i(3477),Nt=i(2708),Vt=i(3949),Ut=i(8358);const Ht=b.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var qt,Kt=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,b.html`<slot></slot>`}static get styles(){return[Ht]}};Kt([(0,v.property)({type:String})],e.prototype,"width",void 0),Kt([(0,v.property)({type:String})],e.prototype,"height",void 0),Kt([(0,v.property)({reflect:!0})],e.prototype,"variant",void 0),Kt([(0,v.property)({reflect:!0})],e.prototype,"animation",void 0),e=Kt([(0,it.w)("md-skeleton")],e),t.ELEMENT=e}(qt||(qt={}));var Wt=i(3773),Yt=i(9773),Gt=i(7936),Xt=i(3273),Zt=i(120),Qt=i(6056),Jt=i(8543),te=i(1479),ee=i(9114),ie=i(2218),oe=i(6328),se=i(7253),re=i(3876)},3876(t,e,i){i.d(e,{IB:()=>a,N_:()=>s,vz:()=>r});var o=i(4980);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new s;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},7704(t,e,i){i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),r=i(5201),a=i(4781),n=i(608),l=i(9609)},2050(t,e,i){i.d(e,{QZ:()=>r,Qx:()=>a,XI:()=>l,dw:()=>d,qi:()=>n,sg:()=>s,ws:()=>o});const o=(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),r=e.toLowerCase();let a=0,n=s.indexOf(r,a);for(;n>-1;)a=n+i,o.push([n,a]),n=s.indexOf(r,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let r=0;return o.forEach(([e,i])=>{r!==e&&s.push({range:[e,i],matching:!1,text:t.slice(r,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i}),r!==t.length&&s.push({range:[r],matching:!1,text:t.slice(r)}),s};function s(t,e,i){let o;return function(...s){const r=this,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(r,s)},e),a&&t.apply(r,s)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function a(t,e){return e>=0&&e<t.length?t[e]:void 0}function n(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=n(t,e);if(i)return i}return null}function l(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=l(t,e);if(i)return i}return null}function d(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}},7154(t,e,i){i.d(e,{o:()=>r,q:()=>a});var o=i(2900);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function r(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function a(t){return s.includes(t)}},4098(t,e,i){var o,s;t.exports=(o={arrow:()=>n.arrow,autoUpdate:()=>n.autoUpdate,computePosition:()=>n.computePosition,flip:()=>n.flip,offset:()=>n.offset,shift:()=>n.shift,size:()=>n.size},s={},i.d(s,o),s)},4358(t,e,i){var o;t.exports=(o={},i.d(o,{}),o)},1660(t,e,i){var o;t.exports=(o={},i.d(o,{}),o)},4886(t,e,i){var o;t.exports=(o={},i.d(o,{}),o)},5109(t,e,i){var o,s;t.exports=(o={default:()=>p.default},s={},i.d(s,o),s)},6014(t,e,i){var o;t.exports=(o={},i.d(o,{}),o)},9500(t,e,i){var o,s;t.exports=(o={default:()=>u.default},s={},i.d(s,o),s)},3496(t,e,i){var o,s;t.exports=(o={default:()=>m.default},s={},i.d(s,o),s)},9644(t,e,i){var o,s;t.exports=(o={default:()=>b.default},s={},i.d(s,o),s)},9324(t,e,i){var o,s;t.exports=(o={default:()=>v.default},s={},i.d(s,o),s)},9520(t,e,i){var o,s;t.exports=(o={default:()=>y.default},s={},i.d(s,o),s)},6521(t,e,i){var o,s;t.exports=(o={default:()=>g.default},s={},i.d(s,o),s)},9709(t,e,i){var o,s;t.exports=(o={createPopper:()=>f.createPopper,defaultModifiers:()=>f.defaultModifiers},s={},i.d(s,o),s)},526(t,e,i){var o,s;t.exports=(o={customArray:()=>w.customArray},s={},i.d(s,o),s)},457(t,e,i){var o,s;t.exports=(o={findFlagUrlByIso2Code:()=>C.findFlagUrlByIso2Code},s={},i.d(s,o),s)},6579(t,e,i){var o,s;t.exports=(o={default:()=>E.default},s={},i.d(s,o),s)},2927(t,e,i){var o,s;t.exports=(o={LitElement:()=>T.LitElement,css:()=>T.css,html:()=>T.html,nothing:()=>T.nothing},s={},i.d(s,o),s)},8899(t,e,i){var o,s;t.exports=(o={property:()=>x.property,query:()=>x.query,queryAll:()=>x.queryAll,queryAssignedNodes:()=>x.queryAssignedNodes,state:()=>x.state},s={},i.d(s,o),s)},4955(t,e,i){var o,s;t.exports=(o={classMap:()=>$.classMap},s={},i.d(s,o),s)},3517(t,e,i){var o,s;t.exports=(o={ifDefined:()=>S.ifDefined},s={},i.d(s,o),s)},2577(t,e,i){var o,s;t.exports=(o={repeat:()=>k.repeat},s={},i.d(s,o),s)},1156(t,e,i){var o,s;t.exports=(o={styleMap:()=>A.styleMap},s={},i.d(s,o),s)},7638(t,e,i){var o,s;t.exports=(o={unsafeHTML:()=>L.unsafeHTML},s={},i.d(s,o),s)},1666(t,e,i){var o,s;t.exports=(o={until:()=>I.until},s={},i.d(s,o),s)},9642(t,e,i){var o,s;t.exports=(o={DateTime:()=>M.DateTime,Duration:()=>M.Duration},s={},i.d(s,o),s)},4980(t,e,i){var o,s;t.exports=(o={action:()=>D.action,computed:()=>D.computed,makeObservable:()=>D.makeObservable,observable:()=>D.observable},s={},i.d(s,o),s)},6897(t,e,i){var o,s;t.exports=(o={default:()=>O.default},s={},i.d(s,o),s)},6933(t,e,i){var o,s;t.exports=(o={default:()=>R.default},s={},i.d(s,o),s)}},z={};function F(t){var e=z[t];if(void 0!==e)return e.exports;var i=z[t]={exports:{}};return B[t].call(i.exports,i,i.exports,F),i.exports}F.m=B,_=[],F.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<_.length;l++){for(var[e,i,o]=_[l],r=!0,a=0;a<e.length;a++)(!1&o||s>=o)&&Object.keys(F.O).every(t=>F.O[t](e[a]))?e.splice(a--,1):(r=!1,o<s&&(s=o));if(r){_.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}o=o||0;for(var l=_.length;l>0&&_[l-1][2]>o;l--)_[l]=_[l-1];_[l]=[e,i,o]},F.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return F.d(e,{a:e}),e},F.d=(t,e)=>{for(var i in e)F.o(e,i)&&!F.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},F.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),F.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{F as __webpack_require__};P={502:0,519:0,555:0,561:0,708:0,1037:0,1266:0,1459:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2169:0,2330:0,2434:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3413:0,3539:0,3747:0,3876:0,3938:0,3943:0,4139:0,4259:0,4431:0,4545:0,4908:0,4928:0,4958:0,4971:0,5156:0,5310:0,5323:0,5369:0,5517:0,5757:0,5983:0,6029:0,6060:0,6085:0,6132:0,6220:0,6433:0,6494:0,6587:0,6724:0,6753:0,6812:0,6834:0,6920:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7927:0,8111:0,8115:0,8138:0,8180:0,8220:0,8334:0,8442:0,8510:0,8654:0,9189:0,9237:0,9613:0,9669:0},F.C=t=>{var e,i,{__webpack_esm_ids__:o,__webpack_esm_modules__:s,__webpack_esm_runtime__:r}=t,a=0;for(e in s)F.o(s,e)&&(F.m[e]=s[e]);for(r&&r(F);a<o.length;a++)i=o[a],F.o(P,i)&&P[i]&&P[i][0](),P[o[a]]=0;F.O()},F.O.j=t=>0===P[t];import*as j from"./7103.js";F.C(j);import*as N from"./9609.js";F.C(N);import*as V from"./4084.js";F.C(V);import*as U from"./3305.js";F.C(U);import*as H from"./4739.js";F.C(H);import*as q from"./9488.js";F.C(q);import*as K from"./2364.js";F.C(K);import*as W from"./8441.js";F.C(W);import*as Y from"./2797.js";F.C(Y);import*as G from"./4700.js";F.C(G);import*as X from"./3970.js";F.C(X);import*as Z from"./9336.js";F.C(Z);import*as Q from"./9146.js";F.C(Q);import*as J from"./6343.js";F.C(J);import*as tt from"./3842.js";F.C(tt);import*as et from"./7162.js";F.C(et);import*as it from"./7582.js";F.C(it);import*as ot from"./6325.js";F.C(ot);import*as st from"./4449.js";F.C(st);import*as rt from"./1392.js";F.C(rt);import*as at from"./2492.js";F.C(at);import*as nt from"./4047.js";F.C(nt);import*as lt from"./1618.js";F.C(lt);import*as dt from"./3331.js";F.C(dt);import*as ht from"./3272.js";F.C(ht);import*as pt from"./740.js";F.C(pt);import*as ct from"./93.js";F.C(ct);import*as ut from"./3543.js";F.C(ut);import*as mt from"./878.js";F.C(mt);import*as bt from"./7231.js";F.C(bt);import*as vt from"./5846.js";F.C(vt);import*as yt from"./742.js";F.C(yt);import*as gt from"./4973.js";F.C(gt);import*as ft from"./476.js";F.C(ft);import*as wt from"./6631.js";F.C(wt);import*as Ct from"./8373.js";F.C(Ct);import*as Et from"./7262.js";F.C(Et);import*as Tt from"./6816.js";F.C(Tt);import*as xt from"./3051.js";F.C(xt);import*as $t from"./9431.js";F.C($t);import*as St from"./6573.js";F.C(St);import*as kt from"./2273.js";F.C(kt);import*as At from"./405.js";F.C(At);import*as Lt from"./8663.js";F.C(Lt);import*as It from"./9558.js";F.C(It);import*as Mt from"./2245.js";F.C(Mt);import*as Dt from"./861.js";F.C(Dt);import*as Ot from"./5958.js";F.C(Ot);import*as Rt from"./837.js";F.C(Rt);import*as _t from"./5057.js";F.C(_t);import*as Pt from"./6005.js";F.C(Pt);import*as Bt from"./8687.js";F.C(Bt);import*as zt from"./8881.js";F.C(zt);import*as Ft from"./6131.js";F.C(Ft);import*as jt from"./6020.js";F.C(jt);import*as Nt from"./6709.js";F.C(Nt);import*as Vt from"./7901.js";F.C(Vt);import*as Ut from"./1816.js";F.C(Ut);import*as Ht from"./887.js";F.C(Ht);import*as qt from"./2708.js";F.C(qt);import*as Kt from"./4839.js";F.C(Kt);import*as Wt from"./5410.js";F.C(Wt);import*as Yt from"./1161.js";F.C(Yt);import*as Gt from"./226.js";F.C(Gt);import*as Xt from"./23.js";F.C(Xt);import*as Zt from"./4750.js";F.C(Zt);import*as Qt from"./2154.js";F.C(Qt);import*as Jt from"./9404.js";F.C(Jt);import*as te from"./2297.js";F.C(te);import*as ee from"./7155.js";F.C(ee);import*as ie from"./8552.js";F.C(ie);import*as oe from"./3477.js";F.C(oe);import*as se from"./2670.js";F.C(se);import*as re from"./513.js";F.C(re);import*as ae from"./5525.js";F.C(ae);import*as ne from"./752.js";F.C(ne);import*as le from"./3182.js";F.C(le);import*as de from"./9940.js";F.C(de);import*as he from"./4242.js";F.C(he);import*as pe from"./1928.js";F.C(pe);import*as ce from"./9956.js";F.C(ce);import*as ue from"./2927.js";F.C(ue);import*as me from"./3013.js";F.C(me);import*as be from"./9316.js";F.C(be);import*as ve from"./6429.js";F.C(ve);import*as ye from"./7911.js";F.C(ye);import*as ge from"./2991.js";F.C(ge);import*as fe from"./9485.js";F.C(fe);import*as we from"./6843.js";F.C(we);import*as Ce from"./3241.js";F.C(Ce);var Ee=F.O(void 0,[7103,9609,4084,3305,4739,9488,2364,8441,2797,4700,3970,9336,9146,6343,3842,7162,7582,6325,4449,1392,2492,4047,1618,3331,3272,740,93,3543,878,7231,5846,742,4973,476,6631,8373,7262,6816,3051,9431,6573,2273,405,8663,9558,2245,861,5958,837,5057,6005,8687,8881,6131,6020,6709,7901,1816,887,2708,4839,5410,1161,226,23,4750,2154,9404,2297,7155,8552,3477,2670,513,5525,752,3182,9940,4242,1928,9956,2927,3013,9316,6429,7911,2991,9485,6843,3241],()=>F(371));const Te=(Ee=F.O(Ee)).nD,xe=Ee.As,$e=Ee.uo,Se=Ee.Lj,ke=Ee.Fc,Ae=Ee.ZT,Le=Ee.Fu,Ie=Ee.Y$,Me=Ee.eu,De=Ee.uW,Oe=Ee.Ex,Re=Ee.Qp,_e=Ee.$n,Pe=Ee.e2,Be=Ee.Zp,ze=Ee.pI,Fe=Ee.h$,je=Ee.cM,Ne=Ee.Sc,Ve=Ee.$Q,Ue=Ee.vu,He=Ee.iU,qe=Ee.xw,Ke=Ee.BY,We=Ee.a3,Ye=Ee.Xz,Ge=Ee.YQ,Xe=Ee.lr,Ze=Ee.$5,Qe=Ee.XE,Je=Ee.j_,ti=Ee.xx,ei=Ee.Ur,ii=Ee.K7,oi=Ee.sx,si=Ee.T_,ri=Ee.ms,ai=Ee.I,ni=Ee.NG,li=Ee.Uz,di=Ee.gQ,hi=Ee.oH,pi=Ee.lV,ci=Ee.Yp,ui=Ee.MJ,mi=Ee.gE,bi=Ee.IJ,vi=Ee.$9,yi=Ee.In,gi=Ee.pd,fi=Ee.bT,wi=Ee.JU,Ci=Ee.N_,Ei=Ee.B8,Ti=Ee.ck,xi=Ee.Eu,$i=Ee.Pj,Si=Ee.Rh,ki=Ee.A1,Ai=Ee.DE,Li=Ee.Dr,Ii=Ee.W1,Mi=Ee.aF,Di=Ee.vd,Oi=Ee.dK,Ri=Ee.LR,_i=Ee.AM,Pi=Ee.IE,Bi=Ee.Cq,zi=Ee.z2,Fi=Ee.pO,ji=Ee.z6,Ni=Ee.EA,Vi=Ee.Ap,Ui=Ee.y$,Hi=Ee.oz,qi=Ee.Kp,Ki=Ee.XI,Wi=Ee.v1,Yi=Ee.tU,Gi=Ee.L2,Xi=Ee.Sx,Zi=Ee.ew,Qi=Ee.AG,Ji=Ee.jF,to=Ee.m_,eo=Ee.k0,io=Ee.Ou,oo=Ee.IB,so=Ee.vz;export{Te as Accordion,xe as AccordionItem,$e as ActivityButton,Se as AdvanceList,ke as Alert,Ae as AlertBanner,Le as ArrayValidators,Ie as AudioPlayer,Me as Avatar,De as AvatarType,Oe as Badge,Re as Breadcrumb,_e as Button,Pe as ButtonGroup,Be as Card,ze as CardAi,Fe as CardV2,je as ChatMessage,Ne as Checkbox,Ve as CheckboxGroup,Ue as Chip,He as Coachmark,qe as CoachmarkPopover,Ke as CodeEditor,We as ComboBox,Ye as CompositeAvatar,Ge as CountryCodePicker,Xe as DatePicker,Ze as DatePickerCalendar,Qe as DatePickerDay,Je as DatePickerMonth,ti as DatePickerWeek,ei as DateRangePicker,ii as DateTimePicker,oi as Draggable,si as DraggableItem,ri as Dropdown,ai as EditableTextfield,ni as Favorite,li as FloatingButtonBar,di as FloatingMinimizedModal,hi as FloatingModal,pi as Form,ci as FormArray,ui as FormControl,mi as FormGroup,bi as Grabber,vi as HelpText,yi as Icon,gi as Input,fi as InputFile,wi as Label,Ci as Link,Ei as List,Ti as ListItem,xi as ListItemV2,$i as ListV2,Si as Loading,ki as MeetingAlert,Ai as Menu,Li as MenuItem,Ii as MenuOverlay,Mi as Modal,Di as NotificationBadge,Oi as Pagination,Ri as PhoneInput,_i as Popover,Pi as PopoverController,Bi as Presence,zi as ProgressBar,Fi as Radio,ji as RadioGroup,Ni as Skeleton,Vi as Slider,Ui as Spinner,Hi as Tab,qi as TabPanel,Ki as Table,Wi as TableAdvanced,Yi as Tabs,Gi as TaskItem,Xi as Theme,Zi as ThemeManager,Qi as TimePicker,Ji as ToggleSwitch,to as Tooltip,eo as Validators,io as iconUrlManager,oo as registerThemeManagerGlobally,so as themeManager};
|
|
2401
|
+
></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,Tt.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===Et.Uz.ArrowRight||t===Et.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,Tt.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==Et.Uz.ArrowRight||this.expanded?t.key===Et.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return xt}};St([(0,v.property)({type:String,reflect:!0})],e.prototype,"label",void 0),St([(0,v.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),St([(0,v.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),St([(0,v.property)({type:Boolean})],e.prototype,"expandable",void 0),St([(0,v.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),St([(0,v.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),St([(0,v.property)({type:String})],e.prototype,"variant",void 0),St([(0,v.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),St([(0,v.query)(".header")],e.prototype,"header",void 0),e=St([(0,it.w)("md-list-item-v2")],e),t.ELEMENT=e}($t||($t={}));var kt,At=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return b.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof $t.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case Et.Uz.ArrowDown:return(e+1)%i;case Et.Uz.ArrowUp:return(e-1+i)%i;case Et.Uz.Home:return 0;case Et.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return xt}};At([(0,v.property)({type:String})],e.prototype,"gap",void 0),At([(0,v.property)({type:String})],e.prototype,"orientation",void 0),At([(0,v.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=At([(0,it.w)("md-list-v2")],e),t.ELEMENT=e}(kt||(kt={}));var Lt=i(6131),It=i(8552),Mt=i(1161),Dt=i(7030),Ot=i(708),Rt=i(4085),_t=i(5410),Pt=i(329),Bt=i(8751),zt=i(5566),Ft=i(405),jt=i(3477),Nt=i(2708),Vt=i(3949),Ut=i(8358);const Ht=b.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var qt,Kt=function(t,e,i,o){var s,a=arguments.length,r=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(r=(a<3?s(r):a>3?s(e,i,r):s(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};!function(t){let e=class extends b.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,b.html`<slot></slot>`}static get styles(){return[Ht]}};Kt([(0,v.property)({type:String})],e.prototype,"width",void 0),Kt([(0,v.property)({type:String})],e.prototype,"height",void 0),Kt([(0,v.property)({reflect:!0})],e.prototype,"variant",void 0),Kt([(0,v.property)({reflect:!0})],e.prototype,"animation",void 0),e=Kt([(0,it.w)("md-skeleton")],e),t.ELEMENT=e}(qt||(qt={}));var Wt=i(3773),Yt=i(9773),Gt=i(7936),Xt=i(3273),Zt=i(120),Qt=i(6056),Jt=i(8543),te=i(1479),ee=i(1853),ie=i(2218),oe=i(6328),se=i(7253),ae=i(3876)},3876(t,e,i){i.d(e,{IB:()=>r,N_:()=>s,vz:()=>a});var o=i(4980);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const a=new s;function r(t="MomentumUIThemeManager",e=a){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},7704(t,e,i){i.d(e,{Io:()=>r.I,TS:()=>n.T,UM:()=>a.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),a=i(5201),r=i(4781),n=i(608),l=i(9609)},2050(t,e,i){i.d(e,{QZ:()=>a,Qx:()=>r,XI:()=>l,dw:()=>d,qi:()=>n,sg:()=>s,ws:()=>o});const o=(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),a=e.toLowerCase();let r=0,n=s.indexOf(a,r);for(;n>-1;)r=n+i,o.push([n,r]),n=s.indexOf(a,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let a=0;return o.forEach(([e,i])=>{a!==e&&s.push({range:[e,i],matching:!1,text:t.slice(a,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),a=i}),a!==t.length&&s.push({range:[a],matching:!1,text:t.slice(a)}),s};function s(t,e,i){let o;return function(...s){const a=this,r=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(a,s)},e),r&&t.apply(a,s)}}function a(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function r(t,e){return e>=0&&e<t.length?t[e]:void 0}function n(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=n(t,e);if(i)return i}return null}function l(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=l(t,e);if(i)return i}return null}function d(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}},7154(t,e,i){i.d(e,{o:()=>a,q:()=>r});var o=i(2900);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function a(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function r(t){return s.includes(t)}},9642(e,i,o){var s,a;e.exports=(s={DateTime:()=>t.DateTime,Duration:()=>t.Duration},a={},o.d(a,s),a)}},s={};function a(t){var e=s[t];if(void 0!==e)return e.exports;var i=s[t]={exports:{}};return o[t].call(i.exports,i,i.exports,a),i.exports}a.m=o,e=[],a.O=(t,i,o,s)=>{if(!i){var r=1/0;for(h=0;h<e.length;h++){for(var[i,o,s]=e[h],n=!0,l=0;l<i.length;l++)(!1&s||r>=s)&&Object.keys(a.O).every(t=>a.O[t](i[l]))?i.splice(l--,1):(n=!1,s<r&&(r=s));if(n){e.splice(h--,1);var d=o();void 0!==d&&(t=d)}}return t}s=s||0;for(var h=e.length;h>0&&e[h-1][2]>s;h--)e[h]=e[h-1];e[h]=[i,o,s]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{a as __webpack_require__};i={519:0,561:0,708:0,1037:0,1521:0,1682:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2330:0,2434:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3539:0,3747:0,3876:0,3938:0,3943:0,4139:0,4259:0,4431:0,4908:0,4958:0,4971:0,5156:0,5310:0,5323:0,5757:0,5983:0,6029:0,6085:0,6132:0,6220:0,6433:0,6587:0,6724:0,6812:0,6834:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7927:0,8138:0,8180:0,8220:0,8334:0,8654:0,9189:0,9613:0,9642:0,9669:0},a.C=t=>{var e,o,{__webpack_esm_ids__:s,__webpack_esm_modules__:r,__webpack_esm_runtime__:n}=t,l=0;for(e in r)a.o(r,e)&&(a.m[e]=r[e]);for(n&&n(a);l<s.length;l++)o=s[l],a.o(i,o)&&i[o]&&i[o][0](),i[s[l]]=0;a.O()},a.O.j=t=>0===i[t];import*as r from"./7103.js";a.C(r);import*as n from"./9609.js";a.C(n);import*as l from"./4084.js";a.C(l);import*as d from"./4955.js";a.C(d);import*as h from"./3517.js";a.C(h);import*as p from"./1156.js";a.C(p);import*as c from"./3305.js";a.C(c);import*as u from"./4739.js";a.C(u);import*as m from"./7755.js";a.C(m);import*as b from"./2364.js";a.C(b);import*as v from"./5308.js";a.C(v);import*as y from"./2577.js";a.C(y);import*as g from"./8441.js";a.C(g);import*as f from"./2797.js";a.C(f);import*as w from"./4700.js";a.C(w);import*as C from"./3970.js";a.C(C);import*as E from"./9336.js";a.C(E);import*as T from"./6525.js";a.C(T);import*as x from"./6343.js";a.C(x);import*as $ from"./3842.js";a.C($);import*as S from"./7162.js";a.C(S);import*as k from"./7582.js";a.C(k);import*as A from"./7119.js";a.C(A);import*as L from"./6325.js";a.C(L);import*as I from"./4449.js";a.C(I);import*as M from"./1392.js";a.C(M);import*as D from"./2599.js";a.C(D);import*as O from"./477.js";a.C(O);import*as R from"./4047.js";a.C(R);import*as _ from"./3365.js";a.C(_);import*as P from"./3331.js";a.C(P);import*as B from"./3272.js";a.C(B);import*as z from"./740.js";a.C(z);import*as F from"./93.js";a.C(F);import*as j from"./3543.js";a.C(j);import*as N from"./878.js";a.C(N);import*as V from"./7231.js";a.C(V);import*as U from"./5846.js";a.C(U);import*as H from"./742.js";a.C(H);import*as q from"./4973.js";a.C(q);import*as K from"./476.js";a.C(K);import*as W from"./6631.js";a.C(W);import*as Y from"./2458.js";a.C(Y);import*as G from"./3648.js";a.C(G);import*as X from"./6816.js";a.C(X);import*as Z from"./5432.js";a.C(Z);import*as Q from"./9431.js";a.C(Q);import*as J from"./6933.js";a.C(J);import*as tt from"./6897.js";a.C(tt);import*as et from"./7638.js";a.C(et);import*as it from"./8235.js";a.C(it);import*as ot from"./2273.js";a.C(ot);import*as st from"./405.js";a.C(st);import*as at from"./8663.js";a.C(at);import*as rt from"./9558.js";a.C(rt);import*as nt from"./2245.js";a.C(nt);import*as lt from"./861.js";a.C(lt);import*as dt from"./5958.js";a.C(dt);import*as ht from"./837.js";a.C(ht);import*as pt from"./5057.js";a.C(pt);import*as ct from"./6005.js";a.C(ct);import*as ut from"./8687.js";a.C(ut);import*as mt from"./3155.js";a.C(mt);import*as bt from"./6131.js";a.C(bt);import*as vt from"./6020.js";a.C(vt);import*as yt from"./6709.js";a.C(yt);import*as gt from"./7901.js";a.C(gt);import*as ft from"./1816.js";a.C(ft);import*as wt from"./887.js";a.C(wt);import*as Ct from"./2708.js";a.C(Ct);import*as Et from"./4839.js";a.C(Et);import*as Tt from"./5410.js";a.C(Tt);import*as xt from"./1161.js";a.C(xt);import*as $t from"./226.js";a.C($t);import*as St from"./23.js";a.C(St);import*as kt from"./4750.js";a.C(kt);import*as At from"./2154.js";a.C(At);import*as Lt from"./9404.js";a.C(Lt);import*as It from"./2297.js";a.C(It);import*as Mt from"./7155.js";a.C(Mt);import*as Dt from"./8552.js";a.C(Dt);import*as Ot from"./3477.js";a.C(Ot);import*as Rt from"./2670.js";a.C(Rt);import*as _t from"./513.js";a.C(_t);import*as Pt from"./5525.js";a.C(Pt);import*as Bt from"./752.js";a.C(Bt);import*as zt from"./3182.js";a.C(zt);import*as Ft from"./9940.js";a.C(Ft);import*as jt from"./4242.js";a.C(jt);import*as Nt from"./1928.js";a.C(Nt);import*as Vt from"./4060.js";a.C(Vt);import*as Ut from"./2451.js";a.C(Ut);import*as Ht from"./1982.js";a.C(Ht);import*as qt from"./9316.js";a.C(qt);import*as Kt from"./7838.js";a.C(Kt);import*as Wt from"./7911.js";a.C(Wt);import*as Yt from"./2991.js";a.C(Yt);import*as Gt from"./9485.js";a.C(Gt);import*as Xt from"./6843.js";a.C(Xt);import*as Zt from"./3051.js";a.C(Zt);var Qt=a.O(void 0,[7103,9609,4084,4955,3517,1156,3305,4739,7755,2364,5308,2577,8441,2797,4700,3970,9336,6525,6343,3842,7162,7582,7119,6325,4449,1392,2599,477,4047,3365,3331,3272,740,93,3543,878,7231,5846,742,4973,476,6631,2458,3648,6816,5432,9431,6933,6897,7638,8235,2273,405,8663,9558,2245,861,5958,837,5057,6005,8687,3155,6131,6020,6709,7901,1816,887,2708,4839,5410,1161,226,23,4750,2154,9404,2297,7155,8552,3477,2670,513,5525,752,3182,9940,4242,1928,4060,2451,1982,9316,7838,7911,2991,9485,6843,3051],()=>a(371));const Jt=(Qt=a.O(Qt)).nD,te=Qt.As,ee=Qt.uo,ie=Qt.Lj,oe=Qt.Fc,se=Qt.ZT,ae=Qt.Fu,re=Qt.Y$,ne=Qt.eu,le=Qt.uW,de=Qt.Ex,he=Qt.Qp,pe=Qt.$n,ce=Qt.e2,ue=Qt.Zp,me=Qt.pI,be=Qt.h$,ve=Qt.cM,ye=Qt.Sc,ge=Qt.$Q,fe=Qt.vu,we=Qt.iU,Ce=Qt.xw,Ee=Qt.BY,Te=Qt.a3,xe=Qt.Xz,$e=Qt.YQ,Se=Qt.lr,ke=Qt.$5,Ae=Qt.XE,Le=Qt.j_,Ie=Qt.xx,Me=Qt.Ur,De=Qt.K7,Oe=Qt.sx,Re=Qt.T_,_e=Qt.ms,Pe=Qt.I,Be=Qt.NG,ze=Qt.Uz,Fe=Qt.gQ,je=Qt.oH,Ne=Qt.lV,Ve=Qt.Yp,Ue=Qt.MJ,He=Qt.gE,qe=Qt.IJ,Ke=Qt.$9,We=Qt.In,Ye=Qt.pd,Ge=Qt.bT,Xe=Qt.JU,Ze=Qt.N_,Qe=Qt.B8,Je=Qt.ck,ti=Qt.Eu,ei=Qt.Pj,ii=Qt.Rh,oi=Qt.A1,si=Qt.DE,ai=Qt.Dr,ri=Qt.W1,ni=Qt.aF,li=Qt.vd,di=Qt.dK,hi=Qt.LR,pi=Qt.AM,ci=Qt.IE,ui=Qt.Cq,mi=Qt.z2,bi=Qt.pO,vi=Qt.z6,yi=Qt.EA,gi=Qt.Ap,fi=Qt.y$,wi=Qt.oz,Ci=Qt.Kp,Ei=Qt.XI,Ti=Qt.v1,xi=Qt.tU,$i=Qt.L2,Si=Qt.Sx,ki=Qt.ew,Ai=Qt.AG,Li=Qt.jF,Ii=Qt.m_,Mi=Qt.k0,Di=Qt.Ou,Oi=Qt.IB,Ri=Qt.vz;export{Jt as Accordion,te as AccordionItem,ee as ActivityButton,ie as AdvanceList,oe as Alert,se as AlertBanner,ae as ArrayValidators,re as AudioPlayer,ne as Avatar,le as AvatarType,de as Badge,he as Breadcrumb,pe as Button,ce as ButtonGroup,ue as Card,me as CardAi,be as CardV2,ve as ChatMessage,ye as Checkbox,ge as CheckboxGroup,fe as Chip,we as Coachmark,Ce as CoachmarkPopover,Ee as CodeEditor,Te as ComboBox,xe as CompositeAvatar,$e as CountryCodePicker,Se as DatePicker,ke as DatePickerCalendar,Ae as DatePickerDay,Le as DatePickerMonth,Ie as DatePickerWeek,Me as DateRangePicker,De as DateTimePicker,Oe as Draggable,Re as DraggableItem,_e as Dropdown,Pe as EditableTextfield,Be as Favorite,ze as FloatingButtonBar,Fe as FloatingMinimizedModal,je as FloatingModal,Ne as Form,Ve as FormArray,Ue as FormControl,He as FormGroup,qe as Grabber,Ke as HelpText,We as Icon,Ye as Input,Ge as InputFile,Xe as Label,Ze as Link,Qe as List,Je as ListItem,ti as ListItemV2,ei as ListV2,ii as Loading,oi as MeetingAlert,si as Menu,ai as MenuItem,ri as MenuOverlay,ni as Modal,li as NotificationBadge,di as Pagination,hi as PhoneInput,pi as Popover,ci as PopoverController,ui as Presence,mi as ProgressBar,bi as Radio,vi as RadioGroup,yi as Skeleton,gi as Slider,fi as Spinner,wi as Tab,Ci as TabPanel,Ei as Table,Ti as TableAdvanced,xi as Tabs,$i as TaskItem,Si as Theme,ki as ThemeManager,Ai as TimePicker,Li as ToggleSwitch,Ii as Tooltip,Mi as Validators,Di as iconUrlManager,Oi as registerThemeManagerGlobally,Ri as themeManager};
|