@momentum-ui/web-components 2.23.47 → 2.23.49

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/6652.js DELETED
@@ -1,47 +0,0 @@
1
- "use strict";(self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[]).push([[1439,3820,6652,6677,9058],{63208:(t,e,i)=>{i(17814),i(61200);var o,r=i(31890),a=i(81625),n=i(26272),s=i(41488),d=i(14974),h=function(t,e,i,o){var r,a=arguments.length,n=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.monthFormat="MMMM yyyy",this.filterParams=void 0,this.handleMonthChange=void 0,this.datePickerProps=void 0,this.shortDay=!1,this.viewAnchorDate=(0,a.tB)(),this.localeMonth=void 0,this.setDate=(t,e)=>{this.viewAnchorDate=t,null==e||e()},this.increaseMonth=t=>{const{handleMonthChange:e}=this,{viewAnchorDate:i}=this;this.setDate((0,a.PS)(i,1),()=>e&&e(t,this.viewAnchorDate))},this.decreaseMonth=t=>{const{handleMonthChange:e}=this,{viewAnchorDate:i}=this;this.setDate((0,a.SL)(i,1),()=>e&&e(t,this.viewAnchorDate))},this.renderMonthName=()=>s.html` <div class="md-datepicker__navigation--current-month" aria-live="polite">${this.localeMonth}</div> `,this.renderPreviousMonthButton=()=>{var t,e;const i=(null===(t=this.filterParams)||void 0===t?void 0:t.minDate)&&(0,a.PD)(this.viewAnchorDate,null===(e=this.filterParams)||void 0===e?void 0:e.minDate);return s.html`
2
- <md-button
3
- variant="ghost"
4
- circle
5
- size="28"
6
- aria-controls="Datepicker-Calendar"
7
- aria-label=${"previous month"}
8
- title=${"previous month"}
9
- ?disabled=${i}
10
- @click=${!i&&this.decreaseMonth}
11
- tabindex="-1"
12
- >
13
- <md-icon name="arrow-left-bold" size="16" iconSet="momentumDesign"></md-icon>
14
- </md-button>
15
- `},this.renderNextMonthButton=()=>{var t,e;const i=(null===(t=this.filterParams)||void 0===t?void 0:t.maxDate)&&(0,a.FO)(this.viewAnchorDate,null===(e=this.filterParams)||void 0===e?void 0:e.maxDate);return s.html`
16
- <md-button
17
- variant="ghost"
18
- circle
19
- size="28"
20
- aria-controls="Datepicker-Calendar"
21
- aria-label=${"next month"}
22
- title=${"next month"}
23
- ?disabled=${i}
24
- @click=${!i&&this.increaseMonth}
25
- tabindex="-1"
26
- ><md-icon name="arrow-right-bold" size="16" iconSet="momentumDesign"></md-icon>
27
- </md-button>
28
- `},this.header=()=>{var t;const e=(0,a.mK)(this.viewAnchorDate,null===(t=this.datePickerProps)||void 0===t?void 0:t.weekStart);return[].concat([0,1,2,3,4,5,6].map(t=>{var i;const o=(0,a.fi)((0,a.WV)(e,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en"),t),r=(0,a.XN)(o),n=this.getWeekDayName(r,o);return s.html` <div class="md-datepicker__day--name">${n}</div> `}))},this.renderMonth=()=>s.html`
29
- <div class="md-datepicker__month-container">
30
- <div class="md-datepicker__header">
31
- <div class="md-datepicker__navigation">
32
- ${this.renderMonthName()}
33
- <div class="md-datepicker__navigation--buttons">
34
- ${this.renderPreviousMonthButton()} ${this.renderNextMonthButton()}
35
- </div>
36
- </div>
37
- <div class="md-datepicker__day--names">${this.header()}</div>
38
- </div>
39
- <md-datepicker-month
40
- .day=${this.viewAnchorDate}
41
- .filterParams=${this.filterParams}
42
- .datePickerProps=${this.datePickerProps}
43
- ></md-datepicker-month>
44
- </div>
45
- `}connectedCallback(){var t,e,i;super.connectedCallback(),this.viewAnchorDate=(null===(t=this.datePickerProps)||void 0===t?void 0:t.focused)||(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected)||(0,a.tB)(),this.localeMonth=(0,a.WV)(this.viewAnchorDate,(null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)||"en").toFormat(this.monthFormat)}updated(t){var e,i,o,r,n;super.updated(t),t.has("datePickerProps")&&(null===(null===(e=this.datePickerProps)||void 0===e?void 0:e.selected.invalidReason)&&(this.viewAnchorDate=this.datePickerProps.selected||(0,a.tB)()),this.localeMonth=((null===(i=this.datePickerProps)||void 0===i?void 0:i.locale)?(0,a.WV)(this.viewAnchorDate,null===(o=this.datePickerProps)||void 0===o?void 0:o.locale):this.viewAnchorDate).toFormat(this.monthFormat)),t.has("viewAnchorDate")&&(this.localeMonth=((null===(r=this.datePickerProps)||void 0===r?void 0:r.locale)?(0,a.WV)(this.viewAnchorDate,null===(n=this.datePickerProps)||void 0===n?void 0:n.locale):this.viewAnchorDate).toFormat(this.monthFormat))}getWeekDayName(t,e){return this.shortDay?(0,a.XY)(t,e):(0,a.DY)(t,e)}static get styles(){return[n.A,d.A]}render(){return s.html`
46
- <div class="md-datepicker__calendar" id="Datepicker-Calendar">${this.viewAnchorDate&&this.renderMonth()}</div>
47
- `}};h([(0,s.property)({attribute:!1})],e.prototype,"monthFormat",void 0),h([(0,s.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,s.property)({attribute:!1})],e.prototype,"handleMonthChange",void 0),h([(0,s.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),h([(0,s.property)({type:Boolean,reflect:!0,attribute:"short-day"})],e.prototype,"shortDay",void 0),h([(0,s.internalProperty)()],e.prototype,"viewAnchorDate",void 0),h([(0,s.internalProperty)()],e.prototype,"localeMonth",void 0),e=h([(0,r.w)("md-datepicker-calendar")],e),t.ELEMENT=e}(o||(o={}))},66677:(t,e,i)=>{function o(t,e,i){let o;return function(...r){const a=this,n=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(a,r)},e),n&&t.apply(a,r)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}i.d(e,{QZ:()=>r,sg:()=>o})}}]);