@momentum-ui/web-components 3.2.9 → 3.2.11
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/2245.js +12 -11
- package/dist/2273.js +10 -7
- package/dist/3639.js +2 -3
- package/dist/378.js +18 -0
- package/dist/5057.js +1 -1
- package/dist/6005.js +1 -1
- package/dist/8663.js +5 -1
- package/dist/9189.js +3 -3
- package/dist/953.js +3 -5
- package/dist/comp/md-advance-list-entry.js +1 -1
- package/dist/comp/md-avatar-entry.js +5 -4
- package/dist/comp/md-avatar.js +1 -1
- package/dist/comp/md-chat-message-entry.js +1 -1
- package/dist/comp/md-chat-message.js +1 -1
- package/dist/comp/md-combobox-entry.js +24 -21
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +4 -6
- package/dist/comp/md-datepicker-day-entry.js +2 -3
- package/dist/comp/md-datepicker-entry.js +7 -3
- package/dist/comp/md-dropdown-entry.js +32 -23
- package/dist/comp/md-floating-modal-entry.js +24 -13
- package/dist/comp/md-grabber-entry.js +12 -8
- package/dist/comp/md-input-entry.js +14 -14
- package/dist/comp/md-meeting-alert-entry.js +1 -1
- package/dist/comp/md-meeting-alert.js +1 -1
- package/dist/comp/md-tabs-entry.js +16 -16
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-task-item.js +1 -1
- package/dist/esm/2245.js +5 -4
- package/dist/esm/2273.js +36 -33
- package/dist/esm/3639.js +2 -3
- package/dist/esm/378.js +18 -0
- package/dist/esm/4626.js +12 -11
- package/dist/esm/4654.js +10 -7
- package/dist/esm/5057.js +1 -1
- package/dist/esm/6005.js +1 -1
- package/dist/esm/6020.js +2 -3
- package/dist/esm/837.js +6 -8
- package/dist/esm/8663.js +5 -1
- package/dist/esm/9189.js +5 -5
- package/dist/esm/953.js +3 -5
- package/dist/esm/comp/md-advance-list-entry.js +3 -3
- package/dist/esm/comp/md-avatar-entry.js +1 -1
- package/dist/esm/comp/md-avatar.js +1 -1
- package/dist/esm/comp/md-chat-message-entry.js +1 -1
- package/dist/esm/comp/md-chat-message.js +1 -1
- package/dist/esm/comp/md-date-range-picker-entry.js +1 -1
- package/dist/esm/comp/md-datepicker-entry.js +13 -9
- package/dist/esm/comp/md-dropdown-entry.js +36 -27
- package/dist/esm/comp/md-floating-modal-entry.js +24 -13
- package/dist/esm/comp/md-grabber-entry.js +10 -6
- package/dist/esm/comp/md-input-entry.js +4 -4
- package/dist/esm/comp/md-meeting-alert-entry.js +1 -1
- package/dist/esm/comp/md-meeting-alert.js +1 -1
- package/dist/esm/comp/md-tabs-entry.js +15 -15
- package/dist/esm/comp/md-task-item-entry.js +1 -1
- package/dist/esm/comp/md-task-item.js +1 -1
- package/dist/esm/index-entry.js +63 -39
- package/dist/esm/index.js +1 -1
- package/dist/index-entry.js +229 -204
- package/dist/index.js +1 -1
- package/dist/types/components/avatar/Avatar.constants.d.ts +2 -1
- package/dist/types/components/avatar/Avatar.d.ts +3 -0
- package/dist/types/components/combobox/ComboBox.d.ts +1 -1
- package/dist/types/components/date-range-picker/DateRangePicker.d.ts +1 -0
- package/dist/types/components/datepicker/DatePicker.d.ts +6 -0
- package/dist/types/components/dropdown/Dropdown.d.ts +1 -0
- package/dist/types/components/floating-modal/FloatingModal.d.ts +10 -1
- package/dist/types/components/grabber/Grabber.d.ts +1 -0
- package/dist/types/components/input/Input.d.ts +1 -0
- package/dist/types/components/tabs/Tabs.d.ts +1 -0
- package/package.json +1 -1
- package/dist/4621.js +0 -18
- package/dist/esm/4621.js +0 -18
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
title=${"previous month"}
|
|
9
9
|
?disabled=${r}
|
|
10
10
|
@click=${!r&&this.decreaseMonth}
|
|
11
|
-
tabindex="-1"
|
|
12
11
|
>
|
|
13
|
-
<md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
12
|
+
<md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
14
13
|
</md-button>
|
|
15
14
|
`},this.renderNextMonthButton=()=>{var e,t;const r=(null===(e=this.filterParams)||void 0===e?void 0:e.maxDate)&&(0,n.FO)(this.viewAnchorDate,null===(t=this.filterParams)||void 0===t?void 0:t.maxDate);return s.html`
|
|
16
15
|
<md-button
|
|
@@ -22,10 +21,9 @@
|
|
|
22
21
|
title=${"next month"}
|
|
23
22
|
?disabled=${r}
|
|
24
23
|
@click=${!r&&this.increaseMonth}
|
|
25
|
-
|
|
26
|
-
><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
24
|
+
><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
27
25
|
</md-button>
|
|
28
|
-
`},this.header=()=>{var e;const t=(0,n.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var r;const i=(0,n.fi)((0,n.WV)(t,(null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)||"en"),e),o=(0,n.XN)(i),a=this.getWeekDayName(o,i);return s.html` <div class="md-datepicker__day--name">${a}</div> `}))}}connectedCallback(){var e,t,r;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,n.tB)(),this.localeMonth=(0,n.WV)(this.viewAnchorDate,(null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,r,i,o,a;super.updated(e),e.has("datePickerProps")
|
|
26
|
+
`},this.header=()=>{var e;const t=(0,n.mK)(this.viewAnchorDate,null===(e=this.datePickerProps)||void 0===e?void 0:e.weekStart);return[].concat([0,1,2,3,4,5,6].map(e=>{var r;const i=(0,n.fi)((0,n.WV)(t,(null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)||"en"),e),o=(0,n.XN)(i),a=this.getWeekDayName(o,i);return s.html` <div class="md-datepicker__day--name">${a}</div> `}))}}connectedCallback(){var e,t,r;super.connectedCallback(),this.viewAnchorDate=(null===(e=this.datePickerProps)||void 0===e?void 0:e.focused)||(null===(t=this.datePickerProps)||void 0===t?void 0:t.selected)||(0,n.tB)(),this.localeMonth=(0,n.WV)(this.viewAnchorDate,(null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)||"en").toFormat(this.monthFormat)}updated(e){var t,r,i,o,a,s;if(super.updated(e),e.has("datePickerProps")){const a=e.get("datePickerProps"),s=null===(t=this.datePickerProps)||void 0===t?void 0:t.selected,d=null===(r=this.datePickerProps)||void 0===r?void 0:r.focused;if(null===(null==s?void 0:s.invalidReason)&&(!(null==a?void 0:a.selected)||!(0,n.ro)(a.selected,s))&&(this.viewAnchorDate=s||(0,n.tB)()),null==d?void 0:d.isValid){const e=!(null==a?void 0:a.focused)||!(0,n.ro)(a.focused,d),t=d.month!==this.viewAnchorDate.month||d.year!==this.viewAnchorDate.year;e&&t&&(this.viewAnchorDate=d)}this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,n.WV)(this.viewAnchorDate,null===(o=this.datePickerProps)||void 0===o?void 0:o.locale):this.viewAnchorDate).toFormat(this.monthFormat)}e.has("viewAnchorDate")&&(this.localeMonth=((null===(a=this.datePickerProps)||void 0===a?void 0:a.locale)?(0,n.WV)(this.viewAnchorDate,null===(s=this.datePickerProps)||void 0===s?void 0:s.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(e,t){return this.shortDay?(0,n.XY)(e,t):(0,n.DY)(e,t)}renderLoader(){return s.html`
|
|
29
27
|
<div class="md-datepicker__loading">
|
|
30
28
|
<div class="md-datepicker__loading-text">${this.errorMessages.LOADING}</div>
|
|
31
29
|
<md-spinner size="32"></md-spinner>
|
|
@@ -63,4 +61,4 @@
|
|
|
63
61
|
</div>
|
|
64
62
|
`}static get styles(){return[a.A,l.A]}render(){return s.html`
|
|
65
63
|
<div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
|
|
66
|
-
`}};c([(0,d.property)({attribute:!1})],t.prototype,"monthFormat",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"filterParams",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),c([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),c([(0,d.state)()],t.prototype,"viewAnchorDate",void 0),c([(0,d.state)()],t.prototype,"localeMonth",void 0),t=c([(0,o.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(i||(i={}))},878(e,t,r){r.d(t,{DY:()=>p,FO:()=>
|
|
64
|
+
`}};c([(0,d.property)({attribute:!1})],t.prototype,"monthFormat",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"filterParams",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"handleMonthChange",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),c([(0,d.property)({attribute:!1})],t.prototype,"datePickerProps",void 0),c([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"short-day"})],t.prototype,"shortDay",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),c([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),c([(0,d.state)()],t.prototype,"viewAnchorDate",void 0),c([(0,d.state)()],t.prototype,"localeMonth",void 0),t=c([(0,o.w)("md-datepicker-calendar")],t),e.ELEMENT=t}(i||(i={}))},878(e,t,r){r.d(t,{DY:()=>p,FO:()=>b,J4:()=>c,Mw:()=>a,PD:()=>P,PS:()=>h,SL:()=>u,WV:()=>f,XN:()=>m,XY:()=>v,fi:()=>l,mK:()=>n,pp:()=>s,ro:()=>y,tB:()=>o,tF:()=>D,t_:()=>k,tj:()=>d});var i=r(5796);function o(){return i.DateTime.local()}function n(e,t){return"Monday"===t?e.startOf("week"):e.startOf("week").minus({days:1})}function a(e){return e.startOf("month")}function s(e){return e.get("day")}function d(e){return e.get("month")}function l(e,t){return e.plus({days:t})}function c(e,t){return e.plus({weeks:t})}function h(e,t){return e.plus({months:t})}function u(e,t){return e.plus({months:0-t})}function m(e){return e.locale}function v(e,t){var r,i;return e?null!==(r=t.setLocale(e).weekdayShort)&&void 0!==r?r:"":null!==(i=t.weekdayShort)&&void 0!==i?i:""}function p(e,t){const r=v(e,t);return r?r.substring(0,1):""}function f(e,t){return e.setLocale(t)}function y(e,t){return e.day===t.day&&e.month===t.month&&e.year===t.year}function D(e,t){return e.month===t.month}function k(e,t){var r,i,o,n,a,s;return(null===(r=t.minDate)||void 0===r?void 0:r.startOf("day"))&&e.startOf("day")<(null===(i=t.minDate)||void 0===i?void 0:i.startOf("day"))||(null===(o=t.maxDate)||void 0===o?void 0:o.startOf("day"))&&e.startOf("day")>(null===(n=t.maxDate)||void 0===n?void 0:n.startOf("day"))||(null===(a=t.filterDate)||void 0===a?void 0:a.call(t,e))||(null===(s=t.filterDate)||void 0===s?void 0:s.call(t,e.toISODate()))||!1}function P(e,t){const r=i.DateTime.fromObject({month:e.month,day:1,year:e.year});return t&&t>=r}function b(e,t){const r=i.DateTime.fromObject({month:e.month,day:e.daysInMonth,year:e.year});return t&&t<=r}},2022(e){e.exports=a},554(e){e.exports=s},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=r},291(e){e.exports=o},318(e){e.exports=i},5796(e){e.exports=n},5314(e){e.exports=d}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var r=h[e]={exports:{}};return c[e](r,r.exports,u),r.exports}u.m=c,l=[],u.O=(e,t,r,i)=>{if(!t){var o=1/0;for(d=0;d<l.length;d++){for(var[t,r,i]=l[d],n=!0,a=0;a<t.length;a++)(!1&i||o>=i)&&Object.keys(u.O).every(e=>u.O[e](t[a]))?t.splice(a--,1):(n=!1,i<o&&(o=i));if(n){l.splice(d--,1);var s=r();void 0!==s&&(e=s)}}return e}i=i||0;for(var d=l.length;d>0&&l[d-1][2]>i;d--)l[d]=l[d-1];l[d]=[t,r,i]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={878:0,5283:0,8497:0};u.O.j=t=>0===e[t];var t=(t,r)=>{var i,o,[n,a,s]=r,d=0;if(n.some(t=>0!==e[t])){for(i in a)u.o(a,i)&&(u.m[i]=a[i]);if(s)var l=s(u)}for(t&&t(r);d<n.length;d++)o=n[d],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(l)},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 m=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,3842,3639,9669,801,8371],()=>u(837));return u.O(m)})());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","luxon"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("luxon")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e.luxon);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,(e,t,i,r,s,a)=>(()=>{"use strict";var o,d={3639(e,t,i){i.r(t),i.d(t,{DatePickerDay:()=>r}),i(5983);var r,s=i(9609),a=i(878),o=i(2050),d=i(4084),n=i(7161),l=i(429),c=i(5125),p=i(291),h=i(3842),u=function(e,t,i,r){var s,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var d=e.length-1;d>=0;d--)(s=e[d])&&(o=(a<3?s(o):a>3?s(t,i,o):s(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,a.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=e=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:e}}))},this.isDateInRange=()=>{var e;const t=this.parentRangePicker,i=null==t?void 0:t.startDate,r=null==t?void 0:t.endDate;if(!i||!r)return!1;const s=(null===(e=this.day)||void 0===e?void 0:e.isValid)?this.day.toSQLDate():null;if(!s)return!1;const a=s>i&&s<r,o=s===i,d=s===r;return!this.isPrimarySelection()&&(a||o||d)},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:e}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,a.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,a.ro)(this.day,(0,a.tB)()),this.selected=this.datePickerProps&&(0,a.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,a.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,o.QZ)("md-date-range-picker",this)}updated(e){var t,i;super.updated(e),this.disabled=this.filterParams&&(0,a.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,a.ro)(this.day,(0,a.tB)()),this.selected=this.datePickerProps&&(0,a.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,a.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(t=this.button.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var e;return this===(null===(e=this.parentNode)||void 0===e?void 0:e.firstElementChild)}isEndingRangeEdge(){var e;return this===(null===(e=this.parentNode)||void 0===e?void 0:e.lastElementChild)}isStartDate(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[d.A,h.A]}render(){var e;const t=(0,a.WV)(this.day,(null===(e=this.datePickerProps)||void 0===e?void 0:e.locale)||"en").toFormat("
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("luxon"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","luxon"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("luxon")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e.luxon);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(self,(e,t,i,r,s,a)=>(()=>{"use strict";var o,d={3639(e,t,i){i.r(t),i.d(t,{DatePickerDay:()=>r}),i(5983);var r,s=i(9609),a=i(878),o=i(2050),d=i(4084),n=i(7161),l=i(429),c=i(5125),p=i(291),h=i(3842),u=function(e,t,i,r){var s,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var d=e.length-1;d>=0;d--)(s=e[d])&&(o=(a<3?s(o):a>3?s(t,i,o):s(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o};!function(e){let t=class extends n.LitElement{constructor(){super(...arguments),this.focused=!1,this.selected=!1,this.disabled=!1,this.day=(0,a.tB)(),this.viewAnchorMonth=void 0,this.filterParams=void 0,this.datePickerProps=void 0,this.isOutsideMonth=!1,this.isToday=!1,this.parentRangePicker=null,this.dateIsInRange=!1,this.handleClick=e=>{this.dispatchEvent(new CustomEvent("day-select",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:e}}))},this.isDateInRange=()=>{var e;const t=this.parentRangePicker,i=null==t?void 0:t.startDate,r=null==t?void 0:t.endDate;if(!i||!r)return!1;const s=(null===(e=this.day)||void 0===e?void 0:e.isValid)?this.day.toSQLDate():null;if(!s)return!1;const a=s>i&&s<r,o=s===i,d=s===r;return!this.isPrimarySelection()&&(a||o||d)},this.handleKeyDown=e=>{this.dispatchEvent(new CustomEvent("day-key-event",{bubbles:!0,composed:!0,detail:{date:this.day,sourceEvent:e}}))}}connectedCallback(){super.connectedCallback(),this.disabled=this.filterParams&&(0,a.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,a.ro)(this.day,(0,a.tB)()),this.selected=this.datePickerProps&&(0,a.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,a.ro)(this.datePickerProps.focused,this.day)||!1,this.parentRangePicker=(0,o.QZ)("md-date-range-picker",this)}updated(e){var t,i;super.updated(e),this.disabled=this.filterParams&&(0,a.t_)(this.day,this.filterParams)||!1,this.isOutsideMonth=this.day.month!==this.viewAnchorMonth,this.isToday=(0,a.ro)(this.day,(0,a.tB)()),this.selected=this.datePickerProps&&(0,a.ro)(this.datePickerProps.selected,this.day)||!1,this.focused=this.datePickerProps&&(0,a.ro)(this.datePickerProps.focused,this.day)||!1,this.focused&&this.button&&(null===(i=null===(t=this.button.shadowRoot)||void 0===t?void 0:t.querySelector("button"))||void 0===i||i.focus()),this.parentRangePicker&&(this.dateIsInRange=this.isDateInRange())}isPrimarySelection(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.startDate)&&void 0===this.parentRangePicker.endDate}isLeadingRangeEdge(){var e;return this===(null===(e=this.parentNode)||void 0===e?void 0:e.firstElementChild)}isEndingRangeEdge(){var e;return this===(null===(e=this.parentNode)||void 0===e?void 0:e.lastElementChild)}isStartDate(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.startDate)===this.day.toSQLDate()&&!this.isPrimarySelection()}isEndDate(){var e;return(null===(e=this.parentRangePicker)||void 0===e?void 0:e.endDate)===this.day.toSQLDate()}get getDayClassMap(){return{"md-datepicker__day--selected":this.selected,"md-datepicker__day--focus":this.focused,"md-datepicker__day--today":this.isToday,"md-datepicker__day--outside-month":this.isOutsideMonth,"md-datepicker__day--in-range":this.dateIsInRange,"md-datepicker__day--week-first":this.isLeadingRangeEdge(),"md-datepicker__day--week-last":this.isEndingRangeEdge(),"md-datepicker__day--start-date":this.isStartDate(),"md-datepicker__day--end-date":this.isEndDate()}}static get styles(){return[d.A,h.A]}render(){var e;const t=(0,a.WV)(this.day,(null===(e=this.datePickerProps)||void 0===e?void 0:e.locale)||"en").toFormat("dd MMMM yyyy"),i=this.selected||this.isStartDate()||this.isEndDate()?`${t}, selected`:t;return n.html`
|
|
2
2
|
<md-button
|
|
3
3
|
circle
|
|
4
4
|
size=${32}
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
class="md-datepicker__day ${(0,c.classMap)(this.getDayClassMap)}"
|
|
8
8
|
@click=${e=>{this.disabled||this.handleClick(e)}}
|
|
9
9
|
@keydown=${e=>this.handleKeyDown(e)}
|
|
10
|
-
ariaLabel=${
|
|
11
|
-
title=${`${t}`}
|
|
10
|
+
ariaLabel=${i}
|
|
12
11
|
aria-selected=${(0,p.ifDefined)(this.selected)}
|
|
13
12
|
tab-index=${this.focused?"0":"-1"}
|
|
14
13
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("mobx"),require("luxon"),require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("lit/directives/repeat.js"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"));else if("function"==typeof define&&define.amd)define(["mobx","luxon","lit","lit/decorators.js","lit/directives/if-defined.js","lit/directives/class-map.js","lit/directives/style-map.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","lit/directives/repeat.js","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom"],t);else{var i="object"==typeof exports?t(require("mobx"),require("luxon"),require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("lit/directives/repeat.js"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom")):t(e.mobx,e.luxon,e.lit,e["lit/decorators.js"],e["lit/directives/if-defined.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e["lit/directives/repeat.js"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e["@floating-ui/dom"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,r,s,
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("mobx"),require("luxon"),require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("lit/directives/repeat.js"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"));else if("function"==typeof define&&define.amd)define(["mobx","luxon","lit","lit/decorators.js","lit/directives/if-defined.js","lit/directives/class-map.js","lit/directives/style-map.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","lit/directives/repeat.js","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom"],t);else{var i="object"==typeof exports?t(require("mobx"),require("luxon"),require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("lit/directives/repeat.js"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom")):t(e.mobx,e.luxon,e.lit,e["lit/decorators.js"],e["lit/directives/if-defined.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e["lit/directives/repeat.js"],e["@popperjs/core/lib/modifiers/arrow"],e["@popperjs/core/lib/modifiers/flip"],e["@popperjs/core/lib/modifiers/offset"],e["@popperjs/core/lib/modifiers/preventOverflow"],e["@popperjs/core/lib/popper-lite"],e["@floating-ui/dom"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,r,a,s,l,n,p,d,u,c,h,m,v)=>(()=>{"use strict";var y,f={8663(e,t,i){i.r(t),i.d(t,{DatePicker:()=>o});var o,r=i(2900),a=i(3876),s=i(9609),l=i(878),n=i(3331),p=i(7161),d=i(429),u=i(291),c=i(5796),h=(i(9189),i(708),i(405)),m=(i(837),i(3842)),v=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.weekStartDays=["Sunday","Monday"];let t=class extends p.LitElement{constructor(){super(...arguments),this.shouldCloseOnSelect=!1,this.maxDate=void 0,this.minDate=void 0,this.value=void 0,this.weekStart="Sunday",this.placeholder=void 0,this.locale=void 0,this.useISOFormat=!0,this.validateDate=!0,this.includesTime=!1,this.disabled=!1,this.htmlId="",this.label="",this.ariaLabel=null,this.displayValue=null,this.required=!1,this.errorMessage="",this.customTrigger=!1,this.isMenuOverlayOpen=!1,this.newMomentum=void 0,this.disableUserTextInput=!1,this.compactInput=void 0,this.controlButtons=void 0,this.positioningStrategy=void 0,this.showDefaultNowDate=!0,this.usePopover=!1,this.triggerID="date-trigger",this.animationFrame=!1,this.isDatePickerMonthLoading=!1,this.isDatePickerMonthError=!1,this.errorMessages={},this.selectedDate=(0,l.tB)(),this.focusedDate=(0,l.tB)(),this.filterDate=void 0,this.onRetry=void 0,this.maxDateData=void 0,this.minDateData=void 0,this.popoverController=null,this.openedViaKeyboard=!1,this.handleDateInputChange=e=>{var t,i;this.useISOFormat?this.value=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.value:this.value=null===(i=this.selectedDate)||void 0===i?void 0:i.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale}),this.dispatchEvent(new CustomEvent("date-input-change",{bubbles:!0,composed:!0,detail:{sourceEvent:e,value:this.value}}))},this.setOpen=e=>{var t,i;this.usePopover?e?null===(t=this.popoverController)||void 0===t||t.show():null===(i=this.popoverController)||void 0===i||i.hide():this.menuOverlay.isOpen=e,this.isMenuOverlayOpen=e},this.setPreSelection=e=>{if(!(null==e?void 0:e.isValid))return;const t={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};(0,l.t_)(e,t)||(this.focusedDate=e)},this.handleOverlayOpened=()=>{this.isMenuOverlayOpen=!0,this.openedViaKeyboard&&(this.openedViaKeyboard=!1,this.focusCalendarDay())},this.handleOverlayClosed=()=>{this.isMenuOverlayOpen=!1,this.focusDateInput()},this.handleInputKeyDown=e=>{switch(e.code){case r.Uz.ArrowDown:e.preventDefault(),this.isCalendarOpen||(this.openedViaKeyboard=!0,this.setOpen(!0));break;case r.Uz.Escape:this.isCalendarOpen&&(e.preventDefault(),e.stopPropagation(),this.setOpen(!1),this.focusDateInput())}},this.handleKeyDown=e=>{const t=e.detail.sourceEvent;let i=!1;const o=this.focusedDate;switch(!t.shiftKey&&t.code){case"Space":case"Enter":this.handleSelect(e),i=!0;break;case"Escape":this.setOpen(!1),i=!0;break;case"ArrowUp":this.setPreSelection((0,l.WB)(o,1)),i=!0;break;case"ArrowLeft":this.setPreSelection((0,l.gg)(o,1)),i=!0;break;case"ArrowRight":this.setPreSelection((0,l.fi)(o,1)),i=!0;break;case"ArrowDown":this.setPreSelection((0,l.J4)(o,1)),i=!0}i&&(t.stopPropagation(),t.preventDefault())},this.getDefaultAriaLabel=()=>{var e;return(null===(e=this.selectedDate)||void 0===e?void 0:e.isValid)?`Choose Date, selected date is ${this.selectedDate.toLocaleString(c.DateTime.DATE_FULL)}`:"Choose Date"},this.getValidRegexString=()=>this.includesTime?n.b.ISOString:n.b.ISODateString}get computedNewMomentum(){return void 0!==this.newMomentum?this.newMomentum:a.themeManager.isMomentumV2Enabled}static get styles(){return m.A}connectedCallback(){super.connectedCallback(),this.minDate&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&(this.maxDateData=(0,l.mA)(this.maxDate)),this.usePopover&&(this.popoverController=new h.PopoverController)}firstUpdated(e){super.firstUpdated(e),!this.value&&this.showDefaultNowDate&&(this.value=this.getFormattedDate(this.selectedDate))}updated(e){super.updated(e),this.value&&e.has("value")&&(this.useISOFormat?this.selectedDate=(0,l.mA)(this.value):this.selectedDate=c.DateTime.fromFormat(this.value,(0,l.gq)(this.locale),{locale:this.locale}),this.setPreSelection(this.selectedDate)),e.has("locale")&&this.render(),this.minDate&&e.has("minDate")&&(this.minDateData=(0,l.mA)(this.minDate)),this.maxDate&&e.has("maxDate")&&(this.maxDateData=(0,l.mA)(this.maxDate)),!this.usePopover&&e.has("usePopover")&&(this.popoverController=new h.PopoverController)}handleSelect(e){var t;const i=e.detail.date,o=e.detail.sourceEvent;this.setPreSelection(i),this.dispatchEvent(new CustomEvent("date-pre-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:o,data:i}})),(null===(t=this.controlButtons)||void 0===t?void 0:t.apply)&&"apply-button-clicked"!==(null==o?void 0:o.type)||(this.setSelected(i,o),this.shouldCloseOnSelect&&this.setOpen(!1))}getISODateTime(e){return this.includesTime?e.startOf("second").toISO({suppressMilliseconds:!0}):e.toISODate()}setSelected(e,t){const i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};if(!(0,l.t_)(e,i)){const t=this.getISODateTime(e);this.selectedDate=e,this.useISOFormat?this.value=t:this.value=e.toLocaleString(c.DateTime.DATE_SHORT,{locale:this.locale})}this.dispatchEvent(new CustomEvent("date-selection-change",{bubbles:!0,composed:!0,detail:{sourceEvent:t,data:e}}))}get isCalendarOpen(){var e,t,i,o;return this.usePopover?null!==(t=null===(e=this.popoverController)||void 0===e?void 0:e.isVisible())&&void 0!==t&&t:null!==(o=null===(i=this.menuOverlay)||void 0===i?void 0:i.isOpen)&&void 0!==o&&o}focusDateInput(){requestAnimationFrame(()=>{var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".date-input");null==t||t.focus()})}focusCalendarDay(){const e=t=>{requestAnimationFrame(()=>{var i,o,r,a,s,l;const n=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("md-datepicker-calendar"),p=null===(o=null==n?void 0:n.shadowRoot)||void 0===o?void 0:o.querySelector("md-datepicker-month"),d=null===(r=null==p?void 0:p.shadowRoot)||void 0===r?void 0:r.querySelectorAll("md-datepicker-week");if(d){for(const e of Array.from(d)){const t=null===(a=e.shadowRoot)||void 0===a?void 0:a.querySelector("md-datepicker-day[focused]");if(t){const e=null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector("md-button"),i=null===(l=null==e?void 0:e.shadowRoot)||void 0===l?void 0:l.querySelector("button");if(i)return void i.focus()}}t>0&&e(t-1)}else t>0&&e(t-1)})};e(8)}validateDateString(e){if(!e&&""!==e)return!0;if(this.useISOFormat){const t=RegExp(this.getValidRegexString()),i={maxDate:this.maxDateData,minDate:this.minDateData,filterDate:this.filterDate};return!!e&&t.test(e)&&!(0,l.t_)((0,l.mA)(e),i)}const t=(0,l.gq)(this.locale);return c.DateTime.fromFormat(e,t,{locale:this.locale}).isValid}isValueValid(){return!this.validateDate||this.validateDateString(this.value)}get messageArray(){return this.errorMessage?[{message:this.errorMessage,type:"error"}]:this.isValueValid()?[]:[{message:"",type:"error"}]}onCancelClick(){this.setOpen(!1)}onApplyClick(){this.handleSelect(new CustomEvent("day-select",{detail:{date:this.focusedDate,sourceEvent:new Event("apply-button-clicked")}}))}renderControlButtons(){var e,t,i,o,r,a;return!this.controlButtons||this.isDatePickerMonthLoading||this.isDatePickerMonthError?p.nothing:p.html`
|
|
2
2
|
<div class="control-buttons">
|
|
3
3
|
${this.controlButtons.cancel?p.html`
|
|
4
4
|
<md-button
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<md-button
|
|
16
16
|
class="apply-button"
|
|
17
17
|
aria-label=${(0,u.ifDefined)(null===(o=this.controlButtons.apply)||void 0===o?void 0:o.ariaLabel)}
|
|
18
|
-
?disabled=${null!==(
|
|
18
|
+
?disabled=${null!==(a=null===(r=this.controlButtons.apply)||void 0===r?void 0:r.disabled)&&void 0!==a&&a}
|
|
19
19
|
@button-click=${this.onApplyClick}
|
|
20
20
|
variant="primary"
|
|
21
21
|
>
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
.controller=${this.popoverController}
|
|
37
37
|
?animation-frame=${this.animationFrame}
|
|
38
38
|
.offset=${15}
|
|
39
|
+
@shown=${this.handleOverlayOpened}
|
|
40
|
+
@hidden=${this.handleOverlayClosed}
|
|
39
41
|
>
|
|
40
42
|
<div class="date-overlay-content">
|
|
41
43
|
<md-datepicker-calendar
|
|
@@ -91,6 +93,8 @@
|
|
|
91
93
|
custom-width="272px"
|
|
92
94
|
?disabled=${this.disabled}
|
|
93
95
|
positioning-strategy=${(0,u.ifDefined)(this.positioningStrategy)}
|
|
96
|
+
@menu-overlay-open=${this.handleOverlayOpened}
|
|
97
|
+
@menu-overlay-close=${this.handleOverlayClosed}
|
|
94
98
|
>
|
|
95
99
|
${this.customTrigger?p.html`
|
|
96
100
|
<span slot="menu-trigger">
|
|
@@ -140,4 +144,4 @@
|
|
|
140
144
|
${this.renderControlButtons()}
|
|
141
145
|
</div>
|
|
142
146
|
</md-menu-overlay>
|
|
143
|
-
`}render(){return this.usePopover?this.renderPopover():this.renderMenuOverlay()}};v([(0,d.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),v([(0,d.property)({type:String})],t.prototype,"maxDate",void 0),v([(0,d.property)({type:String})],t.prototype,"minDate",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"value",void 0),v([(0,d.property)({type:String})],t.prototype,"weekStart",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),v([(0,d.property)({type:String})],t.prototype,"locale",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"useISOFormat",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"validateDate",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),v([(0,d.property)({type:String})],t.prototype,"htmlId",void 0),v([(0,d.property)({type:String})],t.prototype,"label",void 0),v([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),v([(0,d.property)({type:String})],t.prototype,"displayValue",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"required",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),v([(0,d.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"isMenuOverlayOpen",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disableUserTextInput",void 0),v([(0,d.property)({type:Boolean,attribute:"compact-input"})],t.prototype,"compactInput",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"controlButtons",void 0),v([(0,d.property)({type:String,attribute:"positioning-strategy"})],t.prototype,"positioningStrategy",void 0),v([(0,d.property)({type:Boolean,attribute:"show-default-now-date"})],t.prototype,"showDefaultNowDate",void 0),v([(0,d.property)({type:Boolean,attribute:"use-popover"})],t.prototype,"usePopover",void 0),v([(0,d.property)({type:String,attribute:"triggerID"})],t.prototype,"triggerID",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],t.prototype,"animationFrame",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),v([(0,d.state)()],t.prototype,"selectedDate",void 0),v([(0,d.state)()],t.prototype,"focusedDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"filterDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),v([(0,d.state)()],t.prototype,"maxDateData",void 0),v([(0,d.state)()],t.prototype,"minDateData",void 0),v([(0,d.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),v([(0,d.query)("md-popover")],t.prototype,"popoverElement",void 0),t=v([(0,
|
|
147
|
+
`}render(){return this.usePopover?this.renderPopover():this.renderMenuOverlay()}};v([(0,d.property)({type:Boolean,attribute:"should-close-on-select"})],t.prototype,"shouldCloseOnSelect",void 0),v([(0,d.property)({type:String})],t.prototype,"maxDate",void 0),v([(0,d.property)({type:String})],t.prototype,"minDate",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"value",void 0),v([(0,d.property)({type:String})],t.prototype,"weekStart",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"placeholder",void 0),v([(0,d.property)({type:String})],t.prototype,"locale",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"useISOFormat",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"validateDate",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"includes-time"})],t.prototype,"includesTime",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),v([(0,d.property)({type:String})],t.prototype,"htmlId",void 0),v([(0,d.property)({type:String})],t.prototype,"label",void 0),v([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),v([(0,d.property)({type:String})],t.prototype,"displayValue",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"required",void 0),v([(0,d.property)({type:String,reflect:!0})],t.prototype,"errorMessage",void 0),v([(0,d.property)({type:Boolean,attribute:"custom-trigger"})],t.prototype,"customTrigger",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"isMenuOverlayOpen",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),v([(0,d.property)({type:Boolean})],t.prototype,"disableUserTextInput",void 0),v([(0,d.property)({type:Boolean,attribute:"compact-input"})],t.prototype,"compactInput",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"controlButtons",void 0),v([(0,d.property)({type:String,attribute:"positioning-strategy"})],t.prototype,"positioningStrategy",void 0),v([(0,d.property)({type:Boolean,attribute:"show-default-now-date"})],t.prototype,"showDefaultNowDate",void 0),v([(0,d.property)({type:Boolean,attribute:"use-popover"})],t.prototype,"usePopover",void 0),v([(0,d.property)({type:String,attribute:"triggerID"})],t.prototype,"triggerID",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],t.prototype,"animationFrame",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-loading"})],t.prototype,"isDatePickerMonthLoading",void 0),v([(0,d.property)({type:Boolean,reflect:!0,attribute:"is-date-picker-month-error"})],t.prototype,"isDatePickerMonthError",void 0),v([(0,d.property)({type:Object,attribute:!1})],t.prototype,"errorMessages",void 0),v([(0,d.state)()],t.prototype,"selectedDate",void 0),v([(0,d.state)()],t.prototype,"focusedDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"filterDate",void 0),v([(0,d.property)({attribute:!1})],t.prototype,"onRetry",void 0),v([(0,d.state)()],t.prototype,"maxDateData",void 0),v([(0,d.state)()],t.prototype,"minDateData",void 0),v([(0,d.query)("md-menu-overlay")],t.prototype,"menuOverlay",void 0),v([(0,d.query)("md-popover")],t.prototype,"popoverElement",void 0),t=v([(0,s.w)("md-datepicker")],t),e.ELEMENT=t}(o||(o={}))},5784(e){e.exports=v},2022(e){e.exports=l},554(e){e.exports=n},2962(e){e.exports=d},6538(e){e.exports=u},8250(e){e.exports=c},9371(e){e.exports=h},4863(e){e.exports=m},7161(e){e.exports=i},429(e){e.exports=o},5125(e){e.exports=a},291(e){e.exports=r},8175(e){e.exports=p},318(e){e.exports=s},5796(e){e.exports=t},5314(t){t.exports=e}},g={};function D(e){var t=g[e];if(void 0!==t)return t.exports;var i=g[e]={exports:{}};return f[e](i,i.exports,D),i.exports}D.m=f,y=[],D.O=(e,t,i,o)=>{if(!t){var r=1/0;for(n=0;n<y.length;n++){for(var[t,i,o]=y[n],a=!0,s=0;s<t.length;s++)(!1&o||r>=o)&&Object.keys(D.O).every(e=>D.O[e](t[s]))?t.splice(s--,1):(a=!1,o<r&&(r=o));if(a){y.splice(n--,1);var l=i();void 0!==l&&(e=l)}}return e}o=o||0;for(var n=y.length;n>0&&y[n-1][2]>o;n--)y[n]=y[n-1];y[n]=[t,i,o]},D.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return D.d(t,{a:t}),t},D.d=(e,t)=>{for(var i in t)D.o(t,i)&&!D.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},D.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),D.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),D.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1586:0,8663:0};D.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[a,s,l]=i,n=0;if(a.some(t=>0!==e[t])){for(o in s)D.o(s,o)&&(D.m[o]=s[o]);if(l)var p=l(D)}for(t&&t(i);n<a.length;n++)r=a[n],D.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return D.O(p)},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 b=D.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,519,8441,2797,9983,4700,3970,7906,9336,9146,2369,3842,9189,708,2492,3639,3331,3876,801,878,8371,953],()=>D(8663));return D.O(b)})());
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,n,r,a,d)=>(()=>{"use strict";var l,p={621(e,t,i){i.r(t),i.d(t,{Dropdown:()=>s}),i(1821);var s,o=i(2900),n=i(7704),r=i(2050),a=i(4084),d=i(7161),l=i(429),p=i(5125),h=i(291),u=i(8175),c=i(318),m=i(5057),y=function(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},f=function(e,t,i,s){return new(i||(i=Promise))(function(o,n){function r(e){try{d(s.next(e))}catch(e){n(e)}}function a(e){try{d(s.throw(e))}catch(e){n(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}d((s=s.apply(e,t||[])).next())})};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.yC)(d.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new t,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||this.expanded&&this.collapse())},this.onKeyDown=e=>{switch(e.code){case o.Uz.Tab:this.expanded&&(e.stopPropagation(),this.collapse());break;case o.Uz.Space:case o.Uz.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case o.Uz.ArrowDown:this.expanded?this.focusNext():this.expand();break;case o.Uz.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case o.Uz.Home:this.expanded?this.focusFirst():this.expand();break;case o.Uz.End:this.expanded?this.focusLast():this.expand();break;case o.Uz.Escape||o.Uz.Backspace:this.expanded&&(e.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(e=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:e}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}}),this.searchable&&this.setInitialValue()}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t){const e=this.dropdownRenderOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&(this.focusToIndex(e),this.searchable&&this.setInitialValue())}if("expanded"===t&&this.updateListDOM(),"focusedIndex"===t&&this.updateListDOM(),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const e=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(e,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var e;if(this.options.length){const t=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey),i=null==t?void 0:t.option;i&&(this.setInputValue(this.getOptionValue(i)),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(this.getOptionValue(i)),this.requestUpdate())}}getOptionValue(e){return this.isOptionObject(e)&&!this.optionValue?Object.values(e)[0]:this.isOptionObject(e)?e[this.optionValue]:e}getOptionId(e){return this.isOptionObject(e)?e[this.optionId]:e}isOptionObject(e){return"object"==typeof e&&null!==e}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,i)=>{const{key:s,value:o}=this.getOptionKeyValuePair(i);return-1!==e.indexOf(s)?console.error(`Dropdown already have option key: "${s}". Ignoring `):s?(e.push(s),t.push({key:s,value:o,option:i})):console.error(`Dropdown key is not defined: "${s}". (value: "${o}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.dropdownRenderOptions=t}updateListDOM(){return f(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return f(this,void 0,void 0,function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)}px`;this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))})}handleFocusIn(e){var t;this.disabled&&this.readOnly||null===(t=super.handleFocusIn)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){var t;null===(t=super.handleFocusOut)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[a.A,m.A]}get filteredOptions(){const e=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!e.trim())return this.dropdownRenderOptions;const t=this.dropdownRenderOptions.filter(t=>t.value.toLowerCase().includes(e.toLowerCase()));return 0===t.length?[{key:"no-result",value:"No Result",disabled:!0}]:t}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(e){this.expanded=e}updateOnNextFrame(e){requestAnimationFrame(e)}setInputValue(e=""){this.input.value=e}shouldChangeButton(){const e=this.input&&this.input.value.length>0;return e&&document.dispatchEvent(new CustomEvent("on-widget-update")),e}toggleVisualListBox(e){var t,i;if(!this.readOnly){if(e.target.classList.contains("md-dropdown-input"))e.target.focus();else if("md-icon"===e.target.localName){const s=null===(i=null===(t=e.target.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.parentElement;if(s){const e=s.querySelector(".md-dropdown-input");setTimeout(()=>{e.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus()}}handleRemoveAll(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var e;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){this.expanded=!0;const e=-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";document.dispatchEvent(new CustomEvent("on-widget-update")),this.label.setAttribute("aria-activedescendant",e),this.optionsList&&this.optionsList.focus(),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1,this.searchable||this.label.setAttribute("aria-activedescendant","")}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.dropdownRenderOptions[this.focusedIndex],t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:e.option?e.option:e.key}})))}}onLabelClick(){this.label.focus(),this.toggle()}focusFirst(){this.dropdownRenderOptions.length&&(this.focusedIndex=0)}focusLast(){this.dropdownRenderOptions.length&&(this.focusedIndex=this.dropdownRenderOptions.length-1)}focusNext(){this.dropdownRenderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.dropdownRenderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.dropdownRenderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.dropdownRenderOptions.length&&e>=0&&e<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=e)}focusToIndexWithOption(e){const t=this.dropdownRenderOptions.findIndex(t=>t.key===e.key);this.dropdownRenderOptions.length&&t>=0&&t<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=t)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return f(this,void 0,void 0,function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:i,bottom:s}=this.optionsList.getBoundingClientRect(),o=this.optionsListItems[e],n=this.optionsListItems[e+1]||o,r=this.optionsListItems[e-1]||o,a=n.getBoundingClientRect(),d=r.getBoundingClientRect();a.bottom>s?t=a.bottom-s+2:d.top<i&&(t=d.top-i-2),this.optionsList.scrollTop+=t}t()})})})}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),i=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:i[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(e){const t=e.target.value;this.inputValue=t.trim(),this.notifyInputValueChanged(t.trim())}helpTextTemplate(){return this.helpText?d.html`
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx,e["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i,s,o,n,r,a,l)=>(()=>{"use strict";var d,p={621(e,t,i){i.r(t),i.d(t,{Dropdown:()=>s}),i(1821);var s,o=i(2900),n=i(7704),r=i(2050),a=i(4084),l=i(7161),d=i(429),p=i(5125),h=i(291),u=i(8175),c=i(318),m=i(5057),f=function(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t,i,s){return new(i||(i=Promise))(function(o,n){function r(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,a)}l((s=s.apply(e,t||[])).next())})};!function(e){class t{determineMessageType(e){return e.reduce((e,t)=>"error"===t?e:t.type,"")}filterMessagesByType(e,t){return e.reduce((e,i)=>i.type===t?e.concat(i.message):e,[])}}e.MessageController=t;let i=class extends((0,n.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new t,this.lastMaxHeight="",this.onOutsideClick=e=>{let t=!1;const i=e.composedPath();i.length&&(t=!!i.find(e=>e===this),t||this.expanded&&this.collapse())},this.onKeyDown=e=>{var t;if(!this.disabled&&!this.readOnly)switch(e.code){case o.Uz.Tab:this.expanded&&(e.stopPropagation(),this.collapse());break;case o.Uz.Space:case o.Uz.Enter:{const i=e.composedPath()[0];if(null===(t=i.closest)||void 0===t?void 0:t.call(i,".md-dropdown-button"))break;e.preventDefault(),this.expanded?(this.select(),this.collapse()):this.expand();break}case o.Uz.ArrowDown:e.preventDefault(),this.expanded?this.focusNext():this.expand();break;case o.Uz.ArrowUp:e.preventDefault(),this.expanded?this.focusPrev():this.expand();break;case o.Uz.Home:e.preventDefault(),this.expanded?this.focusFirst():this.expand();break;case o.Uz.End:e.preventDefault(),this.expanded?this.focusLast():this.expand();break;case o.Uz.Escape:case o.Uz.Backspace:this.expanded&&(e.preventDefault(),e.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,r.sg)(e=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:e}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(e){super.firstUpdated(e),e.forEach((e,t)=>{if("defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}}),this.searchable&&this.setInitialValue()}updated(e){super.updated(e),e.forEach((e,t)=>{if("options"===t&&this.updateRenderOptions(),"selectedKey"===t&&this.dropdownRenderOptions.some(e=>e.key===this.selectedKey)){const e=this.filteredOptions.findIndex(e=>e.key===this.selectedKey);-1!==e&&this.focusToIndex(e),this.searchable&&this.setInitialValue()}if("expanded"===t&&(this.updateListDOM(),this.updateActiveDescendant()),"focusedIndex"===t&&(this.updateListDOM(),this.updateActiveDescendant()),"defaultOption"===t&&this.defaultOption){const{key:e}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=e}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const e=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(e,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var e;if(this.options.length){const t=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey),i=null==t?void 0:t.option;if(i){const t=this.getOptionValue(i);this.inputValue=t,this.setInputValue(t),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(t)}}}getOptionValue(e){return this.isOptionObject(e)&&!this.optionValue?Object.values(e)[0]:this.isOptionObject(e)?e[this.optionValue]:e}getOptionId(e){return this.isOptionObject(e)?e[this.optionId]:e}isOptionObject(e){return"object"==typeof e&&null!==e}updateRenderOptions(){const e=[];this.focusReset();const t=this.options.reduce((t,i)=>{const{key:s,value:o}=this.getOptionKeyValuePair(i);return-1!==e.indexOf(s)?console.error(`Dropdown already have option key: "${s}". Ignoring `):s?(e.push(s),t.push({key:s,value:o,option:i})):console.error(`Dropdown key is not defined: "${s}". (value: "${o}"). Ignoring `),t},[]);this.allowUnselected&&t.unshift({key:"",value:this.title}),this.dropdownRenderOptions=t}updateActiveDescendant(){const e=this.searchable?this.input:this.label;if(e){const t=this.expanded&&-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";e.setAttribute("aria-activedescendant",t)}}updateListDOM(){return y(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return y(this,void 0,void 0,function*(){yield new Promise(e=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const e=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((e,t)=>e+t.offsetHeight,0)}px`;this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}else{const e="auto";this.lastMaxHeight!==e&&(this.optionsList.style.maxHeight=e,this.lastMaxHeight=e)}e()}))})}handleFocusIn(e){var t;this.disabled||null===(t=super.handleFocusIn)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(e){var t;null===(t=super.handleFocusOut)||void 0===t||t.call(this,e),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[a.A,m.A]}get filteredOptions(){const e=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!e.trim())return this.dropdownRenderOptions;const t=this.dropdownRenderOptions.filter(t=>t.value.toLowerCase().includes(e.toLowerCase()));return 0===t.length?[{key:"no-result",value:"No Result",disabled:!0}]:t}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(e){this.expanded=e}updateOnNextFrame(e){requestAnimationFrame(e)}setInputValue(e=""){this.input.value=e}shouldChangeButton(){const e=this.input&&this.input.value.length>0;return e&&document.dispatchEvent(new CustomEvent("on-widget-update")),e}toggleVisualListBox(e){var t,i;if(!this.readOnly){if(e.target.classList.contains("md-dropdown-input"))e.target.focus();else if("md-icon"===e.target.localName){const s=null===(i=null===(t=e.target.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.parentElement;if(s){const e=s.querySelector(".md-dropdown-input");setTimeout(()=>{e.focus()},10)}}this.expanded?this.collapse():(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.expand()),this.input.focus()}}handleRemoveAll(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var e;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){if(this.expanded=!0,document.dispatchEvent(new CustomEvent("on-widget-update")),!this.searchable&&this.label&&this.label.focus(),-1===this.focusedIndex)if(this.selectedKey){const e=this.filteredOptions.findIndex(e=>e.key===this.selectedKey);-1!==e?this.focusedIndex=e:this.focusNext()}else this.focusNext()}collapse(){if(this.expanded=!1,this.searchable&&this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(null==e?void 0:e.option){const t=this.getOptionValue(e.option);this.inputValue=t,this.setInputValue(t)}}}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const e=this.filteredOptions[this.focusedIndex];if(!e||"no-result"===e.key)return;const t=e.key;t!==this.selectedKey&&(this.selectedKey=t,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:"option"in e&&e.option||e.key}})))}}onLabelClick(){this.label.focus(),this.readOnly||this.toggle()}focusFirst(){this.filteredOptions.length&&(this.focusedIndex=0)}focusLast(){this.filteredOptions.length&&(this.focusedIndex=this.filteredOptions.length-1)}focusNext(){this.filteredOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.filteredOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.filteredOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(e){this.filteredOptions.length&&e>=0&&e<=this.filteredOptions.length-1&&(this.focusedIndex=e)}focusToIndexWithOption(e){const t=this.filteredOptions.findIndex(t=>t.key===e.key);this.filteredOptions.length&&t>=0&&t<=this.filteredOptions.length-1&&(this.focusedIndex=t)}focusReset(){this.focusedIndex=-1}scrollToIndex(e){return y(this,void 0,void 0,function*(){yield new Promise(t=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&e>=0&&this.optionsListItems.length>e){let t=0;const{top:i,bottom:s}=this.optionsList.getBoundingClientRect(),o=this.optionsListItems[e],n=this.optionsListItems[e+1]||o,r=this.optionsListItems[e-1]||o,a=n.getBoundingClientRect(),l=r.getBoundingClientRect();a.bottom>s?t=a.bottom-s+2:l.top<i&&(t=l.top-i-2),this.optionsList.scrollTop+=t}t()})})})}getOptionKeyValuePair(e){if("string"==typeof e)return{key:e.trim(),value:e};if(e&&"object"==typeof e){const t=Object.keys(e),i=Object.values(e);if(t.length){if(1===t.length||!this.optionId)return{key:t[0],value:i[0]};if(this.optionId)return{key:e[this.optionId],value:e[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const e=this.dropdownRenderOptions.find(e=>e.key===this.selectedKey);if(e)return e.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(e){const t=e.target.value;this.inputValue=t.trim(),this.notifyInputValueChanged(t.trim())}helpTextTemplate(){return this.helpText?l.html`
|
|
2
2
|
<md-help-text
|
|
3
3
|
class="help-text ${(0,p.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
4
4
|
.message=${this.helpText}
|
|
5
5
|
style=${(0,c.styleMap)({width:"100%"})}
|
|
6
6
|
></md-help-text>
|
|
7
|
-
`:
|
|
7
|
+
`:l.nothing}messagesTemplate(){return this.messages&&this.messages.length?l.html`
|
|
8
8
|
<div id="${this.htmlId}-message" part="message" class="md-dropbox__messages">
|
|
9
|
-
${(0,u.repeat)(this.messages,(e,t)=>
|
|
9
|
+
${(0,u.repeat)(this.messages,(e,t)=>l.html`
|
|
10
10
|
<md-help-text
|
|
11
11
|
.message=${e}
|
|
12
12
|
.id=${this.messageArr[t].id||""}
|
|
@@ -15,15 +15,16 @@
|
|
|
15
15
|
></md-help-text>
|
|
16
16
|
`)}
|
|
17
17
|
</div>
|
|
18
|
-
`:
|
|
18
|
+
`:l.nothing}iconTemplate(){return l.html`
|
|
19
19
|
<md-icon
|
|
20
20
|
class="md-dropdown-left-icon"
|
|
21
21
|
name="${this.leftIcon}"
|
|
22
22
|
size="16"
|
|
23
23
|
iconSet="momentumDesign"
|
|
24
|
+
aria-hidden="true"
|
|
24
25
|
@click=${this.toggleVisualListBox}
|
|
25
26
|
></md-icon>
|
|
26
|
-
`}clearButtonTemplate(){return
|
|
27
|
+
`}clearButtonTemplate(){return l.html`
|
|
27
28
|
<button
|
|
28
29
|
type="button"
|
|
29
30
|
class="md-dropdown-button clear"
|
|
@@ -39,10 +40,11 @@
|
|
|
39
40
|
name="cancel-bold"
|
|
40
41
|
size="16"
|
|
41
42
|
iconSet="momentumDesign"
|
|
43
|
+
aria-hidden="true"
|
|
42
44
|
style="height: ${this.clearIconHeight};"
|
|
43
45
|
></md-icon>
|
|
44
46
|
</button>
|
|
45
|
-
`}arrowButtonTemplate(){return
|
|
47
|
+
`}arrowButtonTemplate(){return l.html`
|
|
46
48
|
<button
|
|
47
49
|
type="button"
|
|
48
50
|
class="md-dropdown-button arrow-down"
|
|
@@ -55,54 +57,54 @@
|
|
|
55
57
|
?disabled=${this.disabled}
|
|
56
58
|
@click=${this.toggleVisualListBox}
|
|
57
59
|
>
|
|
58
|
-
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
60
|
+
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
59
61
|
</button>
|
|
60
|
-
`}render(){return
|
|
62
|
+
`}render(){return l.html`
|
|
61
63
|
<div class="md-dropdown ${(0,p.classMap)(this.dropDownClassMap)}" part="dropdown">
|
|
62
|
-
${this.searchable?
|
|
64
|
+
${this.searchable?l.html`
|
|
63
65
|
<div part="group" class="group" ?readonly=${this.readOnly}>
|
|
64
|
-
${this.leftIcon?this.iconTemplate():
|
|
66
|
+
${this.leftIcon?this.iconTemplate():l.nothing}
|
|
65
67
|
<input
|
|
66
68
|
class="md-dropdown-input"
|
|
67
69
|
type="text"
|
|
68
70
|
role="combobox"
|
|
69
71
|
aria-autocomplete="both"
|
|
70
|
-
aria-label=${this.title}
|
|
72
|
+
aria-label=${(0,h.ifDefined)(this.inputValue?void 0:this.title)}
|
|
71
73
|
part="dropdown-input"
|
|
72
74
|
aria-expanded=${this.expanded}
|
|
73
|
-
placeholder=${this.placeholder}
|
|
75
|
+
placeholder=${this.inputValue?"":this.placeholder}
|
|
74
76
|
aria-controls="md-dropdown-list"
|
|
75
77
|
?readonly=${this.readOnly}
|
|
76
78
|
?disabled=${this.disabled}
|
|
77
79
|
?autofocus=${this.autofocus}
|
|
78
|
-
title=${this.title}
|
|
79
80
|
tabindex="0"
|
|
80
81
|
.value=${this.inputValue}
|
|
81
82
|
@click=${this.toggleVisualListBox}
|
|
82
83
|
@input=${this.handleInput}
|
|
83
84
|
/>
|
|
84
|
-
${this.compact||!this.searchable?
|
|
85
|
+
${this.compact||!this.searchable?l.nothing:this.shouldChangeButton()?this.clearButtonTemplate():this.arrowButtonTemplate()}
|
|
85
86
|
</div>
|
|
86
|
-
`:
|
|
87
|
+
`:l.html`
|
|
87
88
|
<label
|
|
88
89
|
class="md-dropdown-label ${(0,p.classMap)({"md-new-dropdown-label":this.newMomentum})}"
|
|
89
90
|
aria-expanded="${this.expanded}"
|
|
90
|
-
aria-label="${this.
|
|
91
|
+
aria-label="${this.labelTitle}"
|
|
91
92
|
aria-controls="md-dropdown-list"
|
|
92
93
|
aria-haspopup="listbox"
|
|
93
94
|
?disabled=${this.disabled}
|
|
94
95
|
@click=${this.onLabelClick}
|
|
95
96
|
part="dropdown-header"
|
|
96
97
|
role="combobox"
|
|
97
|
-
tabindex="0"
|
|
98
|
+
tabindex="${this.newMomentum&&this.disabled?-1:0}"
|
|
98
99
|
>
|
|
99
|
-
${this.leftIcon?
|
|
100
|
+
${this.leftIcon?l.html`<span class="md-dropdown-label--left-icon" aria-hidden="true">${this.iconTemplate()}</span>`:l.nothing}
|
|
100
101
|
<span
|
|
101
102
|
class="md-dropdown-label--text ${(0,p.classMap)({"md-new-dropdown-label--text":this.newMomentum})}"
|
|
103
|
+
aria-hidden="true"
|
|
102
104
|
>
|
|
103
105
|
${this.labelTitle}</span
|
|
104
106
|
>
|
|
105
|
-
<span class="md-dropdown-label--icon">
|
|
107
|
+
<span class="md-dropdown-label--icon" aria-hidden="true">
|
|
106
108
|
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign"></md-icon>
|
|
107
109
|
</span>
|
|
108
110
|
</label>
|
|
@@ -114,14 +116,14 @@
|
|
|
114
116
|
aria-label="${this.labelTitle}"
|
|
115
117
|
aria-hidden="${!this.expanded}"
|
|
116
118
|
part="dropdown-options"
|
|
117
|
-
tabindex=${(0,h.ifDefined)(
|
|
119
|
+
tabindex=${(0,h.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
118
120
|
>
|
|
119
|
-
${this.filteredOptions.map((e,t)=>
|
|
121
|
+
${this.filteredOptions.map((e,t)=>l.html`
|
|
120
122
|
<li
|
|
121
123
|
id="combo-${t}"
|
|
122
124
|
class="md-dropdown-option"
|
|
123
125
|
role="option"
|
|
124
|
-
tabindex=${(0,h.ifDefined)(
|
|
126
|
+
tabindex=${(0,h.ifDefined)(this.newMomentum||-1===this.customTabIndex?void 0:this.customTabIndex)}
|
|
125
127
|
aria-label="${e.value}"
|
|
126
128
|
label="${e.value}"
|
|
127
129
|
aria-selected="${e.key===this.selectedKey}"
|
|
@@ -133,9 +135,16 @@
|
|
|
133
135
|
<span class="select-label" part="label">
|
|
134
136
|
<span>${e.value}</span>
|
|
135
137
|
</span>
|
|
138
|
+
${this.newMomentum&&e.key===this.selectedKey?l.html`<md-icon
|
|
139
|
+
class="md-dropdown-option--icon"
|
|
140
|
+
name="check-bold"
|
|
141
|
+
size="16"
|
|
142
|
+
iconSet="momentumDesign"
|
|
143
|
+
aria-hidden="true"
|
|
144
|
+
></md-icon>`:l.nothing}
|
|
136
145
|
</li>
|
|
137
146
|
`)}
|
|
138
147
|
</ul>
|
|
139
148
|
</div>
|
|
140
149
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
141
|
-
`}};
|
|
150
|
+
`}};f([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),f([(0,d.property)({type:Array})],i.prototype,"options",void 0),f([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),f([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),f([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),f([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),f([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),f([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),f([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),f([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),f([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),f([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),f([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),f([(0,d.property)({type:String})],i.prototype,"helpText",void 0),f([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),f([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),f([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),f([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),f([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),f([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),f([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),f([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),f([(0,d.state)()],i.prototype,"selectedKey",void 0),f([(0,d.state)()],i.prototype,"expanded",void 0),f([(0,d.state)()],i.prototype,"focusedIndex",void 0),f([(0,d.query)("label")],i.prototype,"label",void 0),f([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),f([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),f([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=f([(0,n.wW)("md-dropdown")],i),e.ELEMENT=i}(s||(s={}))},7704(e,t,i){i.d(t,{wW:()=>o.w,yC:()=>s.y}),i(2364);var s=i(3203),o=(i(9938),i(5201),i(4781),i(608),i(9609))},2022(e){e.exports=n},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=l},318(e){e.exports=s},5314(e){e.exports=a}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,u),i.exports}u.m=p,d=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(l=0;l<d.length;l++){for(var[t,i,s]=d[l],n=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(u.O).every(e=>u.O[e](t[r]))?t.splice(r--,1):(n=!1,s<o&&(o=s));if(n){d.splice(l--,1);var a=i();void 0!==a&&(e=a)}}return e}s=s||0;for(var l=d.length;l>0&&d[l-1][2]>s;l--)d[l]=d[l-1];d[l]=[t,i,s]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={561:0,2942:0,5323:0,7704:0,7711:0,8180:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[n,r,a]=i,l=0;if(n.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(a)var d=a(u)}for(t&&t(i);l<n.length;l++)o=n[l],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2050,8138,5057],()=>u(621));return u.O(c)})());
|