@momentum-ui/web-components 2.23.45 → 2.23.47
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/1598.js +1 -1
- package/dist/6067.js +1 -1
- package/dist/8841.js +1 -1
- package/dist/8923.js +1 -1
- package/dist/9130.js +1 -1
- package/dist/comp/md-checkbox-entry.js +3 -2
- package/dist/comp/md-checkbox.js +1 -1
- package/dist/comp/md-presence-entry.js +1 -1
- package/dist/comp/md-radio-entry.js +7 -5
- package/dist/index-entry.js +11 -8
- package/dist/index.js +1 -1
- package/dist/types/components/checkbox/Checkbox.d.ts +6 -2
- package/dist/types/components/input/Input.d.ts +1 -1
- package/dist/types/components/presence/Presence.utils.d.ts +1 -1
- package/dist/types/components/radio/Radio.d.ts +3 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"));else if("function"==typeof define&&define.amd)define(["lit-element"],t);else{var i="object"==typeof exports?t(require("lit-element")):t(e["lit-element"]);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,e=>(()=>{"use strict";var
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/class-map","lit-html/directives/style-map","lit-html","lit-html/directives/if-defined","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],t);else{var i="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/class-map"),require("lit-html/directives/style-map"),require("lit-html"),require("lit-html/directives/if-defined"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):t(e["lit-element"],e["lit-html/directives/class-map"],e["lit-html/directives/style-map"],e["lit-html"],e["lit-html/directives/if-defined"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,(e,t,i,r,o,s,n,l)=>(()=>{"use strict";var c,a={3664:(e,t,i)=>{i.r(t),i.d(t,{Checkbox:()=>r}),i(61200);var r,o=i(90195),s=i(3001),n=i(31890),l=i(26272),c=i(41488),a=i(40333),d=i(18841),h=function(e,t,i,r){var o,s=arguments.length,n=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(s<3?o(n):s>3?o(t,i,n):o(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends((0,s.yC)(c.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(e){const t=this._checked;this._checked=e,this.indeterminate||this.setAttribute("aria-checked",`${e}`),this.requestUpdate("checked",t)}get indeterminate(){return this._indeterminate}set indeterminate(e){const t=this._indeterminate;this._indeterminate=e,this.setAttribute("aria-checked","mixed"),this.requestUpdate("indeterminate",t)}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",`${e}`),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}static get styles(){return[l.A,d.A]}toggleCheckbox(){this.checked=!this.checked}isCheckboxActive(){return this.disabled||this.indeterminate}handleClick(e){this.isCheckboxActive()?e.stopPropagation():(this.toggleCheckbox(),this.handleChange(e))}handleKeyDown(e){const{code:t}=e;t!==o.Uz.Space&&t!==o.Uz.Enter||(e.preventDefault(),this.isCheckboxActive()?e.stopPropagation():(this.toggleCheckbox(),this.handleChange(e)))}handleChange(e){this.dispatchEvent(new CustomEvent("checkbox-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,checked:this.checked}}))}firstUpdated(e){super.firstUpdated(e),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)}update(e){super.update(e),e.has("indeterminate")&&(this.checked=!1)}updated(e){super.updated(e),e.has("indeterminate")&&(this.input.indeterminate=this.indeterminate)}get checkboxIconName(){return this.checked?"check-bold":this.indeterminate?"minus-bold":null}checkboxIconTemplate(){const e=this.checkboxIconName;return e?c.html`<md-icon name="${e}" iconSet="momentumDesign" size="16"></md-icon>`:a.nothing}checkboxBoxTemplate(){return c.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return c.html`
|
|
2
2
|
<input
|
|
3
3
|
class="checkbox-input"
|
|
4
4
|
type="checkbox"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
aria-hidden="true"
|
|
10
10
|
/>
|
|
11
11
|
<label part="checkbox-label" class="checkbox-label">
|
|
12
|
+
${this.checkboxBoxTemplate()}
|
|
12
13
|
<slot></slot>
|
|
13
14
|
</label>
|
|
14
|
-
`}};
|
|
15
|
+
`}};h([(0,c.property)({type:Boolean,reflect:!0})],t.prototype,"autofocus",void 0),h([(0,c.property)({type:Boolean,reflect:!0})],t.prototype,"checked",null),h([(0,c.property)({type:Boolean,reflect:!0})],t.prototype,"indeterminate",null),h([(0,c.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),h([(0,c.property)({type:String})],t.prototype,"label",void 0),h([(0,c.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),h([(0,c.query)(".checkbox-input")],t.prototype,"input",void 0),t=h([(0,n.w)("md-checkbox")],t),e.ELEMENT=t}(r||(r={}))},8229:e=>{e.exports=i},23968:e=>{e.exports=t},32022:e=>{e.exports=s},40333:e=>{e.exports=r},41488:t=>{t.exports=e},60554:e=>{e.exports=n},85314:e=>{e.exports=l},97822:e=>{e.exports=o}},d={};function h(e){var t=d[e];if(void 0!==t)return t.exports;var i=d[e]={exports:{}};return a[e](i,i.exports,h),i.exports}h.m=a,c=[],h.O=(e,t,i,r)=>{if(!t){var o=1/0;for(a=0;a<c.length;a++){for(var[t,i,r]=c[a],s=!0,n=0;n<t.length;n++)(!1&r||o>=r)&&Object.keys(h.O).every(e=>h.O[e](t[n]))?t.splice(n--,1):(s=!1,r<o&&(o=r));if(s){c.splice(a--,1);var l=i();void 0!==l&&(e=l)}}return e}r=r||0;for(var a=c.length;a>0&&c[a-1][2]>r;a--)c[a]=c[a-1];c[a]=[t,i,r]},h.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return h.d(t,{a:t}),t},h.d=(e,t)=>{for(var i in t)h.o(t,i)&&!h.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),h.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7455:0};h.O.j=t=>0===e[t];var t=(t,i)=>{var r,o,[s,n,l]=i,c=0;if(s.some(t=>0!==e[t])){for(r in n)h.o(n,r)&&(h.m[r]=n[r]);if(l)var a=l(h)}for(t&&t(i);c<s.length;c++)o=s[c],h.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return h.O(a)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var u=h.O(void 0,[5757,1890,6272,6325,6283,9217,2176,6798,5830,1200,8889,8373,4624,300,591,768,195,3001,8841],()=>h(3664));return h.O(u)})());
|
package/dist/comp/md-checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../1890"),require("../6272"),require("../8889"),require("../8373"),require("../4624"),require("../300"),require("../591"),require("../768"),require("../195"),require("../3001"),require("../8841"),module.exports=require("../comp/md-checkbox-entry");
|
|
1
|
+
require("../5757"),require("../1890"),require("../6272"),require("../6325"),require("../6283"),require("../9217"),require("../2176"),require("../6798"),require("../5830"),require("../1200"),require("../8889"),require("../8373"),require("../4624"),require("../300"),require("../591"),require("../768"),require("../195"),require("../3001"),require("../8841"),module.exports=require("../comp/md-checkbox-entry");
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
>
|
|
10
10
|
</md-icon>
|
|
11
11
|
</div>
|
|
12
|
-
`}};p([(0,s.property)({type:String})],r.prototype,"name",void 0),p([(0,s.property)({type:Number})],r.prototype,"size",void 0),p([(0,s.property)({type:String})],r.prototype,"title",void 0),p([(0,s.property)({type:String})],r.prototype,"color",void 0),p([(0,s.property)({type:String,attribute:"presence-type"})],r.prototype,"presenceType",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"newMomentum",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"failurePresence",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"avatarLinked",void 0),r=p([(0,i.w)("md-presence")],r),e.ELEMENT=r}(a||(a={}))},23968:e=>{e.exports=r},32022:e=>{e.exports=n},38923:(e,r,t)=>{t.d(r,{E:()=>i});var a=t(31465);const i=(e,r,t=!1)=>{let i="",n="";if(r)i="warning-badge-filled",n="var(--avatar-presence-warning)";else{if(!e)return{presenceIcon:void 0,presenceColor:void 0};switch(e){case"active":i="active-presence-small-filled",n="var(--avatar-presence-active)";break;case"meeting":i=t?"camera-presence-filled":"camera-presence_14",n="var(--avatar-presence-unstable)";break;case"schedule":i=t?"meetings-presence-badge-filled":"meetings-presence_14",n="var(--avatar-presence-unstable)";break;case"call":i=t?"handset-filled":"handset-active_16",n="var(--avatar-presence-unstable)";break;case"dnd":i=t?"dnd-presence-badge-filled":"dnd-presence_14",n="var(--avatar-presence-dnd)";break;case"presenting":i=t?"share-screen-badge-filled":"content-share_14",n="var(--avatar-presence-dnd)";break;case"quiet-hours":i="quiet-hours-presence-filled",n="var(--avatar-presence-inactive)";break;case"away":case"idle":case"inactive":i=t?"recents-presence-badge-filled":"recents-presence_14",n="var(--avatar-presence-inactive)";break;case"away-calling":i="away-calling-presence-filled",n="var(--avatar-presence-inactive)";break;case"ooo":i="pto-presence-filled",n="var(--avatar-presence-inactive)";break;case"busy":i="busy-presence-bold",n="var(--avatar-presence-unstable)";break;case"on-mobile":i="phone-filled",n="var(--avatar-presence-inactive)";break;case"on-device":i=t?"generic-device-video-filled":"generic-device-video_16",n="var(--avatar-presence-inactive)";break;case"on-hold":case a.j.HOLD:i="pause-badge-filled",n="var(--avatar-presence-inactive)";break;case"engaged":i="busy-presence-bold",n="var(--avatar-presence-engaged)";break;case"rona":i="dnd-presence-badge-filled",n="var(--avatar-presence-rona)";break;case a.j.CONSULTING:i="headset-bold",n="var(--avatar-presence-inactive)";break;case a.j.PLAY:i="play-bold",n="var(--avatar-presence-inactive)";break;case a.j.CONFERENCE:i="meet-bold",n="var(--avatar-presence-inactive)";break;case a.j.TRANSFERED:i="assign-privilege-bold",n="var(--avatar-presence-inactive)";break;case a.j.COURTESY_CALLBACK:i="callrate-bold",n="var(--avatar-presence-inactive)";break;case a.j.CAMPAIGN:i="announcement-bold",n="var(--avatar-presence-inactive)"}}return{presenceColor:n,presenceIcon:i}}},40333:e=>{e.exports=a},41488:r=>{r.exports=e},60554:e=>{e.exports=s},85314:e=>{e.exports=o},97822:e=>{e.exports=i}},p={};function d(e){var r=p[e];if(void 0!==r)return r.exports;var t=p[e]={exports:{}};return l[e](t,t.exports,d),t.exports}d.m=l,c=[],d.O=(e,r,t,a)=>{if(!r){var i=1/0;for(l=0;l<c.length;l++){for(var[r,t,a]=c[l],n=!0,s=0;s<r.length;s++)(!1&a||i>=a)&&Object.keys(d.O).every(e=>d.O[e](r[s]))?r.splice(s--,1):(n=!1,a<i&&(i=a));if(n){c.splice(l--,1);var o=t();void 0!==o&&(e=o)}}return e}a=a||0;for(var l=c.length;l>0&&c[l-1][2]>a;l--)c[l]=c[l-1];c[l]=[r,t,a]},d.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return d.d(r,{a:r}),r},d.d=(e,r)=>{for(var t in r)d.o(r,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},d.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3667:0,8923:0};d.O.j=r=>0===e[r];var r=(r,t)=>{var a,i,[n,s,o]=t,c=0;if(n.some(r=>0!==e[r])){for(a in s)d.o(s,a)&&(d.m[a]=s[a]);if(o)var l=o(d)}for(r&&r(t);c<n.length;c++)i=n[c],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(l)},t=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var v=d.O(void 0,[5757,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,6877,1465],()=>d(15300));return d.O(v)})());
|
|
12
|
+
`}};p([(0,s.property)({type:String})],r.prototype,"name",void 0),p([(0,s.property)({type:Number})],r.prototype,"size",void 0),p([(0,s.property)({type:String})],r.prototype,"title",void 0),p([(0,s.property)({type:String})],r.prototype,"color",void 0),p([(0,s.property)({type:String,attribute:"presence-type"})],r.prototype,"presenceType",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"newMomentum",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"failurePresence",void 0),p([(0,s.property)({type:Boolean})],r.prototype,"avatarLinked",void 0),r=p([(0,i.w)("md-presence")],r),e.ELEMENT=r}(a||(a={}))},23968:e=>{e.exports=r},32022:e=>{e.exports=n},38923:(e,r,t)=>{t.d(r,{E:()=>i});var a=t(31465);const i=(e,r,t=!1)=>{let i="",n="";if(r)i="warning-badge-filled",n="var(--avatar-presence-warning)";else{if(!e)return{presenceIcon:void 0,presenceColor:void 0};switch(e){case"active":i="active-presence-small-filled",n="var(--avatar-presence-active)";break;case"meeting":i=t?"camera-presence-filled":"camera-presence_14",n="var(--avatar-presence-unstable)";break;case"schedule":i=t?"meetings-presence-badge-filled":"meetings-presence_14",n="var(--avatar-presence-unstable)";break;case"call":i=t?"handset-filled":"handset-active_16",n="var(--avatar-presence-unstable)";break;case"dnd":i=t?"dnd-presence-badge-filled":"dnd-presence_14",n="var(--avatar-presence-dnd)";break;case"presenting":i=t?"share-screen-badge-filled":"content-share_14",n="var(--avatar-presence-dnd)";break;case"quiet-hours":i="quiet-hours-presence-filled",n="var(--avatar-presence-inactive)";break;case"away":case"idle":case"inactive":i=t?"recents-presence-badge-filled":"recents-presence_14",n="var(--avatar-presence-inactive)";break;case"away-calling":i="away-calling-presence-filled",n="var(--avatar-presence-inactive)";break;case"ooo":i="pto-presence-filled",n="var(--avatar-presence-inactive)";break;case"busy":i="busy-presence-bold",n="var(--avatar-presence-unstable)";break;case"wrapup":i="archive-filled",n="var(--avatar-chat-icon-color)";break;case"on-mobile":i="phone-filled",n="var(--avatar-presence-inactive)";break;case"on-device":i=t?"generic-device-video-filled":"generic-device-video_16",n="var(--avatar-presence-inactive)";break;case"on-hold":case a.j.HOLD:i="pause-badge-filled",n="var(--avatar-presence-inactive)";break;case"engaged":i="busy-presence-bold",n="var(--avatar-presence-engaged)";break;case"rona":i="dnd-presence-badge-filled",n="var(--avatar-presence-rona)";break;case a.j.CONSULTING:i="headset-bold",n="var(--avatar-presence-inactive)";break;case a.j.PLAY:i="play-bold",n="var(--avatar-presence-inactive)";break;case a.j.CONFERENCE:i="meet-bold",n="var(--avatar-presence-inactive)";break;case a.j.TRANSFERED:i="assign-privilege-bold",n="var(--avatar-presence-inactive)";break;case a.j.COURTESY_CALLBACK:i="callrate-bold",n="var(--avatar-presence-inactive)";break;case a.j.CAMPAIGN:i="announcement-bold",n="var(--avatar-presence-inactive)"}}return{presenceColor:n,presenceIcon:i}}},40333:e=>{e.exports=a},41488:r=>{r.exports=e},60554:e=>{e.exports=s},85314:e=>{e.exports=o},97822:e=>{e.exports=i}},p={};function d(e){var r=p[e];if(void 0!==r)return r.exports;var t=p[e]={exports:{}};return l[e](t,t.exports,d),t.exports}d.m=l,c=[],d.O=(e,r,t,a)=>{if(!r){var i=1/0;for(l=0;l<c.length;l++){for(var[r,t,a]=c[l],n=!0,s=0;s<r.length;s++)(!1&a||i>=a)&&Object.keys(d.O).every(e=>d.O[e](r[s]))?r.splice(s--,1):(n=!1,a<i&&(i=a));if(n){c.splice(l--,1);var o=t();void 0!==o&&(e=o)}}return e}a=a||0;for(var l=c.length;l>0&&c[l-1][2]>a;l--)c[l]=c[l-1];c[l]=[r,t,a]},d.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return d.d(r,{a:r}),r},d.d=(e,r)=>{for(var t in r)d.o(r,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},d.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3667:0,8923:0};d.O.j=r=>0===e[r];var r=(r,t)=>{var a,i,[n,s,o]=t,c=0;if(n.some(r=>0!==e[r])){for(a in s)d.o(s,a)&&(d.m[a]=s[a]);if(o)var l=o(d)}for(r&&r(t);c<n.length;c++)i=n[c],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(l)},t=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var v=d.O(void 0,[5757,1890,6272,6325,6283,9217,2176,6798,5830,1200,2576,6877,1465],()=>d(15300));return d.O(v)})());
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/if-defined"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/if-defined"],t);else{var r="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/if-defined")):t(e["lit-element"],e["lit-html/directives/if-defined"]);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t)=>(()=>{"use strict";var r,i={41488:t=>{t.exports=e},81144:(e,t,r)=>{r.r(t),r.d(t,{Radio:()=>i});var i,o=r(3001),
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit-element"),require("lit-html/directives/if-defined"));else if("function"==typeof define&&define.amd)define(["lit-element","lit-html/directives/if-defined"],t);else{var r="object"==typeof exports?t(require("lit-element"),require("lit-html/directives/if-defined")):t(e["lit-element"],e["lit-html/directives/if-defined"]);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(e,t)=>(()=>{"use strict";var r,i={41488:t=>{t.exports=e},81144:(e,t,r)=>{r.r(t),r.d(t,{Radio:()=>i});var i,o=r(3001),l=r(31890),a=r(26272),d=r(41488),n=r(97822),s=r(76067),p=function(e,t,r,i){var o,l=arguments.length,a=l<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(a=(l<3?o(a):l>3?o(t,r,a):o(t,r))||a);return l>3&&a&&Object.defineProperty(t,r,a),a};!function(e){let t=class extends((0,o.yC)(d.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.label="",this.value="",this.ariaLabel="",this.autofocus=!1,this._disabled=!1,this.checked=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get inputAriaLabel(){var e,t,r;if(null===(e=this.ariaLabel)||void 0===e?void 0:e.length)return this.ariaLabel;if(null===(t=this.label)||void 0===t?void 0:t.length)return this.label;const i=null===(r=this.textContent)||void 0===r?void 0:r.trim();return(null==i?void 0:i.length)?i:void 0}static get styles(){return[a.A,s.A]}render(){return d.html`
|
|
2
2
|
<div class="md-radio-wrapper" part="radio-wrapper">
|
|
3
|
+
<div class="md-radio-icon"></div>
|
|
3
4
|
<input
|
|
4
5
|
class="md-radio-input"
|
|
5
6
|
part="radio-input"
|
|
6
7
|
type="radio"
|
|
7
|
-
aria-label=${(0,
|
|
8
|
+
aria-label=${(0,n.ifDefined)(this.inputAriaLabel)}
|
|
8
9
|
aria-checked=${this.checked?"true":"false"}
|
|
9
10
|
.value=${this.value}
|
|
10
11
|
?checked=${this.checked}
|
|
11
12
|
?autofocus=${this.autofocus}
|
|
12
13
|
?disabled=${this.disabled}
|
|
13
|
-
aria-hidden="true"
|
|
14
14
|
id="radio-label"
|
|
15
15
|
/>
|
|
16
|
-
<label for="radio-label" class="md-radio-label" part="radio-label"
|
|
16
|
+
<label for="radio-label" class="md-radio-label" part="radio-label">
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</label>
|
|
17
19
|
</div>
|
|
18
|
-
`}};p([(0,d.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),p([(0,d.property)({type:String})],t.prototype,"label",void 0),p([(0,d.property)({type:String})],t.prototype,"value",void 0),p([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"autofocus",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),p([(0,d.property)({type:Boolean,
|
|
20
|
+
`}};p([(0,d.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),p([(0,d.property)({type:String})],t.prototype,"label",void 0),p([(0,d.property)({type:String})],t.prototype,"value",void 0),p([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"autofocus",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),p([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"checked",void 0),t=p([(0,l.w)("md-radio")],t),e.ELEMENT=t}(i||(i={}))},97822:e=>{e.exports=t}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,r=[],l.O=(e,t,i,o)=>{if(!t){var a=1/0;for(p=0;p<r.length;p++){for(var[t,i,o]=r[p],d=!0,n=0;n<t.length;n++)(!1&o||a>=o)&&Object.keys(l.O).every(e=>l.O[e](t[n]))?t.splice(n--,1):(d=!1,o<a&&(a=o));if(d){r.splice(p--,1);var s=i();void 0!==s&&(e=s)}}return e}o=o||0;for(var p=r.length;p>0&&r[p-1][2]>o;p--)r[p]=r[p-1];r[p]=[t,i,o]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6587:0};l.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,[a,d,n]=r,s=0;if(a.some(t=>0!==e[t])){for(i in d)l.o(d,i)&&(l.m[i]=d[i]);if(n)var p=n(l)}for(t&&t(r);s<a.length;s++)o=a[s],l.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return l.O(p)},r=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=l.O(void 0,[1890,6272,8889,8373,4624,300,591,768,3001,671,6067],()=>l(81144));return l.O(a)})());
|
package/dist/index-entry.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="md-composite-avatar ${(0,a.classMap)(this.avatarClassMap)}">
|
|
14
14
|
<slot></slot>
|
|
15
15
|
</div>
|
|
16
|
-
`}};d([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=d([(0,r.w)("md-composite-avatar")],e),t.ELEMENT=e}(s||(s={}))},3001:(t,e,i)=>{i.d(e,{Io:()=>n.I,TS:()=>a.T,UM:()=>r.U,dY:()=>o.d,wW:()=>l.w,yC:()=>s.y}),i(18889);var s=i(32972),o=i(28373),r=i(70300),n=i(84624),a=i(68387),l=i(31890)},3288:t=>{t.exports=L},3527:t=>{t.exports=M},3664:(t,e,i)=>{i.d(e,{Checkbox:()=>s});var s,o=i(90195),r=i(3001),n=i(31890),a=i(26272),l=i(41488),d=i(
|
|
16
|
+
`}};d([(0,n.property)({type:Number})],e.prototype,"size",void 0),e=d([(0,r.w)("md-composite-avatar")],e),t.ELEMENT=e}(s||(s={}))},3001:(t,e,i)=>{i.d(e,{Io:()=>n.I,TS:()=>a.T,UM:()=>r.U,dY:()=>o.d,wW:()=>l.w,yC:()=>s.y}),i(18889);var s=i(32972),o=i(28373),r=i(70300),n=i(84624),a=i(68387),l=i(31890)},3288:t=>{t.exports=L},3527:t=>{t.exports=M},3664:(t,e,i)=>{i.d(e,{Checkbox:()=>s}),i(61200);var s,o=i(90195),r=i(3001),n=i(31890),a=i(26272),l=i(41488),d=i(40333),h=i(18841),p=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,r.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.indeterminate||this.setAttribute("aria-checked",`${t}`),this.requestUpdate("checked",e)}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=this._indeterminate;this._indeterminate=t,this.setAttribute("aria-checked","mixed"),this.requestUpdate("indeterminate",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)}static get styles(){return[a.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!==o.Uz.Space&&e!==o.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)}update(t){super.update(t),t.has("indeterminate")&&(this.checked=!1)}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>`:d.nothing}checkboxBoxTemplate(){return l.html` <div part="checkbox-box" class="checkbox-box">${this.checkboxIconTemplate()}</div> `}render(){return l.html`
|
|
17
17
|
<input
|
|
18
18
|
class="checkbox-input"
|
|
19
19
|
type="checkbox"
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
aria-hidden="true"
|
|
25
25
|
/>
|
|
26
26
|
<label part="checkbox-label" class="checkbox-label">
|
|
27
|
+
${this.checkboxBoxTemplate()}
|
|
27
28
|
<slot></slot>
|
|
28
29
|
</label>
|
|
29
|
-
`}};h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),h([(0,l.property)({type:String})],e.prototype,"label",void 0),h([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,l.query)(".checkbox-input")],e.prototype,"input",void 0),e=h([(0,n.w)("md-checkbox")],e),t.ELEMENT=e}(s||(s={}))},4863:t=>{t.exports=b},4893:t=>{t.exports=R},4928:(t,e,i)=>{i.d(e,{ComboBox:()=>s}),i(20109),i(61200);var s,o=i(90195),r=i(3001),n=i(31890),a=i(66677),l=i(26272),d=i(41488),h=i(40333),p=i(23968),c=i(97822),u=i(22818),m=i(8229),y=i(86635),v=i(97103),b=i(46795),g=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},f=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((s=s.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)(d.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",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}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-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("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),r=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:r})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),r=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||r)||void 0===t?void 0:t.getBoundingClientRect(),a=null===(e=this.lists[this.focusedIndex-1]||r)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==a?void 0:a.top)<s&&(i=a.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return f(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return f(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,v.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[l.A,b.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return d.html`
|
|
30
|
+
`}};p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([(0,l.property)({type:String})],e.prototype,"label",void 0),p([(0,l.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([(0,l.query)(".checkbox-input")],e.prototype,"input",void 0),e=p([(0,n.w)("md-checkbox")],e),t.ELEMENT=e}(s||(s={}))},4863:t=>{t.exports=b},4893:t=>{t.exports=R},4928:(t,e,i)=>{i.d(e,{ComboBox:()=>s}),i(20109),i(61200);var s,o=i(90195),r=i(3001),n=i(31890),a=i(66677),l=i(26272),d=i(41488),h=i(40333),p=i(23968),c=i(97822),u=i(22818),m=i(8229),y=i(86635),v=i(97103),b=i(46795),g=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n},f=function(t,e,i,s){return new(i||(i=Promise))(function(o,r){function n(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,a)}l((s=s.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)(d.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e;const i=this._focusedIndex;if(this.checkForVirtualScroll()){let i;i=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const s=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===i):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),s&&(null==s||s.toggleAttribute("focused",!0))}else if(this.lists){const e=this.lists[i];e&&e.toggleAttribute("focused",!1);const s=this.lists[t];s&&s.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",i)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",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}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-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("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),r=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:r})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),r=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||r)||void 0===t?void 0:t.getBoundingClientRect(),a=null===(e=this.lists[this.focusedIndex-1]||r)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==a?void 0:a.top)<s&&(i=a.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return f(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return f(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,v.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[l.A,b.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return d.html`
|
|
30
31
|
<md-icon
|
|
31
32
|
name=${t}
|
|
32
33
|
class=${e}
|
|
@@ -2328,24 +2329,26 @@
|
|
|
2328
2329
|
<div class="md-draggable" part="draggable" aria-disabled=${this.disabled}>
|
|
2329
2330
|
<slot name="draggable-item"></slot>
|
|
2330
2331
|
</div>
|
|
2331
|
-
`}};p([(0,o.property)({type:Number})],e.prototype,"delay",void 0),p([(0,o.property)({type:Number})],e.prototype,"animation",void 0),p([(0,o.property)({type:String})],e.prototype,"handle",void 0),p([(0,o.property)({type:String})],e.prototype,"filter",void 0),p([(0,o.property)({type:String})],e.prototype,"easing",void 0),p([(0,o.property)({type:String})],e.prototype,"direction",void 0),p([(0,o.property)({type:Object})],e.prototype,"group",void 0),p([(0,o.property)({type:String,attribute:"draggable-items"})],e.prototype,"draggableItems",void 0),p([(0,o.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),p([(0,o.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),p([(0,o.property)({type:String,attribute:"drag-class"})],e.prototype,"dragClass",void 0),p([(0,o.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),p([(0,o.property)({type:Number,attribute:"swap-threshold"})],e.prototype,"swapThreshold",void 0),p([(0,o.property)({type:Number,attribute:"touch-start-threshold"})],e.prototype,"touchStartThreshold",void 0),p([(0,o.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"sort",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),p([(0,o.query)("slot[name='draggable-item']")],e.prototype,"draggableSlot",void 0),e=p([(0,h.wW)("md-draggable")],e),t.ELEMENT=e}(s||(s={}))},81144:(t,e,i)=>{i.d(e,{Radio:()=>s});var s,o=i(3001),r=i(31890),n=i(26272),a=i(41488),l=i(97822),d=i(76067),h=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,o.yC)(a.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.label="",this.value="",this.ariaLabel="",this.autofocus=!1,this._disabled=!1,this.
|
|
2332
|
+
`}};p([(0,o.property)({type:Number})],e.prototype,"delay",void 0),p([(0,o.property)({type:Number})],e.prototype,"animation",void 0),p([(0,o.property)({type:String})],e.prototype,"handle",void 0),p([(0,o.property)({type:String})],e.prototype,"filter",void 0),p([(0,o.property)({type:String})],e.prototype,"easing",void 0),p([(0,o.property)({type:String})],e.prototype,"direction",void 0),p([(0,o.property)({type:Object})],e.prototype,"group",void 0),p([(0,o.property)({type:String,attribute:"draggable-items"})],e.prototype,"draggableItems",void 0),p([(0,o.property)({type:String,attribute:"ghost-class"})],e.prototype,"ghostClass",void 0),p([(0,o.property)({type:String,attribute:"chosen-class"})],e.prototype,"chosenClass",void 0),p([(0,o.property)({type:String,attribute:"drag-class"})],e.prototype,"dragClass",void 0),p([(0,o.property)({type:String,attribute:"fallback-class"})],e.prototype,"fallbackClass",void 0),p([(0,o.property)({type:Number,attribute:"swap-threshold"})],e.prototype,"swapThreshold",void 0),p([(0,o.property)({type:Number,attribute:"touch-start-threshold"})],e.prototype,"touchStartThreshold",void 0),p([(0,o.property)({type:Boolean,attribute:"force-fallback"})],e.prototype,"forceFallback",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"sort",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),p([(0,o.property)({type:Boolean,reflect:!0})],e.prototype,"editable",void 0),p([(0,o.query)("slot[name='draggable-item']")],e.prototype,"draggableSlot",void 0),e=p([(0,h.wW)("md-draggable")],e),t.ELEMENT=e}(s||(s={}))},81144:(t,e,i)=>{i.d(e,{Radio:()=>s});var s,o=i(3001),r=i(31890),n=i(26272),a=i(41488),l=i(97822),d=i(76067),h=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,o.yC)(a.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.label="",this.value="",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;if(null===(t=this.ariaLabel)||void 0===t?void 0:t.length)return this.ariaLabel;if(null===(e=this.label)||void 0===e?void 0:e.length)return this.label;const s=null===(i=this.textContent)||void 0===i?void 0:i.trim();return(null==s?void 0:s.length)?s:void 0}static get styles(){return[n.A,d.A]}render(){return a.html`
|
|
2332
2333
|
<div class="md-radio-wrapper" part="radio-wrapper">
|
|
2334
|
+
<div class="md-radio-icon"></div>
|
|
2333
2335
|
<input
|
|
2334
2336
|
class="md-radio-input"
|
|
2335
2337
|
part="radio-input"
|
|
2336
2338
|
type="radio"
|
|
2337
|
-
aria-label=${(0,l.ifDefined)(this.
|
|
2339
|
+
aria-label=${(0,l.ifDefined)(this.inputAriaLabel)}
|
|
2338
2340
|
aria-checked=${this.checked?"true":"false"}
|
|
2339
2341
|
.value=${this.value}
|
|
2340
2342
|
?checked=${this.checked}
|
|
2341
2343
|
?autofocus=${this.autofocus}
|
|
2342
2344
|
?disabled=${this.disabled}
|
|
2343
|
-
aria-hidden="true"
|
|
2344
2345
|
id="radio-label"
|
|
2345
2346
|
/>
|
|
2346
|
-
<label for="radio-label" class="md-radio-label" part="radio-label"
|
|
2347
|
+
<label for="radio-label" class="md-radio-label" part="radio-label">
|
|
2348
|
+
<slot></slot>
|
|
2349
|
+
</label>
|
|
2347
2350
|
</div>
|
|
2348
|
-
`}};h([(0,a.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,a.property)({type:String})],e.prototype,"label",void 0),h([(0,a.property)({type:String})],e.prototype,"value",void 0),h([(0,a.property)({type:String})],e.prototype,"ariaLabel",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),h([(0,a.property)({type:Boolean,
|
|
2351
|
+
`}};h([(0,a.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),h([(0,a.property)({type:String})],e.prototype,"label",void 0),h([(0,a.property)({type:String})],e.prototype,"value",void 0),h([(0,a.property)({type:String})],e.prototype,"ariaLabel",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),h([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"checked",void 0),e=h([(0,r.w)("md-radio")],e),t.ELEMENT=e}(s||(s={}))},83192:(t,e,i)=>{i.d(e,{Tooltip:()=>s});var s,o=i(90195),r=i(3001),n=i(31890),a=i(66677),l=i(26272),d=i(41488),h=i(23968),p=i(77251),c=function(t,e,i,s){var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends((0,r.UM)((0,r.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()}}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,a.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.opened=!0)}notifyTooltipDestroy(){this.disabled||(this.opened=!1)}handleKeyDown(t){t.code===o.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`
|
|
2349
2352
|
<div class="md-tooltip ${(0,h.classMap)(this.tooltipClassMap)}">
|
|
2350
2353
|
<div class="md-tooltip__popper" role="tooltip" part="tooltip-popper">
|
|
2351
2354
|
<div id="md-tooltip__content" class="md-tooltip__content" part="tooltip-content">
|
|
@@ -2831,4 +2834,4 @@
|
|
|
2831
2834
|
size="16"
|
|
2832
2835
|
></md-icon>
|
|
2833
2836
|
</label>
|
|
2834
|
-
`}};c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"checked",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.internalProperty)()],e.prototype,"customId",void 0),e=c([(0,n.w)("md-favorite")],e),t.ELEMENT=e}(s||(s={}))}},N={};function U(t){var e=N[t];if(void 0!==e)return e.exports;var i=N[t]={exports:{}};return j[t].call(i.exports,i,i.exports,U),i.exports}U.m=j,B=[],U.O=(t,e,i,s)=>{if(!e){var o=1/0;for(l=0;l<B.length;l++){for(var[e,i,s]=B[l],r=!0,n=0;n<e.length;n++)(!1&s||o>=s)&&Object.keys(U.O).every(t=>U.O[t](e[n]))?e.splice(n--,1):(r=!1,s<o&&(o=s));if(r){B.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}s=s||0;for(var l=B.length;l>0&&B[l-1][2]>s;l--)B[l]=B[l-1];B[l]=[e,i,s]},U.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return U.d(e,{a:e}),e},z=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,U.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);U.r(i);var s={};_=_||[null,z({}),z([]),z(z)];for(var o=2&e&&t;("object"==typeof o||"function"==typeof o)&&!~_.indexOf(o);o=z(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>t[e]);return s.default=()=>t,U.d(i,s),i},U.d=(t,e)=>{for(var i in e)U.o(e,i)&&!U.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},U.f={},U.e=t=>Promise.all(Object.keys(U.f).reduce((e,i)=>(U.f[i](t,e),e),[])),U.u=t=>"chunks/md-"+t+".js",U.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),U.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),F={},V="@momentum-ui/web-components:",U.l=(t,e,i,s)=>{if(F[t])F[t].push(e);else{var o,r;if(void 0!==i)for(var n=document.getElementsByTagName("script"),a=0;a<n.length;a++){var l=n[a];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==V+i){o=l;break}}o||(r=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,U.nc&&o.setAttribute("nonce",U.nc),o.setAttribute("data-webpack",V+i),o.src=t),F[t]=[e];var d=(e,i)=>{o.onerror=o.onload=null,clearTimeout(h);var s=F[t];if(delete F[t],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),r&&document.head.appendChild(o)}},U.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},U.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6652:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};U.f.j=(e,i)=>{var s=U.o(t,e)?t[e]:void 0;if(0!==s)if(s)i.push(s[2]);else{var o=new Promise((i,o)=>s=t[e]=[i,o]);i.push(s[2]=o);var r=U.p+U.u(e),n=new Error;U.l(r,i=>{if(U.o(t,e)&&(0!==(s=t[e])&&(t[e]=void 0),s)){var o=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;n.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",n.name="ChunkLoadError",n.type=o,n.request=r,s[1](n)}},"chunk-"+e,e)}},U.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,n,a]=i,l=0;if(r.some(e=>0!==t[e])){for(s in n)U.o(n,s)&&(U.m[s]=n[s]);if(a)var d=a(U)}for(e&&e(i);l<r.length;l++)o=r[l],U.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return U.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var q=U.O(void 0,[5757,7103,1890,6272,6325,6283,9217,5830,8889,8210,4977,3135,1598,1572,6366,7251,4974,2243,7919,3553,6877,6700,6795,8923,4548,76,1392,9164,8004,1214,1625,3625,
|
|
2837
|
+
`}};c([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"checked",void 0),c([(0,l.property)({type:String})],e.prototype,"value",void 0),c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"label",void 0),c([(0,l.internalProperty)()],e.prototype,"customId",void 0),e=c([(0,n.w)("md-favorite")],e),t.ELEMENT=e}(s||(s={}))}},N={};function U(t){var e=N[t];if(void 0!==e)return e.exports;var i=N[t]={exports:{}};return j[t].call(i.exports,i,i.exports,U),i.exports}U.m=j,B=[],U.O=(t,e,i,s)=>{if(!e){var o=1/0;for(l=0;l<B.length;l++){for(var[e,i,s]=B[l],r=!0,n=0;n<e.length;n++)(!1&s||o>=s)&&Object.keys(U.O).every(t=>U.O[t](e[n]))?e.splice(n--,1):(r=!1,s<o&&(o=s));if(r){B.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}s=s||0;for(var l=B.length;l>0&&B[l-1][2]>s;l--)B[l]=B[l-1];B[l]=[e,i,s]},U.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return U.d(e,{a:e}),e},z=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,U.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);U.r(i);var s={};_=_||[null,z({}),z([]),z(z)];for(var o=2&e&&t;("object"==typeof o||"function"==typeof o)&&!~_.indexOf(o);o=z(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>t[e]);return s.default=()=>t,U.d(i,s),i},U.d=(t,e)=>{for(var i in e)U.o(e,i)&&!U.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},U.f={},U.e=t=>Promise.all(Object.keys(U.f).reduce((e,i)=>(U.f[i](t,e),e),[])),U.u=t=>"chunks/md-"+t+".js",U.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),U.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),F={},V="@momentum-ui/web-components:",U.l=(t,e,i,s)=>{if(F[t])F[t].push(e);else{var o,r;if(void 0!==i)for(var n=document.getElementsByTagName("script"),a=0;a<n.length;a++){var l=n[a];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==V+i){o=l;break}}o||(r=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,U.nc&&o.setAttribute("nonce",U.nc),o.setAttribute("data-webpack",V+i),o.src=t),F[t]=[e];var d=(e,i)=>{o.onerror=o.onload=null,clearTimeout(h);var s=F[t];if(delete F[t],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach(t=>t(i)),e)return e(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=d.bind(null,o.onerror),o.onload=d.bind(null,o.onload),r&&document.head.appendChild(o)}},U.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},U.p="/",(()=>{var t={109:0,144:0,195:0,445:0,502:0,555:0,671:0,762:0,984:0,1037:0,1200:0,1266:0,1323:0,1439:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,2105:0,2139:0,2169:0,2176:0,2330:0,2434:0,2547:0,2576:0,2779:0,2781:0,2909:0,3001:0,3079:0,3192:0,3413:0,3477:0,3539:0,3747:0,3820:0,3938:0,3943:0,4131:0,4139:0,4259:0,4545:0,4908:0,4928:0,4971:0,5156:0,5310:0,5369:0,5382:0,5433:0,5517:0,6029:0,6060:0,6085:0,6132:0,6220:0,6396:0,6408:0,6433:0,6494:0,6587:0,6652:0,6677:0,6724:0,6753:0,6754:0,6798:0,6834:0,6920:0,7119:0,7145:0,7219:0,7455:0,7684:0,7711:0,7719:0,7763:0,7814:0,7927:0,8028:0,8111:0,8115:0,8220:0,8334:0,8339:0,8442:0,8510:0,8654:0,8894:0,9058:0,9237:0};U.f.j=(e,i)=>{var s=U.o(t,e)?t[e]:void 0;if(0!==s)if(s)i.push(s[2]);else{var o=new Promise((i,o)=>s=t[e]=[i,o]);i.push(s[2]=o);var r=U.p+U.u(e),n=new Error;U.l(r,i=>{if(U.o(t,e)&&(0!==(s=t[e])&&(t[e]=void 0),s)){var o=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;n.message="Loading chunk "+e+" failed.\n("+o+": "+r+")",n.name="ChunkLoadError",n.type=o,n.request=r,s[1](n)}},"chunk-"+e,e)}},U.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[r,n,a]=i,l=0;if(r.some(e=>0!==t[e])){for(s in n)U.o(n,s)&&(U.m[s]=n[s]);if(a)var d=a(U)}for(e&&e(i);l<r.length;l++)o=r[l],U.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return U.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var q=U.O(void 0,[5757,7103,1890,6272,6325,6283,9217,5830,8889,8210,4977,3135,1598,1572,6366,7251,4974,2243,7919,3553,6877,6700,6795,8923,4548,76,1392,9164,8004,1214,1625,6067,3625,8841,3112,3866,1107,7330,7092,9719,6979,9130,9618,6273,8612,8521,2019,779,573,5801,2043,8171,2798,5467,2984,1869,2215,7997,4392,630,3604,8728,8227,1250,1705,6953,7875,7833,6400,587,6441,6015,3663],()=>U(77999));return U.O(q)})());
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./5757"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./4977"),require("./3135"),require("./1598"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6877"),require("./6700"),require("./6795"),require("./8923"),require("./4548"),require("./76"),require("./1392"),require("./9164"),require("./8004"),require("./1214"),require("./1625"),require("./
|
|
1
|
+
require("./5757"),require("./7103"),require("./1890"),require("./6272"),require("./6325"),require("./6283"),require("./9217"),require("./5830"),require("./8889"),require("./8210"),require("./4977"),require("./3135"),require("./1598"),require("./1572"),require("./6366"),require("./7251"),require("./4974"),require("./2243"),require("./7919"),require("./3553"),require("./6877"),require("./6700"),require("./6795"),require("./8923"),require("./4548"),require("./76"),require("./1392"),require("./9164"),require("./8004"),require("./1214"),require("./1625"),require("./6067"),require("./3625"),require("./8841"),require("./3112"),require("./3866"),require("./1107"),require("./7330"),require("./7092"),require("./9719"),require("./6979"),require("./9130"),require("./9618"),require("./6273"),require("./8612"),require("./8521"),require("./2019"),require("./779"),require("./573"),require("./5801"),require("./2043"),require("./8171"),require("./2798"),require("./5467"),require("./2984"),require("./1869"),require("./2215"),require("./7997"),require("./4392"),require("./630"),require("./3604"),require("./8728"),require("./8227"),require("./1250"),require("./1705"),require("./6953"),require("./7875"),require("./7833"),require("./6400"),require("./587"),require("./6441"),require("./6015"),require("./3663"),module.exports=require("./index-entry");
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import "@/components/icon/Icon";
|
|
9
|
+
import { LitElement, PropertyValues, TemplateResult } from "lit-element";
|
|
9
10
|
export declare namespace Checkbox {
|
|
10
11
|
export interface CheckboxChangeEventDetail {
|
|
11
12
|
sourceEvent: Event;
|
|
@@ -42,7 +43,10 @@ export declare namespace Checkbox {
|
|
|
42
43
|
disconnectedCallback(): void;
|
|
43
44
|
protected update(changedProperties: PropertyValues): void;
|
|
44
45
|
protected updated(changedProperties: PropertyValues): void;
|
|
45
|
-
|
|
46
|
+
private get checkboxIconName();
|
|
47
|
+
private checkboxIconTemplate;
|
|
48
|
+
private checkboxBoxTemplate;
|
|
49
|
+
render(): TemplateResult;
|
|
46
50
|
}
|
|
47
51
|
export {};
|
|
48
52
|
}
|
|
@@ -127,7 +127,7 @@ export declare namespace Input {
|
|
|
127
127
|
"md-dirty": boolean;
|
|
128
128
|
"md-has-right-icon": boolean;
|
|
129
129
|
};
|
|
130
|
-
get ariaExpandedValue(): "
|
|
130
|
+
get ariaExpandedValue(): "undefined" | "true" | "false";
|
|
131
131
|
get hasRightIcon(): boolean;
|
|
132
132
|
inputTemplate(): import("lit-element").TemplateResult;
|
|
133
133
|
inputLeftTemplate(): {};
|
|
@@ -4,6 +4,6 @@ type ReturnType = {
|
|
|
4
4
|
presenceIcon: string | undefined;
|
|
5
5
|
presenceColor: string | undefined;
|
|
6
6
|
};
|
|
7
|
-
export declare const PresenceType: readonly ["active", "meeting", "schedule", "call", "dnd", "presenting", "quiet-hours", "away", "idle", "inactive", "away-calling", "ooo", "busy", "on-mobile", "on-device", "on-hold", "engaged", "rona", ""];
|
|
7
|
+
export declare const PresenceType: readonly ["active", "meeting", "schedule", "call", "dnd", "presenting", "quiet-hours", "away", "idle", "inactive", "away-calling", "ooo", "busy", "on-mobile", "on-device", "on-hold", "engaged", "rona", "wrapup", ""];
|
|
8
8
|
export declare const getPresenceIconColor: (presenceType: PresenceState, failureBadge: boolean, isMomentumDesign?: boolean) => ReturnType;
|
|
9
9
|
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { LitElement
|
|
8
|
+
import { LitElement } from "lit-element";
|
|
9
9
|
export declare namespace Radio {
|
|
10
10
|
const ELEMENT_base: typeof LitElement & import("../../mixins/FocusMixin").AnyConstructor<import("../../mixins/FocusMixin").FocusClass>;
|
|
11
11
|
export class ELEMENT extends ELEMENT_base {
|
|
@@ -17,10 +17,8 @@ export declare namespace Radio {
|
|
|
17
17
|
private _disabled;
|
|
18
18
|
get disabled(): boolean;
|
|
19
19
|
set disabled(value: boolean);
|
|
20
|
-
|
|
21
|
-
get
|
|
22
|
-
set checked(value: boolean);
|
|
23
|
-
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
20
|
+
checked: boolean;
|
|
21
|
+
private get inputAriaLabel();
|
|
24
22
|
static get styles(): import("lit-element").CSSResult[];
|
|
25
23
|
render(): import("lit-element").TemplateResult;
|
|
26
24
|
}
|